Welcome To Snipplr


Everyone's Recent Snippets Tagged python



« Prev 1 2 3 4 5 ... 14
  1. FAV

    Python Sample SMS Code - SMS Messaging API

     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! 
    Python 12 views posted 2 years ago by Broadnet
  2. FAV

    least common multiple

    Calculates the lcm of 2 or more numbers (based on a self-made algorithm)
    Python 9 views posted 3 years ago by amirteymuri
  3. FAV

    Convert List to String

    Used to convert lists to string
    Python 7 views posted 3 years ago by onlyforbopi
  4. FAV

    Python Reverse Array

    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
    Python saved by 2 people 13 views posted 3 years ago by denisemauldin
  5. FAV

    Google chrome bookmarks to html and then to database

    Display the google chrome bookmarks to html and then save to database.
    Python saved by 2 people 9 views posted 4 years ago by Gauravwagh11
  6. FAV

    Python - Self-Modding Code

    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...
    Python saved by 1 person 6 views posted 4 years ago by BustACode
  7. FAV

    Python Censorship

    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.
    Python 7 views posted 4 years ago by arielinfante
  8. FAV

    Buscar ficheros en el ordenador

    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...
    Python 7 views posted 5 years ago by tionazo
  9. FAV

    Get all links from a website

    Get all links from a website from: http://www.pythonforbeginners.com/code/regular-expression-re-findall
    Python 28 views posted 5 years ago by tionazo
  10. FAV

    Flatten a list of lists (any depth) in Python

    Flatten a list of lists (or tuple of tuples, list of tuples, etc.) to any depth of nesting using no mutable objects.
    Python 4 views posted 5 years ago by alces
  11. FAV

    Void main char argv os subprocess

    What kind of program is this?
    Python 5 views posted 5 years ago by lancer229
  12. FAV

    Update timezone data on RedHat-like servers using fabric

    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**
    Python 5 views posted 5 years ago by alces
  13. FAV

    Fir npm install with gyp for windows if your name is contains non-english characters.

    his simple patch solves the problem when building on windows with usernames with non-ascii letters.
    Python 6 views posted 5 years ago by composite
  14. FAV

    Python: check battery stat and run through cron

    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
    Python 9 views posted 5 years ago by pantuts
  15. FAV

    Python formatKey for Redis

    Tiny python closure for combining redis keys with "format". Uses a closure so it does not remake the base key each use.
    Python 5 views posted 5 years ago by dsonbill
  16. FAV

    SystemInformation.py

    Gets system, machine, OS and networking information and either writes it to a file or returns the data as a string.
    Python 8 views posted 5 years ago by JordanRowles
  17. FAV

    Merge Multiple Word Documents into Single Doc using REST API in Python

    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...
    Python 5 views posted 5 years ago by johansonkatherine
  18. FAV

    random wikipedia reader

    to open and read a random wikipedia article
    Python 8 views posted 5 years ago by naveenrn
  19. FAV

    Recursively consolodate all Files into one folder

    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.
    Python 4 views posted 5 years ago by jlmarks
  20. FAV

    Trading at www.cex.io ( VB Script ) - Create your own Bitcoin Trading BOT

    ' ' ' 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...
    Visual Basic 10 views posted 6 years ago by rbillig
  21. FAV

    Python Web Server

    Code for single threaded python web server
    Python 15 views posted 6 years ago by ronaklovespython
  22. FAV

    Export JPEG Files With Each LayerSet with option (Photoshop Python With PyQt)

    with layer set prefix option and custom output path
    Python 4 views posted 6 years ago by janusoo
  23. FAV

    Export JPEG Files with each LayerSet (Photoshop Python with PyQt)

    Photoshop python script export multiple files with each layerSet
    Python 3 views posted 6 years ago by janusoo
  24. FAV

    Generador de oraciones

    Crea oraciones aleatoriamente a partir de lo que se ponga en las listas part1, part2 y part3
    Python 8 views posted 6 years ago by a7xrturo
  25. FAV

    Pentagono Turtle

    Hacer un pentágono con Turtle
    Python 4 views posted 6 years ago by a7xrturo
  26. FAV

    Contador de vocales

    Cuenta vocales en la input.
    Python 6 views posted 6 years ago by a7xrturo
  27. FAV

    Contador de palabras

    Contador de palabras en la input.
    Python 2 views posted 6 years ago by a7xrturo
  28. FAV

    Calculadora de Area

    Calculadora de Área que soporta Cuadrado, Rectángulo, Triángulo, Círculo y Rombo.
    Python 5 views posted 6 years ago by a7xrturo
  29. FAV

    interferogram.py

    A program I wrote for data analysis during my final project at university.
    Python 1 views posted 6 years ago by dancohen990
  30. FAV

    Display the download percentage of a file

    Place this snippent in your script, and call it like this: urllib.urlretrieve(getFile, saveFile, reporthook=report) Notice it is the 3rd argument that calls the function on each file that needs to be downloaded.
    Python saved by 3 people 13 views posted 6 years ago by o0110o
« Prev 1 2 3 4 5 ... 14