_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
c0a54c6a1c676ab41cd2ebf9e26c90c20cac7f319221dd8a613c2f476d430562
fukamachi/websocket-driver
client.lisp
(in-package :cl-user) (ql:quickload '(:uiop :websocket-driver-client) :silent t) (defvar *client* (wsd:make-client "ws:5000/echo")) (wsd:on :open *client* (lambda () (format *error-output* "~&connected~%"))) (wsd:on :message *client* (lambda (message) (if (string= message "Hi")...
null
https://raw.githubusercontent.com/fukamachi/websocket-driver/2d20d81f5257111426873b9879795827e4625b83/t/client.lisp
lisp
(in-package :cl-user) (ql:quickload '(:uiop :websocket-driver-client) :silent t) (defvar *client* (wsd:make-client "ws:5000/echo")) (wsd:on :open *client* (lambda () (format *error-output* "~&connected~%"))) (wsd:on :message *client* (lambda (message) (if (string= message "Hi")...
515f37ac17656ed9fb6fd9cb07a3a945fa4106ac8f78e9f12184e3a365f83970
nasa/Common-Metadata-Repository
config.clj
(ns cmr.authz.components.config (:require [cmr.authz.config :as config-lib] [cmr.exchange.common.components.config :as config] [com.stuartsierra.component :as component] [taoensso.timbre :as log])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Utility Functions ;;;...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/authz/src/cmr/authz/components/config.clj
clojure
Utility Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Config Component API ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The URLs returned by these functions have no trailing slash: minutes seconds milliseconds Component Lifecycle Implementation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
(ns cmr.authz.components.config (:require [cmr.authz.config :as config-lib] [cmr.exchange.common.components.config :as config] [com.stuartsierra.component :as component] [taoensso.timbre :as log])) (def get-cfg config/get-cfg) (defn get-service [system service] (let [svc-cfg (get-in (get-cfg syste...
69032411db3b57264d01968894a10e3ea32a2cc48c6c76c501eedfd55cd036c7
slipstream/SlipStreamServer
ring_test.clj
(ns sixsq.slipstream.prs.ring-test (:require [clojure.test :refer :all] [com.sixsq.slipstream.auth.cookies] [sixsq.slipstream.prs.ring])) (deftest test-authenticated? (with-redefs [com.sixsq.slipstream.auth.cookies/extract-cookie-info (fn [_] nil)] (is (false? (#'sixsq.slipstream.prs.ring/authentic...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/prs/test/sixsq/slipstream/prs/ring_test.clj
clojure
(ns sixsq.slipstream.prs.ring-test (:require [clojure.test :refer :all] [com.sixsq.slipstream.auth.cookies] [sixsq.slipstream.prs.ring])) (deftest test-authenticated? (with-redefs [com.sixsq.slipstream.auth.cookies/extract-cookie-info (fn [_] nil)] (is (false? (#'sixsq.slipstream.prs.ring/authentic...
f8eb1b0a333f4372e5e3c177eb3d487bc68250ad9de67d773310cc44957aa380
sgbj/MaximaSharp
dbsk1e.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/dbsk1e.lisp
lisp
Compiled by f2cl version: "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $" Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':simple-array) (:array-slicing nil) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ " " macros.l , v fceac53...
c316f88a3af93138151862efdfb8c941d48e92db75af0429d24b9b39efeb31c4
FranklinChen/hugs98-plus-Sep2006
TestFormat.hs
{-# OPTIONS -ffi -Wall -Werror #-} module Main where import Data.Time import Data.Time.Clock.POSIX import System.Locale import Foreign import Foreign.C size_t format_time ( char * s , size_t maxsize , const char * format , int isdst , , time_t t ) ; size_t format_time ( char *s, size_t maxsize, c...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/time/time/test/TestFormat.hs
haskell
# OPTIONS -ffi -Wall -Werror # as found in P not always supported s time-zone dependent
module Main where import Data.Time import Data.Time.Clock.POSIX import System.Locale import Foreign import Foreign.C size_t format_time ( char * s , size_t maxsize , const char * format , int isdst , , time_t t ) ; size_t format_time ( char *s, size_t maxsize, const char *format, int isdst,int g...
f5c15f60326b4e46535fb98558e1eb99d0c55296049cd7527bdc481f2ab58774
hipsleek/hipsleek
z3.ml
#include "xdebug.cppo" open Globals open GlobProver open Gen.Basic open VarGen module CP = Cpure module StringSet = Set.Make(String) let set_prover_type () = Others.last_tp_used # set Others.Z3 let set_generated_prover_input = ref (fun _ -> ()) let set_prover_original_output = ref (fun _ -> ()) (* Pure formula pri...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/z3.ml
ocaml
Pure formula printing function, to be intialized by cprinter module Types for relations and ax(ioms Record of information on a formula list of relations that the formula mentions list of related axioms (in form of position in the global list of axiom definitions) ***********************************************...
#include "xdebug.cppo" open Globals open GlobProver open Gen.Basic open VarGen module CP = Cpure module StringSet = Set.Make(String) let set_prover_type () = Others.last_tp_used # set Others.Z3 let set_generated_prover_input = ref (fun _ -> ()) let set_prover_original_output = ref (fun _ -> ()) let print_pure = r...
afb12981bd06b1b36778d77d9b620d9e3e97ddb5b9ed934a8d2937a9d8250f2a
synrc/nitro
element_comboLookupText.erl
-module(element_comboLookupText). -include_lib("nitro/include/comboLookupText.hrl"). -include_lib("nitro/include/nitro.hrl"). -export([render_element/1]). render_element(#comboLookupText{id=Id, input=Input, disabled=Disabled, validation=Validation, textarea=Textarea, values=Values}) -> InputId = element(#element.id,...
null
https://raw.githubusercontent.com/synrc/nitro/313de35ff034ea4f3a0b00a203e8753c4591e74f/src/elements/combo/element_comboLookupText.erl
erlang
-module(element_comboLookupText). -include_lib("nitro/include/comboLookupText.hrl"). -include_lib("nitro/include/nitro.hrl"). -export([render_element/1]). render_element(#comboLookupText{id=Id, input=Input, disabled=Disabled, validation=Validation, textarea=Textarea, values=Values}) -> InputId = element(#element.id,...
daeb934ddb8beff4861d1222257f6403ee54570b04e0778d839b4bc0db30da40
facebookincubator/retrie
Fixity.hs
Copyright ( c ) Facebook , Inc. and its affiliates . -- This source code is licensed under the MIT license found in the -- LICENSE file in the root directory of this source tree. -- {-# LANGUAGE RankNTypes #-} module Retrie.Fixity ( FixityEnv , mkFixityEnv , lookupOp , lookupOpRdrName , Fixity(..) , Fix...
null
https://raw.githubusercontent.com/facebookincubator/retrie/fb58d0484935a6a0dcbe93035ffc0fdc30b7bf03/Retrie/Fixity.hs
haskell
LICENSE file in the root directory of this source tree. # LANGUAGE RankNTypes #
Copyright ( c ) Facebook , Inc. and its affiliates . This source code is licensed under the MIT license found in the module Retrie.Fixity ( FixityEnv , mkFixityEnv , lookupOp , lookupOpRdrName , Fixity(..) , FixityDirection(..) , extendFixityEnv , ppFixityEnv ) where import Retrie.GHC newtype Fi...
2e11234c4b0afaea91d4babe721059c3023d67435123ee853417c5e4d269eefb
hawk/eflex
eflex_sup.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( c ) 2009 %% %% See the file "LICENSE" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -module(eflex_sup). -...
null
https://raw.githubusercontent.com/hawk/eflex/6dc204c2c87e025e73ec51903be9429a49115669/src/eflex_sup.erl
erlang
See the file "LICENSE" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. application and supervisor callback functions Supervisor Application
Copyright ( c ) 2009 -module(eflex_sup). -behaviour(application). -behaviour(supervisor). -export([start/0, start/2, init/1, stop/1]). -define(APPLICATION, eflex). start(normal, Args) -> SupName = {local, ?MODULE}, case supervisor:start_link(SupName, ?MODULE, [Args]) of {ok, Pid} -> ...
8075954e0057da803f5899aac7e1380141a03697e0b1f260c93cc64f7710fcae
gfour/gic
LARGraph.hs
-- | Graphviz output mode: C code snippets that are inserted in the -- output program to log memory allocation. -- -- The resulting file can be converted to PNG from the command line as follows: -- -- @dot -Tpng graph.dot -o graph.png@ -- Note : for programs that allocate a lot , this may take /a lot of ti...
null
https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/SLIC/LAR/LARGraph.hs
haskell
| Graphviz output mode: C code snippets that are inserted in the output program to log memory allocation. The resulting file can be converted to PNG from the command line as follows: @dot -Tpng graph.dot -o graph.png@ | Logs a dictionary connection. | Logs a constructor evaluation hit. | Opens the ...
Note : for programs that allocate a lot , this may take /a lot of time/. module SLIC.LAR.LARGraph (logConstr, logDict, logGraphStart, logGraphEnd, logPrev) where import SLIC.Constants (nl, tab) import SLIC.State (Options(optVerbose)) import SLIC.Types (Counter, CstrName, PPrint(pprint)) ...
71942ac494a16774486c0b8f9e89df49926ffd16fb6667b2a068e20ac322927e
dgrnbrg/piplin
union.clj
(ns piplin.types.union (:refer-clojure :exclude [cast]) (:use [slingshot.slingshot]) (:require [piplin.mux :as mux]) (:require clojure.set) (:require [piplin.types.binops :as binops]) (:require [piplin.util :as util]) (:use [piplin protocols types] [piplin.types bits enum])) (defpiplintype Union ...
null
https://raw.githubusercontent.com/dgrnbrg/piplin/01f3ac72ccc904b7789dfd6e46277c179e11002c/src/piplin/types/union.clj
clojure
TODO: should composite types need to make ast in promote or should cast be smarter?
(ns piplin.types.union (:refer-clojure :exclude [cast]) (:use [slingshot.slingshot]) (:require [piplin.mux :as mux]) (:require clojure.set) (:require [piplin.types.binops :as binops]) (:require [piplin.util :as util]) (:use [piplin protocols types] [piplin.types bits enum])) (defpiplintype Union ...
0ae86dcdbef64109fb0d2c00f8e891a73b4f48d8755195fa2d2a1c60bbb0f729
webyrd/n-grams-for-synthesis
contagion-in.scm
; This file is part of the reference implementation of the R6RS Arithmetic SRFI. ; See file COPYING. ; Contagion for exact arithmetic (define (oops a b retry) (error "INTERNAL ERROR in contagion: same-representation arithmetic" a b retry) #t) (define (no a b retry) (error "exact operand to inexact ari...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-77/arithmetic-reference/contagion-in.scm
scheme
This file is part of the reference implementation of the R6RS Arithmetic SRFI. See file COPYING. Contagion for exact arithmetic
(define (oops a b retry) (error "INTERNAL ERROR in contagion: same-representation arithmetic" a b retry) #t) (define (no a b retry) (error "exact operand to inexact arithmetic" a b retry) #t) One standard matrix is enough (define cmatrix (make-contagion-matrix)) (define-contagion cmatr...
588abcd31c0fecba03b5b8f91f6c9f2c053618316c86578a7dfdd1184fc9cbde
Shirakumo/kandria
moving-platform.lisp
(in-package #:org.shirakumo.fraf.kandria) (define-shader-entity moving-platform (game-entity resizable solid ephemeral) ((layer-index :initform (1+ +base-layer+)))) (defmethod is-collider-for ((platform moving-platform) thing) NIL) (defmethod is-collider-for ((platform moving-platform) (block block)) T) (defmethod ...
null
https://raw.githubusercontent.com/Shirakumo/kandria/0eafe60b5f50c18980a6acc977dc45987e8e26c1/moving-platform.lisp
lisp
(in-package #:org.shirakumo.fraf.kandria) (define-shader-entity moving-platform (game-entity resizable solid ephemeral) ((layer-index :initform (1+ +base-layer+)))) (defmethod is-collider-for ((platform moving-platform) thing) NIL) (defmethod is-collider-for ((platform moving-platform) (block block)) T) (defmethod ...
0af8dbc77535ba982f771f241db1685e53db3dcb74011634c0dc3fbcaed88c4e
rufoa/named-re
re_test_macro.clj
(ns named-re.re-test-macro (:require named-re.core) (:use midje.sweet)) (tabular "patterns with named groups work as expected" (fact (re-seq ?re ?s) => ?r) ?re ?s ?r #"a(?<g>.)" "ab" (just [{:g "b" :0 "ab"}]) #"(?<g>a)\k<g>" "aa"...
null
https://raw.githubusercontent.com/rufoa/named-re/382bcea3d3815155dd7a42798209a2f1e2f33bb8/test/named_re/re_test_macro.clj
clojure
non-capturing group; no named groups in this pattern literal left paren, not start of group literal backslash followed by named group literal backslash followed by group g
(ns named-re.re-test-macro (:require named-re.core) (:use midje.sweet)) (tabular "patterns with named groups work as expected" (fact (re-seq ?re ?s) => ?r) ?re ?s ?r #"a(?<g>.)" "ab" (just [{:g "b" :0 "ab"}]) #"(?<g>a)\k<g>" "aa"...
69d1d4fa56e42a741f0203d6f28aef7f016f27931ccf1c79f2e9e43051b202f9
BillHallahan/G2
Language.hs
-- | Language Export module for G2.Language . module G2.Language ( module G2.Language.ArbValueGen , module G2.Language.AST , module G2.Language.CreateFuncs , module G2.Language.Expr , module G2.Language.Ids , module G2.Language.Located , module G2.Language.Naming , module G2.Language...
null
https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/src/G2/Language.hs
haskell
| Language
Export module for G2.Language . module G2.Language ( module G2.Language.ArbValueGen , module G2.Language.AST , module G2.Language.CreateFuncs , module G2.Language.Expr , module G2.Language.Ids , module G2.Language.Located , module G2.Language.Naming , module G2.Language.Primitives ...
51fce31bbf77656f88eb878515b0435233c99f751924314dbe2617d1eb9591fe
haskell-tls/hs-tls
SimpleClient.hs
{-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - warnings - deprecations # import Control.Exception (SomeException(..)) import qualified Control.Exception as E import Crypto.Random import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import qualified Data.ByteString.Lazy.Cha...
null
https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/debug/src/SimpleClient.hs
haskell
# LANGUAGE OverloadedStrings # what should we do? 2s per recv
# OPTIONS_GHC -fno - warn - warnings - deprecations # import Control.Exception (SomeException(..)) import qualified Control.Exception as E import Crypto.Random import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import qualified Data.ByteString.Lazy.Char8 as LC import Data.Default.Class ...
1d9dab6b1b33cf3261d1383e3c1c990493eea462efd3d17de84d32b6e18b4701
Storkle/clj-forex
error.clj
(clojure.core/use 'nstools.ns) (ns+ forex.module.error (:clone clj.core) (:require forex.backend.mql.socket-service) (:require forex.backend.mql.error) (:require [forex.backend.mql.socket-service :as s]) (:use forex.util.general forex.util.core forex.util.emacs forex.util.general)...
null
https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/module/error.clj
clojure
receive with errors
(clojure.core/use 'nstools.ns) (ns+ forex.module.error (:clone clj.core) (:require forex.backend.mql.socket-service) (:require forex.backend.mql.error) (:require [forex.backend.mql.socket-service :as s]) (:use forex.util.general forex.util.core forex.util.emacs forex.util.general)...
f303e4eaa3cb9bdeba4312458cbfaff30b2378fc7fbdfc1465962bef8d2c867f
cljfx/cljfx
html_editor.clj
(ns cljfx.fx.html-editor "Part of a public API" (:require [cljfx.composite :as composite] [cljfx.fx.control :as fx.control] [cljfx.lifecycle :as lifecycle]) (:import [javafx.scene.web HTMLEditor])) (set! *warn-on-reflection* true) (def props (merge fx.control/props (composite/p...
null
https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/html_editor.clj
clojure
(ns cljfx.fx.html-editor "Part of a public API" (:require [cljfx.composite :as composite] [cljfx.fx.control :as fx.control] [cljfx.lifecycle :as lifecycle]) (:import [javafx.scene.web HTMLEditor])) (set! *warn-on-reflection* true) (def props (merge fx.control/props (composite/p...
c58b31bb4d017f4dafe911ef7f04016006fd1d1858231102c0fda00c35a14572
RBornat/jape
sml.mli
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 Software Foundation ; either ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/sml.mli
ocaml
compose -- can't do without it a variant of fold_right for uncurried f a variant of fold_left for uncurried f
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 Software Foundation ; either ver...
0e483f99123ad7c1e79ec7b8c748e69245aeddb30b530f473773d832988e923f
reflex-frp/reflex-examples
Main.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE RecursiveDo # # LANGUAGE TypeFamilies # module Frontend.Examples.ECharts.Main ...
null
https://raw.githubusercontent.com/reflex-frp/reflex-examples/3c1b7096e22675b5ea6abb0271ad11544cbc9122/frontend/src/Frontend/Examples/ECharts/Main.hs
haskell
# LANGUAGE OverloadedStrings # & axis_axisPointer ?~ (def & axisPointer_label ?~ def) & axis_axisPointer ?~ (def & axisPointer_label ?~ def) , _axisPointer_animation = Just False , _axis_label = Just $ def { _axisLabel_formatter = }
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE RecursiveDo # # LANGUAGE TypeFamilies # module Frontend.Examples.ECharts.Main where import Reflex.Dom.Widget.ECh...
eb5994b9df08c388c96a478e7ce51009d69e72214c323f3a35b9e19b2fb89b00
sicmutils/sicmutils
env.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.env "Batteries-included namespace for the [SICMUtils](/) library. The purpose of [[sicmutils.env]] is to bundle all of the functions used in [Structure and Interpretation of Classical Mechanics](/) and [Functional Differential Geometry](-differential-geomet...
null
https://raw.githubusercontent.com/sicmutils/sicmutils/f181f153f1432e9648206f903282e7cb4cdd9644/src/sicmutils/env.cljc
clojure
falls Constants Calculus Namespaces Special Relativity Mechanics Namespaces
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.env "Batteries-included namespace for the [SICMUtils](/) library. The purpose of [[sicmutils.env]] is to bundle all of the functions used in [Structure and Interpretation of Classical Mechanics](/) and [Functional Differential Geometry](-differential-geomet...
e4d13bfa354f1387f053aa5b5d74641bed42bb091050dd53f37b11ecd72d8dac
smtcoq/smtcoq
ast.ml
(**************************************************************************) (* *) (* SMTCoq *) Copyright ( C ) 2011 - 2022 (* ...
null
https://raw.githubusercontent.com/smtcoq/smtcoq/c0a1b83a76f9cf204de434eca969948c89c44598/src/lfsc/ast.ml
ocaml
************************************************************************ SMTCoq ...
Copyright ( C ) 2011 - 2022 See file " " for the list of authors open Format exception CVC4Sat let debug = false type mpz = Big_int.big_int type mpq = Num.num type name = Name of Hstring.t | S_Hole of int type symbol = { sname : n...
dddc0fc5ccfd7689ddb6eb22213b519fa86c4b3dfa7af65e9ed48411f013f3c4
Rhywun/get-programming-with-haskell
Lesson02.hs
module Lesson02 where simple x = x e1 = sqrt 4 -- 2.0 - Must be defined as the positive root only? y = 10 y = 11 < - wo n't compile calcChange owed given = if given - owed > 0 then given - owed else 0 -- Better: calcChange' owed given = if change > 0 then change else 0 where change = given - owed -- QC3 doub...
null
https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit01/Lesson02.hs
haskell
2.0 - Must be defined as the positive root only? Better: QC3 QC4 Summary Q1 Because an if without an else would not return a value if the if branch evaluated to false. Q2 Q3
module Lesson02 where simple x = x y = 10 y = 11 < - wo n't compile calcChange owed given = if given - owed > 0 then given - owed else 0 calcChange' owed given = if change > 0 then change else 0 where change = given - owed doublePlusTwo x = doubleX + 2 where doubleX = x * 2 6 inc n = n + 1 double n = ...
95dcfa719d7d87db123319947339ffc560cd0ca1dd6a14c976e10d896ffa0226
mirage/index
cache.ml
let check_none msg = Alcotest.(check (option reject)) msg None let check_some msg x = Alcotest.(check (option int)) msg (Some x) let test_noop () = let open Index.Cache.Noop in (* Test that added entries are never found. *) let c = create () in find c "not-added" |> check_none "Cannot find non-existent value";...
null
https://raw.githubusercontent.com/mirage/index/fe5e962534d192389484ecc63a25e4ab4668a2f0/test/cache.ml
ocaml
Test that added entries are never found. Test that added entries are always found.
let check_none msg = Alcotest.(check (option reject)) msg None let check_some msg x = Alcotest.(check (option int)) msg (Some x) let test_noop () = let open Index.Cache.Noop in let c = create () in find c "not-added" |> check_none "Cannot find non-existent value"; add c "added" 1; find c "added" |> check_non...
89fe2e090b624ff5f343e3cae2649fac4df66a59a0aa6557623bc7d50ba73840
imitator-model-checker/imitator
AlgoBCCoverDistributedSubdomain.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université Paris 13 , LIPN , CNRS , France * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : Classical Beh...
null
https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoBCCoverDistributedSubdomain.mli
ocaml
********************************************************** Modules ********************************************************** ********************************************************** Class definition ********************************************************** *******************************************************...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université Paris 13 , LIPN , CNRS , France * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : Classical Beh...
6aa8062818479770d403b9d4277a2e4f0446c2ee3b572bdd36dc4bb4f0085c50
rtoy/ansi-cl-tests
make-two-way-stream.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Jan 30 05:39:56 2004 Contains : Tests for MAKE - TWO - WAY - STREAM (in-package :cl-test) (deftest make-two-way-stream.1 (let* ((is (make-string-input-stream "foo")) (os (make-string-output-stream)) (s (make-two-way-stream is os))) (a...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/make-two-way-stream.lsp
lisp
-*- Mode: Lisp -*- Error tests
Author : Created : Fri Jan 30 05:39:56 2004 Contains : Tests for MAKE - TWO - WAY - STREAM (in-package :cl-test) (deftest make-two-way-stream.1 (let* ((is (make-string-input-stream "foo")) (os (make-string-output-stream)) (s (make-two-way-stream is os))) (assert (typep s 'stream))...
c71610e686c01e19aba0da869f960c0cc5ad7cb7011a48ffd4266d6c26697900
ShamoX/cash
proc_state_3_5.mli
(***********************************************************************) (* Cash *) (* *) , projet Cristal , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/ShamoX/cash/aa97231154c3f64c9d0a62823e1ed71e32ab8718/proc_state_3_5.mli
ocaml
********************************************************************* Cash under the terms of the GNU Lesser Gene...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed Cash is based on , by . value umask : unit -> int; value set_umask : int -> un...
30c408c352e94fde604d65e61ace6c5ec47701707b44c6fff224fd85a8cd71fe
dm3/sicp
e2_7_8_9_10_11.clj
(ns e2-7-8-9-10-11 (:use [clojure.contrib.test-is :only (deftest is run-tests)]) (:use [util.util :only (avg)]) (:use [util.interval :only (make-interval lower-bound upper-bound mul-interval add-interval div-interval)]) (:use [clojure.contrib.generic.math-functions :only ()])) 2.7 ; Same old intervals compos...
null
https://raw.githubusercontent.com/dm3/sicp/14f0361cbd0cce817d93e38dcc895f3e845515b1/src/main/clojure/e2_7_8_9_10_11.clj
clojure
Same old intervals composed of cons. Invariant: lower bound always comes before the upper bound. defined at util/interval Having (a0, b0) and (a1, b1) where a0 <= b0 and a1 <= b1 the (a0, b0) - (a1, b1) = (a0 - a1, b0 - b1) equation. But is that really so? where intervals join at their start/end points as my ASCII...
(ns e2-7-8-9-10-11 (:use [clojure.contrib.test-is :only (deftest is run-tests)]) (:use [util.util :only (avg)]) (:use [util.interval :only (make-interval lower-bound upper-bound mul-interval add-interval div-interval)]) (:use [clojure.contrib.generic.math-functions :only ()])) 2.7 2.8 To write like , yo...
20a45367ef4d1cb612e855ea7c3e7018065be5e0b2d0a3fd199145a852c6831e
davisp/couchdb
couch_mrview.erl
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 distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/couch_mrview/src/couch_mrview.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_mrview). -export([query_all_docs/2, query_all_docs/4]). -export([query_view/3, query_view/4, query_view/6]). -export([get_info/2]). -export([...
2d42f69e7b197d61741e756ea96733cbaf6e47f9e4e05fbdd77026a0f72fcfb4
chriskiehl/MyBlog
project.clj
(defproject myblog "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.439"] [ring/ring-core "1.9.6"] ...
null
https://raw.githubusercontent.com/chriskiehl/MyBlog/44413151521659bdb334f412ca56e0feed3b86a5/project.clj
clojure
(defproject myblog "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.439"] [ring/ring-core "1.9.6"] ...
0df7908038c7b0eefa06d932a71f5ebcda62dffb0f0c8e0d19825f2126dd675b
sph-mn/sph-lib
list.scm
(define-module (sph list)) (use-modules (ice-9 match) (sph) (srfi srfi-31) (srfi srfi-1) ((rnrs sorting) #:select (list-sort))) (export any->list compact complement complement-both consecutive contains-all? contains-some? contains? containsq? containsv-some? containsv? convolve count-value count-value-with...
null
https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/list.scm
scheme
(define-module (sph list)) (use-modules (ice-9 match) (sph) (srfi srfi-31) (srfi srfi-1) ((rnrs sorting) #:select (list-sort))) (export any->list compact complement complement-both consecutive contains-all? contains-some? contains? containsq? containsv-some? containsv? convolve count-value count-value-with...
c2e35fdb6542d38eed17ccb54ad12e2c56ea53f36cfff0efabb48d572b9a8f6b
tsloughter/kuberl
kuberl_v1_pod_dns_config.erl
-module(kuberl_v1_pod_dns_config). -export([encode/1]). -export_type([kuberl_v1_pod_dns_config/0]). -type kuberl_v1_pod_dns_config() :: #{ 'nameservers' => list(), 'options' => list(), 'searches' => list() }. encode(#{ 'nameservers' := Nameservers, 'options' := Options, 's...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_pod_dns_config.erl
erlang
-module(kuberl_v1_pod_dns_config). -export([encode/1]). -export_type([kuberl_v1_pod_dns_config/0]). -type kuberl_v1_pod_dns_config() :: #{ 'nameservers' => list(), 'options' => list(), 'searches' => list() }. encode(#{ 'nameservers' := Nameservers, 'options' := Options, 's...
a9bd3dc8731eabc3e4a0762907d97489845136780ba4c4e66d12f78516da3ef7
herbelin/coq-hh
tactic_debug.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/proofs/tactic_debug.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * This module intends to be a beginn...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Environ open Pattern ope...
458636071379b9c89d778c0cbc46567d9c76ebd39ff4cb1e8a30edaf85b67a16
ConsenSys/constellation
Exception.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StrictData #-} module Constellation.Util.Exception where import ClassyPrelude import Control.Exception (try) trys :: IO a -> IO (Either String a) trys f = someExceptionToStringEither <$> Control.Exception.try f someExceptionToStringEither...
null
https://raw.githubusercontent.com/ConsenSys/constellation/8fcd2d38b097da5242f511d2fb2149a9764f2f7b/Constellation/Util/Exception.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData #
# LANGUAGE NoImplicitPrelude # module Constellation.Util.Exception where import ClassyPrelude import Control.Exception (try) trys :: IO a -> IO (Either String a) trys f = someExceptionToStringEither <$> Control.Exception.try f someExceptionToStringEither :: Either SomeException a -> Either String a someExceptionToSt...
94db58f3383a1d716c301b020007f56fe5a850ca3523e62b4c720103c7308a89
kronkltd/jiksnu
model.clj
(ns jiksnu.modules.core.model (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.spec.test.alpha :as stest] [jiksnu.util :as util])) TODO : pull these from ns/ (defonce bound-ns {:hm "-meta.net/xrd/1.0" :xrd "-open.org/ns/xri/xrd-1....
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/model.clj
clojure
Any of the set of valid collection names Any of the set of valid record types. (Class-form) The inner item of the models var The value of the models var Any record with links TODO: create type for records containing links rel attribute of link in collection optional content-type attribute
(ns jiksnu.modules.core.model (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.spec.test.alpha :as stest] [jiksnu.util :as util])) TODO : pull these from ns/ (defonce bound-ns {:hm "-meta.net/xrd/1.0" :xrd "-open.org/ns/xri/xrd-1....
e318d97dfc6dea7aa4690f76c27161cbcfff5488c33fbcdb2f4c1377a9815b34
samrushing/irken-compiler
stack.scm
;; -*- Mode: Irken -*- ;; a simple stack (define (make-stack) (let ((l '())) (define (push x) (set! l (list:cons x l))) (define (pop) (match l with () -> (error "stack underflow") (hd . tl) -> (let ((result hd)) (set! l tl) result))) (define (get) l) (define (top) (m...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/lib/stack.scm
scheme
-*- Mode: Irken -*- a simple stack
(define (make-stack) (let ((l '())) (define (push x) (set! l (list:cons x l))) (define (pop) (match l with () -> (error "stack underflow") (hd . tl) -> (let ((result hd)) (set! l tl) result))) (define (get) l) (define (top) (match l with () -> (error "stack underflo...
be4d25ff5dd31abf06bbce477c36814d399709a25bb5f05d6621419d088c28d5
bsaleil/lc
lattice.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LCnaive/lattice.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks less more ...
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst) `(vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make-vector ,...
3ffe599b3a38194791b6cf08fce235737660dcd9cb7b6626a76ff02202175d95
nikodemus/SBCL
full-eval.impure.lisp
;;;; various tests of the interpreter 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 written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in the ...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/full-eval.impure.lisp
lisp
various tests of the interpreter 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. defstruct constructor Prior to 1.0.25, the interpreter ch...
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 . #-sb-eval (sb-ext:exit :code 104) (setf sb-ext:*evaluator-mode* :interpret) (assert (not (typep (lambda ()) 'compiled-function))) (assert (not (compiled-function-p ...
73622e5b07a8d5c6cb1cd12decdae6a4e9f2046e8950133b0c507385879cf3bc
PacktWorkshops/The-Clojure-Workshop
utils.clj
(ns coffee-app.utils) ;;; orders calculating and formatting function (defn calculate-coffee-price [coffees coffee-type number] (-> (get coffees coffee-type) (* number) float)) (defn display-bought-coffee-message [type number total] (println "Buying" number (name type) "coffees for...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter09/Exercise9.04/coffee-app/src/coffee_app/utils.clj
clojure
orders calculating and formatting function
(ns coffee-app.utils) (defn calculate-coffee-price [coffees coffee-type number] (-> (get coffees coffee-type) (* number) float)) (defn display-bought-coffee-message [type number total] (println "Buying" number (name type) "coffees for total:€" total))
eeca448e9d86c18910575c1e8718e93b4f775445a780e41161fb5715fcbe8a86
Bike/sandalphon.lambda-list
unparse.lisp
(in-package #:sandalphon.lambda-list) (defmethod print-object ((o lambda-list) stream) (print-unreadable-object (o stream :type t) (write (lambda-list-unparse o) :stream stream))) (defgeneric lambda-list-unparse (lambda-list) (:method ((lambda-list lambda-list)) (loop for clause in (lambda-list-clauses la...
null
https://raw.githubusercontent.com/Bike/sandalphon.lambda-list/db240cdcf2c066e220de0b49d441cecca941f1fb/unparse.lisp
lisp
standard unparsers always display the default; we could check the default-default but that's work ditto &optional
(in-package #:sandalphon.lambda-list) (defmethod print-object ((o lambda-list) stream) (print-unreadable-object (o stream :type t) (write (lambda-list-unparse o) :stream stream))) (defgeneric lambda-list-unparse (lambda-list) (:method ((lambda-list lambda-list)) (loop for clause in (lambda-list-clauses la...
a84c47ca817243ba82f405a292e4d1944cedfb889734de29a8a2f7f676a02c1e
iambrj/imin
explicate-control.rkt
#lang racket (require "utilities.rkt") (provide explicate-control) c1 = Assign_1 , Assign_2 , ... , Assign_k , ; c2 = Assign_(k + 1), ..., Ret2 Assign_1 , Assign_2 , ... , Assign_k , x = , Assign_(k + 1 ) , ... , Ret2 (define (merge-conts c1 c2 x) (match c1 [(Return v) (Seq (Assign (Var x) v) c2)] ...
null
https://raw.githubusercontent.com/iambrj/imin/6365961b9d368c1688f0d43881a98c65a9596e0b/explicate-control.rkt
racket
c2 = Assign_(k + 1), ..., Ret2 annotate return with type t Invariant : t/e will be used _at least_ once, so it is safe to lazily add them to the table now Stuff that lazy evaluation achieves
#lang racket (require "utilities.rkt") (provide explicate-control) c1 = Assign_1 , Assign_2 , ... , Assign_k , Assign_1 , Assign_2 , ... , Assign_k , x = , Assign_(k + 1 ) , ... , Ret2 (define (merge-conts c1 c2 x) (match c1 [(Return v) (Seq (Assign (Var x) v) c2)] [(Seq a tail) (Seq a (merge-conts...
e5898983c620d522887ee58a6ecca65f0fc88e906a1637b5add7cd61e800fe83
cedlemo/OCaml-GI-ctypes-bindings-generator
IOError_enum.mli
open Ctypes type t = Failed | Not_found | Exists | Is_directory | Not_directory | Not_empty | Not_regular_file | Not_symbolic_link | Not_mountable_file | Filename_too_long | Invalid_filename | Too_many_links | No_space | Invalid_argument | Permission_denied | Not_supported | Not_mounted | Already_mounted | Closed | Ca...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/IOError_enum.mli
ocaml
open Ctypes type t = Failed | Not_found | Exists | Is_directory | Not_directory | Not_empty | Not_regular_file | Not_symbolic_link | Not_mountable_file | Filename_too_long | Invalid_filename | Too_many_links | No_space | Invalid_argument | Permission_denied | Not_supported | Not_mounted | Already_mounted | Closed | Ca...
21a3fc834ffbfd79bc84831cbe29d9ff8ae60616b1f04524ea87e5bb0d6ca39f
quil-lang/qvm
bench.lisp
#!/usr/local/bin/sbcl --script (require :asdf) (defparameter *quil-file* (first (uiop:command-line-arguments))) (format t "Benchmarking quil file ~S~%" *quil-file*) (load "~/.sbclrc") (require :sb-sprof) (ql:quickload '(:qvm :cl-quil) :silent t) (defvar *quil* nil) (format t "PARSING================================...
null
https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/bench/bench.lisp
lisp
#!/usr/local/bin/sbcl --script (require :asdf) (defparameter *quil-file* (first (uiop:command-line-arguments))) (format t "Benchmarking quil file ~S~%" *quil-file*) (load "~/.sbclrc") (require :sb-sprof) (ql:quickload '(:qvm :cl-quil) :silent t) (defvar *quil* nil) (format t "PARSING================================...
e4182f47d07da64998c3f4fbb4235e92b461ea364d2c3ed1c828c9cda5f8c4c6
simingwang/emqx-plugin-kafkav5
asn1ct_table.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2012 - 2016 . All Rights Reserved . %% 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 applicab...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/asn1-5.0.18/src/asn1ct_table.erl
erlang
%CopyrightBegin% 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 lan...
Copyright Ericsson AB 2012 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(asn1ct_table). Table abstraction module for ASN.1 compiler -export([new/1]). -export([new_reuse/1]). -exp...
cac7f3e702c26fe793cea99d3a0b91884be8612d4b67f7a438c6ead897a2ce1d
cqerl/cqerl
cqerl_cache.erl
-module(cqerl_cache). -behaviour(gen_server). -define(SERVER, ?MODULE). -include("cqerl_protocol.hrl"). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([start_link/0, lookup/1, lookup/2, lookup...
null
https://raw.githubusercontent.com/cqerl/cqerl/8ae26d764fda006d32c0851540fc565c31f25eed/src/cqerl_cache.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ -------------------------...
-module(cqerl_cache). -behaviour(gen_server). -define(SERVER, ?MODULE). -include("cqerl_protocol.hrl"). -export([start_link/0, lookup/1, lookup/2, lookup_many/2, remove/1, query_was_prepared/2, query_preparation_failed/2]). gen_server Function Exports -export([init/1, handle_call/3, handle_cast/2, handl...
b5574ab5038ec935fa5a9989936eae8febeb024afdb2ab84458e1b63300b1c12
patrikja/AFPcourse
CalcMInstance.hs
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #-} module Problem1.CalcMInstance where import qualified Control.Monad.State as CMS (MonadState, get, put) import Problem1.Types newtype StateT s m a = StateT {runStateT :: s -> m (a, s)} type CalcM = StateT Mem (Either Err) instance Monad CalcM where return = r...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2010-08/Problem1/CalcMInstance.hs
haskell
# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses # for the (inner) error monad
module Problem1.CalcMInstance where import qualified Control.Monad.State as CMS (MonadState, get, put) import Problem1.Types newtype StateT s m a = StateT {runStateT :: s -> m (a, s)} type CalcM = StateT Mem (Either Err) instance Monad CalcM where return = returnM; (>>=) = bindM; fail = failM; returnM :: a -> Cal...
45bfcb77b6fa15a702a65bc81356f27917642d0f9c1039c0aed8e5472ba0a481
fulcro-legacy/semantic-ui-wrapper
project.clj
(defproject fulcrologic/semantic-ui-react-wrappers "2.0.5-SNAPSHOT" :plugins [[lein-modules "0.3.11"]] :description "Semantic UI React Wrappers" :license {:name "MIT" :url ""} :url "-ui-wrapper" :min-lein-version "2.7.0" :dependencies [[org.clojure/clojure "_" :scope "provided"] [fulcrol...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers/project.clj
clojure
(defproject fulcrologic/semantic-ui-react-wrappers "2.0.5-SNAPSHOT" :plugins [[lein-modules "0.3.11"]] :description "Semantic UI React Wrappers" :license {:name "MIT" :url ""} :url "-ui-wrapper" :min-lein-version "2.7.0" :dependencies [[org.clojure/clojure "_" :scope "provided"] [fulcrol...
785d8d490c1477fafc871a8f733801e4352c9a91438a20bc8a38c90be04c92ba
donaldsonjw/bigloo
bconfigure.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / runtime / Llib / bconfigure.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/runtime/Llib/bconfigure.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The machine dependent configuration. */ * -----------------------...
* serrano / prgm / project / bigloo / runtime / Llib / bconfigure.scm * / * Author : * / * Creation : Fri Dec 29 09:31:00 2000 * / * Last change : Tue Sep 8 20:46:29 2015 ( serrano ) * / * Cop...
7f1518daf6998fba590126b852393a185542b84f3c232310b209b4b9d99da376
release-project/benchmarks
rhesus.erl
%%%------------------------------------------------------------------- @author ( C ) 2015 , %%% @doc %%% The rhesus module is a custom implementation of the Chaos Monkey to kill IM processes at a fixed time interval . It injects %%% messages that are randomly sent to a router_supervisor or serv...
null
https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RSD-IM/rhesus.erl
erlang
------------------------------------------------------------------- @doc The rhesus module is a custom implementation of the Chaos Monkey messages that are randomly sent to a router_supervisor or server process. These processes will handle the kill request by killing of the processes are server proce...
@author ( C ) 2015 , to kill IM processes at a fixed time interval . It injects a random IM process . Server processes are killed with a probability of 1/6 except for a probability of 1/12 . These probabilities assume long runs of the Created : 12 Aug 2015 by -module(rhesus). -e...
26db0939c1d36a4ddb0ac8726f60a18adcb65e4788a611ac9dca61deced599d3
TristanCacqueray/Haxible
include-vars.hs
#!/usr/bin/env cabal -- Generated with haxible # LANGUAGE QuasiQuotes , , OverloadedStrings # cabal : build - depends : base , haxible ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T build-depends: base, haxible ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T -} modul...
null
https://raw.githubusercontent.com/TristanCacqueray/Haxible/2097a9e7b843d96d718d8bb1f0f10e24a2a9beb4/test/playbooks/include-vars.hs
haskell
Generated with haxible
#!/usr/bin/env cabal # LANGUAGE QuasiQuotes , , OverloadedStrings # cabal : build - depends : base , haxible ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T build-depends: base, haxible ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T -} module Main (main) where impor...
f8901313a2a823994b007cddaeba8c385c3eac538eb0849bf3f951828e40dd08
singnet/snet-minting-policy
NFT.hs
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # module OnChain.NFT where -- Read more about NFTs and how to create one , here import Ledger import PlutusTx import Plutus.V1.Ledger.Value import qualified Ledger.Typed.Scripts as Scripts mkPolicy :: TxOutRef -> TokenName -> BuiltinData -> ScriptContext -> Bool...
null
https://raw.githubusercontent.com/singnet/snet-minting-policy/16f3a9a02799cafdcf121052997f5cbe0513e296/src/OnChain/NFT.hs
haskell
Read more about NFTs and txInfoForge has been renamed as txInfoMint. #ref
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # module OnChain.NFT where how to create one , here import Ledger import PlutusTx import Plutus.V1.Ledger.Value import qualified Ledger.Typed.Scripts as Scripts mkPolicy :: TxOutRef -> TokenName -> BuiltinData -> ScriptContext -> Bool mkPolicy txOutRef tknName ...
a0781a587b657a308413b23cb0eb4eeeb2ba673f84fb42716bb391ccb4409e3c
ajnsit/wai-routes
Parse.hs
# LANGUAGE TemplateHaskell # # LANGUAGE PatternGuards # module Routes.Parse ( parseRoutes , parseRoutesFile , parseRoutesNoCheck , parseRoutesFileNoCheck , parseType , parseTypeTree , TypeTree (..) , dropBracket , nameToType , isTvar ) where import Language.Haskell.TH.Syn...
null
https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/src/Routes/Parse.hs
haskell
| A quasi-quoter to parse a string into a list of 'Resource's. Checks for overlapping routes, failing if present; use 'parseRoutesNoCheck' to skip the checking. See documentation site for details on syntax. | Same as 'parseRoutes', but uses an external file instead of quasiquotation. The recommended file extensio...
# LANGUAGE TemplateHaskell # # LANGUAGE PatternGuards # module Routes.Parse ( parseRoutes , parseRoutesFile , parseRoutesNoCheck , parseRoutesFileNoCheck , parseType , parseTypeTree , TypeTree (..) , dropBracket , nameToType , isTvar ) where import Language.Haskell.TH.Syn...
9a13be2c2f130d9dc7d84a17225b1dbf1ac718ff04bbc9d670167e0306066b90
racket/redex
lang-struct.rkt
#lang racket/base (require racket/promise (for-syntax racket/base)) (provide (struct-out nt) make-multi-name-nt (struct-out rhs) (struct-out bind) (struct-out mismatch-bind) (struct-out compiled-pattern) mtch mtch? make-mtch mtch-bindings ...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-lib/redex/private/lang-struct.rkt
racket
rhs = (make-rhs single-pattern) single-pattern = sexp NOTE: the bindings may contain mismatch-ribs temporarily, but they are all removed by merge-multiples/remove, a helper function called from match-pattern for testing, add inspector mtch = (make-mtch bindings sexp[context] (union none sexp[hole])) hole-i...
#lang racket/base (require racket/promise (for-syntax racket/base)) (provide (struct-out nt) make-multi-name-nt (struct-out rhs) (struct-out bind) (struct-out mismatch-bind) (struct-out compiled-pattern) mtch mtch? make-mtch mtch-bindings ...
46098408bedec2704d6f0793124fb99422193ca50df8be3b8e5ff0b7c23a1011
eugeneia/athens
derived3.lisp
(in-package :trivia.level2.impl) ;; FIXME --- this is hard to understand! Why not using trivia itself to implement this? (deftype variable-symbol () `(and symbol (not (member ,@lambda-list-keywords)) (not keyword) (not boolean))) (defun take-while (list predicate) " Checks if predicate returns true, for each eleme...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/trivia-20180711-git/level2/derived3.lisp
lisp
FIXME --- this is hard to understand! Why not using trivia itself to implement this? (take-while '(1 3 5 7 8 3) #'evenp) (1 3 5 7 8 3) (take-while '(1 3 5 7 8 3) #'oddp) (1 3 5 7) (take-while '(1 3 5 7 3) #'oddp) (1 3 5 7 3) (1 3 5 7) do nothing do nothing destructuring-lambda-list-keyword := var | ({var |...
(in-package :trivia.level2.impl) (deftype variable-symbol () `(and symbol (not (member ,@lambda-list-keywords)) (not keyword) (not boolean))) (defun take-while (list predicate) " Checks if predicate returns true, for each element of a list. Collect the elements until it returns false. Returns the collected element...
297933aa97fbe437f6c28b1c397e55917a879ed6dbe51a0b3d293b6b86df6688
cl-axon/shop2
pfile13.lisp
(in-package :shop2-user) (defproblem pfile13 DEPOT ( ;;; ;;; facts ;;; (DEPOT DEPOT0) (DEPOT DEPOT1) (DEPOT DEPOT2) (DISTRIBUTOR DISTRIBUTOR0) (DISTRIBUTOR DISTRIBUTOR1) (DISTRIBUTOR DISTRIBUTOR2) (TRUCK TRUCK0) (TRUCK TRUCK1) (TRUCK TRUCK2) (TRUCK TRUCK3) (TRU...
null
https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/examples/depots/pfile13.lisp
lisp
facts initial states goals
(in-package :shop2-user) (defproblem pfile13 DEPOT ( (DEPOT DEPOT0) (DEPOT DEPOT1) (DEPOT DEPOT2) (DISTRIBUTOR DISTRIBUTOR0) (DISTRIBUTOR DISTRIBUTOR1) (DISTRIBUTOR DISTRIBUTOR2) (TRUCK TRUCK0) (TRUCK TRUCK1) (TRUCK TRUCK2) (TRUCK TRUCK3) (TRUCK TRUCK4) (TRUCK TRUCK5) ...
a384da862ebab0e9a37e0124d8af45edfae1a473a03b5f61592b3d8dce4f01d1
pedestal/pedestal
websockets.clj
(ns io.pedestal.http.jetty.websockets (:require [clojure.core.async :as async :refer [go-loop]] [io.pedestal.log :as log]) (:import (java.nio ByteBuffer) (org.eclipse.jetty.servlet ServletContextHandler ServletHolder) (org.eclipse.jetty.websocket.servlet WebSocketCreator ...
null
https://raw.githubusercontent.com/pedestal/pedestal/1843812d3c91f983bdbde225007530af4dc1c54d/jetty/src/io/pedestal/http/jetty/websockets.clj
clojure
This is a protocol used to extend the capabilities on messages are marshalled on send Support non-blocking transmission with optional flow control Let's process sends...
(ns io.pedestal.http.jetty.websockets (:require [clojure.core.async :as async :refer [go-loop]] [io.pedestal.log :as log]) (:import (java.nio ByteBuffer) (org.eclipse.jetty.servlet ServletContextHandler ServletHolder) (org.eclipse.jetty.websocket.servlet WebSocketCreator ...
e70c69debe10f7b816b86df10d3562c096ce828570d800269cef66fed90b9722
clojure/clojurescript
nodejs.cljs
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/cljs/cljs/nodejs.cljs
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . ClojureScript 's ' print ' set up correctly . (ns cljs.nodejs (:refer-clojure :exclude [require])) Define namespaced references to Node 's externed globals : (def require (js* "require")) (def process (js* "process")) (defn enable-util-print! [] (set! *print-newl...
21d634a0b5002cb91a725974f38c008328523c2090ddc2105e4e57ff37822c89
swannodette/swannodette.github.com
dom.cljs
(ns blog.utils.dom (:require [goog.style :as style] [goog.dom :as dom] [goog.dom.classes :as classes])) (defn by-id [id] (.getElementById js/document id)) (defn set-html! [el s] (set! (.-innerHTML el) s)) (defn set-text! [el s] (dom/setTextContent el s)) (defn set-class! [el name] ...
null
https://raw.githubusercontent.com/swannodette/swannodette.github.com/91a196ded00bfacd59cc925161312090b2cfa931/code/blog/src/blog/utils/dom.cljs
clojure
(ns blog.utils.dom (:require [goog.style :as style] [goog.dom :as dom] [goog.dom.classes :as classes])) (defn by-id [id] (.getElementById js/document id)) (defn set-html! [el s] (set! (.-innerHTML el) s)) (defn set-text! [el s] (dom/setTextContent el s)) (defn set-class! [el name] ...
b234fe8b9be2d64e385e5f995b8f553f3ef8fff1de4d7b5cdb5104e5b0c87c65
haskell/cabal
SourceRepo.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # module Distribution.Types.SourceRepo ( SourceRepo(..), RepoKind(..), RepoType(..), KnownRepoType (..), knownRepoTypes, emptySourceRepo, classifyRepoType, classifyRepoKind, ) where import Prelude () import Distribution.Com...
null
https://raw.githubusercontent.com/haskell/cabal/0abbe37187f708e0a5daac8d388167f72ca0db7e/Cabal-syntax/src/Distribution/Types/SourceRepo.hs
haskell
# LANGUAGE DeriveDataTypeable # ------------------------------------------------------------ * Source repos ------------------------------------------------------------ | Information about the source revision control system for a package. When specifying a repo it is useful to know the meaning or intention of the...
# LANGUAGE DeriveGeneric # module Distribution.Types.SourceRepo ( SourceRepo(..), RepoKind(..), RepoType(..), KnownRepoType (..), knownRepoTypes, emptySourceRepo, classifyRepoType, classifyRepoKind, ) where import Prelude () import Distribution.Compat.Prelude import Distribution.Uti...
9edbd75e9fd33b832b67009f3837bc39026333289d2aab057842af3aaee0e0b0
digitallyinduced/ihp
Edit.hs
module IHP.IDE.SchemaDesigner.View.Tables.Edit where import IHP.ViewPrelude import IHP.IDE.SchemaDesigner.Types import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Layout import IHP.IDE.SchemaDesigner.View.Layout data EditTableView = EditTableView { statements :: [Statement] , tableName :: Text , ta...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/53e6f51dc739b9424b59ba155d2ec36a48c86d64/IHP/IDE/SchemaDesigner/View/Tables/Edit.hs
haskell
module IHP.IDE.SchemaDesigner.View.Tables.Edit where import IHP.ViewPrelude import IHP.IDE.SchemaDesigner.Types import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Layout import IHP.IDE.SchemaDesigner.View.Layout data EditTableView = EditTableView { statements :: [Statement] , tableName :: Text , ta...
182e335edbce8ac854a14505831f27edbe57e2af8644d8aa3b4e3e36162944e2
facebook/flow
getDefCommand.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/ef1d41ad3a13cbc439ebb020fc88ad5a6ed9f64f/src/commands/getDefCommand.ml
ocaml
********************************************************************* flow get-def command ********************************************************************* get-def command handler. - json toggles JSON output - strip_root toggles whether output positions are relativized w.r.t. root - path is a user-spec...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
47c057a70f0727600d6450810b25125fbe01aafbc7a7234a9429f0c8dd1b7049
yakaz/yamerl
flow_mapping_empty_1.erl
-module('flow_mapping_empty_1'). -include_lib("eunit/include/eunit.hrl"). -define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml"). single_test_() -> ?_assertMatch( {yamerl_parser, {file,?FILENAME}, [], <<>>, 6, true, [], 0, 7, 4, ...
null
https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/flow_mapping_empty_1.erl
erlang
-module('flow_mapping_empty_1'). -include_lib("eunit/include/eunit.hrl"). -define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml"). single_test_() -> ?_assertMatch( {yamerl_parser, {file,?FILENAME}, [], <<>>, 6, true, [], 0, 7, 4, ...
420f7682632d81215d035fda2ddd063fe75fee11997463208568fd7b177ea167
cardmagic/lucash
root-scheduler.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; The root scheduler. ; ; This uses RUN-THREADS-WITH-HOUSEKEEPER from the round-robin scheduler. ; The housekeeping thread flushes output buffers and wakes any sleeping ; threads whose time has come. (define (root-scheduler thunk quantum housekeeping-quant...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/rts/root-scheduler.scm
scheme
The root scheduler. This uses RUN-THREADS-WITH-HOUSEKEEPER from the round-robin scheduler. The housekeeping thread flushes output buffers and wakes any sleeping threads whose time has come. Returns a handler and a procedure for adding new threads. No events are handled specially. The only upcall is for abortin...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define (root-scheduler thunk quantum housekeeping-quantum) (let ((*result* 111)) (call-with-current-continuation (lambda (abort) (initialize-channel-i/o!) (run-threads-with-housekeeper (make-root-event-handler (lambda () (set! *...
f5cc27bf6f1ea374a3515c4f59983fdcf456f086321c333a25e44b32541766d4
ekmartin/sprocket
json-update.scm
(cd "json.scm/") (load "json-decode") (load "json-encode") (cd "..") (define (json-parse req) (json-decode (http-request-body req))) (define (json-body-parser) (lambda (req params) (let ((body (json-parse req)) gets procedure for updating req body (modifier (record-modifier (record-type-descriptor re...
null
https://raw.githubusercontent.com/ekmartin/sprocket/ed1f6a574521ce389a877333fed5c7824b1fdccb/json-update.scm
scheme
update http request body
(cd "json.scm/") (load "json-decode") (load "json-encode") (cd "..") (define (json-parse req) (json-decode (http-request-body req))) (define (json-body-parser) (lambda (req params) (let ((body (json-parse req)) gets procedure for updating req body (modifier (record-modifier (record-type-descriptor re...
ac12d20a8a0879470e48c7bdbd886d9a4c341d0cc1c643b130f2f6071c0df2c4
processone/tsung
oauth.erl
Copyright ( c ) 2008 - 2009 < / > %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without %% restriction, including without limitation the rights to use, %% copy, modify, merge...
null
https://raw.githubusercontent.com/processone/tsung/e9babe2acfb4298e3b51bd56886561b052979884/src/lib/oauth.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condi...
Copyright ( c ) 2008 - 2009 < / > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , -module(oauth). -ex...
076db30534c6d2f71c2fe6ca7b2b07eb365d21e803f57509959ee73fbbaa11c0
fogfish/typhoon
zephyrus_attribute.erl
%% %% Copyright 2015 Zalando SE %% 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/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/zephyrus/src/zephyrus_attribute.erl
erlang
Copyright 2015 Zalando SE 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 Licens...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(zephyrus_attribute). -author(''). -compile({parse_transform, monad}). -export([ allowed_methods/1, content_provided/1, 'GET'/3 ]). allowed_methods(_Req)...
9207c275832de5235efe34828bb658f0c112de7470c9b2352d2a2577121a25e3
clojure/core.rrb-vector
debug_platform_dependent.clj
(ns clojure.core.rrb-vector.debug-platform-dependent (:refer-clojure :exclude [format printf]) (:require [clojure.core.rrb-vector.parameters :as p] clojure.core.rrb-vector.rrbt [clojure.core.rrb-vector.nodes :refer [ranges object-nm primitive-nm object-am]] [clojure....
null
https://raw.githubusercontent.com/clojure/core.rrb-vector/88c2f814b47c0bbc4092dad82be2ec783ed2961f/src/parameterized/clojure/clojure/core/rrb_vector/debug_platform_dependent.clj
clojure
Work around the fact that several fields of type PersistentVector$TransientVector are private, but note that this is only intended for debug use. All of the classes below have a .tailoff method implementation that works correctly for that class. You can use the debug-tailoff function to work around the fact that...
(ns clojure.core.rrb-vector.debug-platform-dependent (:refer-clojure :exclude [format printf]) (:require [clojure.core.rrb-vector.parameters :as p] clojure.core.rrb-vector.rrbt [clojure.core.rrb-vector.nodes :refer [ranges object-nm primitive-nm object-am]] [clojure....
9d08d769e0a5cbbed1ec3b9cc05b6c2cca6064f77c23f2879cc3a0c4bf8ec9c2
Factual/geo
t_io.clj
(ns geo.t-io (:require [clojure.string :refer [trim]] [geo.crs :as crs] [geo.io :as sut] [geo.jts :as jts] [cheshire.core :as json] [midje.sweet :refer [fact facts truthy]]) (:import (org.locationtech.jts.geom Geometry GeometryCollection))) (def wkt (trim...
null
https://raw.githubusercontent.com/Factual/geo/75722b097d559b5d073aa673fb35bfe69663b50b/test/geo/t_io.clj
clojure
(ns geo.t-io (:require [clojure.string :refer [trim]] [geo.crs :as crs] [geo.io :as sut] [geo.jts :as jts] [cheshire.core :as json] [midje.sweet :refer [fact facts truthy]]) (:import (org.locationtech.jts.geom Geometry GeometryCollection))) (def wkt (trim...
6294b1ae6eafebdf02d5a2d6b54be6a1802f6bd9e95dbd7a3f272334e39f97bc
lulf/hcoap
Main.hs
import Network.CoAP.Server import Network.CoAP.Transport import Network.Socket import qualified Data.ByteString.Char8 as B import Control.Concurrent findPath :: [Option] -> B.ByteString findPath [] = B.empty findPath (option:options) = let restPath = findPath options sep = if B.null restPath then B.empty ...
null
https://raw.githubusercontent.com/lulf/hcoap/8127520b767430b5513be6cfe646894ae7a2e616/interop-test/server/Main.hs
haskell
import Network.CoAP.Server import Network.CoAP.Transport import Network.Socket import qualified Data.ByteString.Char8 as B import Control.Concurrent findPath :: [Option] -> B.ByteString findPath [] = B.empty findPath (option:options) = let restPath = findPath options sep = if B.null restPath then B.empty ...
f4e712a30734a90a42fe8ce7f269c43558da1ea95b03d5a51656abb3c990c5a8
weavejester/ragtime
migrations_test.clj
(ns ragtime.jdbc.migrations-test (:require [clojure.test :refer :all] [ragtime.jdbc :as jdbc] [ragtime.jdbc.migrations :refer :all])) (deftest create-table-test (is (= (create-table ::foo :foo [[:id "int"] [:name "varchar(255)"]]) (jdbc/sql-migration {:id ::foo ...
null
https://raw.githubusercontent.com/weavejester/ragtime/e7ff40a62c4c8b4963e934151cefa7260903b331/jdbc/test/ragtime/jdbc/migrations_test.clj
clojure
(ns ragtime.jdbc.migrations-test (:require [clojure.test :refer :all] [ragtime.jdbc :as jdbc] [ragtime.jdbc.migrations :refer :all])) (deftest create-table-test (is (= (create-table ::foo :foo [[:id "int"] [:name "varchar(255)"]]) (jdbc/sql-migration {:id ::foo ...
b6d121369d4c5a5b3a297b99f411215bf5d288aeb7eae18af0cb9f663cb9dcb3
PacktWorkshops/The-Clojure-Workshop
repl.clj
4 (inc 10) 5 *1 6 (inc 10) *1 (inc *1) (inc *1) (inc *2) (inc *1) 7 (/ 1 0) *e 8 (doc str) 9 (str "I" "will" "be" "concatenated") (clojure.core/str "This" " works " "too") 10 (doc doc) 11 (doc clojure.repl) 12 (find-doc "modulus") (find-doc #"(?i)modulus") 13 (mod 7 3) 14 (apropos "cas...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter01/Exercise1.02/repl.clj
clojure
4 (inc 10) 5 *1 6 (inc 10) *1 (inc *1) (inc *1) (inc *2) (inc *1) 7 (/ 1 0) *e 8 (doc str) 9 (str "I" "will" "be" "concatenated") (clojure.core/str "This" " works " "too") 10 (doc doc) 11 (doc clojure.repl) 12 (find-doc "modulus") (find-doc #"(?i)modulus") 13 (mod 7 3) 14 (apropos "cas...
17f66f76f01b063f091e6c76b9d28c93ffc480b68b7da766bd93d37f17cc027c
threatgrid/ctia
core.clj
(ns ctia.test-helpers.core (:require [clj-momo.lib.clj-time.coerce :as mcljtime-coerce] [clj-momo.lib.clj-time.core :as mcljtime] [clj-momo.lib.time :as time] [clj-momo.properties :refer [coerce-properties read-property-files]] [clojure.pprint :refer [pprint]] [clojure.spec.alpha :as cs] [clojure...
null
https://raw.githubusercontent.com/threatgrid/ctia/f70ee898556f673073350fd16238261dc1cbf524/test/ctia/test_helpers/core.clj
clojure
Default overrides for any properties that are in the default properties file yet are unsafe/undesirable for tests Set properties to enable events file logging aws firehose specific Uncomment to see logs while also capturing them for debug purpose There is bug that make it not work accross process/thread I'm no...
(ns ctia.test-helpers.core (:require [clj-momo.lib.clj-time.coerce :as mcljtime-coerce] [clj-momo.lib.clj-time.core :as mcljtime] [clj-momo.lib.time :as time] [clj-momo.properties :refer [coerce-properties read-property-files]] [clojure.pprint :refer [pprint]] [clojure.spec.alpha :as cs] [clojure...
23a99a662a86db6a9779dca8be9c6ae03b40142da809b749e3a4a1774550b41a
metosin/reitit
core_test.cljc
(ns reitit.core-test (:require [clojure.test :refer [are deftest is testing]] [reitit.core :as r #?@(:cljs [:refer [Router]])] [reitit.impl :as impl]) #?(:clj (:import (clojure.lang ExceptionInfo) (reitit.core Router)))) (deftest reitit-test (testing "routers handling ...
null
https://raw.githubusercontent.com/metosin/reitit/ae73d031b9fd1dfe05e969af6221626956465698/test/cljc/reitit/core_test.cljc
clojure
(ns reitit.core-test (:require [clojure.test :refer [are deftest is testing]] [reitit.core :as r #?@(:cljs [:refer [Router]])] [reitit.impl :as impl]) #?(:clj (:import (clojure.lang ExceptionInfo) (reitit.core Router)))) (deftest reitit-test (testing "routers handling ...
276a9932135d8cba1ab0c0edc2c07e50097d07edb3cc65d15c44d87eab297d1a
moonlightdrive/ocaml-ec2
parsexml.ml
open EC2 open Lwt let (fake : Cohttp.Response.t) = { encoding = Cohttp.Transfer.Chunked; headers = Cohttp.Header.of_list []; version = `HTTP_1_1; status = `Accepted; flush = false; } let test (action, (fn : Ezxmlm.nodes -> 'a)) = let file = Printf.sprintf "xml_responses/%s.xml" action in lwt f...
null
https://raw.githubusercontent.com/moonlightdrive/ocaml-ec2/06df35a4a29f1b51416013ddf126eeb43587dc11/lib_test/parsexml.ml
ocaml
open EC2 open Lwt let (fake : Cohttp.Response.t) = { encoding = Cohttp.Transfer.Chunked; headers = Cohttp.Header.of_list []; version = `HTTP_1_1; status = `Accepted; flush = false; } let test (action, (fn : Ezxmlm.nodes -> 'a)) = let file = Printf.sprintf "xml_responses/%s.xml" action in lwt f...
74097ef0dd08b699151fc45522da287a693facdf71ba34ef6b2b30cd254ba227
elastic/eui-cljs
eui_description_list_title_styles.cljs
(ns eui.eui-description-list-title-styles (:require ["@elastic/eui/lib/components/description_list/description_list_title.styles.js" :as eui])) (def euiDescriptionListTitleStyles eui/euiDescriptionListTitleStyles)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/eui_description_list_title_styles.cljs
clojure
(ns eui.eui-description-list-title-styles (:require ["@elastic/eui/lib/components/description_list/description_list_title.styles.js" :as eui])) (def euiDescriptionListTitleStyles eui/euiDescriptionListTitleStyles)
a4e1e61583307d6366f62cfa33cf41e5d47c1ac1c4ca6c0189314ece6a4c1b97
gorillalabs/sparkling
protocol_test.clj
(ns sparkling.protocol-test (:require [clojure.test :refer :all]) (:import [java.io ObjectInputStream ByteArrayInputStream ObjectOutputStream ByteArrayOutputStream])) (defn- serialize "Serializes a single object, returning a byte array." [v] (with-open [bout (ByteArrayOutputStream.) oos (Objec...
null
https://raw.githubusercontent.com/gorillalabs/sparkling/ffedcc70fd46bf1b48405be8b1f5a1e1c4f9f578/test/sparkling/protocol_test.clj
clojure
(ns sparkling.protocol-test (:require [clojure.test :refer :all]) (:import [java.io ObjectInputStream ByteArrayInputStream ObjectOutputStream ByteArrayOutputStream])) (defn- serialize "Serializes a single object, returning a byte array." [v] (with-open [bout (ByteArrayOutputStream.) oos (Objec...
333e61086db810bccf409d47797054a68ace0b7d7651649cc6ec418e2e643486
AbstractMachinesLab/caramel
mconfig.mli
open Std (** {1 OCaml commandline parsing} *) type ocaml = { include_dirs : string list; no_std_include : bool; unsafe : bool; classic : bool; principal : bool; real_paths : bool; threads : [ `None | `Threads | `Vmthreads ]; re...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/kernel/mconfig.mli
ocaml
* {1 OCaml commandline parsing} * {1 Merlin high-level settings}
open Std type ocaml = { include_dirs : string list; no_std_include : bool; unsafe : bool; classic : bool; principal : bool; real_paths : bool; threads : [ `None | `Threads | `Vmthreads ]; recursive_types : bool; strict_s...
2cc594ed1714f389852f003d447fc13b5de140d412368552102d3e6911e30c76
owickstrom/komposition
ImportMode.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds #...
null
https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/Application/ImportMode.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators #
# LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE PolyKinds # # LANGUAGE RebindableSyntax # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Komposition.Application.ImportMode ( ImportError(..) , ImportFileForm(.....
19cecd5658bff95951759d6bb342a08af48a42d568d443f49b7849044327d491
waymonad/waymonad
SmartBorders.hs
waymonad A wayland compositor in the spirit of xmonad Copyright ( C ) 2018 This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your op...
null
https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/Layout/SmartBorders.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveAnyClass # | Get the state for the current workspace
waymonad A wayland compositor in the spirit of xmonad Copyright ( C ) 2018 This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your op...
15790dafdf804281adbe694168695bde91707f1b7c4735a7482eb00d37c81f4e
mariaschett/syrup-backend
consts.ml
Copyright 2020 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 distributed under the Li...
null
https://raw.githubusercontent.com/mariaschett/syrup-backend/8152b9e8f4e3e92f8d7837077442231ba4ccc06d/lib/consts.ml
ocaml
program counter stack index consts given by user stack utilization u at stack index i after j instructions words on stack are modeled as integer word x at stack index i after executing j instructions instructions are modeled as integers template t to assign instructions
Copyright 2020 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 distributed under the Li...
078b464e05ea1b3d718621896d38855c44fcf53f0a7ca74045df383a01b09773
tov/shcaml
weakPlus.ml
(* * This module implements weak references and weak hash tables. The * functor Make is used to construct a new weak hash table structure. *) open Util module type WEAKPLUS = sig type 'a t type key val create : int -> 'a t val resize : ?size:int -> 'a t -> unit val add : 'a t -> key -> 'a -> unit ...
null
https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/weakPlus.ml
ocaml
* This module implements weak references and weak hash tables. The * functor Make is used to construct a new weak hash table structure. * Some helper functions To find/set the buckets in which a particular key falls. To find the index of a key within a bucket. * To add an association, we find the ...
open Util module type WEAKPLUS = sig type 'a t type key val create : int -> 'a t val resize : ?size:int -> 'a t -> unit val add : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find' : 'a t -> key -> 'a option val find : 'a t -> key -> 'a val mem : 'a t -> key -> bool...
392575cc4da64d4ea20b120a93c2ce28d2d07af3094b0343b5b20f199838f042
nyu-acsys/drift
config.ml
(* Version string *) let version = "0.1 beta" let debug = ref false let out_put_level = ref 0 (* default to print map after each step *) let bt = ref false let parse_file = ref false let file = ref "" let delay_wid = ref 0 let narrow = ref false Default : Octagon domain let use_threshold = ref false let sensi...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/src/main/config.ml
ocaml
Version string default to print map after each step
let version = "0.1 beta" let debug = ref false let bt = ref false let parse_file = ref false let file = ref "" let delay_wid = ref 0 let narrow = ref false Default : Octagon domain let use_threshold = ref false let sensitive = ref false let usage = "usage: " ^ Sys.argv.(0) ^ " [-file <file name>] [-domain <d...
2d5b0c06890baac7e7c3c333c499b62a00877f473c15b4f9e60db03700de72b5
emqx/emqx
emqx_authn_mongo_tls_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_authn/test/emqx_authn_mongo_tls_SUITE.erl
erlang
-------------------------------------------------------------------- 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 ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_authn_mongo_tls_SUITE). -compile(nowarn_export_all). -compile(export_all). -inclu...
83e4b0ee1ceafe4f06946e3445b0d862ef6fa5a1cd7d15a81d1eaafc1b9ccb17
Denommus/monadic
identity.mli
include Monad.MONAD with type 'a t = 'a val ( <$> ) : ('a -> 'b) -> 'a t -> 'b t val ( <*> ) : ('a -> 'b) t -> 'a t -> 'b t val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t module Syntax : sig val ( let+ ) : 'a t -> ('a -> 'b) -> 'b t val ( and+ ) : 'a t -> 'b t -> ('a * 'b) t val ( let* ) : 'a t -> ('a -> 'b t) -> '...
null
https://raw.githubusercontent.com/Denommus/monadic/7cbf9b309800303665a6712a9b57c1d9c66e75b8/library/identity.mli
ocaml
include Monad.MONAD with type 'a t = 'a val ( <$> ) : ('a -> 'b) -> 'a t -> 'b t val ( <*> ) : ('a -> 'b) t -> 'a t -> 'b t val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t module Syntax : sig val ( let+ ) : 'a t -> ('a -> 'b) -> 'b t val ( and+ ) : 'a t -> 'b t -> ('a * 'b) t val ( let* ) : 'a t -> ('a -> 'b t) -> '...
811bd5b2e6b2cb1c12d628b20972ab54ec492eacbc183a3dd38f1989769a1c72
uw-unsat/leanette-popl22-artifact
verify-endian.rkt
#lang racket/base (require "../../lib/tests.rkt" (only-in "../../x86/x86_32/spec.rkt" check-jit)) (module+ test (time (verify-endian "x86_32-endian tests" check-jit)))
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/jitterbug/jitterbug/racket/test/x86_32/verify-endian.rkt
racket
#lang racket/base (require "../../lib/tests.rkt" (only-in "../../x86/x86_32/spec.rkt" check-jit)) (module+ test (time (verify-endian "x86_32-endian tests" check-jit)))
775685fcae8887bbb06fb2af532b7e1f6a41c57aa6e4af00cd1cd7063c9677b3
DogLooksGood/holdem
pub.clj
(ns poker.web.pub "Server events publisher. Server event format: [event-type event-target event-data] " (:require [poker.web.ws :as ws] [clojure.tools.logging :as log] [poker.ladder :as ladder])) (defonce event-id* (atom 100)) (defmulti handle-server-event (fn [event] (firs...
null
https://raw.githubusercontent.com/DogLooksGood/holdem/fddc99c25b004647b5d4e5cbe56bdcb4e18ac9a0/src/clj/poker/web/pub.clj
clojure
we need remove states those can't be shared
(ns poker.web.pub "Server events publisher. Server event format: [event-type event-target event-data] " (:require [poker.web.ws :as ws] [clojure.tools.logging :as log] [poker.ladder :as ladder])) (defonce event-id* (atom 100)) (defmulti handle-server-event (fn [event] (firs...
4987719190a8413c4705bb8f583bc99648c2e1fb1b43face68addaf73ac57341
generateme/fastmath
utils.clj
(ns fastmath.fields.utils (:require [fastmath.random :as r] [fastmath.core :as m] [fastmath.vector :as v]) (:import [fastmath.vector Vec2 Vec3])) #_(set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (def unitx (Vec2. 1.0 0.0)) (def zerov (V...
null
https://raw.githubusercontent.com/generateme/fastmath/9281fd6fb7668c180e12acb3763ecc7f8c977e40/src/fastmath/fields/utils.clj
clojure
order: sn,cn,dn Local noise generating functions (for various noise implementations)
(ns fastmath.fields.utils (:require [fastmath.random :as r] [fastmath.core :as m] [fastmath.vector :as v]) (:import [fastmath.vector Vec2 Vec3])) #_(set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (def unitx (Vec2. 1.0 0.0)) (def zerov (V...
24fc311c698720fa8352469c13d84d089302f1cc4265f3f1841f55412a9343a4
obsidiansystems/obelisk
App.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # module...
null
https://raw.githubusercontent.com/obsidiansystems/obelisk/d779d5ab007d8ee5c3cd3400473453e1d106f5f1/lib/command/src/Obelisk/App.hs
haskell
# LANGUAGE ConstraintKinds # Only project when the other field is null, otherwise we are not law abiding. CliLog
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # module Obelisk.App where import Contro...
c4b469e97b4bc0830120d9befabf9b4a59b7c072408b1526044a3f6e95497f1a
input-output-hk/plutus
Spec.hs
module Plugin.Spec where import Test.Tasty.Extras import Plugin.Basic.Spec import Plugin.Coverage.Spec import Plugin.Data.Spec import Plugin.Debug.Spec import Plugin.Errors.Spec import Plugin.Functions.Spec import Plugin.Laziness.Spec import Plugin.NoTrace.Spec import Plugin.Primitives.Spec import Plugin.Profiling.Sp...
null
https://raw.githubusercontent.com/input-output-hk/plutus/e470420424cc8c8fb9eb140702b39c6dfeb6a443/plutus-tx-plugin/test/Plugin/Spec.hs
haskell
module Plugin.Spec where import Test.Tasty.Extras import Plugin.Basic.Spec import Plugin.Coverage.Spec import Plugin.Data.Spec import Plugin.Debug.Spec import Plugin.Errors.Spec import Plugin.Functions.Spec import Plugin.Laziness.Spec import Plugin.NoTrace.Spec import Plugin.Primitives.Spec import Plugin.Profiling.Sp...
4c3eb3563982bf4bccabda8323154c4a4445c74c602e77cde7d47c53996e904d
DavidAlphaFox/RabbitMQ
rabbit_web_dispatch_test_unit.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-web-dispatch/test/src/rabbit_web_dispatch_test_unit.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2010 - 2014 GoPivotal , Inc. All rights reserved . -module...
a26e7309ff6bd388e8913e725adda84d2d20d5d84247edf9b388cb7d87944823
ltoth/unison
os.ml
Unison file synchronizer : src / os.ml Copyright 1999 - 2010 , 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 Software Foundation , either version 3 of the License , or ( at your option )...
null
https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/os.ml
ocaml
This file attempts to isolate operating system specific details from the rest of the program. *************************************************************************** QUERYING THE FILESYSTEM ****************...
Unison file synchronizer : src / os.ml Copyright 1999 - 2010 , 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 Software Foundation , either version 3 of the License , or ( at your option )...
35012700ff87bf6351fb64afbc3de7d425aba96239438a93c4ef18cc6cc71290
eugeneia/athens
simple-date-tests.lisp
(defpackage :cl-postgres-simple-date-tests (:use :common-lisp :fiveam :cl-postgres :cl-postgres-error :simple-date) (:export #:prompt-connection #:*test-connection*)) (in-package :cl-postgres-simple-date-tests) (defparameter *test-connection* '("test" "test" "" "localhost")) (defun prompt-connection (&optional ...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/postmodern-20180711-git/cl-postgres/simple-date-tests.lisp
lisp
(defpackage :cl-postgres-simple-date-tests (:use :common-lisp :fiveam :cl-postgres :cl-postgres-error :simple-date) (:export #:prompt-connection #:*test-connection*)) (in-package :cl-postgres-simple-date-tests) (defparameter *test-connection* '("test" "test" "" "localhost")) (defun prompt-connection (&optional ...
9589c2339911af1e791169b26c9003fb059ad5151ce37d74ea14e278e8f24c2a
resttime/cl-liballegro
touch-input.lisp
(in-package #:cl-liballegro) (defcstruct touch-input) (defcstruct touch-state (id :int) (x :float) (y :float) (dx :float) (dy :float) (primary :bool) (display :pointer)) (defcstruct touch-input-state (touches (:struct touch-state) :count #.+touch-input-max-touch-count+))
null
https://raw.githubusercontent.com/resttime/cl-liballegro/0f8a3a77d5c81fe14352d9a799cba20e1a3a90b4/src/types/touch-input.lisp
lisp
(in-package #:cl-liballegro) (defcstruct touch-input) (defcstruct touch-state (id :int) (x :float) (y :float) (dx :float) (dy :float) (primary :bool) (display :pointer)) (defcstruct touch-input-state (touches (:struct touch-state) :count #.+touch-input-max-touch-count+))
03158fa179eb01dbbae5a1fb24a36896d0a4babde278f5f5e9ebcd0152c75ce6
rasheedja/PropaFP
BoxFun.hs
module PropaFP.Translators.BoxFun where import MixedTypesNumPrelude import AERN2.AD.Differential import AERN2.BoxFun.Type import AERN2.BoxFun.TestFunctions (fromListDomain) import PropaFP.Expression import PropaFP.VarMap import AERN2.MP.Ball import AERN2.MP.Float import qualified AERN2.Linear.Vector.Type as V import ...
null
https://raw.githubusercontent.com/rasheedja/PropaFP/6b1dd7aa063c8b6f97ef736ca442f0acde8c7523/src/PropaFP/Translators/BoxFun.hs
haskell
TODO: Change to bfEval FIXME: add round to AD
module PropaFP.Translators.BoxFun where import MixedTypesNumPrelude import AERN2.AD.Differential import AERN2.BoxFun.Type import AERN2.BoxFun.TestFunctions (fromListDomain) import PropaFP.Expression import PropaFP.VarMap import AERN2.MP.Ball import AERN2.MP.Float import qualified AERN2.Linear.Vector.Type as V import ...
239de23eb16a66d487abb44306d281a339a4a7c70ffe50d9793bda1919c25a0e
hhucn/decide3
proposal.cljc
(ns decide.proposal (:require [#?(:default clojure.spec.alpha :cljs cljs.spec.alpha) :as s] [com.fulcrologic.guardrails.core :refer [>def]] [decide.specs.common :as common])) (def title-char-limit 80) (>def ::id uuid?) (>def ::nice-id pos-int?) (>def ::title (s/and ::common/non-blank-string (...
null
https://raw.githubusercontent.com/hhucn/decide3/411c8700eed230df6f4f3f81ce7abeb356f5d7dd/components/domain/src/decide/proposal.cljc
clojure
(ns decide.proposal (:require [#?(:default clojure.spec.alpha :cljs cljs.spec.alpha) :as s] [com.fulcrologic.guardrails.core :refer [>def]] [decide.specs.common :as common])) (def title-char-limit 80) (>def ::id uuid?) (>def ::nice-id pos-int?) (>def ::title (s/and ::common/non-blank-string (...
ed6a80a34578cc9c7eca9c7e0b708f2258e817d589a3264e8f6dc19af775f692
tel/saltine
ConstantTimeBench.hs
module ConstantTimeBench (benchComparison) where import Criterion.Main import Control.Monad import Control.DeepSeq import Control.Exception import Data.ByteString as BS import Crypto.Saltine.Core.Auth as A import Crypto.Saltine.Class import Crypto.Saltine.Internal.Util as U import BenchUtils bench...
null
https://raw.githubusercontent.com/tel/saltine/b00e00fa8ce8bf4ee176a9d3deead57c590fc686/bench/ConstantTimeBench.hs
haskell
module ConstantTimeBench (benchComparison) where import Criterion.Main import Control.Monad import Control.DeepSeq import Control.Exception import Data.ByteString as BS import Crypto.Saltine.Core.Auth as A import Crypto.Saltine.Class import Crypto.Saltine.Internal.Util as U import BenchUtils bench...
2f62cd5ef8a96fc94c296201ad2d3ba0ee61ffc5ab3dfce6f2e468607424761d
facebook/infer
controlFlowCost.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/d2e59e6df24858729129debcc2813ae3915c4f0a/infer/src/cost/controlFlowCost.ml
ocaml
non-empty sorted list Invalidation is just a sanity check, union-find already takes care of it. move semantics, should not be called with aliases
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
97ff20075df584e4a1ea6fb854688359873ea0addb0f76f1b016f56b0fd34fed
nrnrnr/qc--
one01Syntax.ml
open Pprint type exp = (allTypes) Syntax.bExp and amode_S = Short | Hword | Word | Dword and instruction_S = Add of exp * exp * exp | Ld of exp * exp | St of exp * exp | Nop and allTypes = T__amode of amode_S | T__instruction of instruction_S let pallTypes printtExp = fun x1 -> (matc...
null
https://raw.githubusercontent.com/nrnrnr/qc--/ec56191b669729e7ce8181a2bd97a912842ea716/tdpe/one01Syntax.ml
ocaml
open Pprint type exp = (allTypes) Syntax.bExp and amode_S = Short | Hword | Word | Dword and instruction_S = Add of exp * exp * exp | Ld of exp * exp | St of exp * exp | Nop and allTypes = T__amode of amode_S | T__instruction of instruction_S let pallTypes printtExp = fun x1 -> (matc...
3f2abd3a3807c10b4705cb3e9eb8532218e4ef7cda6adc3db1b9277b13b6735a
lateio/kurremkarmerruk
timeout_behavior.erl
-module(timeout_behavior). % Declare timeout values and error tolerance for recursing We only need resend for udp resolvers ... Timeout based on what we know about the average latency for that address ?
null
https://raw.githubusercontent.com/lateio/kurremkarmerruk/7743cb75e92ed6ffe0f147f96148299df47c9dcf/src/handlers/kurremkarmerruk_recurse/recurse_behavior/timeout_behavior.erl
erlang
Declare timeout values and error tolerance for recursing
-module(timeout_behavior). We only need resend for udp resolvers ... Timeout based on what we know about the average latency for that address ?
795a051537083d8b715c7ac45afc4ca4222a789712a0c1a665b8994feb932153
noughtmare/hypercube
Error.hs
# LANGUAGE LambdaCase # module Hypercube.Error (printErrors) where import Control.Monad import Graphics.GL getErrors :: IO [GLuint] getErrors = do err <- glGetError if err == GL_NO_ERROR then return [] else (err:) <$> getErrors showError :: GLuint-> String showError = \case GL_INVALID_ENUM ...
null
https://raw.githubusercontent.com/noughtmare/hypercube/d3d343a2b9dd651568cb0ff859cbf583ae340712/src/Hypercube/Error.hs
haskell
# LANGUAGE LambdaCase # module Hypercube.Error (printErrors) where import Control.Monad import Graphics.GL getErrors :: IO [GLuint] getErrors = do err <- glGetError if err == GL_NO_ERROR then return [] else (err:) <$> getErrors showError :: GLuint-> String showError = \case GL_INVALID_ENUM ...