Skip to content

Instantly share code, notes, and snippets.

View KyeRussell's full-sized avatar
🪴

Kye Russell KyeRussell

🪴
View GitHub Profile
@KyeRussell
KyeRussell / sample.py
Created September 23, 2011 11:49
Sample Gist
print("Hello, World!")
@KyeRussell
KyeRussell / ex1.cpp
Created August 16, 2011 00:42
The end result of three hours of work. This class is /boring/.
/* ex1.cpp
* Author: Kye Russell
* Date: 15/08/2011
*
* - Read in temperatures for every day in Jan (31). Provide a prompt with a runnin
* day total.
* - Print the averge of all temperatures:
* - >30 degrees.
* - 20-30 degrees.
* - <20 degrees.
@KyeRussell
KyeRussell / max.cpp
Created July 26, 2011 06:58
This is supposedly 4.5 hours of hardcore programming. I was not taught how to indent/style my code properly, I was not told how to comment, I was prohibited from using arrays, loops, or anything that we "weren't taught yet". Feels batman.
/* max.cpp
* Author: Kye Russell
* Date: 25/07/2011
*
* Take two numbers and return the maximum of the two.
*/
#include <iostream>
using namespace std;
@KyeRussell
KyeRussell / bad.py
Created July 20, 2011 11:15
IfElse alternative
derp = raw_input()
if derp == 'a':
pass
elif derp == 'b':
pass
elif derp == 'c':
pass
else:
print "Invalid Choice"
@KyeRussell
KyeRussell / dubstep.py
Created July 18, 2011 11:53
Dubstep Algorithm
import audio
fh = read('wub.wav')
ao = audio.AudioPlayer()
while True:
ao.play_stream(read(fh), audio.format.waveform)
@KyeRussell
KyeRussell / tweet.py
Created July 13, 2011 09:41
Bogan Tweets
from twitter import user
UncleMark = twitter.user('Markedw', 'Mark Edwards') # instnatise new Twitter.User object.
tweet_list = UncleMark.stream() # Write tweet list to variable
for tweet in tweet_list: # cycle through tweet list
if tweet.location == 'Bunbury': # if tweet is in bunbury
if 'football' not in tweet.text: # if tweet doesn't contain 'football' str.
tweet.subject = "Bogans" # tweet subject is 'bogans'.
else: # tweet contains 'football'.
@KyeRussell
KyeRussell / tweet.py
Created July 13, 2011 09:29
[JOKE] - Kye's Apple-related Tweet Algo
from twitter import user, tweet
Kye = twitter.userbase.new("KyeRussell", "Kye Russell")
while True:
if Kye.is_tweeting = True:
Kye.tweeting_about = 'Apple'
@KyeRussell
KyeRussell / prompt.py
Created July 9, 2011 15:07
Prompt Method
def prompt(message, password=False):
"""
Prompt the user for information.
message - what you're prompting the user for.
password - whether you want a password (invokes getpass instead of vanilla raw_input()).
returns the text returned by the user.
"""
# We don't want a password.
@KyeRussell
KyeRussell / commands.py
Created July 6, 2011 13:10
Python Shell Emulator
def help():
print("HELP!!!")
def account_info():
print("account infoz:!!!")
<title>Laugh</title><?php
$file = "output.txt";
$number = "a";
$number2 = "z";
$yes = array('file', 'number', 'number2');
$file = fopen('/output.txt', 'w', 'a');
fwrite($file, $yes);