_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
a7af5b2c792da2c81926acb3eb7d525f18b6391f2888e8129e3b13f6e9bd0bf1
lilyball/projecteuler-ocaml
prob25.ml
The Fibonacci sequence is defined by the recurrence relation : F_{n } = F_{n-1 } + F_{n-2 } , where F_{1 } = 1 and F_2 = { 1 } . Hence the first 12 terms will be : F_{1 } = 1 F_{2 } = 1 F_{3 } = 2 F_{4 } = 3 F_{5 } = 5 F_{6 } = 8 F_{7 } = 13 F_{8 ...
null
https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/prob25.ml
ocaml
[binary_search f x y] performs a binary search of the integers from [x] to [y] if f returns a negative number then the current index is too low if f returns a positive number then the current index is too high
The Fibonacci sequence is defined by the recurrence relation : F_{n } = F_{n-1 } + F_{n-2 } , where F_{1 } = 1 and F_2 = { 1 } . Hence the first 12 terms will be : F_{1 } = 1 F_{2 } = 1 F_{3 } = 2 F_{4 } = 3 F_{5 } = 5 F_{6 } = 8 F_{7 } = 13 F_{8 ...
050001aa8fb833cc25026094623241f64279b041c15943f8522a1ac9169adf98
jkk/clojuresphere
util.clj
(ns clojuresphere.util (:use [clojure.walk :only [keywordize-keys]]) (:require [clojure.java.io :as io] [cheshire.core :as json])) (def ^:dynamic *req* nil) (defn wrap-request [handler] (fn [req] (binding [*req* req] (handler req)))) (defn wrap-ajax-detect [handler] (fn [req] (handl...
null
https://raw.githubusercontent.com/jkk/clojuresphere/a2b53ed2d9d37d194df3827b64665b3afd1873d2/src/clojuresphere/util.clj
clojure
(ns clojuresphere.util (:use [clojure.walk :only [keywordize-keys]]) (:require [clojure.java.io :as io] [cheshire.core :as json])) (def ^:dynamic *req* nil) (defn wrap-request [handler] (fn [req] (binding [*req* req] (handler req)))) (defn wrap-ajax-detect [handler] (fn [req] (handl...
b0d385046ddd5aab4cd0c85ae48a6bc5d304ce558abfe8481be162adba4f425a
spurious/chibi-scheme-mirror
config.scm
;; config.scm -- general configuration management Copyright ( c ) 2012 . All rights reserved . ;; BSD-style license: ;;> This is a library for unified configuration management. ;;> Essentially it provides an abstract collection data type for > looking up named values , two or more of which can be chained ;;> to...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/config.scm
scheme
config.scm -- general configuration management BSD-style license: > This is a library for unified configuration management. > Essentially it provides an abstract collection data type for > together. Values from more recent collections can be preferred as > with an environment, or the values at multiple levels can b...
Copyright ( c ) 2012 . All rights reserved . > looking up named values , two or more of which can be chained > \table[(@ ( border 1 ) ( style border - collapse : collapse ) ( width " 100 % " ) ) ] { > \tr{\td{config files } > dotted values . Disambiguation is handled as with two separate > \table[(@ ( border...
40e30e84659b48bb2d0c49348d66db94c79882f846b0a68f742e7bfd94119c49
sgbj/MaximaSharp
commac.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;;;; Copyright ( c ) 1984,1987 by , University of Texas ; ; ; ; ; ;;; A...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/commac.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;; ; ; ; ; All rights reserved ;;;;; Should we give this a different name? would probably be better to replace uses of ml-typep ...
(in-package :maxima) (defmacro defun-prop (f arg &body body) (assert (listp f)) #+gcl (eval-when (eval) (compiler::compiler-def-hook (first f) body)) `(setf (get ',(first f) ',(second f)) #'(lambda ,arg ,@body))) a function called instead of prin1 . (defvar *fortran-print* nil "Tells EXPLODEN we are printin...
0018bc7c4a8015799211994927b24bac9944f15c54b3943c5ac13f7107f7bc35
l29ah/hyborg
RPC.hs
# LANGUAGE DeriveGeneric , OverloadedStrings , ScopedTypeVariables , Strict # module RPC ( RPCHandle , repoManifest , openRPC , openPseudoRPC , open , get , put , commit ) where import Conduit import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Data.ByteString (ByteString) ...
null
https://raw.githubusercontent.com/l29ah/hyborg/50f4b896699cb834d9481f783f5e70b7a9a2d66e/RPC.hs
haskell
# LANGUAGE DeriveGeneric , OverloadedStrings , ScopedTypeVariables , Strict # module RPC ( RPCHandle , repoManifest , openRPC , openPseudoRPC , open , get , put , commit ) where import Conduit import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Data.ByteString (ByteString) ...
c86f4f5feabf1c150143cb9b1a08a74dbcbf5ad876109e4d892abbbaddf66e23
clojure-finance/clojask
clojask_groupby.clj
(ns clojask.clojask-groupby (:require [clojask.groupby :refer [output-groupby]] [onyx.peer.function :as function] [onyx.plugin.protocols :as p] [clojure.set :as set] [taoensso.timbre :refer [debug info] :as timbre]) (:import (java.io BufferedReader FileReader Buffered...
null
https://raw.githubusercontent.com/clojure-finance/clojask/1cf122efb05370cacd5412f070cdf6890d9aa2e4/src/main/clojure/clojask/clojask_groupby.clj
clojure
(reset! output-func out) Map of lifecycle calls that are required to use this plugin. Users will generally always have to include these in their lifecycle calls when submitting the job. Nothing is required here. However, most plugins have resources (e.g. a connection) to clean up. Mind that such cleanup is also ...
(ns clojask.clojask-groupby (:require [clojask.groupby :refer [output-groupby]] [onyx.peer.function :as function] [onyx.plugin.protocols :as p] [clojure.set :as set] [taoensso.timbre :refer [debug info] :as timbre]) (:import (java.io BufferedReader FileReader Buffered...
bc945320ebcad529e5a2306fa0bc971af3a73048d97e70bed35fa601b170883a
mstksg/inCode
ne-trie.hs
#!/usr/bin/env stack -- stack --install-ghc ghci --package recursion-schemes --package nonempty-containers --package containers --package these --resolver nightly-2019-01-03 {-# LANGUAGE DeriveFunctor #-} # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # {-# LAN...
null
https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/trie/ne-trie.hs
haskell
stack --install-ghc ghci --package recursion-schemes --package nonempty-containers --package containers --package these --resolver nightly-2019-01-03 # LANGUAGE DeriveFunctor # # LANGUAGE PatternSynonyms # insertAlg :: v -> TrieF k v ([k] -> Trie k v) -> [k] -> Trie...
#!/usr/bin/env stack # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wall # # OPTIONS_GHC -Werror = incomplete - patterns # import Data.Foldable import Data.Functor.Foldable...
63b4145b9cfbb9912b4b6d3564111cbab84616ce054582ad54c03d2fd6c8669e
frankiesardo/route-swagger
interceptor.clj
(ns route-swagger.interceptor (:require [route-swagger.doc :as doc] [route-swagger.schema :as schema] [ring.util.response :refer [response resource-response redirect]] [ring.swagger.swagger2 :as spec] [ring.util.http-status :as status])) (defn- default-json-converter [...
null
https://raw.githubusercontent.com/frankiesardo/route-swagger/8ebab45d03cb43fdec323b955f5ae4c152814d39/src/route_swagger/interceptor.clj
clojure
"))
(ns route-swagger.interceptor (:require [route-swagger.doc :as doc] [route-swagger.schema :as schema] [ring.util.response :refer [response resource-response redirect]] [ring.swagger.swagger2 :as spec] [ring.util.http-status :as status])) (defn- default-json-converter [...
03f336ca413d9cd59064e0a259b6fedcf44a541b06d0bb1607f60e5c81d365c6
janestreet/base
sexp_with_comparable.mli
_ This module is separated from Sexp to avoid circular dependencies as many things use s - expressions s-expressions *) * @inline include module type of struct include Sexp end include Comparable.S with type t := t
null
https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/src/sexp_with_comparable.mli
ocaml
_ This module is separated from Sexp to avoid circular dependencies as many things use s - expressions s-expressions *) * @inline include module type of struct include Sexp end include Comparable.S with type t := t
9aeea61e36666dad5c07bf2b09d2d3e978a9412f234287f775ea4b6845760ed5
AshleyYakeley/Truth
Context.hs
module Shapes.Test.Context ( ContextTestTree(..) , runContextTestTree , tGroup , tModify , tContext ) where import Shapes import Shapes.Test newtype ContextTestTree c = MkContextTestTree (c -> TestTree) runContextTestTree :: c -> ContextTestTree c -> TestTree runContextTestTree c (MkConte...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/d704b8baaa77dac002922eccecdd91018c4b7eef/Changes/shapes/src/Shapes/Test/Context.hs
haskell
module Shapes.Test.Context ( ContextTestTree(..) , runContextTestTree , tGroup , tModify , tContext ) where import Shapes import Shapes.Test newtype ContextTestTree c = MkContextTestTree (c -> TestTree) runContextTestTree :: c -> ContextTestTree c -> TestTree runContextTestTree c (MkConte...
461a435a5d5203421aeb7fe29b0ff3b127a6d057061179ea4885dce696c94531
KingoftheHomeless/in-other-words
ErrorIO.hs
# LANGUAGE DerivingVia # module Control.Effect.ErrorIO ( -- * Effects ErrorIO(..) , X.Exception(..) , SomeException -- * Actions , throwIO , catchIO -- * Interpretations , errorIOToIO , errorIOToError -- * MonadCatch , C.MonadCatch -- * Carriers , ErrorIOToIOC , ErrorIOToErr...
null
https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/9c864c81beb4fdf71d363b6962db5c90275c57ef/src/Control/Effect/ErrorIO.hs
haskell
* Effects * Actions * Interpretations * MonadCatch * Carriers effect.
# LANGUAGE DerivingVia # module Control.Effect.ErrorIO ErrorIO(..) , X.Exception(..) , SomeException , throwIO , catchIO , errorIOToIO , errorIOToError , C.MonadCatch , ErrorIOToIOC , ErrorIOToErrorC ) where import Control.Effect import Control.Effect.Type.ErrorIO import Control.Effect.Typ...
dcf670819e61c6be1a4588682b3bd5532034d61d7d78752ecbb842beb1575ac6
asivitz/Hickory
View.hs
# LANGUAGE OverloadedLabels # # LANGUAGE FlexibleContexts # module Hickory.FRP.Editor.View where import qualified Hickory.Graphics as H import Hickory.Color (rgba, black, green, red, blue) import Hickory.Math (mkScale, mkRotation, mkTranslation, Scalar, v2angle) import Hickory.Types (Size (..)) import Linear (V3 (..)...
null
https://raw.githubusercontent.com/asivitz/Hickory/d266f581a3fa3d3569420486fe6cebd105acfdae/FRP/Hickory/FRP/Editor/View.hs
haskell
censor hangs for some reason. so we run/write back
# LANGUAGE OverloadedLabels # # LANGUAGE FlexibleContexts # module Hickory.FRP.Editor.View where import qualified Hickory.Graphics as H import Hickory.Color (rgba, black, green, red, blue) import Hickory.Math (mkScale, mkRotation, mkTranslation, Scalar, v2angle) import Hickory.Types (Size (..)) import Linear (V3 (..)...
e69afd1961ddd1fa24ca099c1537ac1e8cfb19389530499fafc6db3fd3e145e4
zellerin/http2
server.lisp
Copyright 2022 , 2023 by (in-package http2) (defun threaded-dispatch (fn tls-stream &rest pars) "When used as *dispatch-fn* callback, open a new thread for a connection and handle it there. Technically, apply FN-AND-PARS in a new thread." (bt:make-thread (lambda () (logger "Dispatching th...
null
https://raw.githubusercontent.com/zellerin/http2/6b3216a2743d303686c3c94bacaee66abccd9d1e/tls/server.lisp
lisp
stream should be kept open here version 1.2 [TLS12] or higher for HTTP/2 +ssl-op-no-compression+ no renegotiation do not requiest client cert ignore condition ignore condition
Copyright 2022 , 2023 by (in-package http2) (defun threaded-dispatch (fn tls-stream &rest pars) "When used as *dispatch-fn* callback, open a new thread for a connection and handle it there. Technically, apply FN-AND-PARS in a new thread." (bt:make-thread (lambda () (logger "Dispatching th...
6677084818a3eeffe32a03982e26b2485e338640b64be2f31c6f7a309c8ce415
funimagej/fun.imagej
yolo_labeler.clj
@File(label="Filename of mesh",description="Filename should be stl " ) mesh - filename @Integer(label="Width " ) width ; @Integer(label="Height") height ; @Integer(label="Depth") depth @Context ctxt (ns plugins.Scripts.Plugins.FunImageJ.Annotation.yolo-labeler (:require [fun.imagej.img :as img] ...
null
https://raw.githubusercontent.com/funimagej/fun.imagej/dcbe14581ba9394d8ecc6e254e02fac8130a942d/src/plugins/Scripts/Plugins/FunImageJ/Annotation/yolo_labeler.clj
clojure
@Integer(label="Height") height @Integer(label="Depth") depth Bindings for testing (ij1/show-imp voxelized-imp)
@File(label="Filename of mesh",description="Filename should be stl " ) mesh - filename @Integer(label="Width " ) width @Context ctxt (ns plugins.Scripts.Plugins.FunImageJ.Annotation.yolo-labeler (:require [fun.imagej.img :as img] [fun.imagej.core :as ij] [fun.imagej.ops :as ops] ...
166204161f33e85aac056b12884f10fe5dd98ee130e1e25d409d2d40ab6260cf
RyanGlScott/text-show
SemigroupSpec.hs
| Module : Spec . Data . : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : Provisional Portability : GHC @hspec@ tests for data types in the " Data . Semigroup " module . Module: Spec.Data.SemigroupSpec Copyright: (C) 2014-2017 Ry...
null
https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Spec/Data/SemigroupSpec.hs
haskell
| Module : Spec . Data . : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : Provisional Portability : GHC @hspec@ tests for data types in the " Data . Semigroup " module . Module: Spec.Data.SemigroupSpec Copyright: (C) 2014-2017 Ry...
d8bcfea5dd55146822c6ef6f9c4a95ea1687ec369e860ee30d1649ecf978f20f
xapi-project/xcp-rrdd
rrd_protocol_v2.ml
* 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/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/lib/transport/base/rrd_protocol_v2.ml
ocaml
Reading fields from cstructs. Replace the cached datasource's value with the value read * from the cstruct. Writing fields to cstructs. WARNING! This creates datasources from datasource metadata, hence the * values will be meaningless. The types however, will be correct. Check the header str...
* 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...
acf3968d8b85f5ee929dae3aab4bee4f4ffbce3ac7576197f72f84acb95a4fdd
racket/eopl
unifier.rkt
#lang eopl (require "lang.rkt") (require "data-structures.rkt") (require "substitutions.rkt") ;; this provides a new view of substitutions, in which unifier ;; replaces extend-env as a constructor. (provide unifier substitution? empty-subst apply-subst-to-type) ;; we'll maintain the invariant that no variable bound ...
null
https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter7/inferred/unifier.rkt
racket
this provides a new view of substitutions, in which unifier replaces extend-env as a constructor. we'll maintain the invariant that no variable bound in the substitution occurs in any of the right-hand sides of the substitution. the unifier ;;;;;;;;;;;;;;;; unifier : Type * Type * Subst * Exp -> Subst OR Fails ...
#lang eopl (require "lang.rkt") (require "data-structures.rkt") (require "substitutions.rkt") (provide unifier substitution? empty-subst apply-subst-to-type) Page : 264 (define unifier (lambda (ty1 ty2 subst exp) (let ((ty1 (apply-subst-to-type ty1 subst)) (ty2 (apply-subst-to-type ty2 subst))) ...
c3c9b696202a3f2cc03ad7fa4e9aace6f07462f4f1be6045b93feddf402659aa
facebook/pyre-check
taint.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/833eaf3ff7e20fdf1b2a35612a7caa0d9936184b/source/interprocedural_analyses/taint/taint.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
33dfa7d92feb7ede192975a5ffe54cf142c0d1552a69e4ba13b92b3efeb24d97
rescript-association/genType
ext_digest.ml
Copyright ( C ) 2019- Authors of BuckleScript * * 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 , either version 3 of the License , or * ( at your option ) any later vers...
null
https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/ext_digest.ml
ocaml
Copyright ( C ) 2019- Authors of BuckleScript * * 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 , either version 3 of the License , or * ( at your option ) any later vers...
05527c4e3c03f5d78797040a74ebc975c62128d63bae788b62a3dda95ed8d663
kind2-mc/kind2
lustreLexer.mli
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/lustre/lustreLexer.mli
ocaml
] and [ * Initialize the lexing function * Create a lexer reading from a stack of nested include files * Entry point for the lexer
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
6d16c2b60ccaf2388276f47a8914e6accea1ded541e2cedff5357cf6fc3eb5e9
facebook/duckling
NE.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 GADTs #-} module Duckling.Rules.NE ( defaultRules , langRules , localeRules ) where imp...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Rules/NE.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 GADTs #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Rules.NE ( defaultRules , langRules , localeRules ) where import Duckling.Dimensions.Types import Duckling.Locale import Duckling.Types import qualified Duckling.Numeral.NE.Rules as Numeral defaultRules :: Seal Dimension -> [Rule] defaultRule...
87208832d972df8008e0b33f033ec4f7509430845719ea42252d7b53e64926e6
owickstrom/wickstrom.tech
Checkout.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} module Checkout where import Control.Monad.IO.Class import Data.List.NonEmpty import Data.Text (Text) import qualified Data.Text as T type Price = Double data CartItem = CartItem { itemId ...
null
https://raw.githubusercontent.com/owickstrom/wickstrom.tech/5aa7d5f6ceda04597a5d935081e24251435df1ca/blog/src/_posts/Checkout.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleContexts # module Checkout where import Control.Monad.IO.Class import Data.List.NonEmpty import Data.Text (Text) import qualified Data.Text as T type Price = Double data CartItem = CartItem { itemId :: Text , itemPrice :: Price }...
09f3d4c31f22f43193d80c4a20d04c9c4069b9ff1c9df92b2db69a94a2c78c12
graninas/Functional-Design-and-Architecture
SimulatorSpec.hs
module Andromeda.SimulatorSpec where import Test.Hspec import Andromeda import qualified Andromeda.LogicControl.Domain as T import qualified Andromeda.LogicControl.Language as L import qualified Andromeda.Hardware.Language.Hdl as L import qualified Andromeda.Hardware.Language.DeviceControl as L import qualified And...
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/b6a78f80a2a2e0b913bcab1d2279fc137a90db4c/Second-Edition-Manning-Publications/BookSamples/CH08/Section8p1/test/Andromeda/SimulatorSpec.hs
haskell
module Andromeda.SimulatorSpec where import Test.Hspec import Andromeda import qualified Andromeda.LogicControl.Domain as T import qualified Andromeda.LogicControl.Language as L import qualified Andromeda.Hardware.Language.Hdl as L import qualified Andromeda.Hardware.Language.DeviceControl as L import qualified And...
16ea50f19a08284978bc26e1cdf2456b1493d31327b4e31f62234b445a995ab4
hachreak/stepflow
stepflow_config.erl
%%%------------------------------------------------------------------- @doc stepflow config %% @end %%%------------------------------------------------------------------- -module(stepflow_config). -author('Leonardo Rossi <>'). -export([ eval/1, load/1, run/1 ]). load(String) -> {ok, Tokens, _} = stepflow_...
null
https://raw.githubusercontent.com/hachreak/stepflow/4e0b2cec68343f24809a21b3bb1708baf805d04a/src/config/stepflow_config.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- link Private functions
@doc stepflow config -module(stepflow_config). -author('Leonardo Rossi <>'). -export([ eval/1, load/1, run/1 ]). load(String) -> {ok, Tokens, _} = stepflow_config_lexer:string(String), {ok, AllTokensParsed} = stepflow_config_parser:parse(Tokens), AllTokensParsed. eval(AllTokensParsed) -> {Result, _...
db22f9bb1776dce93de9842e12b9b9c4c242d0ef6696b423774b16c0893a0f00
nrnrnr/qc--
one02Syntax.mli
type exp = (allTypes) Syntax.bExp and allTypes = T__amode of t__amode | T__t of t__t and t__amode = Short of unit | Hword of unit | Word of unit | Dword of unit and t__t = Add of (exp * exp * exp) | Ld of (exp * exp) | St of (exp * exp) | Nop of unit val pprint : exp -> unit
null
https://raw.githubusercontent.com/nrnrnr/qc--/ec56191b669729e7ce8181a2bd97a912842ea716/tdpe/one02Syntax.mli
ocaml
type exp = (allTypes) Syntax.bExp and allTypes = T__amode of t__amode | T__t of t__t and t__amode = Short of unit | Hword of unit | Word of unit | Dword of unit and t__t = Add of (exp * exp * exp) | Ld of (exp * exp) | St of (exp * exp) | Nop of unit val pprint : exp -> unit
a9731df1327350383762b601d606a5e318e96d30fc96eeff8e1dfddb8967c995
VitalLabs/derive
project.clj
(defproject com.vitalreactor/derive "0.2.1" :description "Clojurescript library to support efficient computation of up to date values derived from a mutable data source. Designed to integrate with functional UI frameworks like Om and with data stores like Datascript and NativeStore" :url "" :license {:name "MIT ...
null
https://raw.githubusercontent.com/VitalLabs/derive/1febc1e382c90241f9d7e6bfe5243648408d6446/project.clj
clojure
(defproject com.vitalreactor/derive "0.2.1" :description "Clojurescript library to support efficient computation of up to date values derived from a mutable data source. Designed to integrate with functional UI frameworks like Om and with data stores like Datascript and NativeStore" :url "" :license {:name "MIT ...
f6944122555fe32df5bced720ca54efc96c5398eb2d9e8b14650de0c20e9b666
Ericson2314/lighthouse
HpcReport.hs
--------------------------------------------------------- The main program for the hpc - report tool , part of HPC . and , June 2006 --------------------------------------------------------- module HpcReport (report_plugin) where import System.Exit import Prelude hiding (exp) import System(getArgs) import Lis...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/utils/hpc/HpcReport.hs
haskell
------------------------------------------------------- ------------------------------------------------------- ----------------------------------------------------------------------------
The main program for the hpc - report tool , part of HPC . and , June 2006 module HpcReport (report_plugin) where import System.Exit import Prelude hiding (exp) import System(getArgs) import List(sort,intersperse,sortBy) import HpcFlags import Trace.Hpc.Mix import Trace.Hpc.Tix import Control.Monad hiding (gu...
b573ae08acf8081e1bdb67f51e2c83dbcc417802edd10774251d779f1cf88a46
stbuehler/haskell-nettle
VectorsUMAC.hs
{-# LANGUAGE OverloadedStrings, Safe #-} module VectorsUMAC ( umacTestVectors ) where import HexUtils import qualified Data.ByteString as B -- repeat chunks of s until filled length bytes repString :: Int -> B.ByteString -> Int -> [B.ByteString] repString len s n = if len > B.length s then s:let l' = len - B.lengt...
null
https://raw.githubusercontent.com/stbuehler/haskell-nettle/0fb94a24c72efd1ef74c368669301bb755977f37/src/Tests/VectorsUMAC.hs
haskell
# LANGUAGE OverloadedStrings, Safe # repeat chunks of s until filled length bytes umac96 is truncated umac128 /* Needs POLY128 */ /* Tests exercising various sizes of nonce and data: All nonce various off-by-one errors, */ /* Test varying the alignment of the buffer eventually passed to _umac_nh and _uma...
module VectorsUMAC ( umacTestVectors ) where import HexUtils import qualified Data.ByteString as B repString :: Int -> B.ByteString -> Int -> [B.ByteString] repString len s n = if len > B.length s then s:let l' = len - B.length s in l' `seq` repString l' s n else [B.take len s] [ ( key , nonce , message - chunk...
b5c49353ed75dc0d75f078668c11ae21e28febcbc2c614032c5451df409bcdb9
herd/herdtools7
JavaArch_herd.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/891da45ba63e84935e9ee7c12ab259483b035258/herd/JavaArch_herd.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2015 - 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...
0252cdf93fb9fd20514da939451f9356921bc52a2de796f007e43ad38924cb68
dongcarl/guix
libffi.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2014 , 2020 , 2021 < > Copyright © 2014 < > Copyright © 2015 , 2019 < > Copyright © 2016 , 2017 , 2020 < > Copyright © 2016 , 2017 < > Copyright © 2017 , 2019 , 2020 < > Copyright © 2018 < > Copyright...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/libffi.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 © 2012 , 2013 , 2014 , 2020 , 2021 < > Copyright © 2014 < > Copyright © 2015 , 2019 < > Copyright © 2016 , 2017 , 2020 < > Copyright © 2016 , 2017 < > Copyright © 2017 , 2019 , 2020 < > Copyright © 2018 < > Copyright © 2019 < > Copyright © 2020 < > under the te...
d72fe0076fe318508d5b8801981823e40c24775406bed070a56164c106d3ee73
alanmarazzi/perfect
project.clj
(defproject perfect "0.0.1-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] [org.apache.poi/poi "4.1.0"] [org.apache.poi/...
null
https://raw.githubusercontent.com/alanmarazzi/perfect/c3caecbf64383a1befd0dc1fef8f414e55d3dfa2/project.clj
clojure
(defproject perfect "0.0.1-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] [org.apache.poi/poi "4.1.0"] [org.apache.poi/...
0225f8d251de69339738252d1c2d583b980a89305cf7768cd9f68fc99846aa8c
tuscland/lw-dns-sd
if-name.lisp
-*- encoding : utf-8 ; mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*- DNS Service Discovery for LispWorks . Copyright ( c ) 2013 , . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the ...
null
https://raw.githubusercontent.com/tuscland/lw-dns-sd/2ae7e54b8bc3a89d267c2e91b083cd154bb1187d/src/if-name.lisp
lisp
mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*- 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, IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp...
DNS Service Discovery for LispWorks . Copyright ( c ) 2013 , . All rights reserved . software distributed under the License is distributed on an " AS Network interface name to index . (in-package "COM.WILDORA.DNS-SD") (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant IFNAMSIZ 16)) ...
1f944030f99bc8051c1c440abf1b3a72a91e85470d299e2d0b27607db3ce5c34
foreverbell/project-euler-solutions
86.hs
import Common.Utils (isqrt) isSquared x = root * root == x where root = isqrt x accumulate (x:xs) = result where result = x : zipWith (+) xs result count n = sum $ map find possible where possible = [ m | m <- [1 .. 2 * n], isSquared (m * m + n * n) ] find m = max (hi - lo + 1) 0 where lo...
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/86.hs
haskell
import Common.Utils (isqrt) isSquared x = root * root == x where root = isqrt x accumulate (x:xs) = result where result = x : zipWith (+) xs result count n = sum $ map find possible where possible = [ m | m <- [1 .. 2 * n], isSquared (m * m + n * n) ] find m = max (hi - lo + 1) 0 where lo...
a23f160e3a01e0d2164699d44662ca4283da49339e2c1de47492cc51a2feec08
msakai/toysolver
SMTLIB2Solver.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Test.SMTLIB2Solver (smtlib2SolverTestGroup) where import Control.Applicative((<$>)) import Control.Exception (evaluate) import Control.Monad import Control.Monad.State.Strict import Data.List import Data.Map (Map) import qualified Data.Map as Map imp...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/Test/SMTLIB2Solver.hs
haskell
fixme /~mliffito/publications/jar_liffiton_CAMUS.pdf --------------------------------------------------------------------- --------------------------------------------------------------------- Test harness
# LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Test.SMTLIB2Solver (smtlib2SolverTestGroup) where import Control.Applicative((<$>)) import Control.Exception (evaluate) import Control.Monad import Control.Monad.State.Strict import Data.List import Data.Map (Map) import qualified Data.Map as Map imp...
716ffb99f178a306b334295ebc6288cec068a15628a503b2315f027f97636393
fyquah/hardcaml_zprize
barrett_reduction.ml
(* Calculates [a mod p] using barret reduction, where [p] is a compile-time known constant. *) open Base open Hardcaml open Signal open Reg_with_enable module Config = struct type t = { approx_msb_multiplier_config : Approx_msb_multiplier.Config.t ; half_multiplier_config : Half_width_multiplier.Config.t...
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/src/barrett_reduction.ml
ocaml
Calculates [a mod p] using barret reduction, where [p] is a compile-time known constant. [middle_adder_stages] here is irrel. [middle_adder_stages] here is irrel. [middle_adder_stages] here is irrel. [middle_adder_stages] here is irrel. [middle_adder_stages] here is irrel. [middle_adder_stages] here is ...
open Base open Hardcaml open Signal open Reg_with_enable module Config = struct type t = { approx_msb_multiplier_config : Approx_msb_multiplier.Config.t ; half_multiplier_config : Half_width_multiplier.Config.t ; subtracter_stages : int ; num_correction_steps : int ; include_fine_reduction : boo...
ef79ec4b1295686a090b3bf33d07ded9f8559aa66040093b4a15d6c558828d77
kaznum/programming_in_ocaml_exercise
orig_change.ml
let rec change coins amount = match (coins, amount) with (_, 0) -> [] | ((c :: rest) as coins, total) -> if c > total then change rest total else c :: change coins (total - c);; change [5; 2] 16;;
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex7.3/orig_change.ml
ocaml
let rec change coins amount = match (coins, amount) with (_, 0) -> [] | ((c :: rest) as coins, total) -> if c > total then change rest total else c :: change coins (total - c);; change [5; 2] 16;;
d320985b801f01c0dbaa2f326ab4436e91db5cd9f5b01e137c04b9b2a6bced95
ducki2p/i2conomy
middleware.clj
(ns i2conomy.middleware (:require [clojure.contrib.sql :as sql]) (:require [i2conomy.db :as db]) (:require [clj-stacktrace.repl :as strp])) (defn- log [msg & vals] (let [line (apply format msg vals)] (locking System/out (println line)))) (defn wrap-bounce-favicon [handler] (fn [req] (if (= [:get "/f...
null
https://raw.githubusercontent.com/ducki2p/i2conomy/d4e70cafd80210ebdf8dcb596dbb929a32bf7e11/src/i2conomy/middleware.clj
clojure
(ns i2conomy.middleware (:require [clojure.contrib.sql :as sql]) (:require [i2conomy.db :as db]) (:require [clj-stacktrace.repl :as strp])) (defn- log [msg & vals] (let [line (apply format msg vals)] (locking System/out (println line)))) (defn wrap-bounce-favicon [handler] (fn [req] (if (= [:get "/f...
604e0a8bbf4c7ccb7145a60e279743f8642e8a47b4773f4a59d20de7acb58c16
facebook/duckling
CS.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. module Duckling.Dimensions.CS ( allDimensions ) where import Duckling.Dimensions.Types allDimensions :...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Dimensions/CS.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.
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Dimensions.CS ( allDimensions ) where import Duckling.Dimensions.Types allDimensions :: [Seal Dimension] allDimensions = [ Seal Distance , Seal Numeral ]
d9dc2d186801ec26cd94f418ee45a6ccbb56cc25c5dac3b4287f56bcb67e950f
kuberlog/holon
position.lisp
(in-package :holon) (defun add-position (l position) (cons position l))
null
https://raw.githubusercontent.com/kuberlog/holon/6c2ba24e7440c770be7c6e97e21e9d631562b6a7/lisp/position.lisp
lisp
(in-package :holon) (defun add-position (l position) (cons position l))
919fbeb3f0a21cd8bd02a508a0eac4e44895bcc63f542bf858d178dd65767c1c
scrintal/heroicons-reagent
squares_2x2.cljs
(ns com.scrintal.heroicons.solid.squares-2x2) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M3 6a3 3 0 013-3h2.25a3 3 0 013 3v2.25a3 3 0 01-3 3H6a3 3 0 01-3-3V6zm9.75 0a3...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/squares_2x2.cljs
clojure
(ns com.scrintal.heroicons.solid.squares-2x2) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M3 6a3 3 0 013-3h2.25a3 3 0 013 3v2.25a3 3 0 01-3 3H6a3 3 0 01-3-3V6zm9.75 0a3...
af0970ba20e915aaaff8b3ef6aea6134ebf7561150e4ee20da2d6b9ebddc62c9
srdqty/talc-3.0
lexer.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/srdqty/talc-3.0/df83dd5ff0e2b189b13280ddae233d8277199350/apps/popcorn/tools/ocamllex/lexer.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . $ I d : lexer.mli , v 1.1 1999/04/09 14:00:07 danieljg Exp $ val main: Lexing.lexbuf -> Parser.token excepti...
7acbccbe5b39a63c82d3e34074fc79b52662e3e5594ae74823e16d7da1bde394
emil0r/reverie
database.clj
(ns reverie.specs.database (:require [clojure.spec.alpha :as spec])) (spec/def :reverie.database/table (spec/or :string string? :keyword keyword?))
null
https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-core/src/reverie/specs/database.clj
clojure
(ns reverie.specs.database (:require [clojure.spec.alpha :as spec])) (spec/def :reverie.database/table (spec/or :string string? :keyword keyword?))
10858538bc7830aa9625a68b450a2574898672a1e1744d1993b6eda30ee4162d
asmala/clj-simple-form
util.clj
(ns clj-simple-form.util "Utility functions for the `clj-simple-form` library.") (def ^:private html-fns (atom {})) (defn html-fn "Returns the HTML generation function corresponding to `component`. ### Example (html-fn :wrapper)" [component] (or (@html-fns component) (throw (Exception. (str "N...
null
https://raw.githubusercontent.com/asmala/clj-simple-form/b1c566b1f0fe532639b15832b557f1608598a0a2/clj-simple-form-core/src/clj_simple_form/util.clj
clojure
(ns clj-simple-form.util "Utility functions for the `clj-simple-form` library.") (def ^:private html-fns (atom {})) (defn html-fn "Returns the HTML generation function corresponding to `component`. ### Example (html-fn :wrapper)" [component] (or (@html-fns component) (throw (Exception. (str "N...
0ab7ae6758bca778ad7258e9416ddd4163ca4d607491c3dece6a9b5cd2d4f850
5HT/ant
Option.mli
value maybe : 'b -> ('a -> 'b) -> option 'a -> 'b; value is_some : option 'a -> bool; value is_none : option 'a -> bool; value from_some : option 'a -> 'a; value from_option : 'a -> option 'a -> 'a; value compare : 'a -> option 'a -> bool; value compareq : 'a -> option 'a -> bool; value to_list ...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Tools/Option.mli
ocaml
value maybe : 'b -> ('a -> 'b) -> option 'a -> 'b; value is_some : option 'a -> bool; value is_none : option 'a -> bool; value from_some : option 'a -> 'a; value from_option : 'a -> option 'a -> 'a; value compare : 'a -> option 'a -> bool; value compareq : 'a -> option 'a -> bool; value to_list ...
b95a0edeaffc75e5662ddf97e501b59d36a1979a35d472be87e1c017e23454af
metosin/spec-tools
transform.cljc
(ns spec-tools.transform #?(:cljs (:refer-clojure :exclude [Inst Keyword UUID])) (:require [clojure.spec.alpha :as s] #?@(:cljs [[goog.date.UtcDateTime] [goog.date.Date] [goog.Uri]]) [clojure.set :as set] [clojure.edn :as edn] ...
null
https://raw.githubusercontent.com/metosin/spec-tools/d05e6e3c76c3c6ff847aa3f8e66344df2705aeae/src/spec_tools/transform.cljc
clojure
Keywords Numbers Strings -validation-in-javascript Maps TODO: remove this as it couples transformation & validation? type decoders type encoders
(ns spec-tools.transform #?(:cljs (:refer-clojure :exclude [Inst Keyword UUID])) (:require [clojure.spec.alpha :as s] #?@(:cljs [[goog.date.UtcDateTime] [goog.date.Date] [goog.Uri]]) [clojure.set :as set] [clojure.edn :as edn] ...
688f5e278b93cb20e85c9b29c0dfbcb604b21b4acedde72277e77f61ff3d2a05
mpickering/ghcide-reflex
Logic.hs
# LANGUAGE CPP # #include "ghc-api-version.h" -- Mostly taken from "haskell-ide-engine" module Development.IDE.Plugin.Completions.Logic ( CachedCompletions , cacheDataProducer , WithSnippets(..) ,getCompletions ) where import Control.Applicative import Data.Char (isSpace, isUpper) import Data.Generics import Data.Li...
null
https://raw.githubusercontent.com/mpickering/ghcide-reflex/67ddebf0c1d4728e850057b9bd7c6852c0d96350/src/Development/IDE/Plugin/Completions/Logic.hs
haskell
Mostly taken from "haskell-ide-engine" | A context of a declaration in the program e.g. is the declaration a type declaration or a value declaration Used for determining which code completions to show TODO: expand this with more contexts like classes or instances for smarter code completion ^ module context with...
# LANGUAGE CPP # #include "ghc-api-version.h" module Development.IDE.Plugin.Completions.Logic ( CachedCompletions , cacheDataProducer , WithSnippets(..) ,getCompletions ) where import Control.Applicative import Data.Char (isSpace, isUpper) import Data.Generics import Data.List as List hiding (stripPrefix) import qua...
e7846ac411956368b31157a8da2653b624c349eefc449fb2e05c3e0c76582cf1
eeng/shevek
popup.cljs
(ns shevek.components.popup (:require [reagent.core :as r])) (def popup-data (r/atom {:opened? false})) (defn show-popup [event new-content {:keys [on-close on-toggle class] :as popup-opts}] (reset! popup-data {:opened? true :activator (.-currentTarget event) :content n...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/components/popup.cljs
clojure
(ns shevek.components.popup (:require [reagent.core :as r])) (def popup-data (r/atom {:opened? false})) (defn show-popup [event new-content {:keys [on-close on-toggle class] :as popup-opts}] (reset! popup-data {:opened? true :activator (.-currentTarget event) :content n...
de8053dfafccae6cbaa57685985a3a0a01e2785dc7e3d013434313934380e856
haskell/pretty
PrettyTestVersion.hs
# LANGUAGE CPP # {-# LANGUAGE BangPatterns #-} #if __GLASGOW_HASKELL__ >= 701 # LANGUAGE DeriveGeneric # #endif #define TESTING | Here we use some CPP hackery to get a whitebox -- version of HughesPJ for testing purposes. module PrettyTestVersion where #include "HughesPJ.hs"
null
https://raw.githubusercontent.com/haskell/pretty/b637c027997d198c80e9aea246b960e059be5c1a/tests/PrettyTestVersion.hs
haskell
# LANGUAGE BangPatterns # version of HughesPJ for testing purposes.
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 701 # LANGUAGE DeriveGeneric # #endif #define TESTING | Here we use some CPP hackery to get a whitebox module PrettyTestVersion where #include "HughesPJ.hs"
a2cadc9d3b1e6808747f25e0dffee1c5c87d6d78d19c0e2258f239250176b0df
target/theta-idl
Types.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # {-# LANGUAGE NamedFieldPuns #-} # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Test.Theta.Targe...
null
https://raw.githubusercontent.com/target/theta-idl/2bda6a8836817f8d782c2165d7f250fe296b97c2/theta/test/Test/Theta/Target/Avro/Types.hs
haskell
# LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # record field called "map" * Primitives * Containers * Named Types a named reference * Backwards Compatibility * Schemas check top-level doc comment * Reusable module for testing enums records variants with no fields...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLists # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Test.Theta.Target.Avro.Types where logical_dates.theta imports primitives.theta which defines a import Prelu...
29c88aedf4ec3870546f2091059ee429bfd34432ce58d709b19b61b4676bd808
kumarshantanu/lein-sub
sub.clj
(ns leiningen.sub (:require [clojure.string :as str] [leiningen.core.main :as main] [leiningen.core.project :as project])) (defn apply-task-to-subproject [sub-proj-dir task-name args] (println "Reading project from" sub-proj-dir) (let [sub-project (project/init-project ...
null
https://raw.githubusercontent.com/kumarshantanu/lein-sub/4ddbb83359b2f9b6435ffd5b9c012b81e28de1ac/src/leiningen/sub.clj
clojure
project contains :sub otherwise error
(ns leiningen.sub (:require [clojure.string :as str] [leiningen.core.main :as main] [leiningen.core.project :as project])) (defn apply-task-to-subproject [sub-proj-dir task-name args] (println "Reading project from" sub-proj-dir) (let [sub-project (project/init-project ...
14fd975056188d77af622e126cbb85885f56c7fa53a31494201541002aaf3a4e
winterland1989/mysql-haskell
BinLog.hs
| Module : Database . MySQL.BinLog Description : Binary protocol toolkit Copyright : ( c ) Winterland , 2016 License : BSD Maintainer : Stability : experimental Portability : PORTABLE This module provide tools for binlog listening and row based binlog decoding . Module : Data...
null
https://raw.githubusercontent.com/winterland1989/mysql-haskell/d93caffe0991e1090a3854acff355ff0ea6075c7/Database/MySQL/BinLog.hs
haskell
* binlog utilities * helpers * re-export | binlog filename and position to start listening. # UNPACK # # UNPACK # | Register a pesudo slave to master, although MySQL document suggests you should call this before calling 'dumpBinLog', but it seems it's not really necessary. | Setup binlog listening on given con...
| Module : Database . MySQL.BinLog Description : Binary protocol toolkit Copyright : ( c ) Winterland , 2016 License : BSD Maintainer : Stability : experimental Portability : PORTABLE This module provide tools for binlog listening and row based binlog decoding . Module : Data...
d70b80279151d053584420ab77cbdf3ca90a4eaa715940544dc7132cf5784b8f
crategus/cl-cffi-gtk
gdk.properties.lisp
;;; ---------------------------------------------------------------------------- ;;; gdk.properties.lisp ;;; The documentation of this file is taken from the 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GDK library . ;;; See <>. The API documentation of the Lisp binding is ava...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/gdk/gdk.properties.lisp
lisp
---------------------------------------------------------------------------- gdk.properties.lisp See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (at your op...
The documentation of this file is taken from the 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GDK library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either version 3 of the ...
e7b2756561a648c3c67bc916c7e024658953d2e9aa277cabbde21f14da39c4a8
NetworkVerification/nv
AdjGraph.ml
open Graph open Nv_utils.PrimitiveCollections (*** Module definitions ***) module Vertex = struct Really should be Syntax.node , but that causes a dependency loop (* let compare = Stdlib.compare *) let equal a b = compare a b = 0 let hash = Hashtbl.hash let to_string = string_of_int end include Persistent...
null
https://raw.githubusercontent.com/NetworkVerification/nv/31a72ff3f7bce3d6cb7f5f97f0df20bd3d729ea1/src/lib/datastructures/AdjGraph.ml
ocaml
** Module definitions ** let compare = Stdlib.compare ** Printing ** ** Graph Creation * * Add all the vertices in the list to the given graph. * Add all the edges in the list to the given graph.
open Graph open Nv_utils.PrimitiveCollections module Vertex = struct Really should be Syntax.node , but that causes a dependency loop let equal a b = compare a b = 0 let hash = Hashtbl.hash let to_string = string_of_int end include Persistent.Digraph.Concrete (Vertex) module Edge = struct include E le...
8b160d09e9cd89c1c6b5d214ebdf09af97a9d43a5341f8786f24e286c0eb39de
HunterYIboHu/htdp2-solution
ex434-loop-quick-sort.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 ex434-loop-quick-sort) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constr...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter5/Section26-design-algorithm/ex434-loop-quick-sort.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of Number] -> [List-of Number] produces a sorted version of alon assume the numbers are all distinct [List-of Number] Number -> [List-of Number] [List-of Number] Number -> [List-of Number] run program after read Questions ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex434-loop-quick-sort) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (quick-sort< alon) (cond ...
a17cdeade9153b9d8c104c261ce90eea1649a77a35945c50d6a0cee5d3fe96ac
seancorfield/next-jdbc
specs.clj
copyright ( c ) 2019 - 2021 , all rights reserved (ns next.jdbc.specs "Specs for the core API of next.jdbc. The functions from `next.jdbc`, `next.jdbc.sql`, and `next.jdbc.prepare` have specs here. Just `:args` are spec'd. These specs are intended to aid development with `next.jdbc` by catching simple ...
null
https://raw.githubusercontent.com/seancorfield/next-jdbc/68cff61e94ae183abeca3e6e3dea712c70101ee3/src/next/jdbc/specs.clj
clojure
can be a simple column name (keyword) or a pair of something and as alias and that something can be a simple column name (keyword) or an arbitrary expression (string) where we assume you know what you're doing
copyright ( c ) 2019 - 2021 , all rights reserved (ns next.jdbc.specs "Specs for the core API of next.jdbc. The functions from `next.jdbc`, `next.jdbc.sql`, and `next.jdbc.prepare` have specs here. Just `:args` are spec'd. These specs are intended to aid development with `next.jdbc` by catching simple ...
0e822431a2ea24e22db5c42fd20562df84837eee6f1ad23ade493539e233a57e
wangsix/VMO_repeated_themes_discovery
occurrences.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-co...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Aug2013/groundTruth/mozartK282Mvt2/monophonic/repeatedPatterns/sectionalRepetitions/I/occurrences/script/occurrences.lisp
lisp
(in-package :common-lisp-user) Load the piece and the pattern. Define all occurrences. occi. Save as csv, lisp, and midi. Definition of ontime-pitch pairs. Definition for MIDI file. Save MIDI file (alter any anacrusis). Save lisp-format text file. Save CSV.
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-code-root*)) (load (merge-pathnam...
0afc428ea6fbdeb7d778ef6052c219091a49e25af270dd44f150e243cf0ffbbf
tweag/asterius
BinaryOp.hs
module Asterius.EDSL.BinaryOp where import Asterius.Types addInt32 :: Expression -> Expression -> Expression addInt32 = Binary AddInt32 subInt32 :: Expression -> Expression -> Expression subInt32 = Binary SubInt32 mulInt32 :: Expression -> Expression -> Expression mulInt32 = Binary MulInt32 divSInt32 :: Expressio...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/src/Asterius/EDSL/BinaryOp.hs
haskell
module Asterius.EDSL.BinaryOp where import Asterius.Types addInt32 :: Expression -> Expression -> Expression addInt32 = Binary AddInt32 subInt32 :: Expression -> Expression -> Expression subInt32 = Binary SubInt32 mulInt32 :: Expression -> Expression -> Expression mulInt32 = Binary MulInt32 divSInt32 :: Expressio...
7cb1f8f637499b5a8e739bbea6e3997f10d1f1b4554b43aef9b7a669db39bec2
Quickscript-Competiton/July2020entries
colorscheme2package.rkt
#lang at-exp racket (require framework framework/preferences racket/gui quickscript) ; ----------------------------------------------------------------------- ; Extract colorscheme to package. ; ; Creates a new "info.rkt" in the directory of your choosing with the current as a new package . ; Made for th...
null
https://raw.githubusercontent.com/Quickscript-Competiton/July2020entries/b6406a4f021671bccb6b464042ba6c91221286fe/scripts/colorscheme2package.rkt
racket
----------------------------------------------------------------------- Extract colorscheme to package. Creates a new "info.rkt" in the directory of your choosing with the ----------------------------------------------------------------------- (define background (string-append "#s(background " (color-add->vector...
#lang at-exp racket (require framework framework/preferences racket/gui quickscript) current as a new package . Made for the competition 2020 . Author : ( ) Date : 07 - 2020 License : [ MIT]( / licenses / MIT ) From : -Competiton/July2020entries/issues/13 (script-help-string "Save the curr...
952432b5eb4c7616583acac29fb2883f497826b04d023768a2a86d457a36f850
eait-itig/rdp_proto
tsud.erl
%% %% rdpproxy %% remote desktop proxy %% Copyright 2012 - 2015 < > The University of Queensland %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: 1 . Redistributions of source code ...
null
https://raw.githubusercontent.com/eait-itig/rdp_proto/9fafd861f541c9c76f58568182b23c055901178c/src/tsud.erl
erlang
rdpproxy remote desktop proxy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the followi...
Copyright 2012 - 2015 < > The University of Queensland 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CON...
a9f9696e624037609f8742952a25b18e11b4cc66e1303035ac863593e19e494f
onedata/op-worker
atm_infinite_log_based_stores_test_base.erl
%%%------------------------------------------------------------------- @author ( C ) 2022 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module provides base for test...
null
https://raw.githubusercontent.com/onedata/op-worker/19487f9378046f76119600cb34313feacbf3d137/test_distributed/suites/automation/store/atm_infinite_log_based_stores_test_base.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module provides base for testing automation stores based on infinite log. @end ------------------------------------------------------------------- API Returns data...
@author ( C ) 2022 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(atm_infinite_log_based_stores_test_base). -author("Bartosz Walkowicz"). -include("modules/automation/atm_execution.hrl"). -include("modules/datastore/datastore_runner.hrl"). -include("onenv...
87c19a1b0fb69815dc1c423b721d34e8b324197d4867b727199cb4a8696d4299
pigworker/Syrup
Pty.hs
------------------------------------------------------------------------------ ----- ----- --- Pty : Pretty Printing library ----- --- This is based on 's functional pearl ----- ----- ...
null
https://raw.githubusercontent.com/pigworker/Syrup/d59e3a9b65274075f14f19b48746182a773bafc5/SRC/Pty.hs
haskell
---------------------------------------------------------------------------- --- ----- - Pty : Pretty Printing library ----- - This is based on 's functional pearl ----- --- "A pretty ...
# LANGUAGE RecordWildCards # module Syrup.SRC.Pty ( Doc , render , empty , char , text , spaces , fail , parens , indent , flush , (<+>) , ($$) , (<|>) , foldDoc , hsep , vcat , sep , commaSep...
289b5a55a6c775810760a263c3a5c27ea28a6742329188d905f014e19bd6f27a
thattommyhall/offline-4clojure
p111.clj
Crossword puzzle - Hard ;; Write a function that takes a string and a partially-filled crossword puzzle board, and determines if the input string can be legally placed onto the board. ;;</br></br> ;; ;;The crossword puzzle board consists of a collection of partially-filled rows. Empty spaces are denoted with an unde...
null
https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p111.clj
clojure
Write a function that takes a string and a partially-filled crossword puzzle board, and determines if the input string can be legally placed onto the board. </br></br> The crossword puzzle board consists of a collection of partially-filled rows. Empty spaces are denoted with an underscore (_), unusable spaces are de...
Crossword puzzle - Hard (ns offline-4clojure.p111 (:use clojure.test)) (def __ ) (defn -main [] (are [soln] soln (= true (__ "the" ["_ # _ _ e"])) (= false (__ "the" ["c _ _ _" "d _ # e" "r y _ _"])) (= true (__ "joy" ["c _ _ _" "d _ # e" ...
2bdf95da535f0f89f269a87b9cafda9c2b7af23f8d6f2aa149fecf39ffa87886
denisshevchenko/circlehs
Run.hs
| Module : Network . CircleCI.Common . Run Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : alpha Run ' CircleCIResponse ' monad . Module : Network.CircleCI.Common.Run Copyright : (c) Denis Shevchenko, 2016 License : MIT Maintainer : Stability : alpha ...
null
https://raw.githubusercontent.com/denisshevchenko/circlehs/0c01693723a234bb46ff8d1e6e114cce91dfa032/src/Network/CircleCI/Common/Run.hs
haskell
| All API calls require account API token, so move it into 'ReaderT' monad instead of passing it as an explicit argument.
| Module : Network . CircleCI.Common . Run Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : alpha Run ' CircleCIResponse ' monad . Module : Network.CircleCI.Common.Run Copyright : (c) Denis Shevchenko, 2016 License : MIT Maintainer : Stability : alpha ...
64c8f21c65fa8d90d6efc435492c70af7b413ffb657a0cc8dd6696a8a8872475
alfreb/church1936
Church1936Spec.hs
module Church1936Spec (spec, testmain) where import Test.Hspec import Test.Hspec.QuickCheck import Test.HUnit import Test.QuickCheck import Church1936 as C36 preamble = do putStrLn "Testing Church's Lambda calculus" varExamples = [ "a", "b", "c", "x", "y", "z", "a₁", "b₂", "c₉", "x₄₂","y₉₉", "z₇₈₉" ] num0 =...
null
https://raw.githubusercontent.com/alfreb/church1936/f9cb8b485da4bc8006656fa7776ba56d86e99866/test/Church1936Spec.hs
haskell
Helper variables
module Church1936Spec (spec, testmain) where import Test.Hspec import Test.Hspec.QuickCheck import Test.HUnit import Test.QuickCheck import Church1936 as C36 preamble = do putStrLn "Testing Church's Lambda calculus" varExamples = [ "a", "b", "c", "x", "y", "z", "a₁", "b₂", "c₉", "x₄₂","y₉₉", "z₇₈₉" ] num0 =...
1f0e33f17252c7df7002eecc799a554cf025a3b5de424ca1ed89865e81e450dc
mpardalos/Kima
AST.hs
module Kima.AST.AST where import Data.Bifunctor import Data.Bifoldable import Data.Bitraversable import Data.Text.Prettyprint.Doc import GHC.Generics import Kima.AST.Kinds import Kima.AST.Names newtype Module tag = Module [TopLevel tag] data TopLevel tag = FuncDef Name [(Name, FreeAnnotation tag)] (EffectType ...
null
https://raw.githubusercontent.com/mpardalos/Kima/2d9bfb44d873795108789910c4b374059786c0e4/src/Kima/AST/AST.hs
haskell
-------------- Factored out parts of the AST ------------------------------ | Similar to access but only used for assignment. Consists of a mandatory | base part and an optional list of sub-fields. E.g. @a@ is @WriteAccess "a" []@ | and @a.b.c@ is @WriteAccess "a" ["b", "c"]@ --------------- Show instances --------...
module Kima.AST.AST where import Data.Bifunctor import Data.Bifoldable import Data.Bitraversable import Data.Text.Prettyprint.Doc import GHC.Generics import Kima.AST.Kinds import Kima.AST.Names newtype Module tag = Module [TopLevel tag] data TopLevel tag = FuncDef Name [(Name, FreeAnnotation tag)] (EffectType ...
91a738cc605c2faa2f0c776cf39a8e334d6bbe6be950cb0422f4ac051d14827f
skrah/minicaml
Lexer.mli
* Copyright ( c ) 2015 . All rights reserved . * * This file is distributed under the terms of the Q Public License * version 1.0 . * Copyright (c) 2015 Stefan Krah. All rights reserved. * * This file is distributed under the terms of the Q Public License * version 1.0. *) exception Error of stri...
null
https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/Lexer.mli
ocaml
* Copyright ( c ) 2015 . All rights reserved . * * This file is distributed under the terms of the Q Public License * version 1.0 . * Copyright (c) 2015 Stefan Krah. All rights reserved. * * This file is distributed under the terms of the Q Public License * version 1.0. *) exception Error of stri...
649a524d85fa51597dfc2dc564cc4fd083b1061ec08c669d036e30246c77c514
fukamachi/integral
integral.lisp
(in-package :cl-user) (defpackage integral (:use :cl :sxql :iterate) (:shadowing-import-from :iterate :for) (:import-from :integral.table :<dao-table-class> :<dao-class> :table-name :table-definition ...
null
https://raw.githubusercontent.com/fukamachi/integral/5fdf506233e9f6aa814a2da529bed0a551183110/src/integral.lisp
lisp
Errors
(in-package :cl-user) (defpackage integral (:use :cl :sxql :iterate) (:shadowing-import-from :iterate :for) (:import-from :integral.table :<dao-table-class> :<dao-class> :table-name :table-definition ...
daff051e092db0f78b441708d61fcbdf743f6e21f07b1186b79d36b55f429541
philnguyen/soft-contract
debug.rkt
#lang typed/racket/base (provide with-debugging with-debugging/off (rename-out [-assert assert])) (require syntax/parse/define (for-syntax racket/base)) ;; Evaluate `e ...`, bind to `x ...`, run debuggings `d ...`, then return `x ...` (define-simple-macro (with-debugging ((x:id ...) e ...) ...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/utils/debug.rkt
racket
Evaluate `e ...`, bind to `x ...`, run debuggings `d ...`, then return `x ...`
#lang typed/racket/base (provide with-debugging with-debugging/off (rename-out [-assert assert])) (require syntax/parse/define (for-syntax racket/base)) (define-simple-macro (with-debugging ((x:id ...) e ...) d ...) (let-values ([(x ...) (let () e ...)]) d ... (values x ...))) (d...
9f7c89e4af847e7a23e14d85e728d24850e3d11e5b19c0b5f82b86a826e22a0f
sharplispers/clx
glx.lisp
(defpackage #:xlib/glx (:use :common-lisp :xlib) (:import-from :xlib "DEFINE-ACCESSOR" "DEF-CLX-CLASS" "DECLARE-EVENT" "ALLOCATE-RESOURCE-ID" "DEALLOCATE-RESOURCE-ID" "PRINT-DISPLAY-NAME" "WITH-BUFFER-REQ...
null
https://raw.githubusercontent.com/sharplispers/clx/8e071554a5531988d21f088953de7b741c2b2980/extensions/glx.lisp
lisp
Types Constants Conditions Requests Generally don't want this declamation to have load-time effects Opcodes. Constants Types FIXME: - These are not used much, yet. be accessed using double-colon, which is a bad style. Or these forms must be taken to another file so the accessors exist before we get to thi...
(defpackage #:xlib/glx (:use :common-lisp :xlib) (:import-from :xlib "DEFINE-ACCESSOR" "DEF-CLX-CLASS" "DECLARE-EVENT" "ALLOCATE-RESOURCE-ID" "DEALLOCATE-RESOURCE-ID" "PRINT-DISPLAY-NAME" "WITH-BUFFER-REQ...
e2795f4fb90eeb69a120b3ac29a3c98e9411be5bd35cd0744100521bf4515fa3
rpeszek/typed-encoding
StringConstraints.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTyp...
null
https://raw.githubusercontent.com/rpeszek/typed-encoding/441f9f3bbf849f485f82eae66402ee2fd7b47a34/src/Data/TypedEncoding/Common/Class/Util/StringConstraints.hs
haskell
| $setup >>> :set -XScopedTypeVariables -XTypeApplications -XAllowAmbiguousTypes >>> import Test.QuickCheck >>> import Test.QuickCheck.Instances.Text() >>> import Test.QuickCheck.Instances.ByteString() law for types that are also @IsString@: @ toString . fromString == id @ be needed. @B8.unpack $ B8.p...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTyp...
6912b279b00aea3d1e6d390916ba37bb762102be4c73203b5fe6ad7025ef4a12
ivankelly/gambit
_repl#.scm
;;;============================================================================ File : " _ repl#.scm " , Time - stamp : < 2009 - 02 - 11 21:28:56 feeley > Copyright ( c ) 1994 - 2009 by , All Rights Reserved . ;;;============================================================================ (define-type repl-co...
null
https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/lib/_repl%23.scm
scheme
============================================================================ ============================================================================ mutex to become owner of this repl-channel thread that last owned this repl-channel ============================================================================
File : " _ repl#.scm " , Time - stamp : < 2009 - 02 - 11 21:28:56 feeley > Copyright ( c ) 1994 - 2009 by , All Rights Reserved . (define-type repl-context id: cd5f5bad-f96f-438d-8d63-ff887b7b39de constructor: macro-make-repl-context implementer: implement-type-repl-context macros: prefix: macro- ...
0105af9638de9d701ffc018aaaf5e46a791bd89e4bc4553cf1f87848b9fb8811
incoherentsoftware/defect-process
Gauntlets.hs
module Player.Weapon.All.Gauntlets ( mkGauntletsWeapon ) where import Control.Monad (guard, when) import Control.Monad.IO.Class (MonadIO) import Data.Foldable (sequenceA_) import qualified Data.Map as M import Attack import Attack.Projectile import Configs import Configs.All.PlayerWeapon.Gau...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/61ee16c917b6da8f0ebd84b0bbebc7e3fe8bce27/src/Player/Weapon/All/Gauntlets.hs
haskell
dash punch (left) dash punch (right) dive kick rising uppercut evasive kick kick double kick punch2 air forwards kick dive kick/dive kick release -> dive kick land falling axe kick release -> falling axe kick land dash punch forwards -> dash punch evasive kick cancel grounded attacks if now in air cancel...
module Player.Weapon.All.Gauntlets ( mkGauntletsWeapon ) where import Control.Monad (guard, when) import Control.Monad.IO.Class (MonadIO) import Data.Foldable (sequenceA_) import qualified Data.Map as M import Attack import Attack.Projectile import Configs import Configs.All.PlayerWeapon.Gau...
d71e3dd9f24e205798363a6a027c6fef6b1825205c63ec36750903a8c2d3a118
haskell-repa/repa
Load.hs
module Data.Repa.Array.Internals.Load (Load (..)) where import Data.Repa.Array.Internals.Target import Data.Repa.Array.Internals.Bulk import Data.Repa.Eval.Gang -- | Compute all elements defined by a delayed array and write them to a -- manifest target representation. -- -- The instances of this class ...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-array/Data/Repa/Array/Internals/Load.hs
haskell
| Compute all elements defined by a delayed array and write them to a manifest target representation. The instances of this class require that the source array has a delayed representation. If you want to use a pre-existing manifest array as the | Fill an entire array sequentially. | Fill an entire array ...
module Data.Repa.Array.Internals.Load (Load (..)) where import Data.Repa.Array.Internals.Target import Data.Repa.Array.Internals.Bulk import Data.Repa.Eval.Gang source then ` delay ` it first . class (Bulk l1 a, Target l2 a) => Load l1 l2 a where loadS :: Array l1 a -> Buffer l2 a -> IO () ...
021cbc712803f12278a0834a7ea891e7964302afc05ab1a812875085f3b2c45d
korya/efuns
wX_scale.ml
(***********************************************************************) (* *) (* ____ *) (* *) Fabrice Le Fessa...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_scale.ml
ocaml
********************************************************************* ____ ...
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Xtypes open WX_types class t parent sens (adj : WX_adjust.t) attributes = object (sel...
6f8b25ab4b0209e225015d156fbe4480ecc01bbf1545428df86208d5a44d9b41
lexi-lambda/hackett
type-alias.rkt
#lang curly-fn racket/base (require (for-syntax racket/base racket/format syntax/intdef threading hackett/private/infix hackett/private/typecheck hackett/private/util/stx) syntax/pars...
null
https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-lib/hackett/private/type-alias.rkt
racket
use the make - alias - transformer constructor instead of creating instances of this struct directly. Create a dummy internal definition context with args. Expanding the type in `ctx` checks immediately that it is a valid type, rather than deferring that check to when the type alias is applied.
#lang curly-fn racket/base (require (for-syntax racket/base racket/format syntax/intdef threading hackett/private/infix hackett/private/typecheck hackett/private/util/stx) syntax/pars...
9e7bb6e382d8ccea34afda28eed676dff50e117c232e7744988c7ab01e5c30df
koengit/satplus
Value.hs
{-| Module : SAT.Value Description : Reading off the value of things in models -} # LANGUAGE TypeFamilies # module SAT.Value where import SAT ( Solver ) import qualified SAT as S import qualified SAT.Val as V import qualified SAT.Unary as U import qualified SAT.Term as T import Control.Monad ( liftM2, l...
null
https://raw.githubusercontent.com/koengit/satplus/d83b87732d3146b0df0ced3259d42a77b8d6f155/SAT/Value.hs
haskell
| Module : SAT.Value Description : Reading off the value of things in models ---------------------------------------------------------------------------- | Return the value of the object in the current model. /Only use if 'solve' has returned True!/ --------------------------------------------------------------...
# LANGUAGE TypeFamilies # module SAT.Value where import SAT ( Solver ) import qualified SAT as S import qualified SAT.Val as V import qualified SAT.Unary as U import qualified SAT.Term as T import Control.Monad ( liftM2, liftM3 ) | A class for symbolic objects that have values in models . class Value a ...
e72f12a6f4e63b2e9cec201ffb129f88c5e1176cce5e983f5970d988da11ed7d
tuura/process-mining
Function.hs
# LANGUAGE TypeFamilies # module Tuura.Function ( printBooleanFunction ) where import Data.List import Tuura.Graph instance Graph Function where type Vertex Function = String empty = Closed "" vertex v = Closed $ var v overlay p q = Open $ printFunction p ++ " & " ++ printFunction q ...
null
https://raw.githubusercontent.com/tuura/process-mining/716f33fee657726989db21c9a008047e7d55f86a/src/Tuura/Function.hs
haskell
# LANGUAGE TypeFamilies # module Tuura.Function ( printBooleanFunction ) where import Data.List import Tuura.Graph instance Graph Function where type Vertex Function = String empty = Closed "" vertex v = Closed $ var v overlay p q = Open $ printFunction p ++ " & " ++ printFunction q ...
15d4d64f6b62408cbd45f5b16fb25498b3b197963f5e983c5443ebb118d7276c
xxyzz/SICP
Exercise_2_96.rkt
#lang racket/base ; a: (define (gcd-terms a b) (display "gcd-terms a ") (display a) (display "\n") (display "gcd-terms b ") (display b) (display "\n\n") (if (empty-termlist? b) a (gcd-terms b (pseudoremainder-terms a b)))) (define (pseudoremainder-terms a b) (let* ([O1 (order (first-term a))] ...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.5_Systems_with_Generic_Operations/Exercise_2_96.rkt
racket
a: div-term L1 () gcd-terms b () b: '(polynomial x (0 1))
#lang racket/base (define (gcd-terms a b) (display "gcd-terms a ") (display a) (display "\n") (display "gcd-terms b ") (display b) (display "\n\n") (if (empty-termlist? b) a (gcd-terms b (pseudoremainder-terms a b)))) (define (pseudoremainder-terms a b) (let* ([O1 (order (first-term a))] ...
6c50bc46c6036278c93350ac8a52101f3b96123c137e58b6093f6db98cfb4324
johnlawrenceaspden/hobby-code
sum.clj
;; I seem to be doing a lot of infinite sums while looking at the reinforcement learning book 1.0 1.25 1.3125 1.328125 1.3320312 1.3330078 ( 1 5/4 21/16 85/64 341/256 1365/1024 5461/4096 ) 9.329102 (map float (reductions + (map * (apply concat (repeat [5 ...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/reinforcement-learning/sum.clj
clojure
I seem to be doing a lot of infinite sums while looking at the reinforcement learning book 2.0 2N 3/2 3N 3N 1/271 40/333 120/999 700/333 210/999 340/333 102/999 34/333 340/333 here be dragons
1.0 1.25 1.3125 1.328125 1.3320312 1.3330078 ( 1 5/4 21/16 85/64 341/256 1365/1024 5461/4096 ) 9.329102 (map float (reductions + (map * (apply concat (repeat [5 4])) ( 5.0 7.0 8.25 8.75 9.0625 9.1875 9.265625 9.296875 9.316406 9.324219 9.329102 9.331055...
932613bc17945b9aae91e7a7ea71cba355d95e73dc6fea78333b697daab88db8
casperschipper/ocaml-cisp
cisp2.ml
open Cisp open Midi open Seq open Reader.Ops simple mod of controller 1 onto pitch let sr = ref 44100.0 let pitchControl = MidiState.getControlR (MidiCh 0) (MidiCtrl 0) >>= (fun (MidiVal ctrl1) -> MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>= (fun (MidiVal ctrl2) -> MidiState.triggerR 30...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/tarkovski/cisp2.ml
ocaml
a seq of (x,y) make it (seq x, seq y) myseq this maps midi input msg to an output msg (raw midi) take msg, make it a state run a bunch of readers to extract properties the result is then used to contruct streams turn back into raw midi
open Cisp open Midi open Seq open Reader.Ops simple mod of controller 1 onto pitch let sr = ref 44100.0 let pitchControl = MidiState.getControlR (MidiCh 0) (MidiCtrl 0) >>= (fun (MidiVal ctrl1) -> MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>= (fun (MidiVal ctrl2) -> MidiState.triggerR 30...
45e525261238df311aeb6452882806ea01a401e6c7ae83269525337c25bb15f2
kupl/LearnML
patch.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec __s3 (__s4 : exp) : int = match __s4 with | Num __s14 -> __s...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub100/patch.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec __s3 (__s4 : exp) : int = match __s4 with | Num __s14 -> __s...
8dc50b742980823f42ad2fcd0ad054a5d5f9150c5202b2282245a7ea2181c505
ds-wizard/engine-backend
OpenIdService.hs
module Wizard.Service.OpenId.OpenIdService where import qualified Control.Exception.Base as E import Control.Monad.Except (throwError) import Control.Monad.Reader (asks, liftIO) import Data.Aeson (FromJSON, Value (..), decode) import qualified Data.Aeson.KeyMap as KM import qualified Data.ByteString.Char8 as BS import...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/12717256cde8d20020e30cd55dc3ef00fef9362a/engine-wizard/src/Wizard/Service/OpenId/OpenIdService.hs
haskell
-------------------------------- PRIVATE --------------------------------
module Wizard.Service.OpenId.OpenIdService where import qualified Control.Exception.Base as E import Control.Monad.Except (throwError) import Control.Monad.Reader (asks, liftIO) import Data.Aeson (FromJSON, Value (..), decode) import qualified Data.Aeson.KeyMap as KM import qualified Data.ByteString.Char8 as BS import...
ec0176f2f187ca61bd9012eb3de237a1ac93c38f43a4693ff26ab819ebd0f54e
acieroid/scala-am
quadratic.scm
Taken from ;; Expected result: #t (define (quadratic a b c) (if (= a 0) (if (= b 0) 'fail (- (/ c b))) (let ((delta (- (* b b) (* 4 a c)))) (if (and (real? delta) (> delta 0)) (let ((u (+ b (* (if (>= b 0) 1 -1) (sqrt delta))))) (list (/ u -2 a) (/ (* -2 c) u))) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/rosetta/quadratic.scm
scheme
Expected result: #t
Taken from (define (quadratic a b c) (if (= a 0) (if (= b 0) 'fail (- (/ c b))) (let ((delta (- (* b b) (* 4 a c)))) (if (and (real? delta) (> delta 0)) (let ((u (+ b (* (if (>= b 0) 1 -1) (sqrt delta))))) (list (/ u -2 a) (/ (* -2 c) u))) (list ...
d9f81467ef3db0622e2786e9d3be1195d607c0481f77b2bfd33a05cbdda63c0a
facet-lang/facet
Term.hs
module Facet.Core.Term ( -- * Term expressions Expr(..) ) where import Data.Text (Text) import Facet.Core.Pattern import qualified Facet.Core.Type as T import Facet.Name import Facet.Snoc import Facet.Syntax -- Term expressions data Expr = XVar (Var (LName Index)...
null
https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Core/Term.hs
haskell
* Term expressions Term expressions
module Facet.Core.Term Expr(..) ) where import Data.Text (Text) import Facet.Core.Pattern import qualified Facet.Core.Type as T import Facet.Name import Facet.Snoc import Facet.Syntax data Expr = XVar (Var (LName Index)) | XTLam Name Expr | XInst Expr T.TExpr...
a586628d196f1729690d2575e4ee6242260a27892cc5a50d49823e2cc2512e78
johanhaleby/stub-http
method_test.clj
(ns stub-http.method-test (:require [clojure.test :refer :all] [stub-http.core :refer :all] [cheshire.core :as json] [clj-http.lite.client :as client])) (deftest MethodMatching (testing "routes can match on method" (with-routes! {{:method :GET :path "/something"} {:st...
null
https://raw.githubusercontent.com/johanhaleby/stub-http/6ad71d8e72e9fca761b647d262f89b84cd54777e/test/stub_http/method_test.clj
clojure
(ns stub-http.method-test (:require [clojure.test :refer :all] [stub-http.core :refer :all] [cheshire.core :as json] [clj-http.lite.client :as client])) (deftest MethodMatching (testing "routes can match on method" (with-routes! {{:method :GET :path "/something"} {:st...
e60b875fdb1770df5762e043969ac4f9f783518662392a55b5c900101b1d041d
yandex/minishard
minishard_demo.erl
-module(minishard_demo). -behavior(minishard). -export([cluster_nodes/1, shard_count/1]). -export([allocated/2, score/1, prolonged/2, deallocated/2]). % Generate fake node list by changing a number in local node name cluster_nodes(_) -> BinNode = atom_to_binary(node(), latin1), [make_node(BinNode, N) || N <- ...
null
https://raw.githubusercontent.com/yandex/minishard/bf07eb0da61f583b4d5f66e433edf991fb137d66/src/minishard_demo.erl
erlang
Generate fake node list by changing a number in local node name Helper for cluster node names generation Let the score be number of seconds we are active
-module(minishard_demo). -behavior(minishard). -export([cluster_nodes/1, shard_count/1]). -export([allocated/2, score/1, prolonged/2, deallocated/2]). cluster_nodes(_) -> BinNode = atom_to_binary(node(), latin1), [make_node(BinNode, N) || N <- lists:seq(1, 5)]. Shard count , needed to monitor cluster for d...
eceb06f72c5a0d05c9ff74b3c4480124674c742270d5b74ab3ca09857cb78cf9
HaskellEmbedded/data-stm32
Pretty.hs
# LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} module Data.Ivory.Pretty where import Data.List import Data.List.Split (splitOn) import Text.Printf import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import qualified Text.PrettyPrint.ANSI.Leijen.Internal as WL folddoc :: (Doc -> Doc -> Doc) -> [Doc] ->...
null
https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/src/Data/Ivory/Pretty.hs
haskell
# LANGUAGE OverloadedStrings # l </> r preserve indent but no colors SSGR ignoring version of displayS
# LANGUAGE RecordWildCards # module Data.Ivory.Pretty where import Data.List import Data.List.Split (splitOn) import Text.Printf import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import qualified Text.PrettyPrint.ANSI.Leijen.Internal as WL folddoc :: (Doc -> Doc -> Doc) -> [Doc] -> Doc folddoc _ [] = empty foldd...
9e619442e13c6dda56ce080c71f3acc2ef8d1f110f16073268b66657dc799c5c
mtomas/clojurescript-reagent-pexeso
dev.cljs
(ns ^:figwheel-no-load react-cljs-blogpost.dev (:require [react-cljs-blogpost.core :as core] [figwheel.client :as figwheel :include-macros true] [weasel.repl :as weasel] [reagent.core :as r])) (enable-console-print!) (figwheel/watch-and-reload :websocket-url "ws:3449/figwheel-w...
null
https://raw.githubusercontent.com/mtomas/clojurescript-reagent-pexeso/4af25eba7556e2c41102d43ea7792a86f1b79504/env/dev/cljs/react_cljs_blogpost/dev.cljs
clojure
(ns ^:figwheel-no-load react-cljs-blogpost.dev (:require [react-cljs-blogpost.core :as core] [figwheel.client :as figwheel :include-macros true] [weasel.repl :as weasel] [reagent.core :as r])) (enable-console-print!) (figwheel/watch-and-reload :websocket-url "ws:3449/figwheel-w...
6d8e48de13cb8229ec3804c9f4c3bef154cc56920ee8e0ef5e30167ad5c6aae6
ceronman/cloxure
ast.clj
(ns cloxure.ast "Lox Abstract Syntax Tree (AST) representation for nodes.") (defn binary [left operator right] {::type ::binary ::left left ::right right ::operator operator}) (defn call [callee paren arguments] {::type ::call ::callee callee ::paren paren ::arguments arguments}) (defn get-expr [object name-to...
null
https://raw.githubusercontent.com/ceronman/cloxure/1cd57ff7c4afd223a711bfe3dc6fb56faf21c6d9/src/cloxure/ast.clj
clojure
(ns cloxure.ast "Lox Abstract Syntax Tree (AST) representation for nodes.") (defn binary [left operator right] {::type ::binary ::left left ::right right ::operator operator}) (defn call [callee paren arguments] {::type ::call ::callee callee ::paren paren ::arguments arguments}) (defn get-expr [object name-to...
e6c7cb153772876261f4da97f692bb8ded050f6cdcfa6e4bef4bda65eda254e4
ndmitchell/tagsoup
Parser.hs
module Text.HTML.TagSoup.Parser( parseTags, parseTagsOptions, ParseOptions(..), parseOptions, parseOptionsFast, parseOptionsEntities ) where import Text.HTML.TagSoup.Type import Text.HTML.TagSoup.Options import qualified Text.HTML.TagSoup.Generated as Gen | Parse a string to a list of tags , using an ...
null
https://raw.githubusercontent.com/ndmitchell/tagsoup/e116d3b965e4f149581bd55e45a05661b1113536/src/Text/HTML/TagSoup/Parser.hs
haskell
> parseTags "<hello>my&amp;</world>" == [TagOpen "hello" [],TagText "my&",TagClose "world"] eg. to output position information: > parseTagsOptions parseOptions{optTagPosition = True} "<hello>my&amp;</world>" ==
module Text.HTML.TagSoup.Parser( parseTags, parseTagsOptions, ParseOptions(..), parseOptions, parseOptionsFast, parseOptionsEntities ) where import Text.HTML.TagSoup.Type import Text.HTML.TagSoup.Options import qualified Text.HTML.TagSoup.Generated as Gen | Parse a string to a list of tags , using an ...
c69bcaf9e26b405ca9ca2664ecc10176904e82b49db9eea03eeb34dd376ed701
mzp/coq-for-ipad
odoc_global.mli
(***********************************************************************) (* Ocamldoc *) (* *) , projet Cristal , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/ocamldoc/odoc_global.mli
ocaml
********************************************************************* Ocamldoc ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : odoc_global.mli 5973 2003 - 11 -...
6d738ec149c8c8e9b081e172e2b090e3e30a07f554ab4afe54f508f5589e97a6
minad/henk
Classification.hs
module Henk.Classification where import Henk.HenkAS import Henk.TypeSystems crossproduct :: [a] -> [(a,a)] crossproduct s = [(s1,s2) | s1 <- s, s2 <- s] functional :: Specification -> Bool functional (s,a,r) = and (map (\s' -> length (filter (\(s1,_) -> s1==s') a)<2 ) s) && and (map (\t -> lengt...
null
https://raw.githubusercontent.com/minad/henk/73135b5fd2ce2b8f03fe0082bc7be621eb432e94/Henk/Classification.hs
haskell
module Henk.Classification where import Henk.HenkAS import Henk.TypeSystems crossproduct :: [a] -> [(a,a)] crossproduct s = [(s1,s2) | s1 <- s, s2 <- s] functional :: Specification -> Bool functional (s,a,r) = and (map (\s' -> length (filter (\(s1,_) -> s1==s') a)<2 ) s) && and (map (\t -> lengt...
713f7f916205b305d10f446c5e34d20c8f0e34346de4ffd2a1a23babbaf9b710
footprintanalytics/footprint-web
schedules.clj
(ns metabase.sync.schedules "Types and defaults for the syncing schedules used for the scheduled sync tasks. Has defaults for the two schedules maps and some helper methods for turning those into appropriately named cron strings as stored in the `metabase_database` table." (:require [metabase.util.cron :as u.cr...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/sync/schedules.clj
clojure
(ns metabase.sync.schedules "Types and defaults for the syncing schedules used for the scheduled sync tasks. Has defaults for the two schedules maps and some helper methods for turning those into appropriately named cron strings as stored in the `metabase_database` table." (:require [metabase.util.cron :as u.cr...
af3470dc5bfcaf73257d77f1bada8d1fe115f50119fc621fc9f476aed1bc2f85
GaloisInc/pate
Solver.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} -- | Definitions of solvers usable in the pate verifier module Pate.Solver ( Solver(..) , solverAdapter , ValidSym , Sym(..) , withOnlineSolver ) where import Control.Monad.Catch ( ...
null
https://raw.githubusercontent.com/GaloisInc/pate/f28ba804603a47ef615f716e4301bc895e0674cb/src/Pate/Solver.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE RankNTypes # | Definitions of solvers usable in the pate verifier | The solvers supported by the pate verifier We use this type to select solvers from the command line, as some work is required to actually set up the symbolic backend for each solver adapte...
# LANGUAGE FlexibleContexts # module Pate.Solver ( Solver(..) , solverAdapter , ValidSym , Sym(..) , withOnlineSolver ) where import Control.Monad.Catch ( MonadMask ) import Control.Monad.IO.Class ( MonadIO, liftIO ) import Data.Bits ( (.|.) ) import Data.Parameter...
c43be4a1d19978296628bf77efd17619fb4bf3892be5d042f8c129ae044a433d
kawu/dawg
Util.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE TupleSections # -- | Utility functions. module Data.DAWG.Util ( binarySearch , findLastLE , combine ) where import Control.Applicative ((<$>)) import Data.Bits (shiftR, xor) import Data.Vector.Unboxed (Unbox) import qualified Control.Monad.ST as ST import qualified Data.Vecto...
null
https://raw.githubusercontent.com/kawu/dawg/1bb3d139aece1610eab255949951e21cb07648ff/src/Data/DAWG/Util.hs
haskell
# LANGUAGE BangPatterns # | Utility functions. comparison function, find an index at which the given element could be inserted while preserving sortedness. The 'Left' result indicates, that the 'EQ' element has been found, while the 'Right' result means otherwise. Value of the 'Right' result is in the [0,n] rang...
# LANGUAGE TupleSections # module Data.DAWG.Util ( binarySearch , findLastLE , combine ) where import Control.Applicative ((<$>)) import Data.Bits (shiftR, xor) import Data.Vector.Unboxed (Unbox) import qualified Control.Monad.ST as ST import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mu...
d74d10e3567adb367d196f71bfdc510440b8cef0a03d85651b2182151a4dc505
thicksteadTHpp/Obvius
functions-tutorial.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; File: functions-tutorial.lisp Author : ;;; Description: LISP functions and macros. Creation Date : 6/93 ;;; ---------------------------------------------------------------- Object - Based Vision and Image Understanding S...
null
https://raw.githubusercontent.com/thicksteadTHpp/Obvius/9a91673609def033539c9ebaf098e8f11eb0df6e/tutorials/lisp/functions-tutorial.lisp
lisp
File: functions-tutorial.lisp Description: LISP functions and macros. ---------------------------------------------------------------- It's syntax is as follows:- (defun <function-name> <parameter-list> <function-body>) The best way to explain functions is to go straight ahead and...
Author : Creation Date : 6/93 Object - Based Vision and Image Understanding System ( OBVIUS ) , Copyright 1988 , Vision Science Group , Media Laboratory , Massachusetts Institute of Technology . We define LISP functions with the DEFUN construct . (defun factorial-recursive (n)...
8dfc795504ddca8324a51ce7d307569c68eff70d8e01e634d8eef52db6e0af93
GaloisInc/cryptol
Main.hs
-- | -- Module : Main Copyright : ( c ) 2015 - 2016 Galois , Inc. -- License : BSD3 -- Maintainer : -- Stability : provisional -- Portability : portable # LANGUAGE ImplicitParams # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Main where import Control.D...
null
https://raw.githubusercontent.com/GaloisInc/cryptol/8cca24568ad499f06032c2e4eaa7dfd4c542efb6/bench/Main.hs
haskell
| Module : Main License : BSD3 Maintainer : Stability : provisional Portability : portable # LANGUAGE OverloadedStrings # | Evaluation options, mostly used by `trace`. Since the benchmarks likely do not use base, these don't matter very much in the setup phase in order to isolate typechecking...
Copyright : ( c ) 2015 - 2016 Galois , Inc. # LANGUAGE ImplicitParams # # LANGUAGE ScopedTypeVariables # module Main where import Control.DeepSeq ( force ) import Control.Monad.IO.Class( liftIO ) import qualified Data.Text as T import qualified Data.Text.IO as T import System.F...
cfd5c3e8d8757b1fea6482f280831bfe64f26178f7cfa8b7c33b4204ba14ad85
mfelleisen/7GUI
sub-canvas.rkt
#lang typed/racket/gui (provide SYNTAX #; (define-type-canvas TypeName% [#:minus-init (init-param:id)] method-spec ...) #; {method-spec = name+type || (augment . name+type)} ;; creates a sub-type Class specification for a canvas, -- subtracting init - paameters as init - param ... from those in Canva% ;; -- ad...
null
https://raw.githubusercontent.com/mfelleisen/7GUI/e3631e78ab12306ad81b560443913afa4b156dec/Typed/sub-canvas.rkt
racket
(define-type-canvas TypeName% [#:minus-init (init-param:id)] method-spec ...) {method-spec = name+type || (augment . name+type)} creates a sub-type Class specification for a canvas, -- adding method specifications method-spec ... -------------------------------------------------------------------------------------...
#lang typed/racket/gui (provide SYNTAX -- subtracting init - paameters as init - param ... from those in Canva% define-type-canvas) (require 7GUI/Typed/sub) (define-sub-type define-type-canvas Canvas% (parent (Instance Area-Container<%>)) (style Style* #:optional) (paint-callback (-> (In...
63f7b16030cb31f11ba5e96e9f80078374ca4635d47194ab37fbe56342fd6dc5
pixlsus/registry.gimp.org_static
RMA_path_blend.scm
; RMA_path_blend.scm by ; Version 1.3 ( 20120418 ) ; Description ; Fills a gradient blend between two paths . ; ; Changelog ; ; V1.1 added more math to find the orthagonal blending point for eash segment...yeah baby - I gots the maths! ; V1.2 reversing the the path selection reverses the bl...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/RMA_path_blend.scm
scheme
RMA_path_blend.scm Description Changelog V1.1 added more math to find the orthagonal blending point for eash segment...yeah baby - I gots the maths! V1.2 reversing the the path selection reverses the blend, and an overlap slider Supporting paths with multiple segments, so long as the mumber of segme...
by Version 1.3 ( 20120418 ) Fills a gradient blend between two paths . it under the terms of the GNU General Public License as published by The GNU Public License is available at (define (path_length p s) (let* ( (varStrokeObj 0) (varLength 0) (varCheck 0) ...
792c56c234392c1f8301a42042953527df51233f7e2446f721c713348f1feb3d
SKA-ScienceDataProcessor/RC
DDP.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # module DDP where import Control.Monad import Data.Int import qualified Data.Vector.Storable as S import qualified Data.ByteString.Lazy as BS import Data.Binary.Put import Data.Binary.IEEE754 import Data.Binary (Binary) impor...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS2/dna-programs/DDP.hs
haskell
# LANGUAGE DeriveDataTypeable # -------------------------------------------------------------- Workers for distributed dot product -------------------------------------------------------------- > Slice offset size | Split vector into set of slices. | Compute vector and send it back to master using unsafe send. ...
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # module DDP where import Control.Monad import Data.Int import qualified Data.Vector.Storable as S import qualified Data.ByteString.Lazy as BS import Data.Binary.Put import Data.Binary.IEEE754 import Data.Binary (Binary) import Data.Typeable (Typeable) import GH...