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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #146 · 16 сеп.

Функция sub в regex может принимать функцию в качестве аргумента repl. 📄 Из документации: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. То есть для каждого совпадения будет вызвана функция для вычисления замены вместо замены на одну и ту же строку для всех совпадений. Иными словами, для замены разных совпадений на разные строки не потребуется запускать re.sub() много раз для каждой строки замены. Достаточно определить функцию, которая вернёт строку для каждого из совпадений. Описание слишком запутанное🤔, давайте лучше рассмотрим на простом примере: Создаем карту замены. То есть какие строки на какие требуется менять. remap = { 'раз': '1', 'два': '2', 'три': '3', 'четыре': '4', 'пять': '5', } Пишем функцию поиска строки для замены. Единственным аргументом будет объект re.Match. Используя данные этого объекта мы вычисляем замену on-the-fly! def get_str(match: re.Match): word = match.group(1) return remap.get(word.lower()) or word Пример текста. text = '''Раз Два Три Четыре Пять Вместе будем мы считать Пять Четыре Три Два Раз Мы считать научим вас ''' Теперь запускаем re.sub и вместо строки замены (repl) подаём имя функции. (Данный паттерн ищет отдельные слова в тексте) >>> print(re.sub(r'(\w+)', get_str, text)) 1 2 3 4 5 Вместе будем мы считать 5 4 3 2 1 Мы считать научим вас Думаю, достаточно наглядно 🤓 #libs#regex

Hashtags

Резултати

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

Пребарај: #bigq

当前筛选 #bigq清除筛选
Data Science Jobs

@datasciencejobs · Post #1996 · 03.04.2024 г., 08:03

#DataEngineer#ContractPosition#Remote#SQL#BigData#FinancialData#Python#BigQ#Looker#Snowflake Разыскиваем #DataEngineer на работу по контракту с крупной американской венчурной компанией. Контракт на 6 месяцев с возможностью перезаключения договора. Предпочтительна возможность работать в их часовых поясах, но возможны варианты. Стек технологий: GCP, ETL, Snowflake, BigQ, Python, Looker (нужен full stack) Английский B2 и выше – условие обязательное. Работать за пределами России и Беларуси - условие обязательное. Зарплата $5000 – 6500 NET Для связи: https://t.me/Tary_bird Description of the Data Engineer contract position: Location: Preferably San Francisco Bay Area, or remotely in the Pacific or Central Time zone. Company: A large venture company with assets of over $11 billion and employees in Austin, London, Menlo Park, and San Francisco. What you will be doing: As a data engineer, you will report to the head of data and analytics and help create the entire data structure and infrastructure supporting operations. Responsibilities: Design, create, and maintain the data infrastructure necessary for optimal extraction, transformation, and loading of data from various data sources using SQL, NoSQL, and big data technologies. Develop and implement data collection systems that integrate various sources such as company proprietary data and third-party data sources, etc. Create an automated process for collecting and visualizing user engagement data from CRM/UI. What we are looking for: Qualifications: • Experience of at least 3 years as a data engineer or full stack in the field of data warehousing, data monitoring, and building and maintaining ETL pipelines. • Valid experience with the Google cloud platform (GCP). • Deep experience with data pipeline and workflow management tools (e.g., Airflow). • Solid knowledge and experience with database design, setup, and maintenance. • Proven ability to work in highly dynamic environments with high product velocity. • Strong proficiency in Python. • Strong proficiency in SQL. • Familiarity with data visualization tools (Looker ). • Experience with Snowflake. • Experience with BigQuery. • Strong communication skills, both orally and in writing. • Familiarity with CRM (Affinity, Salesforce), automation tools (Zapier) Bonus points: • Experience in venture capital data operations/working with financial data. • Familiarity with CRM (Affinity, Salesforce), automation tools (Zapier). • Bachelor's or master's degree in computer science, database management, etc.