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 turtle import Turtle, bgcolor, setup, delay, onkey, listen, ontimer, title | |
import random | |
CELL_SIZE = 25 | |
headTurtle = Turtle() | |
appleTurtle = Turtle() | |
textTurtle = Turtle() | |
setup(25 * 17 + 7, 25 * 17 + 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
import turtle | |
import random | |
GRID_HEIGHT = 40 | |
GRID_WIDTH = 10 | |
CELL_SIZE = 15 | |
EMPTY_COLOR = "gray" | |
FULL = [[False for _ in range(GRID_WIDTH)] for _ in range(GRID_HEIGHT)] |
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
export default class Queue { | |
constructor() { | |
// All fields should be private | |
this.waker = null | |
this.kill = false | |
this.items = [] | |
this.killed = this.attend() | |
} | |
async enqueue_and_wait(async_fn) { |
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
[Desktop Entry] | |
Name=HTTP URL handler | |
Comment=Open an HTTP/HTTPS URL with a particular browser | |
TryExec=http_url_handler.py | |
Exec=http_url_handler.py %u | |
X-MultipleArgs=false | |
Type=Application | |
Terminal=false | |
NoDisplay=true | |
MimeType=x-scheme-handler/http;x-scheme-handler/https |
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
[Desktop Entry] | |
Name=Minecraft | |
Comment=Minecraft - Java Edition | |
Exec=java -jar /home/timo/.minecraft/launcher.jar | |
Icon=minecraft | |
Terminal=false | |
Type=Application | |
Categories=Game |
This file has been truncated, but you can view the full file.
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 -eo pipefail | |
nix-shell --run hc-app-spec-test | |
building '/nix/store/sqll2fajnq18cjxcjnxf1bgyrjlspn4i-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv'... | |
/nix/store/zysdrla13l09k7xjya6kqgvz7rg8xza1-rust-std/lib/rustlib: | |
uninstall.sh: /nix/store/fmlyxb53asc095aqzzq692wwvnkqvka7-rust/lib/rustlib/uninstall.sh | |
rust-installer-version: /nix/store/fmlyxb53asc095aqzzq692wwvnkqvka7-rust/lib/rustlib/rust-installer-version | |
install.log: /nix/store/fmlyxb53asc095aqzzq692wwvnkqvka7-rust/lib/rustlib/install.log | |
components: /nix/store/fmlyxb53asc095aqzzq692wwvnkqvka7-rust/lib/rustlib/components | |
/nix/store/cz6hwlg8vn8jbll16fwagnfzwchpl3cw-rust-std/lib/rustlib/x86_64-unknown-linux-gnu/lib: |
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
/***************************************** | |
* credit to * | |
* http://www.solitaryroad.com/c308.html * | |
*****************************************/ | |
function Location(x, y) { | |
this.x = x; | |
this.y = y; | |
this.flip_h = function(max) { | |
return new Location(max - this.x, this.y); | |
}; |
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 [ -n "$(gofmt -s -l .)" ]; then | |
echo "\`gofmt -s -w .\` your code." | |
exit 1 | |
fi |
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
infilist=["I AM CRASH"] | |
message='Crashing... Please wait.' | |
def crash(): | |
global message | |
global infilist | |
templist = [] | |
for element in infilist: | |
templist.append(element) | |
infilist.append(templist) | |
print(message) |
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
print('\033[1;37m This is normal') | |
print("") | |
for attr in range(0,8): | |
for fg in range(30,38): | |
print('') | |
print('\033[1;37m default ',end="") | |
for bg in range(40,48): | |
print('\033['+ str(attr) +';'+ str(bg) +';'+ str(fg) +'m ' \ | |
+str(attr)+';'+str(fg)+';'+str(bg)+'\033[m ',end="") | |
print("") |
NewerOlder