Found 10,783 repositories(showing 30)
amaargiru
Python Extended Cheatsheet. I'm using this repository to chronicle my journey through Python
Aswinramesh04
Greetings! 👋 I'm Loga Aswin, diving into a 100-day data science immersion from Python fundamentals to real-world applications. This space will be a live documentation of my journey, where code meets curiosity. Let's connect, learn, and code together. Click ⭐ on GitHub to stay tuned for updates on my work!
Masudbro94
Open in app Get started ITNEXT Published in ITNEXT You have 2 free member-only stories left this month. Sign up for Medium and get an extra one Kush Kush Follow Apr 15, 2021 · 7 min read · Listen Save How you can Control your Android Device with Python Photo by Caspar Camille Rubin on Unsplash Photo by Caspar Camille Rubin on Unsplash Introduction A while back I was thinking of ways in which I could annoy my friends by spamming them with messages for a few minutes, and while doing some research I came across the Android Debug Bridge. In this quick guide I will show you how you can interface with it using Python and how to create 2 quick scripts. The ADB (Android Debug Bridge) is a command line tool (CLI) which can be used to control and communicate with an Android device. You can do many things such as install apps, debug apps, find hidden features and use a shell to interface with the device directly. To enable the ADB, your device must firstly have Developer Options unlocked and USB debugging enabled. To unlock developer options, you can go to your devices settings and scroll down to the about section and find the build number of the current software which is on the device. Click the build number 7 times and Developer Options will be enabled. Then you can go to the Developer Options panel in the settings and enable USB debugging from there. Now the only other thing you need is a USB cable to connect your device to your computer. Here is what todays journey will look like: Installing the requirements Getting started The basics of writing scripts Creating a selfie timer Creating a definition searcher Installing the requirements The first of the 2 things we need to install, is the ADB tool on our computer. This comes automatically bundled with Android Studio, so if you already have that then do not worry. Otherwise, you can head over to the official docs and at the top of the page there should be instructions on how to install it. Once you have installed the ADB tool, you need to get the python library which we will use to interface with the ADB and our device. You can install the pure-python-adb library using pip install pure-python-adb. Optional: To make things easier for us while developing our scripts, we can install an open-source program called scrcpy which allows us to display and control our android device with our computer using a mouse and keyboard. To install it, you can head over to the Github repo and download the correct version for your operating system (Windows, macOS or Linux). If you are on Windows, then extract the zip file into a directory and add this directory to your path. This is so we can access the program from anywhere on our system just by typing in scrcpy into our terminal window. Getting started Now that all the dependencies are installed, we can start up our ADB and connect our device. Firstly, connect your device to your PC with the USB cable, if USB debugging is enabled then a message should pop up asking if it is okay for your PC to control the device, simply answer yes. Then on your PC, open up a terminal window and start the ADB server by typing in adb start-server. This should print out the following messages: * daemon not running; starting now at tcp:5037 * daemon started successfully If you also installed scrcpy, then you can start that by just typing scrcpy into the terminal. However, this will only work if you added it to your path, otherwise you can open the executable by changing your terminal directory to the directory of where you installed scrcpy and typing scrcpy.exe. Hopefully if everything works out, you should be able to see your device on your PC and be able to control it using your mouse and keyboard. Now we can create a new python file and check if we can find our connected device using the library: Here we import the AdbClient class and create a client object using it. Then we can get a list of devices connected. Lastly, we get the first device out of our list (it is generally the only one there if there is only one device connected). The basics of writing scripts The main way we are going to interface with our device is using the shell, through this we can send commands to simulate a touch at a specific location or to swipe from A to B. To simulate screen touches (taps) we first need to work out how the screen coordinates work. To help with these we can activate the pointer location setting in the developer options. Once activated, wherever you touch on the screen, you can see that the coordinates for that point appear at the top. The coordinate system works like this: A diagram to show how the coordinate system works A diagram to show how the coordinate system works The top left corner of the display has the x and y coordinates (0, 0) respectively, and the bottom right corners’ coordinates are the largest possible values of x and y. Now that we know how the coordinate system works, we need to check out the different commands we can run. I have made a list of commands and how to use them below for quick reference: Input tap x y Input text “hello world!” Input keyevent eventID Here is a list of some common eventID’s: 3: home button 4: back button 5: call 6: end call 24: volume up 25: volume down 26: turn device on or off 27: open camera 64: open browser 66: enter 67: backspace 207: contacts 220: brightness down 221: brightness up 277: cut 278: copy 279: paste If you wanted to find more, here is a long list of them here. Creating a selfie timer Now we know what we can do, let’s start doing it. In this first example I will show you how to create a quick selfie timer. To get started we need to import our libraries and create a connect function to connect to our device: You can see that the connect function is identical to the previous example of how to connect to your device, except here we return the device and client objects for later use. In our main code, we can call the connect function to retrieve the device and client objects. From there we can open up the camera app, wait 5 seconds and take a photo. It’s really that simple! As I said before, this is simply replicating what you would usually do, so thinking about how to do things is best if you do them yourself manually first and write down the steps. Creating a definition searcher We can do something a bit more complex now, and that is to ask the browser to find the definition of a particular word and take a screenshot to save it on our computer. The basic flow of this program will be as such: 1. Open the browser 2. Click the search bar 3. Enter the search query 4. Wait a few seconds 5. Take a screenshot and save it But, before we get started, you need to find the coordinates of your search bar in your default browser, you can use the method I suggested earlier to find them easily. For me they were (440, 200). To start, we will have to import the same libraries as before, and we will also have our same connect method. In our main function we can call the connect function, as well as assign a variable to the x and y coordinates of our search bar. Notice how this is a string and not a list or tuple, this is so we can easily incorporate the coordinates into our shell command. We can also take an input from the user to see what word they want to get the definition for: We will add that query to a full sentence which will then be searched, this is so that we can always get the definition. After that we can open the browser and input our search query into the search bar as such: Here we use the eventID 66 to simulate the press of the enter key to execute our search. If you wanted to, you could change the wait timings per your needs. Lastly, we will take a screenshot using the screencap method on our device object, and we can save that as a .png file: Here we must open the file in the write bytes mode because the screencap method returns bytes representing the image. If all went according to plan, you should have a quick script which searches for a specific word. Here it is working on my phone: A GIF to show how the definition searcher example works on my phone A GIF to show how the definition searcher example works on my phone Final thoughts Hopefully you have learned something new today, personally I never even knew this was a thing before I did some research into it. The cool thing is, that you can do anything you normal would be able to do, and more since it just simulates your own touches and actions! I hope you enjoyed the article and thank you for reading! 💖 468 9 468 9 More from ITNEXT Follow ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies. Sabrina Amrouche Sabrina Amrouche ·Apr 15, 2021 Using the Spotify Algorithm to Find High Energy Physics Particles Python 5 min read Using the Spotify Algorithm to Find High Energy Physics Particles Wenkai Fan Wenkai Fan ·Apr 14, 2021 Responsive design at different levels in Flutter Flutter 3 min read Responsive design at different levels in Flutter Abhishek Gupta Abhishek Gupta ·Apr 14, 2021 Getting started with Kafka and Rust: Part 2 Kafka 9 min read Getting started with Kafka and Rust: Part 2 Adriano Raiano Adriano Raiano ·Apr 14, 2021 How to properly internationalize a React application using i18next React 17 min read How to properly internationalize a React application using i18next Gary A. Stafford Gary A. Stafford ·Apr 14, 2021 AWS IoT Core for LoRaWAN, AWS IoT Analytics, and Amazon QuickSight Lora 11 min read AWS IoT Core for LoRaWAN, Amazon IoT Analytics, and Amazon QuickSight Read more from ITNEXT Recommended from Medium Morpheus Morpheus Morpheus Swap — Resurrection Ashutosh Kumar Ashutosh Kumar GIT Branching strategies and GitFlow Balachandar Paulraj Balachandar Paulraj Delta Lake Clones: Systematic Approach for Testing, Sharing data Jason Porter Jason Porter Week 3 -Yieldly No-Loss Lottery Results Casino slot machines Mikolaj Szabó Mikolaj Szabó in HackerNoon.com Why functional programming matters Tt Tt Set Up LaTeX on Mac OS X Sierra Goutham Pratapa Goutham Pratapa Upgrade mongo to the latest build Julia Says Julia Says in Top Software Developers in the World How to Choose a Software Vendor AboutHelpTermsPrivacy Get the Medium app A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ekeany
This repo contains a few tree based boosting algorithms implemented in python from scratch. This code relates to a medium.com article which I wrote explaining my journey to understanding how XGBoost works under the hood
zamaniamin
Welcome to Python Monster – where the journey to mastering Python and becoming a senior backend developer unfolds! I'm a passionate Python programmer, sharing my learnings, experiences, and deep dives into the world of Python, Django, and Software Developing principles like SOLID and design patterns.
sahaya-savari
A personal learning blog documenting my journey in AI, Python, and Computer Science.
subir-the-coder
Python scripts and tools built during my learning journey
mrankitgupta
I am sharing Python lessons from scratch to intermediate with practice sets which I have studied into my Journey of 66DaysofData into Data Analytics.
Hariharanpugazh
My first Python project - A desktop app that converts images to text using Google Gemini AI. Built during my AI & DS studies at SNS College without even owning a laptop. This is where my developer journey began.
mirzayasirabdullahbaig07
This repository documents my full journey of mastering Artificial Intelligence, from the ground up. It includes structured learning resources, Python libraries, core Machine Learning and Deep Learning concepts, hands-on projects, and real-world implementations. Perfect for learners aiming to go
johnnychiuchiu
Reproducible machine learning notes in Python and R to record my learning journey in Data Science
data-spice
This repository contains my learning journey and implementations of various Data Structures and Algorithms using Python. It includes detailed code examples, explanations, and practice problems aimed at improving my programming skills and understanding of fundamental computer science concepts.
Dishantkharkar
This repository chronicles my 100-day Python learning journey, where I'll start from the very basics and work my way up to more advanced concepts. Each day, I'll upload my progress, including Jupyter Notebook files (.ipynb) that contain code, explanations, and exercises.
PunithVT
I'm Punith V T, diving into a 100-day data science immersion from Python fundamentals to real-world applications. This space will be a live documentation of my journey, where code meets curiosity. Let's connect, learn, and code together. Click ⭐ on GitHub to stay tuned for updates on my work!
Cazzy-Aporbo
My python journey; bridging the gap between tutorials and production code: interactive, benchmarked Python projects for real learning.🏙️
michaelddeming
My personal notes and solutions to reinforcement problems from Data Structures and Algorithms in Python. This repository documents my learning journey through the book, featuring chapter-by-chapter insights and Python implementations.
LucasHartman
‘Generative House Algorithm’ was constructed for one simple reason, being one click away from creating a range of uniquely designed model houses. At the beginning of 2020, the start of the covid-19 pandemic, I started learning programming. My background is in developing 3D motion graphics, but my work goes into different directions. I feel inspired by trying out new things, but often feel constrained by the software I use. I never found the right software that could satisfy my every need. A few years back, I visited a motion graphics event in Prague. Here I saw a presentation by Simon Homedal from Man vs. Machine and he introduced me to procedural programming for digital art. And so my journey into learning to code started. Being stuck at home because of covid-19, I was presented with a change to really jump in and start developing a few coding projects. I started out with a simple board game in Java, where I was introduced to ‘object oriented programming’ and UI development and many other general concepts. At the end of this project I came to the conclusion that simple programming is not enough, I needed to combine with something I already have experience of. So I started using Python inside Maya, focusing on asset development of simple programs I could execute whenever I’m working on a 3D project. At the time I was wondering if I could deconstruct houses to an algorithm. The inspiration for this project came from wandering around the residential areas where I lived. Zandberg has very diverse styles of architecture; Terrace houses with high ceilings, classical villas with roofs made of straw and modern villas built after WWII. I was captivated by the diversity in design. Breakdown A simple UI inside Maya, where the uses can specify the value for generating a number of houses. Simple things like level and roof height, number of doors, max number of levels, etc. Lastly a button that would take in the value and run the algorithm. The back-end consists of a number of Python modules, textures and .obj files. One Python file called the “Main”, is where the files are assembled and executed. Process Developing a generative algorithm is a process of trial and error. At the start of the project I treated the project like any other modeling project, only every design decision was programmed in with a number of possible solutions. Over time this would become very complex and unstructured. It became impossible to go back and modify what I already wrote down. Another problem was that the algorithm was creating the model for running the code. This meant that selecting, adding and subtracting mesh to the model cost a lot of processing power, to the point my computer would freeze up. I needed to rethink my process and develop a framework which is easy to modify and light on the processor. My new plan of attack was to do as little as possible in Maya. All design instructions needed to be solved before anything can be created in Maya. Going into this direction was a hard choice. First off, it’s not a guarantee for success. The moment I would go too deep, things can get messy very easily. Besides I consider myself more of a visual thinker. Working outside of Maya meant every hurdle would be some sort of math problem. I already knew I had no choice, and understood this is the type of problem solving a programmer has to deal with. So I started out doing a little bit of RnD. My first test was to create a number of lists. Generally every list would hold some type of value. Like positional data, labels, dimensions, objects etc. and the rest would be a range of functions iterating, generating, gathering, and sorting data into these lists. These seemed flexible enough, if I needed to add new details to the model, I would make a new list and apply this into the framework. This type of framework was not very structured as I hoped. Luckily I discarded this ideal before it really began. I was already attracted by the idea of using a matrix instead of lists at the top of lists. The matrix would provide data in three dimensions, like a volume or a box made out of separate units. I would add an extra dimension to each unit, which is a list of six values. Each value would represent each side of a unit. The general ideal of a matrix is like a fluid simulation, which is made out of a matrix of voxels, or like Minecraft where each unit can be some type of block. This would create a data structure that is easy to modify. The next step would be to feed the matrix with values. A value can represent walls, doors, windows, levels, rooftops, position and direction. It starts with an empty matrix, and secondly fill it with values of 1 (later on inside Maya, value 1 would generate a wall, the location within the matrix would be translated to 3D space). If you’d stop here and translate the matrix to mesh in Maya, you would get a cluster of boxes stacked next or on top of each other. Adding more data to the matrix meant it needed to structure itself, so it would generate a cohesive design. If not the final result would be a house with holes in the wall or floating rooms. Therefore a number of functions are needed for searching for patterns, and modifying the data. A standard function would iterate over each unit in the matrix and check the neighboring values. If some sort of condition is met, the proper value will be modified. Going back to our cluster of boxes example. If a has a neighbouring box in front and to the left, but nothing on top, this would be a condition where a corner roof would be generated. And so different functions would solve design problems. In the end you would be left with a matrix of values that would serve as a blueprint for generating in house inside Maya. Finally the model needs to be made in Maya. A number of parts like a wall, door or window are generated or imported in Maya. When iterating over the finished matrix, a certain value in a certain place in the matrix will decide which objects (example wall or roof) needs to be instanced and placed in the right position and direction. When the matrix is fully realised in Maya the model gets a final cleanup, by merging the model, deleting unused parts and empty groups. What is left is the house model. If a range of houses needs to be generated, the process is simply looped over a number of times. Final word This project took way longer than I had anticipated and is far from finished. I learned a lot and at the same time it feels like I have only just begun. I hope to pick up this project again in the near future. I would love to add more elements to the house, like roof-windows or balconies and create procedural shaders. And possibly try out machine learning or some type of genetic algorithm. If you have any questions or are intrigued please contact me at ljh.hartman@gmail.com. Cheers!
My Python Journey
StephenLegacy
This repository is dedicated to Python learning, featuring organized classes, practical examples, and hands-on projects. It covers foundational to advanced concepts, showcasing my journey in mastering Python and implementing real-world solutions. Perfect for anyone looking to explore Python programming, enhance coding skills, or contribute.
Shubh2-0
This repository serves as my learning journey in mastering Django, a powerful Python web framework. It includes a Django application named "myapp," where you can find code related to models, views, templates, and more. Explore the fundamentals of Django, build web applications, and become proficient in Django development through this project.
M-F-Tushar
🧠 Personal notes, code, and practice problems from my journey learning Data Structures & Algorithms in Python. Learning by building, breaking, and documenting everything.
siraajul
Course Code: CSE 213 . This repository contains all the Python code I wrote during my university days. It covers a wide range of topics, including basic programming concepts, data structures, algorithms, and various Python-based projects. The repository serves as a reflection of my learning journey in Python and showcases my passion for coding
viannaandreBR
My Data Science Journey with Python, Pycaret, StreamLit, Pandas, Airflow, MinIO,
My learning journey of Python's Libraries NumPy, Pandas and Matplotlib
grantgabriel
This is my competitive programming journey, using C++ / Python.
mrankitgupta
I am sharing lessons in various Python Libraries from scratch to intermediate including practice sets which were useful into my journey of Data Science.
V1VEK-Y4DAV
This is my dynamic portfolio repo — I’m a passionate developer exploring C++, Python, ML, and OS concepts. Featuring key projects, achievements, and contributions, this is the central hub to showcase my coding journey and innovations.
Materloki
This repository is my journey exploring the Hough Circle Transform application using OpenCV and Python
ChiGeorgeMofor
This repo features my journey through a 21-day Python challenge focused on Open Source Intelligence (OSINT). Each folder contains scripts and files that demonstrate practical applications of Python for gathering and analyzing publicly available information. Join me in exploring the power of Python for OSINT! 🚀✨
VeerSinghLodhi
This repository is a collection of daily programming challenges that I am working on as part of my 100 Days of Code journey. Each day, I tackle a new programming concept or problem, implementing solutions in multiple programming languages including C, C++, JAVA, PYTHON & JS