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
library(Rcpp) | |
#' Floyd-Steinberg dithering | |
#' | |
#' @description Rcpp C++ function for Floyd-Steinberg dithering | |
#' More info: https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering | |
#' Note, this is a C++ translation of the FloydConvolution function by Todos Logos | |
#' from https://www.r-bloggers.com/r-is-a-cool-image-editor-2-dithering-algorithms/ | |
#' | |
#' @param x Greyscaled 2D image matrix |
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 Dogg | |
let name: String | |
var _did_you_hear: Bool | |
var _prefix_yos: U64 | |
new ref create(name': String, |
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
trait T1 | |
trait T2 | |
interface I3 | |
interface I4 | |
type UnionTraits is (T1 | T2) | |
type UnionInterfaces is (I3 | I4) | |
type IntersectTraits is (T1 & T2) | |
type IntersectInterfaces is (I3 & I4) |
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
# Install chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads | |
import os | |
from optparse import OptionParser | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
CHROME_PATH = '/usr/bin/google-chrome' |
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
# Following class and decorator totally jacked from Jacob Zimmerman, with a few tweaks/renames | |
# https://programmingideaswithjake.wordpress.com/2015/05/23/python-decorator-for-simplifying-delegate-pattern/ | |
# (I couldn't get the default copying of the entire baseclass dict to work, because that delegates __new__, | |
# which chokes on the non-subclass subclass. So just remove it for now) | |
# What this does: allows you to "subclass" an arbitrary baseclass by delegating certain methods/fields on | |
# your 'subclass' to the delegate-attribute without boilerplate for each individual method/field | |
# Equally valid interpretation of the same semantics: "subclass" a baseclass, but allows you to exclude | |
# certain methods from being used on the "subclass". | |
# Possible use cases include: making a read-only/immutable "subclass" of the builtin/superspeed dict |
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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
# | |
# asscat.py | |
# | |
# Generate a properly scaled 1x/2x/3x set of PNGs, optionally with | |
# generated JSON metadata and/or subfolders, for each single given image. | |
# For use with, like, all those Xcode asset catalogs and shit. | |
# Requires the Pillow and docopt modules; optionally makes use of six. | |
# |
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
"""Semantic Versioning CLI (0.1.0) | |
Usage: | |
semvercli.py compare <a> <b> | |
semvercli.py bump_major <a> | |
semvercli.py bump_minor <a> | |
semvercli.py bump_patch <a> | |
semvercli.py (-h | --help) | |
semvercli.py --version |
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
#!/bin/bash | |
# The MIT License (MIT) | |
# Copyright (c) 2013 Alvin Abad | |
if [ $# -eq 0 ]; then | |
echo "Git wrapper script that can specify an ssh-key file | |
Usage: | |
git.sh -i ssh-key-file git-command | |
" |
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 <bits/stdc++.h> | |
using namespace std ; | |
/* When Panda is Life ! | |
_,add8ba, | |
,d888888888b, | |
d8888888888888b _,ad8ba,_ | |
d888888888888888) ,d888888888b, | |
I8888888888888888 _________ ,8888888888888b | |
__________`Y88888888888888P"""""""""""baaa,__ ,888888888888888, |
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 | |
fontName = "Menlo" | |
fontSize = 14 | |
lineEndings = '\n' | |
showInvisibles = false | |
softWrap = true | |
tabSize = 2 | |
fileBrowserGlob = "{*,.tm_properties,.htaccess,.gitignore,.jshintrc,.eslintrc,.babelrc}" | |
include = "{$include,.tm_properties,.htaccess,.gitignore,.jshintrc,.eslintrc,.babelrc}" |