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
(* Purely functional I/O in Ocaml via the Free monad. | |
* by Ricky Elrod <[email protected]>. | |
* | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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
module type SHOW = { | |
type t | |
let show: t => string | |
}; | |
type show_impl('a) = (module SHOW with type t = 'a) | |
module Show_int: SHOW with type t = int = { | |
type t = int; | |
let show = string_of_int |
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
const rules = [ | |
{ type: 'space', regex: /^\s/ }, | |
{ type: 'lParen', regex: /^\(/ }, | |
{ type: 'rParen', regex: /^\)/ }, | |
{ type: 'number', regex: /^[0-9\.]+/ }, | |
{ type: 'string', regex: /^".*?"/ }, | |
{ type: 'variable', regex: /^[^\s\(\)]+/ } // take from the beginning 1+ characters until you hit a ' ', '(', or ')' // TODO - support escaped double quote | |
]; | |
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
https://www.youtube.com/watch?v=iumlHzoVlJM | |
class Perceptron { | |
constructor (x_train, y_train, epochs=1000, learn_rate= 0.1) { | |
// used to generate percent accuracy | |
this.accuracy = 0 | |
this.samples = 0 | |
this.x_train = x_train |
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
Windows.10.and.Office.2016.gVLK | |
##################################################################### | |
# Install/Uninstall keys # | |
##################################################################### | |
1.) Uninstall the current product by entering the “uninstall product key” extension: | |
slmgr.vbs /upk | |
2.) Install the key that you obtained above for “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10” |
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
launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist | |
launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist |
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
import { bootstrap, Request, Response, MongooseFactory, Injectable } from './library' | |
@Injectable() | |
class UserModel { | |
private model | |
constructor(modelFactory: MongooseFactory) { | |
this.model = modelFactory.createModel('users', mongoose.Schema({ | |
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
interface MaybePattern<A, B> { | |
Just: (a: A) => B, | |
Nothing: () => B | |
} | |
class Maybe<A> { | |
static of<A>(a: A): Maybe<A> { | |
return a ? new Just(a) : new Nothing() |
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
// preserved from my comment in this issue: https://github.com/Microsoft/TypeScript/issues/165#issuecomment-259598080 | |
interface Type<T> { new(...args): T } | |
interface CaseResult<R> { | |
success: boolean; | |
result: R; | |
} | |
interface CaseFn<R> { (value: any): CaseResult<R> } |