_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
75c4320b06ffed2f005dba55f7a3c4ee678d4fa496b9fa0a119ecc29292d1262
boxer-project/boxer-sunrise
run-tests.lisp
(require "asdf") (require "uiop") Sometimes does n't seem to load the initialization file when running from ;; the command line, in which case this could be uncommented. ;; (load "~/quicklisp/setup.lisp") (ql:quickload "prove-asdf") (ql:quickload "cl-ppcre") (ql:quickload "prove") (ql:quickload :cl-fad) (ql:quick...
null
https://raw.githubusercontent.com/boxer-project/boxer-sunrise/55acd3aa603aa1724593a048e3a4552f1894801d/run-tests.lisp
lisp
the command line, in which case this could be uncommented. (load "~/quicklisp/setup.lisp") This turns off the terminal color sequences and simplifies the characters in the
(require "asdf") (require "uiop") Sometimes does n't seem to load the initialization file when running from (ql:quickload "prove-asdf") (ql:quickload "cl-ppcre") (ql:quickload "prove") (ql:quickload :cl-fad) (ql:quickload :log4cl) (ql:quickload :drakma) (ql:quickload :cl-json) (ql:quickload :zpng) (ql:quickload :...
39916036a43cc4745f3f80ba4682b70bbbf9fe55d0a58e9774936f7c6f329f08
m1kal/charbel
core.cljs
(ns charbel-cljs.core (:require [charbel.core :refer [module-from-string build]] [reagent.core :as r] [reagent.dom :as d])) (def example (str "(module delay_line\n {:clocks [[clk]] :parameters [WIDTH 32]}\n" " [[:in data WIDTH] [:in valid 1]\n [:out data_o WI...
null
https://raw.githubusercontent.com/m1kal/charbel/967d617f3c4e85c66670236baee29aede4936b6b/docs/src/charbel_cljs/core.cljs
clojure
(ns charbel-cljs.core (:require [charbel.core :refer [module-from-string build]] [reagent.core :as r] [reagent.dom :as d])) (def example (str "(module delay_line\n {:clocks [[clk]] :parameters [WIDTH 32]}\n" " [[:in data WIDTH] [:in valid 1]\n [:out data_o WI...
7b75eb057d05174af7d5855dc5990db28c5a11a2cba09d947f12b440b9e0e098
darrenldl/ProVerif-ATP
termslinks.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/termslinks.mli
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
6ba2e56913a2276c1de5fce5488e52d5dee3f45cddb873b87d4a59d54c56b805
conjure-cp/conjure
options.hs
data FlagKind = On | OnOff | Default Int [Int] | Ignore deriving (Eq, Show) allFlags :: [(String, FlagKind)] allFlags = [ ( "case-merge" , On ) , ( "cse" , On ) , ( "dicts-strict" ...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/etc/dev/ghc-optimisation-flags/options.hs
haskell
data FlagKind = On | OnOff | Default Int [Int] | Ignore deriving (Eq, Show) allFlags :: [(String, FlagKind)] allFlags = [ ( "case-merge" , On ) , ( "cse" , On ) , ( "dicts-strict" ...
e485c33b6a0d2fd49a9cf56368c86a525e82668da14bc14a090ac7c33f79b032
haskell-perf/graphs
Abstract.hs
module BenchGraph.Render.Abstract ( printAbstract , printQuick , average ) where import Data.List (find, sortBy) import Text.Printf (printf) import Control.Monad (unless) import Data.Bitraversable (bisequence) import Control.Applicative ((<|>)) import BenchGraph.Named import BenchGraph.Render.Types impo...
null
https://raw.githubusercontent.com/haskell-perf/graphs/d2e53fb424b01bb51d5733cc40fd62abb2740430/src/BenchGraph/Render/Abstract.hs
haskell
| Will print an abstract, comparing libraries by their average time ^ A comparative (like "faster") ^ The actual data ^ To compare with ^ data | Sort the results, plus put the worst lib for comparison
module BenchGraph.Render.Abstract ( printAbstract , printQuick , average ) where import Data.List (find, sortBy) import Text.Printf (printf) import Control.Monad (unless) import Data.Bitraversable (bisequence) import Control.Applicative ((<|>)) import BenchGraph.Named import BenchGraph.Render.Types impo...
00463afe94485aca688af5026fdcd2cf4a68e375fb6f4b668a79b3a2cdf4ca5b
hbr/fmlib
fmlib_parse.mli
(** Parsing Library *) (** {1 Documentation} {{!page-parse} Introduction to Combinator Parsing} *) (** {1 API} *) module Character = Character module Token_parser = Token_parser module Parse_with_lexer = Parse_with_lexer module Generic = Generic module Position = Position module Located = Located mo...
null
https://raw.githubusercontent.com/hbr/fmlib/45ee4d2c76a19ef44557c554de30ec57d94bb9e5/src/parse/fmlib_parse.mli
ocaml
* Parsing Library * {1 Documentation} {{!page-parse} Introduction to Combinator Parsing} * {1 API}
module Character = Character module Token_parser = Token_parser module Parse_with_lexer = Parse_with_lexer module Generic = Generic module Position = Position module Located = Located module Indent = Indent module Error_reporter = Error_reporter module Interfaces = Interfaces
e841bf2587c8d685c8dd35edfd1df8d8c5dcab457cd1e170cd99a58ce9352a4b
ghc/testsuite
T1835.hs
# LANGUAGE TemplateHaskell , FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances # MultiParamTypeClasses, TypeSynonymInstances #-} module Main where import Language.Haskell.TH import Language.Haskell.TH.Syntax class Eq a => MyClass a data Foo = Foo deriving Eq instance MyClass Foo...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/T1835.hs
haskell
# LANGUAGE TemplateHaskell , FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances # MultiParamTypeClasses, TypeSynonymInstances #-} module Main where import Language.Haskell.TH import Language.Haskell.TH.Syntax class Eq a => MyClass a data Foo = Foo deriving Eq instance MyClass Foo...
5aa258be72d2f81ab29033d0f0c3020092db0a7c7ba75e96411ee5af5d97417c
district0x/cljs-orbitdb
eventlog.cljs
(ns orbitdb.eventlog (:require [orbitdb.signatures :as signatures])) (defn eventlog "Creates and opens an eventlog database. Takes an OrbitDB instance and a map with: `:name` (string): the database name or `:address` (string): and IPFS address of an existing eventlog database, `:opts`: a map of op...
null
https://raw.githubusercontent.com/district0x/cljs-orbitdb/9928bf877c66c926a7f0bec086e8c7755240d15c/src/orbitdb/eventlog.cljs
clojure
(ns orbitdb.eventlog (:require [orbitdb.signatures :as signatures])) (defn eventlog "Creates and opens an eventlog database. Takes an OrbitDB instance and a map with: `:name` (string): the database name or `:address` (string): and IPFS address of an existing eventlog database, `:opts`: a map of op...
46ec51a8e7f0241bc0b2e5398bea502b61f24a6814feb2c9ecfa7d95b2b0aa76
yapsterapp/er-cassandra
vector.cljc
(ns er-cassandra.util.vector) (defn coerce [obj] (cond (nil? obj) nil (vector? obj) obj (sequential? obj) (vec obj) :else [obj]))
null
https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/util/vector.cljc
clojure
(ns er-cassandra.util.vector) (defn coerce [obj] (cond (nil? obj) nil (vector? obj) obj (sequential? obj) (vec obj) :else [obj]))
6d45b5fff3b8ff8473547f252ad9a2d3a28877a3bf67104f7b104b589a4b69ce
incoherentsoftware/defect-process
TutorialSetup.hs
module Level.Room.Trigger.All.TutorialSetup ( mkTutorialSetupTrigger ) where import Control.Monad.IO.Class (MonadIO) import Data.Functor ((<&>)) import Enemy.Types import Level.Room.ArenaWalls.EnemySpawn import Level.Room.Item.Pickup.All.GunItemPickups import Level.Room.Item.RefreshStation import Le...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/c39ce1f742d32a0ffcde82c03bf872adeb7d9162/src/Level/Room/Trigger/All/TutorialSetup.hs
haskell
module Level.Room.Trigger.All.TutorialSetup ( mkTutorialSetupTrigger ) where import Control.Monad.IO.Class (MonadIO) import Data.Functor ((<&>)) import Enemy.Types import Level.Room.ArenaWalls.EnemySpawn import Level.Room.Item.Pickup.All.GunItemPickups import Level.Room.Item.RefreshStation import Le...
e61e587bea278cffd843a9f4bfae801c9d349fd91615bfccba508705ab483241
pfdietz/ansi-test
file-namestring.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Sep 11 07:40:47 2004 ;;;; Contains: Tests for FILE-NAMESTRING (deftest file-namestring.1 (let* ((vals (multiple-value-list (file-namestring "file-namestring.txt"))) (s (first vals))) (if (and (null (cdr vals)) ...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/pathnames/file-namestring.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for FILE-NAMESTRING Error tests
Author : Created : Sat Sep 11 07:40:47 2004 (deftest file-namestring.1 (let* ((vals (multiple-value-list (file-namestring "file-namestring.txt"))) (s (first vals))) (if (and (null (cdr vals)) (stringp s) (equal (file-namestring s) s)) ...
91165330e04fcd79ca8f93c94e56b199d31a5edf91290489b36cffb0ddf060bb
smallmelon/sdzmmo
lib_mon.erl
%%%----------------------------------- %%% @Module : lib_mon @Author : xyao %%% @Email : @Created : 2010.05.08 %%% @Description: 怪物 %%%----------------------------------- -module(lib_mon). -include("common.hrl"). -include("record.hrl"). -export( [ get_name_by_mon_id/1, get_s...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/lib/lib_mon.erl
erlang
----------------------------------- @Module : lib_mon @Email : @Description: 怪物 ----------------------------------- 获取MON当前场景信息 获取mon名称用mon数据库id
@Author : xyao @Created : 2010.05.08 -module(lib_mon). -include("common.hrl"). -include("record.hrl"). -export( [ get_name_by_mon_id/1, get_scene_by_mon_id/1 ] ). get_scene_by_mon_id(MonId) -> case ets:match(?ETS_MON, #ets_mon{mid = MonId, scene = '$1', x = '$2', y = '$...
d2ff81b7d49c74ca4954aa284253c617bc71f1e03a4b34cc05c85b2b918094da
sonian/carica
core.clj
(ns carica.test.core (:require [carica.core :refer :all] [clojure.test :refer :all] [clojure.tools.logging.impl :refer [write!]] [clojure.java.io :as io])) (deftest config-test (testing "config" (testing "should offer a map of settings" (is (map? (config :nested-one-cl...
null
https://raw.githubusercontent.com/sonian/carica/d91ad15f7478ef267bce7383fca5788fd9033a96/test/carica/test/core.clj
clojure
this is the same test as 'should be overridden with override-config' above, only rewritten to use binding make sure we get the missing jar exception, not the exception that comes from calling `file` on a jar: URL quoted vectors in edn aren't read as one might expect. They catches the error and sends a warning to...
(ns carica.test.core (:require [carica.core :refer :all] [clojure.test :refer :all] [clojure.tools.logging.impl :refer [write!]] [clojure.java.io :as io])) (deftest config-test (testing "config" (testing "should offer a map of settings" (is (map? (config :nested-one-cl...
48fdb884eac30aae2060b3bb6c1f4ef7bf71dc9249ed8d3168817057224d7f97
fendor/hsimport
SymbolTest7.hs
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import qualified Control.Monad as M f :: Int -> Int f = (+ 3)
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/inputFiles/SymbolTest7.hs
haskell
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import qualified Control.Monad as M f :: Int -> Int f = (+ 3)
583b62e3d569b6481b590558bfe01373d7e21ab6708d73ce412a5c212da203d3
flyingmachine/pegthing
core_test.clj
(ns pegthing.core-test (:require [clojure.test :refer :all] [pegthing.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/flyingmachine/pegthing/c5d62f44a229964a0fa25b1fec0ceab2651fb436/test/pegthing/core_test.clj
clojure
(ns pegthing.core-test (:require [clojure.test :refer :all] [pegthing.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
31d28e1053b0c943821d13a2b7b29927d853c240a4e57e7ae9ad0aa2c88524b1
jacobobryant/platypub
sites.clj
(ns com.platypub.feat.sites (:require [com.biffweb :as biff :refer [q]] [com.platypub.middleware :as mid] [com.platypub.netlify :as netlify] [com.platypub.ui :as ui] [com.platypub.util :as util] [clj-http.client :as http] [clojure.edn :as edn] ...
null
https://raw.githubusercontent.com/jacobobryant/platypub/59e915d9ac5c0d30c873d7d85df79c26c0e7df58/src/com/platypub/feat/sites.clj
clojure
preinstall npm deps copy theme code to new directory install npm deps in new directory render
(ns com.platypub.feat.sites (:require [com.biffweb :as biff :refer [q]] [com.platypub.middleware :as mid] [com.platypub.netlify :as netlify] [com.platypub.ui :as ui] [com.platypub.util :as util] [clj-http.client :as http] [clojure.edn :as edn] ...
be2af92bcae4bc81c6fe6c001ed8a0c9db588a1cbb2e4cb60ffe4403fd3f029a
lillo/compiler-course-unipi
fun_cfa.ml
(** Type representing the label associated to each sub-expression *) type label = int [@@deriving show, eq, ord] * To make our analysis precise , we usually assume that bound variables are distinct . To achieve that we represent a variable as an identifier and a unique label . Thus , the pair ( name , i...
null
https://raw.githubusercontent.com/lillo/compiler-course-unipi/1a5e909da6a2cc79e6f80645cd24fb5ff285be54/semantic-analysis-material/code/fun-cfa/fun_cfa.ml
ocaml
* Type representing the label associated to each sub-expression * An annotated expression is made of a term and of a unique label counter to generated unique labels returns a new label helper to build an annotated expression from a term tail recursive helper function to carry out the annotation. en...
type label = int [@@deriving show, eq, ord] * To make our analysis precise , we usually assume that bound variables are distinct . To achieve that we represent a variable as an identifier and a unique label . Thus , the pair ( name , i d ) are unique inside the expression to analyze . Actually , i d is...
2f00f88c0e6397a526f9fe3309a0c9b25e75ae7792877aa0f62160b7cfdc0d06
karlhof26/gimp-scheme
random-br-strokes.scm
;; random.scm -*-scheme-*- ;; Use a brush to paint to paint random pixels a nominated number ;; of times to produce a "random" pattern. ;; ;; Version 2.0 ;; ;; ;; ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free ...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/a8de87a29db39337929b22eb4f81345f91765f55/random-br-strokes.scm
scheme
random.scm -*-scheme-*- Use a brush to paint to paint random pixels a nominated number of times to produce a "random" pattern. Version 2.0 This program is free software; you can redistribute it and/or either version 3 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRAN...
modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . (define (script-fu-random-br-strokes ...
f2ffa4053c6fe7cacefbc93a3f77dc79256f9e8229b084b71ab101d5551f5e48
eudoxia0/cmacro
macro.lisp
(in-package :cl-user) (defpackage cmacro.macro (:use :cl :anaphora) (:import-from :trivial-types :proper-list) (:export :<macro-case> :case-match :case-template :case-toplevel-template :<macro> :macro-name :macro-cases)) (in-package...
null
https://raw.githubusercontent.com/eudoxia0/cmacro/c1f419564a21c878ab62a54c2c45ee07d2968242/src/macro.lisp
lisp
(in-package :cl-user) (defpackage cmacro.macro (:use :cl :anaphora) (:import-from :trivial-types :proper-list) (:export :<macro-case> :case-match :case-template :case-toplevel-template :<macro> :macro-name :macro-cases)) (in-package...
2ea079558d76c663bc68eeaa441b52f907adced9f379929f5965db4c8bfffb27
input-output-hk/ouroboros-network
ClientState.hs
# LANGUAGE BangPatterns # {-# LANGUAGE DeriveFunctor #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} # LANGUAGE RecordWildCards # module Ouroboros.Network.BlockFetch.ClientState ( FetchClientContext (..) , FetchClientPolicy (..) , FetchClientStateVa...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-network/src/Ouroboros/Network/BlockFetch/ClientState.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # * Ancillary | The context that is passed into the block fetch protocol client when it is started. | The policy used by the fetch clients. It is set by the central block fetch logic, and passed to them via the 'FetchClientReg...
# LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module Ouroboros.Network.BlockFetch.ClientState ( FetchClientContext (..) , FetchClientPolicy (..) , FetchClientStateVars (..) , newFetchClientStateVars , readFetchClientState , PeerFetchStatus (..) , IsIdle (..) ...
59aeb076e618d1566fbe4a5a1738703f95a2be680ac5f38bf76dcd83df956afa
racket/eopl
environments.rkt
#lang eopl ;; builds environment interface, using data structures defined in ;; data-structures.rkt. (require "data-structures.rkt") (provide init-env empty-env extend-env apply-env) ;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;; ;; init-env : () -> Env usage : ( init - env ) = [ i=1 , v=5 , x=10 ] ;; (i...
null
https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter3/proc-lang/ds-rep/environments.rkt
racket
builds environment interface, using data structures defined in data-structures.rkt. initial environment ;;;;;;;;;;;;;;;; init-env : () -> Env (init-env) builds an environment in which i is bound to the environment constructors and observers ;;;;;;;;;;;;;;;;
#lang eopl (require "data-structures.rkt") (provide init-env empty-env extend-env apply-env) usage : ( init - env ) = [ i=1 , v=5 , x=10 ] expressed value 1 , v is bound to the expressed value 5 , and x is bound to the expressed value 10 . Page : 69 (define init-env (lambda () (extend-env 'i (...
184b4b0e356a11a27add7e7a5fb05ccc498c7c893ce3d66cef58669fa1aa1cd5
weblocks-framework/weblocks
yui-panel.lisp
(in-package :weblocks) (export '(yui-panel panel-on-close panel-on-end-drag)) (defwidget yui-panel (yui-widget) ((on-close :type function :accessor panel-on-close :initarg :on-close :initform (constantly t)) (on-end-drag :type function :accessor panel-on-end-drag :initarg :on-end-drag :initform (constantly t)))...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/lpolzer/yui/yui-panel.lisp
lisp
(in-package :weblocks) (export '(yui-panel panel-on-close panel-on-end-drag)) (defwidget yui-panel (yui-widget) ((on-close :type function :accessor panel-on-close :initarg :on-close :initform (constantly t)) (on-end-drag :type function :accessor panel-on-end-drag :initarg :on-end-drag :initform (constantly t)))...
104850d0ee49f091f4ab95ce6b00363ce5df914e7f1a193b154ece3dbda1cbde
jrh13/hol-light
examples.ml
(* ---------------------------------------------------------------------- *) (* Paper *) (* ---------------------------------------------------------------------- *) ---------------------------- Chebychev ----------------------------- time REAL_QE...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Rqe/examples.ml
ocaml
---------------------------------------------------------------------- Paper ---------------------------------------------------------------------- ------------------------------------------------------------------------- Examples. ...
---------------------------- Chebychev ----------------------------- time REAL_QELIM_CONV `!x. --(&1) <= x /\ x <= &1 ==> -- (&1) <= &2 * x pow 2 - &1 /\ &2 * x pow 2 - &1 <= &1`;; DATE ------- HOL -------- 5/20 4.92 5/22 4.67 DATE ------- HOL -------- 5/20 4.92 5/22 ...
a2a6e3426bfb1c2e9e046ec5e76722a50d597ddd88a3ccfc251088700f1215a6
ccqpein/Github-API-CL
api-doc-test.lisp
(defpackage #:api-doc-test (:use #:CL #:lisp-unit) (:import-from #:github-api-doc #:api-doc #:make-call-parameters #:make-call-url)) (in-package #:api-doc-test) (define-test coerce-parameter-type-test (assert-equal "" (github-api-doc::coerce-parameter-type "" "str...
null
https://raw.githubusercontent.com/ccqpein/Github-API-CL/dfee2e9e0ca81af0d64365d1724da8205017c637/api-doc-test.lisp
lisp
from (read-line) or keywords from keyword from (read-line) empty (read-line) fake input from repl input by keywords, ignore wrong parameters input by keywords
(defpackage #:api-doc-test (:use #:CL #:lisp-unit) (:import-from #:github-api-doc #:api-doc #:make-call-parameters #:make-call-url)) (in-package #:api-doc-test) (define-test coerce-parameter-type-test (assert-equal "" (github-api-doc::coerce-parameter-type "" "str...
6506eee3c8176dde7a5f6e2f93f7bde60d1921c9c96d4f3a6e85b1ba862af284
cyverse-archive/DiscoveryEnvironmentBackend
es_if.clj
(ns infosquito.es-if) (defprotocol Indexes (delete [_ index type id] "Maps to clojurewerkz.elastisch.rest.document/delete") (exists? [_ index] "Maps to clojurewerkz.elastisch.rest.index/exists?") (put [_ index type id doc-map] "Maps to clojurewerkz.elastisch.rest.document/put") (put-bu...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Infosquito/src/infosquito/es_if.clj
clojure
(ns infosquito.es-if) (defprotocol Indexes (delete [_ index type id] "Maps to clojurewerkz.elastisch.rest.document/delete") (exists? [_ index] "Maps to clojurewerkz.elastisch.rest.index/exists?") (put [_ index type id doc-map] "Maps to clojurewerkz.elastisch.rest.document/put") (put-bu...
86c8dbe4d59a97546155170dffb8d2ce9b5655f8388ae3feee8b6010aa93a6c6
hpyhacking/openpoker
op_exch.erl
-module(op_exch). -behaviour(gen_server). -export([behaviour_info/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start_link/3, stop/1, stop/2, cast/2, call/2]). -include("openpoker.hrl"). behaviour_info(callbacks) -> [ {id, 0}, {init, 2}, ...
null
https://raw.githubusercontent.com/hpyhacking/openpoker/643193c94f34096cdcfcd610bdb1f18e7bf1e45e/src/op_exch.erl
erlang
client callback io:format("==========================================~n"), io:format("msg: ~p~n", [Msg]), private continue current state next new state skip mod process, post to Module:dispatch. stop current mod, init next mod repeat current mod, re init mod goto specil mod
-module(op_exch). -behaviour(gen_server). -export([behaviour_info/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start_link/3, stop/1, stop/2, cast/2, call/2]). -include("openpoker.hrl"). behaviour_info(callbacks) -> [ {id, 0}, {init, 2}, ...
9130bab95e98099ba04877f08014929e119beaae9414bae4f55244a8f754df5f
ocaml-community/obus
nm_device.mli
* nm_device.mli * ------------- * Copyright : ( c ) 2010 , < > * 2010 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * nm_device.mli * ------------- * Copyright : (c) 2010, Pierre Chambart <> * 2010, Jer...
null
https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/bindings/network-manager/nm_device.mli
ocaml
* NetworkManager devices * {8 Types} * The device is in an unknown state. * The device is not managed by NetworkManager. * The device cannot be used (carrier off, rfkill, etc) * The device is not connected. * The device is preparing to connect. * The device is being configured. * The device is awaiting secrets...
* nm_device.mli * ------------- * Copyright : ( c ) 2010 , < > * 2010 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * nm_device.mli * ------------- * Copyright : (c) 2010, Pierre Chambart <> * 2010, Jer...
84a3702a1037fb66d2e1a17de1b2f5abb71a2e562de9a639ef816bd0003b54e4
kawasima/jagrid
layout.clj
(ns jagrid.example.layout (:use [hiccup core page element])) (defn view-layout [options & content] (html5 [:head [:meta {:charset "utf-8"}] [:title (:title options)] (include-css "-1/css/simplex/bootstrap.min.css" "" "example.css") [:link#jagrid-css {:href "../css/jagrid.css" :rel...
null
https://raw.githubusercontent.com/kawasima/jagrid/524b351c47ba2648f96ce8ef5ee431d0eb594d28/src/jagrid/example/layout.clj
clojure
(ns jagrid.example.layout (:use [hiccup core page element])) (defn view-layout [options & content] (html5 [:head [:meta {:charset "utf-8"}] [:title (:title options)] (include-css "-1/css/simplex/bootstrap.min.css" "" "example.css") [:link#jagrid-css {:href "../css/jagrid.css" :rel...
f8f2cc3c8798820516f12a4c34c546a9ee7507e90140dc9a7eba083e74d2bd0c
xtdb/core2
user.clj
(ns user (:require [clojure.java.io :as io] [clojure.tools.namespace.repl :as ctn] core2.edn [core2.util :as util] [time-literals.read-write :as time-literals]) (:import java.io.File)) (alter-var-root #'*warn-on-reflection* (constantly true)) (ctn/disable-reload!) (...
null
https://raw.githubusercontent.com/xtdb/core2/5546a6c215631fbe4e5e67a2beb11e023dd01f11/src/dev/clojure/user.clj
clojure
(ns user (:require [clojure.java.io :as io] [clojure.tools.namespace.repl :as ctn] core2.edn [core2.util :as util] [time-literals.read-write :as time-literals]) (:import java.io.File)) (alter-var-root #'*warn-on-reflection* (constantly true)) (ctn/disable-reload!) (...
ae33d886b0c2441feea8c391cef8f468c260a11944cf7e01f5ba81d0dc2df34b
mvr/at
AbelianCategoryProperties.hs
module AbelianCategoryProperties where import Data.Proxy import Test.Hspec import Test.QuickCheck import Math.ValueCategory import Math.ValueCategory.Abelian import Math.ValueCategory.Additive spec :: forall c. ( AbelianCategory c, Eq c, Eq (Arrow c), Show c, Show (Arrow c), Arbitrary c, ...
null
https://raw.githubusercontent.com/mvr/at/f08b25ee2d83f761fd288a66f05dad1943879db1/test/AbelianCategoryProperties.hs
haskell
module AbelianCategoryProperties where import Data.Proxy import Test.Hspec import Test.QuickCheck import Math.ValueCategory import Math.ValueCategory.Abelian import Math.ValueCategory.Additive spec :: forall c. ( AbelianCategory c, Eq c, Eq (Arrow c), Show c, Show (Arrow c), Arbitrary c, ...
f214e4bfa092e743b31921d89465903ce0ae643c923eb6127b76219415eeb33c
ndmitchell/catch
ReqEq.hs
module ReqEq( equalReq, equalReqs, enumerateReqs ) where import Req import Path import PathCtor import PathCtorEq import Data.List import Data.Maybe import Data.Proposition import Yhc.Core import General import Debug.Trace equalReq :: Req -> Req -> Bool equalReq (Req a1 b1@(PathCtor core _ _)) (Req a2 ...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/analyse/ReqEq.hs
haskell
module ReqEq( equalReq, equalReqs, enumerateReqs ) where import Req import Path import PathCtor import PathCtorEq import Data.List import Data.Maybe import Data.Proposition import Yhc.Core import General import Debug.Trace equalReq :: Req -> Req -> Bool equalReq (Req a1 b1@(PathCtor core _ _)) (Req a2 ...
66e2ce0f9f2f3543fc90477b4e9bb0fc675212ea465dcd69592a8b3df1035126
pirapira/coq2rust
conv_oracle.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/kernel/conv_oracle.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Priority for the expansion of cons...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names type oracle val ...
32c9e0fd2a5ddd300838537bf400c71b1f7d6f17094a787632e4098c12c7d817
evturn/haskellbook
11.08-for-example.hs
1 . What is the type of data constructor ` MakeExample ` ? What happens if you -- query the type of `Example`? data Example = MakeExample deriving Show -- Answer: Nullary. You can query the type of a data constructor but -- it makes no sense to query the type of a type constructor since itself -- is a type. 2 . ...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/11/11.08-for-example.hs
haskell
query the type of `Example`? Answer: Nullary. You can query the type of a data constructor but it makes no sense to query the type of a type constructor since itself is a type. what typeclass instances are defined for it? Answer: The definition is printed along with the instances it has. What gets printed in the...
1 . What is the type of data constructor ` MakeExample ` ? What happens if you data Example = MakeExample deriving Show 2 . What happens if you query the info on ` Example ` and can you determine 3 . but with a single type argument added to ` MakeExample ` ? data Example' = MakeExample' Int deriving Show ...
48b652fa67e53db34fe85649cf0c500db420032745ad121059af0993accf522f
hemmi/coq2scala
cbv.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/pretyping/cbv.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** *** Call by value reduction *** rel...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Pp open Term o...
bdcddf7e6c2770b835e1c08f432919846605cb6b1bdfe4c8b25b542c598a2208
mangpo/greenthumb
simulator-rosette.rkt
#lang s-exp rosette (require "simulator.rkt") (provide simulator-rosette%) (define simulator-rosette% (class simulator% (super-new)))
null
https://raw.githubusercontent.com/mangpo/greenthumb/7a8626205879af8c788f9927eeff643f4ddc5cde/simulator-rosette.rkt
racket
#lang s-exp rosette (require "simulator.rkt") (provide simulator-rosette%) (define simulator-rosette% (class simulator% (super-new)))
47f20ef4df410a74c33ea05d5e02b6e2223fe3b477c3fb4dda134382124c4d58
WhatsApp/eqwalizer
as_pat.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(as_pat). -compile([export_all, nowarn_export_all]). -record(box_a, {a :: atom()}). -record(bo...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/9935940d71ef65c7bf7a9dfad77d89c0006c288e/eqwalizer/test_projects/check/src/as_pat.erl
erlang
the LICENSE file in the root directory of this source tree.
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(as_pat). -compile([export_all, nowarn_export_all]). -record(box_a, {a :: atom()}). -record(box_b, {b :: binary()}). -record(box_n, {n :: number()}). -type abn()...
1d87016fe9a848083a646015bc7bb7f372f073eac1e156ca341b2d9a49b38578
ocaml-flambda/flambda-backend
flambda_kind.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/23c793d6e94fa6ec43a61783df7cbfd50239536b/middle_end/flambda2/kinds/flambda_kind.mli
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2017 - -2019 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the * Kinds and subkinds of Flambda types . module Naked_number_kind : ...
e327050d15fc7de1dc73b716daa160019f698a7856a663a2b7ed4c156dd6f456
storm-framework/storm
Updates.hs
{-# LANGUAGE GADTs #-} {-@ LIQUID "--no-pattern-inline" @-} module Storm.Updates ( assign , updateWhere , combine ) where import Control.Monad.Reader import Database.Persist ( PersistRecordBackend , PersistField ...
null
https://raw.githubusercontent.com/storm-framework/storm/f746ff1bf4876ac55618224b41a1271db291608a/src/Storm/Updates.hs
haskell
# LANGUAGE GADTs # @ LIQUID "--no-pattern-inline" @ @ data Update user record < visibility :: Entity record -> user -> Bool , update :: Entity record -> Bool , capabilities :: Entity record -> Bool , policy :: Entity record -> Entity record -> user...
module Storm.Updates ( assign , updateWhere , combine ) where import Control.Monad.Reader import Database.Persist ( PersistRecordBackend , PersistField ) import qualified Database...
39587cfc7619e6106154754f66e76d20700654d8b53a848420347bff6c5cf7d4
macchiato-framework/macchiato-core
node_middleware.cljs
(ns macchiato.test.middleware.node-middleware (:require [macchiato.middleware.node-middleware :refer [wrap-node-middleware]] [cljs.test :refer-macros [is deftest testing]])) (defn fake-node-middleware "Sets properties in the req and res js objects." [node-req node-res next] (aset node-req "user" "john") ...
null
https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/test/macchiato/test/middleware/node_middleware.cljs
clojure
(ns macchiato.test.middleware.node-middleware (:require [macchiato.middleware.node-middleware :refer [wrap-node-middleware]] [cljs.test :refer-macros [is deftest testing]])) (defn fake-node-middleware "Sets properties in the req and res js objects." [node-req node-res next] (aset node-req "user" "john") ...
14dc6e5a92c15d1a2026ccb1a984c545cb59da1b7cc6a90591244ea27ba813f1
arttuka/reagent-material-ui
vape_free_two_tone.cljs
(ns reagent-mui.icons.vape-free-two-tone "Imports @mui/icons-material/VapeFreeTwoTone 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 vape-free-two-tone (cr...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/vape_free_two_tone.cljs
clojure
(ns reagent-mui.icons.vape-free-two-tone "Imports @mui/icons-material/VapeFreeTwoTone 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 vape-free-two-tone (cr...
e2d1538b38dac8bd88021d2db2ab7faf8516f3000b92a61ae5ecbcc680812169
vrnithinkumar/ETC
env_solver.erl
-module(env_solver). -export([solve_envs/2]). -spec solve_envs(hm:env(), hm:env()) -> hm:env(). solve_envs(Env1, Env2) -> Env1. we have to take the two env and solve the type_var_bindings .
null
https://raw.githubusercontent.com/vrnithinkumar/ETC/5e5806975fe96a902dab830a0c8caadc5d61e62b/src/env_solver.erl
erlang
-module(env_solver). -export([solve_envs/2]). -spec solve_envs(hm:env(), hm:env()) -> hm:env(). solve_envs(Env1, Env2) -> Env1. we have to take the two env and solve the type_var_bindings .
23fb2f99398e1b9be8dd33febda019b0feecebdd59e9578ca4aa873f46cfdaa4
screenshotbot/screenshotbot-oss
auto-cleanup.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/model/auto-cleanup (:use #:cl) (:import-from #:bknr.da...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/7d884c485b2693945578ab19bc5ea45ff654b437/src/screenshotbot/model/auto-cleanup.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/model/auto-cleanup (:use #:cl) (:import-from #:bknr.datastore #:class-instances) (:import-from...
cc3c965f851060133c29e111f6c243afeb9b0aff02c74e45b6a2db5ad14c867c
lvaruzza/cl-randist
binomial.lisp
(in-package :randist) (declaim (optimize (speed 3) (safety 1) (debug 0))) ;; /* The binomial distribution has the form, prob(k ) = n!/(k!(n - k ) ! ) * p^k ( 1 - p)^(n - k ) for k = 0 , 1 , ... , n This is the algorithm from Knuth * / ;; /* Default binomial generator is now in binomial_tpe.c */ ;; u...
null
https://raw.githubusercontent.com/lvaruzza/cl-randist/413204fa2b9e7f0431c0bc45367304af937494ff/binomial.lisp
lisp
/* The binomial distribution has the form, /* Default binomial generator is now in binomial_tpe.c */ unsigned int { { double X; a = 1 + (n / 2); X = gsl_ran_beta (r, (double) a, (double) b); if (X >= p) { n = a - 1; p /= X; } else ...
(in-package :randist) (declaim (optimize (speed 3) (safety 1) (debug 0))) prob(k ) = n!/(k!(n - k ) ! ) * p^k ( 1 - p)^(n - k ) for k = 0 , 1 , ... , n This is the algorithm from Knuth * / gsl_ran_binomial_knuth ( const gsl_rng * r , double p , unsigned int n ) while ( n > 10 ) / * Th...
e3f4b429d56be476025dace93a18738a1ba5cebdc26f455213bc6c7e0cad425f
avsm/eeww
bench_condition.ml
open Eio.Std A publisher keeps updating a counter and signalling a condition . Two consumers read the counter whenever they get a signal . The producer stops after signalling [ target ] , and the consumers stop after seeing it . Two consumers read the counter whenever they get a signal. The producer ...
null
https://raw.githubusercontent.com/avsm/eeww/ab64c5391b67fb3f5b1d3de5e0a5a5cb4c80207b/lib/eio/bench/bench_condition.ml
ocaml
traceln "set %d" i; traceln "saw %d" current;
open Eio.Std A publisher keeps updating a counter and signalling a condition . Two consumers read the counter whenever they get a signal . The producer stops after signalling [ target ] , and the consumers stop after seeing it . Two consumers read the counter whenever they get a signal. The producer ...
5e82bde0f4e49bf29afac5fd9bf1562532aa16507381c8392a8a545bb880209f
goldfirere/units
Combinators.hs
Data / Metrology / Combinators.hs The units Package Copyright ( c ) 2013 This file defines combinators to build more complex units and dimensions from simpler ones . The units Package Copyright (c) 2013 Richard Eisenberg This file defines combinators to build more complex uni...
null
https://raw.githubusercontent.com/goldfirere/units/4941c3b4325783ad3c5b6486231f395279d8511e/units/Data/Metrology/Combinators.hs
haskell
# OPTIONS_GHC -Wno-redundant-constraints # For example: @type MetersSquared = Meter :* Meter@ we override the default conversion lookup behavior this should never be called this should never be called | Raise a unit to a power, known at compile time | Multiply a conversion ratio by some constant. Used for definin...
Data / Metrology / Combinators.hs The units Package Copyright ( c ) 2013 This file defines combinators to build more complex units and dimensions from simpler ones . The units Package Copyright (c) 2013 Richard Eisenberg This file defines combinators to build more complex uni...
91fd507903d1b4f5ed979a1c771ae2047b93d1ac4827ecdb5e1509e773c53693
janestreet/sexp
main_json.mli
open! Core val of_json_command : Command.t val to_json_command : Command.t
null
https://raw.githubusercontent.com/janestreet/sexp/0bf688bb9935b540a712c8f5429caa50b5ee45c3/bin/main_json.mli
ocaml
open! Core val of_json_command : Command.t val to_json_command : Command.t
fbfdb7fc9c0eb3a25b1c7bbc50e0c5eca354923de10a0033a2277f9009bcae02
ghc/packages-dph
Tuple.hs
module Data.Array.Parallel.Prelude.Tuple ( tup2, tup3, tup4 ) where import Data.Array.Parallel.Lifted.Closure import Data.Array.Parallel.Lifted.PArray import Data.Array.Parallel.PArray.PDataInstances tup2 :: (PA a, PA b) => a :-> b :-> (a,b) # INLINE tup2 # tup2 = closure2 (,) zipPA# tup3 :: (PA a, PA b, PA c) =...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-lifted-copy/Data/Array/Parallel/Prelude/Tuple.hs
haskell
module Data.Array.Parallel.Prelude.Tuple ( tup2, tup3, tup4 ) where import Data.Array.Parallel.Lifted.Closure import Data.Array.Parallel.Lifted.PArray import Data.Array.Parallel.PArray.PDataInstances tup2 :: (PA a, PA b) => a :-> b :-> (a,b) # INLINE tup2 # tup2 = closure2 (,) zipPA# tup3 :: (PA a, PA b, PA c) =...
e5cda051728680505fb2f07944aa918ed6fbccb82832a4801352046f175b54cb
semperos/clj-webdriver
core_actions.clj
(in-ns 'webdriver.core) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Functions for Actions Class ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; TODO: test coverage (defmacro ->build-composite-action "Create a composite chain of actions, then call `.build()`. This does **not** execute the actions; it simply sets up an 'action chai...
null
https://raw.githubusercontent.com/semperos/clj-webdriver/508eb95cb6ad8a5838ff0772b2a5852dc802dde1/src/webdriver/core_actions.clj
clojure
Functions for Actions Class ;; TODO: test coverage it simply sets up an 'action chain' which can later by executed using `.perform()`. TODO: test coverage e.g. .moveToElement(otherElement) .release(otherElement)
(in-ns 'webdriver.core) (defmacro ->build-composite-action Unless you need to wait to execute your composite actions, you should prefer `->actions` to this macro." [driver & body] `(let [acts# (doto (Actions. (.webdriver ~driver)) ~@body)] (.build acts#))) (defmacro ->actions [driver ...
5b98ccd82243eae4debf3f2f420344a1c9e8ebbe8fe94f90875207417e10af0d
cdfa/frugel
Scout.hs
module Scout ( module Scout.Node , module Scout.Program , module Scout.Evaluation , module Scout.Error , module Control.Limited , module Scout.PrettyPrinting , module Scout.Unbound , module Scout.Truncatable ) where import Control.Limited import Scout.Error import Scout.Evaluation ...
null
https://raw.githubusercontent.com/cdfa/frugel/d412673d8925a6f9eaad4e043cbd8fa46ed50aa2/scout-src/Scout.hs
haskell
module Scout ( module Scout.Node , module Scout.Program , module Scout.Evaluation , module Scout.Error , module Control.Limited , module Scout.PrettyPrinting , module Scout.Unbound , module Scout.Truncatable ) where import Control.Limited import Scout.Error import Scout.Evaluation ...
89be8c6ba16f70a643d1fe5d87c03d1d5e6a590edd47a0f56fb96a4b2728deac
melisgl/lassie
assemble.lisp
(in-package :lassie.assembler) Interface (defgeneric assemble-co-occurrence-matrix (assembler lister) (:documentation "Assemble MATRIX and remember how to perform the same kind of activity on subsequent calls to ASSEMBLE-TERM-VECTOR and ASSEMBLE-DOCUMENT-VECTOR.")) (defgeneric assemble-term-vector (assembler lis...
null
https://raw.githubusercontent.com/melisgl/lassie/209b3435596090bc249a43ca7072a38f62a70d41/assemble.lisp
lisp
that's not adjustable.
(in-package :lassie.assembler) Interface (defgeneric assemble-co-occurrence-matrix (assembler lister) (:documentation "Assemble MATRIX and remember how to perform the same kind of activity on subsequent calls to ASSEMBLE-TERM-VECTOR and ASSEMBLE-DOCUMENT-VECTOR.")) (defgeneric assemble-term-vector (assembler lis...
993d73eb7ccd0a5cf8df02d858c558ec7789035af5498beb9190a67e32ce5a00
karlhof26/gimp-scheme
Antique Metal_02a.scm
Antique Metal rel 0.03 Created by Graechan ; You will need to install GMIC to run this Scipt ; GMIC can be downloaded from Thanks to Draconian for his Antique - metal tutorial ; that I followed to write this script. ; Comments directed to ; License : ; This program is free software: y...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/b97e730eed6a133af34a9ce32fa04d07cca4e5ab/Antique%20Metal_02a.scm
scheme
You will need to install GMIC to run this Scipt GMIC can be downloaded from that I followed to write this script. Comments directed to This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that i...
Antique Metal rel 0.03 Created by Graechan Thanks to Draconian for his Antique - metal tutorial License : it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or To view a copy of the GNU General Publ...
2b68a1514c550228597380e182090c681553ef9b1199ea0e4452a38e06381a5a
novaframework/nova
nova_cors_plugin.erl
-module(nova_cors_plugin). -behaviour(nova_plugin). -export([ pre_request/2, post_request/2, plugin_info/0 ]). %%-------------------------------------------------------------------- %% @doc %% Pre-request callback %% @end %%-----------------------------------------------------------...
null
https://raw.githubusercontent.com/novaframework/nova/481120d112b4243c43995eadb4fdf3552d7dfd55/src/plugins/nova_cors_plugin.erl
erlang
-------------------------------------------------------------------- @doc Pre-request callback @end -------------------------------------------------------------------- -------------------------------------------------------------------- @doc Post-request callback @end --------------------------------------------...
-module(nova_cors_plugin). -behaviour(nova_plugin). -export([ pre_request/2, post_request/2, plugin_info/0 ]). -spec pre_request(Req :: cowboy_req:req(), Options :: map()) -> {ok, Req0 :: cowboy_req:req()}. pre_request(Req, Options) -> ParsedOptions = no...
a810aebada3e5475b520c982141e49e5ff2bdd5a71d3470da34cd584d7501f98
exercism/erlang
run_length_encoding_tests.erl
Generated with ' v0.2.0 ' %% Revision 1 of the exercises generator was used %% -specifications/raw/a7576988aa2dafb38544c041c104603d39ac41bc/exercises/run-length-encoding/canonical-data.json %% This file is automatically generated from the exercises canonical data. -module(run_length_encoding_tests). -include_lib("...
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/run-length-encoding/test/run_length_encoding_tests.erl
erlang
Revision 1 of the exercises generator was used -specifications/raw/a7576988aa2dafb38544c041c104603d39ac41bc/exercises/run-length-encoding/canonical-data.json This file is automatically generated from the exercises canonical data.
Generated with ' v0.2.0 ' -module(run_length_encoding_tests). -include_lib("erl_exercism/include/exercism.hrl"). -include_lib("eunit/include/eunit.hrl"). '1_empty_string_test_'() -> {"empty string", ?_assertEqual([], run_length_encoding:encode([]))}. '2_single_characters_only_are_encoded_without_coun...
29e2080151ac080325d0922a4d1d9e8e2e2564879524772864b74189839bcd28
mpickering/apply-refact
Structure16.hs
foo = case v of _ | False -> x
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Structure16.hs
haskell
foo = case v of _ | False -> x
fc1dc6236ad69d383802b36e71c250f36c2527c83ab5bfb91d3d0694e9ec3441
ruricolist/serapeum
clos.lisp
(in-package :serapeum.tests) (def-suite clos :in serapeum) (in-suite clos) (defclass clos-example () ((slot1 :initarg :slot1 :reader clos-example-slot))) (defmethods clos-example (self slot1) (declare (symbol slot1)) (:method clos-example-1 (self) slot1)) (defmethods clos-example (self (slot slot...
null
https://raw.githubusercontent.com/ruricolist/serapeum/2e0007535d1b237a3ed457986afb37f545d1990a/tests/clos.lisp
lisp
(in-package :serapeum.tests) (def-suite clos :in serapeum) (in-suite clos) (defclass clos-example () ((slot1 :initarg :slot1 :reader clos-example-slot))) (defmethods clos-example (self slot1) (declare (symbol slot1)) (:method clos-example-1 (self) slot1)) (defmethods clos-example (self (slot slot...
e0753fd78417c1c13e5552aef5e35cf84fcb094afde78092702d8140a049d59c
CommonDoc/common-doc
nodes.lisp
(in-package :common-doc) (make-document "My Document" :children (list (make-section (list (make-text "Introduction")) :children (list (make-paragraph (list (make-text "..."))))))) COMMON-DOC> (dump my-doc) document section paragraph text-node "..." CL-USER> (...
null
https://raw.githubusercontent.com/CommonDoc/common-doc/66cabe67241449a1c0e2cbdc955a60c9439869e6/docs/nodes.lisp
lisp
(in-package :common-doc) (make-document "My Document" :children (list (make-section (list (make-text "Introduction")) :children (list (make-paragraph (list (make-text "..."))))))) COMMON-DOC> (dump my-doc) document section paragraph text-node "..." CL-USER> (...
76be21080faa884eaf72648319b0287ed53f9f279ed5f235e98443421de3f4e3
malthe/bs-virtualdom
virtualdom_types.ml
open Virtualdom_events type ('a, 'b) handler = 'a Dom.event_like -> 'b option type 'a t = Attached of 'a vnode | Attribute of string option * string * string | Component : ( ('b -> 'c t) * (('c -> unit) -> 'c -> 'a) * 'b * ('c t * EventSet.t * EventSet.t) option ) -> 'a t | Class...
null
https://raw.githubusercontent.com/malthe/bs-virtualdom/ed57fa83b6b5258218de4fafb03dd2a7b3e12565/src/virtualdom_types.ml
ocaml
open Virtualdom_events type ('a, 'b) handler = 'a Dom.event_like -> 'b option type 'a t = Attached of 'a vnode | Attribute of string option * string * string | Component : ( ('b -> 'c t) * (('c -> unit) -> 'c -> 'a) * 'b * ('c t * EventSet.t * EventSet.t) option ) -> 'a t | Class...
01ecd6f8a56b555593a7ca31535929263b61019a5f331d3a0c2a79159653911d
softwarelanguageslab/maf
R5RS_gambit_mazefun-2.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 * negated predicates : 1 * swapped branches : 1 * calls to i d fun : 8 (letrec ((foldr (lambda (f base lst) (letrec ((foldr-aux (lambda (lst) (if (null? lst) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_mazefun-2.scm
scheme
Changes:
* removed : 0 * added : 1 * swaps : 0 * negated predicates : 1 * swapped branches : 1 * calls to i d fun : 8 (letrec ((foldr (lambda (f base lst) (letrec ((foldr-aux (lambda (lst) (if (null? lst) base ...
ec88415257857ae131e46751919c1852481b51f9d1fe494beb41b4405a267824
aarkerio/ZentaurLMS
users_test.clj
(ns zentaur.models.users-test "Business logic in models test" (:require [clojure.test :as ct] [zentaur.factories.user-factory :as ufac] [zentaur.db.core :as db] [zentaur.models.users :as mu])) ;; (deftest ^:business-logic eg-tests (is (= 1 1))) ( defn destroy [ i d ] ( le...
null
https://raw.githubusercontent.com/aarkerio/ZentaurLMS/adb43fb879b88d6a35f7f556cb225f7930d524f9/test/clj/zentaur/models/users_test.clj
clojure
(deftest ^:business-logic eg-tests (is (= 1 1))) (db/delete-post! {:id int-id}))) (ct/deftest create (ct/testing "With valid input" (ct/testing "it should returns an empty map"
(ns zentaur.models.users-test "Business logic in models test" (:require [clojure.test :as ct] [zentaur.factories.user-factory :as ufac] [zentaur.db.core :as db] [zentaur.models.users :as mu])) ( defn destroy [ i d ] ( let [ int - id ( Integer / parseInt i d ) ] (...
d6fcf424a89766166fcef80013f41e4e4b1f5f494d982e5e75be7156afc0d763
Stratus3D/programming_erlang_exercises
lib_tester_db.erl
%%%------------------------------------------------------------------- %%% Heavily inspired by %%% -erlang-chapter-23/blob/7434c2eedce8b93b41ef4c68dd1690cbca5c8374/lib_tester_db.erl %%%------------------------------------------------------------------- -module(lib_tester_db). %% API -export([init/2, get_state/0, updat...
null
https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_23/exercise_5/src/lib_tester_db.erl
erlang
------------------------------------------------------------------- Heavily inspired by -erlang-chapter-23/blob/7434c2eedce8b93b41ef4c68dd1690cbca5c8374/lib_tester_db.erl ------------------------------------------------------------------- API =================================================================== API =...
-module(lib_tester_db). -export([init/2, get_state/0, update_state/1]). -define(TABLE, state). init(Nodes, Fields) -> ok = mnesia:start(), case mnesia:wait_for_tables([?TABLE], 1000) of ok -> io:format("Loaded tables~n"), ok; {timeout, _Time} -> io:format(...
4ce20f3462defc912578fd58a366921ecdfbd974e4cd13eab4af7067f2f5c9df
OCamlPro/operf-macro
build.ml
#!/usr/bin/env ocaml #directory "pkg" #use "topkg.ml" let () = Pkg.describe "operf-macro" ~builder:`OCamlbuild [ Pkg.lib "pkg/META"; Pkg.lib ~exts:Exts.module_library "lib/macroperf"; Pkg.bin ~dst:"operf-macro" ~auto:true "src/macrorun"; Pkg.bin ~auto:true "src/injector"; Pkg.man ~dst:"man1/operf...
null
https://raw.githubusercontent.com/OCamlPro/operf-macro/0701292ef2a77bb8e151e804fd25899e3403fbb9/pkg/build.ml
ocaml
#!/usr/bin/env ocaml #directory "pkg" #use "topkg.ml" let () = Pkg.describe "operf-macro" ~builder:`OCamlbuild [ Pkg.lib "pkg/META"; Pkg.lib ~exts:Exts.module_library "lib/macroperf"; Pkg.bin ~dst:"operf-macro" ~auto:true "src/macrorun"; Pkg.bin ~auto:true "src/injector"; Pkg.man ~dst:"man1/operf...
b02b24efe2b188cb887c1ca9db7c49a7e64e76b240e03dbf7657266421959743
yrashk/erlang
ssh_sftp.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2005 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/ssh/src/ssh_sftp.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2005 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ssh_sftp). -behaviour(ssh_chann...
8032210fb71d76714838a6a53b5230edc005fc3b3c82a27a256335bcc59cd3ee
netguy204/clojure-gl
particle.clj
(ns clojure-gl.particle (:use (clojure-gl primitive))) (defn random-between [min max] (let [range (- max min) rand (Math/random)] (+ min (* rand range)))) (defn random-angle [] (random-between 0 360)) (defn fire-particle [pt] {:center pt :rotation (random-angle) :scale (random-between 0.1 0...
null
https://raw.githubusercontent.com/netguy204/clojure-gl/055f73baf1af0149191f3574ad82f35017c532fc/src/clojure_gl/particle.clj
clojure
(ns clojure-gl.particle (:use (clojure-gl primitive))) (defn random-between [min max] (let [range (- max min) rand (Math/random)] (+ min (* rand range)))) (defn random-angle [] (random-between 0 360)) (defn fire-particle [pt] {:center pt :rotation (random-angle) :scale (random-between 0.1 0...
9453238ab789735f13b39d3b87bc6eae68d414582c0d76dfe6281ae53e547420
carotene/carotene
carotene_api_authorization.erl
-module(carotene_api_authorization). -export([authorize/1]). -include_lib("eunit/include/eunit.hrl"). authorize(Ip) -> case application:get_env(carotene, restrict_api_access_to) of undefined -> true; {ok, Ip} -> true; _SomeIp -> false end.
null
https://raw.githubusercontent.com/carotene/carotene/963ecad344ec1c318c173ad828a5af3c000ddbfc/src/carotene_api_authorization.erl
erlang
-module(carotene_api_authorization). -export([authorize/1]). -include_lib("eunit/include/eunit.hrl"). authorize(Ip) -> case application:get_env(carotene, restrict_api_access_to) of undefined -> true; {ok, Ip} -> true; _SomeIp -> false end.
354cd6a5b75b9e2725d2d306f160bb2a9cb7cb0650e2f0966a402e53c5fc7977
helvm/helma
Symbol.hs
module HelVM.HelMA.Automata.BrainFuck.Common.Symbol ( inc, compare0, def, next, prev, toInteger, fromChar, toChar, Symbol, ) where import Data.Default (Default) import qualified Data.Default as Default import qualified Relude.Extra as Extra inc :: Symbol e => e -> e -> e inc = flip (+) c...
null
https://raw.githubusercontent.com/helvm/helma/b837ddc28308f3fe9bf506dbe68e2b42a142248c/hs/src/HelVM/HelMA/Automata/BrainFuck/Common/Symbol.hs
haskell
toInteger :: e -> Integer toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral toInteger = fromIntegral
module HelVM.HelMA.Automata.BrainFuck.Common.Symbol ( inc, compare0, def, next, prev, toInteger, fromChar, toChar, Symbol, ) where import Data.Default (Default) import qualified Data.Default as Default import qualified Relude.Extra as Extra inc :: Symbol e => e -> e -> e inc = flip (+) c...
7520e077e2bf65cbc2bf0a6cc62135f4e7b7389031d818e784f4c63ef706a97d
tschady/advent-of-code
d12_test.clj
(ns aoc.2015.d12-test (:require [aoc.2015.d12 :as sut] [clojure.test :refer :all])) (deftest part-1-examples (are [output input] (= output (sut/part-1 input)) 6 "[1,2,3]" 6 "{\"a\":2, \"b\":4}" 3 "[[[3]]]" 3 "{\"a\":{\"b\":4},\"c\":-1}" 0 "{\"a\":[-1,1]}" 0 "[-1,{\"a\":1}]" ...
null
https://raw.githubusercontent.com/tschady/advent-of-code/1e4a95ef580c3bf635837eff52aa998b0acfc666/test/aoc/2015/d12_test.clj
clojure
(ns aoc.2015.d12-test (:require [aoc.2015.d12 :as sut] [clojure.test :refer :all])) (deftest part-1-examples (are [output input] (= output (sut/part-1 input)) 6 "[1,2,3]" 6 "{\"a\":2, \"b\":4}" 3 "[[[3]]]" 3 "{\"a\":{\"b\":4},\"c\":-1}" 0 "{\"a\":[-1,1]}" 0 "[-1,{\"a\":1}]" ...
3fc497540dfa3e71469e6e5d1bcc99374268d11f209227b6d5a5f533e4496b0f
yetibot/core
util.clj
(ns yetibot.core.util (:require [clojure.string :as s] [cemerick.url :refer [url]])) (defn filter-nil-vals "Takes a map and returns all of its non-nil values" [m] (into {} (remove (comp nil? second) m))) (defn map-to-strs "takes a hash-map and parses it to a map-like sequence" [m] (map (fn [[k v...
null
https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/util.clj
clojure
collection parsing helpers for all collection cmds keys / vals helpers image detection
(ns yetibot.core.util (:require [clojure.string :as s] [cemerick.url :refer [url]])) (defn filter-nil-vals "Takes a map and returns all of its non-nil values" [m] (into {} (remove (comp nil? second) m))) (defn map-to-strs "takes a hash-map and parses it to a map-like sequence" [m] (map (fn [[k v...
971d364eb609ae76c24736dc7b19ed7f0940adf6450243e1e0ccc8d5c173e121
spechub/Hets
GtkProverGUI.hs
| Module : ./GUI / GtkProverGUI.hs Description : Gtk GUI for the prover Copyright : ( c ) , Uni Bremen 2008 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable This module provides a GUI for the prover . Module...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/GUI/GtkProverGUI.hs
haskell
| Displays the consistency checker window ^ record of possible GUI actions ^ theory name ^ warning information ^ theory ^ map of known provers ^ list of suitable comorphisms to provers for sublogic of G_theory get objects buttons at buttom goals view axioms view theorems view status prover set list data ...
| Module : ./GUI / GtkProverGUI.hs Description : Gtk GUI for the prover Copyright : ( c ) , Uni Bremen 2008 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable This module provides a GUI for the prover . Module...
fcc2d1243e0b1696daf541e98f9efae43c2b2dbfe108a11c08a1115392fca595
pNre/Hera
module_air_quality.ml
open Async open Core open Error_handler type city = { name : string } [@@deriving of_jsonaf] [@@jsonaf.allow_extra_fields] type data = { city : city ; dominentpol : string ; aqi : int } [@@deriving of_jsonaf] [@@jsonaf.allow_extra_fields] type response = { status : string ; data : data } [@@deriving of...
null
https://raw.githubusercontent.com/pNre/Hera/f3928380eb94a61637f0459818f9cec650ee8220/hera/module_air_quality/module_air_quality.ml
ocaml
Bot module
open Async open Core open Error_handler type city = { name : string } [@@deriving of_jsonaf] [@@jsonaf.allow_extra_fields] type data = { city : city ; dominentpol : string ; aqi : int } [@@deriving of_jsonaf] [@@jsonaf.allow_extra_fields] type response = { status : string ; data : data } [@@deriving of...
1021fc9eeca10e026e7ff95b9a59082c3ab6030b1301aac7b72205659ccc7015
OCamlPro/freeton_wallet
commandSwitchCreate.ml
(**************************************************************************) (* *) Copyright ( c ) 2021 OCamlPro SAS (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/freeton_wallet/fd9a1edf51aa7c187b40aef8e0c8186a44209890/src/freeton_wallet_lib/commandSwitchCreate.ml
ocaml
************************************************************************ All rights reserved. This file is distributed u...
Copyright ( c ) 2021 OCamlPro SAS Public License version 2.1 , with the special exception on linking open Ezcmd.V2 open EZCMD.TYPES open Types let action ~switch ~url ~image ~force ?(toolchain="") () = match switch with | None -> Error.raise "You mus...
07ea560a381be95ffacf22ca61b7b4e54735aeeb89eab671fed1c60ee48a1d67
semilin/layoup
rnst02.lisp
(MAKE-LAYOUT :NAME "rnst02" :MATRIX (APPLY #'KEY-MATRIX '("xblmvgpuo," "rnstdyceai" "zhjkqwf;'.")) :SHIFT-MATRIX NIL :KEYBOARD NIL)
null
https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/rnst02.lisp
lisp
(MAKE-LAYOUT :NAME "rnst02" :MATRIX (APPLY #'KEY-MATRIX '("xblmvgpuo," "rnstdyceai" "zhjkqwf;'.")) :SHIFT-MATRIX NIL :KEYBOARD NIL)
de2e56c4a8824171aca59874b094d9c1836eed02839b462f14628c922f690ee8
tov/dssl2
rte.rkt
#lang racket/base (provide current-dssl-test-points setup-rte) (require (only-in racket/port relocate-input-port) "parser.rkt" "printer.rkt") (define current-dssl-test-points (make-parameter #t)) (define (setup-rte) (global-port-print-handler (λ (value port) (dss...
null
https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/private/rte.rkt
racket
#lang racket/base (provide current-dssl-test-points setup-rte) (require (only-in racket/port relocate-input-port) "parser.rkt" "printer.rkt") (define current-dssl-test-points (make-parameter #t)) (define (setup-rte) (global-port-print-handler (λ (value port) (dss...
ee1d298daf2adfa645c0b16deb3fbcad7841f8ef19ea7c52c63f2df664924dda
awakesecurity/hocker
Image.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # ----------------------------------------------------------------------------- -- | -- Module : Data.Docker.Image Copyright : ( C ) 2016 Awake Networks -- License : Apache-2.0 Maintainer : Awake Ne...
null
https://raw.githubusercontent.com/awakesecurity/hocker/4610befce9881e85925e96ebf464e925fae67164/test/Tests/Data/Docker/Image.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | Module : Data.Docker.Image License : Apache-2.0 Stability : stable -------------------------------------------------------------------------- ---------------------------------------------------...
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # Copyright : ( C ) 2016 Awake Networks Maintainer : Awake Networks < > module Tests.Data.Docker.Image where import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as C8L import Data.Docker.Image.Types import ...
9140b5a44f2ae31c5e40f2bc8459f7c15e70fb9fafdb5a3e554d90a10c32ec6d
Frama-C/Frama-C-snapshot
wpStrategy.ml
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/wpStrategy.ml
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
e6de1d1d59c6b5d645d0f9a459d38656f05389d6604127d6e39885d11049b37f
irfn/clojure-ocr
string_ops.clj
(ns test.string-ops (:use clojure.test) (:use string-ops)) (deftest test-lines (are [description split-lines some-text] (= split-lines (lines some-text)) "splitting lines" [" _ _ _ _ _ _ _", "| _| _||_||_ |_ ||_||_|", "||_ _| | _||_| ||_| _|"] " _ _ _ _ _ _ _\n| _|...
null
https://raw.githubusercontent.com/irfn/clojure-ocr/c89da89031379a9c0367c68884caf4fcb40bb2da/test/test/string_ops.clj
clojure
(ns test.string-ops (:use clojure.test) (:use string-ops)) (deftest test-lines (are [description split-lines some-text] (= split-lines (lines some-text)) "splitting lines" [" _ _ _ _ _ _ _", "| _| _||_||_ |_ ||_||_|", "||_ _| | _||_| ||_| _|"] " _ _ _ _ _ _ _\n| _|...
d40d917b53457df77c70a8fc573bf8fc3b60c884ba2b10558c2087cc9ccf9e25
edalorzo/learning-clojure
chapter04.clj
(ns learn.chapter04 (:require [clojure.algo.generic.math-functions :as math :refer :all])) (defn ad-hoc-type-name [thing] (condp = (type thing) java.lang.String "String" clojure.lang.PersistentVector "Vector")) (def type-name-implementations {java.lang.String (fn [thing] "...
null
https://raw.githubusercontent.com/edalorzo/learning-clojure/b5db63d8e783767a85af19ccb8dbf4d4e0f53d62/src/learn/chapter04.clj
clojure
POLYMORPHISM AND MULTIMETHODS this is an example of close dispatch where the referrer is the dispatch criteria the problem is that adding referrers requires code changes MULTIMETHODS TO THE RESCUE! this is equivalent to just using :referrer implementation of the multimethod the default method can also be defined in...
(ns learn.chapter04 (:require [clojure.algo.generic.math-functions :as math :refer :all])) (defn ad-hoc-type-name [thing] (condp = (type thing) java.lang.String "String" clojure.lang.PersistentVector "Vector")) (def type-name-implementations {java.lang.String (fn [thing] "...
9fcd30c757cb5ec8b1c98d1890bb054f97b789fa9b1c1164d8f8596cca3d4a27
TakaiKinoko/Cornell_CS3110_OCaml
04bstDict.ml
* 4 . binary search tree dictionary Write a module BstDict that implements the Dictionary module type using the tree type . Write a module BstDict that implements the Dictionary module type using the tree type.*) module type Dictionary = sig type ('k, 'v) t val empty : ('k, 'v) t val insert : 'k -> 'v -...
null
https://raw.githubusercontent.com/TakaiKinoko/Cornell_CS3110_OCaml/0a830bc50a5e39f010074dc289161426294cad1d/Chap5_Modules/08exercises/04bstDict.ml
ocaml
* tricky!! * tests * note when to use asteriks, and when "," * note when to use asteriks, and when ","
* 4 . binary search tree dictionary Write a module BstDict that implements the Dictionary module type using the tree type . Write a module BstDict that implements the Dictionary module type using the tree type.*) module type Dictionary = sig type ('k, 'v) t val empty : ('k, 'v) t val insert : 'k -> 'v -...
224826aa6820c0b8262804e41baf0975157f1f7e19ace5ec96fadb3ae1d199ef
ddmcdonald/sparser
session.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: SPARSER -*- Copyright ( c ) 2016 - 2022 SIFT LLC . All Rights Reserved . ;;; ;;; File: "session" ;;; Module: "init;" Version : January 2022 (in-package :sparser) Finalize the load . (when *load-the-grammar* (when *include-model-facilities* (load-...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/da94d1bbbed289859ddfcb6d352bced66054a939/Sparser/code/s/init/session.lisp
lisp
-*- Mode: LISP; Syntax: Common-Lisp; Package: SPARSER -*- File: "session" Module: "init;" This call announces the # of individuals in all the defined categories that have instances (see *referential-categories*) ---------- the very last thing to do ---------- Final session setup. Finally, print a saluta...
Copyright ( c ) 2016 - 2022 SIFT LLC . All Rights Reserved . Version : January 2022 (in-package :sparser) Finalize the load . (when *load-the-grammar* (when *include-model-facilities* (load-delayed-dossiers) (postprocess-grammar-indexes) (declare-all-existing-individuals-permanent))) (setup-s...
f0279569e69d2229bf09cbce984432b6538a3e800b3f270c3d1ef561de84576f
msakai/toysolver
CongruenceClosure.hs
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wall # module Test.CongruenceClosure (ccTestGroup) where import Control.Monad import Control.Monad.State import Data.Array import Data.Graph import qualified Data.Tree as Tree import qualified Data.IntSet as IntSet import qualified Data.Set as Set import Test.Tasty import T...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/Test/CongruenceClosure.hs
haskell
---------------------------------------------------------------------- Test cases d = c = e = b = h ---------------------------------------------------------------------- Test harness
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wall # module Test.CongruenceClosure (ccTestGroup) where import Control.Monad import Control.Monad.State import Data.Array import Data.Graph import qualified Data.Tree as Tree import qualified Data.IntSet as IntSet import qualified Data.Set as Set import Test.Tasty import T...
1b70f36bba15cf7d761955e063ea68ba05fc68e76c308cabc597db1b494beb5a
cracauer/sbcl-ita
backtrace.impure.lisp
;;;; This file is for testing backtraces, using test machinery which might have side effects ( e.g. executing DEFUN ) . This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were wr...
null
https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/tests/backtrace.impure.lisp
lisp
This file is for testing backtraces, using test machinery which more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. The following objects shoul...
might have side effects ( e.g. executing DEFUN ) . This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (cl:in-package :cl-user) (defvar *unused-argument* (sb-debug::make-unprintable-object "unused argument")) (de...
a8d36b7a3063c8bcf3ce097bfd72357f718d1b909eebeddb92412e9478ff9cef
ocaml-multicore/eio
sched.ml
* Copyright ( C ) 2023 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DIS...
null
https://raw.githubusercontent.com/ocaml-multicore/eio/146d246f233fcf9b9d78b939da8e050c72d7be1c/lib_eio_posix/sched.ml
ocaml
The type of items in the run queue. Resume a fiber with a result value Resume a fiber with an exception The queue of runnable fibers ready to be resumed. Note: other domains can also add work items here. The highest index ever used in [poll]. When adding to [run_q] from another domain, this domain may be sle...
* Copyright ( C ) 2023 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DIS...
13b7b638d2aed6a952e98edb24045822d59726d3c742cf88b7a46abbbcc3139d
gonimo/gonimo
Internal.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecursiveDo #-} # LANGUAGE ScopedTypeVariables # module Gonimo.Client.Invite.Internal where import Control.Lens import Control.Monad import Control.Monad.Fix (MonadFix) import qualifi...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/Invite/Internal.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE RecursiveDo # Not used currently : jsVal <- liftIO $ toJSVal val let jsOut = jsEncodeURIComponent jsVal MaybeT . liftIO $ fromJSVal jsOut foreign import javascript unsafe jsEncodeURIComponent :: JSVal -> JSVal Lenses for...
# LANGUAGE ScopedTypeVariables # module Gonimo.Client.Invite.Internal where import Control.Lens import Control.Monad import Control.Monad.Fix (MonadFix) import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as BL import Dat...
accd08ba3935f1af634951bbc18586813ca2a9efb7b9d8102e9baf0318a8c96f
GaloisInc/surveyor
Extension.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # -- | State extensions for the brick UI m...
null
https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-brick/src/Surveyor/Brick/Extension.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # | State extensions for the brick UI * Lenses This differs from 'BrickUIState' in that it is not parameterized by the architecture (@arch@). That is important, as there is not always an active architecture. Objects in this extension state can always be available (e.g., ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Surveyor.Brick.Extension ( BrickUIState(..), BrickUIExtension(..), BrickUIEven...
08cd796ffa40d872dfa41eaa0fd631d5d2eea19cd605864f4a454c36317c8f28
BranchTaken/Hemlock
test_div_mod.ml
open! Basis.Rudiments open! Basis open Zint let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin let quotient = x / y in let remainder = x % y in File.Fmt.stdout |> fmt ~alt:true ~radix:Radix.Hex x |> Fmt.fmt " /,% " |> fmt ~alt:tr...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/zint/test_div_mod.ml
ocaml
open! Basis.Rudiments open! Basis open Zint let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin let quotient = x / y in let remainder = x % y in File.Fmt.stdout |> fmt ~alt:true ~radix:Radix.Hex x |> Fmt.fmt " /,% " |> fmt ~alt:tr...
477afc5754fb0c3769ce751fce3da505a8acde1e7a2b552314fb028d159e9465
janestreet/hardcaml
test_nand.ml
(* Build adder circuits using NAND as the base gate. Demonstrates the use of the [Comb.Make_primitives] functor. *) open! Import module Make_nand_gates (X : sig module Bits : Comb.S val nand : Bits.t -> Bits.t -> Bits.t end) : Comb.Gates with type t = X.Bits.t = struct include X.Bits let ( ~: ) a ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/1cdb35da263479bb4149c0f5550462163b7439d1/test/lib/test_nand.ml
ocaml
Build adder circuits using NAND as the base gate. Demonstrates the use of the [Comb.Make_primitives] functor. Not sayin' this is an efficient way to go about this...
open! Import module Make_nand_gates (X : sig module Bits : Comb.S val nand : Bits.t -> Bits.t -> Bits.t end) : Comb.Gates with type t = X.Bits.t = struct include X.Bits let ( ~: ) a = X.nand a a let ( &: ) a b = ~:(X.nand a b) let ( |: ) a b = X.nand ~:a ~:b let ( ^: ) a b = let c = X.nand ...
a4fa7275ef6a12a8083c047e271ffb0018f0d9f2125214e6ef8ce80c275678bd
rumblesan/improviz
PostProcessing.hs
# LANGUAGE TemplateHaskell # module Gfx.PostProcessing ( createPostProcessing , renderPostProcessing , usePostProcessing , deletePostProcessing , createTextDisplaybuffer , deleteSavebuffer , filterVars , PostProcessingConfig(..) , Savebuffer(..) , AnimationStyle(..) ) where import Conf...
null
https://raw.githubusercontent.com/rumblesan/improviz/08cf33f0ff197e1914135743273cd471f60924c6/src/Gfx/PostProcessing.hs
haskell
Simple Framebuffer with a texture that can be rendered to and then drawn out to a quad 2D positions and texture coordinates brittany-disable-next-binding v1 v2 v3 v4 v5 brittany-disable-next-binding v1 v2 v3 v4 v5 let (shaderLoadingErrs, ppShaders) = partitionEithers loadedFilters
# LANGUAGE TemplateHaskell # module Gfx.PostProcessing ( createPostProcessing , renderPostProcessing , usePostProcessing , deletePostProcessing , createTextDisplaybuffer , deleteSavebuffer , filterVars , PostProcessingConfig(..) , Savebuffer(..) , AnimationStyle(..) ) where import Conf...
02c0b312d2c08c8a3c3608fd7e41d1bf543d659b4e73ff8896734a461d469c2c
cram-code/cram_core
offline-task.lisp
;;; Copyright ( c ) 2009 - 2010 ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list o...
null
https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_execution_trace/src/offline-task.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: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redi...
Copyright ( c ) 2009 - 2010 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,...
b0d5ea6f28fec22c3b88d428436ba5c29dcbbd3fc15a287393179838be8d11ef
alt-romes/slfl
final-6-1.hs
newMArray :: Int -> (MArray a -o !b) -o b; write :: MArray a -o (Int * a) -> MArray a; freeze :: MArray a -o !(Array a); foldl :: (a -o b -o a) -> a -o (List b) -o a; synth array :: Int -> List (!(Int * a)) -> Array a | using (foldl) | depth 3;
null
https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/bench/final-6-1.hs
haskell
newMArray :: Int -> (MArray a -o !b) -o b; write :: MArray a -o (Int * a) -> MArray a; freeze :: MArray a -o !(Array a); foldl :: (a -o b -o a) -> a -o (List b) -o a; synth array :: Int -> List (!(Int * a)) -> Array a | using (foldl) | depth 3;
991d4a6a3f42af4e01056091d03329cd375b896f21e0035d070cf447ee6ad8e4
eponai/sulolive
store.cljc
(ns eponai.common.ui.store (:require [eponai.common.ui.elements.css :as css] [eponai.common.ui.chat :as chat] [eponai.common.ui.common :as common] [eponai.common.ui.product :as item] [eponai.common.ui.stream :as stream] [eponai.common.ui.om-quill :as quill] [eponai.common.ui.router :as rou...
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/common/ui/store.cljc
clojure
(common/contact-button nil)
(ns eponai.common.ui.store (:require [eponai.common.ui.elements.css :as css] [eponai.common.ui.chat :as chat] [eponai.common.ui.common :as common] [eponai.common.ui.product :as item] [eponai.common.ui.stream :as stream] [eponai.common.ui.om-quill :as quill] [eponai.common.ui.router :as rou...
16161747e1166f9d2c340405944e5df0f6fd9f4902d3fc9577ff50301c59233f
haguenau/wyrd
tmkContainer.ml
open TmkStruct (**************************************************************************************** * La classe Container ****************************************************************************************) let real_class_container = Class.create "Container" [TmkWidget.real_class_widget] class virtual co...
null
https://raw.githubusercontent.com/haguenau/wyrd/490ce39ad9ecf36969eb74b9f882f85a1ef14ba3/curses/tmk/tmkContainer.ml
ocaml
*************************************************************************************** * La classe Container *************************************************************************************** *************************************************************************************** * La classe Bin **************...
open TmkStruct let real_class_container = Class.create "Container" [TmkWidget.real_class_widget] class virtual container = object (self) inherit TmkWidget.widget as super val mutable redrawing_children = ([] : TmkWidget.widget list) method is_container = true method queue_redraw () = if not need_redra...
cd9a188115feb412530b53a8a18bcc1ee3c54e25b5442a17223f497ce2e93f09
esl/MongooseIM
router_SUITE.erl
-module(router_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("exml/include/exml.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("mongoose.hrl"). %% --------------------------------------------------------------- %% Common Test callbacks %% ---------------------------------------------------...
null
https://raw.githubusercontent.com/esl/MongooseIM/64d10a08d8e4700027734ec49ce4c4014b41b34b/test/router_SUITE.erl
erlang
--------------------------------------------------------------- Common Test callbacks --------------------------------------------------------------- --------------------------------------------------------------- Test cases --------------------------------------------------------------- module 'c' routes everyt...
-module(router_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("exml/include/exml.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("mongoose.hrl"). all() -> [ {group, routing}, {group, schema} ]. groups() -> [ {routing, [], [ basic_routing, ...
23c4631d5f6b30b7a8eeee2e96f459dbf82b0da1442abc357c96b51a01221b9a
elm-lang/elm-package
Fetch.hs
{-# LANGUAGE OverloadedStrings #-} module Install.Fetch (everything) where import Control.Concurrent (forkIO) import qualified Control.Concurrent.Chan as Chan import Control.Concurrent.ParallelIO.Local (withPool, parallel) import Control.Monad.Except (liftIO, throwError) import qualified Codec.Archive.Zip as Zip impor...
null
https://raw.githubusercontent.com/elm-lang/elm-package/2076638d812d9dea641e6e695951495f523bb98f/src/Install/Fetch.hs
haskell
# LANGUAGE OverloadedStrings # PARALLEL FETCHING FETCH A PACKAGE
module Install.Fetch (everything) where import Control.Concurrent (forkIO) import qualified Control.Concurrent.Chan as Chan import Control.Concurrent.ParallelIO.Local (withPool, parallel) import Control.Monad.Except (liftIO, throwError) import qualified Codec.Archive.Zip as Zip import qualified Data.List as List impor...
5d2f1a2eba6fbc6535dadf19511e692adde3de27eea59ee63e6fc05df33df46b
input-output-hk/cardano-wallet-legacy
TxMetaStorage.hs
{-# LANGUAGE RankNTypes #-} module TxMetaStorage ( spec ) where import Universum import Control.Concurrent.Async import Control.Exception.Safe (bracket) import qualified Data.List.NonEmpty as NonEmpty import Formatting (bprint, (%)) import qualified Formatting as F imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/nightly/TxMetaStorage.hs
haskell
# LANGUAGE RankNTypes # beware of the big data. beware of the big data. beware of the big data. beware of the big data. beware of the big data. beware of the big data. | Handy combinator which yields a fresh database to work with on each spec. | Synthetic @newtype@ used to generate unique inputs as part of 'ge...
module TxMetaStorage ( spec ) where import Universum import Control.Concurrent.Async import Control.Exception.Safe (bracket) import qualified Data.List.NonEmpty as NonEmpty import Formatting (bprint, (%)) import qualified Formatting as F import Formatting.Bui...
091be6b2cebb4c379969ee4473613f2a078f25749579f8a67276cef973b33789
ReedOei/CMips
Types.hs
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} # LANGUAGE TemplateHaskell # # LANGUAGE StandaloneDeriving # module Types where import Control.Lens (makeLenses, (^.), set, over) import Data.Map (Map) import qualified Data.Map as Map import CLanguage import MIPSLanguage import Util data Invariant = InvariantExpr...
null
https://raw.githubusercontent.com/ReedOei/CMips/daae33aeba31d0f4b0a97fab206b2726566d5ee4/src/Types.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # Either an expression that is true Or an annotation for a particular variable Name, type, value e.g.: str: .asciiz "hello world" Things to store in the data/kdata sections Contains: Map function names to labels. List of labels that have been used. Contains: Amount o...
# LANGUAGE TemplateHaskell # # LANGUAGE StandaloneDeriving # module Types where import Control.Lens (makeLenses, (^.), set, over) import Data.Map (Map) import qualified Data.Map as Map import CLanguage import MIPSLanguage import Util deriving (Show, Eq) data Parent = FileParent CFile | ElementPare...
9158c2d5f920b632842aa8a8eb47193c8813fe271bc76a25dc780a4f475e083f
LeventErkok/hArduino
Blink.hs
------------------------------------------------------------------------------- -- | Module : System . Hardware . Arduino . SamplePrograms . Blink Copyright : ( c ) -- License : BSD3 -- Maintainer : -- Stability : experimental -- -- The /hello world/ of the arduino world, blinking the led....
null
https://raw.githubusercontent.com/LeventErkok/hArduino/ee04988ad9ef3d4384d7ce7a8670518ce8b0a34c/System/Hardware/Arduino/SamplePrograms/Blink.hs
haskell
----------------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental The /hello world/ of the arduino world, blinking the led. ----------------------------------------------------------------------------- Note that you do not need any ot...
Module : System . Hardware . Arduino . SamplePrograms . Blink Copyright : ( c ) module System.Hardware.Arduino.SamplePrograms.Blink where import Control.Monad (forever) import System.Hardware.Arduino | Blink the led connected to port 13 on the Arduino UNO board . up your Arduino to the ...
1678781f769e751a339900faa6529e0505732f83ebda6ae0f7dcfea474b9b6b7
kryonix/pg_cuckoo
GPrint.hs
| Module : GPrint Description : Generic printer implementation Copyright : < > License : AllRightsReserved Maintainer : This is the place where magic happens ¯\_(ツ)_/¯ Module : GPrint Description : Generic printer implementation Copyright : © Denis Hirn <> License : AllRi...
null
https://raw.githubusercontent.com/kryonix/pg_cuckoo/755e3199b4831d99e716637fbbebbe794a9a7104/PgCuckoo/src/Database/PgCuckoo/GPrint.hs
haskell
# LANGUAGE TypeOperators # | Implementation of a generic record printer With these classes and instances we just have to define format automagically. # OVERLAPS # | Fallback instance when no GPrint1 instance is defined # OVERLAPPABLE # Constructor name, we want to use this as the node type Selector name, thos...
| Module : GPrint Description : Generic printer implementation Copyright : < > License : AllRightsReserved Maintainer : This is the place where magic happens ¯\_(ツ)_/¯ Module : GPrint Description : Generic printer implementation Copyright : © Denis Hirn <> License : AllRi...
2c8e078d384ae0377ddcc5b043e0dc5d12594ff93dccd59f5122892d24137a36
lsrcz/grisette
Union.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveLift #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE Trustworthy # # LANGUAGE TypeFamilies # -- | Module : . Core . Data . Union Copyright : ( c ) 2021 - 2023 -- License : BSD-3-Clause (see the LICENSE file) -- -...
null
https://raw.githubusercontent.com/lsrcz/grisette/b8d6079ce5c44975bfa5dfba214a9f5874b93214/src/Grisette/Core/Data/Union.hs
haskell
# LANGUAGE DeriveLift # | License : BSD-3-Clause (see the LICENSE file) Maintainer : Stability : Experimental * The union data structure. # SOURCE # | The default union implementation. | A single value | A if value ^ Cached leftmost value ^ Is merged invariant already maintained? ^ If conditio...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE Trustworthy # # LANGUAGE TypeFamilies # Module : . Core . Data . Union Copyright : ( c ) 2021 - 2023 Portability : GHC only module Grisette.Core.Data.Union | Please consider using ' . ...
5a1a8bfc0fd76973711e906f169a41c2075a4b4146c3491dd9ce06ce07c02580
aupiff/boustro
Typography.hs
# LANGUAGE ExistentialQuantification # {-# LANGUAGE OverloadedStrings #-} module Typography ( measureLineHeight , PageEvent(..) , ViewDimensions(..) , processedWords , typesetPage ) where import Control.Monad import Data.JSString.Text import Data.List (intersperse...
null
https://raw.githubusercontent.com/aupiff/boustro/9ed0d3c9f5f8f66680810e0fb2d249cd71b7a65b/frontend/src/Typography.hs
haskell
# LANGUAGE OverloadedStrings # bring this back in case of issues where hyphenWidth = case last l of (Penalty w _ _ _) -> w _ -> 0 penalize placing hyphen at end of line what number should I use here? I just need to see what wastes look like ...
# LANGUAGE ExistentialQuantification # module Typography ( measureLineHeight , PageEvent(..) , ViewDimensions(..) , processedWords , typesetPage ) where import Control.Monad import Data.JSString.Text import Data.List (intersperse) import Data.Maybe impor...
ceaef499ba104eb38c670f620308202944706c5ab7bc2789c7391f05b38f3bd0
jwiegley/notes
Rcf.hs
| Return e ( Euler 's constant ) foreign import ccall "Z3_rcf_mk_e" c'Z3_rcf_mk_e :: C'Z3_context -> IO C'Z3_rcf_num foreign import ccall "&Z3_rcf_mk_e" p'Z3_rcf_mk_e :: FunPtr (C'Z3_context -> IO C'Z3_rcf_num) # LINE 25 " Z3 / Base / C / Rcf.hsc " # | Return a new infinitesimal that is smaller than all eleme...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/ffb7de3739ffedee21af401d7c8e2181/Rcf.hs
haskell
| Return e ( Euler 's constant ) foreign import ccall "Z3_rcf_mk_e" c'Z3_rcf_mk_e :: C'Z3_context -> IO C'Z3_rcf_num foreign import ccall "&Z3_rcf_mk_e" p'Z3_rcf_mk_e :: FunPtr (C'Z3_context -> IO C'Z3_rcf_num) # LINE 25 " Z3 / Base / C / Rcf.hsc " # | Return a new infinitesimal that is smaller than all eleme...
0a5258af4936cf2f6d422ab029c1c7bad5c9fc347513354b3d37cb1bba435556
pepe/two-in-shadows
events.cljs
(ns two-in-shadows.client.events (:require [potok.core :as ptk] [beicon.core :as rx] [goog.json :as json] [com.rpl.specter :as S] [rxhttp.browser :as http])) (defrecord FadeLoading [] ptk/UpdateEvent (update [_ state] (S/setval :ui/loading :fade state))) (defrec...
null
https://raw.githubusercontent.com/pepe/two-in-shadows/b49a484cf1cc1a9a2e0a5ffb358acfe0f56d895c/src/two_in_shadows/client/events.cljs
clojure
>>>>>>>
(ns two-in-shadows.client.events (:require [potok.core :as ptk] [beicon.core :as rx] [goog.json :as json] [com.rpl.specter :as S] [rxhttp.browser :as http])) (defrecord FadeLoading [] ptk/UpdateEvent (update [_ state] (S/setval :ui/loading :fade state))) (defrec...