I hereby claim:
- I am bcachet on github.
- I am bcachet (https://keybase.io/bcachet) on keybase.
- I have a public key ASDPUpFyYKrP5isTfO0tpoTQoxeRxPm9R0AHt_kIe638Ywo
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| def convert_base(value, base_k, base_n): | |
| """ | |
| Convert value from base K to base N | |
| >>> convert_base('5', BASE10, BASE2) | |
| 101 | |
| >>> convert_base('10', BASE10, BASE2) | |
| 1010 | |
| >>> convert_base('33', BASE4, BASE8) |
| #!/usr/bin/env ruby | |
| # | |
| # splitpatch is a simple script to split a patch up into multiple patch files. | |
| # if the --hunks option is provided on the command line, each hunk gets its | |
| # own patchfile. | |
| # | |
| # Copyright (C) 2007, Peter Hutterer <[email protected]> | |
| # | |
| # 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 |
| #include "stdafx.h" | |
| #include <atlstr.h> | |
| #include <dshow.h> | |
| //#include <afxwin.h> | |
| #include <string> | |
| using namespace std; | |
| #define CHECK(err)\ |
| public static readonly Parser<char> Dot = CharP('.'); | |
| public static Parser<char> Sign = Sat(c => "+-".Contains(c)); | |
| public static Parser<char> Exponent = Sat(c => "Ee".Contains(c)); | |
| public static Parser<double> RealNumber() { | |
| return | |
| from integer in Natural | |
| from fractional in (from dot in Dot | |
| from digit in Natural |
| // Windows version | |
| #include <string> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <locale> | |
| #include <codecvt> | |
| #include <Windows.h> | |
| std::wstring decode(const std::string &str, int codePage = GetACP()) | |
| { |
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Windows.Forms; | |
| static class VariableHeightItems | |
| { | |
| [DllImport("user32")] | |
| static extern IntPtr SendMessage(IntPtr hwnd, uint msg, IntPtr wp, IntPtr lp); | |
| [StructLayout(LayoutKind.Sequential)] |
| namespace Graph | |
| // Implementation based on https://gist.github.com/alandipert/1263783 | |
| module Map = | |
| let keys map = | |
| map |> Map.toSeq |> Seq.map fst |> Set.ofSeq | |
| let values map = | |
| map |> Map.toSeq |> Seq.map snd |> Set.ofSeq |
I hereby claim:
To claim this, I am signing this object:
| #load "Tree.fs" | |
| open Tree | |
| open System | |
| open System.IO | |
| type FileSystemTree = Tree<IO.FileInfo,IO.DirectoryInfo> | |
| let fromFile (fileInfo:FileInfo) = | |
| LeafNode fileInfo |
| namespace Units | |
| type MeasureType = | |
| | BaseUnit of string | |
| | Multiple of Measure * ValueType | |
| with | |
| member this.BaseUnitName = | |
| let rec traverse = function | |
| | BaseUnit s -> s | |
| | Multiple(Measure(_,m),_) -> traverse m |