Giter VIP home page Giter VIP logo

automate-stuff-with-python's Introduction

Helpful resources and points:

make your .py script a terminal command

  • make script executable
chmod +x `name-of-script`
  • add a shebang line(#!bin/sh) that points to system Python interpreter
#-----add this line at the top of your script-----#
#!/usr/bin/env python 
#----- above is specific for python-------#
  • create ~/bin directory in user home directory
mkdir --parents ~/bin
# to avoid exisiting parent error flag it with `--parents`
  • rename script and copy it into ~/bin directory
mv script.py script
cp script ~/bin
  • add PATH to the .bash_profile or .profile file
gedit .bash_profile
## add this line into `.bash_profile`
export PATH=$PATH":$HOME/bin" # this needs to be excat

jupyter server problem then might try to upgrade consol

pip install -U jupyter_console

some ideas to implement from automate-stuff-kitab

  • Open all links on a page in separate browser tabs.
  • Open the browser to the URL for your local weather.
  • Open several social network sites that you regularly check.

links to learn basic html


hot to get free accuweather api

Go to AccuWeather
Register or log in
Create new application at Application page

convert bs4.BeautifulSoup object(in json) into dictionry

# convert into string
bs_obj_str=str(bs_ojecct)
# use json.loads() to parse valid json string into python dict
bs_dict=json.loads(bs_obj_str)
#####
# It is mainly used for deserializing native string, byte, or byte array which consists of JSON data into Python Dictionary.
#####

radio-garden api links

#Get all country and cities

http://radio.garden/api/ara/content/places

(stations by city, gps coordinates)

#Get info of city and Stations by city (last id is id_city)

http://radio.garden/api/ara/content/page/W9g0lZfQ

#Get info of specific station (last id is id_station)

http://radio.garden/api/ara/content/channel/tMGsmGxF

#Example Stream URL (id is id_station)

http://radio.garden/api/ara/content/listen/tMGsmGxF/channel.mp3

installing geckodriver on ubuntu linux

sudo apt-get install firefox-geckodriver
## add path to geckodriver executable for the sysytem to find and execute

update all your python modules

#first install `pip-review`
pip install pip-review
#automatically
pip-review --auto
#interactively
pip-review --interactive
#as always chech its options available to get your option
pip-review

prompt

pip install PyInquirer
# visit repo to know more: https://github.com/CITGuru/PyInquirer
# Successfully installed prompt-toolkit-1.0.14
# but jupyter-console was running on 3.0.20torrento
# Found existing installation: prompt-toolkit 3.0.20
#    Uninstalling prompt-toolkit-3.0.20:
#      Successfully uninstalled prompt-toolkit-3.0.20

automate-stuff-with-python's People

Contributors

sunil-dhaka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.