_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
c3847c91f82c5076bfaad604e9d186cb788cec7de8f5fec062b8c8a8093ecddf
GaloisInc/saw-script
UnionFind.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # | Module : Verifier . SAW.UnionFind Copyright : Galois , Inc. 2012 - 2015 License : : Stability : experimental Portability : non - portable ( language extensions ) Module : Verifier.SAW.UnionFind Copyright : Galois, Inc. 2012-201...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/fdb8987f09999439833d5cb573f69197bdf2cb7f/saw-core/src/Verifier/SAW/UnionFind.hs
haskell
* Class operations * Class descriptions | Equivalence class in union find structure. ^ Classes not equal to this class ^ Size of class ^ Class descriptor | Returns union find struct with no classes. | Monad with scoped union find support. | Runs union find computation. | Get class description | Creates a new...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # | Module : Verifier . SAW.UnionFind Copyright : Galois , Inc. 2012 - 2015 License : : Stability : experimental Portability : non - portable ( language extensions ) Module : Verifier.SAW.UnionFind Copyright : Galois, Inc. 2012-201...
f67c6390ceae8975fb8ff53fcb24816552758f9180a1c56f0617fb62a0814e35
anuragsoni/h2
push_promise_frame_test.ml
open H2 let wire = "000018050C0000000A060000000C746869732069732064756D6D79486F77647921" let wire' = "000011050c0000000a0000000c746869732069732064756d6d79" let extract_payload payload = let open Types in match payload with | PushPromiseFrame (s, m) -> (s, m) | _ -> failwith "INVALID FRAME" let parse_push_pro...
null
https://raw.githubusercontent.com/anuragsoni/h2/270d27cf54942e2b34932041827990ae49c89f85/test/push_promise_frame_test.ml
ocaml
open H2 let wire = "000018050C0000000A060000000C746869732069732064756D6D79486F77647921" let wire' = "000011050c0000000a0000000c746869732069732064756d6d79" let extract_payload payload = let open Types in match payload with | PushPromiseFrame (s, m) -> (s, m) | _ -> failwith "INVALID FRAME" let parse_push_pro...
aa18d162e67a7b7cd9d9b5bf05db196696d2770956d4aa38058ad8d820c3175a
janestreet/incr_dom
js_misc.ml
open! Core open Js_of_ocaml module Rect = struct type 'a t = { top : 'a ; left : 'a ; bottom : 'a ; right : 'a } [@@deriving sexp, bin_io, compare, fields] let map t ~f = { top = f t.top; left = f t.left; bottom = f t.bottom; right = f t.right } ;; let int_height t = t.bottom - t.to...
null
https://raw.githubusercontent.com/janestreet/incr_dom/7aaba451cf76dc493e218d738c6391882b55ef1b/src/js_misc.ml
ocaml
* Scrolls to the item marked as "keep-in-view" [viewport_rect_of_element el] gets bounding rect of [elt]. The bounding rect is relative to the view port * Simple wrapper for the binary-search functor * Searches through elements indexed from [0] to [length - 1]. Compute the n'th element in a normalized way, a...
open! Core open Js_of_ocaml module Rect = struct type 'a t = { top : 'a ; left : 'a ; bottom : 'a ; right : 'a } [@@deriving sexp, bin_io, compare, fields] let map t ~f = { top = f t.top; left = f t.left; bottom = f t.bottom; right = f t.right } ;; let int_height t = t.bottom - t.to...
39fdc74f58ed33338cbed90d576b43ec6d2c8ed37855d38590db8e591b065170
sdiehl/elliptic-curve
BrainpoolP384R1.hs
module Data.Curve.Weierstrass.BrainpoolP384R1 ( module Data.Curve.Weierstrass , Point(..) -- * BrainpoolP384R1 curve , module Data.Curve.Weierstrass.BrainpoolP384R1 ) where import Protolude import Data.Field.Galois import GHC.Natural (Natural) import Data.Curve.Weierstrass --------------------------------...
null
https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Weierstrass/BrainpoolP384R1.hs
haskell
* BrainpoolP384R1 curve ----------------------------------------------------------------------------- Types ----------------------------------------------------------------------------- | BrainpoolP384R1 curve. | Field of points of BrainpoolP384R1 curve. | Field of coefficients of BrainpoolP384R1 curve. # INLINABL...
module Data.Curve.Weierstrass.BrainpoolP384R1 ( module Data.Curve.Weierstrass , Point(..) , module Data.Curve.Weierstrass.BrainpoolP384R1 ) where import Protolude import Data.Field.Galois import GHC.Natural (Natural) import Data.Curve.Weierstrass data BrainpoolP384R1 type Fq = Prime Q type Q = 0x8cb91e82a...
03a3418e3fc426ef21f59d084fc536976616c18d62d7c22a0c4da6aa143e44fd
ermine-language/ermine
Global.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} -------------------------------------------------------------------- -- | Copyright : ( c ) 2011 License : BSD2 Maintainer : < > -- Stability : experimental -- Portability: non-portable (DeriveDataType...
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Syntax/Global.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # ------------------------------------------------------------------ | Stability : experimental Portability: non-portable (DeriveDataTypeable) ------------------------------------------------------------------ * Globals * Fixity * Combinators --------...
# LANGUAGE DeriveGeneric # Copyright : ( c ) 2011 License : BSD2 Maintainer : < > module Ermine.Syntax.Global ( Global(Global) , AsGlobal(..) , HasGlobal(..) , Assoc(..) , Fixity(..) , _Fixity , fixityLevel , unpackFixity , packFixity , glob ) where import Control.Applicat...
12d60147d08051f91772b819027098ee03d82a38e389899a2131cc144ba0c1fa
fetburner/Coq2SML
tags.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/ide/tags.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * module Script : sig val tab...
0f3addffbe4efd09b5e53a6008b328a6eefc805997e94c52a6603ecc176e6bf3
astanin/moo
Constraints.hs
module Moo.GeneticAlgorithm.Constraints ( ConstraintFunction , Constraint() , isFeasible -- *** Simple equalities and inequalities , (.<.), (.<=.), (.>.), (.>=.), (.==.) -- *** Double inequalities , LeftHandSideInequality() , (.<), (.<=), (<.), (<=.) -- ** Constrained initaliza...
null
https://raw.githubusercontent.com/astanin/moo/2e77a94a543d21360f7610c1ee0dda52813997c4/Moo/GeneticAlgorithm/Constraints.hs
haskell
*** Simple equalities and inequalities *** Double inequalities ** Constrained initalization ** Constrained selection Defining a constraint as a pair of function and its boundary value (vs just a boolean valued function) allows for estimating the degree of constraint violation when necessary. | Define constraint...
module Moo.GeneticAlgorithm.Constraints ( ConstraintFunction , Constraint() , isFeasible , (.<.), (.<=.), (.>.), (.>=.), (.==.) , LeftHandSideInequality() , (.<), (.<=), (<.), (<=.) , getConstrainedGenomes , getConstrainedBinaryGenomes , withDeathPenalty , withFinalDeathPen...
29d187aab79878ab291fdd5fc98149936bcaeabdfa3157af4801874eab7dd20d
srdqty/talc-3.0
dasm.ml
(**********************************************************************) ( c ) , , , August 1999 , all rights reserved . (**********************************************************************) (* dasm.ml * * Disassembles an object file and associated .to file t...
null
https://raw.githubusercontent.com/srdqty/talc-3.0/df83dd5ff0e2b189b13280ddae233d8277199350/talx86/dasm.ml
ocaml
******************************************************************** ******************************************************************** dasm.ml * * Disassembles an object file and associated .to file to produce a * TAL implementation. the annotated code blocks -- initialized with the types only get the code ...
( c ) , , , August 1999 , all rights reserved . let pp i = print_string ("Got here " ^ (string_of_int i) ^"\n"); flush stdout; () ;; open Tal;; open Talbin;; open Talbinin;; open Numtypes;; open Disobjfile;; open Utilities;; let debug f = let fmt = F...
ca5abdfb356347d5840e3418c7e61418eab59b4d7590c2592c1cb895501bce69
facebookincubator/hsthrift
Mangle.hs
Copyright ( c ) Facebook , Inc. and its affiliates . # LANGUAGE ViewPatterns # module Mangle ( mangle ) where import Control.Arrow import Control.Applicative hiding (Const) import Control.Monad import Data.Functor.Identity import Data.Function import Data.List import Data.Maybe import Data.Set (Set) import For...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/mangle/Mangle.hs
haskell
| Mangles a C++ signature into a string. ------------------------------------------------------------------------------ Signatures A signature consists of a name, a parameter list, and a set of cv-qualifiers. The return type is parsed, but is not included in the mangled name, so we don't store it. All mangled sy...
Copyright ( c ) Facebook , Inc. and its affiliates . # LANGUAGE ViewPatterns # module Mangle ( mangle ) where import Control.Arrow import Control.Applicative hiding (Const) import Control.Monad import Data.Functor.Identity import Data.Function import Data.List import Data.Maybe import Data.Set (Set) import For...
69e6a5dda63661c9bc4f669399f37de5b6ab1f120fc6dea78f51fe51e9a84f32
hopv/horsat2
alternatingAutomaton.mli
type state = string;; type index = int;; type formula = Bool of bool | Var of index * state | Or of formula * formula | And of formula * formula;; type t = { alpha : (string * int) list; st : state list; delta : ((state * string) * formula) li...
null
https://raw.githubusercontent.com/hopv/horsat2/22c8b3e5d6a5751f28824182d4f27728e3acbf82/alternatingAutomaton.mli
ocaml
or and
type state = string;; type index = int;; type formula = Bool of bool | Var of index * state | Or of formula * formula | And of formula * formula;; type t = { alpha : (string * int) list; st : state list; delta : ((state * string) * formula) li...
3418971d1487e0ec5a0b9da21f9b9bfd9e8e7f3c9c20847788ee64af8957a9c1
jvanbruegge/Megarecord
Internal.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeInType #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Data.Kind.Row.Internal where import Data.Kind (Type) import Fcf (Eval, Exp, Flip, ConstFn, FromMayb...
null
https://raw.githubusercontent.com/jvanbruegge/Megarecord/4b62620a57edf4162d4ac07ec0f527d54872d010/src/Data/Kind/Row/Internal.hs
haskell
# LANGUAGE GADTs # # LANGUAGE TypeInType # Used for providing a total order over types The core type level Map datatype Combinators
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Data.Kind.Row.Internal where import Data.Kind (Type) import Fcf (Eval, Exp, Flip, ConstFn, FromMaybe, type (=<<)) import GHC.TypeLits (Symbol, Nat, Cm...
82def8d13e3819297ded099cbc119957cc3e9bc44d386f0ee1dbfa603bcf84f2
nikodemus/SBCL
defpackage.lisp
(defpackage "SB-BSD-SOCKETS-INTERNAL" (:nicknames "SOCKINT") (:shadow close listen) (:shadowing-import-from "SB-KERNEL" with-array-data) (:use "COMMON-LISP" "SB-ALIEN" "SB-EXT")) (defpackage "SB-BSD-SOCKETS" (:export socket local-socket local-abstract-socket inet-socket make-local-socket make-inet...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/contrib/sb-bsd-sockets/defpackage.lisp
lisp
not sure if these are really good names or not all socket options are also exported, by code in sockopt.lisp other errno-based socket errors are exported by code in sockets.lisp gethostbyname/gethostbyaddr are generally not thread safe. POSIX RFC to be thread-safe. If it seems to be available, use it. Unfortun...
(defpackage "SB-BSD-SOCKETS-INTERNAL" (:nicknames "SOCKINT") (:shadow close listen) (:shadowing-import-from "SB-KERNEL" with-array-data) (:use "COMMON-LISP" "SB-ALIEN" "SB-EXT")) (defpackage "SB-BSD-SOCKETS" (:export socket local-socket local-abstract-socket inet-socket make-local-socket make-inet...
5abd23220088a245cec0576097130edbdffdc2ea89db764cf4dd4dae3fcbec33
brendanhay/gogol
Update.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-sqladmin/gen/Gogol/SQLAdmin/Sql/Instances/Update.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. * Resource ** Constructing a Request 'SqlInstancesUpdate' request conforms to. | Updates settings of a Cloud SQL instance. U...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
d6680d378c86a4926d8715dd84e59e9c51a63404a0a989fa02efd7f601c4b8aa
emqx/mria
mria_rlog_replica.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/mria/fcec1873582c3a66c960da6c7f6d48ac73c64c13/src/mria_rlog_replica.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mria_rlog_replica). -behaviour(gen_statem). -export([start_link/2]). -export([init/1,...
a49a4f81bea6e845b8d2a7f1f33be4344ef08b4a9f48dae5ee088b3e96de96f6
karen/haskell-book
Semigroup.hs
import Data.Semigroup import Test.QuickCheck(quickCheck, Arbitrary, arbitrary, frequency, elements) data Trivial = Trivial deriving (Eq, Show) instance Semigroup Trivial where _ <> _ = Trivial instance Arbitrary Trivial w...
null
https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch15/Semigroup.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
import Data.Semigroup import Test.QuickCheck(quickCheck, Arbitrary, arbitrary, frequency, elements) data Trivial = Trivial deriving (Eq, Show) instance Semigroup Trivial where _ <> _ = Trivial instance Arbitrary Trivial w...
fc3f6462612feaf9bcc34f3f02954a09688fbeba3387ad8c38705b43c25626ed
plandes/cisql
core.clj
(ns ^{:doc "Command line entry point." :author "Paul Landes"} zensols.cisql.core (:require [clojure.string :as s]) (:require [zensols.actioncli.log4j2 :as lu] [zensols.actioncli.parse :as parse] [zensols.cisql.conf :as conf] [zensols.cisql.version :as ver]) (:gen-clas...
null
https://raw.githubusercontent.com/plandes/cisql/8001864f1596d191386a3787b49e8a640705fee2/src/clojure/zensols/cisql/core.clj
clojure
(ns ^{:doc "Command line entry point." :author "Paul Landes"} zensols.cisql.core (:require [clojure.string :as s]) (:require [zensols.actioncli.log4j2 :as lu] [zensols.actioncli.parse :as parse] [zensols.cisql.conf :as conf] [zensols.cisql.version :as ver]) (:gen-clas...
fc396334e75e8da88fe38674e815f427b36cc3d1dcac5908f67e37caa6c2d646
oakes/play-cljc-examples
core.cljc
(ns super-koalio.core (:require [super-koalio.utils :as utils] [super-koalio.move :as move] [clojure.edn :as edn] [play-cljc.gl.core :as c] [play-cljc.gl.entities-2d :as e] [play-cljc.transforms :as t] #?(:clj [play-cljc.macros-java :refer [gl m...
null
https://raw.githubusercontent.com/oakes/play-cljc-examples/0063e0ee234f2a806d0de625b597fdd84f119aaf/super-koalio/src/super_koalio/core.cljc
clojure
allow transparency in images add it to the state load the tiled map render the blue background render the tiled map get the current player image to display render the player return the game map
(ns super-koalio.core (:require [super-koalio.utils :as utils] [super-koalio.move :as move] [clojure.edn :as edn] [play-cljc.gl.core :as c] [play-cljc.gl.entities-2d :as e] [play-cljc.transforms :as t] #?(:clj [play-cljc.macros-java :refer [gl m...
60f43bc2611818294924de7945299bb8089c21c686b1c34e98d457a9b8f29138
semilin/layoup
sturdE.lisp
(MAKE-LAYOUT :NAME "sturdE" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL :KEYBOARD NIL)
null
https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/sturdE.lisp
lisp
(MAKE-LAYOUT :NAME "sturdE" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL :KEYBOARD NIL)
50703975b28b22e92606317e6d2dde00be893fd47f84eac963bcd8f531fc82e4
TeMPOraL/alice
suites.lisp
(in-package #:alice-tests) (defparameter *suites* '()) (defun run-all () (mapc 'fiveam:run! *suites*) (format t "DONE!~%")) (defun add-suite (suite) (setf *suites* (remove-duplicates (append (list suite) *suites*))))
null
https://raw.githubusercontent.com/TeMPOraL/alice/4621a53ccd459bebf0b34c531dab49f7b42f35c7/tests/suites.lisp
lisp
(in-package #:alice-tests) (defparameter *suites* '()) (defun run-all () (mapc 'fiveam:run! *suites*) (format t "DONE!~%")) (defun add-suite (suite) (setf *suites* (remove-duplicates (append (list suite) *suites*))))
82b7353abb7cf1b7fe12dadcaa1f912633a72087c4f832572a288f88b73a7f16
repl-electric/.sonic-pi
init.sps
#key: init #point_line:1 #point_index:0 # -- ["instruments","shaderview","experiments", "log"].each{|f| load "/Users/josephwilk/Workspace/repl-electric/live-coding-space/lib/#{f}.rb"}; _=nil load_snippets("~/.sonic-pi/snippets/")
null
https://raw.githubusercontent.com/repl-electric/.sonic-pi/a00c733f0a5fa1fa0aa65bf06fe7ab71654d2da9/snippets/init.sps
scheme
_=nil
#key: init #point_line:1 #point_index:0 # -- load_snippets("~/.sonic-pi/snippets/")
01a7b3e7c9541891869d6a1fdf6380f2a16b95e7e08e96579f3d889f5194e9f9
jacobobryant/flub
core.cljc
(ns flub.core (:require [clojure.pprint :as pp] [clojure.set :as set] [clojure.spec.alpha :as s] [clojure.string :as str] [clojure.walk :refer [postwalk]] [clojure.tools.namespace.repl :as tn-repl] #?@(:clj [[clojure.java.shell :as shell]]))) (defonce system (atom nil)) (defn refresh [] ...
null
https://raw.githubusercontent.com/jacobobryant/flub/704d79fd55237ef7babdb97b37947675d0c8d2c2/core/src/flub/core.cljc
clojure
otherwise, throws an exception."
(ns flub.core (:require [clojure.pprint :as pp] [clojure.set :as set] [clojure.spec.alpha :as s] [clojure.string :as str] [clojure.walk :refer [postwalk]] [clojure.tools.namespace.repl :as tn-repl] #?@(:clj [[clojure.java.shell :as shell]]))) (defonce system (atom nil)) (defn refresh [] ...
88a3eaec3ced3da773727d1fd48f975abe3f075499755f4099ab77fe03c27b76
HeinrichApfelmus/reactive-banana
Test.hs
# LANGUAGE RecursiveDo # {----------------------------------------------------------------------------- reactive-banana ------------------------------------------------------------------------------} module Reactive.Banana.Prim.Mid.Test where import Reactive.Banana.Prim.Mid main :: IO () main = test_space1 {----...
null
https://raw.githubusercontent.com/HeinrichApfelmus/reactive-banana/440e9df76d66c2e5e0d550889d8da36fe3d2c7d2/reactive-banana/src/Reactive/Banana/Prim/Mid/Test.hs
haskell
---------------------------------------------------------------------------- reactive-banana ----------------------------------------------------------------------------- ---------------------------------------------------------------------------- Functionality tests --------------------------------------------...
# LANGUAGE RecursiveDo # module Reactive.Banana.Prim.Mid.Test where import Reactive.Banana.Prim.Mid main :: IO () main = test_space1 test_accumL1 :: Pulse Int -> BuildIO (Pulse Int) test_accumL1 p1 = liftBuild $ do p2 <- mapP (+) p1 (l1,_) <- accumL 0 p2 let l2 = mapL const l1 applyP l2 p1 test...
4cb4dbaa675fe4b0febb9df8ebcc8aa49876fea4384506c41bfcc5ee009454eb
nasser/magic
run.clj
(ns run (:refer-clojure :exclude [compile]) (:require [magic.core :as magic] [magic.analyzer :as ana] [mage.core :as il])) (defn compile "Compile file to file.dll using magic" [file] (il/emit! (il/assembly+module (str file) (-> (str file) (slurp :encoding "utf8") ...
null
https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/run.clj
clojure
(ns run (:refer-clojure :exclude [compile]) (:require [magic.core :as magic] [magic.analyzer :as ana] [mage.core :as il])) (defn compile "Compile file to file.dll using magic" [file] (il/emit! (il/assembly+module (str file) (-> (str file) (slurp :encoding "utf8") ...
f672ef63e55b4f11fa2bdc16fccbacfac47cd5d190491ebdb56445fb0a4391d3
ruliana/racket-examples
custodians.rkt
#lang racket (define (open-and-forget) (define out (open-output-file "/tmp/test.txt" #:exists 'truncate)) (displayln "writing!") (writeln "can I write?" out)) ; === How? === (define (do-work a-function) (define cust (make-custodian)) (define (start) (displayln "->")) (define ...
null
https://raw.githubusercontent.com/ruliana/racket-examples/688293c86132f3b5c924360d53238ca352d4cf5b/custodians.rkt
racket
=== How? === (open-and-forget)
#lang racket (define (open-and-forget) (define out (open-output-file "/tmp/test.txt" #:exists 'truncate)) (displayln "writing!") (writeln "can I write?" out)) (define (do-work a-function) (define cust (make-custodian)) (define (start) (displayln "->")) (define (finish) (d...
b4503e5bb5d393f834da0608239f67a0ecadc3174c3d1d66f4654552e0379e1a
RefactoringTools/HaRe
D3.expected.hs
module AddOneParameter.D3(sumSquares,sumSquares_y) where {- add parameter 'y' to 'sumSquares'. 'sumSquares_y_1' to be added to the export list -} sumSquares y (x:xs) = sq x + (sumSquares y) xs sumSquares y [] = 0 sumSquares_y = undefined sq x = x ^ pow pow =2
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/AddOneParameter/D3.expected.hs
haskell
add parameter 'y' to 'sumSquares'. 'sumSquares_y_1' to be added to the export list
module AddOneParameter.D3(sumSquares,sumSquares_y) where sumSquares y (x:xs) = sq x + (sumSquares y) xs sumSquares y [] = 0 sumSquares_y = undefined sq x = x ^ pow pow =2
48e679f95c12d94e94fc21fc644f395e4b4d9d9d2b4629f394b9cb18c8cb1d12
weblocks-framework/weblocks
boolean.lisp
(in-package :weblocks-test) ;;; Test boolean render-view-field-value (deftest-html boolean-render-view-field-value-1 (render-view-field-value nil (make-instance 'predicate-presentation) (make-instance 'form-view-field :slot-name 'predicat...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/test/views/types/boolean.lisp
lisp
Test boolean render-view-field-value Test boolean print-view-field-value Test checkbox render-view-field-value Test boolean parse-view-field-value Test boolean typespec->view-field-presentation
(in-package :weblocks-test) (deftest-html boolean-render-view-field-value-1 (render-view-field-value nil (make-instance 'predicate-presentation) (make-instance 'form-view-field :slot-name 'predicate) (find-vi...
5216bdb5b6f83e5f6b6426abb78512d308e8b2fedd38fdccd39cd16af4b4689f
census-instrumentation/opencensus-erlang
oc_sampler_probability.erl
%%%------------------------------------------------------------------------ Copyright 2017 , OpenCensus Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless...
null
https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/src/oc_sampler_probability.erl
erlang
------------------------------------------------------------------------ you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o...
Copyright 2017 , OpenCensus Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @doc This sampler assumes the lower 64 bits of the trace i d are lower 64 bits of the trace i d to for the sampling decision . -module(...
d932318cce0cf322a74d1296511a1e34635bcbda72fe586094f0717695fa2f3e
hkupty/carbon.html
symbols_test.clj
(ns carbon.symbols-test (:require [clojure.test :refer [deftest testing is]] [matcher-combinators.test] ;; adds support for `match?` and `thrown-match?` in `is` expressions [matcher-combinators.matchers :as m] [clojure.string :as str] [clojure.edn :as edn] [...
null
https://raw.githubusercontent.com/hkupty/carbon.html/beff9a6ef6eb158cdcd099da7fe6b6895434124c/test/carbon/symbols_test.clj
clojure
adds support for `match?` and `thrown-match?` in `is` expressions
(ns carbon.symbols-test (:require [clojure.test :refer [deftest testing is]] [matcher-combinators.matchers :as m] [clojure.string :as str] [clojure.edn :as edn] [carbon.symbols :as symbols])) (deftest carbon-symbols (testing "We can search symbols in a kw map" (i...
45fc42fd84d10b89deaced3177fd9babd1aa72cbb134801c41d399abf49347ee
candera/causatum
event_streams_test.clj
(ns causatum.event-streams-test (:require [causatum.event-streams :refer :all] [causatum.util] [clojure.data.generators :as dg] [clojure.set :as set] [clojure.test :refer :all])) ;; The delay operations we use during the tests (def delay-ops {:constant (fn [rtime del...
null
https://raw.githubusercontent.com/candera/causatum/fa2e22c052042473d07b6df73caac1df8b0c608a/test/causatum/event_streams_test.clj
clojure
The delay operations we use during the tests Yes it's weird that we're testing a private function. It's even weirder that that function exists, but if there's more than one item in :future-events, it means we're keeping track of too many things. v0.1.0 had a bug in it that led to memory growth over time. It's imp...
(ns causatum.event-streams-test (:require [causatum.event-streams :refer :all] [causatum.util] [clojure.data.generators :as dg] [clojure.set :as set] [clojure.test :refer :all])) (def delay-ops {:constant (fn [rtime delay] delay) :rand-exp (fn [rtime mean] (causat...
69bd7410f98c59465dcb26872ea6818471cc30027f1bdfa7ef666940a6eb719d
MaskRay/OJHaskell
Center Alignment.hs
ast n = replicate n '*' spc n = replicate n ' ' f w [] _ = [] f w (l:ls) left = let n = (w-length l) `div` 2 in if (w-length l) `mod` 2 == 0 then ("*"++spc n++l++spc n++"*") : f w ls left else ("*"++spc (n+left)++l++spc (n+1-left)++"*") : f w ls (1-left) main = do contents <- return . li...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Codeforces/5/Center%20Alignment.hs
haskell
ast n = replicate n '*' spc n = replicate n ' ' f w [] _ = [] f w (l:ls) left = let n = (w-length l) `div` 2 in if (w-length l) `mod` 2 == 0 then ("*"++spc n++l++spc n++"*") : f w ls left else ("*"++spc (n+left)++l++spc (n+1-left)++"*") : f w ls (1-left) main = do contents <- return . li...
394b4c1a2960038c013675e48276f080b07ebdd53e0018ca7429bd2ce13c5869
wireapp/wire-server
DelayQueue.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/d6b6c52b2219efb5fedb8945a66a52016a116186/services/gundeck/src/Gundeck/Util/DelayQueue.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Gundeck.Util.DelayQueue ...
d7b0b69d56ed795adbbbe51c52b9c2c4d71ea28f64471b1c135b21021633b3cc
sebashack/servantRestfulAPI
ResponseParser.hs
# LANGUAGE OverloadedStrings # module HelperLibs.ElasticSearch.ResponseParser where import Data.Aeson import Data.Aeson.Types import qualified Data.Text as T import qualified Data.Vector as V import qualified Data.Set as S import qualified Data.CountryCodes as CC import qualified Domains.BookingDomain.Property....
null
https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/HelperLibs/ElasticSearch/ResponseParser.hs
haskell
END of BASIC JSON parsers -- This function receives an Object (json) and parses a Property if possible. Obligatory Attributes Optional Attributes Given an Object (json) with several properties, this function parses it into a list of Properties. Obligatory Attributes Optional fields This function receive...
# LANGUAGE OverloadedStrings # module HelperLibs.ElasticSearch.ResponseParser where import Data.Aeson import Data.Aeson.Types import qualified Data.Text as T import qualified Data.Vector as V import qualified Data.Set as S import qualified Data.CountryCodes as CC import qualified Domains.BookingDomain.Property....
44f4e09d70fa843c6d6b63b5e91752e0c600863f2148670be02880830e6fa75d
idontgetoutmuch/HasBayes
PopGrowthMCMCMain.hs
{-# OPTIONS_GHC -Wall #-} # OPTIONS_GHC -fno - warn - name - shadowing # # OPTIONS_GHC -fno - warn - type - defaults # # OPTIONS_GHC -fno - warn - unused - do - bind # # OPTIONS_GHC -fno - warn - missing - methods # # OPTIONS_GHC -fno - warn - orphans # # LANGUAGE ViewPattern...
null
https://raw.githubusercontent.com/idontgetoutmuch/HasBayes/43c7d09b8ee839dba5ed8f18e17110135d20b93d/PopGrowthMCMCMain.hs
haskell
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - name - shadowing # # OPTIONS_GHC -fno - warn - type - defaults # # OPTIONS_GHC -fno - warn - unused - do - bind # # OPTIONS_GHC -fno - warn - missing - methods # # OPTIONS_GHC -fno - warn - orphans # # LANGUAGE ViewPatterns # module Main ( main ...
9bf58246e3b1ab33d208e3a255a36debb627bade2c6816ba16f33b383d62520d
serokell/ariadne
TxMetaStorageSpecs.hs
{-# LANGUAGE RankNTypes #-} module TxMetaStorageSpecs (txMetaStorageSpecs) where import Ariadne.Wallet.Cardano.Kernel.DB.TxMeta import qualified Data.List as List import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Set as Set import Data.Text.Buildable (build) import qualified Pos.Core as Core imp...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/test/backend/TxMetaStorageSpecs.hs
haskell
# LANGUAGE RankNTypes # | Handy combinator which yields a fresh database to work with on each spec. arrangement of their inputs & outputs. | Synthetic @newtype@ used to generate unique inputs and outputs as part of 'genMetas'. The reason why it is necessary is because the stock implementation equal if their elemen...
module TxMetaStorageSpecs (txMetaStorageSpecs) where import Ariadne.Wallet.Cardano.Kernel.DB.TxMeta import qualified Data.List as List import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Set as Set import Data.Text.Buildable (build) import qualified Pos.Core as Core import Formatting (bprint) impo...
c041548a47ba2ff832212bca91789eb65be8a4648c0354b7ea31768e171ae843
processone/tsung
mochiweb_headers.erl
@author < > 2007 Mochi Media , Inc. %% %% Permission is hereby granted, free of charge, to any person obtaining a %% copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation %% the rights to use, copy, modify, merge, ...
null
https://raw.githubusercontent.com/processone/tsung/e9babe2acfb4298e3b51bd56886561b052979884/src/lib/mochiweb_headers.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright noti...
@author < > 2007 Mochi Media , Inc. to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
3949890ce5ded658c69f95f540b62f68a9dbde3c01982ba4fa12b8598ef8375a
theodormoroianu/SecondYearCourses
lab6-sol_20210115150000.hs
-- / import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115150000.hs
haskell
/
import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l + 1 -...
302e1f12d2e80e9d13bdf34d46217af1ae181bc67a1c271c01e15d5e80053c32
HunterYIboHu/htdp2-solution
ex477-arrangements.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 ex477-arrangements) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construct...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter5/Section29-algorithm-that-backtrack/ex477-arrangements.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of X] -> [List-of [List-of X]] creates a list of all rearrangements of the items in w Questions Q1: What is a trivially solvable problem? A1: when w is an empty list. Q2: How are trivial solutions solved? A2: it returns '(...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex477-arrangements) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (arrangements w) (cond [(emp...
c6598f216b15509144202030de2f6cb7289eacd39ac925fa8c43dca665cc2a10
turtl/api
app.lisp
(in-package :turtl) ;; this is responsible for checking user auth ;; TODO: if this ever does MORE than just check auth, be sure to split into ;; multiple functions (add-hook :pre-route (lambda (req res) (with-promise (res rej) (let* ((auth (get-header (request-headers req) :authorization)) ...
null
https://raw.githubusercontent.com/turtl/api/20ab4cc91128921300913b885eb1e201a5e0fc3f/controllers/app.lisp
lisp
this is responsible for checking user auth TODO: if this ever does MORE than just check auth, be sure to split into multiple functions random wait time (0-2ms) to prevent timing attacks on auth this is a signup or file serve. let it fly with no auth not a signup, test the auth... extension, which uses reso...
(in-package :turtl) (add-hook :pre-route (lambda (req res) (with-promise (res rej) (let* ((auth (get-header (request-headers req) :authorization)) (path (quri:uri-path (request-uri req))) (method (request-method req)) (auth-fail-fn (lambda () ...
72bc72a2fb16a92d5ca73bf8c5ce3ae33c45c5decb15da91b59103c5ed69cff0
Spivoxity/obc-3
data.mli
* data.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 - -2016 J. M. Spivey * 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 ....
null
https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/debugger/data.mli
ocaml
dynvalue -- type of runtime values def_value -- get value of a definition fDynVal -- format a dynamic value fLongVal -- format a dynamic value, printing its fields if a record
* data.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 - -2016 J. M. Spivey * 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 ....
9e8c2d71007c991bc8ca2136bb05f56e43e6359ca7d02b885688157df70dfe3e
lisp/de.setf.xml
namespace.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:ni...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/sweet-jpl-nasa-gov/ontology/data-owl/namespace.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (xqdm:find-namespace "#" :if-does-not-exist :load)
(in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:nicknames) (:export "Acces...
2fe0857ddd7119e3067c3444174c7c36d1f9eaae98becbc01452846af74fd1a2
oscoin/oscoin
Options.hs
# LANGUAGE UndecidableInstances # module Oscoin.P2P.Disco.Options ( Options(..) , discoParser , discoOpts , renderDiscoOpts , CanRenderNetwork , OptNetwork(..) , showOptNetwork , evalOptions , evalYesNo ) where import Oscoin.Prelude hiding (option) import qualified...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/P2P/Disco/Options.hs
haskell
only for testing currently nb. Eq + Show for testing
# LANGUAGE UndecidableInstances # module Oscoin.P2P.Disco.Options ( Options(..) , discoParser , discoOpts , renderDiscoOpts , CanRenderNetwork , OptNetwork(..) , showOptNetwork , evalOptions , evalYesNo ) where import Oscoin.Prelude hiding (option) import qualified...
ac50e752e19e3fb4a38ab7d514cd2eac2b3a07c018375498ff1312b1d748c908
ssrihari/kosha
ragam.clj
(ns kosha.app.ragam (:require [kosha.app.view :as view] [kosha.db.search :as db-search])) (defn show [{:keys [params] :as request}] (let [ragam (first (db-search/ragams (:name params)))] (view/html-skeleton [])))
null
https://raw.githubusercontent.com/ssrihari/kosha/1d7a1858ec6578b146dca4b842020f9a093d479d/src/kosha/app/ragam.clj
clojure
(ns kosha.app.ragam (:require [kosha.app.view :as view] [kosha.db.search :as db-search])) (defn show [{:keys [params] :as request}] (let [ragam (first (db-search/ragams (:name params)))] (view/html-skeleton [])))
27b08792921606b263a9089885f17c311f4200607ccaf14c2a8152b29e915ef2
binghe/cl-net-snmp
null.lisp
;;;; -*- Mode: Lisp -*- $ Id$ (in-package :asn.1) (defmethod plain-value ((object (eql nil)) &key default) (declare (ignore object default)) nil) (defmethod ber-equal ((a (eql nil)) (b (eql nil))) (declare (ignore a b)) t) ;;; NULL (:null) (defmethod ber-encode ((value (eql nil))) (declare (ignore value...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/runtime/null.lisp
lisp
-*- Mode: Lisp -*- NULL (:null)
$ Id$ (in-package :asn.1) (defmethod plain-value ((object (eql nil)) &key default) (declare (ignore object default)) nil) (defmethod ber-equal ((a (eql nil)) (b (eql nil))) (declare (ignore a b)) t) (defmethod ber-encode ((value (eql nil))) (declare (ignore value)) (concatenate 'vector ...
b530acfdb08f4807338353f1bcb91fdb5cc0c7992f57521e6415e31b314e9ee4
typeclasses/dsv
IO.hs
# LANGUAGE NoImplicitPrelude # module DSV.IO ( MonadIO (liftIO), MonadThrow (throwM), MonadCatch, MonadMask , IOMode (ReadMode) , SafeT, runSafeT , withFile , Exception (displayException), throw , Handle ) where -- base import Control.Exception (Exception (displayException), throw) import Control.Monad....
null
https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/IO.hs
haskell
base pipes-safe
# LANGUAGE NoImplicitPrelude # module DSV.IO ( MonadIO (liftIO), MonadThrow (throwM), MonadCatch, MonadMask , IOMode (ReadMode) , SafeT, runSafeT , withFile , Exception (displayException), throw , Handle ) where import Control.Exception (Exception (displayException), throw) import Control.Monad.IO.Class...
4912486c799dc1c5104c22162ecd43104d36d53ff6c214089e35534c5fbc397f
clf/lollimon
modes.ml
type mode = [Unknown | Input | Output of bool]; value allModes = ref []; value parseModes p = let myfail () = do { ps 0 "raising bad mode declaration\n"; raise (Stream.Error "Bad mode declaration")} in let rec go = fun [ Const "o" 0 [] -> parser [ [: `(Kwd ".",_) :] -> [] | [: :] -> myfail (...
null
https://raw.githubusercontent.com/clf/lollimon/bc4290f5bb221c514b2a66ec427e85eec498c7be/src/modes.ml
ocaml
** Const with level -2 are just for mode checking ** ** checkMode should only be called right after (right after residuating) parsing so there shouldn't be any actual EVars in head or body ** ** EVars with level -1 are just for mode checking ** ** do f (which expects a mode constant) to each arg ** ** ignore impl...
type mode = [Unknown | Input | Output of bool]; value allModes = ref []; value parseModes p = let myfail () = do { ps 0 "raising bad mode declaration\n"; raise (Stream.Error "Bad mode declaration")} in let rec go = fun [ Const "o" 0 [] -> parser [ [: `(Kwd ".",_) :] -> [] | [: :] -> myfail (...
1d387df3e2f1188a7b1eb4f48c9afcf0b74dc2260c355225f33a1aa501b270fa
bennn/dissertation
mixer.rkt
#lang typed/racket/base (require require-typed-check "typed-data.rkt" (for-syntax racket/base) (only-in racket/list first second rest)) (require/typed/check "array-struct.rkt" [array? (-> Array Boolean)] [array-shape (-> Array Indexes)] [array-default-strict! (-> Array Void)] [unsaf...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/math-test/synth/s-d/mixer.rkt
racket
-- array-pointwise Weighted sum of signals, receives a list of lists (signal weight). Shorter signals are repeated to match the length of the longest. repeat short signals
#lang typed/racket/base (require require-typed-check "typed-data.rkt" (for-syntax racket/base) (only-in racket/list first second rest)) (require/typed/check "array-struct.rkt" [array? (-> Array Boolean)] [array-shape (-> Array Indexes)] [array-default-strict! (-> Array Void)] [unsaf...
030c409eb266c2e7b2dc3029ac66f333f2370b32b0f67342a324632343816858
z0w0/helm
SDL.hs
# LANGUAGE TypeFamilies # | Contains the SDL engine implementation of . module Helm.Engine.SDL ( -- * Types SDLEngine , SDLEngineConfig(..) -- * Startup , defaultConfig , startup , startupWith -- * Asset Loading , withImage ) where import Helm.Engine.SDL.Engine ( SDLEngine , SDLEngin...
null
https://raw.githubusercontent.com/z0w0/helm/e2d8745d573c8b775aa390b70c597722ec102e48/src/Helm/Engine/SDL.hs
haskell
* Types * Startup * Asset Loading
# LANGUAGE TypeFamilies # | Contains the SDL engine implementation of . module Helm.Engine.SDL ( SDLEngine , SDLEngineConfig(..) , defaultConfig , startup , startupWith , withImage ) where import Helm.Engine.SDL.Engine ( SDLEngine , SDLEngineConfig(..) , defaultConfig , startup , startupWith ...
6a6f6ed04c175a72742a244e2b0dd7b4201c30413d26224bce0533614caf74cc
svdm/ClojureGP
test_generate.clj
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) which ;; can be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by t...
null
https://raw.githubusercontent.com/svdm/ClojureGP/266e501411b37297bdeb082913df63ececa8515c/test/cljgp/test_generate.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns test.cljgp.test-generate (:use clojure.test cljgp.generate cljgp.util) (:refer test.helpers)) (deftest test-generate-tree (testing "grow method" (le...
11964d498991273951bf1c973d96697c823a309b1bbd52700bd27d91196835b9
jellelicht/guix
llvm.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2015 < > Copyright © 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/llvm.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 © 2014 < > Copyright © 2015 < > Copyright © 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages llvm) #:use-module (guix packa...
d70cadebd6642bb14f797ac55c5209460f4358598b98b20d032d55102bcbf012
facebook/pyre-check
sources.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/83be58c61b14dd0812e07a75bdbff756d57db47c/source/interprocedural_analyses/taint/sources.ml
ocaml
Sources: defines a source kind in our taint representation. * * For instance, `TaintSource[Header]` is represented as `Sources.NamedSource "Header"`. Invariant: concatenation of local @ global is non-empty. Invariant: not a transform.
* 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...
ded0559c579ebbb308208511035d793fac13612085a482d995032b1ca7992929
tud-fop/vanda-haskell
PennToSentenceCorpus.hs
----------------------------------------------------------------------------- -- | Module : VandaCLI.PennToSentenceCorpus Copyright : ( c ) Technische Universität Dresden 2018 -- License : BSD-style -- -- Stability : unknown -- Portability : portable -------------------------------------------...
null
https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/executable/VandaCLI/PennToSentenceCorpus.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Stability : unknown Portability : portable ---------------------------------------------------------------------------
Module : VandaCLI.PennToSentenceCorpus Copyright : ( c ) Technische Universität Dresden 2018 module VandaCLI.PennToSentenceCorpus where import Vanda.Corpus.Penn.Text import qualified Data.Text.Lazy.IO as TIO import Data.Tree import System.Console.CmdArgs.Explicit import System.Console.CmdArgs.Explic...
d2de1d5af3886d5ba84ebfab07062d601bba006265533461fd6031b94854f22b
zellige/hs-geojson
GeoLine.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # ------------------------------------------------------------------- -- | Module : Data . Geospatial . Internal . Geometry . GeoLine Copyright : ( C ) 2014 - 2021 HS - GeoJSON Project -- License : BSD-style (see...
null
https://raw.githubusercontent.com/zellige/hs-geojson/fb66e4f1b016d8e73408d9faa0945f61253131fa/src/Data/Geospatial/Internal/Geometry/GeoLine.hs
haskell
# LANGUAGE DeriveAnyClass # ----------------------------------------------------------------- | License : BSD-style (see the file LICENSE.md) * Type * Lenses instances parseJSON :: Value -> Parser a
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # Module : Data . Geospatial . Internal . Geometry . GeoLine Copyright : ( C ) 2014 - 2021 HS - GeoJSON Project Maintainer : module Data.Geospatial.Internal.Geometry.GeoLine GeoLine (..), unGeoLine, ) where import Control.DeepSeq ...
2adf85f1a0b8767cbfafb54bd74a3d8b36a1fbb5bf284a54ef02725e4a710305
screenshotbot/screenshotbot-oss
audit-log.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/pro/bitbucket/audit-log (:nicknames :screenshotbot/bitbu...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/a44533e7f11925a49cd11ba6ebb071e43d1961e0/src/screenshotbot/bitbucket/audit-log.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. For migration See test-parses-error-correctly If we can't parse an actual response, just use the
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/pro/bitbucket/audit-log (:nicknames :screenshotbot/bitbucket/audit-log) (:use #:cl) (:import-from #:bknr.indic...
7ddb68b99842ecf7f4967f3cacba541dc6bd555e20f954fdad1bb128dd45f558
flotsfacetieux/cl-entity-system
tests.lisp
(in-package #:cl-entity-system-tests) (defclass flag (component) ((id :accessor flag-id :initarg :id))) (defclass direction (component) ()) (defclass c1 (component) ()) (defclass c2 (component) ()) (defclass c3 (component) ()) (defclass geometry (component) ()) (defclass render-system (system)...
null
https://raw.githubusercontent.com/flotsfacetieux/cl-entity-system/6f4e00722f1a666c563e457bfbd7c03924f9e0b8/tests.lisp
lisp
(in-package #:cl-entity-system-tests) (defclass flag (component) ((id :accessor flag-id :initarg :id))) (defclass direction (component) ()) (defclass c1 (component) ()) (defclass c2 (component) ()) (defclass c3 (component) ()) (defclass geometry (component) ()) (defclass render-system (system)...
e6da12fa6b6b2d7d50df9146ea96bcadbda5802b9957004ed939f1ef998d7955
pink-gorilla/webly
date.cljc
(ns webly.date "Time calculation and formatting helpers" (:require #?(:clj [java-time] :cljs [cljs-time.core :as cljs-time]) #?(:clj [java-time.format]))) #?(:cljs (def date-time cljs-time/date-time) :clj (defn date-time [& args] (java-time/with-zone-same-instant (apply java-time/...
null
https://raw.githubusercontent.com/pink-gorilla/webly/36c7d6c15c96daed4f95c55d0721e9d612e9eb77/src-unused/date.cljc
clojure
(s/fdef time-ago :args (s/cat :instant (s/alt :instant java-time/instant? :str string?))
(ns webly.date "Time calculation and formatting helpers" (:require #?(:clj [java-time] :cljs [cljs-time.core :as cljs-time]) #?(:clj [java-time.format]))) #?(:cljs (def date-time cljs-time/date-time) :clj (defn date-time [& args] (java-time/with-zone-same-instant (apply java-time/...
a352923099e422ae42f552a4506cfed9478f26c5ccd6b3cdc1d20260f86479de
larcenists/larceny
mutable-pairs.sps
(import (tests r6rs mutable-pairs) (tests scheme test) (scheme write)) (display "Running tests for (rnrs mutable-pairs)\n") (run-mutable-pairs-tests) (report-test-results)
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/R7RS/Lib/tests/r6rs/run/mutable-pairs.sps
scheme
(import (tests r6rs mutable-pairs) (tests scheme test) (scheme write)) (display "Running tests for (rnrs mutable-pairs)\n") (run-mutable-pairs-tests) (report-test-results)
46d440df2473ed1c34ccc5e026cc0f7ffa93429ed5a7f460ce751f7a6432c816
csabahruska/jhc-components
Version.hs
module Version.Version( versionContext, versionSimple, versionString ) where import Data.Version import System.Info import qualified Data.ByteString.UTF8 as BS import Version.Config import RawFiles # NOINLINE versionSimple # versionSimple = concat [package, " ", version, " (", BS.toString shortchang...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Version/Version.hs
haskell
module Version.Version( versionContext, versionSimple, versionString ) where import Data.Version import System.Info import qualified Data.ByteString.UTF8 as BS import Version.Config import RawFiles # NOINLINE versionSimple # versionSimple = concat [package, " ", version, " (", BS.toString shortchang...
cf1112d24197997c13a818b37ddf159a201635d1ac4cd0e702b5644b39255a16
own-pt/cl-krr
banana-slug.lisp
(compile-suo-kif :in-files '("sample/core-sumo.kif" "sample/banana-slug.kif") :tptp t)
null
https://raw.githubusercontent.com/own-pt/cl-krr/d21ce3c385ecb0b5b51bd2b6491a082532f9867c/development/experiments/banana-slug/banana-slug.lisp
lisp
(compile-suo-kif :in-files '("sample/core-sumo.kif" "sample/banana-slug.kif") :tptp t)
612e152d81cac6bf77555d7a6b66b62dbbf4d6ae47af8221794940bcb02fdbc3
jesperes/aoc_erlang
aoc2016_day18.erl
-module(aoc2016_day18). -include("aoc_puzzle.hrl"). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -define(TRAP, $^). -define(SAFE, $.). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2016, day = 18, name = "L...
null
https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2016/aoc2016_day18.erl
erlang
Implementation
-module(aoc2016_day18). -include("aoc_puzzle.hrl"). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -define(TRAP, $^). -define(SAFE, $.). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2016, day = 18, name = "L...
9b4e654bbfa5d8f6468a23afc55f0199b8da755afa0906d17826f280bec72347
reactive-systems/syfco
Reader.hs
----------------------------------------------------------------------------- -- | -- Module : Reader License : MIT ( see the LICENSE file ) Maintainer : ( ) -- -- The module reads a specification to the internal format. -- ------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/reactive-systems/syfco/603bbdba1c4902674165714516eea7b6dacbd155/src/lib/Reader.hs
haskell
--------------------------------------------------------------------------- | Module : Reader The module reads a specification to the internal format. --------------------------------------------------------------------------- # LANGUAGE RecordWildCards # ---------------------------------------------...
License : MIT ( see the LICENSE file ) Maintainer : ( ) module Reader ( fromTLSF ) where import Data.Error ( Error ) import Data.SymbolTable ( SymbolTable , IdRec(..) ) import Data.Specification ( Specification(..) ) import Reader.Sugar ( replaceSugar ) import Reader.Par...
a0bf2a861f6ff7f235b9630b16d3be43015cd56beb44e927a3b1c4a4cb078072
amar47shah/cis-194
Testing.hs
# OPTIONS_GHC -Wall # # LANGUAGE ExistentialQuantification # module Testing where import Data.Maybe import Control.Arrow data Test = forall a. Show a => Test String (a -> Bool) [a] data Failure = forall a. Show a => Fail String [a] instance Show Failure where show (Fail s as) = "Failed Test \"" ++ s ...
null
https://raw.githubusercontent.com/amar47shah/cis-194/2b35ce18df176b47502950030af26e14d866b3e4/2015-noamz/solutions/Testing.hs
haskell
Helpers
# OPTIONS_GHC -Wall # # LANGUAGE ExistentialQuantification # module Testing where import Data.Maybe import Control.Arrow data Test = forall a. Show a => Test String (a -> Bool) [a] data Failure = forall a. Show a => Fail String [a] instance Show Failure where show (Fail s as) = "Failed Test \"" ++ s ...
b231d4d3ac75d3e47998f16264da5f4f3718e176f15fd995346a9a36d2a1e0bd
leviroth/ocaml-reddit-api
test_set_subreddit_sticky.ml
open! Core open! Async open! Import let%expect_test "set_subreddit_sticky" = with_cassette "set_subreddit_sticky" ~f:(fun connection -> let link = Thing.Link.Id.of_string "f7vspj" in let%bind () = Connection.call_exn connection (Endpoint.set_subreddit_sticky () ...
null
https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/03cf04fddc0882adb99ce51ed832dc66251b9ae5/test/test_set_subreddit_sticky.ml
ocaml
open! Core open! Async open! Import let%expect_test "set_subreddit_sticky" = with_cassette "set_subreddit_sticky" ~f:(fun connection -> let link = Thing.Link.Id.of_string "f7vspj" in let%bind () = Connection.call_exn connection (Endpoint.set_subreddit_sticky () ...
8eeeb7722f36cea2771022738c81fbb812ea129430f04d560da65e9e92c9a59a
ygrek/mldonkey
mp3tag.mli
(**************************************************************************) Copyright 2003 , 2002 b8_bavard , , , b52_simon INRIA (* *) (* This file is part of mldonkey. *) (* ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/mp3tagui/mp3tag.mli
ocaml
************************************************************************ This file is part of mldonkey. or (at your option) any ...
Copyright 2003 , 2002 b8_bavard , , , b52_simon INRIA is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , is distributed in the hope ...
70b2580ad68dda63fce8ff918819e6556d67e8f78ec11cd3994eaf4ec029bac5
helvm/helma
LSU.hs
module HelVM.HelMA.Automaton.Units.LSU where import HelVM.HelMA.Automaton.Units.ALU import qualified HelVM.HelMA.Automaton.Units.RAM as RAM import HelVM.HelMA.Automaton.IO.BusinessIO import HelVM.HelMA.Automaton.Instruction.IOInstruction import HelVM.HelMA.Auto...
null
https://raw.githubusercontent.com/helvm/helma/2ae31668ce11ded53daf01effe25047d5ce471cf/hs/src/HelVM/HelMA/Automaton/Units/LSU.hs
haskell
| Types
module HelVM.HelMA.Automaton.Units.LSU where import HelVM.HelMA.Automaton.Units.ALU import qualified HelVM.HelMA.Automaton.Units.RAM as RAM import HelVM.HelMA.Automaton.IO.BusinessIO import HelVM.HelMA.Automaton.Instruction.IOInstruction import HelVM.HelMA.Auto...
5c06a33021b79715a3f7544768e72cb372b4b9287d2c0223e3be0c09a13ecd97
dancrumb/clojure-brave-and-true
chapter3.clj
(ns clojure-brave-and-true.chapter3 (:gen-class)) (use 'clojure.pprint) (def asym-hobbit-body-parts [{:name "head" :size 3} {:name "left-eye" :size 1} {:name "left-ear" :size 1} {:name "mouth" :size 1} ...
null
https://raw.githubusercontent.com/dancrumb/clojure-brave-and-true/6ae47dcfc3274b6751156f54c486b0732d0e5edc/src/clojure_brave_and_true/chapter3.clj
clojure
(ns clojure-brave-and-true.chapter3 (:gen-class)) (use 'clojure.pprint) (def asym-hobbit-body-parts [{:name "head" :size 3} {:name "left-eye" :size 1} {:name "left-ear" :size 1} {:name "mouth" :size 1} ...
4395eb0ca95ac478f376c1bab4fcd0bec69b39b000780490507fb2ed5ce576fc
cloverage/cloverage
exercise_instrumentation.clj
(ns cloverage.sample.exercise-instrumentation (:refer-clojure :exclude [loop]) (:import java.lang.RuntimeException) (:require [clojure.test :refer :all])) '() (+ 40) (+ 40 2) (str 1 2 3) (+ (* 2 3) (/ 12 3)) (let [a (+ 40 2) b (+ 3 4)] (* a b)) {:a (+ 40 2) (/ 4 2) "two"} (defn function-with-e...
null
https://raw.githubusercontent.com/cloverage/cloverage/3b9718e9c80f84ba5882139376a07f8a67f14062/cloverage/dev-resources/cloverage/sample/exercise_instrumentation.clj
clojure
fully covered partially covered not covered fully covered permutation is partially covered top-level propagate-line-numbers broke preconditions
(ns cloverage.sample.exercise-instrumentation (:refer-clojure :exclude [loop]) (:import java.lang.RuntimeException) (:require [clojure.test :refer :all])) '() (+ 40) (+ 40 2) (str 1 2 3) (+ (* 2 3) (/ 12 3)) (let [a (+ 40 2) b (+ 3 4)] (* a b)) {:a (+ 40 2) (/ 4 2) "two"} (defn function-with-e...
05a4eea77e72646691895b5a82f6d314b5747f8ec91934dfb6005b122d7826b5
haskell-github/github
Comments.hs
----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause Maintainer : < > -- -- The pull request review comments API as described at -- </>. module GitHub.Endpoints.PullRequests.Comments ( pullRequestCommentsR, pullRequestCommentR, createPull...
null
https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/src/GitHub/Endpoints/PullRequests/Comments.hs
haskell
--------------------------------------------------------------------------- | License : BSD-3-Clause The pull request review comments API as described at </>. | List comments on a pull request. See </#list-comments-on-a-pull-request> | Query a single comment. See </#get-a-single-comment> | Create a comme...
Maintainer : < > module GitHub.Endpoints.PullRequests.Comments ( pullRequestCommentsR, pullRequestCommentR, createPullCommentR, createPullCommentReplyR, module GitHub.Data, ) where import GitHub.Data import GitHub.Internal.Prelude import Prelude () pullRequestCommentsR :: Name Owner -...
6418b329def90ce4f4332b9a73df1b52f3b20a9986e9d74604e45ae1142d185b
karamellpelle/grid
Friends.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/Helpers/Friends.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.Helpers.Friends ( ) where fri...
7a588cb3d896046068798b8ceba658e22952bb44ae2311e75483225a984624a1
armstnp/advent-of-code-2019
day22.clj
Set NS before starting : C - c M - n n (ns advent-of-code-2019.day22 (:require [advent-of-code-2019.core :as core] [advent-of-code-2019.left-shark :as ls] [clojure.string :as str] [clojure.math.combinatorics :as combo] [is-prime.core :refer [is-prime]])) (: import ...
null
https://raw.githubusercontent.com/armstnp/advent-of-code-2019/68e21174394d8b0e14433f9f249e995c10ac6d67/src/advent_of_code_2019/day22.clj
clojure
Fill in parse components here
Set NS before starting : C - c M - n n (ns advent-of-code-2019.day22 (:require [advent-of-code-2019.core :as core] [advent-of-code-2019.left-shark :as ls] [clojure.string :as str] [clojure.math.combinatorics :as combo] [is-prime.core :refer [is-prime]])) (: import ...
faf41f2220decc44d1de1d67914096fb31bf8b68b125928634bb3c4475d127d7
HaxeFoundation/ocamllibs
as3hl.mli
* This file is part of SwfLib * Copyright ( c)2004 - 2008 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your ...
null
https://raw.githubusercontent.com/HaxeFoundation/ocamllibs/97e498e1b3bc2b3f08cfcae874b8529e4292bc3d/swflib/as3hl.mli
ocaml
used to sort methods (preserve order) None for interfaces constructors only bool = const - mostly false only for hl_static fields
* This file is part of SwfLib * Copyright ( c)2004 - 2008 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your ...
fe35d13fd5c838c34099353cf8272b311be197418585ef346e8fac6702a7d150
input-output-hk/cardano-sl
Aeson.hs
module Util.Aeson ( parseJSONP ) where import Data.Aeson (FromJSON, Result (..), fromJSON) import Data.Aeson.Parser (json) import Pipes import Pipes.Prelude (map) import Universum hiding (map) import Util.Pipes (parseP) parseJSONP:: (FromJSON a, Mon...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/tools/post-mortem/src/Util/Aeson.hs
haskell
module Util.Aeson ( parseJSONP ) where import Data.Aeson (FromJSON, Result (..), fromJSON) import Data.Aeson.Parser (json) import Pipes import Pipes.Prelude (map) import Universum hiding (map) import Util.Pipes (parseP) parseJSONP:: (FromJSON a, Mon...
5a2ec48a12af8837d947cbfcb46cd1aeccf3d4fa5e88ee2cdc09720f9b83ef06
openbadgefactory/salava
block.clj
(ns salava.oauth.block (:require [salava.oauth.db :as db])) (defn user-information [ctx user-id] (db/get-user-information ctx user-id))
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/oauth/block.clj
clojure
(ns salava.oauth.block (:require [salava.oauth.db :as db])) (defn user-information [ctx user-id] (db/get-user-information ctx user-id))
cb02a4839bb2004b388868afbee04a4895cbfa630bee3c7f2f5028ba137d1a98
colis-anr/colis-language
metaFile.ml
open Common let yaml_of_string = Yaml.of_string_exn open Protocol_conv_yaml type input = { arguments : string list ; stdin : string } [@@deriving protocol ~driver:(module Yaml)] type output = { stdout : string ; stderr : string ; return_code : int } [@@deriving protocol ~driver:(module Yaml)] type t...
null
https://raw.githubusercontent.com/colis-anr/colis-language/14b8087fa6323fb817d32c07236a2a084def01a1/tests/runner/metaFile.ml
ocaml
open Common let yaml_of_string = Yaml.of_string_exn open Protocol_conv_yaml type input = { arguments : string list ; stdin : string } [@@deriving protocol ~driver:(module Yaml)] type output = { stdout : string ; stderr : string ; return_code : int } [@@deriving protocol ~driver:(module Yaml)] type t...
6053b71a950e79ef6d1f09441084edbaea85e4ce2ee8578788d2ec77a72f60d8
well-typed/large-records
R040.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif module Experiment.Generics_LR.Sized.R040 where import Data.Aeson (Value) import Bench.HList import Experiment.Generics_LR import Common.H...
null
https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/experiments/Experiment/Generics_LR/Sized/R040.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings #
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif module Experiment.Generics_LR.Sized.R040 where import Data.Aeson (Value) import Bench.HList import Experiment.Generics_LR import Common.HListOfSize.HL040 hlistToJSON :: HList ExampleFields -> Value hlistToJSON = gtoJSON
524b5e0914672a9e5f3917c3c7f800c68e3ee69a90e65417aaf3e62eed334945
jarohen/phoenix
om_sablono.cljs
(ns {{name}}.ui.app (:require [clojure.string :as s] [om.core :as om :include-macros true] [sablono.core :as html :refer-macros [html]] simple-brepl.client)) (enable-console-print!) (defn hello-world [] (om/component (html [:p "Hello world!"]))) (set! (.-onload js/window) ...
null
https://raw.githubusercontent.com/jarohen/phoenix/f828bf144154f110f0a73f54645f5696e2c8bdab/templates/phoenix-webapp/src/leiningen/new/phoenix_webapp/cljs/om_sablono.cljs
clojure
------------------------------------------------------------ free to just delete all of it when you want to get cracking on your own project!
(ns {{name}}.ui.app (:require [clojure.string :as s] [om.core :as om :include-macros true] [sablono.core :as html :refer-macros [html]] simple-brepl.client)) (enable-console-print!) (defn hello-world [] (om/component (html [:p "Hello world!"]))) (set! (.-onload js/window) ...
ff3b9cb6c4c050b041bedcba74f3b6ee982aade7e15093bcaf8a31be69e2e2fc
typelead/eta
tcfail103.hs
module ShouldCompile where import GHC.ST import GHC.STRef import GHC.Arr -- Another 'escape' example f:: ST t Int f = do v <- newSTRef 5 let g :: ST s Int -- Implicitly forall s. ST s Int g = readSTRef v g
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/fail/tcfail103.hs
haskell
Another 'escape' example Implicitly forall s. ST s Int
module ShouldCompile where import GHC.ST import GHC.STRef import GHC.Arr f:: ST t Int f = do v <- newSTRef 5 let g :: ST s Int g = readSTRef v g
8e3b399b07eb6c0d3ecac594dc5aaf4225afb196ee552e0d41f18030c00b20f4
neongreen/haskell-ex
Main.hs
movingAvg r [] = [] movingAvg r list@(x:xs) = let left = take r list right = tail list in firstHalf left ++ secondHalf r right firstHalf [] = [] firstHalf list@(x:xs) = firstHalf (init list) ++ [(sum list) / fromIntegral (length list)] secondHalf a list@(x:xs) | length list < a = [] | otherwise ...
null
https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week3/average/444c43/Main.hs
haskell
movingAvg r [] = [] movingAvg r list@(x:xs) = let left = take r list right = tail list in firstHalf left ++ secondHalf r right firstHalf [] = [] firstHalf list@(x:xs) = firstHalf (init list) ++ [(sum list) / fromIntegral (length list)] secondHalf a list@(x:xs) | length list < a = [] | otherwise ...
834de91dfebb29349396ac456f09f0631cd3fc8b6a0c0334239c795c848e9f4e
ghc/nofib
Matrix.hs
Time - stamp : < 2010 - 11 - 03 09:27:34 > $ I d : Matrix.hs , v 1.4.2.5 2002/06/15 01:34:29 hwloidl Exp $ Data Encapsulation of the ADT Matrix . Internal representation is a list of lists . -- LinSolv remark : default determinant is parallel ( d&c over 1st line ) -------------------------------------------...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/linsolv/Matrix.hs
haskell
--------------------------------------------------------------------------- @node ADT Matrix, , , @chapter ADT Matrix MatBounds, @menu * Imports:: * Data Types:: * Constants:: * Aux functions:: * Data type constructors:: * H.o. fcts:: * Misc operations:: * Arithmetic Operations:: * I/O Ope...
Time - stamp : < 2010 - 11 - 03 09:27:34 > $ I d : Matrix.hs , v 1.4.2.5 2002/06/15 01:34:29 hwloidl Exp $ Data Encapsulation of the ADT Matrix . Internal representation is a list of lists . LinSolv remark : default determinant is parallel ( d&c over 1st line ) (!!-), (!-), sqMatrix, ...
21632724175aa5378c20fc15daf3a7df486cf49f0265d02d4b26f6f912571db0
techascent/tech.datatype
dimensions_test.clj
(ns tech.v2.tensor.dimensions-test (:require [tech.v2.tensor.dimensions :as ct-dims] [clojure.test :refer :all])) (defn ->raw [dimensions] (->> (select-keys dimensions [:shape :strides]) (map (fn [[k v]] [k (vec v)])) (into {}))) (deftest in-place-reshape-test (is (= ...
null
https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/test/tech/v2/tensor/dimensions_test.clj
clojure
This test is just f-ed up. But the thing is that if the dimensions are dense then in-place reshape that preserves ecount is possible; it is just an arbitrary reinterpretation of the data.
(ns tech.v2.tensor.dimensions-test (:require [tech.v2.tensor.dimensions :as ct-dims] [clojure.test :refer :all])) (defn ->raw [dimensions] (->> (select-keys dimensions [:shape :strides]) (map (fn [[k v]] [k (vec v)])) (into {}))) (deftest in-place-reshape-test (is (= ...
6610c33c9c1e850a141a5c83a6491c0acf16a8ab35dff9a154caae8eec018342
seereason/atp-haskell
PropExamples.hs
-- | Some propositional formulas to test, and functions to generate classes. -- Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . ) # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUA...
null
https://raw.githubusercontent.com/seereason/atp-haskell/8b3431236369b9bf5b8723225f65cfac1832a0f9/src/Data/Logic/ATP/PropExamples.hs
haskell
| Some propositional formulas to test, and functions to generate classes. # LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances # "p1.2∧p1.3∧p2.3∨p1.2∧p1.4∧p2.4∨p1.3∧p1.4∧p3.4∨p2.3∧p2.4∧p3.4∨¬p1.2∧¬p1.3∧¬p2.3∨¬p1.2∧¬p1.4∧¬p2.4∨¬p1.3∧¬p1.4∧¬p3.4∨¬p2.3∧¬p2.4∧¬p3.4" | Full adder. | Useful idiom. Example. | Carry-...
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . ) # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Data.Logic.ATP.PropExamples ( Knows(K) , mk_knows, mk_knows2 , prime ...
fc36feeeb1b5c1edc415b440e9a5ddab7d8d749d29a13f3d71ddb1cabd6f1645
lokedhs/containers
blocking-queue.lisp
(in-package :receptacle) (defclass generic-sequence () () (:documentation "Generic ordered sequence")) (define-condition sequence-empty (error) () (:documentation "Error that is raised if an attempt is made to access pop an element from an empty sequence.")) #+nil (eval-when (:compile-toplevel :load-toplevel...
null
https://raw.githubusercontent.com/lokedhs/containers/5d4ce688bddd51ee34a4259e37b698b84f650bdf/src/blocking-queue.lisp
lisp
ELSE: We have an element on the queue wait-time-epsilon indicates the minimum amount of time to wait ELSE: No timeout
(in-package :receptacle) (defclass generic-sequence () () (:documentation "Generic ordered sequence")) (define-condition sequence-empty (error) () (:documentation "Error that is raised if an attempt is made to access pop an element from an empty sequence.")) #+nil (eval-when (:compile-toplevel :load-toplevel...
b53e3f9164e53b7cddfe34d650fafd0e878d490499b1db675507c8289c9b802c
clojureverse/clojurians-log-app
test_data.clj
(ns test-data (:require [datomic.api :as d] [clojure.pprint :refer [pprint]])) (defn pprint-str [val] (with-out-str (pprint val))) (defn conn [] (-> reloaded.repl/system :datomic :conn)) (defn db [] (d/db (conn))) (defn channel-data [db chans] (for [chan chans] (-> db (d/entity [:ch...
null
https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/repl/test_data.clj
clojure
quiet-channels threaded-messages non-threaded message random thread message belonging to another day
(ns test-data (:require [datomic.api :as d] [clojure.pprint :refer [pprint]])) (defn pprint-str [val] (with-out-str (pprint val))) (defn conn [] (-> reloaded.repl/system :datomic :conn)) (defn db [] (d/db (conn))) (defn channel-data [db chans] (for [chan chans] (-> db (d/entity [:ch...
912aed9b39f2744f2a37af7ef9f562e5dede4d3d5d0c30aaa1104e92b2a339cd
dpiponi/Moodler
test_karplus_strong.hs
do restart root <- getRoot let out = "out" let keyboard = "keyboard" let trigger = "trigger" audio_saw0 <- new' "audio_saw" audio_sin1 <- new' "audio_sin" audio_square2 <- new' "audio_square" audio_triangle3 <- new' "audio_triangle" butterbp4 <- new' "butterbp" butterhp5 <- n...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/saves/test_karplus_strong.hs
haskell
do restart root <- getRoot let out = "out" let keyboard = "keyboard" let trigger = "trigger" audio_saw0 <- new' "audio_saw" audio_sin1 <- new' "audio_sin" audio_square2 <- new' "audio_square" audio_triangle3 <- new' "audio_triangle" butterbp4 <- new' "butterbp" butterhp5 <- n...
68c65b7ec396f2d47df9490a5288a793eb9540394b54fa54d45d8a88f55a2aaa
c-cube/qcheck
test_qualified_names.ml
open QCheck2 open Helpers module type S = sig type t = int val gen : int QCheck2.Gen.t end module Q : S = struct type t = int [@@deriving qcheck2] end module F (X : S) = struct type t = X.t [@@deriving qcheck2] end module G = F (Q) type t = Q.t [@@deriving qcheck2] type u = G.t [@@deriving qcheck2] let ...
null
https://raw.githubusercontent.com/c-cube/qcheck/063c1d74795a24eb77fa661d218c4715382df566/test/ppx_deriving_qcheck/deriver/qcheck2/test_qualified_names.ml
ocaml
open QCheck2 open Helpers module type S = sig type t = int val gen : int QCheck2.Gen.t end module Q : S = struct type t = int [@@deriving qcheck2] end module F (X : S) = struct type t = X.t [@@deriving qcheck2] end module G = F (Q) type t = Q.t [@@deriving qcheck2] type u = G.t [@@deriving qcheck2] let ...
68ce8f3b9bd574ef1a668d790b7b64817b8576406c7e6a1214de3275470db83b
juspay/atlas
Common.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/test/src/PublicTransport/Common.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
132b011c530bb187c0472837ed4096413637329d68e65bad1c2c5b6254cfc967
league/metaserv
status.ml
type t = 1xx Informational 2xx Successful 3xx 4xx Client errors | Forbidden | Not_found | Request_timeout 5xx Server errors | Not_implemented let code status = match status with | Continue -> 100 | Ok -> 200 | Moved_permanently -> 301 | Bad_request -> 400 | Forbidden -> 403 | Not_found -> 404 | Requ...
null
https://raw.githubusercontent.com/league/metaserv/35e85832b3d6dfe4e15b8036653d4429a90644f5/server/status.ml
ocaml
type t = 1xx Informational 2xx Successful 3xx 4xx Client errors | Forbidden | Not_found | Request_timeout 5xx Server errors | Not_implemented let code status = match status with | Continue -> 100 | Ok -> 200 | Moved_permanently -> 301 | Bad_request -> 400 | Forbidden -> 403 | Not_found -> 404 | Requ...
19c995d39df578b8d499de51d312a42e756c4e85e1f26654b801cff2fa3ac18c
well-typed/large-records
CodeGen.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables ...
null
https://raw.githubusercontent.com/well-typed/large-records/fb983aa136c2602499c2421323bd52b6a54b7c9a/large-records/test/Test/Record/Sanity/CodeGen.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fplugin=Data.Record.Plugin # ---------------------------------------------------------------------------- ---...
# LANGUAGE DataKinds # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # | Sanity checks of the TH code generation module Test.Record.Sanity.CodeGen (...
8ecb30c5df24f60c04b9007f97a2149af7904f2b57acdf08aa1e7d035e59fc91
antono/guix-debian
package-management.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/package-management.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages package-management) #:use-module (guix packages) #:use-module (guix downlo...
ddb201543c188f349a42a3b67158dd38045e50abce93e61af0acf82e1ec1c180
target/row-types
OverridingTypeClassInstances.hs
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds # {-# LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module OverridingTypeClassInstances where --...
null
https://raw.githubusercontent.com/target/row-types/0d6dc8a3d9a53a8f9a0783bb300e4d1e27b8c8cd/examples/OverridingTypeClassInstances.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # Note that `Data.Row.Aeson` is not exported my the row-types library and currently lives in the src\aeson directory. You must put it in an appropriate place and make sure to have `aeson` in your environment in order to use this module.
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module OverridingTypeClassInstances where import Data.Aeson (ToJSON(..), encode) import ...
931f0981c5032c3a2914b49038bbb19486887870b7d5917f7a1b1a75ea96e7e3
igorhvr/bedlam
ssax.scm
SISC module of SSAX code ;; These files define macros and I don't feel like messing with the ;; module system + macros yet. (include "define-opt.scm") (include "myenv-sisc.scm") ;; These define only functions (include "look-for-str.scm") (include "parser-error.scm") (include "ascii.scm") (include "input-parse.scm")...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/pure-scheme/ssax/ssax.scm
scheme
These files define macros and I don't feel like messing with the module system + macros yet. These define only functions
SISC module of SSAX code (include "define-opt.scm") (include "myenv-sisc.scm") (include "look-for-str.scm") (include "parser-error.scm") (include "ascii.scm") (include "input-parse.scm") (include "util.scm") (module ssax (xml-token? xml-token-kind xml-token-head make-empty-attlist attlist-add attlist-...
05252b2c0d741e8c19ff5955e5d372c5e406166e228a369fe5d595a2e26df0be
vikram/lisplibraries
corman.lisp
(in-package #:bordeaux-threads) (eval-when (:compile-toplevel :load-toplevel :execute) (require :threads)) ;;; Thread Creation (defmethod make-thread (function &key name) (declare (ignore name)) (threads:create-thread function)) (defmethod current-thread () threads:*current-thread*) ;;; Introspection/debug...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/dependencies/bordeaux-threads/src/corman.lisp
lisp
Thread Creation Introspection/debugging
(in-package #:bordeaux-threads) (eval-when (:compile-toplevel :load-toplevel :execute) (require :threads)) (defmethod make-thread (function &key name) (declare (ignore name)) (threads:create-thread function)) (defmethod current-thread () threads:*current-thread*) (defmethod destroy-thread (thread) (thre...
08a930c4a5ba3522019e32d0468b15d529258c40ec63ea80b6fb08b5eda6ed67
jumarko/clojure-experiments
0434_sentence_searcher.clj
(ns clojure-experiments.purely-functional.puzzles.0434-sentence-searcher "-tv-newsletter-434-re-combination-of-parts/ Solutions: " (:require [clojure.string :as str])) (defn sentences [document] (mapv str/trim (str/split document #"(?<=[.?!])"))) (defn contains-word? [sentence word] (let [sentence-w...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/abc204d0a8c1b504610d91bc00e1aec21f8cec77/src/clojure_experiments/purely_functional/puzzles/0434_sentence_searcher.clj
clojure
=> nil => ["I like to write." "Do you like to write?"]
(ns clojure-experiments.purely-functional.puzzles.0434-sentence-searcher "-tv-newsletter-434-re-combination-of-parts/ Solutions: " (:require [clojure.string :as str])) (defn sentences [document] (mapv str/trim (str/split document #"(?<=[.?!])"))) (defn contains-word? [sentence word] (let [sentence-w...
6db9fefb08beca2caff3f6cfff14e590dd3b8b589cf2ac94a968a7cbfa11b0af
inhabitedtype/ocaml-aws
getParameter.mli
open Types type input = GetParameterRequest.t type output = GetParameterResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/getParameter.mli
ocaml
open Types type input = GetParameterRequest.t type output = GetParameterResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
cc258bb8d9f14c7ca8b05b0e4209c21a298cbe60655d58b64066c15043bf0021
fetburner/Coq2SML
subtac_pretyping.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/subtac/subtac_pretyping.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** A R : A -> A -> Prop : well_fou...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Global open Pp open Util...
895c7bd1fe0356e8cb8b9c3a14676f5b338f8d04b2ee6c8194cbc9f085582a6f
cedlemo/OCaml-GI-ctypes-bindings-generator
Toggle_button_accessible_private.ml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Toggle_button_accessible_private"
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Toggle_button_accessible_private.ml
ocaml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Toggle_button_accessible_private"
f79000731557c8123297aaecd05d7055727237f9d053ae6ced559f145784a75f
jaspervdj/psqueues
LRUCache.hs
{-# LANGUAGE BangPatterns #-} module Data.LRUCache ( LRUCache , empty , lookup , lookupNoLRU , insert , delete , deleteLRU ) where import Data.Maybe (fromMaybe) import qualified Data.IntPSQ as IntPSQ import Prelude hiding (lookup) type Tick = Int type Size = Int data LRUCache v ...
null
https://raw.githubusercontent.com/jaspervdj/psqueues/f6c8e112a7e6bc3e75303d87473f72e3c34822ec/examples/LRUCache.hs
haskell
# LANGUAGE BangPatterns # # UNPACK # # UNPACK # | Evict the entry at the given key in the cache. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --------------------------------------------------------------------...
module Data.LRUCache ( LRUCache , empty , lookup , lookupNoLRU , insert , delete , deleteLRU ) where import Data.Maybe (fromMaybe) import qualified Data.IntPSQ as IntPSQ import Prelude hiding (lookup) type Tick = Int type Size = Int data LRUCache v = LRUCache , lrucPsq ...
5b0a47ed87c23b604400f632ac44ee608ab4bed26f707e03ff49a46ad9d7c19f
mdsebald/link_blox_app
block_common.erl
%%% %%% @doc %%% Block functionality common to all block types %%% %%% @end %%% -module(block_common). -author ("Mark Sebald"). -include("block_state.hrl"). %% ==================================================================== %% API functions %% =================================================================...
null
https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_common.erl
erlang
@doc Block functionality common to all block types @end ==================================================================== API functions ==================================================================== Common Config Attributes Config values are set once on block creation and never modified | atom |...
-module(block_common). -author ("Mark Sebald"). -include("block_state.hrl"). -export([ configs/4, inputs/0, outputs/0, execute/2, ok_to_execute/2, initialize/1, delete/1, temp_delete/1, update_execution_timer/3, up...
cccc22c26cb6e06a24a4f46d815097b6e85267727b86046a3f32f1b159ae953d
emina/rosette
base-solver.rkt
#lang racket (require "server.rkt" "cmd.rkt" "env.rkt" "../solution.rkt" (only-in racket [remove-duplicates unique]) (only-in "smtlib2.rkt" reset set-option check-sat get-model get-unsat-core push pop set-logic) (only-in "../../base/core/term.rkt" term term? term-type) (o...
null
https://raw.githubusercontent.com/emina/rosette/c2975b940036dc380929daafc24ee76b66f64edd/rosette/solver/smt/base-solver.rkt
racket
The solution consists of 'sat or 'unsat, followed by followed by a suitably formatted s-expression. The output of this procedure is a hashtable from constant a non-empty list of assertion identifiers that form an unsatisfiable core (if the solution is 'unsat and a core was extracted); #f (if the solution is 'u...
#lang racket (require "server.rkt" "cmd.rkt" "env.rkt" "../solution.rkt" (only-in racket [remove-duplicates unique]) (only-in "smtlib2.rkt" reset set-option check-sat get-model get-unsat-core push pop set-logic) (only-in "../../base/core/term.rkt" term term? term-type) (o...
1aeac0ade8347eafac0887f3c099f7e53791a92a890a51492a2ba6f3c2de996a
mzp/coq-ide-for-ios
fourier_plugin_mod.ml
let _=Mltop.add_known_module"Fourier" let _=Mltop.add_known_module"FourierR" let _=Mltop.add_known_module"G_fourier" let _=Mltop.add_known_module"Fourier_plugin_mod" let _=Mltop.add_known_module"fourier_plugin"
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/fourier/fourier_plugin_mod.ml
ocaml
let _=Mltop.add_known_module"Fourier" let _=Mltop.add_known_module"FourierR" let _=Mltop.add_known_module"G_fourier" let _=Mltop.add_known_module"Fourier_plugin_mod" let _=Mltop.add_known_module"fourier_plugin"
4bd1edae8b042ffcd84242ce8c46be141cb4575a188b2e3cb2ded1bd695158c1
biocaml/phylogenetics
simulator.ml
open Core open Phylogenetics module L = Linear_algebra module Branch_info = struct type t = float let length x = x end module Model = struct type param = { stationary_distribution : Amino_acid.vector ; exchangeability_matrix : Amino_acid.matrix ; } let stationary_distribution p = p.stationary_dist...
null
https://raw.githubusercontent.com/biocaml/phylogenetics/e225616a700b03c429c16f760dbe8c363fb4c79d/tests/expect/simulator.ml
ocaml
open Core open Phylogenetics module L = Linear_algebra module Branch_info = struct type t = float let length x = x end module Model = struct type param = { stationary_distribution : Amino_acid.vector ; exchangeability_matrix : Amino_acid.matrix ; } let stationary_distribution p = p.stationary_dist...