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
''' | |
Unpacker for game archive of London Racer: World Challenge | |
Expects to run in the folder which contains files WR.idx and WR.img, creates | |
folder unpacked with the unpacked game resources. | |
See https://bunyk.github.io/posts/reverse_engineering_game_archive to know how this was made. | |
''' | |
import os | |
import struct |
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" | |
"image" | |
"image/jpeg" | |
"log" | |
"math" | |
"math/rand" | |
"os" |
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
def пісня(): | |
def куплет(день, заняття): | |
print(f''' | |
Ти казала у {день} | |
{заняття}, | |
Я прийшов, тебе нема, | |
Підманула-підвела.''' | |
) | |
def приспів(): |
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
trans_table = { | |
'A': ('A', 0), 'a': ('a', 0), | |
'Ą': ('A', 1), 'ą': ('a', 1), | |
'C': ('C', 0), 'c': ('c', 0), | |
'Ć': ('C', 1), 'ć': ('c', 1), | |
'E': ('E', 0), 'e': ('e', 0), | |
'Ę': ('E', 1), 'ę': ('e', 1), | |
'L': ('L', 0), 'l': ('l', 0), | |
'Ł': ('L', 1), 'ł': ('l', 1), | |
'N': ('N', 0), 'n': ('n', 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
import pyglet | |
WINDOW_WIDTH = 800 | |
WINDOW_HEIGHT = 600 | |
window = pyglet.window.Window( | |
width=WINDOW_WIDTH, height=WINDOW_HEIGHT, caption="Pong!" | |
) | |
class Paddle: |
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
"""Widget to check office time without opening page. | |
https://askubuntu.com/questions/751608/how-can-i-write-a-dynamically-updated-panel-app-indicator | |
http://candidtim.github.io/appindicator/2014/09/13/ubuntu-appindicator-step-by-step.html | |
https://python-gtk-3-tutorial.readthedocs.io/en/latest/introduction.html | |
""" | |
from datetime import timedelta | |
import os | |
from time import sleep |
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 ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"fmt" | |
"log" | |
) |
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" | |
"log" | |
"os" | |
) | |
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 | |
import json | |
for line in sys.stdin: | |
try: | |
entry = json.loads(line) | |
print('\033[0;37m', entry['time'], entry['level'], '\033[0m', entry['msg']) | |
except ValueError: | |
print('\033[0;31m!', line, '\033[0m') |
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" | |
"time" | |
) | |
func sleepSort(array []int) []int { | |
rc := make(chan int) |
NewerOlder