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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #22 · 19 јан.

Заметка начинающим, которые часто сталкиваются с подобной непоняткой. Ситуация следующая, есть список файлов: names = [ 'image.bmp', 'second.txt.bkp', 'data.db', '.config.cfg', 'file.ext.bkp' ] И мы хотим убрать у них окончание ".bkp". Не знаю зачем, пример довольно надуманный) Но суть он показывает, а это главное. Те, кто еще не очень знаком с библиотекой os.path или pathlib, вероятно решат обработать имена как строки. И тут вполне подойдет метод строки strip(). Что делает этот метод? Он отрезает указанные символы по обеим сторонам строки. Если ничего не указать, то убирает невидимые символы (пробелы, табуляции и переносы строк). В нашем случае будет выглядеть вот так: >>> name.strip('.bkp') То есть просим удалить строку '.bkp' по краям имени файла, если таковая есть. Можно применить аналогичный метод rstrip(), чтобы отрезать только справа, но для этого примера используем обычный. >>> for name in names: >>> print(name.strip('.bkp')) image.bm second.txt data.d config.cfg file.ext Хм, что-то не то с нашими именами! Что случилось??? Видим нежелательное переименование в именах, где и близко не было указанной строки '.bkp' А дело всё в том, что данный метод ищет не указанную строку, а указанные символы, и не важно в каком порядке. Для метода strip() строка '.bkp' это не паттерн для поискаа список символов. Потому он отрезал симовол 'p' от '.bmp' и удалил точку из файла '.config.cfg'. Как тогда правильно заменить именно паттерн? Для начинающего можно посоветовать метод строки replace(), который как раз использует для замены указанную строку целиком. В нашем примере заменим её на пустую строку. >>> for name in names: >>> print(name.replace('.bkp', '')) image.bmp second.txt data.db .config.cfg file.ext Уже лучше, но помните, это лишь пример про strip(). Для работы с именами файлов есть способы и более "правильные", дающие однозначно верный результат. Я взял файлы только в качестве примера. Даже replase() тут может сделать не то что ожидаем. Просто впредь будьте внимательны с этим strip(). #basic

Hashtags

Резултати

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

Пребарај: #reactjs

当前筛选 #reactjs清除筛选
Dasturlash hayoti️️ ️

@dasturlash_hayoti · Post #4141 · 10.02.2026 г., 08:56

#ReactJS ⚙️React, visualized – interaktiv o'rganish! — React konseptlarini grafik va interaktiv tarzda o'rganing — Props, State, Components, JSX va boshqa asosiy mavzularni vizual tarzda tushuning — Har bir mavzu misollar va diagrammalar bilan tushuntirilgan Sayt:react.gg/visualized 💡 Oson va qiziqarli tarzda React’ni o‘rganing! 💻@dasturlash_hayoti— dasturchilar hayoti va IT memlari aralash kanal😉

Hashtags

GitHub Trends

@githubtrending · Post #15273 · 06.11.2025 г., 13:00

#typescript#electron#material_you#music#music_player#netease_cloud_music#react#reactjs Music You is a free desktop music player that lets you enjoy all the features of NetEase Cloud Music on your computer, with a modern, easy-to-use design that follows Google’s Material You style. You can log in with your phone, browse recommendations, manage your music library, listen to podcasts and radio, see lyrics (including word-by-word highlights), play local files, and access your cloud music. The app is built with React and Electron, works on Windows, macOS, and Linux, and is open source—so you can even download and modify the code yourself. This gives you a smooth, full-featured music experience right on your desktop, with regular updates and a clean, customizable interface. https://github.com/GuMengYu/music-you

IUT Career Centre

@iutcareercenter · Post #1534 · 15.09.2025 г., 14:48

🏢 Company: Global Move IT company 🕒 Schedule: 5/2, 09:00–18:00 📍 Location: Tashkent (on-site) 🔎Open Roles: - Backend Developer (Node.js) — Node.js/Nest.js, REST/GraphQL, SQL/NoSQL, auth, caching, CI/CD. - Frontend Developer (React/TS) — React.js, TypeScript, Next.js, Redux/React Query, Tailwind, REST. - AI Solutions Builder — LLMs, RAG, prompt design, LangChain/LlamaIndex, vector DBs, quick MVPs. - Project Manager — Agile/Scrum, Jira/Linear, PRD/user stories, roadmaps, delivery & stakeholder management. 📥Fill the application form to apply: https://forms.gle/FsXMMp27CZSfmoY36 #vacancy#frontend#backend#ai#projectmanager#reactjs#nodejs#tashkent#jobs#globalmove

Digital.edu IT Career

@digitalitvacancy · Post #347 · 16.09.2025 г., 05:53

We’re hiring — 4 roles at Global Move (Tashkent) 🏢 Company: Global Move 🕒 Schedule: 5/2, 09:00–18:00 📍 Location: Tashkent (on-site) Open Roles: - Backend Developer (Node.js) — Node.js/Nest.js, REST/GraphQL, SQL/NoSQL, auth, caching, CI/CD. - Frontend Developer (React/TS) — React.js, TypeScript, Next.js, Redux/React Query, Tailwind, REST. - AI Solutions Builder — LLMs, RAG, prompt design, LangChain/LlamaIndex, vector DBs, quick MVPs. - Project Manager — Agile/Scrum, Jira/Linear, PRD/user stories, roadmaps, delivery & stakeholder management. Fill the application form to apply: https://forms.gle/FsXMMp27CZSfmoY36 #vacancy#frontend#backend#ai#projectmanager#reactjs#nodejs#tashkent#jobs#globalmove

GitHub Trends

@githubtrending · Post #15486 · 12.02.2026 г., 12:00

#typescript#cinny#cinnyapp#client#hacktoberfest#matrix#matrix_client#matrix_org#reactjs Cinny is a simple, elegant, and secure Matrix messaging client with end-to-end encryption and open-source code. Use the web app at app.cinny.in, download the desktop version, or self-host easily via GitHub releases, Docker, or your webserver for full control. This lets you chat privately and modernly without relying on big tech apps, giving you privacy, customization, and easy setup on your own server for secure, ad-free messaging. https://github.com/cinnyapp/cinny

GitHub Trends

@githubtrending · Post #15425 · 21.01.2026 г., 13:00

#typescript#agent#agents#ai#assistant#assistant_chat_bots#generative_ui#js#react#reactjs#ui#ui_components Tambo AI is a free React SDK that lets AI generate and control your app's UI from natural language chats, like showing charts or updating notes without clicks. Register components with simple Zod schemas, wrap in TamboProvider, and use hooks for streaming chats. It beats manual wiring with MCP tools, self-hosting, and templates. You save hours prototyping adaptive apps that fit every user—newbies see basics, pros get advanced views—cutting support needs and boosting speed. https://github.com/tambo-ai/tambo

GitHub Trends

@githubtrending · Post #15049 · 12.08.2025 г., 12:00

#java#distributed_systems#durable_execution#grpc#java#javascript#microservice_orchestration#orchestration_engine#orchestrator#reactjs#spring_boot#workflow_automation#workflow_engine#workflow_management#workflows Conductor is an open-source tool that helps you manage and automate complex workflows involving many microservices and systems. It makes your workflows flexible, reliable, and scalable by handling retries, errors, and monitoring automatically. You can define workflows as code in JSON, use various task types, and manage workflows dynamically without tightly coupling services. It offers an easy-to-use web interface and supports multiple databases like Redis and MySQL. This helps you build, run, and monitor workflows efficiently, saving time and reducing errors in managing distributed applications. It also has SDKs for Java, Python, JavaScript, Go, and C# to integrate easily with your projects. https://github.com/conductor-oss/conductor

GitHub Trends

@githubtrending · Post #15258 · 01.11.2025 г., 13:30

#python#blocknotejs#collaborative#django#documentation#g2g#government#knowledge#knowledge_base#mit#mit_license#opensource#reactjs#realtime_collaboration#self_hosted#wiki#yjs Docs is a collaborative online text editor that helps you and your team write, edit, and organize documents together in real time, even offline. It offers easy formatting, AI tools like summarizing and rephrasing, and secure sharing with controlled access. You can export documents in various formats and create structured knowledge with subpages. Docs is open source, easy to self-host, and used by public organizations, ensuring your data stays secure and private. This tool saves time, improves teamwork, and turns your notes into organized knowledge you can access anytime. It’s great for teams wanting efficient, secure, and collaborative document editing. https://github.com/suitenumerique/docs

GitHub Trends

@githubtrending · Post #14678 · 07.05.2025 г., 11:30

#python#api#bracket#brackets#docker#docusaurus#fastapi#json#mantine#nextjs#postgresql#python#react#reactjs#selfhosted#sports#tournament_bracket#tournament_manager#tournaments#web#yarn Bracket is a tool for organizing tournaments. It supports different formats like single elimination, round-robin, and Swiss. You can create teams, add players, and manage multiple clubs with several tournaments. The system allows you to drag-and-drop matches to different courts or reschedule them. It also provides customizable dashboard pages for public viewing. This makes it easier to manage and engage with tournaments, offering more flexibility and control for organizers and participants. https://github.com/evroon/bracket

GitHub Trends

@githubtrending · Post #14913 · 03.07.2025 г., 16:30

#typescript#boilerplate#boilerplate_code#jamstack#javascript#js_boilerplate#netlify_template#next_js#next_theme#nextjs#nextjs_starter#nextjs_template#react#react_boilerplate#reactjs#starter_kit#starter_project#starter_template#tailwind_css#tailwindcss#typescript You can quickly start a modern web project using a ready-made Next.js boilerplate that includes the latest Next.js 15 features, Tailwind CSS 4, and TypeScript. It offers built-in user authentication, multi-language support, type-safe database tools, error monitoring, AI code reviews, and security features like bot protection. The setup is easy with local and remote database options, automatic testing, and deployment guides. This saves you time and effort by providing a flexible, production-ready foundation with best practices, letting you focus on building your app instead of configuring tools and infrastructure. It also supports smooth development with live reload and VSCode integration. https://github.com/ixartz/Next-js-Boilerplate