Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
🤖South Korean firm develops autonomous parking robot
HL Mando autonomous robot, called Parkie, will require no outside help in parking various types of automobiles, including sports cars and sport utility vehicles.
The robot, a 3.5-inch-high flat platform, can sense a vehicle's weight and the distance of the wheelbase, as well as the vehicle's plate number and road conditions before parking the car, the company said.
An extremely useful innovation to avoid stress while parking 😀
@CarsNews
#innovations
🛫Bali to launch hydrogen airplanes with vertical takeoff
Sirius Aviation AG has announced a groundbreaking partnership with PARQ Development that will bring 10 advanced hydrogen-powered vertical takeoff and landing (VTOL) jets with a cruising speed of 520 km/h and specialized support services to the scenic landscapes of Bali Island, Indonesia.
@BaliNews
#innovations
📰Bali will be home to an innovation hub for digital nomads
🧑💻 Bali will open a Center for Technological Excellence – a hub for digital nomads, startups and IT specialists.
ℹ️ The project is initiated by entrepreneur Steve Laidlaw, head of Digital24. Scheduled to open in 2026, the goal is to bring together talent from around the world and reinforce Bali's status as a global center for remote work.
Bali is more than just a location, it's a way of thinking.
#places#innovations@BaliNews
🚘 introduced the next version of Drive Pilot
📰 New level of the Drive Pilot (SAE-Level 3) in Germany, enables conditionally automated driving at speeds up to 95 km/h on motorways (previously 60 km/h).
▶️ There is also a new Ridevu video content application for the media system.
🔜 The updated system will start to be installed on cars at the beginning of 2025. The price is 5950 euros. Owners of the previous generation of the autopilot, will be able to upgrade to the current version free of charge.
@CarsNews
#Mercedes#innovations
🔬В Женском деловом альянсе БРИКС одним из основных направлений сотрудничества является инновационное развитие.
✏️Участниками обсуждаются рекомендации и разрабатываются проекты по расширению возможностей женщин в электронной коммерции и сфере технологий, повышению цифровой грамотности.
🇷🇺Ключевой инициативой российской стороны в этой области можно назвать создание цифровой платформы Альянса, которая станет единым информационным и коммуникационным инструментом для женщин стран БРИКС, а также основой для установления партнерских отношений женщин-предпринимателей.
🖥Разработка платформы ведется Россией с 2021 года. Готовый рабочий вариант ресурса планируется запустить к российскому председательству в 2024 году.
🔹О проектах, которые предлагаются в рамках рабочей группы по инновационному развитию: http://bricswomen.com/en/wg-innovation-2022
#bricswomen#innovations
🥴Bali plans to launch air taxis by 2028 to combat traffic congestion
📰PT Dirgantara Indonesiaplans to have a prototype half-drone, half-airplane capable of vertical takeoff ready by 2026 and begin commercial use by 2028.
ℹ️ The unit will have a declared speed of 250 km/h, a maximum load of 550 kg, and a flight range of 100 km. However, implementing this service is challenging due to coordination with authorities, safety concerns, and the need for roads.
#innovations#transport@BaliNews
В рамках укрепления сотрудничества в сфере информационных технологий представители VEON AdTech приняли участие во встрече с представителями ведущих корейских IT-компаний, организованной IT-Park Uzbekistan.
Основной темой мероприятия стала возможность открытия партнерами своих представительств в Узбекистане и организации аутсорсинговых проектов. Участники встречи обсудили возможные форматы совместной работы, включая совместные исследования и разработки, а также условия и преимущества открытия представительств корейских IT-компаний в Узбекистане, включая налоговые льготы и поддержку со стороны государства.
В мероприятии приняли участие такие корейские компании, как: Shopl Company, Lilycover, SSL, Aidot Inc., SC Solution Global Co., Ltd.
Такие встречи открывают широкие перспективы для развития IT-индустрии в стране, привлекая новые технологии и инвестиции. Намеченные шаги для реализации совместных проектов в долгосрочной перспективе укрепят позиции Узбекистана на мировом IT-рынке.
#VEONAdTech#innovations
🚁Flying cabs in Bali will appear in 2028
🚖 Imagine scenes from the cult movie “The Fifth Element” with its flying cabs coming to life.... in Bali! The future we've seen on our screens is not that far away anymore.
📰Velo Alpha is an innovative flying cab prototype developed by Indonesian company Vela Aero. It was unveiled at Bali International Airshow 2024 and promises to be the first flying cab to start commercial flights by 2028.
@BaliNews
#goodnews#transport#innovations
🦾Huawei has unveiled a robot arm for charging electric cars
📰 Huawei demonstrated an innovative robotic arm for automatic charging of electric cars. The device allows the driver not to leave the car as the arm itself connects the cable and starts the charging process.
🔋 The arm is installed on a 600 kW charging station and can charge a 100 kWh battery in just ten minutes. Mass production of the technology will begin this 2025.
➡️ The charging stations will be compatible with cars from manufacturers that are members of the Huawei Supercharging Alliance. Among them are BYD, Xpeng, Li Auto, Aito, and JAC.
@CarsNews
#Huawei#EV#innovations
🚇Bali has decided to take a radical approach to solving traffic jams by laying a metro here
It is not going to be a light LRT metro, like in Jakarta, Bangkok and other major cities in South-East Asia, but a serious underground one.
Although Indonesia has a surplus budget, it is far from unlimited. At the same time, the refinancing rate of the Central Bank is kept at 6.25%, which is also not very good for such long-term projects.
Therefore, there are 2 logical options in this situation:
1️⃣ - To try to raise financing from private investors.
2️⃣ - Turn to the Chinese. They will build and finance the project.
💰 So far it has been decided to deal with the first option. With all the simplicity and convenience of the second one there is one serious problem – Chinese will definitely have to pay everything back.
They say that applications from investors for participation in the project are already coming in. So if anyone who has long wanted to engage in infrastructure investments in fast-growing locations – write directly to the Bali administration.
@BaliNews
#economics#innovations#transport
SMS-таргет: Масштабирование охвата или персонализация взаимодействия?
В условиях недостаточной эффективности стандартных методов привлечения водителей, компания VEON AdTech разработала и внедрила для одного из ведущих сервисов такси в Узбекистане двухэтапную стратегию, ключевым элементом которой стал поведенческий таргетинг.
📌Какой из этапов оказался наиболее эффективным в привлечении и удержании водителей, обеспечив их активное использование сервиса, рассказали в статье:https://bit.ly/3DvKzMZ
#VEONAdTech#innovations#IT
SMS-таргет: Решение сложных задач с максимальной выгодой для бизнеса
Ликвидация товара перед закрытием филиалов — всегда вызов для бизнеса, но с правильным подходом это можно превратить в успешную стратегию. Как VEON AdTech, при помощи таргет-SMS, помог сети магазинов одежды в Узбекистане эффективно ликвидировать оставшийся товар?
📌Подробнее о выстроенной стратегии и результатах, читайте в нашем новом кейсе:https://bit.ly/4bemYfU
#VEONAdTech#innovations#IT