_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
f8d42f303a1836a4a664c1d93a7a02f28d6daf577faab08a0b4dd17b90e02e83
simplex-chat/simplex-chat
WebRTC.hs
# LANGUAGE FlexibleContexts # module Simplex.Chat.Mobile.WebRTC ( cChatEncryptMedia, cChatDecryptMedia, chatEncryptMedia, chatDecryptMedia, reservedSize, ) where import Control.Monad.Except import qualified Crypto.Cipher.Types as AES import Data.Bifunctor (bimap) import qualified Data.ByteArray as BA import...
null
https://raw.githubusercontent.com/simplex-chat/simplex-chat/01acbb970ae7762e1551e352131453e77a601764/src/Simplex/Chat/Mobile/WebRTC.hs
haskell
# LANGUAGE FlexibleContexts # module Simplex.Chat.Mobile.WebRTC ( cChatEncryptMedia, cChatDecryptMedia, chatEncryptMedia, chatDecryptMedia, reservedSize, ) where import Control.Monad.Except import qualified Crypto.Cipher.Types as AES import Data.Bifunctor (bimap) import qualified Data.ByteArray as BA import...
bd010b48a44f6b3803baeaa44787cd8c59585c439a5d3023599a9660a798e386
danielecapo/sfont
math.rkt
#lang racket (require "interpolables.rkt" "info-kern-math.rkt" "../../main.rkt" "../../geometry.rkt" "../../properties.rkt" "../../utilities.rkt" (for-syntax racket/syntax)) (provide (except-out (all-from-out racket) + - * /) (contract-out [fontm...
null
https://raw.githubusercontent.com/danielecapo/sfont/c854f9734f15f4c7cd4b98e041b8c961faa3eef2/sfont/private/fontmath/math.rkt
racket
[layers (map-layers (lambda (l) (struct-copy layer l [glyphs (filter-glyphs (lambda (g) l)])) ...
#lang racket (require "interpolables.rkt" "info-kern-math.rkt" "../../main.rkt" "../../geometry.rkt" "../../properties.rkt" "../../utilities.rkt" (for-syntax racket/syntax)) (provide (except-out (all-from-out racket) + - * /) (contract-out [fontm...
d3319816731244083524bc9b4112be7edad368265aa9a038a0e07d19ffc6932b
MinaProtocol/mina
cache_handle.mli
Cache handle type t = Dirty.t lazy_t * [ generate_or_load hdl ] is an alias for [ Lazy.force ] . val generate_or_load : t -> Dirty.t * [ ( + ) ] is semantically equivalent to { ! ) } . val ( + ) : t -> t -> t
null
https://raw.githubusercontent.com/MinaProtocol/mina/b19a220d87caa129ed5dcffc94f89204ae874661/src/lib/pickles/cache_handle.mli
ocaml
Cache handle type t = Dirty.t lazy_t * [ generate_or_load hdl ] is an alias for [ Lazy.force ] . val generate_or_load : t -> Dirty.t * [ ( + ) ] is semantically equivalent to { ! ) } . val ( + ) : t -> t -> t
896bfbd5e84b34f567fca309aec0bbe8735e8f33ac952138bb01d851e8b23824
sebschrader/programmierung-ss2015
A2.hs
module E02.A2 ( pack , pack' , pack'' , encode , encode' , decode , decode' , rotate , rotate' , example1 , example2 , example3 ) where example1 :: [Char] example1 = ['a','a','b','b','b','a'] example2 :: [(Int,Char)] example2 = [(2, 'a'), (3, 'b'), (1, 'a')] example3 :: [Int] example3 = [1,2,3,4] -- (a) -- This pro...
null
https://raw.githubusercontent.com/sebschrader/programmierung-ss2015/88fc40107dc42f013d1a1374b2b44a481b4f1746/E02/A2.hs
haskell
(a) This problem is somewhat difficult to solve as we have to apply a concept that we never used before: multiple result values and modifying result values from a recursive function application. We need a helper function takeEqual that splits the longest prefix of recurring characters off of a list and gives us b...
module E02.A2 ( pack , pack' , pack'' , encode , encode' , decode , decode' , rotate , rotate' , example1 , example2 , example3 ) where example1 :: [Char] example1 = ['a','a','b','b','b','a'] example2 :: [(Int,Char)] example2 = [(2, 'a'), (3, 'b'), (1, 'a')] example3 :: [Int] example3 = [1,2,3,4] pack :: [Char] -> ...
9750de7ede1a0a384dce617b5d7ffcc0471048f941c5327b09360fa4bd24353e
haskell/hackage-security
JSON.hs
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ < 710 # LANGUAGE OverlappingInstances # #endif -- | module Hackage.Security.Util.JSON ( -- * Type classes ToJSON(..) , FromJSON(..) , ToObjectKey(..) , FromObjectKey(..) , ReportSchemaErrors(..) , Expected , Got , expected' -- * Utility , fromJSObject...
null
https://raw.githubusercontent.com/haskell/hackage-security/745b294e8cda2b46a21a6d1766a87f699a0277a8/hackage-security/src/Hackage/Security/Util/JSON.hs
haskell
| * Type classes * Utility * Re-exports ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} | Used in the 'FromJSON' instance for 'Ma...
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ < 710 # LANGUAGE OverlappingInstances # #endif module Hackage.Security.Util.JSON ( ToJSON(..) , FromJSON(..) , ToObjectKey(..) , FromObjectKey(..) , ReportSchemaErrors(..) , Expected , Got , expected' , fromJSObject , fromJSField , fromJSOptField , mkOb...
829ba08773185bc58d03e13d365677dd13bbb03e3b3c6924d7ffded58aa8860e
modular-macros/ocaml-macros
callback.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/stdlib/callback.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the external register_named_value : string -> Obj.t -> unit = "caml_register_n...
cbc7a724157293eb6a545ed4e85bfead4a63c9a14eb366c6b7e8e58076fdb0bc
patricoferris/ni-forests
l.mli
open Brr module G : sig val l : Jv.t end module Layer : sig type t include Jv.CONV with type t := t end module LatLng : sig type t = Jv.t include Jv.CONV with type t := t val create : lat:float -> lng:float -> t end module TileLayer : sig type opts val opts_to_jv : opts -> Jv.t val opts : ...
null
https://raw.githubusercontent.com/patricoferris/ni-forests/610a2bb3694faab7b688dda2381fbc24a313d2df/src/leaflet/l.mli
ocaml
open Brr module G : sig val l : Jv.t end module Layer : sig type t include Jv.CONV with type t := t end module LatLng : sig type t = Jv.t include Jv.CONV with type t := t val create : lat:float -> lng:float -> t end module TileLayer : sig type opts val opts_to_jv : opts -> Jv.t val opts : ...
39e24b52d7ef38c68adeddb8e80b960e6d971cf7f31745f12655669211890eab
lehins/massiv
Stream.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # -- | -- Module : Data.Massiv.Array.Delayed.Stream Copyright : ( c ) 2019 - 2022 -- License : BSD3 Maintainer : < > -- Stability : experimental -- Portabili...
null
https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv/src/Data/Massiv/Array/Delayed/Stream.hs
haskell
| Module : Data.Massiv.Array.Delayed.Stream License : BSD3 Stability : experimental Portability : non-portable | Delayed stream array that represents a sequence of values that can be loaded sequentially. Important distinction from other arrays is that its size might no be known until it is computed. ...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # Copyright : ( c ) 2019 - 2022 Maintainer : < > module Data.Massiv.Array.Delayed.Stream ( DS (..), Array (..), toStreamArray, toStreamM, toStreamIxM, toSte...
27fdd6226c79fe0390cdf9c20bd7da71db5d96ee7feea114898540b3f6e9227f
JeffreyBenjaminBrown/digraphs-with-text
Main.hs
# LANGUAGE FlexibleContexts # module Main (main) where import Test.HUnit import TParse import TAdd import TGraph import TShow import TSearch main = runTestTT $ TestList [ TestLabel "tParse" tParse , TestLabel "tAdd" tAdd , TestLabel "tGraph" tGraph , TestLabel "tShow" tShow , TestLabel "tSear...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/digraphs-with-text/34e47a52aa9abb6fd42028deba1623a92e278aae/test/Main.hs
haskell
# LANGUAGE FlexibleContexts # module Main (main) where import Test.HUnit import TParse import TAdd import TGraph import TShow import TSearch main = runTestTT $ TestList [ TestLabel "tParse" tParse , TestLabel "tAdd" tAdd , TestLabel "tGraph" tGraph , TestLabel "tShow" tShow , TestLabel "tSear...
16f02c5524c8a696790207809c0a3bd51c9046ddd2608af7d7c8a98e853cdfaf
cdepillabout/world-peace
TypeErrors.hs
# LANGUAGE DataKinds # # LANGUAGE InstanceSigs # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # -- Deferring type errors is necessary for should-not-typecheck to work. {-# OPTIONS_GHC -fdefer-type-errors #-} {-# OPTIONS_GHC -Wno-deferred-type-errors #-} module Test.Typ...
null
https://raw.githubusercontent.com/cdepillabout/world-peace/0596da67d792ccf9f0ddbe44b5ce71b38cbde020/test/Test/TypeErrors.hs
haskell
# LANGUAGE OverloadedStrings # Deferring type errors is necessary for should-not-typecheck to work. # OPTIONS_GHC -fdefer-type-errors # # OPTIONS_GHC -Wno-deferred-type-errors #
# LANGUAGE DataKinds # # LANGUAGE InstanceSigs # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # module Test.TypeErrors where import Data.Functor.Identity (Identity(Identity)) import Test.ShouldNotTypecheck (shouldNotTypecheck) import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (testCase) i...
7dc4743de561dfb9d9e6951e8a57495105dca953ec139a8bdfc2c1776315892a
gvolpe/shopping-cart-haskell
Orphan.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE DataKinds, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-} module Orphan where import Control.Monad.Catch ( Exception ) import Data.Bifunctor ( first ) import Data.Text ( Te...
null
https://raw.githubusercontent.com/gvolpe/shopping-cart-haskell/23c1303fb27a1b006fe88eb3beb67188a536475f/src/Orphan.hs
haskell
# LANGUAGE DataKinds, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans # module Orphan where import Control.Monad.Catch ( Exception ) import Data.Bifunctor ( first ) import Data.Text ( Text ) import qualified Data.Text as T import Database.Postg...
caa8d57d0d5825c334053b5298c582ebd06df27e138c8c077470b987224c5109
input-output-hk/hydra
ServerSpec.hs
# LANGUAGE TypeApplications # module Hydra.API.ServerSpec where import Hydra.Prelude hiding (seq) import Test.Hydra.Prelude import Control.Exception (IOException) import Control.Monad.Class.MonadSTM ( check, modifyTVar', newTQueue, newTVarIO, readTQueue, tryReadTQueue, writeTQueue, ) import qualified ...
null
https://raw.githubusercontent.com/input-output-hk/hydra/7f5e25cb4e9dd1b12a016a6bab8f0e275f59ff62/hydra-node/test/Hydra/API/ServerSpec.hs
haskell
NOTE: this client runs indefinitely so it should be run within a context that won't leak runaway threads | Mocked persistence handle which just does nothing.
# LANGUAGE TypeApplications # module Hydra.API.ServerSpec where import Hydra.Prelude hiding (seq) import Test.Hydra.Prelude import Control.Exception (IOException) import Control.Monad.Class.MonadSTM ( check, modifyTVar', newTQueue, newTVarIO, readTQueue, tryReadTQueue, writeTQueue, ) import qualified ...
400b60954dc5175e12b61afd1a05ac1371a6c97844b095d4d0edc860a51032d3
static-analysis-engineering/codehawk
bCHARMTestSupport.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/e8fed9f226abe38578768968279c8242eb21fea9/CodeHawk/CHB/bchlibarm32/bCHARMTestSupport.ml
ocaml
chutil xprlib bchlib bchlibarm32
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
5c4af69de35a5b30c23d37b52eae67993e2ff98c927b37ce88ae69065d52d190
graninas/Hydra
Interpreters.hs
module Hydra.Interpreters ( module X ) where import Hydra.Core.Interpreters as X import Hydra.Framework.Interpreters as X
null
https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-church-free/src/Hydra/Interpreters.hs
haskell
module Hydra.Interpreters ( module X ) where import Hydra.Core.Interpreters as X import Hydra.Framework.Interpreters as X
84cb5ba11e0f7e84ff5f46d3493d83814073c2b3313827b364615731499e3479
system-f/fp-course
StateTest.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Test.StateTest ( -- * Tests test_State , getTest , putTest , functorTest , applicativeTest , monadTest , findMTest , firstRepeatTest , disti...
null
https://raw.githubusercontent.com/system-f/fp-course/e929bc909a1701f67d218ed7974e9732d1e8dd32/src/Test/StateTest.hs
haskell
# LANGUAGE OverloadedStrings # * Tests * Runner
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # module Test.StateTest ( test_State , getTest , putTest , functorTest , applicativeTest , monadTest , findMTest , firstRepeatTest , distinctTest , isHappyTest , execTest , evalTest ...
8807381a961c0a85c3a684066627d75c69a4b726cbfd68d4c5ee279e19033527
kwanghoon/polyrpc
NameGen.hs
-- | Name generation module NameGen where import Control.Monad.State import Naming import Location import Type import Expr import Pretty import Debug.Trace data NameState = NameState { varNames :: [ExprVar] , tvarNames :: [TypeVar] , lvarNames :: [LocationVar] , indent :: Int -- This has no place here, b...
null
https://raw.githubusercontent.com/kwanghoon/polyrpc/6b68d7fd7f0743be55d467d4b722763dd49da474/app/bidi/NameGen.hs
haskell
| Name generation This has no place here, but useful for debugging | Create a fresh variable | Create a fresh type variable | Create a fresh location variable
module NameGen where import Control.Monad.State import Naming import Location import Type import Expr import Pretty import Debug.Trace data NameState = NameState { varNames :: [ExprVar] , tvarNames :: [TypeVar] , lvarNames :: [LocationVar] , debug :: Bool } data EVar = EVar ExprVar data TVar = TV...
e3750381890f9b0282ccd3f6bbe53db7f56b93e8880d4709e47d5ae96b9e03f0
coalton-lang/coalton
package.lisp
(in-package #:cl-user) (defpackage #:coalton (:documentation "Public interface to COALTON.") (:use) ; Keep the package clean! (:import-from #:common-lisp #:in-package) (:export #:in-package) (:export #:call-coalton-function) (:export #:coalton-toplevel #:coa...
null
https://raw.githubusercontent.com/coalton-lang/coalton/f4b810e78501345ae82a74eb4de761bd4b6924f0/src/package.lisp
lisp
Keep the package clean! Early Types Primitive Syntax Syntax Syntax
(in-package #:cl-user) (defpackage #:coalton (:documentation "Public interface to COALTON.") (:import-from #:common-lisp #:in-package) (:export #:in-package) (:export #:call-coalton-function) (:export #:coalton-toplevel #:coalton-codegen #:coalton-codegen-types #:coalton-codegen-ast ...
e6afdf734b6b6db13e9330862669d80b2e86ac660e6ba4b06be6513d46f9df99
ghcjs/jsaddle-dom
DocumentFragment.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.DocumentFragment (newDocumentFragment, DocumentFragment(..), gTypeDocumentFragment, IsDocumentFragment, toD...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/DocumentFragment.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.DocumentFragment (newDocumentFragment, DocumentFragment(..), gTypeDocumentFragment, IsDocumentFragment, toDocumentFragment) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Boo...
fefbb7b5ce9fc9d2b68833baf71b6454f6925ca8a0c04fe14b5831ea5d16205e
rizo/snowflake-os
trie.ml
module type Ordering = sig type t type index type key val to_index : t -> index list val from_index : index list -> t end module Make = functor(O : Ordering) -> struct type elt = O.t type index = O.index type key = O.key type t = { mutable children : (index, t) Hashtbl.t; mutable key : key ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/trie.ml
ocaml
This doesn't delete unneeded nodes, but never mind.
module type Ordering = sig type t type index type key val to_index : t -> index list val from_index : index list -> t end module Make = functor(O : Ordering) -> struct type elt = O.t type index = O.index type key = O.key type t = { mutable children : (index, t) Hashtbl.t; mutable key : key ...
a0dc99e911ebb1d9a2c4d1d876da2d841fe26930d8eef9ebd5320568cb1de9e4
Capelare/ejercicios-haskell
examen-septiembre-2010.hs
Problema 1 ¿ Cuáles son siguientes funciones ? a ) fun1 f g = map ( f . ) Problema 1 ¿Cuáles son los tipos polimórficos de las siguientes funciones? a) fun1 f g = map (f . g) -} fun1 :: (b -> c) -> (a -> b) -> [a] -> [c] b ) fun2 f g = ( map f ) . b) fun2 f g = (map f) . g -} fun2 :: (b -> c) ->...
null
https://raw.githubusercontent.com/Capelare/ejercicios-haskell/84952b50797f8c1624f95877642c5c05593b2f88/miguel/examen-septiembre-2010.hs
haskell
Problema 1 ¿ Cuáles son siguientes funciones ? a ) fun1 f g = map ( f . ) Problema 1 ¿Cuáles son los tipos polimórficos de las siguientes funciones? a) fun1 f g = map (f . g) -} fun1 :: (b -> c) -> (a -> b) -> [a] -> [c] b ) fun2 f g = ( map f ) . b) fun2 f g = (map f) . g -} fun2 :: (b -> c) ->...
dda08b908290a61883da6b3b1ca69998eb3a50e69cee599b92482e023f347123
ijvcms/chuanqi_dev
scene_send_lib_copy.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 09 . 2015 下午4:46 %%%------------------------------------------------------------------- -module(scene_send_lib_copy). -include("common.hrl"). -include("record.hrl"...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/scene/scene_send_lib_copy.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API 获取玩家所在场景的对象信息 获取玩家所在场景的对象信息 获取玩家所在场景的对象信息 ?INFO("11053 ~p ~p", [Data, length(GuiseList)]), 获取玩家所在场景的对象信息 获取材质列表 发送周围玩家给玩家自己, 把自己信息告诉周围的玩家 发送周围玩家给玩...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 09 . 2015 下午4:46 -module(scene_send_lib_copy). -include("common.hrl"). -include("record.hrl"). -include("proto.hrl"). -include("cache.hrl"). -include("config.hrl"). -export([ send_scene_info_data/3, send_scene_info_data_all/1, send_scene_move_info/2, ...
417c28be06acb476b0a8a060b35879bc0b43a41dfd7a36525718e7fdd9f3d55c
javalib-team/sawja
sawjap.ml
open! Javalib_pack open Sawja_pack module IR = JBir let transform folding cm c = IR.transform cm c ~folding let print_class folding i_or_c = Javalib.JPrint.print_class (Javalib.map_interface_or_class_context (transform folding) i_or_c) (IR.print ~show_type:false) stdout let...
null
https://raw.githubusercontent.com/javalib-team/sawja/3c7dedd5819e482ad4cb92af0660d58279a89779/test/sawjap.ml
ocaml
open! Javalib_pack open Sawja_pack module IR = JBir let transform folding cm c = IR.transform cm c ~folding let print_class folding i_or_c = Javalib.JPrint.print_class (Javalib.map_interface_or_class_context (transform folding) i_or_c) (IR.print ~show_type:false) stdout let...
680bdc7c5a7c9e9e0ad98fd9fd16c3b087b2bf47d6f3be30a2f583cf9840f9ae
suhdonghwi/nuri
Util.hs
# OPTIONS_GHC -Wno - missing - signatures # module Nuri.Spec.Util where import Nuri.Expr import Nuri.Literal import Nuri.Stmt import Text.Megaparsec.Pos initPos :: SourcePos initPos = initialPos "(test)" litNone = Lit initPos LitNone litInteger v = Lit initPos (LitInteger v) litChar v = Lit initPos (LitChar v) l...
null
https://raw.githubusercontent.com/suhdonghwi/nuri/337550e3d50c290144df905ea3f189e9af6123c2/test/Nuri/Spec/Util.hs
haskell
# OPTIONS_GHC -Wno - missing - signatures # module Nuri.Spec.Util where import Nuri.Expr import Nuri.Literal import Nuri.Stmt import Text.Megaparsec.Pos initPos :: SourcePos initPos = initialPos "(test)" litNone = Lit initPos LitNone litInteger v = Lit initPos (LitInteger v) litChar v = Lit initPos (LitChar v) l...
3839290e7e8b94f3b2ed695ee75dc4378d8b242e34c6177037e0b84ee1ebb7f4
sklassen/erlang-linalg-native
linalg_det.erl
-module(linalg_det). -export([det/1]). -define(EPSILON, 1.0e-12). % 1x1 ... det([[X]]) -> X; .. well known 2x2 ... det([[A, B], [C, D]]) -> A * D - B * C; ... rule of sarrus 3x3 ... det([[A, B, C], [D, E, F], [G, H, I]]) -> A * E * I + B * F * G + C * D * H - C * E * G - B * D * I - A * F * H; ... a...
null
https://raw.githubusercontent.com/sklassen/erlang-linalg-native/b31eef532b9fe2be7ecbff52a060ccdc833b4dca/src/linalg_det.erl
erlang
1x1 ... ... remaining check for square matrix Gauss-Jordan elimination
-module(linalg_det). -export([det/1]). -define(EPSILON, 1.0e-12). det([[X]]) -> X; .. well known 2x2 ... det([[A, B], [C, D]]) -> A * D - B * C; ... rule of sarrus 3x3 ... det([[A, B, C], [D, E, F], [G, H, I]]) -> A * E * I + B * F * G + C * D * H - C * E * G - B * D * I - A * F * H; ... and extenti...
928b7302d887a6fda244acc73643ee91e759ba3a365fcc21d5cb653f4c17a01d
Quviq/quickcheck-contractmodel
ContractModel.hs
module Test.QuickCheck.ContractModel ( ContractModel(..) , RunModel(..) , IsRunnable(..) , DefaultRealized , RunMonad(..) , Actions , Act(..) , pattern Actions , pattern ContractAction , pattern WaitUntil , stateAfter , runContractModel , liftRunMonad , contractState , registerToken --...
null
https://raw.githubusercontent.com/Quviq/quickcheck-contractmodel/071628000ad391ba6849b4d8407b5375228d235d/quickcheck-contractmodel/src/Test/QuickCheck/ContractModel.hs
haskell
* Chain index NOTE: we don't export the internals here because it's important that you can't tell the difference not guaranteed to be stable. * Properties * Dynamic logic * The safe interface to `Spec` NOTE: we don't export internals here because we really don't want people seeing or changing the sensitive ...
module Test.QuickCheck.ContractModel ( ContractModel(..) , RunModel(..) , IsRunnable(..) , DefaultRealized , RunMonad(..) , Actions , Act(..) , pattern Actions , pattern ContractAction , pattern WaitUntil , stateAfter , runContractModel , liftRunMonad , contractState , registerToken , Ha...
4aec757bf5ca85a294a46ccc2e34d5be8417edc1cb98967e79bdf4bb4fd9bd2e
hipsleek/hipsleek
mcpure_D.ml
#include "xdebug.cppo" open VarGen open Globals open Cpure (* Memoised structures *) type memo_pure = memoised_group list and memoised_group = { memo_group_fv : spec_var list; memo_group_linking_vars : spec_var list; memo_group_changed : bool; false if the slice has been checked UNSAT memo_gr...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/mcpure_D.ml
ocaml
Memoised structures used for pruning constraints that can not be used for pruning but belong to the current slice non-the less alias set Original constraint
#include "xdebug.cppo" open VarGen open Globals open Cpure type memo_pure = memoised_group list and memoised_group = { memo_group_fv : spec_var list; memo_group_linking_vars : spec_var list; memo_group_changed : bool; false if the slice has been checked UNSAT } and memoised_constraint = { me...
34c807f574c8cf831aa6158e33ab1414b42d6c74a4ed661fe1647b5e02c641e7
ostera/serde.ml
data.ml
type t = | Int of Int.t | Bool of bool | Float of float | String of string | Char of char | Tuple of { tup_size : int; tup_elements : t list } | Unit | Variant_unit of { vu_type : string; vu_name : string; vu_idx : int } | Variant_tuple of { vt_type : string; vt_name : string; vt_idx...
null
https://raw.githubusercontent.com/ostera/serde.ml/34adb836b3854e4469a757e32c18dbdbd9e79bf0/serde/data.ml
ocaml
type t = | Int of Int.t | Bool of bool | Float of float | String of string | Char of char | Tuple of { tup_size : int; tup_elements : t list } | Unit | Variant_unit of { vu_type : string; vu_name : string; vu_idx : int } | Variant_tuple of { vt_type : string; vt_name : string; vt_idx...
c9bea1d79e7fb0ef7d28538d28a43c064b2224a5da2c55c6e5d26b1a713e7b30
exercism/racket
example.rkt
#lang racket (provide add-gigasecond) (require racket/date) (define (add-gigasecond date) (seconds->date (+ 1e9 (date->seconds date))))
null
https://raw.githubusercontent.com/exercism/racket/d171a5fb3595cc09d171051a3f5ef45caedad020/exercises/practice/gigasecond/.meta/example.rkt
racket
#lang racket (provide add-gigasecond) (require racket/date) (define (add-gigasecond date) (seconds->date (+ 1e9 (date->seconds date))))
7d208ddf34c589b3b09d97dc4af3cdeefd4a2833253e94715e1e84bed400b2bc
cnuernber/dtype-next
nio_buf_mmodel.clj
(ns tech.v3.datatype.ffi.nio-buf-mmodel (:require [tech.v3.datatype.protocols :as dtype-proto]) (:import [jdk.incubator.foreign MemoryAddress ResourceScope] [java.nio ByteBuffer ByteOrder]) ) (set! *warn-on-reflection* true) (defn direct-buffer-constructor ^ByteBuffer [nbuf ^long address ^long nb...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/71477752fc376fad4b678fa9607ef54a40b2b1ff/src/tech/v3/datatype/ffi/nio_buf_mmodel.clj
clojure
(ns tech.v3.datatype.ffi.nio-buf-mmodel (:require [tech.v3.datatype.protocols :as dtype-proto]) (:import [jdk.incubator.foreign MemoryAddress ResourceScope] [java.nio ByteBuffer ByteOrder]) ) (set! *warn-on-reflection* true) (defn direct-buffer-constructor ^ByteBuffer [nbuf ^long address ^long nb...
5977ad0259895e29c8360b339d223105b3e6550809a6c87fbe55d6bfb64445d7
andersfugmann/amqp-client
channel_test.ml
open Amqp open Thread let uniq s = Printf.sprintf "%s_%d_%s" (Filename.basename Sys.argv.(0)) (Unix.getpid ()) s let test = let port = Sys.getenv_opt "AMQP_PORT" |> function Some port -> Some (int_of_string port) | None -> None in Connection.connect ~id:(uniq "ocaml-amqp-tests") ?port "localhost" >>= fun connec...
null
https://raw.githubusercontent.com/andersfugmann/amqp-client/2932a69510af550e9e156ed479f4fca7daee31cc/async/test/channel_test.ml
ocaml
open Amqp open Thread let uniq s = Printf.sprintf "%s_%d_%s" (Filename.basename Sys.argv.(0)) (Unix.getpid ()) s let test = let port = Sys.getenv_opt "AMQP_PORT" |> function Some port -> Some (int_of_string port) | None -> None in Connection.connect ~id:(uniq "ocaml-amqp-tests") ?port "localhost" >>= fun connec...
49fa62741337533afbc7ebbd1b2dcc854678ca52df1363617dd235614cbc9f0a
dundalek/closh
plain.clj
(ns closh.zero.frontend.plain (:gen-class) (:require [closh.zero.platform.eval :as eval] [closh.zero.compiler] [closh.zero.parser] [closh.zero.pipeline] [closh.zero.reader])) (defn -main [& args] (let [cmd (or (first args) "echo hello clojure")] (eval/eval ...
null
https://raw.githubusercontent.com/dundalek/closh/b1a7fd310b6511048fbacb8e496f574c8ccfa291/src/jvm/closh/zero/frontend/plain.clj
clojure
(ns closh.zero.frontend.plain (:gen-class) (:require [closh.zero.platform.eval :as eval] [closh.zero.compiler] [closh.zero.parser] [closh.zero.pipeline] [closh.zero.reader])) (defn -main [& args] (let [cmd (or (first args) "echo hello clojure")] (eval/eval ...
f676369998665fac61ec5bbc3cac263450c337c572b40ace24fba8b329f5a526
macourtney/Dark-Exchange
payment_sent.clj
(ns darkexchange.model.actions.payment-sent (:require [darkexchange.interchange-map-util :as interchange-map-util] [darkexchange.model.actions.action-keys :as action-keys] [darkexchange.model.trade :as trade-model])) (def action-key action-keys/payment-sent-action-key) (defn payment-sent [fo...
null
https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/actions/payment_sent.clj
clojure
(ns darkexchange.model.actions.payment-sent (:require [darkexchange.interchange-map-util :as interchange-map-util] [darkexchange.model.actions.action-keys :as action-keys] [darkexchange.model.trade :as trade-model])) (def action-key action-keys/payment-sent-action-key) (defn payment-sent [fo...
b245ccbb50b98ef7d8e364f062c49c6f0543e90a65784934fd68c96391012a9b
yallop/ocaml-asp
asp_utilities.mli
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
null
https://raw.githubusercontent.com/yallop/ocaml-asp/a092f17ea55d427c63414899e39a8fe80b30db14/lib/asp_utilities.mli
ocaml
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
2c9bbb7c14399f2acdd40804dceef3094a25265bf567cabd1b8ff8b0c888228f
ocaml-multicore/tezos
test_global_constants_storage.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Marigold < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/test_global_constants_storage.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Marigold < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHE...
446e014a434ea079743c3048510e9d1c64071822cbc3dd799d31f699ca06e5a0
RolfRolles/PandemicML
X86SemanticsDivinator.ml
open X86Predicate open DataStructures (* This code creates the JIT scaffolding necessary for testing *) let init_t,blit_t,retn_t,stack_t,c_stack32,mem_t,f_blit,f_execute = JITSampler.create_setup () (* This code applies all test functions against expressions that have been turned into statements. *) let apply_all...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Test/X86SemanticsDivinator.ml
ocaml
This code creates the JIT scaffolding necessary for testing This code applies all test functions against expressions that have been turned into statements. Make such a function from a random input state Delete this when done testing Delete this when done testing Delete this when done testing Delete thi...
open X86Predicate open DataStructures let init_t,blit_t,retn_t,stack_t,c_stack32,mem_t,f_blit,f_execute = JITSampler.create_setup () let apply_all l_evalstmt stmt = if l_evalstmt = [] then invalid_arg "apply_all"; let rec aux = function ( Printf.printf " Eliminated % s\n " ( string_of_stmt stmt ) ; | [] -> true...
c29def7e18d2757fa98187684c39b536fad34d7af9ca84e74608253dd6026dcd
w3ntao/programming-in-haskell
Exercise_12_5_1.hs
# OPTIONS_GHC -Wall # module Exercise_12_5_1 where data Tree a = Leaf | Node (Tree a) a (Tree a) deriving Show instance Functor Tree where fmap _ Leaf = Leaf fmap g (Node l x r) = Node (fmap g l) (g x) (fmap g r)
null
https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-12/Exercise_12_5_1.hs
haskell
# OPTIONS_GHC -Wall # module Exercise_12_5_1 where data Tree a = Leaf | Node (Tree a) a (Tree a) deriving Show instance Functor Tree where fmap _ Leaf = Leaf fmap g (Node l x r) = Node (fmap g l) (g x) (fmap g r)
e540904903b57f727a1a48af8c9f3fc2a0b79e7dc350137dc6d3d75ba44efd42
kelamg/HtDP2e-workthrough
ex347.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex347) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex347.rkt
racket
about the language level of this file in a form that our tools can easily process. - Number
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex347) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/abstraction) (define-struct add [left ...
8c12bcdafdfcdb42bb19ec4fac88c187270a687ca319571bda8b8ab5dab00b16
chaoxu/fancy-walks
25.hs
fib = 1 : 1 : zipWith (+) fib (tail fib) problem_25 = (+1).length $ takeWhile ((<1000).length.show) fib main = print problem_25
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/25.hs
haskell
fib = 1 : 1 : zipWith (+) fib (tail fib) problem_25 = (+1).length $ takeWhile ((<1000).length.show) fib main = print problem_25
4986e8e1420d20a6d109b9a65f0f0431cacd8f9d89210cc711b8a9d9ee07c57e
racket/typed-racket
dead-code.rkt
#lang racket/base (require syntax/parse syntax/stx racket/sequence racket/syntax (for-template racket/base) "../utils/utils.rkt" (only-in "../utils/tc-utils.rkt" current-type-enforcement-mode deep) "../types/type-table.rkt" "utils.rkt" "logging.rkt") (pro...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/optimizer/dead-code.rkt
racket
The type based 'dead code elimination' done by this file just makes the dead code obvious. The actual elimination step is left to the compiler. if the conditional has a known truth value, we can reveal this we have to keep the test, in case it has side effects keep the clause (to have a case-lambda with the right ...
#lang racket/base (require syntax/parse syntax/stx racket/sequence racket/syntax (for-template racket/base) "../utils/utils.rkt" (only-in "../utils/tc-utils.rkt" current-type-enforcement-mode deep) "../types/type-table.rkt" "utils.rkt" "logging.rkt") (pro...
8f7bbb64b7e253c01829af7b666cfb6543b8852338e6c92d8700bd87a9f8bd24
victornicolet/parsynt
Lib.ml
module Log = Utils.Log module Config = Utils.Config module Lang = struct module AC = Lang.AcTerm module A = Lang.Analyze module E = Lang.SolutionDescriptors module N = Lang.Normalize module T = struct include Lang.Typ include Lang.Term module Pp = Lang.TermPp end module U = Lang.Unfold mo...
null
https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/Lib.ml
ocaml
Modules exposed for testing purposes
module Log = Utils.Log module Config = Utils.Config module Lang = struct module AC = Lang.AcTerm module A = Lang.Analyze module E = Lang.SolutionDescriptors module N = Lang.Normalize module T = struct include Lang.Typ include Lang.Term module Pp = Lang.TermPp end module U = Lang.Unfold mo...
0f7962d185aee7e48940e61fb78053cfdd662b23bb13937920b52feb111ece55
sionescu/iolib
types.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; --- Types. ;;; (in-package :iolib/base) (deftype function-designator () '(or symbol function)) (defun symbol-with-name-of-length-one (thing) (if (and (symbolp thing) (= 1 (length (symbol-name thing)))) (char (symbol-name thing) 0) nil)...
null
https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/base/types.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- --- Types. Vector types
(in-package :iolib/base) (deftype function-designator () '(or symbol function)) (defun symbol-with-name-of-length-one (thing) (if (and (symbolp thing) (= 1 (length (symbol-name thing)))) (char (symbol-name thing) 0) nil)) (deftype character-designator () '(or character (string 1) (satis...
6fe6db536c621a56a9c1805e1332f1c69cf43302a273366abdca26605ca1077d
dmjio/graphql-meta
LexerUtils.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveDataTypeable #-} -------------------------------------------------------------------------------- -- | -- Module : GraphQL.Le...
null
https://raw.githubusercontent.com/dmjio/graphql-meta/3fc759d6976a9ea1429e23fe1c6a9e6adb45e372/src/GraphQL/LexerUtils.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # ------------------------------------------------------------------------------ | Module : GraphQL.LexerUtils Maturity : Usable ------------------------------------------------------------------------------ | A G...
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # LANGUAGE DeriveGeneric # Description : / Tokenizer of GraphQL document per GraphQL specification Maintainer : < > , < > module GraphQL.LexerUtils where import Control.DeepSeq import Control.Monad.State import ...
3a9ee605024a6305d00d1532a6af1eae6e6d44adcfb3a1da6d3d940cedc02c0d
igarnier/prbnmcn-dagger
resampling.ml
module type Particle = sig type t type field val weight : t -> field end module type S = sig type field type particle type 'a t := 'a Stateful_sampling_monad.t val resampling_generic_iterative : particle array -> (int -> field) -> int array val resampling_generic : particle array -> (int -> f...
null
https://raw.githubusercontent.com/igarnier/prbnmcn-dagger/360e196be3e28cbcc67691a1fd68f1cd93743e35/src/resampling.ml
ocaml
Both stratified and systematic resampling are implemented through the same generic function. The [f] function is supposed to return the next "noisy" quantile boundary.
module type Particle = sig type t type field val weight : t -> field end module type S = sig type field type particle type 'a t := 'a Stateful_sampling_monad.t val resampling_generic_iterative : particle array -> (int -> field) -> int array val resampling_generic : particle array -> (int -> f...
ecc9f002d92e00bc04ca6d134be3e8be54c8793c657724a42e3dcff3bf42ea10
GumTreeDiff/cgum
osetb.ml
open Ocollection open Oset let empty = Setb.empty class ['a] osetb xs = object(o) inherit ['a] oset val data = xs (* Setb.empty *) method tosetb = data if put [ ] then no segfault , if [ 11 ] then method toset = Obj.magic data method empty = {< data = Setb.empty >} method add e = {<...
null
https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/commons/ocollection/osetb.ml
ocaml
Setb.empty todo: include, ...
open Ocollection open Oset let empty = Setb.empty class ['a] osetb xs = object(o) inherit ['a] oset method tosetb = data if put [ ] then no segfault , if [ 11 ] then method toset = Obj.magic data method empty = {< data = Setb.empty >} method add e = {< data = Setb.add e data >} metho...
6ba7a1038f12815a4ce00831e107436ecef0851e45d7057f11f04863ae3c9409
ultralisp/ultralisp
changelog.lisp
(defpackage #:ultralisp/widgets/changelog (:use #:cl) (:import-from #:str) (:import-from #:reblocks/html #:with-html) (:import-from #:ultralisp/models/action #:get-params #:project-updated #:project-removed #:get-project ...
null
https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/widgets/changelog.lisp
lisp
TODO: remove this code after refactoring TODO: create a generic get-uri and define it for a version class
(defpackage #:ultralisp/widgets/changelog (:use #:cl) (:import-from #:str) (:import-from #:reblocks/html #:with-html) (:import-from #:ultralisp/models/action #:get-params #:project-updated #:project-removed #:get-project ...
b82250f7c7a77e013bb705e4c51f92556f92ce9b9c23c7917be93925d4fe1f56
ont-app/rdf
core.cljc
(ns ont-app.rdf.core {:doc "This is a backstop for shared logic between various RDF-based implementations of IGraph. It includes: - support for LangStr using the #voc/lstr custom reader - support for ^^transit:json datatype tags - templating utilities for the standard IGraph member access methods. - i/o methods `l...
null
https://raw.githubusercontent.com/ont-app/rdf/60b7a7331db4d435d67d4baccf9b4756e3304c26/src/ont_app/rdf/core.cljc
clojure
These errors were found to be spurious, related to cljs ... meta ont-app reader conditionals todo add cljs-http.client? require aliases FUN WITH READER MACROS standard clojure containers are declared by default as descendents of transit data. renders as transit by default. Note that you can undo this with '...
(ns ont-app.rdf.core {:doc "This is a backstop for shared logic between various RDF-based implementations of IGraph. It includes: - support for LangStr using the #voc/lstr custom reader - support for ^^transit:json datatype tags - templating utilities for the standard IGraph member access methods. - i/o methods `l...
1876dc16904739c154998dc8e3ea57851507341cf64980ce23b6b057ad783cae
ushitora-anqou/alqo
game.erl
-module(game). -include("game.hrl"). -export([ new_board/1, can_stay/1, num_players/1, attacker_card/1, current_turn/1, next_turn/1, has_player_lost/2, check_finished/1, hand/2, deck_top/1, choose_attacker_card/1, choose_attacker_card/2, attack/4, stay/1, boar...
null
https://raw.githubusercontent.com/ushitora-anqou/alqo/9900172d765100dec40c00a7aec3c2dc971956f1/src/game.erl
erlang
attacker_card_from_others/1, hand_from_others/2, get_deck_top_from_others/1, i.e., all cards of hand are revealed? Deck is not empty. The chosen card should be hidden. Private functions Thanks to:
-module(game). -include("game.hrl"). -export([ new_board/1, can_stay/1, num_players/1, attacker_card/1, current_turn/1, next_turn/1, has_player_lost/2, check_finished/1, hand/2, deck_top/1, choose_attacker_card/1, choose_attacker_card/2, attack/4, stay/1, boar...
957305df7fcb72961cfa9e1046e7f547f803c5657f738791d94bcc74e5498c98
processone/ejabberd
mod_vcard_mnesia_opt.erl
%% Generated automatically %% DO NOT EDIT: run `make options` instead -module(mod_vcard_mnesia_opt). -export([search_all_hosts/1]). -spec search_all_hosts(gen_mod:opts() | global | binary()) -> boolean(). search_all_hosts(Opts) when is_map(Opts) -> gen_mod:get_opt(search_all_hosts, Opts); search_all_hosts(Host) ...
null
https://raw.githubusercontent.com/processone/ejabberd/b860a25c82515ba51b044e13ea4e040e3b9bbc41/src/mod_vcard_mnesia_opt.erl
erlang
Generated automatically DO NOT EDIT: run `make options` instead
-module(mod_vcard_mnesia_opt). -export([search_all_hosts/1]). -spec search_all_hosts(gen_mod:opts() | global | binary()) -> boolean(). search_all_hosts(Opts) when is_map(Opts) -> gen_mod:get_opt(search_all_hosts, Opts); search_all_hosts(Host) -> gen_mod:get_module_opt(Host, mod_vcard, search_all_hosts).
fecd3c4d72f55378eb34ce51d533e34c2a0833b2570adda6e694f9badf7f781d
basho/riak-erlang-http-client
rhc_dt.erl
%% ------------------------------------------------------------------- %% %% riakhttpc: Riak HTTP Client %% Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance...
null
https://raw.githubusercontent.com/basho/riak-erlang-http-client/2d4e58371e4d982bee1e0ad804b1403b1333573c/src/rhc_dt.erl
erlang
------------------------------------------------------------------- riakhttpc: Riak HTTP Client 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 express or implied. See the License for the specifi...
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(r...
d4a1cf1cd84f892ba747511dbf2e189ba6520bbd88a63df01cb677a800d73ebe
geophf/1HaskellADay
Exercise.hs
module Y2018.M06.D20.Exercise where - Okay , we 're going to do cosine similarity , but to do cosine similarity , we need vector - sets to do the comparisons . Now , it 'd be great to have WordNet , but my $ cabal install wordnet fails with Ambiguous type variable ‘ t0 ’ arising from an operator section ...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M06/D20/Exercise.hs
haskell
} words of the text of the articles - >>> arts <- readNonDuplicatedArticles (exDir ++ artJSON) - we can convert the documents into arrays of length n and populate those arrays How many arrays do you have? What is the length of the arrays, n? Thoughts? - BONUS -------------------------------------------------------...
module Y2018.M06.D20.Exercise where - Okay , we 're going to do cosine similarity , but to do cosine similarity , we need vector - sets to do the comparisons . Now , it 'd be great to have WordNet , but my $ cabal install wordnet fails with Ambiguous type variable ‘ t0 ’ arising from an operator section ...
b6686d1c65e8ec06ccfc82fb624f5a05ad81ac9c4fff27d5d77e7421bf8aa66e
Bike/hare
unknown.lisp
(in-package #:hare.ast) ;;; This is a pseudo-AST marking a parse failure, e.g. due to whether something is a macro being unknown . It will be change - class'd into a real AST . (defclass unknown (ast) ((%expr :initarg :expr :accessor expr) ;; the env is kept around to make reparsing later more convenient. (%...
null
https://raw.githubusercontent.com/Bike/hare/c9173f4b0fd82e79b94196714f8b02b96a823f75/ast/unknown.lisp
lisp
This is a pseudo-AST marking a parse failure, e.g. due to whether something the env is kept around to make reparsing later more convenient. Note that none of these transfer the type. When this function is used the UNKNOWN will probably not have one. But even if it did, change-class would just keep it where it is, ...
(in-package #:hare.ast) is a macro being unknown . It will be change - class'd into a real AST . (defclass unknown (ast) ((%expr :initarg :expr :accessor expr) (%env :initarg :env :accessor environment))) Mutate an UNKNOWN into being a real AST . (defgeneric transform-unknown (unknown ast) (:argument-prece...
c5c3cb663a58744710005a102998596c6ae5c1aafc368035a5f745dfcc27344a
HealthSamurai/stresty
core.clj
(ns stresty.operations.core (:require [zen.core :as zen] [stresty.actions.core :as acts] [stresty.matchers.core :as match] [stresty.sci] [stresty.format.core :as fmt] [stresty.operations.gen] [stresty.reports.core] [clojure.string :as...
null
https://raw.githubusercontent.com/HealthSamurai/stresty/d73771841ffc9899c5981f9981f5974744ac4170/src/stresty/operations/core.clj
clojure
(ns stresty.operations.core (:require [zen.core :as zen] [stresty.actions.core :as acts] [stresty.matchers.core :as match] [stresty.sci] [stresty.format.core :as fmt] [stresty.operations.gen] [stresty.reports.core] [clojure.string :as...
70a0033da2d26620623a8933a8eed1a8e1128e2753f36f48549456f7c9b0f353
GNOME/aisleriot
will-o-the-wisp.scm
AisleRiot - will_o_the_wisp.scm Copyright ( C ) 2001 < > ; ; 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) any later version. ; ; ...
null
https://raw.githubusercontent.com/GNOME/aisleriot/5ab7f90d8a196f1fcfe5a552cef4a4c1a4b5ac39/games/will-o-the-wisp.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
AisleRiot - will_o_the_wisp.scm Copyright ( C ) 2001 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (use-modules (aisleriot interface) (aisleriot ...
d00dc40d498c2b8adaa0a2d7f8c7205969605f77a0f5cd2df7405d3cb7283353
roburio/udns
dns_resolver_utils.mli
( c ) 2017 , 2018 , all rights reserved open Dns val scrub : ?mode:[ `Recursive | `Stub ] -> [ `raw ] Domain_name.t -> Packet.Question.qtype -> Packet.t -> ((Rr_map.k * [ `raw ] Domain_name.t * Dns_resolver_cache.rank * Dns_resolver_cache.res) list, Rcode.t) result * [ scrub ~mode bailiwick packet ] returns ...
null
https://raw.githubusercontent.com/roburio/udns/585c40933ac3d5eceb351f7edd3f45cf2615a9f8/resolver/dns_resolver_utils.mli
ocaml
* [invalid_soa name] returns a stub SOA for [name].
( c ) 2017 , 2018 , all rights reserved open Dns val scrub : ?mode:[ `Recursive | `Stub ] -> [ `raw ] Domain_name.t -> Packet.Question.qtype -> Packet.t -> ((Rr_map.k * [ `raw ] Domain_name.t * Dns_resolver_cache.rank * Dns_resolver_cache.res) list, Rcode.t) result * [ scrub ~mode bailiwick packet ] returns ...
ac93d70095c300c32cc4ef1fafe3411bf7e7437b77aee34aaefa507330d505e1
crisptrutski/matchbox
atom.cljc
(ns matchbox.atom (:require [clojure.walk :refer [postwalk]] [matchbox.core :as m] [matchbox.registry :as mr]) #?(:clj (:import (clojure.lang Atom)))) Shim CLJS - style prototypes into CLJ #?(:clj (defprotocol ISwap (-swap! [_ f] [_ f a] [_ f a b] ...
null
https://raw.githubusercontent.com/crisptrutski/matchbox/5bb9ba96f5df01bce302a8232f6cddd9d64a1d71/src/matchbox/atom.cljc
clojure
Watch strategies Proxy strategies Wrapper type Atom factories / decorators don't update if the ship has already sailed Atom coordination
(ns matchbox.atom (:require [clojure.walk :refer [postwalk]] [matchbox.core :as m] [matchbox.registry :as mr]) #?(:clj (:import (clojure.lang Atom)))) Shim CLJS - style prototypes into CLJ #?(:clj (defprotocol ISwap (-swap! [_ f] [_ f a] [_ f a b] ...
013788bc4befcc9c4afb209e48a53420543ed2e01b6b95f14bd38455b21f4ac0
hbr/fmlib
generic.mli
(** A Generic Parser where all parameters are customizable. *) open Fmlib_std.Interfaces module Make (Token: ANY) (State: ANY) (Expect: ANY) (Semantic: ANY) (Final: ANY): sig (** - [Token.t] Token type - [State.t] Type of the user state ...
null
https://raw.githubusercontent.com/hbr/fmlib/0c7b923605a211e9c706d427fb33c5ba40248321/src/parse/generic.mli
ocaml
* A Generic Parser where all parameters are customizable. * - [Token.t] Token type - [State.t] Type of the user state - [Expect.t] Type of syntax messages which are generated, when something has been expected but not found. - [Semantic.t] Type of semantic error messages. Trigger...
open Fmlib_std.Interfaces module Make (Token: ANY) (State: ANY) (Expect: ANY) (Semantic: ANY) (Final: ANY): sig module Parser: sig include Interfaces.PARSER with type token = Token.t and type final = Final.t ...
43038018f2273a1d11dd51e555605356959d3fa3d371a5ef2368b1dbc8ee59f4
puffnfresh/sonic2
Main.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # import qualified Codec.Compression.Kosinski as Kosinski import Control.Lens import Control.Monad.Except import Control.Monad.Reader import Control.Monad.State import...
null
https://raw.githubusercontent.com/puffnfresh/sonic2/0abc3e109a847582c2e16edb13e83e611419fc8a/Main.hs
haskell
# LANGUAGE FlexibleContexts # NTSC d2 = y_pos d5 = ($c,$d) or ($e,$f) - solidity type bit (L/R/B or top) a3 = delta-x for next location to check if current one is empty a4 = pointer to angle buffer returns relevant block ID in (a1) returns distance to left/right in d1 returns angle in (a4) d5 = ($c,$d) or...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # import qualified Codec.Compression.Kosinski as Kosinski import Control.Lens import Control.Monad.Except import Control.Monad.Reader import Control.Monad.State import Data.Array.Bounded import ...
15731c82eb7375f648ce71a041ddb569e510392298bad15098baf55a2485eeb4
bsansouci/reasonglexampleproject
gui.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/reasonglexampleproject/4ecef2cdad3a1a157318d1d64dba7def92d8a924/vendor/camlimages/examples/liv/gui.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1999 - 2004 , Institut National de Recherche en Informatique et en Automatique . $ I d : gui.ml , v 1.27 2008/02/19 12:44:04 furuse Exp $ open Gdk open GDraw open GMain let () = ignore @...
6a4479af50d12710d7934a61c53839b2aed52e1abdaf9f841a71a699885672b7
spurious/sagittarius-scheme-mirror
vector.scm
(import (rnrs) (util vector) (srfi :64)) (test-begin "Vector utilities") (test-equal '#(1 3 5) (vector-filter odd? '#(1 2 3 4 5))) (test-equal '#(1 3 5) (vector-remove even? '#(1 2 3 4 5))) (test-equal '(1) (vector-find (lambda (e) (equal? '(1) e)) '#(1 2 (1) (2)))) (test-end)
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/util/vector.scm
scheme
(import (rnrs) (util vector) (srfi :64)) (test-begin "Vector utilities") (test-equal '#(1 3 5) (vector-filter odd? '#(1 2 3 4 5))) (test-equal '#(1 3 5) (vector-remove even? '#(1 2 3 4 5))) (test-equal '(1) (vector-find (lambda (e) (equal? '(1) e)) '#(1 2 (1) (2)))) (test-end)
bb2415b1c0fd26ed68ebdf3872772925186943362d2483930d628f115679247a
avsm/eeww
aliases.ml
(* TEST * expect *) module C = Char;; C.chr 66;; module C' : module type of Char = C;; C'.chr 66;; module C3 = struct include Char end;; C3.chr 66;; [%%expect{| module C = Char - : char = 'B' module C' : sig external code : char -> int = "%identity" val chr : int -> char val escaped : char -> string...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/testsuite/tests/typing-modules/aliases.ml
ocaml
TEST * expect does not alias X sound, but should probably fail Applicative functors This works thanks to abbreviations PR#6307 ok should succeed too Counter example: why we need to be careful with PR#6307 keep alias fail (* if the above succeeded, one could break invariants should succeed! (...
module C = Char;; C.chr 66;; module C' : module type of Char = C;; C'.chr 66;; module C3 = struct include Char end;; C3.chr 66;; [%%expect{| module C = Char - : char = 'B' module C' : sig external code : char -> int = "%identity" val chr : int -> char val escaped : char -> string val lowercase_asci...
10d15bc902579aba7c6e227bafe4f3d9a4a725344517a8f9e54aa4b73e403a28
mbutterick/beautiful-racket
list.rkt
#lang racket/base (require br/define (for-syntax racket/base syntax/parse)) (provide (all-defined-out)) (define-macro (values->list EXPR) #'(call-with-values (λ () EXPR) list)) (define-syntax (push! stx) (syntax-parse stx [(_ ID:id VAL) #'(set! ID (cons VAL ID))])) (define-syntax (pop! stx) (...
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-lib/br/list.rkt
racket
#lang racket/base (require br/define (for-syntax racket/base syntax/parse)) (provide (all-defined-out)) (define-macro (values->list EXPR) #'(call-with-values (λ () EXPR) list)) (define-syntax (push! stx) (syntax-parse stx [(_ ID:id VAL) #'(set! ID (cons VAL ID))])) (define-syntax (pop! stx) (...
f0d9384a663735d243bdebeaeaf57af86442ede55026b78ce440fb12da4f2d1d
ExtremaIS/ttc-haskell
invalid.hs
------------------------------------------------------------------------------ -- | -- Module : Main -- Description : example of compile-time validation error Copyright : Copyright ( c ) 2019 - 2022 License : MIT -- -- 'TTC.valid' is used to create validated constants. The sample username -- is (in)...
null
https://raw.githubusercontent.com/ExtremaIS/ttc-haskell/283ca48904f7e94905cc5b2f59abf9bad75a3bff/examples/invalid/invalid.hs
haskell
---------------------------------------------------------------------------- | Module : Main Description : example of compile-time validation error 'TTC.valid' is used to create validated constants. The sample username is (in)validated at compile-time. -------------------------------------------------------...
Copyright : Copyright ( c ) 2019 - 2022 License : MIT # LANGUAGE TemplateHaskell # module Main (main) where import qualified Data.TTC as TTC import Username (Username) sample :: Username sample = $$(TTC.valid "bad-username") main :: IO () main = print sample
65234091015bc4bccceb29c88860013eeaa0dc5011efde4166363245cd6b602f
robrix/sequoia
Implicative.hs
module Sequoia.Connective.Implicative ( elimFun , funPar1 , funPar2 -- * Connectives , module Sequoia.Connective.Function , module Sequoia.Connective.Subtraction ) where import Fresnel.Iso import Sequoia.Connective.Function import Sequoia.Connective.Not import Sequoia.Connective.Par import Sequoia.Connective.Subtrac...
null
https://raw.githubusercontent.com/robrix/sequoia/1895ab90eb2fd7332ffb901fd8d932ad7637a695/src/Sequoia/Connective/Implicative.hs
haskell
* Connectives > (b •)) p)
module Sequoia.Connective.Implicative ( elimFun , funPar1 , funPar2 , module Sequoia.Connective.Function , module Sequoia.Connective.Subtraction ) where import Fresnel.Iso import Sequoia.Connective.Function import Sequoia.Connective.Not import Sequoia.Connective.Par import Sequoia.Connective.Subtraction import Sequoia...
dff76ff9a3e077ea3cd5a4d4c8752a0bc0cbe803a4095bae3683e499ce9ca875
ragkousism/Guix-on-Hurd
qt.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 , 2017 < > Copyright © 2016 , 2017 ng0 < > Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/qt.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 © 2013 , 2014 , 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 , 2017 < > Copyright © 2016 , 2017 ng0 < > Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public...
8bd3287ea9591cfa4835283005873a8f192bafa333483692a6c867a7b4a912f2
khigia/eocarve
seamcarving.ml
* seamcarve , content - aware image resizing using seam carving * Copyright ( C ) 2007 < > * * 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...
null
https://raw.githubusercontent.com/khigia/eocarve/8a5f65b8175b27bfc0d792719485b5d31b72760a/seamcarve/seamcarving.ml
ocaml
(* slower routine which uses the avg color for the mid pixel hack to avoid caml_modify: pretend row is an int array so * caml_modify isn't used. This is safe as long as no new objects are * inserted in row (notably, the average_color thing above would crash * this). If anybody else mod...
* seamcarve , content - aware image resizing using seam carving * Copyright ( C ) 2007 < > * * 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...
64773661d9c4ab8766ae0339f0b15824cd12b3ca8187f70ff17dc62f8679c9bb
lukehoersten/activitypub
Properties.hs
module Network.ActivityPub.Vocabulary.Properties where import Data.Either (Either) import Data.Text (Text) import Data.Time (NominalDiffTime, UTCTime) import Data.Word (Word) import Network.URI (URI) data Unit = Cm | Feed | Inches | Km | M | Miles deriving (Show...
null
https://raw.githubusercontent.com/lukehoersten/activitypub/b10e19f08b854b0c2aef768a8c972bcf61911c3a/src/Network/ActivityPub/Vocabulary/Properties.hs
haskell
[BCP47] Language Tag MIME Media Type [RFC5988] or [HTML5] Link Relation
module Network.ActivityPub.Vocabulary.Properties where import Data.Either (Either) import Data.Text (Text) import Data.Time (NominalDiffTime, UTCTime) import Data.Word (Word) import Network.URI (URI) data Unit = Cm | Feed | Inches | Km | M | Miles deriving (Show...
0ab29a350ee4d7c876b3b221635ec1c6a50292024c213e642bc02d691284b475
MichelBoucey/IPv6DB
Types.hs
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # module Network.IPv6DB.Types where import Data.Aeson as A import qualified Data.Text as T import qualified Data.Vector as V import Text.IPv6Addr newtype Addresses = Addresses [IPv6Ad...
null
https://raw.githubusercontent.com/MichelBoucey/IPv6DB/27f3f30264c2a890d364eb679c3a93cd3314075d/src/Network/IPv6DB/Types.hs
haskell
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # module Network.IPv6DB.Types where import Data.Aeson as A import qualified Data.Text as T import qualified Data.Vector as V import Text.IPv6Addr newtype Addresses = Addresses [IPv6Ad...
252521601650b6d3f5278a3ce4780605b6e703d37eb3b1785f91b2e0518422b4
nikita-volkov/rebase
Semigroupoid.hs
module Rebase.Data.Semigroupoid ( module Data.Semigroupoid ) where import Data.Semigroupoid
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Semigroupoid.hs
haskell
module Rebase.Data.Semigroupoid ( module Data.Semigroupoid ) where import Data.Semigroupoid
e8d64ae039366cbc7f94feddf1f232a2cc59648993f2d41751fa276ecaf744d1
vmchale/kempe
Warning.hs
{-# LANGUAGE OverloadedStrings #-} module Kempe.Error.Warning ( Warning (..) ) where import Control.Exception (Exception) import Data.Semigroup ((<>)) import Data.Typeable (Typeable) import Kempe.AST import Kempe.Name import ...
null
https://raw.githubusercontent.com/vmchale/kempe/b757170aeebd1098d1c99c8724ef200ef75b854e/src/Kempe/Error/Warning.hs
haskell
# LANGUAGE OverloadedStrings #
module Kempe.Error.Warning ( Warning (..) ) where import Control.Exception (Exception) import Data.Semigroup ((<>)) import Data.Typeable (Typeable) import Kempe.AST import Kempe.Name import Prettyprinter (Pretty (pretty)...
7fda9f43ca5bae8a8362b5f5577a65b1bf390ba56685d08943675011067e51c4
dannypsnl/racket-llvm
optimization.rkt
#lang racket (require racket-llvm) ; let's create an if-else function (define mod (llvm-module "optimizeMe")) (define eng (llvm-create-execution-engine-for-module mod)) (llvm-link-in-mcjit) (define builder (llvm-builder-create)) (define if-func (llvm-add-function mod "if" ...
null
https://raw.githubusercontent.com/dannypsnl/racket-llvm/37392dcf7a48744eceac700c89d7dffb4122a36a/examples/optimization.rkt
racket
let's create an if-else function let's do an optimization pass
#lang racket (require racket-llvm) (define mod (llvm-module "optimizeMe")) (define eng (llvm-create-execution-engine-for-module mod)) (llvm-link-in-mcjit) (define builder (llvm-builder-create)) (define if-func (llvm-add-function mod "if" (llvm-...
76e69f0393cc655dd1de3eab4ef5fb5164c041893a1c27d89c277c717c6f35a3
datodev/datodomvc
root.cljs
(ns datodomvc.client.components.root (:require [clojure.string :as string] [datascript :as d] [dato.db.utils :as dsu] [dato.lib.controller :as con] [dato.lib.core :as dato] [dato.lib.db :as db] [datodomvc.client.routes :as routes] [da...
null
https://raw.githubusercontent.com/datodev/datodomvc/f6d65b61e2fe135a27e870f9a9613f204ded09a9/src/cljs/datodomvc/client/components/root.cljs
clojure
Useful to show what's being rerendered (everything right now for The pull request is insertable as-is, so we don't need to do any pre-processing, just return the results. XXX: We're not picking up on the ref attr properly, so it's not actually insertable as-is. This can probably be moved love down the Dato stack...
(ns datodomvc.client.components.root (:require [clojure.string :as string] [datascript :as d] [dato.db.utils :as dsu] [dato.lib.controller :as con] [dato.lib.core :as dato] [dato.lib.db :as db] [datodomvc.client.routes :as routes] [da...
cbb5233298146ff91719e137b53decc8d3d3e7b1b980cb1a1356ebcbf0a3dadc
codedownio/sandwich
TestTimer.hs
# LANGUAGE TypeOperators # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE MonoLocalBinds # module Test.Sandwich.TestTimer where import Control.Concurrent import Control.Exception.Safe import Control.Monad.IO.Class import Control.Monad.Reader import Control.Monad.Trans.State import qualified Data.A...
null
https://raw.githubusercontent.com/codedownio/sandwich/9c8f56b5aee94ba65c70b3e52bde8959010aecc1/sandwich/src/Test/Sandwich/TestTimer.hs
haskell
# LANGUAGE ConstraintKinds # * User functions | Time a given action with a given event name. This name will be the "stack frame" of the given action in the profiling results. This function will use the current timing profile name. | Time a given action with a given profile name and event name. Use when you want to m...
# LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE MonoLocalBinds # module Test.Sandwich.TestTimer where import Control.Concurrent import Control.Exception.Safe import Control.Monad.IO.Class import Control.Monad.Reader import Control.Monad.Trans.State import qualified Data.Aeson as A import qualified Data.B...
1a42890088b3e37cd674ae82105c03130537da1254636f4a8286ce25367ba681
dpiponi/Moodler
snare_drum.hs
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane audio_id0 <- new' "audio_id" audio_saw1 <- new' "audio_saw" audio_sin2 <- new' "audio_sin" audio_square3 <- new' "audio_square" audio_triangle4 <- new' "audio_triangle" butterbp5 <- new' "bu...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/snare_drum.hs
haskell
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane audio_id0 <- new' "audio_id" audio_saw1 <- new' "audio_saw" audio_sin2 <- new' "audio_sin" audio_square3 <- new' "audio_square" audio_triangle4 <- new' "audio_triangle" butterbp5 <- new' "bu...
300aaf9e1f8fc1073f2b82a88214192d02a39b6d8251ec87bd734fd807de5143
clash-lang/clash-compiler
Main.hs
# LANGUAGE CPP # # LANGUAGE QuasiQuotes # {-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified Clash.Util.Interpolate as I import Clash.Annotations.Primitive (HDL(..)) import qualified Data.Text as Text import Data.Default (def) import ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/222462d3f21d0851d762c355ee242e44f94f0aef/tests/Main.hs
haskell
# LANGUAGE OverloadedStrings # Directory clash binary is expected to live in XXX: Hardcoded override by setting @store_dir@ to point to local cabal installation. | See 'compiledWith' | Detects Clash binary the testsuite should use (in order): 'clash' without extra arguments. | `clashTestGroup` and `clashTestRo...
# LANGUAGE CPP # # LANGUAGE QuasiQuotes # module Main (main) where import qualified Clash.Util.Interpolate as I import Clash.Annotations.Primitive (HDL(..)) import qualified Data.Text as Text import Data.Default (def) import Data.List ((\\)...
fa9df1440c21a304c35e7cebaea1a5f6f26ece0eb6f6757c17b805cd60513c63
joinr/spork
grid.clj
Grids come up a lot in algorithms , game development , and data structures . ;;You have some abstract notion of a set of containers, indexed by a coordinate, ;;that are fully connected to surrounding containers. Upddate Feb 2017 - EXPERIMENTAL (ns spork.data.grid (:require [spork.protocols.core :refer :all] ...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/data/grid.clj
clojure
You have some abstract notion of a set of containers, indexed by a coordinate, that are fully connected to surrounding containers. up-right up-left down-right down-left grow the next dimension by expanding our accumulated dimension in the grid, connectedness is implied. To keep the arc storage down, we compute conne...
Grids come up a lot in algorithms , game development , and data structures . Upddate Feb 2017 - EXPERIMENTAL (ns spork.data.grid (:require [spork.protocols.core :refer :all] [spork.util [vectors :as v] [vecmath :as vmath]])) (defn set-grid [m k & [v]] (if (contains? m k) m (...
38d727046c31e1d658bd8fcbe2016e5d730bcfa60e94cc1a2d47a6b1e962aed4
Haskell-Things/ImplicitCAD
extopenscad.hs
{- ORMOLU_DISABLE -} Implicit CAD . Copyright ( C ) 2011 , ( ) Copyright ( C ) 2014 2015 , ( ) Copyright ( C ) 2014 2016 , ( ) -- Released under the GNU GPL, see LICENSE An interpreter to run extended OpenScad code . outputs STL , OBJ , SVG , SCAD , PNG , DXF , or GCODE . -- Allow us to use string li...
null
https://raw.githubusercontent.com/Haskell-Things/ImplicitCAD/f01a6a49b7f43546185f6ce865fd117b4bf1c897/programs/extopenscad.hs
haskell
ORMOLU_DISABLE Released under the GNU GPL, see LICENSE Allow us to use string literals for Text # LANGUAGE OverloadedStrings # Let's be explicit about what we're getting from where :) Our Extended OpenScad interpreter Use default values when a Maybe is Nothing. The definition of the symbol type, so we can acces...
Implicit CAD . Copyright ( C ) 2011 , ( ) Copyright ( C ) 2014 2015 , ( ) Copyright ( C ) 2014 2016 , ( ) An interpreter to run extended OpenScad code . outputs STL , OBJ , SVG , SCAD , PNG , DXF , or GCODE . import Prelude (Maybe(Just, Nothing), IO, Bool(True, False), FilePath, String, (<>), ($), ...
e0f29ea02c954851a707837cb9d9ab3718c1b87742aa6bb1cbbf7bba16c9dcec
me-box/core-network
dns_service.ml
open Lwt.Infix let dns = Logs.Src.create "dns" ~doc:"Dns service" module Log = (val Logs_lwt.src_log dns : Logs_lwt.LOG) let pp_ip = Ipaddr.V4.pp_hum let is_dns_query = let open Frame in function | Ipv4 { payload = Udp { dst = 53; _ }; _ } | Ipv4 { payload = Tcp { dst = 53; _ }; _ } -> true | _ -> false let i...
null
https://raw.githubusercontent.com/me-box/core-network/3dca69bc7610ab51f93ea49dcc3d8e43842cd2ae/lib/dns_service.ml
ocaml
using system resolver
open Lwt.Infix let dns = Logs.Src.create "dns" ~doc:"Dns service" module Log = (val Logs_lwt.src_log dns : Logs_lwt.LOG) let pp_ip = Ipaddr.V4.pp_hum let is_dns_query = let open Frame in function | Ipv4 { payload = Udp { dst = 53; _ }; _ } | Ipv4 { payload = Tcp { dst = 53; _ }; _ } -> true | _ -> false let i...
62b640c56f5bc5c098889f08a5b4b0e4db7f552ca8482e0cee9c87ab260e0389
learnuidev/patu
assets.cljs
(ns patu.examples.rpg.assets (:require [patu.core :as p])) (def main-map ["+++++++|++" "+ +" "+ a +" "+ +" "+ +" "+ $ +" "+ +" "+ +" "+ +" ...
null
https://raw.githubusercontent.com/learnuidev/patu/b3ea0138350f1063af976bec1a7a9a878d41c841/src/patu/examples/rpg/assets.cljs
clojure
(ns patu.examples.rpg.assets (:require [patu.core :as p])) (def main-map ["+++++++|++" "+ +" "+ a +" "+ +" "+ +" "+ $ +" "+ +" "+ +" "+ +" ...
fd575093638cc1b4c5f764ee23c07b6d27bbbe49e371f678f720a97cead6a129
repl-electric/cassiopeia
eta.clj
(ns cassiopeia.destination.eta "███████╗████████╗ █████╗ ██╔════╝╚══██╔══╝██╔══██╗ █████╗ ██║ ███████║ ██╔══╝ ██║ ██╔══██║ ███████╗ ██║ ██║ ██║ ...
null
https://raw.githubusercontent.com/repl-electric/cassiopeia/a42c01752fc8dd04ea5db95c8037f393c29cdb75/src/cassiopeia/destination/eta.clj
clojure
(stop) (t/stop)
(ns cassiopeia.destination.eta "███████╗████████╗ █████╗ ██╔════╝╚══██╔══╝██╔══██╗ █████╗ ██║ ███████║ ██╔══╝ ██║ ██╔══██║ ███████╗ ██║ ██║ ██║ ...
184c802b22ddbe479432fb061242ddd2fa586aaa8a173e6ebe95cb531c5c5366
mzp/coq-ide-for-ios
certificate.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/micromega/certificate.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * : A reflexive tactic using ...
8f49dfe800cdf3e3793eaceb1176fb9465a2e15d8c3e880c8ecf503c7945907b
wargrey/graphics
hsb.rkt
#lang typed/racket/base (provide (all-defined-out)) (require racket/math) (require "../misc.rkt") (define rgb->hue : (-> Flonum Flonum Flonum (Values Flonum Flonum Flonum Flonum)) (lambda [red green blue] (define-values (M m) (values (max red green blue) (min red green blue))) (define chroma : Flonum (- M...
null
https://raw.githubusercontent.com/wargrey/graphics/50751297f244a01ac734099b9a1e9be97cd36f3f/colorspace/digitama/hsb.rkt
racket
#lang typed/racket/base (provide (all-defined-out)) (require racket/math) (require "../misc.rkt") (define rgb->hue : (-> Flonum Flonum Flonum (Values Flonum Flonum Flonum Flonum)) (lambda [red green blue] (define-values (M m) (values (max red green blue) (min red green blue))) (define chroma : Flonum (- M...
ae5ed6c83fcc2b1025cdb7515c5e274b938742ea7c8460247f38ff623c18699a
debug-ito/greskell
NonEmptyLike.hs
-- | -- Module: Data.Greskell.NonEmptyLike -- Description: Class of non-empty containers Maintainer : < > -- @since 1.0.0.0 module Data.Greskell.NonEmptyLike ( NonEmptyLike (..) ) where import qualified Data.Foldable as F import Data.List.NonEmpty (NonEmpty (..)) import Data.Sem...
null
https://raw.githubusercontent.com/debug-ito/greskell/ff21b8297a158cb4b5bafcbb85094cef462c5390/greskell/src/Data/Greskell/NonEmptyLike.hs
haskell
| Module: Data.Greskell.NonEmptyLike Description: Class of non-empty containers | Make a container with a single value. | 'append' is '<>' from 'Semigroup'. | 'append' is '<>' from 'Semigroup'. | 'append' is '<>' from 'Semigroup'.
Maintainer : < > @since 1.0.0.0 module Data.Greskell.NonEmptyLike ( NonEmptyLike (..) ) where import qualified Data.Foldable as F import Data.List.NonEmpty (NonEmpty (..)) import Data.Semigroup (Semigroup, (<>)) import qualified Data.Semigroup as S | Non - empty conta...
140de244890182659414d1408e19b7563922d82e1369eb0edd8ce71880808db3
onedata/op-worker
storage_import_deletion.erl
%%%------------------------------------------------------------------- @author ( C ) 2019 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%%-------------------------------------------------------------------- %%% @doc %%% This module is responsible for detecting w...
null
https://raw.githubusercontent.com/onedata/op-worker/e0f8d666ff664a558050d1fc8f0e33f939a18030/src/modules/storage/import/storage_import_deletion.erl
erlang
------------------------------------------------------------------- -------------------------------------------------------------------- @doc This module is responsible for detecting which files in the space with enabled auto storage import mechanism were deleted on storage and therefore should be deleted from the ...
@author ( C ) 2019 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(storage_import_deletion). -author("Jakub Kudzia"). -include("modules/fslogic/fslogic_common.hrl"). -include("modules/fslogic/data_access_control.hrl"). -include("proto/oneclient/fuse_messag...
ad75bfd1ad17a25d3906d5d01f7a6d0cc58852cee7d508840f8aa344e1a4d2b5
2600hz/kazoo
kzd_dialplans.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc 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 /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_dialplans.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz 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 /. -module(kzd_dialplans). -export([new/0]). -export([system/1, system/2, set_system/2]). -include("kz_documents.h...
8d65c0da1c3445b0ec90bd54c10b47139aeed9cd20773d81e656c84870559058
cl-axon/shop2
state-utils.lisp
-*- Mode : common - lisp ; package : ; -*- ;;; Version : MPL 1.1 / GPL 2.0 / LGPL 2.1 ;;; 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 ;;; / ;;; ...
null
https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/common/state-utils.lisp
lisp
package : ; -*- 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 Licens...
Version : MPL 1.1 / GPL 2.0 / LGPL 2.1 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 SHOP2 . The Initial Developer of the Original Code is the University of Maryland . Portions created by the I...
4b90b104eec0779b081f68b77497402396dbe18c03b6d24841c9044798c4c4d8
ocaml/num
arith_status.mli
(**************************************************************************) (* *) (* OCaml *) (* *) , ...
null
https://raw.githubusercontent.com/ocaml/num/a635233b5c3da673e617de2cfe210fc869050e12/src/arith_status.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the val arith_status: unit -> unit val get_error_when_null_denominator : unit -> bool val set_error_when_null_denomi...
b917e574a0fc1f385077cd480eccad1166cae44159ff96972968d923121d66a8
ucsd-progsys/liquidhaskell
Fst01.hs
{-@ LIQUID "--expect-any-error" @-} -- TAG: measure test if the " builtin " fst and snd measures work . module Fst01 where @ splitter : : x : Int - > { v:(Int , Int ) | fst v + snd v = x + 1 } @ splitter :: Int -> (Int, Int) splitter x = (0, x) joiner :: Int -> Int {-@ joiner :: y:Int -> {v:Int | v = y} @-} join...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/measure/neg/Fst01.hs
haskell
@ LIQUID "--expect-any-error" @ TAG: measure @ joiner :: y:Int -> {v:Int | v = y} @
test if the " builtin " fst and snd measures work . module Fst01 where @ splitter : : x : Int - > { v:(Int , Int ) | fst v + snd v = x + 1 } @ splitter :: Int -> (Int, Int) splitter x = (0, x) joiner :: Int -> Int joiner y = a + b where (a, b) = splitter y
a2f55920915fc4476fca7a6d40f43bcc65ad5484ecd0c574cf1a67835157ffda
compiling-to-categories/concat
Polynomial.hs
# LANGUAGE UndecidableInstances # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ConstraintKinds #-} # OPTIONS_GHC -Wall # # OPTIONS_GHC -fno - warn - unused - imports # -- {-# OPTIONS_GHC -fno-warn-orphans #-} -- see orphans -- ...
null
https://raw.githubusercontent.com/compiling-to-categories/concat/49e554856576245f583dfd2484e5f7c19f688028/examples/src/ConCat/Polynomial.hs
haskell
# LANGUAGE ConstraintKinds # {-# OPTIONS_GHC -fno-warn-orphans #-} -- see orphans | Category of polynomials Vector-valued power series between free vector spaces Semantic function Semantic function TODO: finite representations. szero = point 0 unV . . toV mu (Series p) a = unV (vpower p (toV a))
# LANGUAGE UndecidableInstances # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -Wall # # OPTIONS_GHC -fno - warn - unused - imports # module ConCat.Polynomial where import Prelude hiding (id,(.),const,curry,uncurry) import ...
b46e2d64b40e4dfcda0c51b856d9aa2726912fa2a35e200dd52849ea6a22ca2c
footprintanalytics/footprint-web
info.clj
(ns metabase.api.info (:require [clojure.core.async :as a] [clojure.data :as data] [clojure.tools.logging :as log] [compojure.core :refer [DELETE GET POST PUT]] [medley.core :as m] [metabase.api.common :as api] [metabase.models.card...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d93dbf5f1627ad55c9172de1130603fcbe8398e9/src/metabase/api/info.clj
clojure
don't want default constraints overridding anything that's already there param `run` can be used to control how the query is ran, e.g. if you need to
(ns metabase.api.info (:require [clojure.core.async :as a] [clojure.data :as data] [clojure.tools.logging :as log] [compojure.core :refer [DELETE GET POST PUT]] [medley.core :as m] [metabase.api.common :as api] [metabase.models.card...
dfa96cf9704eaec9ba24bf4d7a946afc647f928814a7eb9d7403424fe553e967
Clozure/ccl-tests
format-s.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Aug 3 11:55:07 2004 ;;;; Contains: Test of the ~S format directive (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest format.s.1 (let ((*print-readably* nil) (*print-case* :upcase)) (format nil "~s" nil)) "NIL") (deftest formatter....
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/format-s.lsp
lisp
-*- Mode: Lisp -*- Contains: Test of the ~S format directive With colinc specified With minpad With padchar Other tests
Author : Created : Tue Aug 3 11:55:07 2004 (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest format.s.1 (let ((*print-readably* nil) (*print-case* :upcase)) (format nil "~s" nil)) "NIL") (deftest formatter.s.1 (let ((*print-readably* nil) (*print-case* :upcase)) (format...
f97546f66a9ebeb95a37b808a897f1dc3c9a513ba1a2ff8d61048eb520c3514d
mfikes/fifth-postulate
ns166.cljs
(ns fifth-postulate.ns166) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns166.cljs
clojure
(ns fifth-postulate.ns166) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
27665565f499e17d95d20715bdacebdb9d0c8327b93c669c4f6133c70f2b4cfe
angavrilov/ecl-compute
formula.lisp
;;; -*- mode:lisp; indent-tabs-mode: nil; -*- (defpackage formula (:documentation "A reader macro to support Waterloo Maple infix expressions in code") (:use "COMMON-LISP" "ALEXANDRIA" "LEXICAL-CONTEXTS") (:export "*INDEX-ACCESS-SYMBOL*" "ENABLE-EXPR-QUOTES")) (in-package formula) ;;; Symbol to use for array i...
null
https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/formula.lisp
lisp
-*- mode:lisp; indent-tabs-mode: nil; -*- Symbol to use for array indexing Allow underscores in identifiers ***** SCANNER ***** Read characters that match cond-p as a string Read a token from the stream Skip whitespace & require non-eof Number Exponent Allow sign after exponent Eat the actual digits Symbol ...
(defpackage formula (:documentation "A reader macro to support Waterloo Maple infix expressions in code") (:use "COMMON-LISP" "ALEXANDRIA" "LEXICAL-CONTEXTS") (:export "*INDEX-ACCESS-SYMBOL*" "ENABLE-EXPR-QUOTES")) (in-package formula) (defparameter *index-access-symbol* 'aref) (defun ident-char-p (c) (or (al...
1a8a95f1c5de90930b1d19350a2ddd318663086e9519a77d0742f62d897377cd
adrieng/pulsar
type.ml
This file is part of Pulsar , a temporal functional language . * Copyright ( C ) 2017 * * 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 ...
null
https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/pulsar-lib/type.ml
ocaml
Base types Types
This file is part of Pulsar , a temporal functional language . * Copyright ( C ) 2017 * * 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 ...
f4f088d9ac17ec7a8e204b0ed326b8272b942844bdc76489fd8eb3ec88524a83
tweag/lagoon
Cookie.hs
Copyright 2020 Pfizer Inc. 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 th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/server/src/Lagoon/Server/Servant/Cookie.hs
haskell
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 permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # OPTIONS_GHC -fno - warn - orphans # module Lagoon.Server.Servant.Cookie (ServerWithCookie(..)) where import Network.HTTP.Types (ok200) import ...
c9f1c6a5469dd211ff44855a82d30776bb7e51fe546cfa476b2e4973b654db56
xh4/web-toolkit
comparison.lisp
(in-package #:local-time.test) (defsuite* (comparison :in simple)) (defmacro defcmptest (comparator-name &body args) `(deftest ,(symbolicate 'test/simple/comparison/ comparator-name) () (flet ((make (day &optional (sec 0) (nsec 0)) (make-timestamp :day day :sec sec :nsec nsec))) ,@(loop ...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/local-time-20190710-git/test/comparison.lisp
lisp
(in-package #:local-time.test) (defsuite* (comparison :in simple)) (defmacro defcmptest (comparator-name &body args) `(deftest ,(symbolicate 'test/simple/comparison/ comparator-name) () (flet ((make (day &optional (sec 0) (nsec 0)) (make-timestamp :day day :sec sec :nsec nsec))) ,@(loop ...
11843dc960bff51281b0d215b3543328437c2003ad3ca3ece0e9ccd7a8af1c96
melisgl/try
package.lisp
(mgl-pax:define-package #:try-test (:use #:common-lisp #:alexandria #:try))
null
https://raw.githubusercontent.com/melisgl/try/a37c61f8b81d4bdf38f559bca54eef3868bb87a1/test/package.lisp
lisp
(mgl-pax:define-package #:try-test (:use #:common-lisp #:alexandria #:try))
412d41a19cb1f61963aea767ca70842530e5a64b95612fe86685d50a46d53cea
lisp-korea/sicp2014
ex-2-59.scm
ex 2.59 (define (element-of-set? x set) (cond ((null? set) #f) ((equal? x (car set)) #t) (else (element-of-set? x (cdr set))))) (define (adjoin-of-set x set) (if (element-of-set? x set) set (cons x set))) (define (intersection-set set1 set2) (cond ((or (null? set1) (null? set2)) '()) ...
null
https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/vvalkyrie/2.3/ex-2-59.scm
scheme
=> (1 2 3 4 5 6)
ex 2.59 (define (element-of-set? x set) (cond ((null? set) #f) ((equal? x (car set)) #t) (else (element-of-set? x (cdr set))))) (define (adjoin-of-set x set) (if (element-of-set? x set) set (cons x set))) (define (intersection-set set1 set2) (cond ((or (null? set1) (null? set2)) '()) ...
38b58d36912fd79a23fad02d6b138a93590163a88a7c75f88f2607f1c51e8c2a
SquidDev/urn
alist.lisp
(import core/prelude ()) (defun assoc (list key or-val) "Return the value given by KEY in the association list LIST, or, in the case that it does not exist, the value OR-VAL, which can be nil. ### Example: ```cl > (assoc '((\"foo\" 1) (\"bar\" 2)) \"foo\" \"?\") out = 1 > (assoc '((\"foo\" 1) (\"b...
null
https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/data/alist.lisp
lisp
(import core/prelude ()) (defun assoc (list key or-val) "Return the value given by KEY in the association list LIST, or, in the case that it does not exist, the value OR-VAL, which can be nil. ### Example: ```cl > (assoc '((\"foo\" 1) (\"bar\" 2)) \"foo\" \"?\") out = 1 > (assoc '((\"foo\" 1) (\"b...
103367329551b23c4df558e3ec46e0d9f1b71059ee82356ed772d61bf038c470
WorksHub/client
subs.cljc
(ns wh.promotions.create-promotion.subs (:require [clojure.set :as set] [re-frame.core :refer [reg-sub reg-sub-raw]] [wh.common.blog :as blog] [wh.common.job :as job] [wh.common.subs] [wh.promotions.create-promotion.db :as db] [wh.re-frame.subs :...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/promotions/create_promotion/subs.cljc
clojure
use some-> to make sure data is here, and we do not try to process absent data create qualified keyword from object type: #{::issue ::job ::company ::article}
(ns wh.promotions.create-promotion.subs (:require [clojure.set :as set] [re-frame.core :refer [reg-sub reg-sub-raw]] [wh.common.blog :as blog] [wh.common.job :as job] [wh.common.subs] [wh.promotions.create-promotion.db :as db] [wh.re-frame.subs :...
a4648dfb6ea50f1db9d1c9a1234c2014478df48c37ec4177fa0326d429e4a63d
travisbrady/flajolet
card.ml
* Simple example utility * reads strings from stdin and when done prints the count of unique * strings stdin to stdout * A bit like cat somefile.txt | sort -u | wc -l * Simple example utility * reads strings from stdin and when done prints the count of unique * strings stdin to stdout * A bit like ca...
null
https://raw.githubusercontent.com/travisbrady/flajolet/a6c530bf1dd73b9fa8b7185d84a5e20458a3d8af/examples/card.ml
ocaml
* Simple example utility * reads strings from stdin and when done prints the count of unique * strings stdin to stdout * A bit like cat somefile.txt | sort -u | wc -l * Simple example utility * reads strings from stdin and when done prints the count of unique * strings stdin to stdout * A bit like ca...