This file contains hidden or 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 nbt, sys | |
if len(sys.argv) > 1: | |
f = open(sys.argv[1], 'rb') | |
else: | |
f = sys.stdin | |
n = nbt.nbt.NBTFile(fileobj = f) | |
pal = {v.value: v.name.partition('[')[0] for v in n['Palette'].values()} |
This file contains hidden or 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 <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <sys/stat.h> |
This file contains hidden or 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
execute pathogen#infect() | |
filetype indent plugin on | |
set cul nojs smc=50000 sts=4 ts=4 sw=4 nu hls is ai si ru sc mouse=a fo=cqnj flp=\\v^\\s*(-\|\\*\|\\d+[\\]:.)}\\t\ ])\\s* | |
set statusline=%f%m%r%h\ [%L]\ [%{&ff}]\ %y%=[%p%%]\ [%05l,%c-%v] | |
au ColorScheme * hi CursorLine cterm=none | |
au ColorScheme * hi CursorLineNr cterm=bold ctermfg=37 guifg=#00afaf | |
if exists("g:tridactyl_editor") | |
au ColorScheme * hi StatusLine ctermbg=20 ctermfg=7 | |
au ColorScheme * hi StatusLineNC ctermbg=4 ctermfg=0 | |
else |
This file contains hidden or 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
class NamedSingletonMeta(type): | |
def __new__(mcs, name, bases, dict): | |
tp = type.__new__(mcs, name, bases, dict) | |
if name != 'NamedSingletonBase': | |
tp._instances = {} | |
return tp | |
def __getitem__(self, i): | |
return self._instances[i] |
This file contains hidden or 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 mods.eln.misc | |
import java.time.Year | |
data class Vec3f(var x: Double, var y: Double, var z: Double) { | |
val ZERO = Vec3f(0.0, 0.0, 0.0) | |
val ONE = Vec3f(1.0, 1.0, 1.0) | |
val AXIS_X = Vec3f(1.0, 0.0, 0.0) | |
val AXIS_Y = Vec3f(0.0, 1.0, 0.0) | |
val AXIS_Z = Vec3f(0.0, 0.0, 1.0) |
This file contains hidden or 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 itertools | |
from minisat_model import * | |
class Intervalled(object): | |
def __init__(self, domain, *args): | |
self.domain = domain | |
self.full_name = ('_'.join(('{}',) * (len(args) + 1))).format(*args, id(self)) | |
self.interval = Interval(self.full_name, domain.t_start, domain.t_end) |
This file contains hidden or 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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title>Zalgo Text Generator by Tchouky - | |
To invoke the hive-mind representing chaos. | |
Invoking the feeling of chaos. | |
With out order. | |
The Nezperdian hive-mind of chaos. Zalgo. | |
He who Waits Behind The Wall. | |
ZALGO! |
This file contains hidden or 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
--[[ | |
Deathfix -- a simple Garry's Mod script for making real death ragdolls | |
(drop into <game root>/garrysmod/lua/autorun/server) | |
It's been too long for me to remember the original author, but I can safely | |
say that I've modified it quite a bit anyway. Notwithstanding the other author's | |
claim on this file, I hereby grant this file to the public domain. | |
]]-- | |
if SERVER then |
This file contains hidden or 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 | |
import pygame | |
import numpy as np | |
from OpenGL.GL import * | |
pygame.init() | |
dispinfo = pygame.display.Info() | |
disp = pygame.display.set_mode( |
This file contains hidden or 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 y_combin(f, *args): | |
return f(f, *args) | |
def make_line(recur, cur, rest, width): | |
return ( | |
(cur, rest) | |
if (not rest) or sum(map(len, cur)) + len(cur) + len(rest[0]) > width else | |
recur(recur, cur + (rest[0],), rest[1:], width) | |
) |