Skip to content

Instantly share code, notes, and snippets.

View dbuksbaum's full-sized avatar

David Buksbaum dbuksbaum

View GitHub Profile
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
@notflan
notflan / xoroshiro128+.cs
Last active March 25, 2022 02:26
C# implementation of David Blackman and Sebastiano Vigna's xoroshiro128+ PRNG algorithm.
/* Written in 2016-2018 by David Blackman and Sebastiano Vigna (vigna@acm.org)
* To the extent possible under law, the author has dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
* See <http://creativecommons.org/publicdomain/zero/1.0/>. */
using System;
using System.Runtime.InteropServices;
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 9, 2024 15:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zpbappi
zpbappi / Program.cs
Created August 28, 2016 10:23
Comparison of XorShift128+, XorShiRo128+ and existing .NET Random class
using System;
using System.IO;
namespace RandomTest
{
class Program
{
private static readonly string BasePath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "random-files");
@ctaggart
ctaggart / EdgeJs.FSharp.fs
Last active August 29, 2015 14:02
edge.js
[<AutoOpen>]
module EdgeJs.FSharp
open System
open System.Threading.Tasks
type Async with
static member Box (r:Async<'TResult>) =
async {
let! o = r
@23maverick23
23maverick23 / font_awesome.rb
Last active January 30, 2022 11:38
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
module Jekyll
class LessConverter < Converter
safe true
priority :high
def setup
return if @setup
require 'less'
@setup = true
rescue LoadError
@plaurin
plaurin / DocumentStoreRepositoryUsage.cs
Last active December 15, 2015 12:28
Document store implementation usages
public class Project
{
public Guid Owner { get; set; }
public Guid Id { get; set; }
public string Name { get; set; }
public DateTime StartDate { get; set; }
public int Status { get; set; }
public List<Task> Tasks { get; set; }
}
@plaurin
plaurin / DocumentStoreRepository.cs
Last active December 15, 2015 12:28
Document store implementation for Windows Azure Table Storage service using the ElasticTableEntity class
public class ProjectRepository
{
private CloudTable table;
public ProjectRepository()
{
var connectionString = "...";
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
var client = storageAccount.CreateCloudTableClient();
@bradwilson
bradwilson / InlineTask.targets.xml
Created March 11, 2012 00:41
Inline MSBuild task to download NuGet.exe
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Using Namespace="System" />
<Using Namespace="System.IO" />