TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 11 слични објави

Пребарај: #sgclean

当前筛选 #sgclean清除筛选
REACH

@reachsg · Post #98 · 17.02.2020 г., 03:03

[Sent by Gov.sg – 17 Feb] SG Clean - COVID-19 is transmitted primarily through droplets. To fight this outbreak, we need to look after our personal hygiene, AND keep Singapore clean. - A clean environment will help stop community transmission of COVID-19 7 good habits 1. Keep premises clean and pest-free 2. Return trays, keep tables clean 3. Keep toilets clean and dry 4. Wash hands regularly with soap 5. Take temperature, see doctor if unwell, stay home 6. Use tissue when sneezing or coughing 7. Bin litter and soiled tissue NEA stepping up: - Inspection of public toilets and other public places - Enforcement against spitting and littering - Adoption of SG Clean quality mark, to ensure high level of cleanliness More on #SGClean: go.gov.sg/sgclean More hygiene tips: go.gov.sg/getserious

Hashtags

NEA Singapore

@NEASingapore · Post #21 · 13.03.2020 г., 07:44

More than 5,000 premises have been certified #SGClean since the campaign launch on 16 Feb 2020! But what does this mean? Premises with the SG Clean quality mark have high levels of cleaning and hygiene standards. Go to sgclean.gov.sg for a list of places that are certified SG Clean.

Hashtags

NEA Singapore

@NEASingapore · Post #24 · 18.03.2020 г., 02:35

#DidYouKnow that Chomp Chomp Food Centre’s unique name originated from its Teochew name, Tiong Tiong, which means loyalty and righteousness? If you’ve visited Chomp Chomp recently, you may have seen the SG Clean quality mark signalling the hawker centre’s high level of cleaning and hygiene standards. The full list of certified SG Clean places is available at sgclean.gov.sg #SGClean#OurHawkerCentres

NEA Singapore

@NEASingapore · Post #182 · 08.05.2021 г., 01:15

Are we practising #GoodHygieneHabits when we’re out and about? From washing our hands regularly to using a serving spoon and avoiding double-dipping, let’s not forget these practices when dining with family and friends. #SGClean

NEA Singapore

@NEASingapore · Post #29 · 29.03.2020 г., 05:24

Meet our SG Clean Ambassadors! Sharing a common passion to make #SGClean a way of life, our #SGCleanAmbassadors will help drive the adoption of good personal habits and social norms. They will encourage patrons to return their trays and keep tables clean, and guide them on safe distancing measures to #FightCOVID19 and other infectious diseases. Interested to join the SG Clean Ambassadors Network? Sign up at http://go.gov.sg/sgcleanambassadors

NEA Singapore

@NEASingapore · Post #18 · 21.02.2020 г., 04:30

“We are the first line of defence in ensuring that our patrons dine with peace of mind. We have intensified our cleaning efforts to ensure the cleanliness of the toilets, food trays, cutlery, tables and chairs. One major change to our daily work is the use of four different cloths, each for a different purpose. With these enhanced measures, we hope to reassure the public and encourage them to continue dining here.” – Mr Deji Pravin, Nick Cleaning Services Pte Ltd, Hawker Centre @ Our Tampines Hub #FightCOVID19#SGClean#SGUnited#SingaporeTogether

NEA Singapore

@NEASingapore · Post #69 · 20.06.2020 г., 03:30

We are all looking forward to dining in again at our favourite places. Let’s not forget good dining habits at #OurHawkerCentres to mitigate the spread of COVID-19! #BinOurTissues & #ReturnOurTrays, to keep the table clean for the next user and reduce the risk of disease transmission to cleaners and other members of the public. Eat from your tray, and don’t leave behind soiled tissues or wet wipes on dining tables. #FightCOVID19#SGClean

NEA Singapore

@NEASingapore · Post #15 · 15.02.2020 г., 02:46

We continue to press on in the fight against the COVID-19! NEA has been providing guidance to operators of food establishments, including stallholders at #OurHawkerCentres, to maintain high standards of hygiene and cleanliness to safeguard public health. You can do your part by practising the 7 Habits of Good Public Hygiene! Together we can overcome! #FightCOVID19#SGClean#SingaporeTogether#SGUnited https://youtu.be/t19szcAGw-U

NEA Singapore

@NEASingapore · Post #67 · 17.06.2020 г., 12:55

Don’t leave your used tissues or wet wipes behind when dining at #OurHawkerCentres! It is important to dispose of used tissues or wet wipes which can be highly contaminated, to #FightCOVID19, especially as we resume our activities gradually. From 19 Jun when dining-in resumes, Safe Distancing Ambassadors at hawker centres and coffeeshops will be on hand to remind patrons to be socially responsible and observe personal hygiene. Let’s all do our part to keep ourselves and those around us safe. https://go.gov.sg/nea17jun20-hygieneathcs-toilets #BinOurTissues#ReturnOurTrays#SGClean#KeepSGClean