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
for (i = 0; i < 1001; i++) { | |
(function(i){ | |
setTimeout(function(){ | |
var star = stars.create(Math.floor(Math.random() * 20 + 1 + currentX ), | |
Math.floor(Math.random() * 120 + 100 ), 'star'); | |
// Create Starts That Rain Above Player With A Bit Of 'Noise' (x, y, type) | |
star.body.gravity.y = 300; |
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
const Twit = require('twit'); | |
const config = require('./config'); | |
const T = new Twit(config); | |
const badThingsToSay = [ | |
'What font do you use?', | |
'Hello, whats the name of the font you use font?', | |
'Hey Wes, what\'s the name of that weird font you use?', | |
'Weird font that you use. Mind telling me what it\'s called?', | |
'What is the name of the font you use................ I\'ve never seen it before...', |
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
var derivativeOfATerm = function(arr) { | |
var one = arr[0]; | |
var two = arr[1]; | |
var derivative = []; | |
if(two <= 0) { | |
return [0,0]; | |
} else { | |
derivative.push(one*two); | |
derivative.push(two-1); | |
return derivative; |
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 Control.Monad | |
import Data.List | |
factors num = [x | x <- [1..num], num `mod` x == 0] | |
primesUnder limit = [x | x <- 2:[3,5..limit], sum(factors x) == x+1] | |
isPrime num = if sum(factors(num)) == num+1 then True else False | |
allPrimes = [x | x <- 2:[3,5..], sum(factors x) == x+1] | |
nextPrime num = findIndex (>num) allPrimes |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Remember Me!</title> | |
<style> | |
body { | |
display: flex; |
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 tweepy, json, random, time, sys | |
from data import * | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_token, access_token_secret) | |
api = tweepy.API(auth) | |
following_list = api.followers_ids("zaksanderson01") | |
class StdOutListener(tweepy.StreamListener): |
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
// jshint esversion: 6 | |
const Discord = require("discord.js"); | |
const mark = require("./mark"); | |
const client = new Discord.Client(); | |
let chattiness = 0.5; | |
// Initialise a chattiness, which is a measure of how often it speaks by itself. | |
client.on("ready", () => { |
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 os import *while True: system("cls") option = raw_input("What would you like to do? Type 'c' for command prompt or 'm' to run os commands in general >> ") if option == "m": | |
while True: command = raw_input("Type 'esc' to escape at any time >> ") if command.lower() == "esc": break | |
exec(command) | |
else: while True: command = raw_input("Type 'esc' to escape at any time >> ") if command.lower() == "esc": break | |
system(command) | |
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
#coding=utf-8 | |
import RPi.GPIO as gp | |
import random | |
from time import sleep | |
buzz_pin = 11 | |
key_pin = 16 | |
disarm_length = 6 |
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
echo "This script provides an easy way to set up a twitter bot that tells you what is currently playing on your radio station First we just need to install some stuff, so you will need to enter your password. If anything fails, please contanct Olly. Press <ENTER> to continue: " | |
read | |
sudo apt-get update | |
sudo apt-get install python3-pip | |
sudo pip install tweepy | |
# Use special options |
OlderNewer