- base64_fixed_point.rb https://gist.github.com/epitron/4736881
- enum_weave.rb https://gist.github.com/epitron/a1807e9148d901e4cdd8
- webfile.rb https://gist.github.com/epitron/92bf23bfceaf07e5da66
- binding-addition.rb https://gist.github.com/epitron/6015603
- tweet-anagrams.rb https://gist.github.com/epitron/6479184
- epitest.rb https://gist.github.com/epitron/6628722
- rle.rb https://gist.github.com/epitron/7758166
- binary_rle.rb https://gist.github.com/epitron/897535
- proxy_controller.rb https://gist.github.com/epitron/7758166
- nokogiri_walk_tree.rb https://gist.github.com/epitron/10033479
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
# vim: set ft=python: | |
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645 | |
# source: https://github.com/mpv-player/mpv/issues/2149 | |
# source: https://github.com/mpv-player/mpv/issues/566 | |
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy | |
import vapoursynth | |
core = vapoursynth.get_core() |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
# -*- encoding: utf-8 -*- | |
# | |
# echo "gem 'ping', gist: '2f58ca4bbbb8c5720dc6'" >> gem.deps.rb | |
# gem install -g --no-lock | |
# | |
module Ping | |
VERSION = '0.1.0' | |
module_function |
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 <stdio.h> | |
//; def int(*args); end | |
//; def main(*args, &block); | |
//; Object.class_eval { define_method("foo", &block) }; foo; end | |
//; def argc; end | |
//; def char; 3; end | |
//; def argv; 3; end | |
int main(int argc, char ** argv) { |
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
width = 50; (1..width).each { |n| a = [" "] * width; dist = width/n.to_f; (1...n).each { |i| a[i*dist] = "/" }; puts "#{n.to_s.rjust(3)} #{a.join('')}" } |
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
defmodule FizzBuzz do | |
use GenServer | |
require Logger | |
def init(state) do | |
Logger.debug "Starting FizzBuzz Server ..." | |
{:ok, state} | |
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
@[Link("mruby")] | |
lib MRuby | |
type MRubyState = Void* | |
fun open = mrb_open : MRubyState | |
fun load_string = mrb_load_string(mrb : MRubyState, code : Pointer(UInt8)) | |
fun close = mrb_close(mrb : MRubyState) | |
end | |
CODE = <<-RUBY_CODE |
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
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |