_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
279a5e5b4b61a70b815f03885ba85ead6f663101a3330d2b1673b73298dfbcf1
viglioni/lang-studies
Keys.hs
module Keys ( genPrivateKey, genPublicKey, PrivateKey, PublicKey, getAfromKey, getBfromKey, privateKeySize, publicKeySize ) where import Data.List.Split (chunksOf) import Data.Maybe import Phi import System.Random import Zp type PrivateKey = [Int] data PublicKey = PublicKey { aVecto...
null
https://raw.githubusercontent.com/viglioni/lang-studies/28fef8a1076c4dcfb4f6ce364dbaa6739a64cbd2/regev-cryptosystem/src/Keys.hs
haskell
module Keys ( genPrivateKey, genPublicKey, PrivateKey, PublicKey, getAfromKey, getBfromKey, privateKeySize, publicKeySize ) where import Data.List.Split (chunksOf) import Data.Maybe import Phi import System.Random import Zp type PrivateKey = [Int] data PublicKey = PublicKey { aVecto...
5eb54de89b73307680ab5c86037b68a510ec98310740af86eeebb7b29491459d
tsloughter/kuberl
kuberl_v1_api_resource.erl
-module(kuberl_v1_api_resource). -export([encode/1]). -export_type([kuberl_v1_api_resource/0]). -type kuberl_v1_api_resource() :: #{ 'categories' => list(), 'group' => binary(), 'kind' := binary(), 'name' := binary(), 'namespaced' := boolean(), 'shortNames' => list(), 's...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_api_resource.erl
erlang
-module(kuberl_v1_api_resource). -export([encode/1]). -export_type([kuberl_v1_api_resource/0]). -type kuberl_v1_api_resource() :: #{ 'categories' => list(), 'group' => binary(), 'kind' := binary(), 'name' := binary(), 'namespaced' := boolean(), 'shortNames' => list(), 's...
3bb3ce279cfa1c2499bc082547eb5cec6b6ae896b788b14be736df1370e31ca0
mhuebert/chia
resolve.cljs
(ns chia.routing.resolve (:require [chia.routing.registry :as registry] [kitchen-async.promise :as p] [bidi.bidi :as bidi] [clojure.set :as set] [chia.routing.routers :refer [db-id]] [chia.db :as db] [chia.lazy :as lazy] [cljs.pprint ...
null
https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/routing/src/chia/routing/resolve.cljs
clojure
(ns chia.routing.resolve (:require [chia.routing.registry :as registry] [kitchen-async.promise :as p] [bidi.bidi :as bidi] [clojure.set :as set] [chia.routing.routers :refer [db-id]] [chia.db :as db] [chia.lazy :as lazy] [cljs.pprint ...
fb1cdc2f0b3841b122ce549b20372446b803f6e46319a4d4e89c53039422306d
Disco-Dave/message-db
PositionStrategySpec.hs
module MessageDb.Subscription.PositionStrategySpec (spec) where import Control.Concurrent (threadDelay) import qualified Control.Concurrent.MVar as MVar import Control.Monad (replicateM_, unless) import Control.Monad.Reader (ask) import Data.Coerce (coerce) import qualified Data.Pool as Pool import qualified Examples....
null
https://raw.githubusercontent.com/Disco-Dave/message-db/fb73fb60a2c082135c5bda586681131fe004dfe4/message-db/test/MessageDb/Subscription/PositionStrategySpec.hs
haskell
module MessageDb.Subscription.PositionStrategySpec (spec) where import Control.Concurrent (threadDelay) import qualified Control.Concurrent.MVar as MVar import Control.Monad (replicateM_, unless) import Control.Monad.Reader (ask) import Data.Coerce (coerce) import qualified Data.Pool as Pool import qualified Examples....
bb7bb2ea8259b9deb6eb0dda88ec3d2adb3976e7411840cf64b4a788f8e23904
kazu-yamamoto/http2
DoublyLinkedQueueIO.hs
# LANGUAGE RecordWildCards # module DoublyLinkedQueueIO ( Queue , Node , item , new , isEmpty , enqueue , dequeue , delete ) where import Data.IORef data Queue a = Queue { entr :: Node a , exit :: Node a } data Node a = Node { item :: a , prev :: {-# UNPACK #-} !(IORef (Node a)) ...
null
https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/bench-priority/DoublyLinkedQueueIO.hs
haskell
# UNPACK # # UNPACK #
# LANGUAGE RecordWildCards # module DoublyLinkedQueueIO ( Queue , Node , item , new , isEmpty , enqueue , dequeue , delete ) where import Data.IORef data Queue a = Queue { entr :: Node a , exit :: Node a } data Node a = Node { item :: a } deriving Eq newNode :: a -> IO (Node a) ne...
877af0dc823ae64e5acc126721c83733a0e3ce65752b2ef83474bd5800cbb37c
fission-codes/fission
Reset.hs
module Fission.Web.Server.Handler.User.Password.Reset (handler) where import Database.Esqueleto.Legacy import Servant import Fission.Prelude import qualified Fission.User.Password.Reset.Types as User.Password import qualified Fission.Web.API.User.Password.Reset.Types as API.Pas...
null
https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-web-server/library/Fission/Web/Server/Handler/User/Password/Reset.hs
haskell
module Fission.Web.Server.Handler.User.Password.Reset (handler) where import Database.Esqueleto.Legacy import Servant import Fission.Prelude import qualified Fission.User.Password.Reset.Types as User.Password import qualified Fission.Web.API.User.Password.Reset.Types as API.Pas...
a600f08f6caad8a123a72073d7befadd7c2a24fb704dcd43b6f0974a1e1fbcfb
jyh/metaprl
m_x86_asm.ml
doc <:doc< @spelling{MUL DIV cc} @module[M_x86_asm] This module defines our representation of x86 assembly code. The one difference here, compared to traditional approaches, is that we continue to use variable scoping. @docoff ---------------------------------------------------------------- @...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/experimental/compile/m_x86_asm.ml
ocaml
************************************************************************ * Operands. ************************************************************************ * Condition codes. ************************************************************************ * Instructions. * Various forms of tailcalls. * The tailca...
doc <:doc< @spelling{MUL DIV cc} @module[M_x86_asm] This module defines our representation of x86 assembly code. The one difference here, compared to traditional approaches, is that we continue to use variable scoping. @docoff ---------------------------------------------------------------- @...
bf2a0d7bde8f54d47e49c0c691943531a9992f843911d5b888779bc8b5034a44
rems-project/lem
initial_env.mli
(**************************************************************************) (* Lem *) (* *) , University of Cambridge , INRIA Paris -...
null
https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/initial_env.mli
ocaml
************************************************************************ Lem ...
, University of Cambridge , INRIA Paris - Rocquencourt , University of Cambridge , University of Cambridge , University of Cambridge ( while working on Lem ) ...
3af1523d774ce740a1bfd07e901c224022a5354b657967fbbf387449a3506e46
nanopass/nanopass.github.io
info.rkt
#lang info (define raco-commands '(("nwt" (submod "make.rkt" main) "run Nanopass Website Tools" #f))) (define deps '("base" "scribble-lib" "pict-lib" "images-lib" "frog" "markdown"))
null
https://raw.githubusercontent.com/nanopass/nanopass.github.io/53fd9e68b38df6492b8adad52d3c28bd84b53ffb/info.rkt
racket
#lang info (define raco-commands '(("nwt" (submod "make.rkt" main) "run Nanopass Website Tools" #f))) (define deps '("base" "scribble-lib" "pict-lib" "images-lib" "frog" "markdown"))
92285e17b1b0ffafec332e2716339e4da816adb9c97495542453270676457d7f
tekul/jose-jwt
profile.hs
# LANGUAGE BangPatterns , OverloadedStrings # module Main where import Crypto.Random import Jose.Jws import Jose.Jwa import qualified Data.ByteString.Char8 as B import Keys msgPrefix = "The best laid schemes o' mice and men..." main = do --rng <- cprgCreate `fmap` createEntropyPool :: IO SystemRNG let !msgs ...
null
https://raw.githubusercontent.com/tekul/jose-jwt/1ac2335d4feda47da21075f39b8c8805a51583f0/benchmarks/profile.hs
haskell
rng <- cprgCreate `fmap` createEntropyPool :: IO SystemRNG
# LANGUAGE BangPatterns , OverloadedStrings # module Main where import Crypto.Random import Jose.Jws import Jose.Jwa import qualified Data.ByteString.Char8 as B import Keys msgPrefix = "The best laid schemes o' mice and men..." main = do let !msgs = map ((B.append msgPrefix) . B.pack . show) [1..10000] mapM...
9bab6f36c3e4a9ffb4ff5a838d6331312b1f1abe66bade12253f38b493ed661c
stwind/ectl
ectl_lib.erl
-module(ectl_lib). -export([get_nodes/1]). -export([load_recon/1]). -export([arg/2]). -export([to_str/1]). -include("ectl.hrl"). %% =================================================================== %% Public %% =================================================================== load_recon(Nodes) when is_list(Node...
null
https://raw.githubusercontent.com/stwind/ectl/056adbcacdf264502d0f88e9e6171a708ba6c875/src/ectl_lib.erl
erlang
=================================================================== Public =================================================================== =================================================================== Private ===================================================================
-module(ectl_lib). -export([get_nodes/1]). -export([load_recon/1]). -export([arg/2]). -export([to_str/1]). -include("ectl.hrl"). load_recon(Nodes) when is_list(Nodes) -> [load_recon(N) || N <- Nodes]; load_recon(Node) when is_atom(Node) -> [recon:remote_load(Node,M) || M <- [recon,recon_lib,recon_alloc]]. ...
cf77b656a3cec851e5b721e4ff108d4bc9b2934a3b5d2dd4968935fc8fa5f33f
matsen/pplacer
guppy_epca.ml
open Ppatteries open Subcommand open Guppy_cmdobjs let expand full_length m arr = let full = Array.make full_length 0. in Array.iteri (fun i v -> full.(IntMap.find i m) <- v) arr; full type epca_result = { eval: float array; evect: float array array } type epca_data = { edge_diff: float array list; ...
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/guppy_epca.ml
ocaml
Various checks and so on... Once we have eigenvalues and eigenvectors, this will project the data * and write. no truncation. Below: Take the dot product of each data point with the principal component vector. This is the same as multiplying on the right by the matrix whose columns...
open Ppatteries open Subcommand open Guppy_cmdobjs let expand full_length m arr = let full = Array.make full_length 0. in Array.iteri (fun i v -> full.(IntMap.find i m) <- v) arr; full type epca_result = { eval: float array; evect: float array array } type epca_data = { edge_diff: float array list; ...
b3f1238b5db67474ffc7f9f7740c218c6a17ac1bbadd2784e7453d34248f3242
agentm/project-m36
MiscUtils.hs
module ProjectM36.MiscUtils where --returns duplicates of a pre-sorted list dupes :: Eq a => [a] -> [a] dupes [] = [] dupes [_] = [] dupes [x,y] = [x | x == y] dupes (x:y:xs) = dupes(x:[y]) ++ dupes(y : xs) Data.Vector.indexed but for lists indexed :: [a] -> [(Int, a)] indexed = go 0 where go _ [] = [] ...
null
https://raw.githubusercontent.com/agentm/project-m36/57a75b35e84bebf0945db6dae53350fda83f24b6/src/lib/ProjectM36/MiscUtils.hs
haskell
returns duplicates of a pre-sorted list
module ProjectM36.MiscUtils where dupes :: Eq a => [a] -> [a] dupes [] = [] dupes [_] = [] dupes [x,y] = [x | x == y] dupes (x:y:xs) = dupes(x:[y]) ++ dupes(y : xs) Data.Vector.indexed but for lists indexed :: [a] -> [(Int, a)] indexed = go 0 where go _ [] = [] go i (v:ys) = (i,v):go (i+1) ys
9e52a99bf18edf66fac878535b781ae640d18f24038386af2c3d5d1810f65abb
rbardou/red
line.mli
(** Immutable text lines. *) include module type of Sequence (** Same as [count]. *) val length: 'a t -> int (** Make a line from a UTF8-encoded string. *) val of_utf8_string: string -> Character.t t (** Add a line to a buffer. *) val to_buffer: Buffer.t -> Character.t t -> unit (** Output a line to a channel, new...
null
https://raw.githubusercontent.com/rbardou/red/e23c2830909b9e5cd6afe563313435ddaeda90bf/src/line.mli
ocaml
* Immutable text lines. * Same as [count]. * Make a line from a UTF8-encoded string. * Add a line to a buffer. * Output a line to a channel, newline character not included.
include module type of Sequence val length: 'a t -> int val of_utf8_string: string -> Character.t t val to_buffer: Buffer.t -> Character.t t -> unit val output_channel: out_channel -> Character.t t -> unit
8b2fdb773c07828242105adcc4026f2fc8115a7faa2f5a458158fd5102074f34
clojure-lsp/clojure-lsp
thread_get_test.clj
(ns clojure-lsp.feature.thread-get-test (:require [clojure-lsp.feature.thread-get :as f.thread-get] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is]])) (h/reset-components-before-test) (defn get-in-more-code [code] (f.thread-get/get-in-more (h/load-code-and-zloc code))) (defn get-in-all...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/e30c8243c2d5a655fa300d3445c756c5c1ba7092/lib/test/clojure_lsp/feature/thread_get_test.clj
clojure
(ns clojure-lsp.feature.thread-get-test (:require [clojure-lsp.feature.thread-get :as f.thread-get] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is]])) (h/reset-components-before-test) (defn get-in-more-code [code] (f.thread-get/get-in-more (h/load-code-and-zloc code))) (defn get-in-all...
ef73222d70f375d8f7c5ef0deee1b8630442de9da45202b796ac54fcbda1dff8
jship/context
View.hs
# LANGUAGE NoImplicitPrelude # module Context.View ( View , view , viewMay , toView ) where import Context.Internal (View, view, viewMay, toView)
null
https://raw.githubusercontent.com/jship/context/26558ba0c58e1630e562644dd71a74e459607632/context/library/Context/View.hs
haskell
# LANGUAGE NoImplicitPrelude # module Context.View ( View , view , viewMay , toView ) where import Context.Internal (View, view, viewMay, toView)
a14628bd9570785a9a6447ad52f98fb37a2106ce5afce0458a7b24c9d1f85a7e
justone/bb-scripts
comb.clj
(ns lib.comb (:require [comb.template :as template] )) #_(template/eval "<%= name %>" {:name "Nate"})
null
https://raw.githubusercontent.com/justone/bb-scripts/2613368f33e049cad03bc787a3158c414e3b2dc2/src/lib/comb.clj
clojure
(ns lib.comb (:require [comb.template :as template] )) #_(template/eval "<%= name %>" {:name "Nate"})
4322c520629be2e1b56c46c52999df54eb1e40cb0b72ca7244c538069843750d
gregr/ina
trie-vector.scm
((provide tvec:empty tvec->list list->tvec tvec-length tvec-ref tvec-set tvec-push tvec-pop) (require test)) ;; TODO: standardize these. (define (vector-push v x) (define len (vector-length v)) (define mv (make-mvector (+ len 1) x)) (let loop ((i (- len 1))) (when (<= 0 i) (mvector-set! mv i (vect...
null
https://raw.githubusercontent.com/gregr/ina/5e0a5b7ec44c8c9575b22ce5c394f7a96b766545/nscheme/old/old-5/lib/trie-vector.scm
scheme
TODO: standardize these. TODO: define batch/interval/slice operators: tvec-ref*, tvec-set*, tvec-push*, tvec-pop* For efficiency, redefine single-element operators in terms of these. (tvec->list (* branch-size branch-size branch-size)))))
((provide tvec:empty tvec->list list->tvec tvec-length tvec-ref tvec-set tvec-push tvec-pop) (require test)) (define (vector-push v x) (define len (vector-length v)) (define mv (make-mvector (+ len 1) x)) (let loop ((i (- len 1))) (when (<= 0 i) (mvector-set! mv i (vector-ref v i)) (loop (- i 1)))...
cb77286bb860ba0a884a4dcbea82c47428c29490b1204d3ea9c9d49cd38d5d8e
Noeda/dfterm3
DwarfFortress.hs
| Dfhack plugin based Dwarf Fortress game module . -- # LANGUAGE CPP # # LANGUAGE DeriveDataTypeable , DeriveGeneric , ForeignFunctionInterface # # LANGUAGE TypeFamilies , TemplateHaskell , OverloadedStrings # module Dfterm3.Game.DwarfFortress ( monitorDwarfFortresses , DwarfFortressPersistent() , GameI...
null
https://raw.githubusercontent.com/Noeda/dfterm3/6b33c9b4712da486bb84356f6c9f48abb8074faf/src/Dfterm3/Game/DwarfFortress.hs
haskell
The protocol buffer thingy. Keep in sync with dfhack: plugins/proto/dfterm3.proto in the dfhack repository. | The data that needs to be persistently stored about a Dwarf Fortress. keep these lazy Have somewhat random delay. This is to evenly distribute load. | Data type to throw an exception without writing to ...
| Dfhack plugin based Dwarf Fortress game module . # LANGUAGE CPP # # LANGUAGE DeriveDataTypeable , DeriveGeneric , ForeignFunctionInterface # # LANGUAGE TypeFamilies , TemplateHaskell , OverloadedStrings # module Dfterm3.Game.DwarfFortress ( monitorDwarfFortresses , DwarfFortressPersistent() , GameInpu...
3669f29245646fd3745c1826f8c7156829bf18b9e40c1f00dbf0497a182ad4c2
fragnix/fragnix
System.IO.hs
{-# LINE 1 "System.IO.hs" #-} # LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , CApiFFI # ----------------------------------------------------------------------------- -- | -- Module : System.IO Copyright : ( c ) The University of Glasgow 2001 -- Licen...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/System.IO.hs
haskell
# LINE 1 "System.IO.hs" # --------------------------------------------------------------------------- | Module : System.IO License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable ---------------------------------------------------------...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , CApiFFI # Copyright : ( c ) The University of Glasgow 2001 The standard IO library . module System.IO ( * The IO monad IO, fixIO, FilePath, | GHC note : a ' Handle ' will be automatica...
7a1e8b523201ec5397f31afb838f0ace073d5beb6d9f32aad8cd823e83c16046
input-output-hk/cardano-ledger
Tx.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module Cardano.Chain.UTxO.Tx ( Tx (..), txF, TxId, TxAttributes, TxIn (..), TxOut (..), ) where import Cardano.Chain.Common ( Address (..), Lovela...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/UTxO/Tx.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Transaction ^ Inputs of transaction. ^ Outputs of transaction. ^ Attributes of transaction Used...
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE TypeApplications # module Cardano.Chain.UTxO.Tx ( Tx (..), txF, TxId, TxAttributes, TxIn (..), TxOut (..), ) where import Cardano.Chain.Common ( Address (..), Lovelace, lovelaceF, ) import Cardano.Chain.Common.Attributes (Attribu...
1c2bdcc1a7b675bd587a7bb6ec96fff947db076e8c01e26afae7d615ebdca9a8
janestreet/bonsai
to_code.ml
open! Core open Bonsai_quickcheck_internal module Buf = Indentation_buffer let default_buf_size = 1024 let data_to_string = real_data_to_string let uid_to_string table uid = let mapped_id = Hashtbl.find_or_add table uid ~default:(fun () -> Hashtbl.length table) in sprintf "x%d" mapped_id ;; let prep buffer...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/test/quickcheck/src/to_code.ml
ocaml
open! Core open Bonsai_quickcheck_internal module Buf = Indentation_buffer let default_buf_size = 1024 let data_to_string = real_data_to_string let uid_to_string table uid = let mapped_id = Hashtbl.find_or_add table uid ~default:(fun () -> Hashtbl.length table) in sprintf "x%d" mapped_id ;; let prep buffer...
a1b33e79a3b175750f5e6beb45c40c0e18ed6a85aa72aa64fffd7eb56d770f55
MaskRay/OJHaskell
111.hs
import Control.Monad import Data.Function import Data.List import Data.Ord isPrime n = and [n `mod` p /= 0 | p <- takeWhile (\x -> x*x <= n) primes] primes = 2 : filter isPrime [3,5..] gen n d = [ (length $ filter (==[d]) s, s'') | s <- replicateM n [delete d [0..9], [d]] , let s' = delete 0 (head...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/111.hs
haskell
import Control.Monad import Data.Function import Data.List import Data.Ord isPrime n = and [n `mod` p /= 0 | p <- takeWhile (\x -> x*x <= n) primes] primes = 2 : filter isPrime [3,5..] gen n d = [ (length $ filter (==[d]) s, s'') | s <- replicateM n [delete d [0..9], [d]] , let s' = delete 0 (head...
dfb83310645eaa48306fe3303880b7966278d3574a9a3a8c41b1d798609ec278
haskell/attoparsec
Text.hs
# LANGUAGE BangPatterns , CPP , FlexibleInstances , TypeSynonymInstances # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif # OPTIONS_GHC -fno - warn - warnings - deprecations # -- | Module : Data . . Text Copyright : 2007 - 2015 -- License : BSD3 -- -- Maintainer : -- Stabili...
null
https://raw.githubusercontent.com/haskell/attoparsec/85510bdf2c0a42daaf2ab5ef126d5d94a648993a/Data/Attoparsec/Text.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : unknown Simple, efficient combinator parsing for 'Text' strings, * Incremental input $incremental * Performance considerations $performance * Running parsers ** Result conversion * Parsing individual characters ** Special c...
# LANGUAGE BangPatterns , CPP , FlexibleInstances , TypeSynonymInstances # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif # OPTIONS_GHC -fno - warn - warnings - deprecations # Module : Data . . Text Copyright : 2007 - 2015 loosely based on the Parsec library . module Data.Attopar...
df2dde63b3e0c043d08553660d22f49897365f6bb28633206d307a9264a20c7f
pedestal/pedestal
project.clj
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; 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 ...
null
https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/samples/servlet-filters-gzip/project.clj
clojure
The use and distribution terms for this software are covered by the 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 this notice, or any other, from this software. T...
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. Eclipse Public License 1.0 ( ) (defproject gzip "0.5.5" :description "a sample demonstrating container-specific configuration" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojur...
7749ddff238a2d5fd73c48030529364611f2ea5bfc53d2cea305ecaa1a881cfb
vale1410/bule
Parse.mli
val from_file : unit -> string -> Types.PARSE.T.file val facts : string -> (Types.AST.T.cname * Types.CIRCUIT.T.search_var list) list
null
https://raw.githubusercontent.com/vale1410/bule/37f56381c278751490cbb344101220f74652d6c9/src/lib/Parse.mli
ocaml
val from_file : unit -> string -> Types.PARSE.T.file val facts : string -> (Types.AST.T.cname * Types.CIRCUIT.T.search_var list) list
40e0f6d5316b37037837ce4a021dbb11ea939775fa4da8dc99c16f7d781fe981
nomeata/haskell-candid
Data.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE KindSignatures # # LANGUAGE DataKinds # -- | A few extra data types module Codec.Candid.Data where import qualified Data.ByteString.Lazy as BS import qualified Data.ByteString.Builder as BS import qualified Data.Text as T import qualified Data.Text.Encoding as T import qu...
null
https://raw.githubusercontent.com/nomeata/haskell-candid/6a7b3e1142d3c12267bf14c9dfd7ce250f24b889/src/Codec/Candid/Data.hs
haskell
# LANGUAGE OverloadedStrings # | A few extra data types
# LANGUAGE KindSignatures # # LANGUAGE DataKinds # module Codec.Candid.Data where import qualified Data.ByteString.Lazy as BS import qualified Data.ByteString.Builder as BS import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Row.Internal as R import Data.Digest.CRC import Da...
30ca1a95855a2d6d0a58ffd0c0acd7dbe66513828043ba4a45055343b97a9461
zeromq/chumak
chumak_z85.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% @doc Implements Z85 encoding and decoding, as specified in :32/Z85/ -module(chumak_z85). -define(SPECIAL_CHARS, ".-:+=^!/*?&<>()[]{}@%$...
null
https://raw.githubusercontent.com/zeromq/chumak/02f56f153d0c6988858483c9dd0a1c233e2aa342/src/chumak_z85.erl
erlang
@doc Implements Z85 encoding and decoding, as specified in with no remainder. with no remainder. Note that not all strings are valid encodings. The result for a string that is not a valid encoding is unspecified. --------------------------------------------------------------------------- -------------------...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. :32/Z85/ -module(chumak_z85). -define(SPECIAL_CHARS, ".-:+=^!/*?&<>()[]{}@%$#"). -export([encode/1, decode/1]). -spec encode(binary()) ->...
8d48758c5d8b9af88690c49631c96f6b7b5c3499f110f3772da62a61d7241e83
vikram/lisplibraries
lalr.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: LALR; -*- ;;; --------------------------------------------------------------------------- ;;; Title: LALR parser generator Created : 1988 Author : < > ;;; --------------------------------------------------------------------------- ( c ) 1988 (defpa...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/trivial-html-parser_0.1/lalr.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: LALR; -*- --------------------------------------------------------------------------- Title: LALR parser generator --------------------------------------------------------------------------- lalr.lisp the rules that expand a category, and the items that expand ...
Created : 1988 Author : < > ( c ) 1988 (defpackage :lalr (:use :cl :glisp :runes) (:export #:DEFINE-GRAMMAR)) (in-package :LALR) This is an LALR parser generator . ( c ) 1988 . This is * not * the property of Xerox Corporation ! Modified to cache the first terminals , the epsilon...
d23b0cb6f0ea47408e24e0cefe0dcad2156b64fa4baa80102b06a3371427f3f6
rsharifnasab/my-learning
FunctionalWithWhere.hs
module FunctionalWithWhere where printInt n = print plusTwo where plusTwo = n+2
null
https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/2-hello/FunctionalWithWhere.hs
haskell
module FunctionalWithWhere where printInt n = print plusTwo where plusTwo = n+2
93804a3350d1efa9f39e1c24c83e7ca7eed12a7eab5126862a3aa27bfe1f114d
retro/keechma-next-realworld-app
login_form.cljs
(ns app.controllers.guest.login-form (:require [keechma.next.controller :as ctrl] [keechma.next.controllers.pipelines :as pipelines] [keechma.pipelines.core :as pp :refer-macros [pipeline!]] [app.api :as api] [promesa.core :as p] [keechma.next.controllers.fo...
null
https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/src/app/controllers/guest/login_form.cljs
clojure
(ns app.controllers.guest.login-form (:require [keechma.next.controller :as ctrl] [keechma.next.controllers.pipelines :as pipelines] [keechma.pipelines.core :as pp :refer-macros [pipeline!]] [app.api :as api] [promesa.core :as p] [keechma.next.controllers.fo...
89f6e3af434be4d9ff3a4ead53e3d96adbeed7178acc560bc9d28510666202e5
quchen/prettyprinter
StackMachine.hs
# DEPRECATED " Use \"Prettyprinter . Render . Util . " instead . " # module Prettyprinter.Render.Util.StackMachine ) where import Prettyprinter.Render.Util.StackMachine
null
https://raw.githubusercontent.com/quchen/prettyprinter/880f41eac31edfac71d2d66d338e6cfdae4f3715/prettyprinter/src/Data/Text/Prettyprint/Doc/Render/Util/StackMachine.hs
haskell
# DEPRECATED " Use \"Prettyprinter . Render . Util . " instead . " # module Prettyprinter.Render.Util.StackMachine ) where import Prettyprinter.Render.Util.StackMachine
00ae6715693b6cb5c90e084ab52f778082fd51df9996843e3684b562d8dad3ab
Helium4Haskell/helium
Simple4.hs
module Simple where empty [] = 1 emty xs = 0 main = 2 +. 4
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/docs/wiki-material/Simple4.hs
haskell
module Simple where empty [] = 1 emty xs = 0 main = 2 +. 4
219de25901b2890bc0a599590567fdec2c6baa24ccd0a36c89ad40b57e8cbec0
boot-clj/boot
cli.clj
(ns boot.cli (:refer-clojure :exclude [assert]) (:require [boot.util :as util] [clojure.java.io :as io] [clojure.string :as string] [clojure.pprint :as pprint] [boot.from.clojure.tools.cli :as cli])) (def ^:private A-Z? (->> (range (int \A) (inc (int \Z))) (map char) set (partial contains?)))...
null
https://raw.githubusercontent.com/boot-clj/boot/64334b4d5744b1444634f4a5a5a52b3ae67dddeb/boot/core/src/boot/cli.clj
clojure
this, because in theory we should handle the case of single vector
(ns boot.cli (:refer-clojure :exclude [assert]) (:require [boot.util :as util] [clojure.java.io :as io] [clojure.string :as string] [clojure.pprint :as pprint] [boot.from.clojure.tools.cli :as cli])) (def ^:private A-Z? (->> (range (int \A) (inc (int \Z))) (map char) set (partial contains?)))...
cf116e0db5d27a18a79831f5f6fd374f8d15ef0bfc0a66595f39ce32839ec557
larcenists/larceny
units.scm
(define sassy-linked-units (make-hash-table equal?)) (define sassy-linking-files (make-hash-table equal?)) (define sassy-loaded-sources (make-hash-table equal?)) (define sassy-code-sources (make-hash-table equal?)) (define sassy-dynamic-sources (make-hash-table equal?)) (define sassy-dependencies (make-hash-table equa...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/units.scm
scheme
I move these to extras.scm -Jon (define (file->sexp-list file) (call-with-input-file file (lambda (p) (let lp ((res '())) (let ((sexp (read p))) (if (eof-object? sexp) (reverse res) (lp (cons sexp res)))))))) (define (string-split str ch) (let ((len (st...
(define sassy-linked-units (make-hash-table equal?)) (define sassy-linking-files (make-hash-table equal?)) (define sassy-loaded-sources (make-hash-table equal?)) (define sassy-code-sources (make-hash-table equal?)) (define sassy-dynamic-sources (make-hash-table equal?)) (define sassy-dependencies (make-hash-table equa...
9aaca7e131734226341b36683baeb0a5b9663253dfb89fd3fafdc6a07369a13b
fmthoma/vgrep
Case.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE Rank2Types #-} # LANGUAGE RecordWildCards # module Test.Case ( TestCase (..) ...
null
https://raw.githubusercontent.com/fmthoma/vgrep/f3b140bf3150a3699234469c34ff8c13a298998e/test/Test/Case.hs
haskell
# LANGUAGE Rank2Types #
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module Test.Case ( TestCase (..) , runTestCase , runTestCases , ...
93349b535381de2687add72add273b400d0f1b0eefd2132e5812f9c6f1ba1181
ConsenSysMesh/Fae
Parent.hs
body :: Transaction Void () body _ = newContract ParentContract data ParentContract = ParentContract deriving (Generic) instance ContractName ParentContract where type ArgType ParentContract = () type ValType ParentContract = String theContract ParentContract = \() -> spend "Called"
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/txs/Parent.hs
haskell
body :: Transaction Void () body _ = newContract ParentContract data ParentContract = ParentContract deriving (Generic) instance ContractName ParentContract where type ArgType ParentContract = () type ValType ParentContract = String theContract ParentContract = \() -> spend "Called"
1953fc722d4a0ca1c1bb6e7802d30daaf3211e548c9555f5fde386e0732e7541
xapi-project/xen-api-libs
debug.ml
let debug_hook : (('b, unit, string, unit) format4 -> 'b) option ref = ref None let debug string = match !debug_hook with Some x -> x "%s" string | None -> Printf.fprintf stderr "%s\n" string
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/mlvm/debug.ml
ocaml
let debug_hook : (('b, unit, string, unit) format4 -> 'b) option ref = ref None let debug string = match !debug_hook with Some x -> x "%s" string | None -> Printf.fprintf stderr "%s\n" string
9e7843f5a636ac13debe1fdf2671fdda6cf23615fcbf18e8726ac0009bdbaf44
leandrosilva/cameron
misultin_rest.erl
% ========================================================================================================== MISULTIN - Example : RESTful support . % % >-|-|-(°> % Copyright ( C ) 2011 , < > % All rights reserved. % % BSD License % % Redistribution and use in source and binary forms, with or without modificati...
null
https://raw.githubusercontent.com/leandrosilva/cameron/34051395b620d2c3cb2cb63c854e65234786a176/deps/misultin/examples/misultin_rest.erl
erlang
========================================================================================================== >-|-|-(°> All rights reserved. BSD License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribu...
MISULTIN - Example : RESTful support . Copyright ( C ) 2011 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,...
d4f543fb1063d28909f5f1d91ffe6b62c0c7c52849b6f8eb337849c1c854c24e
racket/honu
syntax-parse.rkt
#lang racket/base (require honu-parse (for-syntax honu-parse) (for-syntax racket/base) (for-syntax (prefix-in parse: syntax/parse)) (prefix-in parse: syntax/parse)) (define-honu-syntax syntax-parse (lambda (code) (parse:define-splicing-syntax-class a-pattern #:literals (cruf...
null
https://raw.githubusercontent.com/racket/honu/b36b9aeda8be22bf7fda177e831f42ac1a1de79b/honu/syntax-parse.rkt
racket
#lang racket/base (require honu-parse (for-syntax honu-parse) (for-syntax racket/base) (for-syntax (prefix-in parse: syntax/parse)) (prefix-in parse: syntax/parse)) (define-honu-syntax syntax-parse (lambda (code) (parse:define-splicing-syntax-class a-pattern #:literals (cruf...
28d4d8b6eb82b6293fa272cd96ddb07a9099c81d71a31f07b218a95d2296a45a
ijvcms/chuanqi_dev
active_service_lib.erl
%%%------------------------------------------------------------------- @author yubing ( C ) 2016 , < COMPANY > %%% @doc 开服活动信息 %%% %%% @end Created : 23 . 二月 2016 18:06 %%%------------------------------------------------------------------- -module(active_service_lib). -include("common.hrl"). -include("record.hr...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/active/active_service_lib.erl
erlang
------------------------------------------------------------------- @doc 开服活动信息 @end ------------------------------------------------------------------- ---------------------------------------------------------------------------- 对外接口 ---------------------------------------------------------------------------- 领...
@author yubing ( C ) 2016 , < COMPANY > Created : 23 . 二月 2016 18:06 -module(active_service_lib). -include("common.hrl"). -include("record.hrl"). -include("config.hrl"). -include("cache.hrl"). -include("db_record.hrl"). -include("proto.hrl"). -include("language_config.hrl"). -include("log_type_config.hrl"). -in...
6b11e08850b1549aa755606349d45b2a5bdcdf75eab75b7efc87bc719fd1aa2b
Bannerets/camlproto
MTProto.mli
open! Base include (module type of Types) val get_error_description: int -> string (** [get_error_description error_code] *) module MakeMTProtoV2Client (Platform: PlatformTypes.S) (T: TransportTypes.S) : MTProtoClient with type rsa_manager = Math.Make(Platform).Crypto.Rsa.RsaManager.t
null
https://raw.githubusercontent.com/Bannerets/camlproto/0b31083b8c0103079ec2881176f63f8cb12abb73/src/mtproto/MTProto.mli
ocaml
* [get_error_description error_code]
open! Base include (module type of Types) val get_error_description: int -> string module MakeMTProtoV2Client (Platform: PlatformTypes.S) (T: TransportTypes.S) : MTProtoClient with type rsa_manager = Math.Make(Platform).Crypto.Rsa.RsaManager.t
99315f0fc3a4d361fb1020473656c7514d41e0b74d2f073f7838499760c34d69
thheller/shadow-grove
impl.cljs
(ns shadow.grove.impl (:require [clojure.set :as set] [shadow.grove :as-alias sg] [shadow.grove.protocols :as gp] [shadow.grove.runtime :as rt] [shadow.grove.db :as db] [shadow.grove.eql-query :as eql] [shadow.grove.components :as comp] )) (defn js-set-union [a b] (.forEach b (fn [x...
null
https://raw.githubusercontent.com/thheller/shadow-grove/caa3891f271fb3ca0210511be4cd451b2e8eda2e/src/main/shadow/grove/impl.cljs
clojure
microtask or goog.async.run don't do what we want we want the browser to prioritise rendering stuff work until all work is done, immediately work off new tasks index keys that weren't used previously remove old keys that are no longer used currently does not remove empty sets from query-index-map FIXME: does thi...
(ns shadow.grove.impl (:require [clojure.set :as set] [shadow.grove :as-alias sg] [shadow.grove.protocols :as gp] [shadow.grove.runtime :as rt] [shadow.grove.db :as db] [shadow.grove.eql-query :as eql] [shadow.grove.components :as comp] )) (defn js-set-union [a b] (.forEach b (fn [x...
9a7b06d08bd0fd0dc2a27ab89c173c7f9057d41b9e86bcd37eea91adf31f87f4
reflex-frp/reflex
DebugCycles.hs
# LANGUAGE CPP # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE PatternSynonyms # {-# LANGUAGE RankNTypes #-} module Main where import Data.Foldable import Control.Lens import Control.Applicative import Control...
null
https://raw.githubusercontent.com/reflex-frp/reflex/04e43cda2e113eb9df5df5d13613a7b6744fd14f/test/DebugCycles.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE RankNTypes # (simpler version of dynLoop) Take an existing test and build it inside a
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE PatternSynonyms # module Main where import Data.Foldable import Control.Lens import Control.Applicative import Control.Monad import Control.Monad.Fix import Control.Exception import System.Timeout impor...
1e403f991c3acf6d72428a4e8e9599b279a74d1ab4ccf0b6c8a7e521aa73b344
herd/herdtools7
kinds.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/f70f42c2d57b23c05ef16f631e6d191ce98480c2/internal/lib/kinds.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
5f97f46a78e034111b2b36d8a7d414a245727665e29d211dc108541b24e36f47
screenshotbot/screenshotbot-oss
encoding-test.lisp
(in-package :bknr.datastore) (5am:def-suite :bknr.datastore) (5am:in-suite :bknr.datastore) (defun files-identical-content-p (path-a path-b) "Are files of PATH-A and PATH-B byte per byte identical?" (with-open-file (in-a path-a :element-type '(unsigned-byte 8)) (with-open-file (in-b path-b :element-type '(uns...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/1faeba2a45c639354e1298eb8a75aa82805a9ad5/third-party/bknr.datastore/src/data/encoding-test.lisp
lisp
from cl-store :) ratios complex numbers - currently not supported (test-encoding complex.2 #C(0.0 1.0)) (test-encoding complex.3 #C(32 -23455)) (test-encoding complex.5 #C(-111 -1123)) (test-encoding complex.6 #C(-11.2 -34.5)) single-float double-float characters strings #\? is the substitution char above ...
(in-package :bknr.datastore) (5am:def-suite :bknr.datastore) (5am:in-suite :bknr.datastore) (defun files-identical-content-p (path-a path-b) "Are files of PATH-A and PATH-B byte per byte identical?" (with-open-file (in-a path-a :element-type '(unsigned-byte 8)) (with-open-file (in-b path-b :element-type '(uns...
9b7a3ff357d064a1805906c554f35a5099e6c2564b23a1458474711bf8239c8a
acl2/acl2
int-arith.cpp.ref.ast.lsp
(funcdef add (a b) (block (return (+ a b))))(funcdef sub (a b) (block (return (- a b))))(funcdef minus (a) (block (return (- a))))(funcdef mult (a b) (block (return (* a b))))(funcdef div (a b) (block (return (fl (/ a b)))))(funcdef mod (a b) (block (return (rem a b))))(funcdef parenthesis (a) (block (return a)))
null
https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/arithmetics/int-arith.cpp.ref.ast.lsp
lisp
(funcdef add (a b) (block (return (+ a b))))(funcdef sub (a b) (block (return (- a b))))(funcdef minus (a) (block (return (- a))))(funcdef mult (a b) (block (return (* a b))))(funcdef div (a b) (block (return (fl (/ a b)))))(funcdef mod (a b) (block (return (rem a b))))(funcdef parenthesis (a) (block (return a)))
f2a5e26234653a6e2f3e244ad5bbe69e06db716e7b3ad3bfdcc60da42b7fb8b8
spechub/Hets
RelCheck.hs
# LANGUAGE FlexibleInstances # | Module : ./Common / Lib / RelCheck.hs Description : a couple of test cases mainly for intransKernel Copyright : ( c ) Uni Bremen 2003 - 2005 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : ...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Common/Lib/RelCheck.hs
haskell
# LANGUAGE FlexibleInstances # | Module : ./Common / Lib / RelCheck.hs Description : a couple of test cases mainly for intransKernel Copyright : ( c ) Uni Bremen 2003 - 2005 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : ...
35e1251e5e0eeaa6ae13f62a0ea29f22a2c2e260ba69807d6bd517fa5b20ce6d
Abbath/Calculator
Types.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Calculator.Types (Expr(..), Token(..), Assoc(..), exprToString, unTOp, preprocess, ListTuple, showRational, showT) where import Data.Aeson (FromJSON, ToJSON) import Data.Ratio import ...
null
https://raw.githubusercontent.com/Abbath/Calculator/75985d5a9b4e602bc087462c8046bf2cf692a0e1/Calculator/src/Calculator/Types.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE OverloadedStrings # show = showExpr 0 showExpr :: Int -> Expr -> String showExpr n ex = Id name -> "Id " ++ name in replicate n ' ' ++ suf where s = showExpr (n+1)
module Calculator.Types (Expr(..), Token(..), Assoc(..), exprToString, unTOp, preprocess, ListTuple, showRational, showT) where import Data.Aeson (FromJSON, ToJSON) import Data.Ratio import Data.Text (Text) import qualified Data.Text as T import GHC.Generics data Token ...
a55f4c7d9cedcd9c099007c3440db49c8ac3a1c3d78732cf2f19f07ff12b701b
yoshiquest/forge-clj
network.clj
(ns forge-clj.client.network (:require [forge-clj.core :refer [init-client-chan]] [forge-clj.network :refer [register-message fc-network gen-packet-handler schedule-task]] [forge-clj.client.util :refer [minecraft-instance]] [clojure.core.async :refer [chan go >!! <!! <! >! pub sub] :as async]) (:imp...
null
https://raw.githubusercontent.com/yoshiquest/forge-clj/9ead6fcf9efc30ec0f0685562526ff7400c5cd3a/src/main/clojure/forge_clj/client/network.clj
clojure
(ns forge-clj.client.network (:require [forge-clj.core :refer [init-client-chan]] [forge-clj.network :refer [register-message fc-network gen-packet-handler schedule-task]] [forge-clj.client.util :refer [minecraft-instance]] [clojure.core.async :refer [chan go >!! <!! <! >! pub sub] :as async]) (:imp...
f25a7e10d186244a4a29314060db59bd3065cbd19f671f140c7aca7b5d44308e
belambert/cl-asr
language-hmm.lisp
Copyright 2010 - 2018 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 L...
null
https://raw.githubusercontent.com/belambert/cl-asr/a734ddb396f18bf4a504e9ecb3c91e507764358c/src/hmm/language-hmm.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permis...
Copyright 2010 - 2018 distributed under the License is distributed on an " AS IS " BASIS , (in-package :cl-asr) (defstruct language-hmm "A language HMM. This is constructed by replacing the edges in an FSM with word HMMs." start-state final-states state-count (edge-count 0) This tells you if yo...
f88e14eb9548284a2ea51ed307f875269a29ee3cc94b0905cc42e0c594973636
ds-wizard/engine-backend
List_App_Logo_POST.hs
module Wizard.Api.Handler.Config.List_App_Logo_POST where import Servant import Servant.Multipart import Shared.Api.Handler.Common import Shared.Api.Resource.Common.FileDTO import Shared.Api.Resource.Common.FileJM () import Shared.Model.Context.TransactionState import Wizard.Api.Handler.Common import Wizard.Model.Con...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Handler/Config/List_App_Logo_POST.hs
haskell
module Wizard.Api.Handler.Config.List_App_Logo_POST where import Servant import Servant.Multipart import Shared.Api.Handler.Common import Shared.Api.Resource.Common.FileDTO import Shared.Api.Resource.Common.FileJM () import Shared.Model.Context.TransactionState import Wizard.Api.Handler.Common import Wizard.Model.Con...
a56b6da575bc80c339377412c25df8c22e8b2edcd63b7daf26e54f9554e09373
mkremins/starfreighter
dom.cljs
(ns om.dom (:refer-clojure :exclude [map meta time]) (:require-macros [om.dom :as dom]) (:require [cljsjs.react] [goog.object :as gobject])) (dom/gen-react-dom-fns) (defn wrap-form-element [ctor display-name] (js/React.createFactory (js/React.createClass #js {:getDisplayName ...
null
https://raw.githubusercontent.com/mkremins/starfreighter/2be40b4aa5f288bb9829a2e1362a7bfc1e7f12dc/docs/js/app/om/dom.cljs
clojure
NOTE: if switch to macro we remove a closure allocation
(ns om.dom (:refer-clojure :exclude [map meta time]) (:require-macros [om.dom :as dom]) (:require [cljsjs.react] [goog.object :as gobject])) (dom/gen-react-dom-fns) (defn wrap-form-element [ctor display-name] (js/React.createFactory (js/React.createClass #js {:getDisplayName ...
37c771b3bc702ec92707f202ad8e9356430564161b0303494d9a57c2df602d5d
why-not-try-calmer/feedo
DatabaseSpec.hs
module DatabaseSpec where import Control.Concurrent (newChan, newEmptyMVar) import Control.Exception import Control.Monad.IO.Class import qualified Data.Text as T import Data.Time.Clock.POSIX import Mongo import Redis import Server (makeConfig) import System.Environment (getEnvironment) import Test.Hspec import Types ...
null
https://raw.githubusercontent.com/why-not-try-calmer/feedo/d5c93cfcc5e9f2af1805c7127677717254280bec/test/DatabaseSpec.hs
haskell
module DatabaseSpec where import Control.Concurrent (newChan, newEmptyMVar) import Control.Exception import Control.Monad.IO.Class import qualified Data.Text as T import Data.Time.Clock.POSIX import Mongo import Redis import Server (makeConfig) import System.Environment (getEnvironment) import Test.Hspec import Types ...
676090b1117b0cc4e75b2b8b69fa2abbe279993d57863e05b2340f88665ce5a0
dakrone/clj-http
util_test.clj
(ns clj-http.test.util-test (:require [clj-http.util :refer :all] [clojure.java.io :as io] [clojure.test :refer :all]) (:import org.apache.commons.io.input.NullInputStream org.apache.commons.io.IOUtils)) (deftest test-lower-case-keys (are [map expected] (is (= expected (low...
null
https://raw.githubusercontent.com/dakrone/clj-http/dd15359451645f677b3e294164cf70330b92241d/test/clj_http/test/util_test.clj
clojure
coerce to seq to force byte-by-byte comparison
(ns clj-http.test.util-test (:require [clj-http.util :refer :all] [clojure.java.io :as io] [clojure.test :refer :all]) (:import org.apache.commons.io.input.NullInputStream org.apache.commons.io.IOUtils)) (deftest test-lower-case-keys (are [map expected] (is (= expected (low...
8c3735a27e5d2686a189a56b3f9cfb180656c64d70b036c01f91d5a7fc128d01
sebsheep/elm2node
Local.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Canonicalize.Environment.Local ( add ) where import Control.Monad (foldM) import qualified Data.Graph as Graph import qualified Data.List as List import qualified Data.Map.Strict as Map import qualified Data.Name as Name import qualified AST.Canon...
null
https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Canonicalize/Environment/Local.hs
haskell
# LANGUAGE OverloadedStrings # RESULT Use union to overwrite foreign stuff. ADD TYPES ADD TYPE ALIASES DETECT TYPE ALIAS CYCLES CHECK FREE VARIABLES ADD CTORS CANONICALIZE ALIAS CANONICALIZE UNION
# OPTIONS_GHC -Wall # module Canonicalize.Environment.Local ( add ) where import Control.Monad (foldM) import qualified Data.Graph as Graph import qualified Data.List as List import qualified Data.Map.Strict as Map import qualified Data.Name as Name import qualified AST.Canonical as Can import qualified AST.So...
49e40f982c4be067baf49338800023c2c15e578dd51212724ebdbcb72874dba9
8c6794b6/guile-tjit
t-br-if-le-01.scm
;; Loop with `br-if-<=', loop ends with non-backward-jump, takes small ;; fixnum. (define (loop n) (let lp ((i 0) (acc 0)) (if (<= n i) acc (lp (+ i 1) (+ acc 1))))) (do ((i 0 (+ i 1)) (acc '() (cons (loop 3) acc))) ((= i 65) acc))
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-br-if-le-01.scm
scheme
Loop with `br-if-<=', loop ends with non-backward-jump, takes small fixnum.
(define (loop n) (let lp ((i 0) (acc 0)) (if (<= n i) acc (lp (+ i 1) (+ acc 1))))) (do ((i 0 (+ i 1)) (acc '() (cons (loop 3) acc))) ((= i 65) acc))
148b2ab1f10124596f3a65b65c4e971654d196f6bcaeda1e62c1f401c4b7c829
draperlaboratory/cbat_tools
cbat_map_lattice.mli
(***************************************************************************) (* *) Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/cbat_tools/334523cb4415f187e33f190a691e34b73733ef24/vsa/value_set/lib/src/cbat_map_lattice.mli
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its content does not necessarily reflect the position or policy of the US open Core_kernel open Bap.Std module type S_indexed = sig module Key : Sexpable.S ...
41289575a3d46ef10cf4d7799dc39a1613b477f730fbe399e85f0e79a31dcb90
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Numeral.EL.Corpus ( corpus ) where import Data.String...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Numeral/EL/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Numeral.EL.Corpus ( corpus ) where import Data.String import Prelude import Duckling.Locale import Duckling.Numeral.Types import Duckling.Resolve import Duckling.Testing.Types corpus :: Corpus corpus = (testContext {locale = makeLocale EL Nothin...
bd96b42e953a15d30056ce552f8216920c63aba9f1b4b23d347afda82a14f72d
ghc/ghc
Rule.hs
# LANGUAGE TypeFamilies # ( c ) The University of Glasgow 2006 ( c ) The AQUA Project , Glasgow University , 1993 - 1998 (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1993-1998 -} -- | Typechecking rewrite rules module GHC.Tc.Gen.Rule ( tcRules ) where import GHC.Prelude impor...
null
https://raw.githubusercontent.com/ghc/ghc/e8f2b80da6429af05d5e8ef1a0937aae8c22f819/compiler/GHC/Tc/Gen/Rule.hs
haskell
| Typechecking rewrite rules # RULES "foo/bar" foo = bar # # RULES "foo" forall (x :: Proxy (a :: k)). foo x = Proxy # Note [Typechecking rules] Now figure out what to quantify over We quantify over any tyvars free in *either* the rule *or* the bound variables. The latter is important. Consider ss (x,(y,z...
# LANGUAGE TypeFamilies # ( c ) The University of Glasgow 2006 ( c ) The AQUA Project , Glasgow University , 1993 - 1998 (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1993-1998 -} module GHC.Tc.Gen.Rule ( tcRules ) where import GHC.Prelude import GHC.Hs import GHC.Tc.Types imp...
33041b618633fdf22c5aa73429e207dee9a5eff0292b289b535311002b415392
sofuture/rogueunlike
ru_text.erl
%% ============================================================================ Rogueunlike 0.30.0 %% Copyright 2010 %% %% This software is provided with absolutely no assurances, guarantees, %% promises or assertions whatsoever. %% %% Do what thou wilt shall be the whole of the law. %% ==========================...
null
https://raw.githubusercontent.com/sofuture/rogueunlike/67b29414ff13fd9e6711c04cfdc462c7985ded18/src/ru_text.erl
erlang
============================================================================ This software is provided with absolutely no assurances, guarantees, promises or assertions whatsoever. Do what thou wilt shall be the whole of the law. ============================================================================ ====...
Rogueunlike 0.30.0 Copyright 2010 -module(ru_text). -author("Jeff Zellner <>"). -include("ru.hrl"). -export([help_menu/0, about_menu/0]). about_menu() -> ["About Rogueunlike", "-----------------", "Rogueunlike is not exactly (but sort of) unlike a roguelike game.", "", "All code hand...
8468087409bac846c5966ba5fe10557aebf6a636fbe41ab0342d1cdcdfe912fd
webyrd/mediKanren
run-shell-pipelines.rkt
#lang racket (provide run-pipelines report-invalid-pipelines) (require shell/pipeline) (require chk) ;; shell/pipelines can represent a pipeline step without ;; running it, via pipeline-member-spec. However, it seems to ;; lack ability to represent a whole pipeline without running it. ;; So as a workaround w...
null
https://raw.githubusercontent.com/webyrd/mediKanren/d10fea912bc2bc7eba08212e8cb77d021e28d288/stuff/run-shell-pipelines.rkt
racket
shell/pipelines can represent a pipeline step without running it, via pipeline-member-spec. However, it seems to lack ability to represent a whole pipeline without running it. So as a workaround we'll use a list of lists to be able to test command generation without running commands. Run a list of prepared pipel...
#lang racket (provide run-pipelines report-invalid-pipelines) (require shell/pipeline) (require chk) (define (report-invalid-pipelines pipelines) (for ((pipeline pipelines)) (unless (list? pipeline) (error "pipeline must be a list:" pipeline)) (unless (and (>= (length pipeline) 3) (andmap lis...
61220ae3bd1b9ddc527c3a12ace79cf76f048dc6cb80bdb6c60db9655681573a
kraison/vivace-graph-v2
vivace-graph-v2-test-package.lisp
(in-package #:cl-user) (defpackage #:vivace-graph-v2-test (:use #:cl #:vivace-graph-v2 #:bordeaux-threads) (:export #:run-all-tests #:*test-db-dir*))
null
https://raw.githubusercontent.com/kraison/vivace-graph-v2/f5fcc60caa1e5b33ac3f618311e8876a94508818/vivace-graph-v2-test-package.lisp
lisp
(in-package #:cl-user) (defpackage #:vivace-graph-v2-test (:use #:cl #:vivace-graph-v2 #:bordeaux-threads) (:export #:run-all-tests #:*test-db-dir*))
9a8c054691cb30e53e8a5e4013e0de52bd00df33b2939ad584cbf81d65865ac6
clojure-cookbook/clojure-cookbook
multiple_values_test.clj
(ns clojure-cookbook.multiple-values-test (:require [clojure-cookbook.multiple-values :refer :all] [clojure.test :refer :all])) (deftest test-insert (testing "inserting to a new key" (is (= {:k :v} (insert {} :k :v)))) (testing "inserting to an existing key (single existing item)" (let [m (in...
null
https://raw.githubusercontent.com/clojure-cookbook/clojure-cookbook/1b3754a7f4aab51cc9b254ea102870e7ce478aa0/02_composite-data/2-22_multiple-values/test/clojure_cookbook/multiple_values_test.clj
clojure
(ns clojure-cookbook.multiple-values-test (:require [clojure-cookbook.multiple-values :refer :all] [clojure.test :refer :all])) (deftest test-insert (testing "inserting to a new key" (is (= {:k :v} (insert {} :k :v)))) (testing "inserting to an existing key (single existing item)" (let [m (in...
4dbefa5c041e6dc67cdbc5cd8d24f0e1740b367afdc76eb97936928982317e7b
xapi-project/message-switch
fe_argv.mli
* Copyright ( C ) Citrix Systems Inc. * * This program 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 ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/message-switch/5b5d2d75dfa7e6422d6235e9ab9d2027c11a6ca5/forkexecd/lib/fe_argv.mli
ocaml
* This module supports building a large command line (argument) vector * incrementally in a monad. * monad, holding current command line * basic functions to construct a [t] value. More below * turn a [t] value into something useful, containing the values * we are interested in. These can be accessed using [argv]...
* Copyright ( C ) Citrix Systems Inc. * * This program 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 ; version 2.1 only . with the special * exception on linking described in file LI...
212bca67ba3bea28a3b84f0e8b97788e95493bc0be3b8a35cd96ec230dc6f3d7
per-gron/termite
recv.scm
(import (only: match match/action) exception) ;; All hail the RECV form (define-syntax recv (sc-macro-transformer (lambda (form env) (let ((clauses (cdr form))) ;; check the last clause to see if it's a timeout (let ((sesualc (reverse clauses))) (if (and (pair? (car ses...
null
https://raw.githubusercontent.com/per-gron/termite/d8b72aa5970d68c99953cf58e10e9eca7cb156be/recv.scm
scheme
All hail the RECV form check the last clause to see if it's a timeout the code to compute the timeout the code to be executed on a timeout RECV code when there is a timeout extra clause to handle system events the user clauses RECV code when there is no timeout extra clause to handle system events the user cl...
(import (only: match match/action) exception) (define-syntax recv (sc-macro-transformer (lambda (form env) (let ((clauses (cdr form))) (let ((sesualc (reverse clauses))) (if (and (pair? (car sesualc)) (eq? (caar sesualc) 'after)) (l...
13db5e9cb5bdc3bfd3943466af53f226ca0c3fec1770a3732e36e7e579ab2cdd
MaartenFaddegon/Hoed
TightRope3.hs
This is an example from the " Learn You A Haskell " tuturial . The story is that there is a guy walking with a Pole where birds -- can land on the left and right. If the difference between birds -- on the left and right gets too big he falls off the rope. This -- is indicated by Nothing. import Debug.Hoed(runO,obs...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/TightRope3.hs
haskell
can land on the left and right. If the difference between birds on the left and right gets too big he falls off the rope. This is indicated by Nothing. # SCC "landLeft" # # SCC "landRight" # # SCC "walk" #
This is an example from the " Learn You A Haskell " tuturial . The story is that there is a guy walking with a Pole where birds import Debug.Hoed(runO,observe,observe',Identifier(..),(*>>=),(>>==),(>>=*)) type Birds = Int type Pole = (Birds,Birds) landLeft :: Birds -> Identifier -> (Pole -> Maybe Pole, Int) lan...
df96a81811aff9956ba38033976092cdfbe0417ef25d6f1b0e74860e13b34ddf
antifuchs/autobench
pdf-report.lisp
;;; pdf-report.lisp ;; Author : < > Time - stamp : < 2004 - 01 - 03 emarsden > ;; ;; When loaded into CMUCL , this should generate a report comparing the performance of the different CL implementations which have been ;; tested. Reads the /var/tmp/CL-benchmark* files to obtain data from ;; previous runs. Req...
null
https://raw.githubusercontent.com/antifuchs/autobench/acc14ee2a8899cb630aa8dd02f3ffd7f5858ce28/cl-bench/pdf-report.lisp
lisp
pdf-report.lisp tested. Reads the /var/tmp/CL-benchmark* files to obtain data from previous runs. Requires the cl-pdf library. add numbers on bars annotate each benchmark with estimated allocation volume & peak storage requirement version number test title optional extra description y-axis title
Author : < > Time - stamp : < 2004 - 01 - 03 emarsden > When loaded into CMUCL , this should generate a report comparing the performance of the different CL implementations which have been (in-package :cl-user) (eval-when (:load-toplevel :execute) (require :asdf) (asdf:oos 'asdf:load-op :uffi) (asdf:...
e59d7982290ecee945182b51c7e1b6e5314fc8ce0995c233b11f5eabd738f55b
YoshikuniJujo/test_haskell
ObjectNew.hs
# LANGUAGE ImportQualifiedPost # # LANGUAGE BlockArguments # {-# LANGUAGE ScopedTypeVariables, TypeApplications #-} # LANGUAGE GADTs , TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes # # LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableIn...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/37eb9675bf1c0b008c7af4843713c91623c1e7f4/themes/gui/vulkan/try-my-vulkan-snd/src/Data/Kind/ObjectNew.hs
haskell
# LANGUAGE ScopedTypeVariables, TypeApplications # # LANGUAGE PatternSynonyms, ViewPatterns # # OVERLAPPABLE #
# LANGUAGE ImportQualifiedPost # # LANGUAGE BlockArguments # # LANGUAGE GADTs , TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes # # LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC...
7e2a30d964f5caf38be0fc32523ba4745035f6f827f875154afeaded72a87deb
EligiusSantori/L2Apf
refresh_quests.scm
(module logic racket/base (require "../packet/game/client/refresh_quest_list.scm" (only-in "../system/connection.scm" send-packet) ) (provide refresh-quests) (define (refresh-quests connection) (send-packet connection (game-client-packet/refresh-quest-list)) ) )
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/api/refresh_quests.scm
scheme
(module logic racket/base (require "../packet/game/client/refresh_quest_list.scm" (only-in "../system/connection.scm" send-packet) ) (provide refresh-quests) (define (refresh-quests connection) (send-packet connection (game-client-packet/refresh-quest-list)) ) )
9b6d2608b3253412b7d603d5749fa4a6e0fc779abbb169fc9b0caa53dc89cc33
nuvla/ui
router.cljs
(ns sixsq.nuvla.ui.routing.router (:require [re-frame.core :refer [dispatch subscribe]] [reitit.coercion.spec :as rss] [reitit.core :as r] [reitit.frontend :as rf] [reitit.frontend.easy :as rfe] [reitit.frontend.history :as rfh] [sixsq.nuvla.ui.a...
null
https://raw.githubusercontent.com/nuvla/ui/f457187815df76bbff8b4758b349dd6b1cca65aa/code/src/cljs/sixsq/nuvla/ui/routing/router.cljs
clojure
sixsq.nuvla.ui.config/base-path = "/ui" on nuvla.io
(ns sixsq.nuvla.ui.routing.router (:require [re-frame.core :refer [dispatch subscribe]] [reitit.coercion.spec :as rss] [reitit.core :as r] [reitit.frontend :as rf] [reitit.frontend.easy :as rfe] [reitit.frontend.history :as rfh] [sixsq.nuvla.ui.a...
7b74f16e7dcf1fc3a04dae6e974c06bec30471c60a32cca133f3d2d1ac0f17e5
AntidoteDB/gingko
log_recovery_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal %% > %% This file is provided...
null
https://raw.githubusercontent.com/AntidoteDB/gingko/a965979aefb2868abcd0b3bf5ed1b5e4f9fdd163/test/singledc/log_recovery_SUITE.erl
erlang
------------------------------------------------------------------- > Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either expressed or implied. See the License for the specific language governing perm...
Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal This file is provided to you under the Apache License , except in compliance with the License . You...
ef916ec1d0e42993a7533decc6c2f59b64ea4723657904792d9c225fc77f2900
8c6794b6/guile-tjit
threads.scm
Copyright ( C ) 1996 , 1998 , 2001 , 2002 , 2003 , 2006 , 2010 , 2011 , 2012 Free Software Foundation , Inc. ;;;; ;;;; 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 ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/ice-9/threads.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Se...
Copyright ( C ) 1996 , 1998 , 2001 , 2002 , 2003 , 2006 , 2010 , 2011 , 2012 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston...
fe1f57a42272d1b161f66ab05f11dd55b9ce2bb86d326d0760cbdc5f48008549
dbuenzli/brr
poke.ml
Compile with : ocamlfind ocamlc -g -linkall -linkpkg \ -package brr , brr.note , brr.poked poke.ml js_of_ocaml $ ( ocamlfind query -r -i - format brr.poked ) -I . \ --toplevel a.out -o poke.js ocamlfind ocamlc -g -linkall -linkpkg \ -packa...
null
https://raw.githubusercontent.com/dbuenzli/brr/c64b00bbe043526e602906e9b9ce12fd4a40da20/test/poke.ml
ocaml
Compile with : ocamlfind ocamlc -g -linkall -linkpkg \ -package brr , brr.note , brr.poked poke.ml js_of_ocaml $ ( ocamlfind query -r -i - format brr.poked ) -I . \ --toplevel a.out -o poke.js ocamlfind ocamlc -g -linkall -linkpkg \ -packa...
1a11ed26e07ed93dbbd4d07e3157d622bb14b2431af71ff1cce2f712e51efab3
gvolpe/haskell-book-exercises
exercises.hs
stops = "pbtdkg" vowels = "aeiou" one = [(x,y,z) | x <- stops, y <- vowels, z <- stops] two = [(x,y,z) | x <- stops, y <- vowels, z <- stops, x == 'p'] -- avg seekritFunc x = div (sum (map length (words x))) (length (words x)) avg x = sumLen / len where len = fromIntegral $ length (words x) sumLen = fro...
null
https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter10/exercises.hs
haskell
avg using folds
stops = "pbtdkg" vowels = "aeiou" one = [(x,y,z) | x <- stops, y <- vowels, z <- stops] two = [(x,y,z) | x <- stops, y <- vowels, z <- stops, x == 'p'] seekritFunc x = div (sum (map length (words x))) (length (words x)) avg x = sumLen / len where len = fromIntegral $ length (words x) sumLen = fromIntegr...
0e684fe82ffb19c823655e4d8aa60b216717d42d3c99d8aa28ead7d49e3f6d44
samply/blaze
bundle_spec.clj
(ns blaze.interaction.transaction.bundle-spec (:require [blaze.db.spec] [blaze.interaction.transaction.bundle :as bundle] [blaze.interaction.util-spec] [clojure.spec.alpha :as s])) (s/fdef bundle/tx-ops :args (s/cat :entries (s/coll-of map? :min-count 1)) :ret :blaze.db/tx-ops)
null
https://raw.githubusercontent.com/samply/blaze/cbf6431a254f347a704f1abe1de4f4fe8a249ac9/modules/interaction/test/blaze/interaction/transaction/bundle_spec.clj
clojure
(ns blaze.interaction.transaction.bundle-spec (:require [blaze.db.spec] [blaze.interaction.transaction.bundle :as bundle] [blaze.interaction.util-spec] [clojure.spec.alpha :as s])) (s/fdef bundle/tx-ops :args (s/cat :entries (s/coll-of map? :min-count 1)) :ret :blaze.db/tx-ops)
853a537d25e6359eb42c0ff9ede387794892f56f5eed88dcd1dac4679716829f
camlp5/camlp5
pa_extfun.ml
(* camlp5r *) (* pa_extfun.ml,v *) Copyright ( c ) INRIA 2007 - 2017 #load "q_MLast.cmo"; #load "pa_extend.cmo"; open Pcaml; value not_impl name x = do { let desc = if Obj.is_block (Obj.repr x) then "tag = " ^ string_of_int (Obj.tag (Obj.repr x)) else "int_val = " ^ string_of_int (Obj.magic x) in...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/etc/pa_extfun.ml
ocaml
camlp5r pa_extfun.ml,v
Copyright ( c ) INRIA 2007 - 2017 #load "q_MLast.cmo"; #load "pa_extend.cmo"; open Pcaml; value not_impl name x = do { let desc = if Obj.is_block (Obj.repr x) then "tag = " ^ string_of_int (Obj.tag (Obj.repr x)) else "int_val = " ^ string_of_int (Obj.magic x) in print_newline (); failwith ("p...
7ab17c2858deb140740c050a7932ed282226be6a5de258150bddc96478755509
robert-strandh/Second-Climacs
random-form.lisp
(cl:in-package #:second-climacs-syntax-common-lisp-test) (defun random-integer () (random 1000000)) (defun random-character () (code-char (+ 32 (random 95)))) (defun random-symbol () (loop for sym being each external-symbol in '#:common-lisp repeat (random 500) finally (return sym))) (defun random-string ()...
null
https://raw.githubusercontent.com/robert-strandh/Second-Climacs/1d1bc30f4431d8ea7893aea58a63464e216377a4/Code/Syntax/Common-Lisp/Test/random-form.lisp
lisp
(cl:in-package #:second-climacs-syntax-common-lisp-test) (defun random-integer () (random 1000000)) (defun random-character () (code-char (+ 32 (random 95)))) (defun random-symbol () (loop for sym being each external-symbol in '#:common-lisp repeat (random 500) finally (return sym))) (defun random-string ()...
96cffebd1b6aae3f6e52688ebba7a2bae0b486d9dbf15f8dc98dedadab562614
ocaml-multicore/multicoretests
lin_tests_effect.ml
open Lin_tests_common open Util (** This is a driver of the negative tests over the Effect module *) (* Q: What constitutes a Fiber-unsafe API? A: Tests that behave differently when run with/without a fiber-based scheduler certainly do. The following raises the Yield effect inside the `run` command. This res...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/neg_tests/lin_tests_effect.ml
ocaml
* This is a driver of the negative tests over the Effect module Q: What constitutes a Fiber-unsafe API? A: Tests that behave differently when run with/without a fiber-based scheduler certainly do. The following raises the Yield effect inside the `run` command. This results in an `Unhandled` exception when ru...
open Lin_tests_common open Util module RConf_int' = struct include RConf_int type res = RGet of int | RSet | RAdd of (unit,exn) result | RIncr | RDecr [@@deriving show { with_path = false }, eq] let run c r = match c with | Get -> RGet (Sut_int.get r) | Set i -> (Sut_int.set r i; RSet) | Add i ->...
dfefce8be72b8d0a36c06ddae034f727b69f9bfd4511781653e9745d16cbb2cb
iu-parfunc/verified-instances
VerifiedFunctor.hs
{-@ LIQUID "--higherorder" @-} {-@ LIQUID "--exactdc" @-} {-@ LIQUID "--noadt" @-} {-# LANGUAGE Rank2Types #-} module GenericProofs.VerifiedFunctor where import Language.Haskell.Liquid.ProofCombinators import Prelude hiding (fmap) import GenericProofs.Iso @ ...
null
https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedFunctor.hs
haskell
@ LIQUID "--higherorder" @ @ LIQUID "--exactdc" @ @ LIQUID "--noadt" @ # LANGUAGE Rank2Types # @ axiomatize functorIsoFmap @ @ functorIsoFmapId :: to:(forall a. f a -> g a) -> from:(forall a. g a -> f a) -> tof:(forall a. y:(g a) -> { to (from y) == y }...
module GenericProofs.VerifiedFunctor where import Language.Haskell.Liquid.ProofCombinators import Prelude hiding (fmap) import GenericProofs.Iso @ data VerifiedFunctor m = VerifiedFunctor { fmap : : forall a b. ( a - > b ) - > m a - > m b , fmapId : : foral...
8d2ceba9fdd756987fde6d9c9c1389431fbb3f44de1bf807e3980e167be84c7c
saikyun/native-image-clojure-c
other_triple.clj
(in-ns 'clojure.core) (defn- generate-class2 [options-map] (validate-generate-class-options options-map) (let [default-options {:prefix "-" :load-impl-ns true :impl-ns (ns-name *ns*)} {:keys [name extends implements constructors methods main factory state init exposes exposes-methods prefi...
null
https://raw.githubusercontent.com/saikyun/native-image-clojure-c/5b696dacace0ad645af025daf332beca972d362f/src/other_triple.clj
clojure
(when exposes-methods (map str (vals exposes-methods))) if found box args call fn (into-array (cons obj-type (replicate (count ptypes) obj-type)))))) unbox return else call supplied alternative generator start class definition class annotations static fields for vars instance field for state static in...
(in-ns 'clojure.core) (defn- generate-class2 [options-map] (validate-generate-class-options options-map) (let [default-options {:prefix "-" :load-impl-ns true :impl-ns (ns-name *ns*)} {:keys [name extends implements constructors methods main factory state init exposes exposes-methods prefi...
5ea54cb3511ea16e76ec1008640e9b7bd5dc69639ba8b1e4809f2a6df81f5b13
marigold-dev/mankavar
ml_main.ml
module TBytes = struct module Raw = struct type t = int let pp ppf x = Format.fprintf ppf "%d" x external malloc : int -> int = "int_malloc_byte" "int_malloc" [@@noalloc] external get_int64 : int -> (int64[@unboxed]) = "int64_get_byte" "int64_get" [@@noalloc] external get_int :...
null
https://raw.githubusercontent.com/marigold-dev/mankavar/8afac59f0045d096b8eac3184fda805d8177723f/experiments/externals/lib/ml_main.ml
ocaml
external free : int -> int = "int_free_byte" "int_free" external free : int -> int = "int_free_byte" "int_free"
module TBytes = struct module Raw = struct type t = int let pp ppf x = Format.fprintf ppf "%d" x external malloc : int -> int = "int_malloc_byte" "int_malloc" [@@noalloc] external get_int64 : int -> (int64[@unboxed]) = "int64_get_byte" "int64_get" [@@noalloc] external get_int :...
9b412c8b723726111c665196e79fc5b8d82efaeb1f348cbdd4d0fbec4ef1f346
clash-lang/clash-compiler
T1012.hs
module T1012 where import Clash.Prelude f :: BitVector 5 -> Maybe (Bit -> Bit -> Bit) f i = case slice d1 d0 i of 2 -> op 3 -> op _ -> Nothing where op :: Maybe (Bit -> Bit -> Bit) op = case (slice d4 d2 i, b) of (0, 0) -> Just (+) _ -> Nothing where b :: Bit ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Basic/T1012.hs
haskell
module T1012 where import Clash.Prelude f :: BitVector 5 -> Maybe (Bit -> Bit -> Bit) f i = case slice d1 d0 i of 2 -> op 3 -> op _ -> Nothing where op :: Maybe (Bit -> Bit -> Bit) op = case (slice d4 d2 i, b) of (0, 0) -> Just (+) _ -> Nothing where b :: Bit ...
a8914947d8d54c815a9c6f69dffab3afeac80c3dec643d2aa48604f70b387136
nikivazou/liquid-meta
Expressions.hs
{-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} module Substitutions.Expressions where import Syntax import Expressions import Helpers.ProofCombinators import Data.Set {-@ reflect subst @-} subst :: Expr -> Var -> Expr -> Expr @ subst : : e : Expr - > x : AnyVar - > ex : Expr - > { r : | if (...
null
https://raw.githubusercontent.com/nikivazou/liquid-meta/c3e9f85529ab6d1135ca886bfb2808737e134f22/src/Substitutions/Expressions.hs
haskell
@ LIQUID "--reflection" @ @ LIQUID "--ple" @ @ reflect subst @ @ ple substId @ @ inline disjoined @ @ ple substFlip @
module Substitutions.Expressions where import Syntax import Expressions import Helpers.ProofCombinators import Data.Set subst :: Expr -> Var -> Expr -> Expr @ subst : : e : Expr - > x : AnyVar - > ex : Expr - > { r : | if ( member x ( freeVars e ) ) then ( ( isSubsetOf ( ...
0c50af711ad720355efef2a956c53c321d1c5636356ebcb5db76e8699743b1e0
avsm/platform
cmti.mli
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/odoc.1.4.2/src/loader/cmti.mli
ocaml
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
16430244bbf258ba43a146c733c1e7bb0520834e4fcbf9115e988db421deb910
clojurecup2014/parade-route
test_fixtures.clj
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/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/test_fixtures.clj
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 . by March 28 , 2009 (ns clojure.test-clojure.test-fixtures (:use clojure.test)) (declare ^:dynamic *a* ^:dynamic *b* ^:dynamic *c* ^:dynamic *d*) (def ^:dynamic *n* 0) (defn fixture-a [f] (binding [*a* 3] (f))) (defn fixture-b [f] (binding [*b* 5] (f))) (...
4fd9a5a91413be8ad2d51be4229ebc779e2db82ffdb38b9b5b8001a007607649
TorXakis/TorXakis
TestMainWhiteBox.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module Main where import System.Exit im...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/solve/test/TestMainWhiteBox.hs
haskell
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module Main where import System.Exit im...
52e557ccf4af9d4cc6293dbcdfaa0c15790836a03f74cf6120d1a7c731039450
elarous/O2SN
core.clj
(ns o2sn.core (:require [mount.core :as m] [aleph.http :as http] [o2sn.handler :as handler]) (:gen-class)) (m/defstate http-server :start (http/start-server handler/app {:port 3000}) :stop (.close http-server)) (defn -main [& args] (m/start) (.addShutdownHook (Runtime/getRuntime)...
null
https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/server/main/o2sn/core.clj
clojure
(ns o2sn.core (:require [mount.core :as m] [aleph.http :as http] [o2sn.handler :as handler]) (:gen-class)) (m/defstate http-server :start (http/start-server handler/app {:port 3000}) :stop (.close http-server)) (defn -main [& args] (m/start) (.addShutdownHook (Runtime/getRuntime)...
a47a46fda8a5c2a4a37dd70e20faf37218e41d580afd5db4e33b82aff512c177
jellelicht/guix
elpa.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the Lice...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/scripts/import/elpa.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix scripts import elpa) #:use-module (guix ui) #:use-module (guix utils) #:use-module (gui...
f6de88aa5353d58f8300b79f156c574894546b2f45effa64803b38b9fa973e9a
snapframework/io-streams
Text.hs
-- | This module provides support for parsing values from Text ' InputStream 's using @attoparsec@. /Since : 1.4.0.0./ module System.IO.Streams.Attoparsec.Text ( -- * Parsing parseFromStream , parserToInputStream , ParseException(..) ) where --------------------------------------------------------------...
null
https://raw.githubusercontent.com/snapframework/io-streams/ae692fee732adea9fe843fb3efe0dd43a6993844/src/System/IO/Streams/Attoparsec/Text.hs
haskell
| This module provides support for parsing values from Text * Parsing ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- 'parseFromStrea...
' InputStream 's using @attoparsec@. /Since : 1.4.0.0./ module System.IO.Streams.Attoparsec.Text parseFromStream , parserToInputStream , ParseException(..) ) where import Data.Attoparsec.Text (Parser) import Data.Text (Text) import ...
9ac89c31c99c1dd63a1701ac4667a710267a5383ec999d911a058ffd4759a5ad
cdinger/rasql
project.clj
(defproject com.houseofding/rasql "0.2.0" :description "A library for converting relational algebra expressions to SQL" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"]])
null
https://raw.githubusercontent.com/cdinger/rasql/ed8cb378a403a86096924669068d785dde07b8f5/project.clj
clojure
(defproject com.houseofding/rasql "0.2.0" :description "A library for converting relational algebra expressions to SQL" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"]])
aa96de43dc40c94edafcca0030e101f70b5c8e5ff00f928351682cef734f08f7
hexlet-basics/exercises-racket
test.rkt
#lang racket (require "../../../src/tests.rkt") (assert-output "-71/7")
null
https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/10-basics/30-brackets/test.rkt
racket
#lang racket (require "../../../src/tests.rkt") (assert-output "-71/7")
c40030b154a0bb0e7a96652f11f2486fcac3b5ea905559ac1479245f815888fe
bufferswap/ViralityEngine
vec2.lisp
(in-package #:vorigin.vec2) (u:fn-> = (vec vec &key (:rel u:f32) (:abs u:f32)) boolean) (declaim (inline =)) (defun = (vec1 vec2 &key (rel 1f-7) (abs rel)) "Compare vectors VEC1 and VEC2 for equality. REL and ABS are the relative and absolute tolerances to compare by, and should be tuned specially for the applicatio...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/operations/vec2.lisp
lisp
(in-package #:vorigin.vec2) (u:fn-> = (vec vec &key (:rel u:f32) (:abs u:f32)) boolean) (declaim (inline =)) (defun = (vec1 vec2 &key (rel 1f-7) (abs rel)) "Compare vectors VEC1 and VEC2 for equality. REL and ABS are the relative and absolute tolerances to compare by, and should be tuned specially for the applicatio...
f62a4f39c712fa296cd569e3e454e82e7b5d564c7c9539f5833433d99dfbd75f
acieroid/scala-am
indexer11.scm
(let* ((size 128) (max 4) (table (atom (make-vector size 0))) (thread (lambda (tid) (letrec ((hash (lambda (w) (modulo (* w 7) size))) (process (lambda (m) (if (< m max) (letrec ((w (+ (*...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/variations/indexer11.scm
scheme
(let* ((size 128) (max 4) (table (atom (make-vector size 0))) (thread (lambda (tid) (letrec ((hash (lambda (w) (modulo (* w 7) size))) (process (lambda (m) (if (< m max) (letrec ((w (+ (*...
5016e1d99ba07c171b4737d4b64f23eddb6acc11bc3411a122c49f16f42bddcb
gwkkwg/metatilities
test-files.lisp
(in-package #:metatilities) (deftestsuite samep-file () () (:test ((ensure (samep (translate-logical-pathname "eksl-utils:file-utilities.lisp") (translate-logical-pathname "eksl-utils:file-utilities.lisp"))))) (:test ((ensure (null (sam...
null
https://raw.githubusercontent.com/gwkkwg/metatilities/82e13df0545d0e47ae535ea35c5c99dd3a44e69e/dev/utilities/test-files.lisp
lisp
(in-package #:metatilities) (deftestsuite samep-file () () (:test ((ensure (samep (translate-logical-pathname "eksl-utils:file-utilities.lisp") (translate-logical-pathname "eksl-utils:file-utilities.lisp"))))) (:test ((ensure (null (sam...
80a68266cf7713ebe11f2adeefc5a86caeab97da8a845f72a519202c09036c88
garrigue/lablgtk
gdkPixbuf.ml
(**************************************************************************) (* Lablgtk *) (* *) (* This program is free software; you can redistribute it *) and/or ...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gdkPixbuf.ml
ocaml
************************************************************************ Lablgtk This program is free software; you can redistribute it comes with the library. ...
and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation version 2 , with the exception described in file COPYING which GNU Library General Public License for more details . You should have r...
e476b43002a85608eb8ff32f3587d2be10982e36440cd80f585da2d60d34c021
shentufoundation/deepsea
Structure.ml
open Datatypes open Integers open Types open Values type __ = Obj.t type sx = | Unsigned | Signed module IntOp = struct type unop = | Clz | Ctz | Popcnt (** val unop_rect : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1 **) let unop_rect f f0 f1 = function | Clz -> f | Ctz -> f0 | Popcnt -> f1 * : ' a1 - >...
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Structure.ml
ocaml
* val unop_rect : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1 * * val binop_rec : 'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1 * * val testop_rec : 'a1 -> 'a1 * * val relop_rect : 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -...
open Datatypes open Integers open Types open Values type __ = Obj.t type sx = | Unsigned | Signed module IntOp = struct type unop = | Clz | Ctz | Popcnt let unop_rect f f0 f1 = function | Clz -> f | Ctz -> f0 | Popcnt -> f1 * : ' a1 - > ' a1 - > ' a1 - > unop - > ' a1 * let unop_rec f f0 f1 ...
80d0cb081b2387593bc8820f788d24095f9cc5ae8ad8ff32802c169e09576a24
metabase/metabase
task_history_cleanup_test.clj
(ns ^:mb/once metabase.task.task-history-cleanup-test (:require [clojure.set :as set] [clojure.test :refer :all] [java-time :as t] [metabase.models.task-history :refer [TaskHistory]] [metabase.models.task-history-test :as tht] [metabase.task.task-history-cleanup :as cleanup-task] [metabase.test :...
null
https://raw.githubusercontent.com/metabase/metabase/c659e767d1371db8820dc867f3538edcd694265a/test/metabase/task/task_history_cleanup_test.clj
clojure
now
(ns ^:mb/once metabase.task.task-history-cleanup-test (:require [clojure.set :as set] [clojure.test :refer :all] [java-time :as t] [metabase.models.task-history :refer [TaskHistory]] [metabase.models.task-history-test :as tht] [metabase.task.task-history-cleanup :as cleanup-task] [metabase.test :...
110cd72d3b48429969171646723efe70af074718cdb68b996fe2e8b9a2b87de7
openbadgefactory/salava
badge.cljs
(ns salava.connections.ui.badge (:require [salava.core.ui.layout :as layout] [reagent.core :refer [atom cursor]] [reagent.session :as session] [salava.core.i18n :as i18n :refer [t]] [salava.core.ui.ajax-utils :as ajax] [salava.core.helper :refer [dump]] ...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/connections/ui/badge.cljs
clojure
(b/open-modal id false init-data state) (user-connections)
(ns salava.connections.ui.badge (:require [salava.core.ui.layout :as layout] [reagent.core :refer [atom cursor]] [reagent.session :as session] [salava.core.i18n :as i18n :refer [t]] [salava.core.ui.ajax-utils :as ajax] [salava.core.helper :refer [dump]] ...
01f22a06532d3957e84a325f25a6e57ae85ad762f22eb81a8b2f05bd2d941653
matt77hias/erl-smallpt
specular.erl
-module(specular). -export([reflectance0/2, schlick_reflectance/3, ideal_specular_reflect/2, ideal_specular_transmit/4]). reflectance0(N1, N2) -> SR = (N1 - N2) / (N1 + N2), SR * SR. schlick_reflectance(N1, N2, C) -> R0 = reflectance0(N1, N2), R0 + (1.0 - R0) * C * C * C * C * C. ideal_specular_reflect(D, N) ->...
null
https://raw.githubusercontent.com/matt77hias/erl-smallpt/3b30af7487c425cc646241d26ac19f0b59c66ebf/src/specular.erl
erlang
-module(specular). -export([reflectance0/2, schlick_reflectance/3, ideal_specular_reflect/2, ideal_specular_transmit/4]). reflectance0(N1, N2) -> SR = (N1 - N2) / (N1 + N2), SR * SR. schlick_reflectance(N1, N2, C) -> R0 = reflectance0(N1, N2), R0 + (1.0 - R0) * C * C * C * C * C. ideal_specular_reflect(D, N) ->...