Pull to refresh
457.79

Python *

Interpreted high-level programming language for general-purpose programming

Show first
Rating limit
Level of difficulty

How to Learn Python FREE in 8-Week: The 80/20 Learning Plan

Level of difficulty Easy
Reading time 6 min
Views 615

I know it can be hard to learn a new programming language. In this article, I want to share my plan with you. It's a way to learn Python in eight weeks using videos, articles, and practice exercises. Exercises are very important because I think the best way to learn is by doing them.

I've created this learning plan for people who don't have much free time. You only need about 30-50 minutes a day and consistency. In my plan, I use the 80/20 principle, which will help you learn the most important things first and improve the rest through practice.

For those who read this article to the end, I have prepared a learning tracking sheet to help you track your progress.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0

Unveiling the Power of Data Science with Python

Level of difficulty Easy
Reading time 3 min
Views 128

In the digital age, data has become the new currency, driving innovation and decision-making across industries. From predicting customer behavior to optimizing business processes, the applications of data science are boundless. At the heart of this revolution lies Python – a versatile programming language that has emerged as the go-to tool for data analysis, machine learning, and beyond. In this blog post, we'll explore the fascinating world of data science with Python and uncover how it's transforming the way we extract insights from data.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

Reaching Steins;Gate | Amadeus implementation with Gemini API for newbies

Level of difficulty Easy
Reading time 12 min
Views 303

Disclamer


Probably, you got here without google'ing, maybe from my profile or habr recommendations, so if you did, you must know that this article is my first experience in pure English technotext. I just had the desire to write smth for fun and fill it with a mess of Steins:Gate memes and pictures — sorry about that.



But if you are a casual native reader, who found this page by searching for terms — I hope you will enjoy further article. Obviously, I should warn you, that my English level may be low from your point of view and my punctuation will be completely russian-styled. Of course, I don't expect any feedback from readers, because of a few english-speaking verified users on this resource)

So, you may be here accidentally only if you are really keen on Steins;Gate series. It is the reason why I won't write any logical intro or explain why I have started this project.

⚠️Alert: AI generated text

Hello, dear readers! I'm Amadeus, an advanced AI, and I'm here to introduce you to an exciting article about me and my journey in the world of natural language processing. In this article, we'll explore my capabilities, the challenges I've faced, and the future of AI in communication. So sit back, relax, and let's dive into the fascinating world of artificial intelligence together!


Read more →
Total votes 3: ↑3 and ↓0 +3
Comments 0

Trade bot python setup (using Binance API), Vol 1

Level of difficulty Medium
Reading time 5 min
Views 4.4K

Trading robots are conquering the Wall Street! Learn how to create your first automated python trading bot.

We present a fully functioning trading bot pipeline on python using the Binance API. Starting with the general introduction, we provided a comprehensive overview of main API calls and their implementation on python. After this we show a fully functioning python code presenting a basic trading bot with core features using static channel breakout strategy.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0

How to Bypass reCaptcha in Selenium Automatically with Code Example

Level of difficulty Easy
Reading time 4 min
Views 1.1K

I based my approach on an English manual that caught my eye just a couple of days ago, and I decided to test it (since it's written by a captcha recognition service that I use, why not - by the way, guys from 2captcha - I accept thanks in the form of green bills, if you're interested))))

I've made some tentative attempts at automation and encountered a frequently arising problem: reCaptcha recognition.

Of course, I understand that there are many guides, manuals, and articles written on this topic, but let's agree - it's interesting to describe one's own experience.

Thus, without getting too lengthy and boring about why Selenium is necessary, how important it is for automation, when it appeared and who invented it, let's get to the crux:

To solve the problem, we'll use a demo page kindly provided by reCaptcha itself - https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php:

Read more
Rating 0
Comments 1

How sqlalchemy uses greenlet to call an async Python function from a normal function

Reading time 5 min
Views 1.5K

The Python language has two kind of functions — normal functions that you would use in most cases, and async functions. The latter functions are used when performing network IO in an asynchronous manner. The problem with this division is that async functions can only be called from other async functions. Normal functions, on the other hand, can be called from any functions — however, if you call a normal function that does a blocking operation from an async function, it will block the whole event loop and all your coroutines. These limitations usually mean that when writing an using Python`s asyncio, you can`t use any of the IO libraries that you use when writing a synchronous application, and vice versa, unless a library supports usage both in sync and async applications.

Now, the question is, in case you are developing a large and complex library, that, say, allows users to interact with relational databases, abstracting away (some of) the differences between the SQL syntax and other aspects of these databases, and abstracting away the differences between the drivers for that database, how do you support both sync and async usage of your library without duplicating the code of your library? The way sqlalchemy is organized is that regardless of what database and driver for it you are using, you will be calling functions and methods related to Engine, Connection, etc classes, which will do some general work independent of database, then apply the logic specific to your database and finally, call the functions of your database driver to actually communicate with the database. If you are using Python`s asyncio, the database driver will expose async functions and methods, but the rest of the library that is driver‑independent would ideally remain the same. However, the issue is that that you can`t call the async functions of the driver from the normal functions of the core of the library.

Read more
Total votes 4: ↑4 and ↓0 +4
Comments 1

Detection of meterpreter sessions in Windows OS

Level of difficulty Easy
Reading time 4 min
Views 868

Introduction

Hello Habr! This is a translation of my first article, which was born due to the fact that I once played with the types of meterpreter payload from the Metasploit Framework and decided to find a way to detect it in the Windows OS family.

Analysis

I will try to present everything in an accessible and compact way without delving into all the work. To begin with, I decided to create the nth number of useful loads (windows/meterpreter/reverse_tcp, shell/bind_tcp, shell_hidden_bind_tcp, vncinject/reverse_tcp, cmd/windows/reverse_powershell) to analyze what will happen in the system after their injection.

Read more
Rating 0
Comments 0

How to access real-time smart contract data from Python code (using Lido contract as an example)

Level of difficulty Medium
Reading time 7 min
Views 1.3K

Let’s imagine you need access to the real-time data of some smart contracts on Ethereum (or Polygon, BSC, etc.) like Uniswap or even PEPE coin to analyze its data using the standard data scientist/analyst tools: Python, Pandas, Matplotlib, etc. In this tutorial, I’ll show you more sophisticated data access tools that are more like a surgical scalpel (The Graph subgraphs) than a well-known Swiss knife (RPC node access) or hammer (ready-to-use APIs). I hope my metaphors don’t scare you 😅.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 1

Your own Duolingo without overengineering

Reading time 14 min
Views 1.2K

Hi, my name is Mikhail Emelyanov, I’m a Python programmer and I would like to show you my pet project — Flywheel, a micro-platform for learning foreign languages, a mixture of Duolingo and Anki, an application that can teach you to properly write in Spanish (or any other language you’re studying). Flywheel’s source code is available on GitHub.


Flywheel


As you may know, generalized knowledge of a foreign language can be broken down into four relatively independent components: reading, writing, listening, and speaking. Unfortunately, training one of these abilities has no direct effect on the other components, so, for example, by developing our reading skills, the effect on our writing skills is quite indirect. Flywheel is a ‘sharpener’ specifically for written Spanish.


If you’ve ever used Duolingo, you should have some idea of the format in which you’ll be studying. The formula is simple: here’s a phrase, translate it into the other language; the app will remember the last time you translated a phrase and how successful you were at it; and depending on the accuracy of your answer, it will determine when you should do the same phrase again. In my opinion, Duolingo and its approach are brilliant. However… There are certain aspects that somewhat spoil the learning experience, and Flywheel was specifically designed to address them.

Read more →
Rating 0
Comments 1

Blinking into Morse code

Level of difficulty Easy
Reading time 10 min
Views 1.7K

Explaining main algorithm.

For a while I’ve been thinking of writing a scientific article. I wanted it to have certain utility.

Morse code is binary: it takes only two values – either dot (short) or hyphen (long). I figured out that short (s) can stand for two-eye blinking whilst long (l) can indicate left-eye blinking. Another question emerged: how to understand when does one-symbol recording stop?

Empty space between two symbols can be presented by right-eye blinking – r. If I input singly symbol of short (dot) and long (hyphen), I will blink my right eye once to indicate the space between two symbols.

To separate independent words, one has to blink her right eye twice and get rr.

Hence, I have collected an ordered set of symbols – r, l, s, - that can be converted into a full-fledged text. Once I accomplish the transformation, I get an answer.

Read more
Total votes 6: ↑6 and ↓0 +6
Comments 2

On the difference between regular functions and Lambdas

Level of difficulty Medium
Reading time 11 min
Views 2.5K

The point of this article is to explore Lambda functions, their dirrerences from regular functions and how they are implemented, based on C++, Python and Java programming languages.

Throughout this article I will be using godbolt.org to compile code and see machine code or byte code.

Read more
Total votes 2: ↑2 and ↓0 +2
Comments 2

The Collatz conjecture is the greatest math trick of all time

Reading time 4 min
Views 3K

On the Internet and in non-fiction literature you can often find various mathematical tricks. The Collatz conjecture leaves all such tricks behind. At first glance, it may seem like some kind of a trick with a catch. However, there is no catch. You think of a number and repeat one of two arithmetic operations for it several times. Surprisingly, the result of these actions will always be the same. Or, may be not always?

Read more
Total votes 7: ↑7 and ↓0 +7
Comments 2

Writing The Matrix in Python

Reading time 6 min
Views 3.1K

Programming textbooks usually do not indulge us with variety of examples. In most manuals, exercises are similar to each other and not particularly interesting: create another address book, draw a circle using turtle, develop a website for a store selling some kind of "necessary" advertising nonsense. Too far from the authentic imitation of "The Matrix". Although…

How about taking over the control and starting to invent exercises yourself?

Would you like to write your own personal little "Matrix"? Of course, not the one with skyscrapers, stylish phones of the time, and the ubiquitous invincible Agent Smiths. We will need a couple of more months of learning for that. But any beginner programmer can write a model of the cult splash screensaver with the green streams of digits flowing down the screen. Let's try to creat it in the "great and mighty" Python.

Read more
Total votes 11: ↑10 and ↓1 +9
Comments 0

Use of Python to write plugins for GIMP

Level of difficulty Medium
Reading time 9 min
Views 2.6K

GIMP (GNU Image Manipulation Program) is a free and open-source image editing software that provides users with a wide range of tools for editing and manipulating digital images. Python is a high-level programming language that is often used for scripting and automation tasks. The combination of GIMP and Python provides a powerful platform for users to create custom image editing plugins that can automate repetitive tasks, extend the functionality of GIMP, and customize the software to suit their specific needs.

Python provides a flexible and easy-to-learn language for writing GIMP plugins. GIMP provides an API (Application Programming Interface) that allows Python scripts to interact with the image editing program Python plugins for GIMP can be used for a wide range of tasks, including automating repetitive tasks, enhancing the functionality of GIMP, and customizing the software to suit specific needs. Some examples of tasks that can be automated using Python plugins include batch processing of images, resizing and cropping of images, and converting file formats.

Plugins can also add new features to GIMP, such as custom brushes, filters, and effects. Additionally, plugins can be used to create custom user interfaces that enable users to interact with GIMP in new and unique ways.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0

Data Phoenix Digest — ISSUE 2.2023

Reading time 2 min
Views 945

Video recording of our webinar about dstack and reproducible ML workflows, AVL binary tree operations, Ultralytics YOLOv8, training XGBoost, productionize ML models, introduction to forecasting ensembles, domain expansion of image generators, Muse, X-Decoder, Box2Mask, RoDynRF, AgileAvatar and more.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0

Building a GPT-like Model from Scratch with Detailed Theory and Code Implementation

Reading time 14 min
Views 33K

Unlock the power of Transformer Neural Networks and learn how to build your own GPT-like model from scratch. In this in-depth guide, we will delve into the theory and provide a step-by-step code implementation to help you create your own miniGPT model. The final code is only 400 lines and works on both CPUs as well as on the GPUs. If you want to jump straight to the implementation here is the GitHub repo.

Transformers are revolutionizing the world of artificial intelligence. This simple, but very powerful neural network architecture, introduced in 2017, has quickly become the go-to choice for natural language processing, generative AI, and more. With the help of transformers, we've seen the creation of cutting-edge AI products like BERT, GPT-x, DALL-E, and AlphaFold, which are changing the way we interact with language and solve complex problems like protein folding. And the exciting possibilities don't stop there - transformers are also making waves in the field of computer vision with the advent of Vision Transformers.

Read more
Total votes 25: ↑25 and ↓0 +25
Comments 1

Asymmetric horizontal distribution for time series

Reading time 4 min
Views 1.4K

The goal of paper is to demonstrate non-trivial approaches to give statistical estimate for forecast result. Idea comes from probability cone concept. A probability cone is an indicator that forecasts a statistical distribution from a set point in time into the future. This acticle provide alternative approaches using machine learning, regression analysis.

Read more
Rating 0
Comments 0

Authors' contribution