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
############################################################# | |
# # | |
# Generic Makefile for C++ projects # | |
# Author: Gabriel <software@kanedo.net> # | |
# Date: 2014-04-18 # | |
# Version: 1.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
def triangle_filter(self, n): | |
f = np.zeros((1+2*n)) | |
for i in range(n): | |
f[i] = i+1 | |
f[-i-1] = i+1 | |
f[n] = n + 1 | |
return f / np.sum(f) | |
filter = triangle_filter(smoothing_factor) | |
tmp = np.pad(data, smoothing, mode='edge') |
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
#!/usr/bin/swift -suppress-warnings | |
// based on https://chrisbrandow.svbtle.com/csv-to-multimarkdown-tables | |
import Foundation | |
let separators: [Character: String] = ["=": ":---:", ">": "----:", "<": ":----"] | |
let separatorSet = CharacterSet(charactersIn: "><=, ") | |
func csv(data: String) -> [[String]] { | |
var result: [[String]] = [] | |
let rows = data.components(separatedBy: "\n") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Symbol List</string> | |
<key>scope</key> | |
<string>meta.function.headline.latex</string> | |
<key>settings</key> | |
<dict> |
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
#!/usr/bin/python | |
# CLI program to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys. | |
# Easiest used in combination with a launcher/trigger software such as Quicksilver. | |
# Main part taken from http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac | |
# Glue to make it into cli program by Fredrik Wallner http://www.wallner.nu/fredrik/ | |
import Quartz | |
import sys |
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
fermat :: (Integral i, Show i) => i -> Bool | |
fermat 1 = True -- Fermat's litte theorem only works for | |
fermat 2 = True -- numbers greater then 2 | |
fermat x = not (null [x | y<-[2.. pred x], (y^(x-1) `mod` x) == 1]) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/* | |
Plugin Name: Language Descriptor for admin Bar | |
Plugin URI: http://kanedo.net | |
Description: Add language descriptor to wordpress adminbar | |
Version: 1.0 |
NewerOlder