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 requests | |
class Event: | |
def __init__(self, convention_id, session_id, name, max_tickets, duration, age_range, preferreddaypart_id, alternatedaypart_id, priority, type_id): | |
self.url = 'https://tabletop.events/api/event' | |
self.convention_id = convention_id | |
self.session_id = session_id | |
self.name = name | |
self.max_tickets = max_tickets | |
self.priority = priority |
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
void setup() { // The setup function runs once when you start the program.. so we put all of the stuff we only want to run once | |
size(1000,1000); // the screen size. Change these around! | |
background(0,20,0); // the background color, 0-255 red, green, blue | |
textSize(20); // size of text. 20 seems like a good size | |
fill(255, 102, 153); // the color of the shape (red, green, blue) | |
} | |
// Setting some variables. We set them outside of functions so they can be shared by the whole program (global) | |
int SHAPE_SIDES = 3; // Number of sides to the shape. 3 is a triangle, 4 is a square, 100000 is a smooth circle | |
int SHAPE_SIZE = 500; // Size of the shape. 500 fills the screen! |
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 string | |
has_nginx = { | |
"indicators": { | |
"file_exists": | |
{"/lib/systemd/system/nginx.service": { | |
"score": 1, | |
"terminate_on_failure": True | |
}} |
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 time, random | |
from qhue import Bridge | |
b = Bridge("192.168.1.107", "longusernamestring") | |
lights = b.lights | |
light1bright = 0 | |
light2bright = 254 | |
# i swear i know how to write python but i am lazy and this was for a meme |
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 os | |
try: | |
os.stat("./.switch") | |
switcher = 1 | |
os.remove("./.switch") | |
except: | |
file = open("./.switch", "w") | |
switcher = 0 |
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 | |
if [[ $EUID -ne 0 ]]; then | |
echo "Permission denied" | |
exit 1 | |
fi | |
if [ -z "$SUDO_USERS" ] | |
then | |
echo "\$SUDO_USERS is empty. Using $(ls /home)" | |
SUDO_USERS=$(ls /home) |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const ( | |
width = 20 |
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 sys,os | |
import curses | |
import time | |
import random | |
from asciitree import LeftAligned | |
from collections import OrderedDict as OD | |
from scapy import data | |
import random | |
import string |
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 sys,os | |
import curses | |
import time | |
import random | |
from asciitree import LeftAligned | |
from collections import OrderedDict as OD | |
from scapy import data | |
import random | |
import string |
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
%%javascript | |
IPython.notebook.kernel.execute("!jupyter nbconvert --to script " + IPython.notebook.notebook_name); | |
// This saves the current notebook as a python file with the same name. |
NewerOlder