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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #32 · 7 фев.

Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks

Резултати

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

Пребарај: #salmon

当前筛选 #salmon清除筛选
美食素材圈

@meishi_sucai · Post #22862 · 27.02.2026 г., 07:36

#三文鱼#salmon ➖➖➖➖➖➖➖➖ 📚【话术需求区】点击.... 👄【深夜小电影】点击.... 🧑🏼‍🦰【人设套图区】点击.... 🔞【人设私密照】点击.... 👨‍🎨【绘画频道区】点击.... 🛵【 跑腿代购 】点击.... 👉广告投放

Data Science Jobs

@datasciencejobs · Post #2725 · 19.05.2025 г., 14:02

#vacancy#DataScience#remote#fulltime#Salmon Data Scientist (Junior+/Middle) 🌍 Preference will be given to candidates open to relocating to Manila; remote work is also possible with an initial working trip to Manila for 1–2 months Please note: we support remote work, but cannot hire candidates based in Russia or Belarus. Compensation: 4000-5000$ We’re looking for a thoughtful and detail-oriented Data Analyst / Data Scientist to join our team. In this role, you’ll work with large datasets, build clear visualizations, and deliver insights that directly shape decision-making while collaborating with analysts, engineers, and stakeholders across the company. Your future tasks: - Maintain and expand existing data science projects using Python, SQL, AWS, and GitLab - Analyze large datasets to uncover actionable insights and present them through dashboards and visual reports - Develop real-time monitoring tools to track key performance metrics - Collaborate cross-functionally with business analysts, software engineers, and stakeholders to understand requirements and deliver solutions What we expect from candidate: - 1+ years of experience in a similar data-focused role (data science, analytics, or related) - Strong SQL proficiency – able to write complex, optimized queries using joins, window functions, CTEs; experience with large-scale datasets is a plus - Proficient in Python for data science, using libraries such as Pandas, NumPy, and SciPy for analysis and automation - Solid grounding in statistical analysis – hypothesis testing, regression, distributions, and their application to real-world business use cases (e.g., A/B testing, forecasting) - Confident in data visualization – can build clear, effective visuals using Matplotlib, Seaborn, or tools like Tableau - Comfortable with version control systems – hands-on experience with GitLab (or similar tools like GitHub) - Experience with AWS is a plus Why join Salmon: - Passionate international team spanning the globe - Rapid professional growth. Merit (and merit only) rules the day - Reward for performance and long-term success of Salmon - Fast track to grow internationally - New office in Manila, Philippines - Relocation support for eligible candidates - Remote and hybrid options - Medical insurance, health and wellness benefits - Program of events and activities both online and in person 👉 More information and apply: @an_salmon

Data Science Jobs

@datasciencejobs · Post #2727 · 20.05.2025 г., 09:02

#vacancy#MachineLearning#remote#fulltime#Salmon Machine Learning Engineer 🌍 Preference will be given to candidates open to relocating to Manila; remote work is also possible with an initial working trip to Manila for 1–2 months Please note: we support remote work, but cannot hire candidates based in Russia or Belarus. Compensation: 4000-5000$ We’re looking for a curious and impact-driven Machine Learning Engineer to join our team and accelerate the development of robust, high-performing ML solutions across key business areas—including credit scoring, collection, antifraud, sales and other. This role combines hands-on development with strategic input, offering a chance to work on high-stakes, high-visibility projects from day one, collaborating with multiple departments and stakeholders to drive measurable business impact through better models What you'll do: - Own the end-to-end lifecycle of ML models: from EDA, feature generation, and hypothesis testing to production deployment and monitoring - Evaluate model performance and business impact, and iterate for continuous improvement - Explore and integrate new data sources (internal and external), identifying additional predictive signals - Contribute to advancements in modeling techniques, including geospatial and graph-based methods where relevant - Contribute to advancements in modeling techniques by exploring new algorithms and architectures What we’re looking for: - 2+ years of experience as a Machine Learning Engineer or Data Scientist, ideally in fintech or fast-paced product environments - Strong skills in Python and SQL; comfortable using Git - Solid foundation in classical ML techniques and Statistics; fluency in libraries, such as Pandas, Scikit-learn, NumPy, SciPy, Matplotlib/Seaborn/Plotly, Statsmodels, XGBoost/LightGBM/CatBoost etc. - Experience in credit risk modeling is a strong plus - Background in graph ML and/or experience with advanced geospatial analytics is an advantage - Experience working with AWS (or other cloud environments) is a plus Why join Salmon? What we’re building — Licensed neobank scaling modern financial services in Southeast Asia — Backed by global investors (ADQ, World Bank Group) with $60MM+ raised — Rapid product cycles: go from idea to launch in ~3 months — High-growth, high-impact market with global expansion potential What we offer — Remote or hybrid setup (GMT+5 to GMT+10 preferred) — New office in Manila with relocation support for eligible candidates — Competitive compensation in USD — Equity options and performance-based rewards — Medical insurance and wellness support — International team and fast career growth based on merit — Company-sponsored events and offsites 👉 More information and apply here: @an_salmon

美食素材圈

@meishi_sucai · Post #22982 · 30.03.2026 г., 01:55

#三文鱼#海鲜#晚餐#salmon ➖➖➖➖➖➖➖➖ 📚【话术需求区】点击.... 👄【深夜小电影】点击.... 🧑🏼‍🦰【人设套图区】点击.... 🔞【人设私密照】点击.... 👨‍🎨【绘画频道区】点击.... 🛵【 跑腿代购 】点击.... 👉广告投放

ПретходнаСтраница 1 од 3Следна