_id
stringlengths
64
64
repository
stringlengths
6
84
name
stringlengths
4
110
content
stringlengths
0
248k
license
null
download_url
stringlengths
89
454
language
stringclasses
7 values
comments
stringlengths
0
74.6k
code
stringlengths
0
248k
e7d81b83486d8ea5a52b60e7f0cecd9132831a82f6fa79b27db98f647a511bfd
janestreet/async_ssl
opt.ml
open! Core open! Import type t = | No_sslv2 | No_sslv3 | No_tlsv1 | No_tlsv1_1 | No_tlsv1_2 | No_tlsv1_3 [@@deriving sexp, compare] let default = [ No_sslv2; No_sslv3; No_tlsv1; No_tlsv1_1 ]
null
https://raw.githubusercontent.com/janestreet/async_ssl/2cc103c0648f5eec8717cd6b09b48bfff21cf3e9/src/opt.ml
ocaml
open! Core open! Import type t = | No_sslv2 | No_sslv3 | No_tlsv1 | No_tlsv1_1 | No_tlsv1_2 | No_tlsv1_3 [@@deriving sexp, compare] let default = [ No_sslv2; No_sslv3; No_tlsv1; No_tlsv1_1 ]
6506e95da2c79794a6c8f54a89d3b6595f28372ec5e3ed34751d3ee09167b326
zenspider/schemers
exercise.2.66.scm
#lang racket/base (require "../lib/test.rkt") (require "../lib/myutils.scm") Exercise 2.66 : ;; Implement the `lookup' procedure for the case where the set of ;; records is structured as a binary tree, ordered by the numerical ;; values of the keys. (define entry car) (define left-branch cadr) (define right-branc...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.66.scm
scheme
Implement the `lookup' procedure for the case where the set of records is structured as a binary tree, ordered by the numerical values of the keys.
#lang racket/base (require "../lib/test.rkt") (require "../lib/myutils.scm") Exercise 2.66 : (define entry car) (define left-branch cadr) (define right-branch caddr) (define make-tree list) (define (lookup given-key tree) (if (null? tree) #f (let ((node (entry tree))) (let ((k (key node))) ...
b732c253b9d2dde052711b7d41e272d8d579f13568b8da45bb27a0d44638d36f
simonmar/parconc-examples
chan2.hs
import Control.Concurrent hiding (Chan, newChan, readChan, writeChan, dupChan) -- <<Stream type Stream a = MVar (Item a) data Item a = Item a (Stream a) -- >> < < data Chan a = Chan (MVar (Stream a)) (MVar (Stream a)) -- >> < < newChan newChan :: IO (Chan a) newChan = do hole <- newEmptyMVar rea...
null
https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/chan2.hs
haskell
<<Stream >> >> >> <<writeChan >> <<readChan >> <<dupChan >> <<unGetChan <3> >>
import Control.Concurrent hiding (Chan, newChan, readChan, writeChan, dupChan) type Stream a = MVar (Item a) data Item a = Item a (Stream a) < < data Chan a = Chan (MVar (Stream a)) (MVar (Stream a)) < < newChan newChan :: IO (Chan a) newChan = do hole <- newEmptyMVar readVar <- newMVar hole ...
918d32368282a0f24d70460c03bd668b95d87b94ce86c735bfa7f46c5c1f0a70
Lautaro-Garcia/cl-notify
signals.lisp
(in-package :cl-notify) (deftype callback-type () '(member :close :action)) (defvar *signal-handler* nil) (stmx:transactional (defclass signal-handler () ((close-callbacks :initform (make-hash-table) :reader close-callbacks :type hash-table) (action-callbacks :initform (make-hash-table) :reader action-c...
null
https://raw.githubusercontent.com/Lautaro-Garcia/cl-notify/75045f67e897706da4a22197494e7d422c4f9063/src/signals.lisp
lisp
(in-package :cl-notify) (deftype callback-type () '(member :close :action)) (defvar *signal-handler* nil) (stmx:transactional (defclass signal-handler () ((close-callbacks :initform (make-hash-table) :reader close-callbacks :type hash-table) (action-callbacks :initform (make-hash-table) :reader action-c...
60fdc84a6a63a982dd4a9f9d8f0da4e4486338d7d02fe9ea7db211425658aee1
haskell/cabal
cabal-fail-no-p.test.hs
import Test.Cabal.Prelude main = cabalTest $ do withPackageDb $ do withDirectory "p" $ setup_install [] withDirectory "q" $ do res <- fails $ cabal' "v2-build" [] assertOutputContains "unknown package: p" res
null
https://raw.githubusercontent.com/haskell/cabal/c976c0ad65b93431acbe6c85d302df7ee888c0a1/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-p.test.hs
haskell
import Test.Cabal.Prelude main = cabalTest $ do withPackageDb $ do withDirectory "p" $ setup_install [] withDirectory "q" $ do res <- fails $ cabal' "v2-build" [] assertOutputContains "unknown package: p" res
496953752bb241379689951ffce09f0526b5cec4980fe7e3da4f336a5947738c
owickstrom/twitter-kinesis-lab
handler.clj
(ns twitter-hashtags-visualizer.handler (:require [compojure.core :refer :all] [compojure.handler :as handler] [compojure.route :as route] [cheshire.core :as json] [hiccup.page :refer [html5 include-css include-js]] [environ.core :refer [env]] [c...
null
https://raw.githubusercontent.com/owickstrom/twitter-kinesis-lab/254111d100b11a1896f713c82d55f9e8e98f2e9e/web/src/twitter_hashtags_visualizer/handler.clj
clojure
(ns twitter-hashtags-visualizer.handler (:require [compojure.core :refer :all] [compojure.handler :as handler] [compojure.route :as route] [cheshire.core :as json] [hiccup.page :refer [html5 include-css include-js]] [environ.core :refer [env]] [c...
b217efd67d85d10855c281b9203e6e560407e44fa72611a5ec90bb701082cccf
darkleaf/router
guard_test.cljc
(ns darkleaf.router.guard-test (:require [clojure.test :refer [deftest testing is]] [darkleaf.router :as r] [darkleaf.router.test-helpers :refer [route-testing make-middleware]])) (deftest defaults (let [pages-controller (r/controller (index [req] ...
null
https://raw.githubusercontent.com/darkleaf/router/c9c32ef25c432d663be29950ac74ef3e4070b75d/test/darkleaf/router/guard_test.cljc
clojure
(ns darkleaf.router.guard-test (:require [clojure.test :refer [deftest testing is]] [darkleaf.router :as r] [darkleaf.router.test-helpers :refer [route-testing make-middleware]])) (deftest defaults (let [pages-controller (r/controller (index [req] ...
497e3104f85f2d0a9e9a5252c97f77dd6ce6bf22d8eb0d99a78c76926d100c63
msakai/toysolver
BoolExpr.hs
# OPTIONS_GHC -Wall -fno - warn - orphans # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Test.BoolExpr (boolExprTestGroup) where import Test.QuickCheck.Function import Test.Tasty import Test.Tasty.QuickCheck hiding ((.&&.), (.||.)) import Test.Tasty.TH import ToySolver.Data.BoolExpr -- -------...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/Test/BoolExpr.hs
haskell
--------------------------------------------------------------------- ---------------------------------------------------------------------- Test harness
# OPTIONS_GHC -Wall -fno - warn - orphans # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Test.BoolExpr (boolExprTestGroup) where import Test.QuickCheck.Function import Test.Tasty import Test.Tasty.QuickCheck hiding ((.&&.), (.||.)) import Test.Tasty.TH import ToySolver.Data.BoolExpr BoolExpr...
af9a6bbd826486948b56eec48d32f83e19bab3441e6f0c25b353e406d0bd65a8
ecraven/r7rs-benchmarks
Chibi-postlude.scm
(define (this-scheme-implementation-name) (string-append "chibi-" chibi-version))
null
https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Chibi-postlude.scm
scheme
(define (this-scheme-implementation-name) (string-append "chibi-" chibi-version))
20ed9af36dc0ca5f5283ef101d2813158b77cea10f4e807b973adb52be31713d
cucumber-attic/cucumber-jvm-clojure
cuke_steps.clj
(use 'clojure-cukes.core) (use 'clojure.test) (Given #"^I have (\d+) big \"([^\"]*)\" in my belly$" [n, thing] (reset! belly (repeat (read-string n) thing))) (When #"I eat (\d+) \"([^\"]*)\"" [n, thing] (eat (repeat (read-string n) thing))) (Then #"^I am \"([^\"]*)\"$" [mood-name] (assert (= (name...
null
https://raw.githubusercontent.com/cucumber-attic/cucumber-jvm-clojure/2197be7a0b2663bb595c8f22c5b4003cd6332d0e/examples/test/features/step_definitions/cuke_steps.clj
clojure
(use 'clojure-cukes.core) (use 'clojure.test) (Given #"^I have (\d+) big \"([^\"]*)\" in my belly$" [n, thing] (reset! belly (repeat (read-string n) thing))) (When #"I eat (\d+) \"([^\"]*)\"" [n, thing] (eat (repeat (read-string n) thing))) (Then #"^I am \"([^\"]*)\"$" [mood-name] (assert (= (name...
9ed1dcadfb34f62c70bf9364072ad4d47f7ec8f8995d82bacd2a605532e19f4a
spell-music/csound-expression
DubBass.hs
| Originally coded in Csound by -- -- / module Main where import Csound.Base wobbly :: Sig -> Sig -> Sig -> Sig wobbly spb coeff cps = a2 where a1 = mean [saw (cps * 1.005), sqr (cps * 0.495)] idivision = 1 / (coeff * spb) klfo = kr $ triSeq [1] idivision -- filter iba...
null
https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/examples/DubBass.hs
haskell
/ filter
| Originally coded in Csound by module Main where import Csound.Base wobbly :: Sig -> Sig -> Sig -> Sig wobbly spb coeff cps = a2 where a1 = mean [saw (cps * 1.005), sqr (cps * 0.495)] idivision = 1 / (coeff * spb) klfo = kr $ triSeq [1] idivision ibase = cps imod = i...
9eab5ed9cbcad6c228b16b0488ad83092c5fafa4d732ff3cb2bf484468e23082
dhammikamare/Learn-OCaml
trapezoid.ml
Task : The rule is a numerical method for calculating definite integrals . * Write a higher order function to calculate integral using this formula * ( Hint : you may use series_sum . ) * * Author : | -marasinghe * Write a higher order function to calculate integral using this formula * (Hint: yo...
null
https://raw.githubusercontent.com/dhammikamare/Learn-OCaml/2d4e3da38ee86cd7477964ffb8756a8483260322/lab08%20Higher%20Order%20Functions/trapezoid.ml
ocaml
Task : The rule is a numerical method for calculating definite integrals . * Write a higher order function to calculate integral using this formula * ( Hint : you may use series_sum . ) * * Author : | -marasinghe * Write a higher order function to calculate integral using this formula * (Hint: yo...
7394d4fdac72f59ae745af107bc5f973ea7b66e2c1b8da53c2e46acf33d81b53
madgen/vanillalog
AST.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE PatternSynonyms # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE DuplicateRecordFields # module Language.Vanillalog.AST ( Program , Statem...
null
https://raw.githubusercontent.com/madgen/vanillalog/07317814120e1a46a2abe3b65f2909a0e29fb066/src/Language/Vanillalog/AST.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # ----------------------------------------------------------------------------- Pretty printing related instances ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Compila...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE PatternSynonyms # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE DuplicateRecordFields # module Language.Vanillalog.AST ( Program , Statement , Sentence , Query , Clause , AG.Fact(....
8915d58e131833ef9fc3d792a6d7856dcf39a03443be5c0b383c29eeb02808d3
borodust/bodge-ui
style.lisp
(cl:in-package :bodge-ui) (defclass styled-group (behavior-element) ((style :initform nil)) (:default-initargs :delegate (make-instance 'vertical-layout))) (defmethod initialize-instance :after ((this styled-group) &rest args &key &allow-other-keys) (with-slots (style) t...
null
https://raw.githubusercontent.com/borodust/bodge-ui/94fb37de3dcfe18f97945a29c70f451ebfb6966b/src/elements/style.lisp
lisp
(cl:in-package :bodge-ui) (defclass styled-group (behavior-element) ((style :initform nil)) (:default-initargs :delegate (make-instance 'vertical-layout))) (defmethod initialize-instance :after ((this styled-group) &rest args &key &allow-other-keys) (with-slots (style) t...
4c801ff5374525263c8d6b75fbc4a6b618be102b719955d1cbbcb47a03c57b11
folivetti/Category4Programmers
gametree.hs
# LANGUAGE TypeFamilies # module Main where Funcoes e Definicoes do problema 8 - puzzle Posso mover o quadrado vazio para qualquer direçao data Moves = LFT | RGT | UP | DOWN deriving (Show, Enum, Bounded) Estado contendo a coordenada da peça vazia -- e a matriz da permutação atual data State = S { zeroX :: In...
null
https://raw.githubusercontent.com/folivetti/Category4Programmers/b002b7eeeddf272ca94bd2467db535e0ad268176/RepresentableFunctors/gametree.hs
haskell
e a matriz da permutação atual e o tipo do estado :: (Rep Tree -> State) -> Tree State simplesmente percorre as ramificações seguindo os movimentos executados
# LANGUAGE TypeFamilies # module Main where Funcoes e Definicoes do problema 8 - puzzle Posso mover o quadrado vazio para qualquer direçao data Moves = LFT | RGT | UP | DOWN deriving (Show, Enum, Bounded) Estado contendo a coordenada da peça vazia data State = S { zeroX :: Int , zeroY :: Int ...
187a8f7290d667be801934989b8a4125921c7267b8decd7637f8030e11eabcdd
zwizwa/rai
synth-lib.rkt
#lang s-exp "stream.rkt" (require "stream-lib.rkt" "stream-meta.rkt") (provide (all-defined-out)) Audio Synth and Effect Tools . ;; Differentiated Parabolic Waveform md5 (define (saw-d1 i) (- (* 2 (phasor i 0 1)) 1)) ;; FIXME: when interpolating the amplitude, the divisions can go in a ;; `hold' form...
null
https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/synth-lib.rkt
racket
Differentiated Parabolic Waveform FIXME: when interpolating the amplitude, the divisions can go in a `hold' form, outside of the main loop. normalize Same, but cubic + twice diff normalize Envelope primitives. for rate parameter mapping. 0->1 start new cycle attack done, start decay 0->1 start new cycle a...
#lang s-exp "stream.rkt" (require "stream-lib.rkt" "stream-meta.rkt") (provide (all-defined-out)) Audio Synth and Effect Tools . md5 (define (saw-d1 i) (- (* 2 (phasor i 0 1)) 1)) (define (saw-d2 i) (let* ((x (saw-d1 i)) (d (diff (* x x))) n)) (define (saw-d3 i) (let* ((x (saw-d1...
e2e18c486ffe1b1d0e59d2107b587ed1f4f567044baf4fc13b7828b75c1ace81
roman01la/clojurescript-workshop
db.cljs
(ns calculator.db) (def initial-state {:value "0" :next-value nil :operation nil})
null
https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/16.re-frame/calculator/src/calculator/db.cljs
clojure
(ns calculator.db) (def initial-state {:value "0" :next-value nil :operation nil})
b8789e52e3d25b23e8e3b746a413cd094fb935874af698ae48d373fe41ba6b27
savonarola/ulid
ulid.erl
-module(ulid). -define(CHARS, <<"0123456789ABCDEFGHJKMNPQRSTVWXYZ">>). -define(CHAR_LENGTH, 32). -define(TIME_LENGTH, 10). -define(RANDOM_BYTES, 10). %% API exports -export([ new/0, generate/0, generate/1, generate_list/0, generate_list/1 ]). %%==============================================================...
null
https://raw.githubusercontent.com/savonarola/ulid/0b5e674ea97b85773e68e1afc99ddf5b4a3f9c3c/src/ulid.erl
erlang
API exports ==================================================================== API functions ==================================================================== ==================================================================== ====================================================================
-module(ulid). -define(CHARS, <<"0123456789ABCDEFGHJKMNPQRSTVWXYZ">>). -define(CHAR_LENGTH, 32). -define(TIME_LENGTH, 10). -define(RANDOM_BYTES, 10). -export([ new/0, generate/0, generate/1, generate_list/0, generate_list/1 ]). -type ulid_generator() :: {non_neg_integer(), [byte()]}. -spec new() -> ulid_...
2c973f1ee662bef345a1f0529312abb051aaa4fc08d23baec16ab394ac6a7faf
lem-project/lem
buffer-insert.lisp
(in-package :lem-base) (defvar *inhibit-read-only* nil "Tなら`buffer`のread-onlyを無効にします。") (defvar *inhibit-modification-hooks* nil "Tなら`before-change-functions`と`after-change-functions`が実行されません。") (define-editor-variable before-change-functions '()) (define-editor-variable after-change-functions '()) (defun step-...
null
https://raw.githubusercontent.com/lem-project/lem/3b9b92690b48710135a946b1d3754f64d2bfdaf1/src/base/buffer-insert.lisp
lisp
(in-package :lem-base) (defvar *inhibit-read-only* nil "Tなら`buffer`のread-onlyを無効にします。") (defvar *inhibit-modification-hooks* nil "Tなら`before-change-functions`と`after-change-functions`が実行されません。") (define-editor-variable before-change-functions '()) (define-editor-variable after-change-functions '()) (defun step-...
530798824ba7965f75513c28abd54db1f24f33ca53c10f95e1c3f46802aaedeb
marick/fp-oo
class-1.clj
Exercise 1 (def method-from-message (fn [message class] (message (:__instance_methods__ class)))) (def class-from-instance (fn [instance] (eval (:__class_symbol__ instance)))) (def apply-message-to (fn [class instance message args] (apply (method-from-message message class) ...
null
https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/class-1.clj
clojure
For example:
Exercise 1 (def method-from-message (fn [message class] (message (:__instance_methods__ class)))) (def class-from-instance (fn [instance] (eval (:__class_symbol__ instance)))) (def apply-message-to (fn [class instance message args] (apply (method-from-message message class) ...
0f0f20d094db4f2fc4b8dd8ebe984e6993e2cc56fb834cef2c521d2472d366fb
ivanjovanovic/sicp
4.4.scm
; one of the concepts involved in logic programming is the concept of database . Here is one example of it (address (Bitdiddle Ben) (Slumerville (Ridge Road) 10)) (job (Bitdiddle Ben) (computer wizard)) (salary (Bitdiddle Ben) 60000) (address (Hacker Alyssa P) (Cambridge (Mass Ave) 78)) (job (Hacker Alyssa P) (comp...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/4.4/4.4.scm
scheme
one of the concepts involved in logic programming is the concept of other concept is a query language, which allows to do simple queries to the database, like this one Query input: The system will respond with the following items: Query results:
database . Here is one example of it (address (Bitdiddle Ben) (Slumerville (Ridge Road) 10)) (job (Bitdiddle Ben) (computer wizard)) (salary (Bitdiddle Ben) 60000) (address (Hacker Alyssa P) (Cambridge (Mass Ave) 78)) (job (Hacker Alyssa P) (computer programmer)) (salary (Hacker Alyssa P) 40000) (supervisor (Hacker...
c441c86e44939d64374b601b0f5932b0beef8502fcc45d96ff5614f73408f366
ilyasergey/monadic-cfa
AbstractShared.hs
module CFA.CPS.Examples where import Data.Map as Map import Data.Set as Set import Data.List as List import Control.Monad.State import Control.Monad.Reader import Control.Monad.Identity import CFA.CPS import CFA.CFAMonads import CFA.Lattice import CFA.Store import CFA.CPS.Analysis import CFA.Runner import CFA.CPS.Ana...
null
https://raw.githubusercontent.com/ilyasergey/monadic-cfa/caeb9e5375affe9c3cdee0753ae2ba489cdc328a/CFA/CPS/Examples/AbstractShared.hs
haskell
-------------------------------------------------------------------- abstract interpreter with a shared store -------------------------------------------------------------------- -------------------------------------------------------------------- example program ------------------------------------------------------...
module CFA.CPS.Examples where import Data.Map as Map import Data.Set as Set import Data.List as List import Control.Monad.State import Control.Monad.Reader import Control.Monad.Identity import CFA.CPS import CFA.CFAMonads import CFA.Lattice import CFA.Store import CFA.CPS.Analysis import CFA.Runner import CFA.CPS.Ana...
c17aafd13c009fe088d5bbc83fc26bf327dcbf1dd7ffcdb9bbc2bcf02ca0447e
MarcusPlieninger/HtDP_2e_solutions
HtDP_2e_Exercise_051.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_051) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeat...
null
https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_051.rkt
racket
about the language level of this file in a form that our tools can easily process. The program renders the state of a traffic light as a solid circle of the appropriate color, and it changes state on every clock tick. What is the most appropriate initial state? Ask your engineering friends. From my own thinking on...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_051) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Exercise 51 . Design a big - bang program that si...
5e78ee2caa8c3f449f08a76aa6d5cb36a391bc810f2c056dfdb61497f5e61b7c
bigmlcom/sketchy
bloom.clj
Copyright 2013 , 2014 BigML Licensed under the Apache License , Version 2.0 ;; -2.0 (ns bigml.sketchy.test.bloom (:require [clojure.test :refer :all] (bigml.sketchy [bloom :as bloom]))) (deftest bloom (let [d1 (range 10000) d2 (range 5000 15000) d3 (range 20000) b1 (reduce ...
null
https://raw.githubusercontent.com/bigmlcom/sketchy/f06c6f29035f19bbbdaf86c582fed2722032d283/test/bigml/sketchy/test/bloom.clj
clojure
-2.0 Never any false negatives
Copyright 2013 , 2014 BigML Licensed under the Apache License , Version 2.0 (ns bigml.sketchy.test.bloom (:require [clojure.test :refer :all] (bigml.sketchy [bloom :as bloom]))) (deftest bloom (let [d1 (range 10000) d2 (range 5000 15000) d3 (range 20000) b1 (reduce bloom/in...
97812397a069fbfb8e1710b8bac9bc5c485292ed866858dd8df6f2f52a7da8b4
everpeace/programming-erlang-code
lib_primes.erl
-module(lib_primes). -export([make_prime/1, is_prime/1, make_random_int/1]). %% Make a prime with at least K decimal digits. Here we use ' 's postulate . 's postulate is that for every N > 3 , there is a prime P satisfying N < P < 2N - 2 . This was proved by Tchebychef in 1850 . ( improved this proof in 1...
null
https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/lib_primes.erl
erlang
Make a prime with at least K decimal digits. Here N is a prime and if A < N then A^N mod N = A A is a random number less than N make_random_int(N) -> a random integer with N digits. END:make_ran_int
-module(lib_primes). -export([make_prime/1, is_prime/1, make_random_int/1]). we use ' 's postulate . 's postulate is that for every N > 3 , there is a prime P satisfying N < P < 2N - 2 . This was proved by Tchebychef in 1850 . ( improved this proof in 1932 ) make_prime(1) -> lists:nth(random:uniform(...
7ddc05e7a98727ba0ceae6efab90db52fbe769209a96c258ed187bced0974136
ChrisPenner/proton
Iso.hs
# LANGUAGE DeriveFunctor # module Proton.Iso where import Data.Profunctor import Proton.Getter import Proton.Review type Iso s t a b = forall p. Profunctor p => p a b -> p s t type Iso' s a = Iso s s a a iso :: (s -> a) -> (b -> t) -> Iso s t a b iso = dimap from :: Iso s t a b -> Iso b a t s from i = withIso i $ f...
null
https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Proton/Iso.hs
haskell
# LANGUAGE DeriveFunctor # module Proton.Iso where import Data.Profunctor import Proton.Getter import Proton.Review type Iso s t a b = forall p. Profunctor p => p a b -> p s t type Iso' s a = Iso s s a a iso :: (s -> a) -> (b -> t) -> Iso s t a b iso = dimap from :: Iso s t a b -> Iso b a t s from i = withIso i $ f...
5334a23fe7f784d6f859ff67c088a4f87002c536a7550945ab2de9546c3599b6
haroldcarr/learn-haskell-coq-ml-etc
Ch17.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveFunctor #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes ...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/category-theory/alejandro-serrano-bom/src/Ch17.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveFunctor # # LANGUAGE PolyKinds # # LANGUAGE RankNTypes # # LANGUAGE TypeInType # # LANGUAGE TypeOperators # # LANGUAGE TypeSynonymInstances # ----------------------------------------...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module Ch17 where import Test.HUnit (Counts, Test (TestList), runTestTT) import qualified Test.HUnit.Util as U (t,tt) import Contr...
cb3f6afb6d79589c553a6a4e1ac53cb242018bcf7e0fb61fc7afc931e18a5b0c
zotonic/zotonic
mod_seo_sitemap.erl
@author < > 2009 - 2022 %% @doc Generates a sitemap. For now rather crude version that will only work with smaller sites. Copyright 2009 - 2022 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain...
null
https://raw.githubusercontent.com/zotonic/zotonic/ab42ea8965b58732df3a591049ad1be87a264f22/apps/zotonic_mod_seo_sitemap/src/mod_seo_sitemap.erl
erlang
@doc Generates a sitemap. For now rather crude version that will only work with smaller sites. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS ...
@author < > 2009 - 2022 Copyright 2009 - 2022 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_seo_sitemap). -author("Marc Worrell <>"). -mod_title("SEO Sitemap"). -mod_description("Generates sitem...
0de967347dcb123427da2b40e5d8ff1f5376c930143f339cb7cd96f321c8ffbd
msakai/toysolver
TestPolynomial.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # import Prelude hiding (lex) import qualified Control.Exception as E import Control.Monad import qualified Data.FiniteField as FF import Data.List import Data.Ratio import qualified Data.Set as Set import ...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/TestPolynomial.hs
haskell
----------------------------------------------------------------- ----------------------------------------------------------------- ------------------------------------------------------------------} ------------------------------------------------------------------- Univalent polynomials ---------------------------...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # import Prelude hiding (lex) import qualified Control.Exception as E import Control.Monad import qualified Data.FiniteField as FF import Data.List import Data.Ratio import qualified Data.Set as Set import ...
903488adb4c20f08f30bd5fb7d3be88d3948790bcfcd312c2e1550210f0b5f0a
caradoc-org/caradoc
TestDirectObject.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/test/TestDirectObject.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
f27ca2f901385a3903bab8fdbb325616eba4b701ff28c4f431ec9870d87749b8
ku-fpg/kansas-lava-cores
Main.hs
# LANGUAGE ScopedTypeVariables # module Main (main) where import Language.KansasLava import Language.KansasLava.Test import Data.Default import Rate as Rate import FIFO as FIFO import RS232 as RS232 import Chunker as Chunker import LCD as LCD main :: IO () main = do let opt = def { verboseOpt = 4 -- 4 == sh...
null
https://raw.githubusercontent.com/ku-fpg/kansas-lava-cores/028439463b491e691fa4fdcd5e068fdfa2987890/tests/Main.hs
haskell
4 == show cases that failed
# LANGUAGE ScopedTypeVariables # module Main (main) where import Language.KansasLava import Language.KansasLava.Test import Data.Default import Rate as Rate import FIFO as FIFO import RS232 as RS232 import Chunker as Chunker import LCD as LCD main :: IO () main = do } testDriver opt $ t...
e7f3d1ca4e98b13093461583c590bc5a4a46774d7f19c1c5b7ae42322593e032
nojb/tortuga
print.mli
The MIT License ( MIT ) Copyright ( c ) 2014 < > 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 ...
null
https://raw.githubusercontent.com/nojb/tortuga/ab5b7bdbc6a3f59dd13a7d4ac8c96063a543fb36/lib/print.mli
ocaml
The MIT License ( MIT ) Copyright ( c ) 2014 < > 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 ...
5665e76ac7336b2ba4ff1013f51387d790519df008762178c9c28a09d5bf2c4b
jkrukoff/llists
test_llists_utils.erl
%%%------------------------------------------------------------------- %%% @doc %%% Tests for src/llists_utils.erl %%% @end %%%------------------------------------------------------------------- -module(test_llists_utils). -include_lib("eunit/include/eunit.hrl"). %%%===================================================...
null
https://raw.githubusercontent.com/jkrukoff/llists/653eaf5d8706c434455ed380d00241275aff6ad1/test/test_llists_utils.erl
erlang
------------------------------------------------------------------- @doc Tests for src/llists_utils.erl @end ------------------------------------------------------------------- =================================================================== Tests =================================================================...
-module(test_llists_utils). -include_lib("eunit/include/eunit.hrl"). choice_test() -> ?assertEqual( [1, 1, 1], llists:to_list( llists:sublist( llists_utils:choice([1]), 3 ) ) ). combinations_2_test() -> ?assertEqual( ...
f84f33fc55ca7325d165849e5683e60349a28319bbef4be98ee960a3d91b9768
lantiga/redlock-clj
core_test.clj
(ns redlock-clj.core-test (:require [clojure.test :refer :all] [redlock-clj.core :refer :all])) (defn file-based-counter [{:keys [cluster file-name times-per-thread n-threads]}] (println "Create cluster with at least two of:") (println "> redis-server --port 6379") (println "> redis-server --port ...
null
https://raw.githubusercontent.com/lantiga/redlock-clj/97a1add654bd4330979c377f4ea636ce741e8807/test/redlock_clj/core_test.clj
clojure
(ns redlock-clj.core-test (:require [clojure.test :refer :all] [redlock-clj.core :refer :all])) (defn file-based-counter [{:keys [cluster file-name times-per-thread n-threads]}] (println "Create cluster with at least two of:") (println "> redis-server --port 6379") (println "> redis-server --port ...
3a426b448f3874b4822a596cea1528516a907d051600dbef13afcc251edb422a
kazu-yamamoto/mighttpd2
Option.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} module Program.Mighty.Dhall.Option where #ifdef DHALL import Dhall.TH Dhall.TH.makeHaskellTypes [ Single...
null
https://raw.githubusercontent.com/kazu-yamamoto/mighttpd2/893a5faa81726c5eea6c4e588edd04e7d9c107f5/Program/Mighty/Dhall/Option.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE TemplateHaskell # # LANGUAGE CPP #
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # module Program.Mighty.Dhall.Option where #ifdef DHALL import Dhall.TH Dhall.TH.makeHaskellTypes [ SingleConstructor "Option" "MakeOption" "./Program/Mighty/Dhall/Option.dhall" ] #endif
06101684195a58008a7853860de492b6b207f412b88d1a6597973c7be00358fe
roosta/herb
paper.cljs
(ns site.components.paper (:require [herb.core :refer [<class]] [garden.units :refer [rem em px]] [reagent.core :as r])) (defn box-shadow [elevation] {:box-shadow (case elevation 0 "none" 1 "0px 1px 3px 0px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 2px 1px -1...
null
https://raw.githubusercontent.com/roosta/herb/64afb133a7bf51d7171a3c5260584c09dbe4e504/site/src/site/components/paper.cljs
clojure
(ns site.components.paper (:require [herb.core :refer [<class]] [garden.units :refer [rem em px]] [reagent.core :as r])) (defn box-shadow [elevation] {:box-shadow (case elevation 0 "none" 1 "0px 1px 3px 0px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 2px 1px -1...
11b98dd6d398c086ddffccc7611ea93ca7f90c1ffc0f61c4cc87d67e25d15efc
chetmurthy/ensemble
arraye.ml
(**************************************************************) ARRAYE.ML : Non - floating point arrays Author : , 4/95 (**************************************************************) type 'a t = 'a array let not_float o = Util.tag o <> Obj.double_tag let create n item = assert (not_float item) ; Arr...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/util/arraye.ml
ocaml
************************************************************ ************************************************************ ************************************************************ These are hacked to fool the typechecker into knowing the * array is not a float array. *********************************************...
ARRAYE.ML : Non - floating point arrays Author : , 4/95 type 'a t = 'a array let not_float o = Util.tag o <> Obj.double_tag let create n item = assert (not_float item) ; Array.create n item let get a i = Obj.magic ((Obj.magic a : string array).(i)) let set a i x = (Obj.magic a : string array).(...
55c06a1f956dc033730864f2a16771b554e2876a6fb0658c99d0d8aa6ac44966
exercism/haskell
Tests.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import CollatzConjecture (collatz) main :: IO () main = hspecWith defaultConfig {confi...
null
https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/collatz-conjecture/test/Tests.hs
haskell
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import CollatzConjecture (collatz) main :: IO () main = hspecWith defaultConfig {confi...
1b663ce59d0c88c0971af2e62b4bdd4f1a851ff361a04fe68ab8b0a72bde678d
sig-gis/gridfire
fire_spread.clj
;; [[file:../../org/GridFire.org::fire-spread-algorithm][fire-spread-algorithm]] (ns gridfire.fire-spread (:require [clojure.core.matrix :as m] [clojure.core.reducers :as r] [gridfire.common :refer [burnable-fuel-model? ...
null
https://raw.githubusercontent.com/sig-gis/gridfire/44aeaf56fceb01f61b21db6220d2cb562a92570b/src/gridfire/fire_spread.clj
clojure
[[file:../../org/GridFire.org::fire-spread-algorithm][fire-spread-algorithm]] [equilibrium-spread-rate t0 t tau] (* equilibrium-spread-rate (- 1.0 (Math/exp (/ (- t0 t 0.2) tau))))) Note: Because of our use of adaptive timesteps, if the spread rate on N NE E S W NW mi/hr -> ft/min [{:cell :trajectory :...
(ns gridfire.fire-spread (:require [clojure.core.matrix :as m] [clojure.core.reducers :as r] [gridfire.common :refer [burnable-fuel-model? burnable? get-fuel-mo...
421a006b1c41bb293a78d638062d2affe7131bcf0e33a7b1b82b5925b2345147
backtracking/mlpost
alt_ergo.ml
open Mlpost open Num open Box open Color let fill = rgb8 253 215 117 let node s = round_rect ~stroke:None ~name:s (round_rect ~fill (tex ("\\sf " ^ s))) let hbox = hbox ~padding:(bp 20.) let vbox = vbox ~padding:(bp 20.) let alt_ergo = let b1 = vbox [ hbox [ node "SMT parser"; node "Why parser" ]; node "Ty...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/papers/jfla2009/alt_ergo.ml
ocaml
Local Variables: compile-command: "mlpost -latex slides.tex -xpdf alt_ergo.ml" End:
open Mlpost open Num open Box open Color let fill = rgb8 253 215 117 let node s = round_rect ~stroke:None ~name:s (round_rect ~fill (tex ("\\sf " ^ s))) let hbox = hbox ~padding:(bp 20.) let vbox = vbox ~padding:(bp 20.) let alt_ergo = let b1 = vbox [ hbox [ node "SMT parser"; node "Why parser" ]; node "Ty...
927b02b94b6cb1f526a83d0ad3118a96c1fe04ca177986ede48a98f4705fef9a
mitar/nxt
Data.hs
module Robotics.NXT.Data ( fromUByte, fromUWord, fromULong, fromSByte, fromSWord, fromSLong, dataToString, dataToString0, toUByte, toUWord, toULong, toSByte, toSWord, toSLong, stringToData, stringToData0, nameToData, messageToData ) where import qualified Data.ByteString.Lazy as B i...
null
https://raw.githubusercontent.com/mitar/nxt/5c811b03308f106e9dbf1055c8c92a860c533ca3/lib/Robotics/NXT/Data.hs
haskell
Converts a list of bytes to an unsigned numeric value Converts a null-terminated list of bytes to a string Converts a numeric value to list of bytes In a case of a negative number it produces an infinite list Converts a string to a null-terminated list of bytes Converts a name to a null-terminated list of bytes ...
module Robotics.NXT.Data ( fromUByte, fromUWord, fromULong, fromSByte, fromSWord, fromSLong, dataToString, dataToString0, toUByte, toUWord, toULong, toSByte, toSWord, toSLong, stringToData, stringToData0, nameToData, messageToData ) where import qualified Data.ByteString.Lazy as B i...
5e6e2bc58a74da1960e53bf4a50efc2c38c759fef06331e0837b736d4398e5bb
gregnwosu/haskellbook
Morra.hs
module Morra where import qualified Data.Map as M import Control.Monad.State.Lazy import Control.Monad.Trans.Either import Control.Monad import System.Random import qualified Data.List.Split as SP import Data.List import qualified Text.Trifecta as P data PlayerStats = PlayerStats {p1:: PlayerData, p2:: PlayerData} dat...
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter26/src/Morra.hs
haskell
module Morra where import qualified Data.Map as M import Control.Monad.State.Lazy import Control.Monad.Trans.Either import Control.Monad import System.Random import qualified Data.List.Split as SP import Data.List import qualified Text.Trifecta as P data PlayerStats = PlayerStats {p1:: PlayerData, p2:: PlayerData} dat...
b2fcd2db8cc906c479777959acab122febaf1ed786b6a921eb6cda2deb12f00a
bendyworks/api-server
ResourceSpec.hs
module Api.Mappers.ResourceSpec (main, spec) where import Control.Applicative ((<$>)) import Data.Maybe (fromJust, isJust) import qualified Api.Mappers.Resource as Resource import Api.Types.Fields import Api.Types.Resource import SpecHelper hiding (shouldBe, shouldSatisfy) import Test.Hspec main :: IO () main = hsp...
null
https://raw.githubusercontent.com/bendyworks/api-server/9dd6d7c2599bd1c5a7e898a417a7aeb319415dd2/test/Api/Mappers/ResourceSpec.hs
haskell
module Api.Mappers.ResourceSpec (main, spec) where import Control.Applicative ((<$>)) import Data.Maybe (fromJust, isJust) import qualified Api.Mappers.Resource as Resource import Api.Types.Fields import Api.Types.Resource import SpecHelper hiding (shouldBe, shouldSatisfy) import Test.Hspec main :: IO () main = hsp...
33155a53ef4d7a1449d3f7ab584961e09701bbdee13a07d3132349c337f74c31
ygmpkk/house
Device.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Timer.Device Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -----------------------------------------------------...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/Timer/Device.hs
haskell
#hide --------------------------------------------------------------------------- | Module : Timer.Device License : BSD-style Maintainer : Stability : provisional Portability : portable ---------------------------------------------------------------------------
Copyright : ( c ) 2002 module Graphics.UI.ObjectIO.Timer.Device(timerFunctions) where import Graphics.UI.ObjectIO.CommonDef import Graphics.UI.ObjectIO.Process.IOState import Graphics.UI.ObjectIO.Receiver.Handle import Graphics.UI.ObjectIO.StdTimerDef(NrOfIntervals) import Graphics.UI.ObjectIO.Timer.Access...
e1f3c0d9c3c62412845ad9376c7a1920a726bd30da6182f8ab5c4eb4517c15e6
ghcjs/ghcjs
Serialized.hs
# LANGUAGE ScopedTypeVariables , Rank2Types , # -- ( c ) The University of Glasgow 2002 - 2006 -- -- Serialized values module GHCJS.Prim.TH.Serialized ( Serialized , fromSerialized , toSerialized , serializeWithData ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/lib/ghcjs-th/GHCJS/Prim/TH/Serialized.hs
haskell
Serialized values | Represents a serialized value of a particular type. Attempts can be made to deserialize it at certain types | If the 'Serialized' value contains something of the given type, then use the specified deserializer to return @Just@ that. | Force the contents of the Serialized value so weknow it doe...
# LANGUAGE ScopedTypeVariables , Rank2Types , # ( c ) The University of Glasgow 2002 - 2006 module GHCJS.Prim.TH.Serialized ( Serialized , fromSerialized , toSerialized , serializeWithData ...
668a1811c34cc0888437f67aaaf2aadccb64298ccaa43f733091a5afbda5bbdf
lopec/LoPEC
test_app.erl
-module (test_app). -export ([start/2, stop/1, route/1, request/1]). -behavior(application). start(_, _) -> nitrogen:start(test). stop(_) -> nitrogen:stop(). %% route/1 lets you define new URL routes to your web pages, %% or completely create a new routing scheme. %% The 'Path' argument specifies the request pa...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/trunk/lib/master/src/test_app.erl
erlang
route/1 lets you define new URL routes to your web pages, or completely create a new routing scheme. The 'Path' argument specifies the request path. Your function should return either an atom which is the page module to run, or a tuple containing {Module, PathInfo}. PathInfo Uncomment the line below to direct r...
-module (test_app). -export ([start/2, stop/1, route/1, request/1]). -behavior(application). start(_, _) -> nitrogen:start(test). stop(_) -> nitrogen:stop(). can be accessed using wf : ( ) . from " /web / newroute " to the web_index module : from " /web / newroute " to the web_index module , with traili...
04a182f37200343a35010c7e1cf2ca3ac4ffcf706fb4759ac2c4ed957f18acb6
ghosthamlet/algorithm-data-structure
articulation_points.clj
(ns algorithm-data-structure.algorithms.graph.articulation-points "-algorithms/tree/master/src/algorithms/graph/articulation-points" (:require [algorithm-data-structure.data-structures.graph :as g] [algorithm-data-structure.data-structures.graph-vertex :as gv] [algorithm-data-structure.algor...
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/graph/articulation_points.clj
clojure
(ns algorithm-data-structure.algorithms.graph.articulation-points "-algorithms/tree/master/src/algorithms/graph/articulation-points" (:require [algorithm-data-structure.data-structures.graph :as g] [algorithm-data-structure.data-structures.graph-vertex :as gv] [algorithm-data-structure.algor...
cc2c2a2c9c0aa7484e769557a1a292a91524f03484810e4f6558ce7d6cf53351
morpheusgraphql/morpheus-graphql
Union.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveLift #-} # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # # LANGUAGE NoImplicitPrelude # module Data.Morpheus.Type...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/f9684d1451fd4ee3aabdb821424fd352003a3982/morpheus-graphql-core/src/Data/Morpheus/Types/Internal/AST/Union.hs
haskell
# LANGUAGE DeriveLift # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE TupleSections # # LANGUAGE NoImplicitPrelude # module Data.Morpheus.Types.Internal.AST.Union ( constraintInputUnion, mkUnionMember, mkNullaryMember, ...
71d5d30bb49987d48c0bd56d3b7cbbfefba4fe26ae0ffa72acbf787f4bbf7b22
typeclasses/stripe
Signature.hs
{- | #verify-manually -} module Stripe.Signature ( Sig (..), isSigValid, digest, signedPayload, natBytes, parseSig ) where -- base import qualified Data.List import qualified Data.Maybe import qualified Data.String import Numeric.Natural (Natural) import qualified Text.Read base16 - bytestring import...
null
https://raw.githubusercontent.com/typeclasses/stripe/01469035df5f920c86768e1556643da610b7ae23/stripe-signature/library/Stripe/Signature.hs
haskell
| #verify-manually base bytestring cryptohash-sha256 stripe-concepts text | Convert a natural number to the ASCII encoding of its decimal representation. | The relevant bits of data extracted from the Stripe signature header. | Parse the Stripe signature header, returning 'Nothing' if parsing fails.
module Stripe.Signature ( Sig (..), isSigValid, digest, signedPayload, natBytes, parseSig ) where import qualified Data.List import qualified Data.Maybe import qualified Data.String import Numeric.Natural (Natural) import qualified Text.Read base16 - bytestring import qualified Data.ByteString.Base16...
bed15060be531af98450324480e442d61d1310006652e4d537c372fbe8e503fe
reasonml-old/BetterErrors
warning_PatternUnused_1.ml
type greetings = | Hello | Goodbye let say a = match a with | Hello -> () | Goodbye -> () | _ -> ()
null
https://raw.githubusercontent.com/reasonml-old/BetterErrors/d439b92bfe377689c38fded5d8aa2b151133f25d/tests/warning_PatternUnused/warning_PatternUnused_1.ml
ocaml
type greetings = | Hello | Goodbye let say a = match a with | Hello -> () | Goodbye -> () | _ -> ()
a38b1c6d7b4bc097b38367db489b8ebbd478cc0db5db9b7e7aa614a75979dfb5
borodust/trivial-gamekit
renderer.lisp
(cl:in-package :trivial-gamekit.documentation) (defclass kramdown-renderer () ()) (defparameter *template* (alexandria:read-file-into-string (asdf:system-relative-pathname :trivial-gamekit/documentation "docs/doc-entry.template"))) ...
null
https://raw.githubusercontent.com/borodust/trivial-gamekit/17e4be8ff69e711346dddda0680677ca5bafc61b/docs/renderer.lisp
lisp
(cl:in-package :trivial-gamekit.documentation) (defclass kramdown-renderer () ()) (defparameter *template* (alexandria:read-file-into-string (asdf:system-relative-pathname :trivial-gamekit/documentation "docs/doc-entry.template"))) ...
33d9439552559182825095586c074b60574a1279c0f74f038168c1c4b37c7575
patricoferris/ocaml-multicore-monorepo
https.ml
let () = Eio_main.run @@ fun env -> Dream.run ~https:true env @@ Dream.logger @@ fun _ -> Dream.html "Good morning, world!"
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/example/l-https/https.ml
ocaml
let () = Eio_main.run @@ fun env -> Dream.run ~https:true env @@ Dream.logger @@ fun _ -> Dream.html "Good morning, world!"
9ccab856d46d84ad8425666b276caa3adc08646bba9c6680a0752c394aac7ac2
HaskellCNOrg/snap-web
Types.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # # LANGUAGE OverlappingInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE UndecidableInstances # {- FROM: -} module Data.Baeson.Types ( Parser , ...
null
https://raw.githubusercontent.com/HaskellCNOrg/snap-web/f104fd9b8fc5ae74fc7b8002f0eb3f182a61529e/src/Data/Baeson/Types.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances # FROM: # INLINE (>>=) # # INLINE (<*>) # # INLINE empty # # INLINE (<|>) # | Failure continuation. | Success continuation. | A continuation-based parser type. # INLINE (>>=) # # I...
# LANGUAGE FlexibleInstances # # LANGUAGE OverlappingInstances # # LANGUAGE UndecidableInstances # module Data.Baeson.Types ( Parser , Result(..) , ToBSON(..) , FromBSON(..) , ToBSONDoc(..) , FromBSONDoc(..) , BSONKey (..) , parse , parseEither ...
ceabc26c79c1910e4fe500bc1f6448fbe3ab866219f8915fc72c96f392e9838a
dbuenzli/cmdliner
test_with_used_args.ml
open Cmdliner let print_args ((), args) _other = print_endline (String.concat " " args) let test_pos_left = let a = Arg.(value & flag & info ["a"; "aaa"]) in let b = Arg.(value & opt (some string) None & info ["b"; "bbb"]) in let c = Arg.(value & pos_all string [] & info []) in let main = let ignore_val...
null
https://raw.githubusercontent.com/dbuenzli/cmdliner/1c5eff9f94ed8660a52d5190155aeca3b39558ec/test/test_with_used_args.ml
ocaml
open Cmdliner let print_args ((), args) _other = print_endline (String.concat " " args) let test_pos_left = let a = Arg.(value & flag & info ["a"; "aaa"]) in let b = Arg.(value & opt (some string) None & info ["b"; "bbb"]) in let c = Arg.(value & pos_all string [] & info []) in let main = let ignore_val...
5c72fec9025d453ecca3f4a34fb7d123d7f74b992d9c37eb9df3197460a0f21f
HiiGHoVuTi/Catrina
Types.hs
module Types ( ) where
null
https://raw.githubusercontent.com/HiiGHoVuTi/Catrina/77060c7384ab961f0f03a4baaefebc257033387d/app/Types.hs
haskell
module Types ( ) where
70323688539764fb6b4d6327ba92e80c7a9868da951baa0e063ec8ce61a5be47
dongcarl/guix
chicken.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 raingloom < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/chicken.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 raingloom < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages chicken) #:use-module (...
815862571b9e4dd86ca37adffe9279da855c3f8e1323cc788c593cbda9aecd60
clojure-interop/java-jdk
ForwardingFileObject.clj
(ns javax.tools.ForwardingFileObject "Forwards calls to a given file object. Subclasses of this class might override some of these methods and might also provide additional fields and methods." (:refer-clojure :only [require comment defn ->]) (:import [javax.tools ForwardingFileObject])) (defn open-writer ...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.tools/src/javax/tools/ForwardingFileObject.clj
clojure
false otherwise - `boolean`" or 0 if null otherwise - `java.lang.CharSequence`
(ns javax.tools.ForwardingFileObject "Forwards calls to a given file object. Subclasses of this class might override some of these methods and might also provide additional fields and methods." (:refer-clojure :only [require comment defn ->]) (:import [javax.tools ForwardingFileObject])) (defn open-writer ...
d1859a8ec569a1e9399017289ee9c0b0b2ea33f4dddd5f0186a656c29e4a7e34
spaceships/circuit-synthesis
GGM.hs
# LANGUAGE TupleSections # module Examples.GGM where import Examples.Goldreich import Circuit import Circuit.Builder import Circuit.Utils import Control.Monad import Control.Monad.Trans import Text.Printf export :: Gate g => [(String, [IO (String, Circuit g)])] export = [ ("big_ggm", [("ggm_4_128" ,) <$> ggm 1...
null
https://raw.githubusercontent.com/spaceships/circuit-synthesis/3fdb67f814acd16e29064138b38c4fedff27b4d5/src/Examples/GGM.hs
haskell
------------------------------------------------------------------------------ ggm choose the ith set from xs ------------------------------------------------------------------------------ ggm rachel
# LANGUAGE TupleSections # module Examples.GGM where import Examples.Goldreich import Circuit import Circuit.Builder import Circuit.Utils import Control.Monad import Control.Monad.Trans import Text.Printf export :: Gate g => [(String, [IO (String, Circuit g)])] export = [ ("big_ggm", [("ggm_4_128" ,) <$> ggm 1...
745d7a2a637ea5df847008f4684a3eea5fa01c1c3ab938eb32399048c1c62d0c
2600hz/community-scripts
array.erl
[ <<"foo">>, <<"bar">>, <<"baz">>, true, false, null, {[{<<"key">>, <<"value">>}]}, [ null, null, null, [] ], <<"\n\r\\">> ].
null
https://raw.githubusercontent.com/2600hz/community-scripts/b0b81342bf02300fcdbda99e4cecc1ee93823c70/CloneTools/lib/ejson-0.1.0/t/cases/array.erl
erlang
[ <<"foo">>, <<"bar">>, <<"baz">>, true, false, null, {[{<<"key">>, <<"value">>}]}, [ null, null, null, [] ], <<"\n\r\\">> ].
b7ea3a19f939e9a57cf02d4e85f6b864d9254458b7df6c2bef581ce876cc2c50
vouch-opensource/vouch-load-tests
send_friend_request.clj
(ns com.example.task.send-friend-request (:require [cheshire.core :as json] [clj-http.client :as http] [clojure.core.async :refer [<! chan close! go put!]] [clojure.tools.logging :as log] [io.vouch.load-tests.executor :as executor])) (defn- send-friend-request [api-url auth-token email] (let ...
null
https://raw.githubusercontent.com/vouch-opensource/vouch-load-tests/ca0f81097e0b1952f34e1bc7902de4123306c175/dev/com/example/task/send_friend_request.clj
clojure
(ns com.example.task.send-friend-request (:require [cheshire.core :as json] [clj-http.client :as http] [clojure.core.async :refer [<! chan close! go put!]] [clojure.tools.logging :as log] [io.vouch.load-tests.executor :as executor])) (defn- send-friend-request [api-url auth-token email] (let ...
f05ad2ab3f98059380d9b7324e3b09bb9e857255e78ec66af47b3332e956a794
blockmason/lndr
Server.hs
# LANGUAGE DataKinds # # LANGUAGE ExistentialQuantification # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Lndr.Server ( ServerState , LndrAPI , lndrAPI , LndrHandler(..) , freshState , currentConfig , app , runHeartbeat ...
null
https://raw.githubusercontent.com/blockmason/lndr/58fe5f82d5d057e463be23821454e3a0515ef9b9/lndr-backend/src/Lndr/Server.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # ('LndrHandler'), must be converted to the default 'Handler' type before they can be served by the 'serve' function. | Load required server configuration and create database connection pool. Called at server startup. update server config ...
# LANGUAGE DataKinds # # LANGUAGE ExistentialQuantification # module Lndr.Server ( ServerState , LndrAPI , lndrAPI , LndrHandler(..) , freshState , currentConfig , app , runHeartbeat ) where import Control.Concurrent import Control.Concurrent.ST...
47c5b6bddc80df3da9b5cb01c59e6788b5a3b87c7595d407cecdf9793382cef3
azimut/shiny
actors.lisp
(in-package :shiny) (defvar *actors* nil) (defun update-all-the-things (l) (declare (list l)) (loop :for actor :in l :do (update actor))) (defun model->world (actor) (with-slots (pos rot) actor (m4:* (m4:translation pos) (q:to-mat4 rot)))) (defun delete-actor-name (actor-name) (declar...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/examples/light-etude/actors.lisp
lisp
(q:from-axis-angle
(in-package :shiny) (defvar *actors* nil) (defun update-all-the-things (l) (declare (list l)) (loop :for actor :in l :do (update actor))) (defun model->world (actor) (with-slots (pos rot) actor (m4:* (m4:translation pos) (q:to-mat4 rot)))) (defun delete-actor-name (actor-name) (declar...
f1f3177bdcde4307cd195c519f286025744808188e7eb5087eeab15dd4992822
bintracker/bintracker
md-types.scm
;; This file is part of the libmdal library. Copyright ( c ) utz / irrlicht project 2018 - 2020 ;; See LICENSE for license details. ;;; md-module record types and additional accessors (module md-types * (import scheme (chicken base) (chicken string) srfi-1 srfi-13 md-helpers) ;; ----------------------------...
null
https://raw.githubusercontent.com/bintracker/bintracker/7408be140ccdde316e65eae873e976ce9b1f8571/libmdal/md-types.scm
scheme
This file is part of the libmdal library. See LICENSE for license details. md-module record types and additional accessors --------------------------------------------------------------------------- --------------------------------------------------------------------------- trees for eg. groups that don't exist. ...
Copyright ( c ) utz / irrlicht project 2018 - 2020 (module md-types * (import scheme (chicken base) (chicken string) srfi-1 srfi-13 md-helpers) # # MMOD : Input Nodes TODO should this always succeed as well ? Then we can construct whole node (define (subnode-ref subnode-id inode-instance) (assv sub...
0d289a044c635d1179e806c34e166535dbabb07c98338db393381441c24551c9
lambdabot/lambdabot
FreenodeNick.hs
| Backward - compatibility shim for ( de-)serializing ' 's -- using the old 'Read'/'Show' instances which gave freenode -- special treatment. module Lambdabot.Compat.FreenodeNick ( FreenodeNick(..) , freenodeNickMapSerial ) where import Control.Arrow import qualified Data.Map as M import Lambdabot.Nick ...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-core/src/Lambdabot/Compat/FreenodeNick.hs
haskell
using the old 'Read'/'Show' instances which gave freenode special treatment. Helper functions
| Backward - compatibility shim for ( de-)serializing ' 's module Lambdabot.Compat.FreenodeNick ( FreenodeNick(..) , freenodeNickMapSerial ) where import Control.Arrow import qualified Data.Map as M import Lambdabot.Nick import Lambdabot.Util.Serial newtype FreenodeNick = FreenodeNick { getFreenodeNick...
aab1bcd92424de99b3a20a790893c708e5a535e69f8a83381d241f751056e1bb
PascalLG/nubo-hs
Actions.hs
----------------------------------------------------------------------------- Nubo Client Application Copyright ( c ) 2017 , -- -- 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...
null
https://raw.githubusercontent.com/PascalLG/nubo-hs/390212b73c31746f4ff03a3e341f92d657db0223/Client/src/CmdSync/Actions.hs
haskell
--------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished ...
Nubo Client Application Copyright ( c ) 2017 , in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ...
f2ca6b5f909e26d5574e34db8611a32e58c574380da1cb0668bf055e593c8196
erlang/rebar3
rebar_src_dirs_SUITE.erl
-module(rebar_src_dirs_SUITE). -export([suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0, src_dirs_at_root/1, extra_src_dirs_at_root/1, src_dirs_in_erl_opts/1, extra_src_dirs_in_erl_opts/1, ...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_src_dirs_SUITE.erl
erlang
Then copy it over to create a conflict with dupes check that `extra.erl` was compiled to the `extra` dir check that `extra.erl` is not in the `modules` key of the app check that `extraX.erl` was compiled to the `ebin` dir check that `extraX.erl` is not in the `modules` key of the app check that `extra.erl` was co...
-module(rebar_src_dirs_SUITE). -export([suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0, src_dirs_at_root/1, extra_src_dirs_at_root/1, src_dirs_in_erl_opts/1, extra_src_dirs_in_erl_opts/1, ...
20008218f00dbdeb088d69f1aec9f3ac04d1a071714d7bb3021bc5d17ddbc8ae
cfereday/flat-chores-engine
chore_rules_test.clj
(ns engine.chore_rules_test (:require [clojure.test :refer :all] [engine.chore-rules :refer :all] [clara.rules :refer :all] [clara.tools.inspect :refer :all] [clojure.pprint :refer :all])) (defn person-facts [person] (let [flatmate (make-flatmate person) ch...
null
https://raw.githubusercontent.com/cfereday/flat-chores-engine/82127bc1f354ee823725d79fed8d036792486b58/test/engine/chore_rules_test.clj
clojure
(ns engine.chore_rules_test (:require [clojure.test :refer :all] [engine.chore-rules :refer :all] [clara.rules :refer :all] [clara.tools.inspect :refer :all] [clojure.pprint :refer :all])) (defn person-facts [person] (let [flatmate (make-flatmate person) ch...
ade775289c420cdfde7c642351c661547d745bf48daea75c843d5a72454a4fa0
hellonico/origami-dnn
marcel.clj
(ns origami-dnn.demo.marcel.marcel (:require [origami-dnn.net.mobilenet :refer [find-objects]] [origami-dnn.draw :as d] [opencv4.dnn.core :as origami-dnn] [opencv4.utils :refer [resize-by simple-cam-window]])) (defn handle [net opts labels buffer] (-> buffer (...
null
https://raw.githubusercontent.com/hellonico/origami-dnn/f55a32d0d3d528fcf57aaac10cfb20c7998b380c/src/origami_dnn/demo/marcel/marcel.clj
clojure
(ns origami-dnn.demo.marcel.marcel (:require [origami-dnn.net.mobilenet :refer [find-objects]] [origami-dnn.draw :as d] [opencv4.dnn.core :as origami-dnn] [opencv4.utils :refer [resize-by simple-cam-window]])) (defn handle [net opts labels buffer] (-> buffer (...
9720748554f55cadf6f3f3ffc53c5d22b43c8b3b475aa25cdc686a573d45a160
huangz1990/SICP-answers
9-inc.scm
9-inc.scm (define (inc n) (+ n 1))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/9-inc.scm
scheme
9-inc.scm (define (inc n) (+ n 1))
32869a1eb27255fe28b3e541f20e47c1bc90ad08533ec2f4a1ddea6c9b2639da
racket/slideshow
info.rkt
#lang info (define collection 'multi) (define deps '("base" "slideshow-lib" "pict-lib" "string-constants-lib" "compatibility-lib" "drracket-plugin-lib" "gui-lib")) (define pkg-desc "Slideshow's DrRacket plugin") (define pkg-au...
null
https://raw.githubusercontent.com/racket/slideshow/c3603f65735462bd94cc2015c7147014aa728a4f/slideshow-plugin/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" "slideshow-lib" "pict-lib" "string-constants-lib" "compatibility-lib" "drracket-plugin-lib" "gui-lib")) (define pkg-desc "Slideshow's DrRacket plugin") (define pkg-au...
426f7d9f81a4c2c096b537bb875e04d5b60c5dff978b898b59fe390cf48c26a7
Fandoozle/AutoCAD
rotateMultipleBlocks.lsp
;| RMB ========================================================================= Rotate Block(s) at its insertion point(s) by specifying rotation angle =========================================================================|; (vl-load-com) (defun C:RMB (/ CN ENT OS RA SS) (setq SS (ssget (list (cons 0 "IN...
null
https://raw.githubusercontent.com/Fandoozle/AutoCAD/18480cd17c9b46718762c3155f2bca1be2e2e5e2/rotateMultipleBlocks.lsp
lisp
| RMB if if setq repeat defun C:RMB
========================================================================= Rotate Block(s) at its insertion point(s) by specifying rotation angle (vl-load-com) (defun C:RMB (/ CN ENT OS RA SS) (setq SS (ssget (list (cons 0 "INSERT")))) (if *RA (setq RA (getdist (strcat "Specify rotation angle <" (angtos *RA)...
1dc3546cc71f21a082a386357bbb80f9fa4f92e9b21737550fc23219ed2a5c9e
witan-org/witan
hCons_sig.ml
(**********************************************************) (* This file contains the implementation of HConsed types *) (**********************************************************) module type PolyArg = sig type ('t,'a) t [@@deriving eq] val hash : 't Hash.t -> 'a Hash.t -> ('t,'a) t Hash.t val name : string ...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/psyche_lib/hCons_sig.ml
ocaml
******************************************************** This file contains the implementation of HConsed types ******************************************************** val backindex: (int -> t,M.backindex) Goption.t
module type PolyArg = sig type ('t,'a) t [@@deriving eq] val hash : 't Hash.t -> 'a Hash.t -> ('t,'a) t Hash.t val name : string end module type PolyS = sig type ('t,'a) initial type ('a,'dh) generic type ('a,'dh) g_revealed = (('a,'dh) generic,'a) initial val reveal : ('a,'d*'h) generic -> ('a,'d*'h...
3ca0066a2d8c70872fb2adc99f4270a0209bbbec9246b25725aa7a78a5f90a4b
arttuka/reagent-material-ui
home_work_two_tone.cljs
(ns reagent-mui.icons.home-work-two-tone "Imports @mui/icons-material/HomeWorkTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def home-work-two-tone (cr...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/home_work_two_tone.cljs
clojure
(ns reagent-mui.icons.home-work-two-tone "Imports @mui/icons-material/HomeWorkTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def home-work-two-tone (cr...
2614ca92453decbe5f5eb543c98f249ebc3a8c9cde44e447475f0597ec80b19b
racket/math
gamma-gautschi.rkt
#lang typed/racket/base Gautschi 's algorithm ( as presented by Temme ) for the regularized upper gamma for x < 1 (require "../../../flonum.rkt" "../../../base.rkt" "../../polynomial/chebyshev.rkt" "../gamma.rkt" "../log-gamma.rkt" "../stirling-error.rkt" "gamma...
null
https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/functions/incomplete-gamma/gamma-gautschi.rkt
racket
relative error < = 2*eps Calculates (lg1- (* k A)) in a way that maintains precision when k or A is very small (hint: (exp (* (flexpt 2.0 i) k A)) ~= 1 here) Here, log(gamma(k)) ~ -log(k)-gamma*k, and log1p(k) ~ k Here, log(gamma(k)) ~ -log(k)-gamma*k, and log1p(k) ~ k
#lang typed/racket/base Gautschi 's algorithm ( as presented by Temme ) for the regularized upper gamma for x < 1 (require "../../../flonum.rkt" "../../../base.rkt" "../../polynomial/chebyshev.rkt" "../gamma.rkt" "../log-gamma.rkt" "../stirling-error.rkt" "gamma...
e19307ef0071f48b4641c89b7c27dd7213e1130aed3f4a0be5b3759d9d43f0bf
mrb/soundwave
Handlers.hs
module Soundwave.Handlers where import qualified Soundwave.Logger as L import Network.Socket hiding (send, sendTo, recv, recvFrom) import Network.Socket.ByteString import Control.Monad.State import qualified Data.Map.Strict as M import Data.Int import Data.Maybe import Data.Word import Data.Binary.Get import Data.Bina...
null
https://raw.githubusercontent.com/mrb/soundwave/5906f07310ffc2be7ccda550bf639e1d061262e8/Soundwave/Handlers.hs
haskell
module Soundwave.Handlers where import qualified Soundwave.Logger as L import Network.Socket hiding (send, sendTo, recv, recvFrom) import Network.Socket.ByteString import Control.Monad.State import qualified Data.Map.Strict as M import Data.Int import Data.Maybe import Data.Word import Data.Binary.Get import Data.Bina...
4e7c7f0672eedb7d5cbf60aa4d3238613e27d526f6013878a4a8d06194055ce3
NorfairKing/smos
StateHistory.hs
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # module Smos.Cursor.StateHistory ( StateHistoryCursor (..), makeStateHistoryCursor, rebuildStateHistoryCursor, stateHistoryCursorModTodoState, stateHistoryCursorSetTodoState, stateHistoryCursorToggleTodoState, stateHistoryCursorUnsetTodoState,...
null
https://raw.githubusercontent.com/NorfairKing/smos/3b7021c22915ae16ae721c7da60d715e24f4e6bb/smos-cursor/src/Smos/Cursor/StateHistory.hs
haskell
Nothing if the result wouldn't be valid
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # module Smos.Cursor.StateHistory ( StateHistoryCursor (..), makeStateHistoryCursor, rebuildStateHistoryCursor, stateHistoryCursorModTodoState, stateHistoryCursorSetTodoState, stateHistoryCursorToggleTodoState, stateHistoryCursorUnsetTodoState,...
7c186fac74d66165d12de8a9e2443fe7bfda750076f4d530e9de6c522d8f3ccd
ocaml-multicore/ocaml-tsan
backtrace_bounds_exn.ml
(* TEST flags = "-g" ocamlrunparam += ",b=1" *) # 11436 : bad backtrace for out - of - bounds exception let xs = [| 0; 1; 2 |] let [@inline never] bad_bound_fn x = !x + xs.(100) let _ = try ignore (Sys.opaque_identity (bad_bound_fn (ref 0))); with exn -> Printf.printf "Uncaught exception %s\n"...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/backtrace/backtrace_bounds_exn.ml
ocaml
TEST flags = "-g" ocamlrunparam += ",b=1"
# 11436 : bad backtrace for out - of - bounds exception let xs = [| 0; 1; 2 |] let [@inline never] bad_bound_fn x = !x + xs.(100) let _ = try ignore (Sys.opaque_identity (bad_bound_fn (ref 0))); with exn -> Printf.printf "Uncaught exception %s\n" (Printexc.to_string exn); Printexc.print_backtrac...
0940195c33eee421644c44de37b68a361a11a1d8baebbc7a30fa423908aea3ba
8thlight/hyperion
limit.clj
(ns hyperion.riak.map-reduce.limit (:require [cheshire.core :refer [generate-string]] [fleet :refer [fleet]] [hyperion.riak.map-reduce.helper :refer [deftemplate-fn]])) (def limit-template " function f(values) { return values.slice(0, <(generate-string limit)>); } ") (deftemplate-fn limi...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/riak/src/hyperion/riak/map_reduce/limit.clj
clojure
(ns hyperion.riak.map-reduce.limit (:require [cheshire.core :refer [generate-string]] [fleet :refer [fleet]] [hyperion.riak.map-reduce.helper :refer [deftemplate-fn]])) (def limit-template " function f(values) { } ") (deftemplate-fn limit-js (fleet [limit] limit-template {:escaping :bypass...
ec12a07725c4929ac4388e4252228d72fe17d7ad961a1c25539fa88dbb81a7d1
urbanslug/graphite
fasta.rkt
#lang racket (provide read-fasta-file fasta-hash) ;; In this context sequence means a base or amino acid sequence (define fasta-hash (make-hash)) (define current-sequence-identifier null) (define (parse-fasta-file line) (if (eqv? (string-ref line 0) #\>) ;; if the line starts with a greater than sign (let ([...
null
https://raw.githubusercontent.com/urbanslug/graphite/bcac6bd61172c52d1cc89c0bd0abe8ad3c6a6576/graphite/IO/fasta.rkt
racket
In this context sequence means a base or amino acid sequence if the line starts with a greater than sign use mutable state to keep track of current sequence append to current seq Read files and display them to the user
#lang racket (provide read-fasta-file fasta-hash) (define fasta-hash (make-hash)) (define current-sequence-identifier null) (define (parse-fasta-file line) (let ([sequence-identifier (substring line 1)]) (set! current-sequence-identifier sequence-identifier) (hash-set! fasta-hash sequence-ident...
f45354a9c0a095f93aa2aef3d50c5289741ebd9c0c2d88a0dbb7f36fd588e1af
vim-scripts/slimv.vim
swank-backend.lisp
;;; -*- Mode: lisp; indent-tabs-mode: nil; outline-regexp: ";;;;;*" -*- ;;; ;;; slime-backend.lisp --- SLIME backend interface. ;;; Created by in 2003 . Released into the public domain . ;;; ;;;; Frontmatter ;;; ;;; This file defines the functions that must be implemented ;;; separately for each Lisp. Each is decla...
null
https://raw.githubusercontent.com/vim-scripts/slimv.vim/61ce81ff6b1a05314a6d750a32a1c7379f35a5dc/slime/swank-backend.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil; outline-regexp: ";;;;;*" -*- slime-backend.lisp --- SLIME backend interface. Frontmatter This file defines the functions that must be implemented separately for each Lisp. Each is declared as a generic function for which swank-<implementation>.lisp provides methods. int...
Created by in 2003 . Released into the public domain . (defpackage :swank-backend (:use :common-lisp) (:export #:*debug-swank-backend* #:sldb-condition #:compiler-condition #:original-condition #:message #:source-context #:condition #...
58494cf13135a41bae8d8f35da9df73167d436743a7c4294d63cb94d92b1a59e
takikawa/racket-clojure
reader-no-wrap.rkt
#lang s-exp syntax/module-reader clojure/clojure #:language-info '#[clojure/lang/language-info get-language-info #f]
null
https://raw.githubusercontent.com/takikawa/racket-clojure/6a65b4348770dee984bd6fe8d0e33445887fff17/clojure/lang/reader-no-wrap.rkt
racket
#lang s-exp syntax/module-reader clojure/clojure #:language-info '#[clojure/lang/language-info get-language-info #f]
bfb6177a161b0b9c68e5e50585cce8f24e17527ba531107745c1cbcfb3788ac1
reflectionalist/S9fES
spawn-command.scm
Scheme 9 from Empty Space , Function Library By , 2010 ; Placed in the Public Domain ; ; (spawn-command string list) ==> list ; (spawn-command/fd string list) ==> list ; ; (load-from-library "spawn-command.scm") ; ; Spawn a child process running the command STRING with the arguments listed in LIST . Ret...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/ext/spawn-command.scm
scheme
Placed in the Public Domain (spawn-command string list) ==> list (spawn-command/fd string list) ==> list (load-from-library "spawn-command.scm") Spawn a child process running the command STRING with the arguments child process: (input-port output-port integer) Note that the full path of the ...
Scheme 9 from Empty Space , Function Library By , 2010 listed in LIST . Return a list of two I / O - ports and the PID of the or shell operators are needed , use SPAWN - SHELL - COMMAND instead . SPAWN - COMMAND / FD is like SPAWN - COMMAND , but delivers raw Unix file = = > ( # < input - ...
e096624634974c9c13afd24bac4b1661414158888e583538f65fa94034c454b9
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
GetQuotesQuote.hs
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the different functions to run the operation getQuotesQuote module StripeAPI.Op...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetQuotesQuote.hs
haskell
# LANGUAGE ExplicitForAll # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the different functions to run the operation getQuotesQuote | > GET /v1/quotes/{quote} | Contains all available parameters of this operation (query and path parameters) | Monadic computation which returns the result of th...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Operations.GetQuotesQuote where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader import qualified Data.Aeson import qualified Data.Aeson as...
7268a2129bda29fb2004b1b935367f6a080af4566321b5714994baaf70370a93
ollef/sixten
Test.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Command.Test where import Protolude hiding (TypeError) import qualified Data.Text as Text import Options.Applicative import System.Process import qualified Command.Check.Options as Check import qualified Command.Compile a...
null
https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Command/Test.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Command.Test where import Protolude hiding (TypeError) import qualified Data.Text as Text import Options.Applicative import System.Process import qualified Command.Check.Options as Check import qualified Command.Compile as Compile import qualified Command....
1f9055a949204bdce5cb7cbdb9b42a457ccc418e89d2906900c777348654dec5
asivitz/Hickory
Omniscient.hs
-- |'Omniscient' style camera. Controls for panning, rotating, zooming. -- Good for 3D editors # LANGUAGE RecursiveDo # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} module Hickory.FRP.Camera.Omniscient where import qualified Reactive.Banana as B import Hickory.FRP.CoreEvent...
null
https://raw.githubusercontent.com/asivitz/Hickory/2459a5db240bfecc18b3ba55609d68d2f0f6c2d4/FRP/Hickory/FRP/Camera/Omniscient.hs
haskell
|'Omniscient' style camera. Controls for panning, rotating, zooming. Good for 3D editors # LANGUAGE GADTs #
# LANGUAGE RecursiveDo # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # module Hickory.FRP.Camera.Omniscient where import qualified Reactive.Banana as B import Hickory.FRP.CoreEvents (CoreEvents (..), concatTouchEvents) import qualified Reactive.Banana.Frameworks as B import Reactive.Banana ((<@>))...
dc1e5bafdb913cf7c4744c953a7c98f53bdb32ff3be917fa164e300ac9842165
galdor/tungsten
concurrency-sbcl.lisp
(in-package :system) ;;; Mutexes ;;; (deftype %mutex () 'sb-thread:mutex) (defun %make-mutex (&key name) (sb-thread:make-mutex :name name)) (defun %acquire-mutex (mutex) (sb-thread:grab-mutex mutex :waitp t)) (defun %maybe-acquire-mutex (mutex) (sb-thread:grab-mutex mutex :waitp nil)) (defun %release-mu...
null
https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-system/src/concurrency-sbcl.lisp
lisp
Semaphores Condition variables Threads Why would joining a thread which aborted cause an error?
(in-package :system) Mutexes (deftype %mutex () 'sb-thread:mutex) (defun %make-mutex (&key name) (sb-thread:make-mutex :name name)) (defun %acquire-mutex (mutex) (sb-thread:grab-mutex mutex :waitp t)) (defun %maybe-acquire-mutex (mutex) (sb-thread:grab-mutex mutex :waitp nil)) (defun %release-mutex (mut...
0f5609f1c742b491c75e33db1c0d001cd4c0c26cad3e26a5d36bfdfcc3455a67
DomainDrivenArchitecture/dda-serverspec-crate
http.clj
Licensed to the Apache Software Foundation ( ASF ) under one ; or more contributor license agreements. See the NOTICE file ; distributed with this work for additional information ; regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the ; "License"); you may not...
null
https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-serverspec-crate/0a2fd8cdd54a9efc3aad9e141098c2bf01d40861/main/src/dda/pallet/dda_serverspec_crate/infra/fact/http.clj
clojure
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required b...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , (ns dda.pallet.dda-serverspec-crate.infra.fact.http (:require [clojure.string :as string] [clojure.tools.logging :as logg...
d4141b47a0a2dfdb5e44b655613dc0183dc51f489da3ec878495bec38b7c1445
8c6794b6/haskell-sc-scratch
Scratch01.hs
| Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : portable Scratch written while reading : /A tutorial implementation of a dependently typed lambda calculus/. Module : $Header$ CopyRight : (c) 8c6794b6 License : BSD3 Mainta...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/FP/DTLC/Scratch01.hs
haskell
(checkable). ^ Annotated terms ^ Bound variables ^ Free variables ^ Application | Same as 'const' function.
| Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : portable Scratch written while reading : /A tutorial implementation of a dependently typed lambda calculus/. Module : $Header$ CopyRight : (c) 8c6794b6 License : BSD3 Mainta...
01b151b0ad7e96714d1368875f1757eabc9cb0aabb15c7b93e21e81fde705150
dnaeon/cl-wol
delete-host.lisp
Copyright ( c ) 2021 Nikolov < > ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; 1 . Redistributions of source code must retain the above copyright ;; notice, this list of co...
null
https://raw.githubusercontent.com/dnaeon/cl-wol/8f5cb9c4aeabb726b1991379d2a47eac3f38b2b6/src/cli/delete-host.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer in this position and unchanged. notice, this list of conditions and the fo...
Copyright ( c ) 2021 Nikolov < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES...
0bc4a0bc0c494196910724684a50253a9588b2beb4f7dea973cc995c85ad5bfe
hugoduncan/makejack
clean.clj
(ns makejack.tasks.clean (:require [clojure.tools.build.api :as b] [makejack.defaults.api :as defaults] [makejack.verbose.api :as v])) (defn clean "Remove the target directory." {:arglists '[[{:keys [target] :as params}]]} [params] (v/println params "Clean target...") (b/delete {:path (defaults/ta...
null
https://raw.githubusercontent.com/hugoduncan/makejack/6968c6c8f2433d5a618acf8820eaa27f41464b95/bases/tasks/src/makejack/tasks/clean.clj
clojure
(ns makejack.tasks.clean (:require [clojure.tools.build.api :as b] [makejack.defaults.api :as defaults] [makejack.verbose.api :as v])) (defn clean "Remove the target directory." {:arglists '[[{:keys [target] :as params}]]} [params] (v/println params "Clean target...") (b/delete {:path (defaults/ta...
99517d0154454a380676dc1faaa3a0b603142d9dc2e48aa2ab1260952302070c
MarcusPlieninger/HtDP_2e_solutions
HtDP_2e_Exercise_032.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_32) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib...
null
https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_032.rkt
racket
about the language level of this file in a form that our tools can easily process. but also employ cell phones, tablets, and their cars’ information control screen. Soon people will use wearable computers in the form of intelligent glasses, clothes, and sports gear. In the somewhat more distant future, people may come...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_32) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decim...
e092516b45aeffa3c0c1d516ae7d75c45052d2d053809d6997a3a192810176c2
inhabitedtype/ocaml-aws
describePatchBaselines.mli
open Types type input = DescribePatchBaselinesRequest.t type output = DescribePatchBaselinesResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/describePatchBaselines.mli
ocaml
open Types type input = DescribePatchBaselinesRequest.t type output = DescribePatchBaselinesResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
31176171a6bf57f9de568fad6bad84d06b9a0326e06ef6f8e6f42bce957d649d
EligiusSantori/L2Apf
race.scm
(module system racket/base (require racket/contract) (provide races) (define races (list (cons 0 'human) (cons 1 'light-elf) (cons 2 'dark-elf) (cons 3 'orc) (cons 4 'dwarf) )) )
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/race.scm
scheme
(module system racket/base (require racket/contract) (provide races) (define races (list (cons 0 'human) (cons 1 'light-elf) (cons 2 'dark-elf) (cons 3 'orc) (cons 4 'dwarf) )) )
f16ad7acd04959e236cfc64a06aadbc054a1eb642ed3cbceab8b1618edcbd120
zed-throben/erlangeos
test_where.erl
- module('test_where'). - compile(export_all). test() -> testN(0). testN(N) -> eosstd:puts(eosstd:fmt("test #~s",[eosstd:to_str(N)])), (fun()->EOSSYS@t_0 = test(N) /= eof , if EOSSYS@t_0 -> testN(N + 1 ); true -> [] end end)(). test(0) -> ( fun(A ,B ) -> ...
null
https://raw.githubusercontent.com/zed-throben/erlangeos/44e50e442f5d396c69ae90db530b0b60b01d692a/test/test_where.erl
erlang
- module('test_where'). - compile(export_all). test() -> testN(0). testN(N) -> eosstd:puts(eosstd:fmt("test #~s",[eosstd:to_str(N)])), (fun()->EOSSYS@t_0 = test(N) /= eof , if EOSSYS@t_0 -> testN(N + 1 ); true -> [] end end)(). test(0) -> ( fun(A ,B ) -> ...
0a962ee4f0e103b1cf0d5df16a5c6062c506e9a64534211ed246c548ab1151d8
ghc/ghc
Type.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE NoImplicitPrelude # # LANGUAGE Trustworthy # # OPTIONS_HADDOCK not - home # ----------------------------------------------------------------------------- -- | -- Module : GHC.Exception.Type Copyright : ( c ) The University of Glasgow , 1998 - 2002 -- Lice...
null
https://raw.githubusercontent.com/ghc/ghc/b4cfa8e235715d8c73b2ba0ba05ed8ef92629218/libraries/base/GHC/Exception/Type.hs
haskell
--------------------------------------------------------------------------- | Module : GHC.Exception.Type License : see libraries/base/LICENSE Maintainer : Stability : internal Exceptions and exception-handling functions. ------------------------------------------------------------------------...
# LANGUAGE ExistentialQuantification # # LANGUAGE NoImplicitPrelude # # LANGUAGE Trustworthy # # OPTIONS_HADDOCK not - home # Copyright : ( c ) The University of Glasgow , 1998 - 2002 Portability : non - portable ( GHC extensions ) module GHC.Exception.Type , SomeException(..), ArithException(..) ...
58e8c87e9338be676e4bfc3de07eabd851539d350ffd6495681d38e3f8bc8c84
agda/agda
CallMatrix.hs
# LANGUAGE ImplicitParams # # LANGUAGE CPP # module Agda.Termination.CallMatrix where module Agda . Termination . CallMatrix ( CallMatrix ' ( .. ) , CallMatrix , , CallComb ( .. ) -- , tests -- ) where #if __GLASGOW_HASKELL__ < 804 import Data.Semigroup #endif ...
null
https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/src/full/Agda/Termination/CallMatrix.hs
haskell
, tests ) where ---------------------------------------------------------------------- * Call matrices ---------------------------------------------------------------------- | Call matrix indices = function argument indices. Machine integer 'Int' is sufficient, since we cannot index more arguments than ...
# LANGUAGE ImplicitParams # # LANGUAGE CPP # module Agda.Termination.CallMatrix where module Agda . Termination . CallMatrix ( CallMatrix ' ( .. ) , CallMatrix , , CallComb ( .. ) #if __GLASGOW_HASKELL__ < 804 import Data.Semigroup #endif import Agda.Termination.C...
05a0ab4b7f3da98b977f619cba647dcddc05209341f40b8da6e6c7f5d26a168b
twosigma/waiter
spnego_test.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/twosigma/waiter/fa1d028f61f92c8be15ddb45cfa743b92eeb4058/waiter/test/waiter/auth/spnego_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns waiter.auth.spnego-test (:require [clojure.core.async :as async] [clojure.test :refer :all] [waiter.auth.spnego :refer :all] [waiter.status-codes :refer :all] ...
1613fa79874ef0b2401152c6c000040047b29b518cdf88e4fc3d6d1c4b19e043
gsakkas/rite
20060421-19:09:48-c6e8c52f60ef4537806fbfce51ccfd37.seminal.ml
exception Unimplemented exception RuntimeTypeError exception DoesNotTypecheck of string (****** Syntax for our language, including types (do not change) *****) type exp = Var of string | Lam of string * typ * exp | Apply of exp * exp | Closure of string * exp * (env ref) | Int of int | Pl...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060421-19%3A09%3A48-c6e8c52f60ef4537806fbfce51ccfd37.seminal.ml
ocaml
***** Syntax for our language, including types (do not change) **** ***** Interpreter for our language (do not change) **** **** helper functions provided to you (do not change) **** ********* examples and testing **********
exception Unimplemented exception RuntimeTypeError exception DoesNotTypecheck of string type exp = Var of string | Lam of string * typ * exp | Apply of exp * exp | Closure of string * exp * (env ref) | Int of int | Plus of exp * exp | If of exp * exp * exp | RecordE of (string * exp)...
cc5aca04b4654479235f5153ea86cec7144a8300ca1ef5880bd0adac1f487e61
eeng/shevek
helpers.cljs
(ns shevek.pages.cubes.helpers (:require [shevek.reflow.db :as db] [shevek.reflow.core :refer [dispatch] :refer-macros [defevh]] [shevek.rpc :as rpc])) (defn- cube-names-as-keys [db cubes] (assoc db :cubes (zipmap (map :name cubes) cubes))) (defevh :cubes/fetch [db] (rpc/fetch db :cubes ...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/cubes/helpers.cljs
clojure
(ns shevek.pages.cubes.helpers (:require [shevek.reflow.db :as db] [shevek.reflow.core :refer [dispatch] :refer-macros [defevh]] [shevek.rpc :as rpc])) (defn- cube-names-as-keys [db cubes] (assoc db :cubes (zipmap (map :name cubes) cubes))) (defevh :cubes/fetch [db] (rpc/fetch db :cubes ...
89abb6d6e5ce0ba97b7bcebdca1936256fea708e5bef1389ce7e67aeb888437e
robert-strandh/Second-Climacs
buffer.lisp
(cl:in-package #:second-climacs-base) A BUFFER is an object that holds data to be operated on and ;;; displayed. An instance of this class typically contains a ;;; reference to another object, perhaps provided by an external ;;; library. ;;; A typical situation would be that a subclass of BUFFER contains a ;;; sl...
null
https://raw.githubusercontent.com/robert-strandh/Second-Climacs/e49ff97abb07a76a05f7a4467b0e79168cfce057/Code/Base/buffer.lisp
lisp
displayed. An instance of this class typically contains a reference to another object, perhaps provided by an external library. slot holding a reference to a Cluffer buffer object. Take a cursor and an iten, and insert the item at cursor. Delete the item immediately after the cursor. Generic function E...
(cl:in-package #:second-climacs-base) A BUFFER is an object that holds data to be operated on and A typical situation would be that a subclass of BUFFER contains a (defclass buffer () ()) Generic function INSERT - ITEM . (defgeneric insert-item (cursor item)) Generic function DELETE - ITEM- . (defgeneri...