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
import argparse | |
import json | |
import os.path | |
import subprocess | |
import sys | |
CONFIG_FILE_NAME = ".raprc" | |
APPCMD_PATH = "c:/windows/system32/inetsrv/appcmd.exe" |
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
open System | |
open System.IO | |
let getPathItems = | |
let path = Environment.GetEnvironmentVariable "PATH" in | |
path.Split Path.PathSeparator | |
[<EntryPoint>] | |
let main argv = | |
Array.iter (printfn "%s") getPathItems |
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
import System.Environment | |
import System.FilePath | |
wordsWhen :: (Char -> Bool) -> String -> [String] | |
wordsWhen p s = case dropWhile p s of | |
"" -> [] | |
s' -> w : wordsWhen p s'' | |
where (w, s'') = break p s' | |
main :: IO () |
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
module Main where | |
import System.Directory | |
import System.Environment | |
import System.Info | |
firstJust :: [Maybe a] -> Maybe a | |
firstJust [] = Nothing | |
firstJust (x:xs) = case x of | |
Nothing -> firstJust xs |
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
#lang racket | |
(require racket/match) | |
(define (eval exp env) | |
(match exp | |
[`(,f ,e) (apply (eval f env) (eval e env))] | |
[`(λ ,v . ,e) `(closure ,exp ,env)] | |
[(? symbol?) (cadr (assq exp env))])) |
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
(defn factorial [n] | |
(if (= n 0) | |
1 | |
(* n (factorial (- n 1))))) |
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
var prefixes = [ | |
{ | |
prefix: "", | |
name: "" | |
}, | |
{ | |
prefix: "Ki", | |
name: "kibi" | |
}, | |
{ |
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
var prefixes = [ | |
{ | |
prefix: "", | |
name: "" | |
}, | |
{ | |
prefix: "Ki", | |
name: "kibi" | |
}, | |
{ |
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
namespace Ncoa.Matching.UI | |
{ | |
using System.Collections.Generic; | |
using System.Linq; | |
using StorageAccess; | |
public abstract class FakeQueryStorage<T> : IQueryStorage | |
{ | |
protected IEnumerable<T> items; |
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 logistic_map(x0, r, n): | |
if n == 0: | |
return x0 | |
x_prev = logistic_map(x0, r, n - 1) | |
return r * x_prev * (1 - x_prev) |
OlderNewer