Skip to content

Instantly share code, notes, and snippets.

View green-s's full-sized avatar

Sam Green green-s

View GitHub Profile
@green-s
green-s / denoise.py
Last active January 30, 2019 00:54
waifu2x-caffe denoiser script
import glob
import argparse
import subprocess
import shutil
import sys
from pathlib import Path
def parse_args():
parser = argparse.ArgumentParser(description="Denoise images with waifu2x.")
#![feature(test)]
extern crate test;
extern crate itertools;
use test::Bencher;
use itertools::Itertools;
fn strings_vec() -> Vec<String> {
vec![String::from("again"); 512]
@green-s
green-s / flatty_seamless.xml
Created March 27, 2016 00:28
Modified flatty blender theme.
<bpy>
<Theme>
<user_interface>
<ThemeUserInterface menu_shadow_fac="0.01"
menu_shadow_width="0"
icon_file=""
icon_alpha="1"
widget_emboss="#00000000"
axis_x="#dc0000"
axis_y="#00dc00"
@green-s
green-s / cstext.py
Last active August 29, 2015 14:23
Format a given text file as Source Engine aliases.
import sys
import argparse
ALIAS_DECLARATION = "alias {script_name} {script_name}0"
ALIAS_PREFIX = "alias {script_name}{line_number} \""
ALIAS_SUFFIX = "alias {script_name} {script_name}{next_line_number}"
def main(argv):
@green-s
green-s / nvidiafanspeed.py
Created July 2, 2013 03:54
Python script for controlling nvidia fan settings by curve. Grabbed from https://code.google.com/p/nvidia-fanspeed/
#!/usr/bin/env python
"""
Script to control the fan speed of an NVidia gpu using a custom fan speed/temperature curve.
Copyright (C) 2012 Luke Frisken
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.