_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
ef351e3529b9b568042834633942e0453a92cbf2072a0e0321c8ed8199b6e1b1
vult-dsp/vult
fileIO.ml
The MIT License ( MIT ) Copyright ( c ) 2014 , 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 ...
null
https://raw.githubusercontent.com/vult-dsp/vult/860b2b7a8e891aa729578175a931ce2a9345428b/src/util/fileIO.ml
ocaml
* ref holding the current working directory. The default function is the native. * ref holding the read file function. The default function is the native. * ref holding the read_bytes file function. The default function is the native. * ref holding the read file function. The default function is the ...
The MIT License ( MIT ) Copyright ( c ) 2014 , 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 ...
4716335fd95aab5b693d43eddcc2eeccfdafae5eba47ff473f592dae094bd29d
Cumulus/Cumulus
feed.ml
Copyright ( c ) 2012 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 , publish , dis...
null
https://raw.githubusercontent.com/Cumulus/Cumulus/3b6de05d76c57d528e052aa382f98e40354cf581/src/base/feed.ml
ocaml
TODO: Remove the following functions
Copyright ( c ) 2012 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 , publish , dis...
4b8dafc2f7ed8a15d29c7b5983a80c03b0e8dbcd4304e39fe1a30c471fa79991
melisgl/micmac
test.lisp
(in-package :micmac) (defun test () (test-alpha-beta) (test-beam-search) (test-parallel-beam-search) (micmac.uct::test-uct) (micmac.metropolis-hastings::test-metropolis-hastings) (micmac.game-theory::test-game-theory))
null
https://raw.githubusercontent.com/melisgl/micmac/cff0a60475da131e56397d361f85eaae74d3c2e4/test/test.lisp
lisp
(in-package :micmac) (defun test () (test-alpha-beta) (test-beam-search) (test-parallel-beam-search) (micmac.uct::test-uct) (micmac.metropolis-hastings::test-metropolis-hastings) (micmac.game-theory::test-game-theory))
628ff0dda306b91b6895574770afdfe5b7403ae1bf616daee71a651528598063
vincenthz/hs-asn1
Parse.hs
-- | Module : Data . ASN1.BinaryEncoding . -- License : BSD-style Maintainer : < > -- Stability : experimental -- Portability : unknown -- Generic parsing facility for ASN1 . -- module Data.ASN1.BinaryEncoding.Parse ( -- * incremental parsing interfaces runParseState , isParseD...
null
https://raw.githubusercontent.com/vincenthz/hs-asn1/c017c03b0f71a3b45165468a1d1028a0ed7502c0/data/Data/ASN1/BinaryEncoding/Parse.hs
haskell
| License : BSD-style Stability : experimental Portability : unknown * incremental parsing interfaces * simple parsing interfaces | nothing means the parser stop this construction on where the construction terminate. | create a new empty parse state. position is 0 | Represent the events and state thus...
Module : Data . ASN1.BinaryEncoding . Maintainer : < > Generic parsing facility for ASN1 . module Data.ASN1.BinaryEncoding.Parse ( runParseState , isParseDone , newParseState , ParseState , ParseCursor , parseLBS , parseBS ) where import Control.Arrow (first) imp...
c2220403c144666756d4eab980bf0f7201d9801a3bfe02db9d0e15539e617edf
chrovis/cljam
pileup_test.clj
(ns cljam.algo.pileup-test (:require [clojure.test :refer [deftest is are testing]] [cljam.test-common :as common] [cljam.io.protocols :as p] [cljam.io.sam :as sam] [cljam.io.sam.util.quality :as qual] [cljam.algo.pileup :as plp] [clojure.string ...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/algo/pileup_test.clj
clojure
adjacent indel >+1T adjacent indel >+1T ---------- ---------- ---------- ---------- ---------- 1234567890123... ----- ---- --- -- - -------- ---------- -- ---- ------ -------- ---------- -------- -------- ---- --- ---- ---- -----...
(ns cljam.algo.pileup-test (:require [clojure.test :refer [deftest is are testing]] [cljam.test-common :as common] [cljam.io.protocols :as p] [cljam.io.sam :as sam] [cljam.io.sam.util.quality :as qual] [cljam.algo.pileup :as plp] [clojure.string ...
59feef50726c710b42f79bea949fd77619453c78ef62e6f263120f015deb4369
clojure-emacs/refactor-nrepl
ns_with_npm_strs.cljs
(ns ns-with-npm-strs (:require ["react-native" :as rn] [clojure.string :as str] ["@react-native-community/async-storage" :as async-storage] ["@fortawesome/react-native-fontawesome" :as fa] ["@fortawesome/free-solid-svg-icons" :as fa-icons])) (defmacro black-hole [& bod...
null
https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/8457b0341fdb220d4cba577ed150565e4d103364/test-resources/ns_with_npm_strs.cljs
clojure
(ns ns-with-npm-strs (:require ["react-native" :as rn] [clojure.string :as str] ["@react-native-community/async-storage" :as async-storage] ["@fortawesome/react-native-fontawesome" :as fa] ["@fortawesome/free-solid-svg-icons" :as fa-icons])) (defmacro black-hole [& bod...
6af46de71428306a0ae20641eff73b583e847d0342e9942bef380975aca4f521
keera-studios/haskell-game-programming
Reactimator.hs
module FRP.Yampa.Reactimator where import FRP.Yampa as Yampa * Yampa Extensions -- ** Reactimate forever, obtaining new fresh inputs every time alwaysReactimate :: IO a -> (IO (DTime, a)) -> (b -> IO ()) -> SF a b -> IO () alwaysReactimate initialSense sense consume sf = reactimate initialSense (\_ ...
null
https://raw.githubusercontent.com/keera-studios/haskell-game-programming/d4998decb4664a978c87199347f53b420d763b1e/libraries/FRP/Yampa/Reactimator.hs
haskell
** Reactimate forever, obtaining new fresh inputs every time -- ** High-level reactimation, from a signal generator to a sink {-# LANGUAGE ScopedTypeVariables #-} -- I can define the following, but not use it the way I would expect hlReactimate :: forall a b c d . (Signal a c IO, Sink b d IO) -> I...
module FRP.Yampa.Reactimator where import FRP.Yampa as Yampa * Yampa Extensions alwaysReactimate :: IO a -> (IO (DTime, a)) -> (b -> IO ()) -> SF a b -> IO () alwaysReactimate initialSense sense consume sf = reactimate initialSense (\_ -> do (dt, sp) <- sense return (dt...
a18fb5a3bfbc273a2ceda2132533d4c0c45c819ae82c0a3932c956d86adcdfb8
janestreet/universe
class_wrapper.mli
open Base open Import type _ t val wrap : 'a t -> 'a -> pyobject val unwrap_exn : 'a t -> pyobject -> 'a val unwrap : 'a t -> pyobject -> 'a option module Init : sig type 'a cls = 'a t type 'a t val create : ?docstring:string -> ('a cls -> args:pyobject list -> 'a) -> 'a t end module Method : sig type 'a c...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/pythonlib/src/class_wrapper.mli
ocaml
* In the [methods] callbacks, [self] contains both the embeded ocaml value as well as the Python wrapper object. * In the raw callbacks, [self] contains only the Python wrapper object.
open Base open Import type _ t val wrap : 'a t -> 'a -> pyobject val unwrap_exn : 'a t -> pyobject -> 'a val unwrap : 'a t -> pyobject -> 'a option module Init : sig type 'a cls = 'a t type 'a t val create : ?docstring:string -> ('a cls -> args:pyobject list -> 'a) -> 'a t end module Method : sig type 'a c...
149d91dac6e16056d8ccfe1eafad8bd25f0476124e855a349216ab6e3c71205b
mirage/ocaml-dkim
sign.ml
module Unix_scheduler = Dkim.Sigs.Make (struct type +'a t = 'a end) module Caml_flow = struct type backend = Unix_scheduler.t type flow = { ic : in_channel; buf : Buffer.t } let input flow buf off len = let len = Stdlib.input flow.ic buf off len in Buffer.add_string flow.buf (Bytes.sub_string buf off ...
null
https://raw.githubusercontent.com/mirage/ocaml-dkim/5712202045b6e1b212787187a9376c397b1dd6ca/bin/sign.ml
ocaml
see below
module Unix_scheduler = Dkim.Sigs.Make (struct type +'a t = 'a end) module Caml_flow = struct type backend = Unix_scheduler.t type flow = { ic : in_channel; buf : Buffer.t } let input flow buf off len = let len = Stdlib.input flow.ic buf off len in Buffer.add_string flow.buf (Bytes.sub_string buf off ...
8cc154b2a7ebc899c663b4681a03fe72a23deea3ab16ef12f21080f9c0bc88cc
ocaml-ppx/ocamlformat
exceptions.mli
exception EvalError of Error.t [@@deriving sexp] exception Duplicate_found of (unit -> Base.Sexp.t) * string exception Duplicate_found of ((unit -> Base.Sexp.t) -> string) type t = Duplicate_found of (unit -> Base.Sexp.t) * string type t = Duplicate_found : (unit -> Base.Sexp.t) * string -> t type t = Duplicate_fo...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/aa673e27f6d7cbc882ab6109cfbcca2ba0864507/test/passing/tests/exceptions.mli
ocaml
exception EvalError of Error.t [@@deriving sexp] exception Duplicate_found of (unit -> Base.Sexp.t) * string exception Duplicate_found of ((unit -> Base.Sexp.t) -> string) type t = Duplicate_found of (unit -> Base.Sexp.t) * string type t = Duplicate_found : (unit -> Base.Sexp.t) * string -> t type t = Duplicate_fo...
132e62dce0d107d37b51ad349e209219df55b4a811a192c8ace11b0f8227b381
herd/herdtools7
StaticInterpreter.ml
open AST let fatal = Error.fatal let value_as_int = function | V_Int i -> i | v -> fatal (Error.MismatchType (v, [ T_Int None ])) let binop op v1 v2 = match (op, v1, v2) with (* int -> int -> int *) | PLUS, V_Int v1, V_Int v2 -> V_Int (v1 + v2) | MUL, V_Int v1, V_Int v2 -> V_Int (v1 * v2) | MINUS, V_In...
null
https://raw.githubusercontent.com/herd/herdtools7/daedd7431cb00884afea2ec39749222e2c367c6b/asllib/StaticInterpreter.ml
ocaml
int -> int -> int int -> int -> bool bool -> bool -> bool real -> real -> real real -> real -> bool bits -> bits -> bits
open AST let fatal = Error.fatal let value_as_int = function | V_Int i -> i | v -> fatal (Error.MismatchType (v, [ T_Int None ])) let binop op v1 v2 = match (op, v1, v2) with | PLUS, V_Int v1, V_Int v2 -> V_Int (v1 + v2) | MUL, V_Int v1, V_Int v2 -> V_Int (v1 * v2) | MINUS, V_Int v1, V_Int v2 -> V_Int (v...
7a694f6091010e2919cacf90d04c2e9e10252d9f56ad7feaec203247f2fa1137
Unrepl/unrepl
make_blob.clj
(ns unrepl.make-blob (:require [clojure.java.io :as io] [clojure.edn :as edn] [clojure.string :as str] [unrepl.shade-libs :as shade])) (defn- strip-spaces-and-comments [s] #_(I had this nice #"(?s)(?:\s|;[^\n\r]*)+|((?:[^;\"\\\s]|\\.|\"(?:[^\"\\]|\\.)*\")+)" but it generates stack overflows.....
null
https://raw.githubusercontent.com/Unrepl/unrepl/fa946eef88b0516dab81c8a9b3d8f9fcff06f44b/src/unrepl/make_blob.clj
clojure
comment comment comment newline to force eval by the repl
(ns unrepl.make-blob (:require [clojure.java.io :as io] [clojure.edn :as edn] [clojure.string :as str] [unrepl.shade-libs :as shade])) (defn- strip-spaces-and-comments [s] #_(I had this nice #"(?s)(?:\s|;[^\n\r]*)+|((?:[^;\"\\\s]|\\.|\"(?:[^\"\\]|\\.)*\")+)" but it generates stack overflows.....
5593e4efaa1656c0fbbb3a5f2a60f24750d17c0e3033c05b22e1b60c2c268b3e
nrdufour/urdf
jsonld_context.erl
This file is part of urdf released under the MIT license . % See the LICENSE file for more information. -module(jsonld_context). -author("Nicolas R Dufour <>"). -include("jsonld.hrl"). -export([create_default/0, process_local_context/2, has_prefix/2, get_prefix/2, get_base/1, get_vocab/1]). -record(context, { ...
null
https://raw.githubusercontent.com/nrdufour/urdf/e4a4b033ac9154e038bec3d06077cda2ea3ca4e0/src/jsonld_context.erl
erlang
See the LICENSE file for more information. a prefix can be an element name (for example 'name' in foaf:name) or a namespace name (for example 'foaf' in foaf:name) coerce is a proplist which maps a type to an element name Only '@context' can't be overriden for obvious reason. Local Context: merge if exists Inter...
This file is part of urdf released under the MIT license . -module(jsonld_context). -author("Nicolas R Dufour <>"). -include("jsonld.hrl"). -export([create_default/0, process_local_context/2, has_prefix/2, get_prefix/2, get_base/1, get_vocab/1]). -record(context, { ' names ' is a simple dict that maps a set of...
bd7ec34d4e0f5a2670698b5d7d66873b57c9f24581fcd3afe1a3847822420fa0
basho/rebar
rebar_appups.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% rebar : Erlang Build Tools %% Copyright ( c ) 2011 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this softw...
null
https://raw.githubusercontent.com/basho/rebar/cd55176009df794f506771fd574de9303ff2a42e/src/rebar_appups.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sel...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- rebar : Erlang Build Tools Copyright ( c ) 2011 ( ) in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the...
8a3624e532744a7501f239ac9208c1e914e4b273f2caad98157ddf88dda548aa
brendanhay/gogol
Get.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-shopping-content/gen/Gogol/ShoppingContent/Content/Csses/Get.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Retrieves a single CSS domain by ID. * Resource ** Constructing a Request | A resource alias for @content.csses.get@ method which the 'ContentCssesGet' request conforms to. | Retrieves a single CSS domain by ID. /See:/ 'ne...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
d74d681f5e4aae3be7e5b862dc40412d9b33ae8bbddb3671661c70928bf3fcdc
aionescu/dynasty
Validation.hs
module Language.Dynasty.Validation(validate) where import Control.Monad((>=>)) import Control.Monad.Except(throwError) import Data.Containers.ListUtils(nubOrd) import Data.Foldable(toList) import Data.Functor((<&>)) import Data.Graph qualified as G import Data.Maybe(fromJust) import Data.Set qualified as S import Data...
null
https://raw.githubusercontent.com/aionescu/dynasty/e8c927d205c9c28e994a2e62688c5066d991c197/src/Language/Dynasty/Validation.hs
haskell
module Language.Dynasty.Validation(validate) where import Control.Monad((>=>)) import Control.Monad.Except(throwError) import Data.Containers.ListUtils(nubOrd) import Data.Foldable(toList) import Data.Functor((<&>)) import Data.Graph qualified as G import Data.Maybe(fromJust) import Data.Set qualified as S import Data...
57ec1474b7bd28de2f985bafa87f6bb60887d0b48778295c437ed0a59f9aed6d
mwotton/squealgen
Public.hs
| This code was originally created by squealgen . Edit if you know how it got made and are willing to own it now . # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE OverloadedLabels # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LAN...
null
https://raw.githubusercontent.com/mwotton/squealgen/72ebca82f75534e806851b8336fc3e2400f801f6/test/Domains/Public.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # enums decls schema VIEWS functions
| This code was originally created by squealgen . Edit if you know how it got made and are willing to own it now . # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE OverloadedLabels # # LANGUAGE FlexibleContexts # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # OPTIONS_GHC...
2ae7780172e1fe539e2cd95d2cb9be0263f5d64636cc8c942833a677d2b787fd
newlandsvalley/MidiToAbc
Tuplet.hs
module Abc.Tuplet ( tuplets ) where import Abc.Score import Euterpea.Music.Note.Music ( Dur ) import Abc.Note ( Prim2 (..), AbcContext (..), TimeSig, Measure, unitDur, isTripleTime, toMeasure, measuresPerBeat, noteDisplayTolerance ) import Data.Ratio We are splitting up a standard 4/4 bar into 96 units so...
null
https://raw.githubusercontent.com/newlandsvalley/MidiToAbc/265cc6342e3d9de3e1fc7e71f0a7d1411da1c78e/src/Abc/Tuplet.hs
haskell
heuristic to identify the largest note that could fit into a tuplet apply tuplet recognition to all scores identify all tuplet notes and gather them together within a sequence of notes Flatten a phrase of music supplied as a tree of notes to an array of notes if we're in regular time we look for triplets, if ...
module Abc.Tuplet ( tuplets ) where import Abc.Score import Euterpea.Music.Note.Music ( Dur ) import Abc.Note ( Prim2 (..), AbcContext (..), TimeSig, Measure, unitDur, isTripleTime, toMeasure, measuresPerBeat, noteDisplayTolerance ) import Data.Ratio We are splitting up a standard 4/4 bar into 96 units so...
a5e0cd7653764cc66c66d4d21bb3e5dc11f37947149a4d2493c8e23ce7f7f6a0
stedolan/linkage
plugin_intf.ml
module type T = sig type t val create : int -> t val to_string : t -> string end type Linkage.plugin += MyModPlugin of (module T)
null
https://raw.githubusercontent.com/stedolan/linkage/340bd792211b546e6cfaeb77417086d78ee5c418/examples/modules/plugin_intf.ml
ocaml
module type T = sig type t val create : int -> t val to_string : t -> string end type Linkage.plugin += MyModPlugin of (module T)
4258e471d27af43c69325471665dc9f162af63d688844eccee04feff35879785
alexkehayias/chocolatier
meta.cljs
(ns chocolatier.engine.systems.meta "System for handling changes to the game state i.e add/remove entities, changing scenes, etc." (:require [chocolatier.engine.events :as ev] [chocolatier.engine.core :refer [mk-state]])) (defn meta-system "Processes all events on the :meta queue and returns an u...
null
https://raw.githubusercontent.com/alexkehayias/chocolatier/6b77c1dbf10ef7ff83d0b5a2ebb9fda39edcde5a/src/cljs/chocolatier/engine/systems/meta.cljs
clojure
(ns chocolatier.engine.systems.meta "System for handling changes to the game state i.e add/remove entities, changing scenes, etc." (:require [chocolatier.engine.events :as ev] [chocolatier.engine.core :refer [mk-state]])) (defn meta-system "Processes all events on the :meta queue and returns an u...
e6471990586854007cf64957aa6b2c184257b57548fde329db2cacd77419cc24
jebberjeb/reframe-fsm
server.clj
(ns reframe-fsm.server (:require [clojure.string :as string] [io.pedestal.http :as http])) (defn respond-foo [request] (let [{:keys [first-name last-name password confirm-password]} (:query-params request)] (cond (not= password confirm-password) {:status 400 :body "match-password"} ...
null
https://raw.githubusercontent.com/jebberjeb/reframe-fsm/a88be427d33b0b3adeb1d359c2c6ce5cad2be825/register-no-fsm/src/clj/reframe_fsm/server.clj
clojure
Don't block the REPL.
(ns reframe-fsm.server (:require [clojure.string :as string] [io.pedestal.http :as http])) (defn respond-foo [request] (let [{:keys [first-name last-name password confirm-password]} (:query-params request)] (cond (not= password confirm-password) {:status 400 :body "match-password"} ...
39ec30ffcd5026ec52a6045c5bb325319b69f5be56cd737774d7d023de7f15b0
PaNaVTEC/csv2beancount
parser_test.clj
(ns csv2beancount.parser-test (:require [clojure.test :refer :all] [csv2beancount.parser :refer :all] [clojure.java.io :as io]) (:use midje.sweet)) (defn res-path [file-name] (-> file-name io/resource io/file .getAbsolutePath)) (defmacro parsing-with-args-should [csv-param yaml-param exp...
null
https://raw.githubusercontent.com/PaNaVTEC/csv2beancount/4f914fa6643004c374f99e7406d4f5d433409eb1/test/csv2beancount/parser_test.clj
clojure
(ns csv2beancount.parser-test (:require [clojure.test :refer :all] [csv2beancount.parser :refer :all] [clojure.java.io :as io]) (:use midje.sweet)) (defn res-path [file-name] (-> file-name io/resource io/file .getAbsolutePath)) (defmacro parsing-with-args-should [csv-param yaml-param exp...
57a0f7aaa1659dd533ab362d1e840be7f324b1fcd415d0e93426824cb8e38f29
rabbitmq/khepri
advanced_get.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved . %% -module(advanced_get). -include_lib("eunit/include/e...
null
https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/advanced_get.erl
erlang
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 /. Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved . -module(advanced_get). -include_lib("eunit/include/eunit.h...
da057b854421e7e1b810bfaad31a2d56f4bd00d6c580ea7d381f28a0d9249cf3
GrammaTech/sel
searchable.lisp
searchable.lisp --- Functions to recall " similar " snippets / fodder ;;; Interface for all external assets searchable for snippets ;;; similar to a given target. ;;; (defpackage :software-evolution-library/components/searchable (:nicknames :sel/components/searchable :sel/cp/searchable) (:use :gt/full :...
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/components/searchable.lisp
lisp
similar to a given target.
searchable.lisp --- Functions to recall " similar " snippets / fodder Interface for all external assets searchable for snippets (defpackage :software-evolution-library/components/searchable (:nicknames :sel/components/searchable :sel/cp/searchable) (:use :gt/full :diff :software-evolution-librar...
647312387f55bb6b741cfcedc3fefb6c1792da861a95eca09cf6d73c009ba119
ocamllabs/ocaml-effects
patmatch.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/testsuite/tests/basic/patmatch.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . let f = function 1 -> 1 | 2 -> 2 | 3 ...
615c9825dc8dcaecc99a76fa3f357ae45641f2688e4a9ecfa5a157bff989fe8a
aaronps/enotepad
enotepad.erl
%%%------------------------------------------------------------------- @author ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 14 . Oct 2016 10:02 %%%------------------------------------------------------------------- -module(enotepad). -author("aaronps"). -include_lib("wx/include/wx.hrl"). %% API -e...
null
https://raw.githubusercontent.com/aaronps/enotepad/d6b501ed94e8f44d1f375eb3c5b228d13b0c9dd3/src/enotepad.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API enotepad_wx:open_file(ENotepad, FileName), This should be the function called if running under a supervisor and if running as 'application' it will chec...
@author ( C ) 2016 , < COMPANY > Created : 14 . Oct 2016 10:02 -module(enotepad). -author("aaronps"). -include_lib("wx/include/wx.hrl"). -export([main/0, main/1, start_link/0, start_link/1]). -spec main() -> any(). main() -> main([]). -spec main(list()) -> any(). main([]) -> application:load(enotepad)...
1ee64ce30333d07785bb5d63146e5fcfcaf8e0f53c089ac374afa81c8a1bf3d4
elm-lang/elm-package
Initialize.hs
# LANGUAGE FlexibleContexts # module Elm.Package.Initialize (solution) where import Control.Monad.Except (ExceptT, MonadIO, liftIO, throwError) import qualified Data.Map as Map import System.Directory (doesFileExist) import qualified Elm.Package.Paths as Path import qualified Elm.Package.Solution as S import qualifie...
null
https://raw.githubusercontent.com/elm-lang/elm-package/2076638d812d9dea641e6e695951495f523bb98f/src/Elm/Package/Initialize.hs
haskell
# LANGUAGE FlexibleContexts # module Elm.Package.Initialize (solution) where import Control.Monad.Except (ExceptT, MonadIO, liftIO, throwError) import qualified Data.Map as Map import System.Directory (doesFileExist) import qualified Elm.Package.Paths as Path import qualified Elm.Package.Solution as S import qualifie...
527238043bc5eed2515fc808f396abe7724681b7d25e886310294b5dccf1160d
realworldocaml/mdx
mli_parser.ml
module Code_block = struct type metadata = { language_tag : string Odoc_parser.Loc.with_location; labels : string Odoc_parser.Loc.with_location option; } type t = { location : Odoc_parser.Loc.span; metadata : metadata option; contents : string; } end (* odoc-parser adjusts for the initial ...
null
https://raw.githubusercontent.com/realworldocaml/mdx/aa5551a8eb0669fa4561aeee55d6f1528661a510/lib/mli_parser.ml
ocaml
odoc-parser adjusts for the initial [** TODO: Report precise location If not specified, blocks are run as ocaml blocks Find the locations of the code blocks within [file_contents], then slice it up into [Text] and [Block] parts by using the starts and ends of those blocks as boundaries. append them i...
module Code_block = struct type metadata = { language_tag : string Odoc_parser.Loc.with_location; labels : string Odoc_parser.Loc.with_location option; } type t = { location : Odoc_parser.Loc.span; metadata : metadata option; contents : string; } end let docstring_start_adjustment = String...
2207f9f3839ee6bc2603c19e4bb13468789e9e51473219ae5537410f0e90c52d
resttime/cl-liballegro
video-streaming.lisp
(in-package :cl-liballegro) (defcenum video-event-type (:frame-show 550) (:finished 551) (:-seek 552)) (defcenum video-position-type :actual :video-decode :audio-decode)
null
https://raw.githubusercontent.com/resttime/cl-liballegro/0f8a3a77d5c81fe14352d9a799cba20e1a3a90b4/src/constants/addons/video-streaming.lisp
lisp
(in-package :cl-liballegro) (defcenum video-event-type (:frame-show 550) (:finished 551) (:-seek 552)) (defcenum video-position-type :actual :video-decode :audio-decode)
9ceb7da6fdb4d78dc361cf3ce172bb06edf03be2784532c061516f02f157099b
eval/deps-try
try.clj
(ns eval.deps-try.try (:require #_[clojure.tools.deps.alpha.repl :as deps-repl] [clojure.pprint :as pp] [clojure.repl :as clj-repl] [eval.deps-try.deps :as try-deps] [rebel-readline.clojure.line-reader :as clj-line-reader] [rebel-readline.clojure.main :as re...
null
https://raw.githubusercontent.com/eval/deps-try/dca3e52fa7e723021ae4f8c62d3c111771d27bde/src/eval/deps_try/try.clj
clojure
SOURCE -readline/issues/151#issuecomment-457631846 SOURCE -readline/pull/199 terminel line-reader service repl time: via --debug flag?
(ns eval.deps-try.try (:require #_[clojure.tools.deps.alpha.repl :as deps-repl] [clojure.pprint :as pp] [clojure.repl :as clj-repl] [eval.deps-try.deps :as try-deps] [rebel-readline.clojure.line-reader :as clj-line-reader] [rebel-readline.clojure.main :as re...
b6ee9c47a8866a2e25dca70445034b3208c982da3a6da24f16c218949e055f39
dnlkrgr/hsreduce
Decls.hs
module Reduce.Passes.Decls (splitSigs, rmvSigs, rmvDecls, rmvConstructors, simplifyConDecl) where import GHC hiding (Pass, getName) import Util.Types import Util.Util -- *************************************************************************** -- SIGNATURES -- ******************************************************...
null
https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/src/Reduce/Passes/Decls.hs
haskell
*************************************************************************** SIGNATURES *************************************************************************** *************************************************************************** UNUSED DECLS IN MODULE ****************************************************...
module Reduce.Passes.Decls (splitSigs, rmvSigs, rmvDecls, rmvConstructors, simplifyConDecl) where import GHC hiding (Pass, getName) import Util.Types import Util.Util split several names sharing one signature into several signatures splitSigs :: Pass splitSigs = mkPass "splitSigs" f where f :: WaysToC...
7146b0747f4d4636e8d77dbdf548be2c505ba7b16a20efb9d55944b73d12414d
RolfRolles/PandemicML
galtrans.ml
type mregion = int type lhs = Ignore | LRegister of reg | LMem of mregion * rhs type rhs = Bitvector of mword | RRegister of reg | RMem of mregion * rhs | Restrict of rhs * int * int type jump = Goto of addr | Cgoto of rhs type control = Jump of jump | Ite of cond * jump * jump type data = Assign of lhs ...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Incubator/Misc/Library/GAL/galtrans.ml
ocaml
empty Set (???) Set Add ???
type mregion = int type lhs = Ignore | LRegister of reg | LMem of mregion * rhs type rhs = Bitvector of mword | RRegister of reg | RMem of mregion * rhs | Restrict of rhs * int * int type jump = Goto of addr | Cgoto of rhs type control = Jump of jump | Ite of cond * jump * jump type data = Assign of lhs ...
8ef1c31372d6f44972235e26db87fe8200b4a92464238d0c17c8504d1cb80b55
Tclv/HaskellBook
ChapterExercises.hs
module ChapterExercises where import Test.QuickCheck import Test.QuickCheck.Classes import Test.QuickCheck.Checkers import Control.Applicative import Data.Monoid type T1 = Identity type T2 = Constant Int type T3 = Optional type T4 = List type T5 = Three Int Int type T6 = Three' Int type T7 = S Maybe type T8 = Tree ...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch21/ChapterExercises.hs
haskell
module ChapterExercises where import Test.QuickCheck import Test.QuickCheck.Classes import Test.QuickCheck.Checkers import Control.Applicative import Data.Monoid type T1 = Identity type T2 = Constant Int type T3 = Optional type T4 = List type T5 = Three Int Int type T6 = Three' Int type T7 = S Maybe type T8 = Tree ...
0fc9973516bcfa62608fafffb98256a9f80cc3cf9805d76f88b0fa6bde64b5a7
cvik/heja
heja_SUITE.erl
-module(heja_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export([test_facade_api/1, test_user_errors/1, test_server_errors/1, test_formats/1]). all() -> [test_facade_api, test_user_errors, test_server_...
null
https://raw.githubusercontent.com/cvik/heja/fc34e1bcca9a75e278a050be7ef9c2f2b21fd822/test/heja_SUITE.erl
erlang
Tests ---------------------------------------------------------------------- Reuse Id from POST call in subsequent calls Ensure delete is not allowed for users path Ensure broken handler return responds with handler_failure / unsupported_return Ensure response can be text/plain Ensure only application/json is acc...
-module(heja_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0, init_per_testcase/2, end_per_testcase/2]). -export([test_facade_api/1, test_user_errors/1, test_server_errors/1, test_formats/1]). all() -> [test_facade_api, test_user_errors, test_server_...
8292f992d39f43e2eec4afe5837f2f5f95bff42ffa85cf1bdb15ebcb2e8f7dd0
UU-ComputerScience/uhc
TypeOperator1.hs
{- ---------------------------------------------------------------------------------------- what : type level operator syntax expected: all ok ---------------------------------------------------------------------------------------- -} module TypeOperator1 where import Control.Arrow data (:+:) a b = a :+: b ...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/TypeOperator1.hs
haskell
---------------------------------------------------------------------------------------- what : type level operator syntax expected: all ok ---------------------------------------------------------------------------------------- error: type T2 x = Int + x
module TypeOperator1 where import Control.Arrow data (:+:) a b = a :+: b data a :*: b = a :*: b data D1 (+) = I1 (Int + Int) data D2 x = I2 (Int + x ) data D3 x = I3 (Int `x` Int) type T1 (+) = Int + Int type T3 x = Int `x` Int x :: Int `Either` Char x = Left 8 liftA2 :: Arrow (~>) => (a -> b -> c) -...
d173195c64154b63a71c8842008058cf801e445eb144098d9bc23710f883b8ef
oakmac/chessboard2
moves.cljs
(ns com.oakmac.chessboard2.util.moves) ;; TODO: good candidate for unit tests ;; FIXME: does this function need to handle 0-0 and 0-0-0? (defn move->map "Converts a move String to a map" ([m] (move->map m "MOVE_FORMAT")) ([m format] (let [arr (.split m "-")] (case format "ARROW_FORMAT" {...
null
https://raw.githubusercontent.com/oakmac/chessboard2/935cd73bd28cc5d1fb9c6910d0a47d19c4edf601/src-cljs/com/oakmac/chessboard2/util/moves.cljs
clojure
TODO: good candidate for unit tests FIXME: does this function need to handle 0-0 and 0-0-0? TODO: good candidate for unit tests
(ns com.oakmac.chessboard2.util.moves) (defn move->map "Converts a move String to a map" ([m] (move->map m "MOVE_FORMAT")) ([m format] (let [arr (.split m "-")] (case format "ARROW_FORMAT" {:start (aget arr 0) :end (aget arr 1)} "MOVE_FORMAT" {:from (aget arr 0) ...
926cf95e19b8dafc18f53c44b06d301f9135916d0d4df623c6d5fb0c905c06ae
zippy/anansi
contact.clj
(ns anansi.test.streamscapes.contact (:use [anansi.streamscapes.contact] :reload) (:use [anansi.ceptr]) (:use [midje.sweet]) (:use [clojure.test])) (deftest contact (let [i (make-receptor contact-def nil {:attributes {:name "joe"}})] (fact (receptor-state i false) => (contains {:name "joe" :fingerprint :...
null
https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/streamscapes/contact.clj
clojure
(ns anansi.test.streamscapes.contact (:use [anansi.streamscapes.contact] :reload) (:use [anansi.ceptr]) (:use [midje.sweet]) (:use [clojure.test])) (deftest contact (let [i (make-receptor contact-def nil {:attributes {:name "joe"}})] (fact (receptor-state i false) => (contains {:name "joe" :fingerprint :...
89e19b5b3052cc7dfc03e6ae0ca1a4b19bed38907b0198dadec0f9f2b1b863a2
kostmo/circleci-failure-tracker
CommentRebaseAdvice.hs
{-# LANGUAGE OverloadedStrings #-} module CommentRebaseAdvice where import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.List.NonEmpty as NE import qualified Data.Text as T import qualified Data.Text.Lazy as LT import qualified CommentRenderCommon import qualified GadgitFetch ...
null
https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/CommentRebaseAdvice.hs
haskell
# LANGUAGE OverloadedStrings #
module CommentRebaseAdvice where import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.List.NonEmpty as NE import qualified Data.Text as T import qualified Data.Text.Lazy as LT import qualified CommentRenderCommon import qualified GadgitFetch import qualified Markdown ...
f71076066d4f04f76a2118e03219c3e7519fe4989d9b2f5f544ca441ddf6faaf
shirok/Gauche
grid.scm
;; Taken from R7RS ;; (define-library (example grid) (export make rows cols ref each (rename put! set!)) (import (scheme base)) (begin Create an NxM grid . (define (make n m) (let ((grid (make-vector n))) (do ((i 0 (+ i 1))) ((= i n) grid) (let ((v (make-vect...
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/examples/r7rs/example/grid.scm
scheme
Return #false if out of range.
Taken from R7RS (define-library (example grid) (export make rows cols ref each (rename put! set!)) (import (scheme base)) (begin Create an NxM grid . (define (make n m) (let ((grid (make-vector n))) (do ((i 0 (+ i 1))) ((= i n) grid) (let ((v (make-vector m #...
be195e94b6cdedb4d45e6f94ebf1b8c32e534dc5c2afde363bf62f9832516c75
sshine/hs-jq
Number.hs
# LANGUAGE RecordWildCards # module Jq.Number where import Data.Scientific (Scientific) -- FIXME: This can currently represent numbers that aren't meaningful: -- -- JqNumber Nothing (-1) Nothing: Negative fractions aren't well-defined. -- JqNumber Nothing Nothing Nothing: No components is just "" or "."? data JqNum...
null
https://raw.githubusercontent.com/sshine/hs-jq/157b89a34b1f72581b02302b876785d6074dffa3/src/Jq/Number.hs
haskell
FIXME: This can currently represent numbers that aren't meaningful: JqNumber Nothing (-1) Nothing: Negative fractions aren't well-defined. JqNumber Nothing Nothing Nothing: No components is just "" or "."?
# LANGUAGE RecordWildCards # module Jq.Number where import Data.Scientific (Scientific) data JqNumber = JqNumber { jqnInteger :: !(Maybe Integer) , jqnFraction :: !(Maybe Integer) , jqnExponent :: !(Maybe Integer) } deriving (Eq, Show) toScientific :: JqNumber -> Scientific toScientific JqNumber{..} = ...
df1165e2601ec227bfa6f301217435198b467158cec1ded43a1b66b416e710ad
futurice/haskell-mega-repo
Config.hs
module Futurice.App.PlanMillProxy.Config ( Config(..), ) where import Futurice.EnvConfig import Futurice.Postgres (ConnectInfo) import Futurice.Prelude import PlanMill (Cfg (..)) import Prelude () data Config = Config { cfgCfg :: !Cfg , cfgPostgresConnInfo :: !ConnectInfo }...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/planmill-proxy/src/Futurice/App/PlanMillProxy/Config.hs
haskell
module Futurice.App.PlanMillProxy.Config ( Config(..), ) where import Futurice.EnvConfig import Futurice.Postgres (ConnectInfo) import Futurice.Prelude import PlanMill (Cfg (..)) import Prelude () data Config = Config { cfgCfg :: !Cfg , cfgPostgresConnInfo :: !ConnectInfo }...
4f866c0c3bbad6d9b337f4d10208aa8a61cdfa0de2a20c40fcc84e85ec128c76
gebi/jungerl
diff.erl
-module(diff). %% File : diff.erl Author : ( ) Purpose : Diff of two files ( like Diff and patch ) . %% diff(New, Old) -> Patch %% patch(New, Patch) -> Old %% patchL(New, [Patch]) -> Old' %% -compile(export_all). -export([diff/2, diff_files/2, patch/2, patchL/2]). -export([test/0]). -import(lists, [fol...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/wiki/src/diff.erl
erlang
File : diff.erl diff(New, Old) -> Patch patch(New, Patch) -> Old patchL(New, [Patch]) -> Old' -compile(export_all).
-module(diff). Author : ( ) Purpose : Diff of two files ( like Diff and patch ) . -export([diff/2, diff_files/2, patch/2, patchL/2]). -export([test/0]). -import(lists, [foldl/3, reverse/1]). test() -> diff_files("diff.erl", "diff.erl.old"). diff_files(F1, F2) -> {ok, B1} = file:read_file(F1), ...
28c392ffdef0c001383e4e90e316e8dabf242a4d91d47503edc36e7ad53e22d9
juspay/euler-hs
Language.hs
# LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} | Module : EulerHS.Core . SqlDB.Language Copyright : ( C ) Juspay Technologies Pvt Ltd 2019 - 2022 License : Apache 2.0 ( see the file LICENSE...
null
https://raw.githubusercontent.com/juspay/euler-hs/0fdda6ef43c1a6c9c7221d7c194c278e375b9936/src/EulerHS/Core/SqlDB/Language.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # * SQLDB language ** Types ** Methods for tests | Wrapping helper For testing purpose Convenience interface | Select many | Insert | Insert returning list | Update | Update returning list | Delete Postgres only extra methods | Postgres-...
# LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # | Module : EulerHS.Core . SqlDB.Language Copyright : ( C ) Juspay Technologies Pvt Ltd 2019 - 2022 License : Apache 2.0 ( see the file LICENSE ) Maintainer : Stability : experimental Portability : non -...
a45a353819ca3de76f8ad7532a01615868a49bd52813cb2e8ed983fb39a8857a
clojure-lsp/clojure-lsp
sort_clauses.clj
(ns clojure-lsp.feature.sort-clauses (:require [clojure-lsp.feature.clauses :as f.clauses] [medley.core :as medley] [rewrite-clj.node :as n] [rewrite-clj.zip :as z])) (defn ^:private clause-spec [zloc uri db] (when zloc (let [zloc (or (and (n/inner? (z/node zloc)) ;; sort from map/vector/list brack...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/59719e2ceed68606aa994bc25a1c08d0396145ee/lib/src/clojure_lsp/feature/sort_clauses.clj
clojure
sort from map/vector/list bracket don't sort in places that establish bindings, which are order dependent
(ns clojure-lsp.feature.sort-clauses (:require [clojure-lsp.feature.clauses :as f.clauses] [medley.core :as medley] [rewrite-clj.node :as n] [rewrite-clj.zip :as z])) (defn ^:private clause-spec [zloc uri db] (when zloc (z/down zloc)) zloc) clause-sp...
d08ddb51c2bc2cb8e261cd0f904eb610a27803d8f4ffdfc1ff3860527d0a7d91
abengoa/clj-stripe
cards.clj
Copyright ( c ) 2011 . 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 b...
null
https://raw.githubusercontent.com/abengoa/clj-stripe/d4870d6ea57140d23385878bcf7faea21cf90da8/test/clj_stripe/test/cards.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) 2011 . All rights reserved . (ns clj-stripe.test.cards (:use [clj-stripe common cards]) (:require [clojure.test :as test])) (with-token "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" (def test-card (card (number "4242424242424242") (expiration 12 2020) (cvc 123) (owner-name "Mr. Owner"))) (def cre...
06925dbc71b90d3d9211c527d32cb4e3a9ca4cbf30f6ee5218d3f7b420032c74
lazy-cat-io/metaverse
config.cljs
(ns metaverse.runner.config (:require [metaverse.common.env :as env] [metaverse.runner.utils.os :as os])) ;; ;; System info ;; (def username (os/get-username)) ;; ;; URLs ;; (def root-dir js/__dirname) (def index-url (if env/develop? ":3000" (str "file://" root-dir "/index.html"))) ;; ;;...
null
https://raw.githubusercontent.com/lazy-cat-io/metaverse/a836a186896ca1f6c4fc1c73fa37812513071750/src/main/clojure/metaverse/runner/config.cljs
clojure
System info URLs Window options Secret storage options
(ns metaverse.runner.config (:require [metaverse.common.env :as env] [metaverse.runner.utils.os :as os])) (def username (os/get-username)) (def root-dir js/__dirname) (def index-url (if env/develop? ":3000" (str "file://" root-dir "/index.html"))) (def height 900) (def width 1200) (def...
9295dc5847ddb17a1f8fbb144eb927aa664619c148e63b759d574ff02407f71b
jeapostrophe/exp
ror-test0.rkt
#lang racket/base (require "ror.rkt") (blast-off! [posts (title body)])
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/ror/ror-test0.rkt
racket
#lang racket/base (require "ror.rkt") (blast-off! [posts (title body)])
39c0ad1c187f1e30e4afa262d826c6a88f7a3bfa95da31d3ac2d3181155199e0
uim/uim
uim-help.scm
;;; socket.scm: socket library for uim. ;;; Copyright ( c ) 2009 - 2013 uim Project ;;; ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: 1 . Redistributions of source code must ret...
null
https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/uim-help.scm
scheme
socket.scm: socket library for uim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the fo...
Copyright ( c ) 2009 - 2013 uim Project 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors nor the names of its contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR...
2fb6d4e8871ea15e497671144b3bee8c79ebbab47504ced2dda23e118e841e7f
lancelet/wgpu-hs
SDLSurface.hs
# LANGUAGE CPP # module WGPU.Raw.SDLSurface where import Control.Monad.IO.Class (MonadIO, liftIO) import Foreign (Ptr, alloca, castPtr, nullPtr, poke) import qualified SDL import Unsafe.Coerce (unsafeCoerce) import qualified WGPU.Raw.Generated.Enum.WGPUSType as WGPUSType import WGPU.Raw.Generated.Fun (WGPUHsInstance,...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/29c6a7a3f21ec074f3b23e282ea69396bad337cb/wgpu-raw-hs/src/WGPU/Raw/SDLSurface.hs
haskell
# LANGUAGE CPP # module WGPU.Raw.SDLSurface where import Control.Monad.IO.Class (MonadIO, liftIO) import Foreign (Ptr, alloca, castPtr, nullPtr, poke) import qualified SDL import Unsafe.Coerce (unsafeCoerce) import qualified WGPU.Raw.Generated.Enum.WGPUSType as WGPUSType import WGPU.Raw.Generated.Fun (WGPUHsInstance,...
c8337fc83569979da9f2366e2fdd469b8721a1be04c80a9f1b360153620b2180
epiccastle/spire
test_download.clj
(ns test-pod.test-download (:require [test-pod.conf :as conf] [test-pod.utils :as utils :refer [bash]] [clojure.test :refer [is deftest]] [babashka.pods :as pods] [babashka.process :refer [process check]] [clojure.string :as string] [clojure.java...
null
https://raw.githubusercontent.com/epiccastle/spire/f1161ae5ff74124d603c1679507fc0a1b31c26eb/test/test_pod/test_download.clj
clojure
(ns test-pod.test-download (:require [test-pod.conf :as conf] [test-pod.utils :as utils :refer [bash]] [clojure.test :refer [is deftest]] [babashka.pods :as pods] [babashka.process :refer [process check]] [clojure.string :as string] [clojure.java...
81fa6f90b03c3df4d7b84a00fcd531de5b48cb3c993e49a31dd03091783019b9
garrigue/lablgl
test8.ml
#!/usr/bin/env lablglut Copyright ( c ) 1994 1996 . (* This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. *) Ported to lablglut by Issac Trotts on Sat Aug 10 13:41:20 MDT 2002 ...
null
https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/test/test8.ml
ocaml
This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. redundant
#!/usr/bin/env lablglut Copyright ( c ) 1994 1996 . Ported to lablglut by Issac Trotts on Sat Aug 10 13:41:20 MDT 2002 . open Printf let main_w = ref(-1) let w = [| 0; 0; 0; 0 |] let win = ref(-1) let num = ref(-1) let fail_childnum () = failwith(sprintf " Glut.get returned wrong # children: %d\n" !...
51b149d0fdd510813bdac7ad2659668af25635814a8f66065a2287aa8f16912b
SquidDev/urn
init.lisp
(import core/prelude ()) (defun gcd (x y) "Compute the greatest common divisor of X and Y. ### Example ```cl > (gcd 52 32) out = 4 ```" (loop [(x (math/abs x)) (y (math/abs y))] [(= y 0) x] (recur y (mod x y)))) (defun lcm (x y) "Compute the lowest common multiple of X and Y. ...
null
https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/math/init.lisp
lisp
(import core/prelude ()) (defun gcd (x y) "Compute the greatest common divisor of X and Y. ### Example ```cl > (gcd 52 32) out = 4 ```" (loop [(x (math/abs x)) (y (math/abs y))] [(= y 0) x] (recur y (mod x y)))) (defun lcm (x y) "Compute the lowest common multiple of X and Y. ...
b18217478915572a9982ac2024892c51895602818b38a64ac7dd4f2c8f61e81f
basho/riak_test
repl_aae_fullsync_bt.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2013 Basho Technologies , Inc. %% %% ------------------------------------------------------------------- -module(repl_aae_fullsync_bt). -behaviour(riak_test). -export([confirm/0]). -include_lib("eunit/include/eunit.hrl"). -defi...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/repl_aae_fullsync_bt.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- @doc riak_test entry point The clusters must already have been named and connected. turn off fullsync Cluster "A" -> cluster "B" Name the clusters fetch bucket pro...
Copyright ( c ) 2013 Basho Technologies , Inc. -module(repl_aae_fullsync_bt). -behaviour(riak_test). -export([confirm/0]). -include_lib("eunit/include/eunit.hrl"). -define(ENSURE_READ_ITERATIONS, 5). -define(ENSURE_READ_INTERVAL, 1000). Replication Bucket Types test setup(Type) -> rt:set_conf(all, [{"buckets...
4d6fb39d549159c320ece81151b4da5d64ed2c1422e040922b75312c9bd3095d
oakes/play-clj
repl.clj
(ns play-clj.repl (:require [play-clj.core :refer :all])) (defn s "Returns the screen map in `screen-object`. (s main-screen)" [screen-object] (-> screen-object :screen deref)) (defn s! "Associates values to the screen map in `screen-object`. Returns the new screen map. (s! main-screen :camera (or...
null
https://raw.githubusercontent.com/oakes/play-clj/aea03800071e13a6cbf1a925906e408b26138edd/src/play_clj/repl.clj
clojure
(ns play-clj.repl (:require [play-clj.core :refer :all])) (defn s "Returns the screen map in `screen-object`. (s main-screen)" [screen-object] (-> screen-object :screen deref)) (defn s! "Associates values to the screen map in `screen-object`. Returns the new screen map. (s! main-screen :camera (or...
8e0fdb99282cbc87a2961e743e4c7abef863825a1af2139023859fa9f9df8256
McCLIM/McCLIM
pixmaps.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; 12.6 Pixmaps ;;; (in-package #:clim-internals) (defmethod allocate-pixmap ((sheet sheet) wi...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/d49fef5c2bb1307a006cdadfc4061e0a6b0fff79/Core/windowing/pixmaps.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). ---------------------------------------------------------------------------
12.6 Pixmaps (in-package #:clim-internals) (defmethod allocate-pixmap ((sheet sheet) width height) (with-sheet-medium (medium sheet) (allocate-pixmap medium width height))) (defmethod allocate-pixmap ((medium medium) width height) (declare (ignore medium width height)) (error "Don't know how to allocate ...
eb0f3c768bf107f83f7ef16960a5221fd22578e4ca6a4a65db83884133846498
sanette/oplot
gamma.ml
GSL Gamma function , adaptative plot , and LaTeX formula module Math = struct Gsl.Error.init () let gamma x = try Gsl.Sf.gamma x with Gsl.Error.Gsl_exn _ -> nan | e -> raise e end open Oplot.Plt let p1 = view (-2.5) (-10.) 4. 10. let p2 = color 1. 0. 0. let p3 = adapt_plot Math.gamma (-2.5) 4. let p4 = co...
null
https://raw.githubusercontent.com/sanette/oplot/02b35d794fd0f42407a75edded11c2a58d7a3f29/bin/gamma.ml
ocaml
GSL Gamma function , adaptative plot , and LaTeX formula module Math = struct Gsl.Error.init () let gamma x = try Gsl.Sf.gamma x with Gsl.Error.Gsl_exn _ -> nan | e -> raise e end open Oplot.Plt let p1 = view (-2.5) (-10.) 4. 10. let p2 = color 1. 0. 0. let p3 = adapt_plot Math.gamma (-2.5) 4. let p4 = co...
c257d18ffd2d74b7386c9e79d655641b9c61a8513df610b4f386f10e2688c0a9
antoniogarrote/clj-s4
wiring.clj
(ns randomnumbers.wiring (:use [clj-s4.wiring])) ;;; Processing elements (wire-app "RandomNumbers" (wire-pe {:id "bifurcationPE" :class "cljs4.BifurcationPE" :keys ["RandomNumbers *"] :properties [{:name "id" :value "bifurcationPe"} {:name "dispatcher" :ref ...
null
https://raw.githubusercontent.com/antoniogarrote/clj-s4/5d41b327682a532e4ed4672a139676adbc775714/sampleapps/random-numbers/src/randomnumbers/wiring.clj
clojure
Processing elements Adapter
(ns randomnumbers.wiring (:use [clj-s4.wiring])) (wire-app "RandomNumbers" (wire-pe {:id "bifurcationPE" :class "cljs4.BifurcationPE" :keys ["RandomNumbers *"] :properties [{:name "id" :value "bifurcationPe"} {:name "dispatcher" :ref "numbersDispatcher"} ...
5438e628583ee462f5fce4ed7067d0ba60eb27e7a59253a6a2777dbf6acfd93d
quark-lang/quark
Type.hs
module Core.Macro.Definition.Type where import Core.Macro.Definition.Macro import Control.Monad.Except import Control.Monad.State import qualified Data.Map as M newtype MacroCompiler a = MacroCompiler { runMacroCompiler :: Macros -> Either String a } instance Functor MacroCompiler where fmap f...
null
https://raw.githubusercontent.com/quark-lang/quark/e3dc7fff4e4dfba3e5c9ab71f10ede8bc5a30a44/app/Core/Macro/Definition/Type.hs
haskell
module Core.Macro.Definition.Type where import Core.Macro.Definition.Macro import Control.Monad.Except import Control.Monad.State import qualified Data.Map as M newtype MacroCompiler a = MacroCompiler { runMacroCompiler :: Macros -> Either String a } instance Functor MacroCompiler where fmap f...
8a61103cba145c6485c77e0e3baa741173733f20a4a15bc83992fa70d4d6c5ab
votinginfoproject/data-processor
tree_statistics_test.clj
(ns vip.data-processor.db.tree-statistics-test (:require [clojure.test :refer :all] [vip.data-processor.pipeline :as pipeline] [vip.data-processor.db.tree-statistics :refer :all] [vip.data-processor.db.postgres :as psql] [vip.data-processor.validation.xml :as xml] ...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/db/tree_statistics_test.clj
clojure
(ns vip.data-processor.db.tree-statistics-test (:require [clojure.test :refer :all] [vip.data-processor.pipeline :as pipeline] [vip.data-processor.db.tree-statistics :refer :all] [vip.data-processor.db.postgres :as psql] [vip.data-processor.validation.xml :as xml] ...
07d57fedc9c281e55faa9fe66435bd79ccd9870a48beea951bb08c86c9566520
thomasblanc/curry-flavor
graph.ml
(* This file implements simple graph with labels on the edges. This aims at showing how playing with different interfaces over the same type can provide really enjoyable coding. Note that the type definition are quite longer and can be complex, also the type error messages can be hard to read. We advise yo...
null
https://raw.githubusercontent.com/thomasblanc/curry-flavor/821c56e5485889570e0835627b43c47f5001cd43/examples/graph.ml
ocaml
This file implements simple graph with labels on the edges. This aims at showing how playing with different interfaces over the same type can provide really enjoyable coding. Note that the type definition are quite longer and can be complex, also the type error messages can be hard to read. We advise you ...
module Node = struct type t = int let compare (a:t) b = compare a b end module Edge = struct type t = string let compare (a:t) b = compare a b end module Int = struct type t = int let compare (a:t) b = compare a b end First the standard maps module Nm = Map.Make (Node) module Em = Map.Make (Edge) modu...
a1d59475c5e76ef2886d9b21436ef2458b450d24548e003943d94fd2169ca51c
emqx/emqx
emqx_channel_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2019 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/0a5b221984030c3b2915a4669347b1d95de47f64/apps/emqx/test/emqx_channel_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2019 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_channel_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("...
14a758a7892118d735c5a6e2fede6b73eff15eafc731f3ceda84a5089a91c948
spurious/sagittarius-scheme-mirror
test-calendar.scm
(import (sagittarius calendar) (sagittarius calendar gregorian) (sagittarius calendar iso) (sagittarius time-util)) (test-begin "calendar") (test-assert (calendar? calendar:gregorian)) (test-assert (calendar? calendar:iso)) (test-assert (calendar? calendar:system)) (test-assert (calendar-date? (time-utc->calendar...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/ext/time/test-calendar.scm
scheme
(import (sagittarius calendar) (sagittarius calendar gregorian) (sagittarius calendar iso) (sagittarius time-util)) (test-begin "calendar") (test-assert (calendar? calendar:gregorian)) (test-assert (calendar? calendar:iso)) (test-assert (calendar? calendar:system)) (test-assert (calendar-date? (time-utc->calendar...
4b4f58a50073065afffb39c2ad6fdbca5ccd2c960346de7c9c859751ab82006c
marcinjangrzybowski/cubeViz2
Example.hs
module Drawing.Example where import Drawing.Base square1 :: DrawingGL square1 = combineDrawings $ [ Drawing [( unitHyCube 2 , SShape ( Rgba 1.0 1.0 0.0 1.0 ) )] , (translate [0.2 , 0.2] $ scale 0.6 (Drawing [ ( unitHyCube 2 , Mask ) ])) , (transl...
null
https://raw.githubusercontent.com/marcinjangrzybowski/cubeViz2/42b31c29d7317f26f4091cc2f383aeafb5a76ee4/DrawingMeta/Example.hs
haskell
, , example3d :: DrawingGL example3d = combineDrawings $ [ -- Drawing [ ( unitHyCube 3 , SShape ( Rgba 1.0 1.0 0.0 1.0 ) ) ] -- , ( translate [ 0.2 , 0.2 , 0.1 ] $ scale 0.3 ( Drawing [ ( unitHyCube 3 , Mask ) ] ) ) -- , , , ...
module Drawing.Example where import Drawing.Base square1 :: DrawingGL square1 = combineDrawings $ [ Drawing [( unitHyCube 2 , SShape ( Rgba 1.0 1.0 0.0 1.0 ) )] , (translate [0.2 , 0.2] $ scale 0.6 (Drawing [ ( unitHyCube 2 , Mask ) ])) , (transl...
58010633d055393df1e4518f63fca802987245feca191e26ca4a7d1dbefaa36d
fpco/odbc
Internal.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # LANGUAGE TupleSections # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE BangPatterns #-} # LANGUAGE ViewPatterns # {-# LANGUAGE MultiWayIf #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE Ran...
null
https://raw.githubusercontent.com/fpco/odbc/38e04349fe28a91f189e44bd7783220956d18aae/src/Database/ODBC/Internal.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # # LANGUAGE BangPatterns # # LANGUAGE MultiWayIf # # LANGUAGE RankNTypes # | ODBC database API. WARNING: This API is meant as a base for more high-level APIs, such are all vulerable to SQL injection attacks. See <> for more information. Don't use this...
# LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE DeriveGeneric # # LANGUAGE ViewPatterns # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # # LANGUAGE ForeignFunctionInterface # as the one provided in " Database . ODBC.SQLServer " . The commands here ...
3d2f6f0a68d8981169ab3817680983d9e8c73159b2c5b26aaa15141aa93f6f13
nuvla/ui
views.cljs
(ns sixsq.nuvla.ui.main.views (:require [re-frame.core :refer [dispatch subscribe]] [sixsq.nuvla.ui.apps.events :as apps-events] [sixsq.nuvla.ui.cimi.subs :as api-subs] [sixsq.nuvla.ui.i18n.subs :as i18n-subs] [sixsq.nuvla.ui.i18n.views :as i18n-views] [sixs...
null
https://raw.githubusercontent.com/nuvla/ui/df109c14ef7f1abaa8f7cf0bf4a9da3ee7e0e0ba/code/src/cljs/sixsq/nuvla/ui/main/views.cljs
clojure
data-testid is used for e2e test
(ns sixsq.nuvla.ui.main.views (:require [re-frame.core :refer [dispatch subscribe]] [sixsq.nuvla.ui.apps.events :as apps-events] [sixsq.nuvla.ui.cimi.subs :as api-subs] [sixsq.nuvla.ui.i18n.subs :as i18n-subs] [sixsq.nuvla.ui.i18n.views :as i18n-views] [sixs...
44f58b3351714a4e08513e40d30e64cff9580eb9c5dcea4214c2ee5142042853
xmppjingle/snatch
claws_kafka.erl
-module(claws_kafka). -behaviour(gen_server). -behaviour(claws). -export([start_link/1, stop/1, ack/2]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). %% claws callbacks -export([send...
null
https://raw.githubusercontent.com/xmppjingle/snatch/da32ed1f17a05685461ec092800c4cb111a05f0b/src/claws_kafka.erl
erlang
gen_server callbacks claws callbacks brod_group_subscriber callbacks Avoid intense restarts brod_topic_subscriber:cb_fun() brod_group_subscriber handle_message/4 impl
-module(claws_kafka). -behaviour(gen_server). -behaviour(claws). -export([start_link/1, stop/1, ack/2]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([send/2, send/3]). -export([init/2, ...
cb91ce6ca675da7e8b6b6a057f7ddc3db69f7790f71a85ba06de82e58049b81a
day8/re-frame-10x
coll.cljs
(ns day8.re-frame-10x.tools.coll) (defn last-in-vec "Get the last element in the vector. Returns nil if v is empty" [v] (let [num (count v)] (if (zero? num) nil (nth v (dec num))))) (defn find-all-indexes-in-vec "Gets the index of all items in vec that match the predicate" [pred v] (keep-i...
null
https://raw.githubusercontent.com/day8/re-frame-10x/fed7106d1a542a920e097d74112e7b0fc8fb4980/src/day8/re_frame_10x/tools/coll.cljs
clojure
(ns day8.re-frame-10x.tools.coll) (defn last-in-vec "Get the last element in the vector. Returns nil if v is empty" [v] (let [num (count v)] (if (zero? num) nil (nth v (dec num))))) (defn find-all-indexes-in-vec "Gets the index of all items in vec that match the predicate" [pred v] (keep-i...
0d5ae3331db0b5f61802841c3c8f937cfd7dabc37e0c1f4f5a2964a051d515e6
manavpatnaik/haskell
2_fibonacci.hs
fib1 a | a `elem` [0, 1] = a | otherwise = (fib1(a-1)) + (fib1(a-2)) main = do print(fib1 0) print(fib1 1) print(fib1 2) print(fib1 3) print(fib1 4) print(fib1 5) print(fib1 6)
null
https://raw.githubusercontent.com/manavpatnaik/haskell/85be0b7130619c6e5e815a69e66cd366c3e6cb21/practice-set-2-recursion/2_fibonacci.hs
haskell
fib1 a | a `elem` [0, 1] = a | otherwise = (fib1(a-1)) + (fib1(a-2)) main = do print(fib1 0) print(fib1 1) print(fib1 2) print(fib1 3) print(fib1 4) print(fib1 5) print(fib1 6)
fcd7f9cc3e217e78ee79d61cd937cd42591e9a2912e2ba45cb5ea1a5acbafd6a
jakemcc/test-refresh
sample_report.clj
(ns lein2.sample-report (:require [clojure.test :as t])) (defmulti ^:dynamic my-report :type) (defmethod my-report :default [m]) (defmethod my-report :pass [m] (t/with-test-out (t/inc-report-counter :pass))) (defmethod my-report :error [m] (t/with-test-out (t/inc-report-counter :error) (println "...
null
https://raw.githubusercontent.com/jakemcc/test-refresh/86cf2baa083e183c2f08fe5c049a62a0807658c4/lein2/src/lein2/sample_report.clj
clojure
(ns lein2.sample-report (:require [clojure.test :as t])) (defmulti ^:dynamic my-report :type) (defmethod my-report :default [m]) (defmethod my-report :pass [m] (t/with-test-out (t/inc-report-counter :pass))) (defmethod my-report :error [m] (t/with-test-out (t/inc-report-counter :error) (println "...
74b0732f65ad08dd99d4f397528be616cdbf20a474276287d5076e87f0fa5d40
repl-acement/repl-acement
ws.cljs
(ns replacement.ui.ws (:require goog.date.Date [re-frame.core :as re-frame] [taoensso.encore :as encore :refer [have have?]] [taoensso.timbre :as timbre :refer [tracef debugf infof warnf errorf]] [taoensso.sente :as sente :refer [cb-success?]] [taoensso.sente.packers.transit :as sente-transit]...
null
https://raw.githubusercontent.com/repl-acement/repl-acement/b67eec43fee7144a25e3322bb31f827d2f1f6051/repl-ui/replacement/ui/ws.cljs
clojure
--- WS client --- Hack to close the loop for anonymous local editors do reply The WS connection is established ... get the team name and secret
(ns replacement.ui.ws (:require goog.date.Date [re-frame.core :as re-frame] [taoensso.encore :as encore :refer [have have?]] [taoensso.timbre :as timbre :refer [tracef debugf infof warnf errorf]] [taoensso.sente :as sente :refer [cb-success?]] [taoensso.sente.packers.transit :as sente-transit]...
dac0694efb6f9e46b7f3d155ad2d9b62df5107fc9b79e46bcc9fd8a4ef21c007
toschoo/mom
registry.hs
module Main where import System.Exit import Test.QuickCheck import Test.QuickCheck.Monadic import Common < --- SUT import Types import Network.Mom.Stompl.Client.Queue import Data.List (find, nub, sort, partition) import ...
null
https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/stomp-patterns/test/suite/registry.hs
haskell
- SUT insert into registry ------------------------------------------------ ------------------------------------------ ------------------------------------ getProvider n from registry ------------------------------------------ getProvider n after getting others from registry --------------------- updR -------------...
module Main where import System.Exit import Test.QuickCheck import Test.QuickCheck.Monadic import Common import Types import Network.Mom.Stompl.Client.Queue import Data.List (find, nub, sort, partition) import Data.Time...
f5099c790a2f041b4628a8631fd156b94dae66abf9a243dac93f0df0d68ff48b
mirage/irmin
pack_key.ml
* Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS...
null
https://raw.githubusercontent.com/mirage/irmin/eddf51783b4d97e14b4f79d6330a96918f880c6b/src/irmin-pack/unix/pack_key.ml
ocaml
The pre-hash image of a key is just the hash of the corresponding value. NOTE: it's particularly important that we discard the file offset when computing hashes of structured values (e.g. inodes), so that this hashing process is reproducible in different stores (w/ different offsets for the values...
* Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS...
60d0f5127468e103b324ff6946d7cb0286763f39ea928515b7b4b426e638707b
well-typed/large-records
Evens100.hs
# LANGUAGE DataKinds # module Bench.EvensOfSize.Evens100 (Evens(..), evens) where import Bench.Types data Evens = Evens { -- 00 .. 09 evens00 :: !(T 00) , evens02 :: !(T 02) , evens04 :: !(T 04) , evens06 :: !(T 06) , evens08 :: !(T 08) 10 .. 19 , evens10 :: !(T 10) , evens12 ::...
null
https://raw.githubusercontent.com/well-typed/large-records/3224e87fc016609f2f86e9155b9348e75c67425d/large-records-benchmarks/lib/Bench/EvensOfSize/Evens100.hs
haskell
00 .. 09 00 .. 09
# LANGUAGE DataKinds # module Bench.EvensOfSize.Evens100 (Evens(..), evens) where import Bench.Types data Evens = Evens { evens00 :: !(T 00) , evens02 :: !(T 02) , evens04 :: !(T 04) , evens06 :: !(T 06) , evens08 :: !(T 08) 10 .. 19 , evens10 :: !(T 10) , evens12 :: !(T 12) , eve...
7407c2bb8e93952479395eb7f14daeef48107d2f6b7d4cc672eb06b55cec07ba
rmloveland/scheme48-0.53
to-cps.scm
Copyright ( c ) 1994 by . See file COPYING . ; Convert a byte-code-compiler node into a cps node. ; Entry point. (define (x->cps node name) (receive (value first-call last-lambda) (cps node) (if first-call (bug "(X->CPS ~S) got a non-value" node)) (maybe-add-name! value name) value)) ;---...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/to-cps.scm
scheme
Convert a byte-code-compiler node into a cps node. Entry point. ---------------------------------------------------------------- Same as above except that <value> is a list of values. ---------------------------------------------------------------- (TAIL-CPS <node> <continuation-variable>) in the TAIL-CPS table. ...
Copyright ( c ) 1994 by . See file COPYING . (define (x->cps node name) (receive (value first-call last-lambda) (cps node) (if first-call (bug "(X->CPS ~S) got a non-value" node)) (maybe-add-name! value name) value)) ( CPS < node > ) - > < value > < first - call > < last - lambda > ...
0787b2b77cfce233ef69f5d555cb1e6315283044db1d9152cb840430e7d4fd1b
javazquez/arnoldclj_interpreter
project.clj
(defproject arnoldclj_s "0.0.1-SNAPSHOT" :description "Cool new project to do things and stuff" :dependencies [[org.clojure/clojure "1.8.0"] [instaparse "1.4.4"]] :profiles {:dev {:dependencies [[midje "1.8.3"]]}})
null
https://raw.githubusercontent.com/javazquez/arnoldclj_interpreter/d6860d7063a121103293b10dca65b113ad843d26/project.clj
clojure
(defproject arnoldclj_s "0.0.1-SNAPSHOT" :description "Cool new project to do things and stuff" :dependencies [[org.clojure/clojure "1.8.0"] [instaparse "1.4.4"]] :profiles {:dev {:dependencies [[midje "1.8.3"]]}})
d220fca9938de5789367e97f16b44361d908e2b351a2e94098cf560ab6bc9a02
picty/parsifal
answerDumpUtil.ml
open Lwt open LwtUtil open Parsifal open BasePTypes open PTypes open AnswerDump open Ssl2 open Tls open TlsEnums open TlsEngineNG open X509 (* TODO: Check that parsing exceptions are correctly handled *) (**************************************) (* Helpers to manipulate answer dumps *) (*****************************...
null
https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/ssl/answerDumpUtil.ml
ocaml
TODO: Check that parsing exceptions are correctly handled ************************************ Helpers to manipulate answer dumps ************************************ *************************************** Helpers to parse answer dump contents *************************************** TODO: We do not catch except...
open Lwt open LwtUtil open Parsifal open BasePTypes open PTypes open AnswerDump open Ssl2 open Tls open TlsEnums open TlsEngineNG open X509 let process_helper verbose parse_fun handle_fun dump_fun = let rec handle_one_answer input = let finalize_ok answer = begin match handle_fun answer with | None ...
24a8d9d233f6eda87d17bf5225a09f8cf16eebd705fc2e2e88489d91ace70820
samply/blaze
tx_indexer.clj
(ns blaze.db.node.tx-indexer (:require [blaze.db.api :as d] [blaze.db.node.tx-indexer.verify :as verify] [taoensso.timbre :as log])) (defn index-tx [db-before {:keys [t tx-cmds]}] (log/trace "verify transaction commands with t =" t "based on db with t =" (d/basis-t db-before)) (verify...
null
https://raw.githubusercontent.com/samply/blaze/c479410a9198526453a0df769ab7db2e6d5dd654/modules/db/src/blaze/db/node/tx_indexer.clj
clojure
(ns blaze.db.node.tx-indexer (:require [blaze.db.api :as d] [blaze.db.node.tx-indexer.verify :as verify] [taoensso.timbre :as log])) (defn index-tx [db-before {:keys [t tx-cmds]}] (log/trace "verify transaction commands with t =" t "based on db with t =" (d/basis-t db-before)) (verify...
bad6a0667304f108a460b4c66ca152e6a860925ca453905b687020bad815d222
killy971/hpc-coveralls
TestHpcCoverallsUtil.hs
# OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - type - defaults # module TestHpcCoverallsUtil where import Test.HUnit import Trace.Hpc.Coveralls.Util testMapFirst = "mapFirst" ~: [ mapFirst (+ 1) [] @?= [], mapFirst (+ 1) [2] @?= [3], mapFirst (+ 1) [2, 3] @?= [3, 3], m...
null
https://raw.githubusercontent.com/killy971/hpc-coveralls/04fe42c4533b3244e9fa1c2772aa5e30baf5eef0/test/TestHpcCoverallsUtil.hs
haskell
# OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - type - defaults # module TestHpcCoverallsUtil where import Test.HUnit import Trace.Hpc.Coveralls.Util testMapFirst = "mapFirst" ~: [ mapFirst (+ 1) [] @?= [], mapFirst (+ 1) [2] @?= [3], mapFirst (+ 1) [2, 3] @?= [3, 3], m...
16868180af6266b54d6b9f177384aaa86a54c0cbc92532d780613c80ee5d82bc
biilmann/eventsource-broker
Connection.hs
{-# LANGUAGE OverloadedStrings #-} module Models.Connection where import Prelude hiding (lookup) import Data.Time.Clock (UTCTime, getCurrentTime) import Data.Time.Clock.POSIX (getPOSIXTime, posixSecondsToUTCTime) import Data.UString (UString) import DB |An eventSo...
null
https://raw.githubusercontent.com/biilmann/eventsource-broker/337fbd0fd6df29588b29b7bcaab333c65678e490/src/Models/Connection.hs
haskell
# LANGUAGE OverloadedStrings # Seconds from current time |Store a "connection" to the broker in the database If the disconnect is set, the connection will be marked for disconnection during a coming sweep |Mark a connection. Marked connections will be removed by a later sweep |Sweep connections. All marked conne...
module Models.Connection where import Prelude hiding (lookup) import Data.Time.Clock (UTCTime, getCurrentTime) import Data.Time.Clock.POSIX (getPOSIXTime, posixSecondsToUTCTime) import Data.UString (UString) import DB |An eventSource connection to the broker persi...
c5966c85ddcfaa9cfefc96d671cc40274e23339d2c256c19d6b71b61db591022
basho/riak_test
gh_riak_kv_765.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2013 Basho Technologies , Inc. %% This file is provided to you 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 Li...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/gh_riak_kv_765.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2013 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY This module tests the various...
f146fcf5f9b0f39fefa17d1109ee68d11fd5dd818dfbf796b5788281b7a50f92
audreyt/openafp
BAG.hs
module OpenAFP.Records.AFP.BAG where import OpenAFP.Types import OpenAFP.Internals data BAG = BAG { bag_Type :: !N3 ,bag_ :: !N3 ,bag :: !NStr } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/BAG.hs
haskell
module OpenAFP.Records.AFP.BAG where import OpenAFP.Types import OpenAFP.Internals data BAG = BAG { bag_Type :: !N3 ,bag_ :: !N3 ,bag :: !NStr } deriving (Show, Typeable)
2189361f0ef8cca975bebbcb317ea7082e7c9b09b7a7911acd1f0b0e65848046
matterhorn-chat/matterhorn
Main.hs
{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RankNTypes #-} module Matterhorn.Draw.Main ( drawMain ) where import Prelude () import Matterhorn.Prelude import Brick import Brick.Widgets.Border import Data.List ( intersperse ) import Data.Maybe ( fromJust ) im...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/Draw/Main.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE RankNTypes #
module Matterhorn.Draw.Main ( drawMain ) where import Prelude () import Matterhorn.Prelude import Brick import Brick.Widgets.Border import Data.List ( intersperse ) import Data.Maybe ( fromJust ) import qualified Data.Text as T import Lens.Micr...
fb0fa47869f21d0e5891476e295cf4a528bd78d2f70d83cba6fcfacdbcf75962
haskellfoundation/error-message-index
ErrLambdaCase.hs
# LANGUAGE LambdaCase # module ErrLambdaCase where f = \case "1" -> 1 "2" -> 2 _ -> 3
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-51179/example1/after/ErrLambdaCase.hs
haskell
# LANGUAGE LambdaCase # module ErrLambdaCase where f = \case "1" -> 1 "2" -> 2 _ -> 3
da2e3d2e47e9ac0c45d4073efac70e07bca37cff3200e800d19d8371d2b4a10a
nvim-treesitter/nvim-treesitter
highlights.scm
(dir_sep) @punctuation.delimiter (quoted_pattern ("\"" @punctuation.special)) (range_notation) @string.special (range_notation [ "[" "]" ] @punctuation.bracket) (wildcard) @character.special (range_negation) @operator (character_class) @constant (class_range ("-" @operator)) [ (ansi_c_escape) (escaped_c...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/67332894efcb6a51a18e1120f2fc242089de7dd1/queries/gitattributes/highlights.scm
scheme
(dir_sep) @punctuation.delimiter (quoted_pattern ("\"" @punctuation.special)) (range_notation) @string.special (range_notation [ "[" "]" ] @punctuation.bracket) (wildcard) @character.special (range_negation) @operator (character_class) @constant (class_range ("-" @operator)) [ (ansi_c_escape) (escaped_c...
f01fe44ceea4075dcb1109d3d39f1547c016c29fae860525ed3bd5cc04699b7d
adomokos/haskell-katas
Ex10_FlowCaseExpressionSpec.hs
module Solutions.Ex10_FlowCaseExpressionSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec head' :: [a] -> a head' xs = case xs of [] -> error "No item" (x:_) -> x describeList :: [a] -> String describeList xs = "The list is " ++ case xs of [] -> "empty." ([x]) -> "a sin...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Solutions/Ex10_FlowCaseExpressionSpec.hs
haskell
Case statement can be written with patten matching
module Solutions.Ex10_FlowCaseExpressionSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec head' :: [a] -> a head' xs = case xs of [] -> error "No item" (x:_) -> x describeList :: [a] -> String describeList xs = "The list is " ++ case xs of [] -> "empty." ([x]) -> "a sin...
4d6f0700991c6ca37322137a6e1314846c0a52722dbb5ce5f0dac8e258222aaa
macourtney/Conjure
session_config.clj
(ns config.session-config (:require [conjure.util.memory-session-store :as memory-session-store])) (def ^:dynamic use-session-cookie true) ; Causes Conjure to save session ids as cookies. If this is false, Conjure uses a parameter in html. (def session-store memory-session-store/session-store)
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_server/test/config/session_config.clj
clojure
Causes Conjure to save session ids as cookies. If this is false, Conjure uses a parameter in html.
(ns config.session-config (:require [conjure.util.memory-session-store :as memory-session-store])) (def session-store memory-session-store/session-store)
216140492ebdb510bc62aa037cca068d1e872885e7ad7ece545984b8e0d4ba94
kaizhang/SciFlow
Delete.hs
# LANGUAGE RecordWildCards # module Control.Workflow.Main.Command.Delete (delete) where import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import Options.Applicative import Control.Workflow.DataStore import qualified Data.HashSet as S import qualified Data.Graph.Inductive as G impor...
null
https://raw.githubusercontent.com/kaizhang/SciFlow/c9d85008e9db598d2addc8fe999e1abad9147e1c/SciFlow-app/src/Control/Workflow/Main/Command/Delete.hs
haskell
# LANGUAGE RecordWildCards # module Control.Workflow.Main.Command.Delete (delete) where import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import Options.Applicative import Control.Workflow.DataStore import qualified Data.HashSet as S import qualified Data.Graph.Inductive as G impor...
65ac2f336c922df650d4102cfcfa84587ba9070d49e0df7a8c8beb3b5d6149c4
jimrthy/frereth
worker.cljs
(ns frereth.apps.shared.worker "Handle interactions with the various web workers" (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cemerick.url :as url] [cljs.core.async :as async] [clojure.spec.alpha :as s] [frereth.apps.shared.lamport :as lamport] [frereth.apps.shared.serializ...
null
https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/log-viewer/src/cljs/frereth/apps/shared/worker.cljs
clojure
Start by at least partially supporting this, since it's so popular Q: What is this really? Q: Is this even worth using a multi-method? Internal Implementation Q: Is it worth keeping these around long-term? Or better to just create/discard them on the fly as needed? TODO: Window manager needs to set up somethi...
(ns frereth.apps.shared.worker "Handle interactions with the various web workers" (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cemerick.url :as url] [cljs.core.async :as async] [clojure.spec.alpha :as s] [frereth.apps.shared.lamport :as lamport] [frereth.apps.shared.serializ...
50d2eaeddcc0d8575aaea9d756015edae2026610020c8bccb81059e0e53835f2
jrh13/hol-light
list_rewrites.ml
(* ---------------------------------------------------------------------- *) (* List *) (* ---------------------------------------------------------------------- *) let NOT_NIL = prove_by_refinement( `!l. ~(l = []) <=> ?(h:A) t. l = CONS h t`, (* {{{ ...
null
https://raw.githubusercontent.com/jrh13/hol-light/ea44a4cacd238d7fa5a397f043f3e3321eb66543/Rqe/list_rewrites.ml
ocaml
---------------------------------------------------------------------- List ---------------------------------------------------------------------- {{{ Proof }}}
let NOT_NIL = prove_by_refinement( `!l. ~(l = []) <=> ?(h:A) t. l = CONS h t`, [ STRIP_TAC THEN EQ_TAC; MESON_TAC[list_CASES]; STRIP_TAC; ASM_MESON_TAC[NOT_CONS_NIL]; ]);; let LIST_REWRITES = ref [ NOT_CONS_NIL; HD; TL; CONS_11; LENGTH; LAST; list_CASES; NOT_NIL; ];; let LIST_SIMP_TAC = REWRITE_TAC ( !...
5ae136f8d7982523ebe26ce23669e2333bb7682229a2987ea8b8fc907c449ac0
well-typed/visualize-cbn
fix-fac.hs
fix = (\f -> f (@fix f)) fac = (\r -> \n -> if eq n 1 then 1 else let n' = sub n 1 in seq n' (mul n (r n'))) main = @fix @fac 5
null
https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/examples/fix-fac.hs
haskell
fix = (\f -> f (@fix f)) fac = (\r -> \n -> if eq n 1 then 1 else let n' = sub n 1 in seq n' (mul n (r n'))) main = @fix @fac 5
ee84e9f0c9e394198b6cadae6fdf856ebff51cc205c1f4dc7646d01dd0f213d9
valmirjunior0088/curios
Compile.hs
module Inter.Compile ( compile ) where import Prelude hiding (sequence) import Util (decompose) import WebAssembly.Syntax.Module (Module (..)) import WebAssembly.Syntax.Instructions (MemArg (..)) import WebAssembly.Syntax.Types (ValType (..), i32, MemType (..), Limits (..)) import Inter.Syntax ( unwrap , S...
null
https://raw.githubusercontent.com/valmirjunior0088/curios/8aa03336e8773d42a5df2ef9ccdaac3c110cd688/src/Inter/Compile.hs
haskell
module Inter.Compile ( compile ) where import Prelude hiding (sequence) import Util (decompose) import WebAssembly.Syntax.Module (Module (..)) import WebAssembly.Syntax.Instructions (MemArg (..)) import WebAssembly.Syntax.Types (ValType (..), i32, MemType (..), Limits (..)) import Inter.Syntax ( unwrap , S...
2a11697289a4b2e9ec5cf341d1c7f1f6388ef032b23e587b1e96789246dae8ec
soegaard/metapict
test-radial-gradient-for-ellipse.rkt
#lang racket (require "../main.rkt" "../parameters.rkt" ) default head angle 45 degrees (ahflankangle 0) ; default "curvature" of flank (in degrees) (ahtailcurvature 0) ; default "curvature" of the back todo! (ahratio 1) (set-curve-pict-size 400 400) (current-node-size 0.1) (def O origo...
null
https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/tests/test-radial-gradient-for-ellipse.rkt
racket
default "curvature" of flank (in degrees) default "curvature" of the back todo!
#lang racket (require "../main.rkt" "../parameters.rkt" ) default head angle 45 degrees (ahratio 1) (set-curve-pict-size 400 400) (current-node-size 0.1) (def O origo) (def P (pt 10 5)) (def OP (pt- P O)) (def PO (vec* -1 OP)) (def T (shifted P (yscaled 0.5 (shifted (pt- P))))) (displayln T) (def C (c...
625ce4eb2ea6910deb73bc78d5a0b6c71aec85100fce35c65b4104d77c07af1f
brandonchinn178/advent-of-code
Day09.hs
import Data.Char import Data.Time import qualified Data.Set as Set import Debug.Trace main :: IO () main = withTimer $ do input <- map parse . lines <$> readFile "2022/data/Day09.txt" let headPositions = scanl (flip ($)) (0, 0) $ concatMap (\(dir, steps) -> replicate steps (applyDir dir)) input ...
null
https://raw.githubusercontent.com/brandonchinn178/advent-of-code/52ad16ac7c9a20eb3a9bdf47a07f443fd10f3b79/2022/Day09.hs
haskell
import Data.Char import Data.Time import qualified Data.Set as Set import Debug.Trace main :: IO () main = withTimer $ do input <- map parse . lines <$> readFile "2022/data/Day09.txt" let headPositions = scanl (flip ($)) (0, 0) $ concatMap (\(dir, steps) -> replicate steps (applyDir dir)) input ...
81bc4aadb8e46ff010b61ca865f7f36d28c03d9e24d5cab1c3436c36a164edfe
imandra-ai/imandra-ros
turtlesim_to_json.ml
open Json_utils;; open Basic_types_to_json;; open Ros_messages.Turtlesim;; let color_to_json x = [ ( "r" , x.r |> uint8_to_json ); ( "g" , x.g |> uint8_to_json ); ( "b" , x.b |> uint8_to_json ); ] |> assoc_filter_nulls let pose_to_json x = [ ( "x" , x.x |> float32_to_json ); ( "y" , x.y |> flo...
null
https://raw.githubusercontent.com/imandra-ai/imandra-ros/e1380c267ee319dd4f86c4b54e0b270bc0738796/imandra_model/src-messages-pp/turtlesim_to_json.ml
ocaml
open Json_utils;; open Basic_types_to_json;; open Ros_messages.Turtlesim;; let color_to_json x = [ ( "r" , x.r |> uint8_to_json ); ( "g" , x.g |> uint8_to_json ); ( "b" , x.b |> uint8_to_json ); ] |> assoc_filter_nulls let pose_to_json x = [ ( "x" , x.x |> float32_to_json ); ( "y" , x.y |> flo...
64bfc2cd5ec29a0d1c0d24941d5c877a041f953b12f2e8d27496e829cad66c6b
takikawa/racket-ppa
bulk-binding.rkt
#lang racket/base (require "../compile/serialize-property.rkt" "../compile/serialize-state.rkt" "binding-table.rkt" ; defines `prop:bulk-binding` "binding.rkt" "scope.rkt" "../common/module-path.rkt" "../common/phase+space.rkt" "../namespace/provided.rkt") ...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/src/expander/syntax/bulk-binding.rkt
racket
defines `prop:bulk-binding` When a require is something like `(require racket/base)`, then fast step, and we'd like to share the information in syntax objects from many different modules that all import `racket/base`. A "bulk binding" implements that fast binding and sharing. The difficult part is restoring shari...
#lang racket/base (require "../compile/serialize-property.rkt" "../compile/serialize-state.rkt" "binding.rkt" "scope.rkt" "../common/module-path.rkt" "../common/phase+space.rkt" "../namespace/provided.rkt") (provide provide-binding-to-require-binding make...
ad9ba72df2ebcb315394413c2386055acf1ae9dc168f2441e52ba10a03282301
exercism/common-lisp
anagram.lisp
(defpackage :anagram (:use :cl) (:export :anagrams-for)) (in-package :anagram) (defun anagrams-for (subject candidates) "Returns a sublist of candidates which are anagrams of the subject." )
null
https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/exercises/practice/anagram/anagram.lisp
lisp
(defpackage :anagram (:use :cl) (:export :anagrams-for)) (in-package :anagram) (defun anagrams-for (subject candidates) "Returns a sublist of candidates which are anagrams of the subject." )
0345e256514195a70a803e5857c356f5a2d4c8a588513e94c6c4d5e50a764f25
RolfRolles/PandemicML
Z3ModelParser.mli
type token = | ID of (string) | BV of (string * string) | EOF | LSQUARE | RSQUARE | LBRACE | RBRACE | ASARRAY | ARROW val model : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (string * Z3TextualParsedModel.t) list
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/DPI/Z3ModelParser.mli
ocaml
type token = | ID of (string) | BV of (string * string) | EOF | LSQUARE | RSQUARE | LBRACE | RBRACE | ASARRAY | ARROW val model : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (string * Z3TextualParsedModel.t) list
03f907f265915ad57b1d860577cfcb0168490eb86fb7c813669543e442657a8e
NaOHman/XMonadPlus
Tall.hs
# LANGUAGE ScopedTypeVariables # module Properties.Layout.Tall where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) import XMonad.Core import XMonad.Layout import Graphics.X11.Xlib.Types (Rectangle(..)) import Data.Maybe import Data.List (sort) import Data.Ratio -------...
null
https://raw.githubusercontent.com/NaOHman/XMonadPlus/1495e102ae3304817d1897a393e1f31fef71d41f/xmonad-darcs/tests/Properties/Layout/Tall.hs
haskell
---------------------------------------------------------------------- The Tall layout multiple windows splitting horizontally yields sensible results splitting vertically yields sensible results Test message handling of Tall what happens when we send a Shrink message to Tall these state components are unchanged...
# LANGUAGE ScopedTypeVariables # module Properties.Layout.Tall where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) import XMonad.Core import XMonad.Layout import Graphics.X11.Xlib.Types (Rectangle(..)) import Data.Maybe import Data.List (sort) import Data.Ratio 1 wi...
71b6fa3ce841515aa2b38871c93145871aa66d2faed1e48460beb2d3cecb59cf
facebook/infer
cFrontend_decl.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/561929fe60bf66011042dd241916660a35d89597/infer/src/clang/cFrontend_decl.ml
ocaml
* Translate declarations * * Translates the method/function's body into nodes of the cfg. Do not translate body for lambda operator() if it comes from call expr rather than lambda expr as captured variables will not be translated yet A destructor wrapper is called from the outside, i.e. for destruc...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
42597e4535f2968f243bb66fb7852daebb723aac67f2bde2cd6392aa3365f7d6
caradoc-org/caradoc
typechecker.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/type/typechecker.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...