Found 745 repositories(showing 30)
dkorunic
Apple SMC CLI tool that can decode and display temperature, fans, battery, power, voltage and current information
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
fandoghpaas
Fandogh CLI
jkudish
Multi-provider deep research CLI — fans out queries to multiple search/AI APIs in parallel
delucks
Blog about notable commandline tools
WickedLukas
A simple CLI tool for overlocking, undervolting and controlling the fan of NVIDIA GPUs on Linux. Using the NVML library it equally supports X11 and Wayland.
LaVashikk
A cross-platform Rust daemon and CLI/GUI for controlling fans, TDP, battery limits, and LED on Lecoo/Emdoor laptops (IT5570/IT5571 EC).
h-sifat
A CLI/TUI Pomodoro timer and todo (coming soon) application for keyboard addicts and terminal fans that makes you more productive.
BretasArthur1
Hedged Solana RPC client that races multiple providers and returns the first successful response.
Fantom-foundation
JS library for simplified work with specific tools and interfaces of the Fantom Opera blockchain client ecosystem: DeFi smart contract calls, Staking and rewards SFC commands, Fantom Ledger App calls
ericellb
A CLI tool to help you learn codes for Climate, Fan and Media devices for SmartIR and Home Assistant
j178
饭否命令行客户端
arfelious
HP Omen Max, Omen & Victus Fan Control CLI & GUI tool for Linux thermal management. Implements upcoming hp-wmi patches directly to allow manual fan controls.
infifni
No description available
Mohit-Pala
modify fan status on Dell G15 series of laptops using ACPI commands.
veprogames
Hill Climb Racing Fanmade
GuyLewin
No description available
jsenecal
A Python CLI tool for Dell PowerEdge server fan control via IPMI with advanced PID temperature management
ajay04323
Which of the following options best describes the role of Shared Hosting on a web server? Providing hosting for a single website owned by different people on multiple servers. Providing hosting for a single website owned by one person on one server. Providing hosting for multiple websites owned by different people on one server. Providing hosting for multiple websites owned by one person on one server. 3 Which of the following capabilities can a cPanel account user perform easily from within the cPanel account interface without the aid of a system administrator? File and configuration management. Relocating the physical server. Upgrading server hardware and equipment. Installing new database software. 1 File and configuration management. Which of the following options best describes a core benefit to using cPanel & WHM, as a web hosting provider operating on a cPanel & WHM environment? cPanel users are able to create new virtualization resources to help host their web applications. cPanel users are able to set up network tunnels to establish secure communication between servers. cPanel users are able to establish and self-manage their own network routing configurations. cPanel users are able to self-manage configurations and software, reducing the support demand on the web host. 4 cPanel users are able to self-manage configurations and software, reducing the support demand on the web host Which of the following options best describes one way that cPanel makes installation of cPanel & WHM an easy process? cPanel provides a single command that can be copied and pasted onto the command line. cPanel provides a single, 16-step procedure with comprehensive documentation to guide customers through each step. cPanel provides a single executable that can be launched using a remotely delivered API request. cPanel provides a single CD-ROM that can be mailed internationally, free of charge. 1 cPanel provides a single command that can be copied and pasted onto the command line. Which of the following statistics does a cPanel account have access to from within the cPanel account interface? Bandwidth usage Server CPU temperature Other accounts' disk usage Server startup logs 1 Bandwidth usage cPanel provides multiple database software options for server administrators to choose from. MySQL is one of these options. Which of the following indicates one of the other options that are supported and provided by cPanel? MariaDB MSSQL IBM DB2 MongoDB 1 MariaDB Assuming "domain.com" is replaced with your actual domain on a cPanel & WHM server, which of the following website addresses would not bring you to a cPanel login page? cpanel.domain.com domain.com www.domain.com/cpanel www.domain.com:2083 2 domain.com After logging into an email account's webmail interface, the account user can then perform which of the following tasks directly from within their email dashboard interface? Configure FTP settings. Configure spam filtering settings. Configure SSL certificates. Configure PHP version settings. 2 Configure spam filtering settings. Which of the following options indicates a cPanel & WHM feature that can provide users with access to the server's command line interface (or, CLI) directly from within the cPanel or WHM interfaces? Server Command Shell Server Control Terminal 4 Terminal Assuming that your server's IP address is '12.34.56.78', which of the following services could be reached by navigating to the following address in your browser? https://12.34.56.78:2087 Webhost Manager (WHM) cPanel Support Center (CPSC) Server Status Display (SSD) Systems Control Center (SCC) 4 Webhost Manager (WHM) What does the acronym WHM stand for, in cPanel & WHM? Wide Home Maker Web Hero Master Whole Host Manipulator Web Host Manager 4 Web Host Manager A user who has little-to-no experience in server management will be able to do what? Run various command line commands Use the product out-of-the-box Manage several Windows programs. Add RAM to the server 2 Use the product out-of-the-box Of the following options, which of these are cPanel & WHM features that would be of interest to a programmer or web developer? SSL AFK SMTP API API About how long does it take to set up a mailing-list in cPanel? 5m 1m 1h 10m 2 1m Which of the following choices describes the method that a customer would use to access their cPanel or WHM interfaces, once it's been installed on a server? Using a web browser, like Chrome or Firefox. Using a FTP application, like FileZilla or FireFTP. Using a search engine, like Google or Yahoo. Using a social media platform, like Facebook or LinkedIn. 1 Using a web browser, like Chrome or Firefox. Of the following features found in a cPanel account interface, which would most likely be considered as important to a beginner-level customer seeking a cPanel & WHM web host? Apache Handlers Perl Modules Email Forwarders SSH Access 1 Apache Handlers Of the following services, which of these can be managed by website owners using only their cPanel account interface? Firewall Configuration Database Server Upgrades Scheduled Tasks EasyApache 4 Configuration 3 Scheduled Tasks Which of the following features available in the cPanel account interface allows new website files to easily be created, uploaded and edited by the user, directly from within the cPanel interface? BoxTrapper File Handler File Manager MultiPHP Manager 3 File Manager Which of the following features found in the cPanel account interface will allow a cPanel account user to create subaccounts to give email, FTP, and webdisk access to additional users? File Manager Aliases User Manager Contact Information 3 User Manager Which of the following feature categories within a cPanel account interface will allow users to view their Bandwidth usage statistics? Email Metrics Advanced Domains 2 Metrics Which of the following online resources provided by cPanel is the ideal place for customers to submit cPanel & WHM feature ideas, improvements, and suggestions for our developers to consider? The cPanel Documentations Site cPanel University The cPanel Store The cPanel Feature Request Site 4 The cPanel Feature Request Site confirm Which of the following services does cPanel provide for every customer with an active cPanel license? Free technical support, support services, and customer assistance. Free technical support with our automated AI chatbot, cPanel Pete. No human support is available. Free server-build assessments and cost estimates. Free quotes on the cost of getting technical support from cPanel. 1 Free technical support, support services, and customer assistance. confirm from website Which of the following options indicates the office hours in which the cPanel Technical Support Analyst team is available? 24 hours a day, 365 days a year. 7 days a week, from 9AM to 5PM, Central Standard Time. Weekdays from 6AM to 6PM, Central Standard Time. 12 hours a day, 182.5 days a year. 1 24 hours a day, 365 days a year. Which of the following types of applications can be created and managed with the cPanel account interface's Application Manager feature? 'Amethyst on Tracks' Applications Node.js Applications YAML Applications PHP Applications 2 Node.js Applications confirm Which of the following services does our support team provide for customers coming from DirectAdmin, Plesk, and Ensim control panels? Free estimates. Free migration. Free optimization. Free coupons. 2 Free migration confirm from website We offer free migration services for customers who use the following ... Plesk®. DirectAdmin. Ensim®. Which of the following options indicates the frequency of major updates being released for the product each year? Bi-annual releases. every two years Quarterly releases. every 3 months Weekly releases. Centennial releases. hundread year 2 Quarterly releases confirm from website Which of the following indicates cPanel's flagship product? CoreProc & Litespeed AppConfig & cPsrvd EasyApache & cPHulk cPanel & WHM 3 EasyApache & cPHulk In 2017, cPanel celebrated its anniversary of how many years? 5 years 50 years 20 years 100 years 20 confirm Which of the following categories found within the WHM interface provide a number of helpful features for administrators to secure their server with? Policy Control Severity Monitor Security Center Server Command 3 Security Center Which of the following options indicates an actual interface within WHM that will allow administrators to specify which features are available to specific users or packages on the server? Adjust Package Option Selector Feature Manager Policy Manager 3 Feature Manager confirm from whm Which of the following options best describes WHM's EasyApache feature? An administrative feature that makes web server software changes fast and easy. An administrative feature that makes processor overclocking calculation estimates fast and easy. An administrative feature that makes printer calibration fast and easy. An administrative feature that makes email queue management fast and easy. 1 An administrative feature that makes web server software changes fast and easy. cPanel Support will provide which of the following services for customers that request it? Performing cPanel & WHM installations. Performing TSLC MicroPort adjustments. Providing financial advice. Providing IANA-approved routing. 1 Performing cPanel & WHM installations. Which of the following options best describes an interface within WHM that allows administrators to easily create sets of limitations for different types of accounts, commonly based on some arrangement of web host pricing options? Packages >> Add a Package Limitations >> Create Limits Types >> New Type Features >> Set Restrictions 1 Which of the following options indicates an actual feature included with EasyApache 4 that allows accounts on the same server to use different versions of PHP simultaneously? cPPHP MyPHP YourPHP MultiPHP 4 MultiPHP Which of the following options are important for a customer to have on their server, in order to allow their cPanel & WHM installation to be licensed properly? A Google Mail address. A home postal address. A public IP address. A domain name address. 3 A public IP address. Which of the following options indicates an actual feature within WHM that can be used to migrate one or more accounts between servers? Transfer Tool Account Relocate Server Profiler Migration Assist 1 Which of the following options best describes a benefit of using SSL certificates to secure websites hosted on your server? They ensure that communication between your server and the internet is safe and encrypted. They ensure that communication between your server and the internet is officially approved by the OIBC (Official Internet Bureau of Communications). They ensure that communication between your server and the internet is only visible by explicitly allowed individuals. They ensure that communication between your server and the internet cannot occur. 1 They ensure that communication between your server and the internet is safe and encrypted. Which of the following Content Management Systems (CMS) have a feature built into cPanel that allows customers to manage its installations and updates from within the cPanel account interface? Joomla! Drupal WordPress Typo3 3 WordPress Which of the following options indicates an actual security feature of cPanel & WHM servers that acts as a safety net for website security by using rules created by security authorities to intercept malicious attempts at exploiting websites and web applications? AuthMod LockDown ModSecurity SecurityNet 3 ModSecurity Which of the following operating systems can cPanel & WHM NOT be installed or used on? Amazon Linux Servers Windows Servers CentOS Servers Redhat Servers 2 Windows Servers Which of the following features available in WHM can help customers migrate easily between servers? Feature Manager Transfer Tool EasyApache 4 Security Advisor Transfer Tool Which of the following options best describes the role of a web hosting control panel? Software on the operating system that provides a visual read-out of server specifications and statistics, such as temperature and fan speed. Software on the operating system that provides a basic suite of office utilities, such as a word processor, spreadsheet manager, and a presentation designer. Software on the operating system that provides a graphical interface designed to help automate server administration tasks. Software on the operating system that provides a desktop environment similar to Microsoft Windows or Apple's MacOS. Software on the operating system that provides a graphical interface designed to help automate server administration tasks. Which of the following operating systems are supported by cPanel & WHM's official system requirements? Windows Server 2018 CentOS Server Debian Server Ubuntu Server CentOS Server
imyelo
:book: Tencent translator in command line
anh-ld
🤖 Get recommendations right from your terminal
SantiagoBobrik
A local event gateway for AI code agents. Capture lifecycle events from Claude Code, Gemini CLI, and more — fan them out to any HTTP endpoint, webhook, or device.
Olaide-EO
No description available
morsdyce
lightweight pjax library focusing on animation transitions
fandoghpaas
Fandogh nodejs client
RodiZaharadji
No description available
sameer52718
Fancy and customizable CLI progress bar with themes
catscarlet
Add a button to remove your shit followers.
GreatZardashts Collections of sourcecodes from other clients
kcosr
Node.js + TypeScript voice gateway for LLM agents: queued TTS turns, streamed ASR, WebSocket multi-client fan-out. Pluggable providers — ElevenLabs/OpenAI hosted or Kokoro/Parakeet local via Python. Browser, Android, CLI.