This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from random import randint | |
| def shuffle(array): | |
| """Implementation of a Fisher-Yates shuffle.""" | |
| for item in array: | |
| curr_index = array.index(item) | |
| rand_index = randint(array.index(item), len(array) - 1) | |
| array[curr_index], array[rand_index] = array[rand_index], array[curr_index] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb | |
| checking for rb_method_entry_t.called_id in method.h... no | |
| checking for rb_control_frame_t.method_id in method.h... no | |
| checking for rb_method_entry_t.called_id in method.h... no | |
| checking for rb_control_frame_t.method_id in method.h... no | |
| Makefile creation failed | |
| ************************************************************************** | |
| No source for ruby-2.0.0-p648 provided with debugger-ruby_core_source gem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| When this script is called, it tweets "Someone wants to fuck (Wikipedia article title)". | |
| Crontab: 0,30 * * * * /usr/bin/python3 /home/pi/bots/wiki.py | |
| Demo: https://twitter.com/wikifuckbot | |
| """ | |
| import tweepy | |
| import wikipedia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Compares the length of two random wikipedia articles, then tweets the result. | |
| Crontab: 10,40 * * * * /usr/bin/python3 /home/pi/bots/wikicompare.py | |
| Demo: https://twitter.com/wikicomparebot | |
| Concept: @mcclure111 | |
| Implementation: @C_L_Ball | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // See me run at: https://jsfiddle.net/catleeball/yhuars47/2/ | |
| // Based on: http://stackoverflow.com/a/26426761/2873090 | |
| Date.prototype.isLeapYear = function() { | |
| var year = this.getFullYear(); | |
| if ((year & 3) != 0) return false; | |
| return ((year % 100) != 0 || (year % 400) == 0); | |
| }; | |
| Date.prototype.getDOY = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Misc.au3> | |
| ; via https://stackoverflow.com/questions/7936831/convert-clipboard-to-keystroke | |
| HotKeySet("^v","ClipboardToKeystroke") | |
| While 1 | |
| Sleep(30) ; If you forget this, your program takes up max CPU | |
| WEnd | |
| Func ClipboardToKeystroke() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^+v::SendRaw %clipboard% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Iterates over CSV of grocery data, tweeting each row | |
| Crontab: 0,15,30,45 * * * * /usr/bin/python3 /home/cat/bots/UPC_bot.py | |
| """ | |
| import sys | |
| import tweepy | |
| import linecache |