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
# Creates possible languages of n length over the alphabet {0, 1}, given a regular expression | |
# example (0 + 1)∗ generates set of all strings over {0, 1} | |
# TODO make it generate all possible strings in language less than or equal to n length | |
# / represents E empty string | |
import exrex | |
it = 2 | |
regex = "(0+1)*001(0+1)*" | |
# regex = "(0+1)*" | |
# regex = "(0+1)*0(0+1)*0(0+1)*0(0+1)*" |
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 | |
# Read the settings. | |
. ./settings.sh | |
# Start the server. | |
start_server() { | |
java -server -Xms${MIN_RAM} -Xmx${MAX_RAM} ${JAVA_PARAMETERS} -jar ${SERVER_JAR} nogui | |
} |
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
<section id="animationSection"></section> | |
<script>parentSection = document.getElementById("animationSection"); | |
for (let i = 0; i < 2977; i++) { | |
let imgDiv = document.createElement('div'); | |
imgDiv.className = "pathed"; | |
imgDiv.style.animationDelay = i * 350 + "ms"; | |
imgDiv.innerHTML = "<img src='https://www.fg-a.com/American/animated-American-flag.gif' alt='flag'/>"; | |
parentSection.appendChild(imgDiv); | |
}</script> | |
<style>#animationSection { |
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
#include "TOTP.h" | |
#include "RTClib.h" | |
RTC_DS3231 rtc; | |
int a = 2; | |
int b = 3; | |
int c = 4; | |
int d = 5; | |
int e = 12; | |
int f = 7; |
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
// ==UserScript== | |
// @name Chortle Cheat | |
// @namespace http://programmedlessons.org/ | |
// @version 0.3 | |
// @description Takes Chortle quizzes and reviews for you | |
// @author Shiv Trivedi | |
// @match http://programmedlessons.org/* | |
// @grant none | |
// ==/UserScript== |
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 | |
r = requests.get('http://localhost:4040/api/tunnels') | |
datajson = r.json() | |
msg = "" | |
for i in datajson['tunnels']: | |
msg = msg + i['public_url'] + '\n' | |
print(msg) |