Welcome To Snipplr


Everyone's Recent Snippets Tagged python



« Prev 1 2 3 4 5 ... 15
Take attribute data stored in a CSV and insert it into an SVG based on unique ID field. The final bit of code adds an 'onmouseover' effect to animate the map in javascript.
0 609 posted 3 months ago by ralentina
scraping geographical coordinates from an online directory (for a mapping project), using Beautiful Soup. Data exported into csv.
1 552 posted 3 months ago by ralentina
Always gives me perfect date. Sample Output Current Day is: 1 Current Month is: 2 Current Year is: 2020 Current Hour is: 17 Current Minute is: 3 Current Second is: 8 Current Microsecond is: 556483
0 597 posted 4 months ago by johnwalsh1
Clone any Github user's collection of public repositories
0 661 posted 8 months ago by rootVIII
Useful for debugging
0 116 posted 1 year ago by wayneweicheng
 Just try the following Python Sample SMS Code scripts and you will find that sending SMS to your contact via this programming script is fun! 
1 218 posted 2 years ago by Broadnet
Calculates the lcm of 2 or more numbers (based on a self-made algorithm)
0 92 posted 3 years ago by amirteymuri
Used to convert lists to string
0 143 posted 3 years ago by onlyforbopi
arr[::-1] does a list slice to reverse the array str(x) for x in arr[::-1] casts the ints in the array as strings map(str, arr[::-1]) does the same thing by using map to cast the ints " ".join() joins the resulting strings with a space
1 125 posted 4 years ago by denisemauldin
Display the google chrome bookmarks to html and then save to database.
1 203 posted 4 years ago by Gauravwagh11
One day I got to wondering if it was possible to get a Python script to modify itself. After a few searches I found a solution that I present here. I did not write this code, but feel that it should be "paid forward" so others know that it is possibl...
1 124 posted 5 years ago by BustACode
A simple Python censor script that takes 2 arguments. One is for the text you want to censor and the other is the list of words that should not be viewed.
0 93 posted 5 years ago by arielinfante
Overview In an earlier post "OS.walk in Python", I described how to use os.walk and showed some examples on how to use it in scripts. In this article, I will show how to use the os.walk() module function to walk a directory tree, and the fnma...
0 125 posted 5 years ago by tionazo
Get all links from a website from: http://www.pythonforbeginners.com/code/regular-expression-re-findall
0 265 posted 5 years ago by tionazo
Flatten a list of lists (or tuple of tuples, list of tuples, etc.) to any depth of nesting using no mutable objects.
0 156 posted 5 years ago by alces
What kind of program is this?
0 87 posted 5 years ago by lancer229
Usage: 1. save the snippet as *fabfile.py* 2. and run: **$ fab -H myhost1,myhost2...** or set *env.roledefs['myrole'] = ['myhost1', 'myhost2', ...]* in *fabfile.py* and run this way: **$ fab -R myrole**
0 103 posted 5 years ago by alces
his simple patch solves the problem when building on windows with usernames with non-ascii letters.
0 131 posted 5 years ago by composite
for Cron: # run $ crontab -e # then add this */1 * * * * export DISPLAY=:0.0 && /home/username/path/to/script.py > /dev/null # then save. # This cron job will run every minute
0 128 posted 5 years ago by pantuts
Tiny python closure for combining redis keys with "format". Uses a closure so it does not remake the base key each use.
0 83 posted 6 years ago by dsonbill
Gets system, machine, OS and networking information and either writes it to a file or returns the data as a string.
0 86 posted 6 years ago by JordanRowles
This REST example uses pycurl library to send HTTP request and handle HTTP response so you need to install it to use this example. Once input Word documents are uploaded, you can use the following URI to merge documents on Aspose for Cloud or any sup...
0 143 posted 6 years ago by johansonkatherine
to open and read a random wikipedia article
0 84 posted 6 years ago by naveenrn
This file starts at the bottom of the tree and recursively moves all of the files from that tree into another folder. To avoid overwriting files I prepended all of the files with a 9digit number.
0 82 posted 6 years ago by jlmarks
' ' ' 1, Create your cex.io account from https://cex.io/r/0/rbillig/0/ ( mandatory ) ' 2, Tranfer Bitcoins to you account ' 3, Under your CEX account, create a public and secret key ' 4, Modify the 3 vars below ( G_USERNAME, G_APIKEY...
0 163 posted 6 years ago by rbillig
Code for single threaded python web server
0 100 posted 6 years ago by ronaklovespython
with layer set prefix option and custom output path
0 95 posted 6 years ago by janusoo
Photoshop python script export multiple files with each layerSet
0 124 posted 6 years ago by janusoo
Crea oraciones aleatoriamente a partir de lo que se ponga en las listas part1, part2 y part3
0 91 posted 6 years ago by a7xrturo
Hacer un pentágono con Turtle
0 115 posted 6 years ago by a7xrturo
« Prev 1 2 3 4 5 ... 15