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
| for i in $(seq 2 1000); do | |
| ./check_prime.py $i & | |
| done | sort |
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
| for i in $(seq 2 1000); do | |
| ./check_prime.py $i | |
| done |
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 python | |
| # | |
| # check_prime.py | |
| # Check if a number (given by the first argument) is prime. | |
| # | |
| import sys | |
| import math | |
| # Die if there is no first argument. |
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
| $('body').bind 'paste', (event) -> | |
| console.log 'paste!' | |
| items = (event.clipboardData or event.originalEvent.clipboardData).items | |
| for i in [0..items.length-1] | |
| continue unless items[i].kind == 'file' | |
| # Process File Objects |
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
| dropZone.addEventListener 'dragover', -> | |
| event.stopPropagation() | |
| event.preventDefault() | |
| event.dataTransfer.dropEffect = 'copy' | |
| $('#drag-coverall').show() |
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
| $('#song-upload').css('opacity', '0') | |
| $('#song-upload').parent().prepend('<a id = "upload-button" class = "btn btn-default" href = "#">Upload from Computer</a>') | |
| $('#upload-button').click (e) -> | |
| e.preventDefault() | |
| $('#song-upload').trigger('click') |
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
| <form method = 'post' action = '/songs' enc = 'multipart/form-data'> | |
| <input type = 'file', name = 'upload_songs' /> | |
| </form> |
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 python | |
| from __future__ import print_function | |
| import numpy as np | |
| import time | |
| def clear(): | |
| print(chr(27) + "[2J") |
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 python | |
| # | |
| # markov.py | |
| # Generates a Markov chain from a body of text. | |
| # | |
| from __future__ import print_function | |
| import sys | |
| import random |
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
| import bot | |
| @bot.reply(r'alot') | |
| def alot(message): | |
| message.reply("I'll allot you a lot of alots.") | |
| if __name__ == '__main__': | |
| bot.setup(host='irc.foonetic.net', user='DasBot', channel='#bloopy') |