This file contains 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 scrollkit import * | |
offset = 0 | |
def c(x, y): | |
factor = WIDTH/2 + (WIDTH/2 * sin(get_time()%50)) | |
v = sin(x / factor) + sin(y / factor) | |
h = 180 + (180 * v) | |
h = (h+offset)%360 |
This file contains 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 random | |
stations = {} | |
stations["Shinagawa"] = "品川" | |
stations["Ōsaki"]="大崎" | |
stations["Gotanda"]="五反田" | |
stations["Meguro"]="目黒" | |
stations["Ebisu"]="恵比寿" | |
stations["Shibuya"]="渋谷" | |
stations["Harajuku"]="原宿" |
This file contains 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 discord | |
import asyncio | |
import subprocess | |
from humanfriendly import format_timespan | |
import datetime | |
startup = datetime.datetime.now() | |
client = discord.Client() |
This file contains 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
program mand | |
integer , parameter :: width = 1920*3 | |
integer , parameter :: height = 1080*3 | |
integer, dimension (width, height, 3) :: image | |
integer :: col, row, iteration, max, max_rgb, pan_x | |
real :: r_x, r_y, x, y, x_new, color_idx, zoom | |
pan_x = -300 | |
pan_y = 0 | |
max = 1000 | |
max_rgb = 256**3 |
This file contains 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
.data | |
output_text: | |
.asciz "%d\n" ;; So we can printf later | |
.balign 4 | |
.text | |
.global main | |
.extern printf ; load external function | |
;; This program calculates the sum of all positive integers evenly divisible by 3 or 5 |
This file contains 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
tell application "Google Chrome" | |
set window_list to every window # get the windows | |
repeat with the_window in window_list # for every window | |
set tab_list to every tab in the_window # get the tabs | |
repeat with the_tab in tab_list # for every tab | |
set the_url to the URL of the_tab # grab the URL | |
if "di.fm" is in the_url then | |
tell the_tab |
This file contains 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 random | |
import time | |
# Usage: | |
# python pell.py | espeak -m -w output.wav | |
# | |
# This will generate a wav file of your random workout | |
# eSpeak (http://espeak.sourceforge.net/) is used to generate | |
# the speech. OSX has a builtin "say" command, which can be used on that | |
# platform instead. |
This file contains 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
#!/bin/bash | |
X=0; | |
while [ $X -eq 0 ] | |
do | |
X=`curl "https://url.to/search" | grep "text to find" | wc -l ` | |
sleep 60 | |
done | |
echo "done" | mail "you@host.com" |
This file contains 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
#!/bin/sh | |
IMG=`curl www.xkcd.com | grep "Image URL" | awk -F": " '{print $2}'` | |
curl $IMG > foo.png | |
curl www.xkcd.com | grep "img.*title=" | awk -F "title=\"" '{print $2}' | awk -F "\"" '{print $1}' | mailx -a foo.png -s "XKCD" YOU@HOST.COM |
This file contains 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
def name(n): | |
onesteens = ['one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'] | |
tens = ['twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'] | |
if n < 20: | |
return onesteens[n-1] | |
if n > 19 and n < 100: | |
dm = divmod(n,10) |
NewerOlder