My Python Examples
Switch branches/tags
Nothing to show
Clone or download
geekcomputers Merge pull request #432 from srafferty73/master
Update Credit_Card_Validator.py
Latest commit 3a6f255 Nov 20, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assembler Merge pull request #409 from harmanmalhotra/patch-2 Oct 31, 2018
Compression_Analysis Added PSNR calculator for checking compression quality Oct 26, 2018
CountMillionCharacters-Variations added main-method and changed the program logic Apr 10, 2018
Google_Image_Downloader updated and improved Oct 16, 2018
Koch Curve Creating a Snowflake Fractal in Python using Koch Curve Dec 5, 2017
Weather Scrapper Add weather.csv Oct 26, 2018
XORcipher improvment Dec 22, 2017
async_downloader Add async downloading example Feb 6, 2018
bank_managment_system Bank managment system gui program Oct 2, 2018
brickout-game Update brickout-game.py Oct 28, 2018
game_of_life moved GOL to new dir, added sample.gif output of the code. Oct 5, 2017
linear-algebra-python Add files via upload Mar 8, 2018
nodepad Add files via upload Jan 30, 2018
other_pepole Update and rename myip.py to other_pepole/get_ip_gui Nov 17, 2017
primelib performance optimization of primelib.isPrime(number) Nov 14, 2018
.gitignore Change onLineCombinations using list comprehension Jan 28, 2018
.travis.yml Let's run some tests! Jan 25, 2018
CountMillionCharacter.py Format code by PEP8 Sep 12, 2018
CountMillionCharacters-2.0.py Add files via upload Oct 11, 2018
Counting-sort.py Add files via upload Oct 11, 2018
Credit_Card_Validator.py Update Credit_Card_Validator.py Nov 18, 2018
Cricket_score.py Merge pull request #407 from BhavKaran/master Oct 31, 2018
Decimal_To_Binary.py Added Decimal to Binary Converter Oct 19, 2018
EncryptionTool.py Add files via upload Oct 11, 2018
FTP in python Create FTP in python Aug 3, 2017
Google_News.py Merge branch 'master' into master Nov 6, 2018
GroupSms_Way2.py Updated to Python 3 Oct 5, 2018
Guess_the_number_game Update Number Guesser to Python 3 Oct 6, 2018
Guessing_Game Guessing_Game Oct 10, 2018
LICENSE.md Create LICENSE.md Feb 26, 2018
Memory_game Create Memory_game Oct 19, 2018
Merge-sort.py Merge Sort Implementation Oct 1, 2018
Monitor Apache Create Monitor Apache Aug 3, 2017
Organise.py Refactoring Organise.py Feb 13, 2018
PONG_GAME update_Pong_game Oct 31, 2018
PORT SCANNER.PY Create PORT SCANNER.PY Aug 4, 2017
Palindrome_Checker.py removed variable Jun 4, 2018
Polyline Create Polyline Oct 16, 2018
Print_List_of_Even_Numbers.py Added in to the file to fix error Oct 8, 2018
Print_List_of_Odd_Numbers.py Prints list of odd numbers Oct 8, 2018
Program to print table of given number Create Program to print table of given number Oct 27, 2018
QuadraticCalc.py Upload Quadratic Calculator Oct 2, 2017
README.md Update README.md Nov 4, 2018
ReadFromCSV.py Update ReadFromCSV.py Oct 2, 2018
Shivaansh.py Fix loop colon, and spacing in Shivaansh.py Oct 11, 2018
SimpleCalculator.json Create SimpleCalculator.json Oct 27, 2018
SimpleStopWatch.py Update SimpleStopWatch.py Nov 4, 2018
Streaming Tweets from Twitter to Database twitter.py Dec 7, 2017
TTS.py Text-to-Speech Dec 1, 2017
TicTacToe.py Made code compatible with Python 2 & 3 Apr 12, 2018
WikipediaModule Tabbed a the function description Sep 28, 2017
backup_automater_services.py Add files via upload Oct 11, 2018
batch_file_rename.py Add files via upload Oct 11, 2018
calculator.py Add files via upload Oct 11, 2018
chaos.py Add files via upload Oct 11, 2018
check_file.py Add files via upload Oct 11, 2018
check_for_sqlite_files.py Add files via upload Oct 11, 2018
check_input.py Add files via upload Oct 11, 2018
check_internet_con.py Add files via upload Oct 11, 2018
chicks_n_rabs.py Add files via upload Oct 11, 2018
create_dir_if_not_there.py Add files via upload Oct 11, 2018
cricket_live_score.py Add files via upload Oct 11, 2018
daily_checks.py Add files via upload Oct 11, 2018
dec_to_hex.py Format code by PEP8 Sep 12, 2018
dice.py Add files via upload Oct 11, 2018
diceV2_dynamic.py Add files via upload Oct 11, 2018
dice_rolling_simulator.py Add files via upload Oct 11, 2018
dir_test.py Add files via upload Oct 11, 2018
env_check.py Add files via upload Oct 11, 2018
ex20.py Add files via upload Oct 11, 2018
factorial_perm_comp.py Add files via upload Oct 11, 2018
factors.py Update factors.py Oct 1, 2018
fileinfo.py fixed input function Mar 26, 2018
find_prime.py added prime number finding algo, using Sieve_of_Eratosthenes theory. Nov 19, 2017
folder_size.py Bugfix in folder_size.py. Remove indents in dictionary, and add *1024… Jan 28, 2017
four_digit_num_combination.py Modify format based on pylint Jan 29, 2018
ftp_send_receive.py Send & Receive files via ftp Nov 19, 2017
get_info_remoute_srv.py PEP8 changes. Nov 15, 2016
get_likes_on_FB.py Create get_likes_on_FB.py Jan 23, 2017
get_youtube_view.py Update get_youtube_view.py Nov 16, 2017
google.py Updated google.py Oct 8, 2018
helloworld.py Create helloworld.py Oct 19, 2018
internet_connection_py3 Changes made in code to open website as well Mar 19, 2017
jee_result.py PEP8 changes. Nov 15, 2016
kmp_str_search.py added knuth-morris-pratt pattern in a string search module. Nov 12, 2017
lanzhiwang_index.md 增加索引文件 Sep 9, 2018
life print statement Dec 12, 2017
live_sketch.py Created a new file Oct 9, 2018
logs.py PEP8 formation Nov 15, 2016
magic8ball.py updated magic8ball.py, module doc added. Oct 19, 2017
meme_maker.py Colors are changed Sep 8, 2017
merge.py fix a bug Dec 8, 2017
move_files_over_x_days.py added option to use command line arguments to script Dec 25, 2017
movie_details Update Sep 30, 2017
multiplication_table.py Update multiplication_table.py Sep 8, 2018
nDigitNumberCombinations.py Update nDigitNumberCombinations.py Sep 12, 2017
new_script.py PEP8 formation Nov 15, 2016
nmap_scan.py PEP8 formation Nov 15, 2016
nslookup_check.py PEP8 format Nov 15, 2016
osinfo.py PEP8 format Nov 15, 2016
password_cracker.py Update password_cracker.py Dec 4, 2016
ping_servers.py Define `filename` before using it. Aug 13, 2017
ping_subnet.py PEP8 changes Nov 15, 2016
polygon.py Pygame script Nov 19, 2016
portscanner.py Revert "22" Jan 25, 2016
powerdown_startup.py Fixed some alignment of comments Sep 21, 2017
powerup_checks.py convert indent to space / reformat files based on PEP8 May 22, 2016
prison_break_scrapper.py Added Prison Break Scrapper Sep 2, 2017
pscheck.py Revert "22" Jan 25, 2016
psunotify.py Script to download PSU notifications Mar 16, 2017
puttylogs.py Revert "22" Jan 25, 2016
pythonVideoDownloader.py Updated to Python 3 Oct 5, 2018
python_sms.py spaces between the character ' = ' Jul 19, 2017
random-sentences.py Pythonized more Oct 23, 2017
randomloadingmessage.py Python script that chooses from 80 funny loading lines Oct 7, 2018
read_excel_file.py Read-Write Excel files with python Aug 24, 2018
recyclebin.py convert indent to space / reformat files based on PEP8 May 22, 2016
replacetext.py Add replacetext file Oct 18, 2018
rock_paper_scissor_game Create rock_paper_scissor_game Oct 3, 2018
rook.py Add script to show shortest path by rook in chess board Oct 12, 2018
sample.xlsx Read-Write Excel files with python Aug 24, 2018
script_count.py convert indent to space / reformat files based on PEP8 May 22, 2016
script_listing.py Update script_listing.py Nov 5, 2016
sendemail.py Send mail through terminal using Gmail API Dec 20, 2017
serial_scanner.py Update serial_scanner.py Jan 12, 2018
sha1.py sha1 hashing script Oct 30, 2018
sierpinski_triangle.py added sierpinski_triangle.py, an easy fractal generation code, using … Sep 23, 2017
site_health.py removed spaces and lines Oct 3, 2018
snake.py added snake.py Apr 29, 2018
spiralmatrix.py Create spiralmatrix.py Mar 23, 2018
spotlight.py Added a New Script To Download Spotlight Wallpapers from Windows into… Sep 22, 2017
sqlite_check.py Revert "22" Jan 25, 2016
sqlite_table_check.py Visual Update Nov 8, 2016
start-server.py check_file.py enhanced Apr 14, 2017
tar.py Create tar.py Jun 21, 2018
test Feat: test for update file to github. Oct 27, 2017
testlines.py Clean comments Jun 1, 2017
tf_idf_generator.py updated tf_idf_generator.py Sep 17, 2017
thread_signal.py 多线程响应sigint信息退出 Sep 19, 2018
tik_tak.py modified code for readability and security Oct 15, 2018
timymodule.py tabs -> spaces and added __main__ Apr 28, 2017
tweeter.py In the current code, only single line tweets are enabled. Apr 5, 2017
two_num.py PEP8 Flake8 fixes Oct 2, 2018
webcam.py docs: Add Requirements Feb 18, 2017
wiki_random.py updated wiki_random.py, added module doc and few exception handing. Oct 19, 2017
work_connect.py Updated to Python 3 work_connect Oct 8, 2018
write_excel_file.py Read-Write Excel files with python Aug 24, 2018
xkcd_downloader.py Keep image extension for xkcd comics Oct 2, 2017
youtube-downloader fast.py fast youtube downloader with aria2c Feb 10, 2017
youtube.py additional condition Sep 19, 2018

README.md

My Python Examples.

Here is more detailed information about scripts I have written. I do not consider myself a programmer; I create these little programs as experiments to play with the language, or to solve problems for myself. I would gladly accept pointers from others to improve the code and make it more efficient, or simplify the code. If you would like to make any comments then please feel free to email me at craig@geekcomputers.co.uk. These scripts are very important functions which help reduce the workload on people. In the scripts the comments and other documents are lined up correctly when they are viewed in Notepad++. This is what I used to code Python scripts.

  • batch_file_rename.py - This batch renames a group of files in a given directory, once you pass the current and the new extensions.

  • create_dir_if_not_there.py - Checks to see if a directory exists in the users home directory, if not then create it.

  • Fast Youtube Downloader - Downloads YouTube videos quickly with parallel threads using aria2c

  • Google Image Downloader - Query the specific term and retrieve images from the google image database.

  • dir_test.py - Tests to see if the directory testdir exists, if not it will create the directory for you.

  • env_check.py - This script will check to see if all of the environment variables required are set.

  • fileinfo.py - Shows file information for a given file.

  • folder_size.py - Scans the current directory and all subdirectories and displays the size.

  • logs.py - This script will search for all *.log files in the given directory, zip them using the program you specify, and then date stamp them.

  • move_files_over_x_days.py - Moves all files over 240 days old from the source directory to the destination directory.

  • nslookup_check.py - This simple script opens the file server_list.txt and then does an nslookup for each one to check the DNS entry.

  • osinfo.py - Displays some information about the OS on which you are running this script.

  • ping_servers.py - This script, depending on the arguments supplied, will ping the servers associated with that application group.

  • ping_subnet.py - After supplying the first 3 octets this file scans the final range for available addresses.

  • powerdown_startup.py - This file goes through the server list and pings the machine, if it is up it will load the putty session, if it is not it will notify you.

  • puttylogs.py - This file zips up all the logs in the given directory.

  • script_count.py - This file scans the scripts directory and gives a count of the different types of scripts.

  • script_listing.py - This file will list all the files in the given directory, and go through all the subdirectories as well.

  • testlines.py - This simple script opens a file and prints out 100 lines of whatever is the set for the line variable.

  • tweeter.py - This script allows you to tweet text or a picture from the terminal.

  • serial_scanner.py contains a method called ListAvailablePorts which returns a list with the names of the serial ports that are in use in the computer, this method works only on Linux and Windows (can be extended for mac osx). If no port is found, an empty list is returned.

  • get_youtube_view.py - This is very simple python script to get more views for your YouTube videos. Useful for repeating songs on YouTube.

  • CountMillionCharacter.py And CountMillionCharacter2.0.py - Counts character scripts, or how much characters are present on any text based file.

  • xkcd_downloader.py - Downloads the latest XKCD comic and places them in a new folder called "comics".

  • timymodule.py - A great alternative to Pythons 'timeit' module and easier to use.

  • calculator.py - Uses Python's eval() function to implement a calculator.

  • Google_News.py - Uses BeautifulSoup to provide Latest News Headline along with news link.

  • cricket_live_score - Uses BeautifulSoup to provide live cricket score.

  • youtube.py - Takes a song name as input and fetches the YouTube url of the best matching song and plays it.

  • site_health.py - This script is very useful for when you just to do a health check on a remote server.

  • SimpleStopWatch.py - Simple Stop Watch implementation using Python's time module.