@sgmrt · Post #1882 · 08.02.2024 г., 01:39
[CCL] UPDATE: Due to a signal fault, please continue to add additional 10 minutes travel time between #Stadium and #PayaLebar. You may consider alternative means of transport. - SMRT
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #76 · 27 апр.
Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs
Пребарај: #stadium
@sgmrt · Post #1882 · 08.02.2024 г., 01:39
[CCL] UPDATE: Due to a signal fault, please continue to add additional 10 minutes travel time between #Stadium and #PayaLebar. You may consider alternative means of transport. - SMRT
Hashtags
@sgmrt · Post #1881 · 08.02.2024 г., 01:14
[CCL]: Update: Due to a signal fault, please continue to add additional 10 minutes travel time between #Stadium and #PayaLebar - SMRT
Hashtags
@sgmrt · Post #1880 · 08.02.2024 г., 00:49
[CCL]: Update: Due to a signal fault, please add additional 10 minutes travel time between #Stadium and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1879 · 08.02.2024 г., 00:05
[CCL]: Due to a signal fault, please add additional 10 minutes travel time between #Stadium and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1425 · 01.04.2022 г., 04:41
[CCL] CLEARED: Train services between #Stadium and #Bartley have resumed. Free regular bus & free bridging bus svcs have ended. - SMRT
@sgmrt · Post #1421 · 01.04.2022 г., 04:09
[CCL]: Shuttle train service is available between #Stadium and #Bartley Platform B. - SMRT
@sgmrt · Post #1832 · 29.09.2023 г., 11:40
[CCL] CLEARED: Train services between #DhobyGhaut /#MarinaBay and #Stadium have resumed. Free regular bus and bridging bus services have ended. - SMRT
Hashtags
@sgmrt · Post #1792 · 29.09.2023 г., 00:00
[CCL] UPDATE: Our engineers are still rectifying the fault. Please add 30 mins train travel time between #DhobyGhaut / #MarinaBay and #Stadium. - SMRT
Hashtags
@sgmrt · Post #1789 · 28.09.2023 г., 23:00
[CCL] UPDATE: Our engineers are still rectifying the fault. Please add 30 minutes travelling time between #DhobyGhaut / #MarinaBay and #Stadium. - SMRT
Hashtags
@sgmrt · Post #1786 · 28.09.2023 г., 22:10
[CCL] UPDATE: Our engineers are still rectifying the fault. Please add 30 minutes train travel time between #DhobyGhaut / #MarinaBay and #Stadium. - SMRT
Hashtags
@sgmrt · Post #1693 · 07.04.2023 г., 07:02
[CCL]: Pls add 40mins of train travel time between #DhobyGhaut/#MarinaBay and #Stadium. Our engineers are on site to conduct the recovery operations. Free regular bus and free bridging bus svcs are available. - SMRT
Hashtags
@sgmrt · Post #1785 · 28.09.2023 г., 21:54
[CCL] UPDATE: Passengers travelling on CCL between #DhobyGhaut/ #MarinaBay and #Stadium, are advised to transfer to EWL at #PayaLebar to continue the journey. - SMRT