_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
c35284b019b20991f0191011cfa7df09ce16a10c6dfb4795616a328289b07d3f
3b/learnopengl
lighting.lisp
(cl:defpackage learning-opengl-shaders (:use :3bgl-glsl/cl)) (cl:in-package learning-opengl-shaders) (interface varyings (:out (:vertex t) :in (:fragment t)) (tex-coords :vec2) (world-pos :vec3) (normal :vec3)) (output frag-color :vec4) (uniform albedo :vec3) (uniform metallic :float) (u...
null
https://raw.githubusercontent.com/3b/learnopengl/30f910895ef336ac5ff0b4cc676af506413bb953/lighting.lisp
lisp
(cl:defpackage learning-opengl-shaders (:use :3bgl-glsl/cl)) (cl:in-package learning-opengl-shaders) (interface varyings (:out (:vertex t) :in (:fragment t)) (tex-coords :vec2) (world-pos :vec3) (normal :vec3)) (output frag-color :vec4) (uniform albedo :vec3) (uniform metallic :float) (u...
1a454414a7efecc6b9c31dd38f9ad6feaba4872942d426f10565a94f031f7a6c
monadbobo/ocaml-core
signal.mli
type t include Comparable.S with type t := t include Hashable.S with type t := t include Sexpable.S with type t := t include Stringable.S with type t := t val equal : t -> t -> bool (** [of_system_int] and [to_system_int] return and take respectively a signal number corresponding to those in the system's /usr/in...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/signal.mli
ocaml
* [of_system_int] and [to_system_int] return and take respectively a signal number corresponding to those in the system's /usr/include/bits/signum.h (or equivalent). It is not guaranteed that these numbers are portable across any given pair of systems -- although some are defined as standard by POSIX. * [...
type t include Comparable.S with type t := t include Hashable.S with type t := t include Sexpable.S with type t := t include Stringable.S with type t := t val equal : t -> t -> bool val of_system_int : int -> t val to_system_int : t -> int * [ of_caml_int ] constructs a Signal.t given an O'Caml internal signal numb...
cf82d01fa16b6dea8b916c829a84a371a91866828b62a30b5dbd5f844bd35316
ucsd-progsys/liquidhaskell
T1126.hs
{-@ LIQUID "--expect-any-error" @-} # LANGUAGE FlexibleInstances # module T1126 where class OptEq a where (==.) :: a -> a -> a instance OptEq a where (==.) x _ = x @ instance OptEq a where = = . : : x : a - > y:{a| x = = y } - > a @ ==. :: x:a -> y:{a| x == y} -> a @-} class OptEq2 a where...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/T1126.hs
haskell
@ LIQUID "--expect-any-error" @ @ instance OptEq2 a where cmp :: x:a -> y:{a| x == y} -> a @ This is unsoundly UNSAFE unsound :: x:Int -> {v:Int | v = x} -> Int @ @ ok :: x:Int -> {v:Int | v = x} -> Int @
# LANGUAGE FlexibleInstances # module T1126 where class OptEq a where (==.) :: a -> a -> a instance OptEq a where (==.) x _ = x @ instance OptEq a where = = . : : x : a - > y:{a| x = = y } - > a @ ==. :: x:a -> y:{a| x == y} -> a @-} class OptEq2 a where cmp :: a -> a -> a instance OptE...
a44ce2dd11d0a71939c8b0a23b56a1145666e838f6b729318281ff50274af2d5
esl/MongooseIM
mod_global_distrib_worker.erl
%%============================================================================== Copyright 2017 Erlang Solutions 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 %% ...
null
https://raw.githubusercontent.com/esl/MongooseIM/481774b6449215a70a99555a913e7e0c87bc40ce/src/global_distrib/mod_global_distrib_worker.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 ex...
Copyright 2017 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_global_distrib_worker). -author(''). -behaviour(gen_server). -include("mongoose.hrl"). -include("jlib.hrl"). -include("glo...
e33c3219f12654594e42a0e298048824e5656cc8aca3f15576446e6ecd02b81b
Holworth/SICP_Solutions
pascal-triangular.rkt
#lang racket (define (pascal-triangular m n) (cond ((= m 1) 1) ((or (= n 1) (= n m)) 1) (else (+ (pascal-triangular (- m 1) (- n 1)) ; Element at left-above (pascal-triangular (- m 1) n))) ; Element above ) ) (pascal-triangular 1 1) (pascal-triangular 2 2) (pascal-triangul...
null
https://raw.githubusercontent.com/Holworth/SICP_Solutions/f1df5e8e123af69e03b333df9960f445eaf28618/solutions/chap1/code/pascal-triangular.rkt
racket
Element at left-above Element above
#lang racket (define (pascal-triangular m n) (cond ((= m 1) 1) ((or (= n 1) (= n m)) 1) ) ) (pascal-triangular 1 1) (pascal-triangular 2 2) (pascal-triangular 3 2) (pascal-triangular 5 3)
867ce2700f55d71e2ac287813267281b543ee217ce93135cb67685cda1d238ea
pallix/tikkba
core.clj
Copyright © 2010 Fraunhofer Gesellschaft Licensed under the EPL V.1.0 (ns tikkba.core (:import org.apache.batik.swing.JSVGCanvas)) (defn invoke-later "Schedules the function for a later invocation. Used to modify the DOM tree asynchronously and in a thread-safe way." [canvas f] (let [queue (.. canvas g...
null
https://raw.githubusercontent.com/pallix/tikkba/86fda7f97c3b1ff835f02c2b1c0337f3e134fd2c/src/tikkba/core.clj
clojure
Copyright © 2010 Fraunhofer Gesellschaft Licensed under the EPL V.1.0 (ns tikkba.core (:import org.apache.batik.swing.JSVGCanvas)) (defn invoke-later "Schedules the function for a later invocation. Used to modify the DOM tree asynchronously and in a thread-safe way." [canvas f] (let [queue (.. canvas g...
cbba939a4e0d03b6e10e693857ce03b44ba2242974e4691372426a6840189005
clojure/clojurescript
extend_to_native_test.cljs
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 ;; the t...
null
https://raw.githubusercontent.com/clojure/clojurescript/8cb81dbb986e67a97d466c7c92973758cfa0f6b2/src/test/cljs/cljs/extend_to_native_test.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. Not...
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns cljs.extend-to-native-test (:require [cljs.test :refer-macros [deftest is]])) (deftest test-extend-to-object (extend-type object ISeqable (-seq [coll] (map #(vector % (aget coll %)) (js-keys coll))) ILook...
a0a85da94933b29193d1ed3dfc47a698876172859ce56d162f11b3457672e3ed
itchyny/vim-haskell-sort-import
import_only_comment.in.hs
import C (ca, cb, cc) -- X import B (ba, bb, bc) -- X import A (aa, ab, ac) -- X
null
https://raw.githubusercontent.com/itchyny/vim-haskell-sort-import/bfe4b6a5e212828ef14e611fa8c358b3960d4f9f/test/only/import_only_comment.in.hs
haskell
X X X
a914efcedc08c5dfd954faa2a3d9d8eb36b5ddeff73b532a726057897293fa40
tjammer/schmu
helpers.ml
module type S = sig open Llvm_types open Cleaned_types val dummy_fn_value : llvar val declare_function : c_linkage:bool -> mangle_kind -> string -> typ -> llvar val add_closure : llvar Vars.t -> llvar -> bool -> fun_kind -> llvar Vars.t val add_params : llvar Vars.t -> llvar -> Monomorph_tree....
null
https://raw.githubusercontent.com/tjammer/schmu/ee0b71a4b8259b014237b9821e0e6e6a71123333/lib/codegen/helpers.ml
ocaml
For reuse in arr.ml When we need something in the env for a function which will only be called in a monomorphized version Checks the param kind before calling [unbox_record] From record to int Frees a single pointer Don't print the string 'assert ' Try to open file and read into lexbuf If a builde...
module type S = sig open Llvm_types open Cleaned_types val dummy_fn_value : llvar val declare_function : c_linkage:bool -> mangle_kind -> string -> typ -> llvar val add_closure : llvar Vars.t -> llvar -> bool -> fun_kind -> llvar Vars.t val add_params : llvar Vars.t -> llvar -> Monomorph_tree....
5e85275b5c5d6e90ff85fbc8f094b605cad6b7e8eb324aab5ba4170a3b235447
plum-umd/oblivml
static.ml
open Core open Stdio exception TypeError of Section.t * String.t type env_t = (Var.t, Type.t Option.t, Var.comparator_witness) Map.t let maybe_t_to_string m_t = match m_t with | None -> "*" | Some t -> Type.to_string t let env_to_string tenv = Printf.sprintf "{ %s }" (String.concat (List.map ...
null
https://raw.githubusercontent.com/plum-umd/oblivml/f699dc49df7b36d550fcb045eff081435136f804/src/static.ml
ocaml
Printf.printf "%s\n" (Var.to_string x); Printf.printf "%s\n" (Var.to_string x);
open Core open Stdio exception TypeError of Section.t * String.t type env_t = (Var.t, Type.t Option.t, Var.comparator_witness) Map.t let maybe_t_to_string m_t = match m_t with | None -> "*" | Some t -> Type.to_string t let env_to_string tenv = Printf.sprintf "{ %s }" (String.concat (List.map ...
810a52adb76979fa017d6e05971c4894dc65a6c51a18166bc3439473ef8afeb5
joinr/clclojure
wrappers.lisp
;;Defining classes that can help us to wrap ;;built-in classes to allow things like ;;attaching meta to arbitrary objects... ;;this isn't that special.... ;;storage and wrapper for our functions... (defclass function-object () ((name :initarg :name :accessor function-object-name) (args :initarg :args :a...
null
https://raw.githubusercontent.com/joinr/clclojure/8b51214891c4da6dfbec393dffac70846ee1d0c5/dustbin/wrappers.lisp
lisp
Defining classes that can help us to wrap built-in classes to allow things like attaching meta to arbitrary objects... this isn't that special.... storage and wrapper for our functions... (eval `(fn ,args ,body))) ; note : this is not portable ... SBCL specific , ;;may be able to ...
(defclass function-object () ((name :initarg :name :accessor function-object-name) (args :initarg :args :accessor function-object-args) (body :initarg :body :accessor function-object-body) (func :accessor function-object-func) (meta :initarg :meta :accessor function-o...
d201ae76a7bf0d0dfc50e6b8a07c3898e55f04881ed9cab4e9da3071309d37e6
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
AccountSepaDebitPaymentsSettings.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} | Contains the types generated from the schema AccountSepaDebitPaymentsSettings module StripeAPI.Types.AccountSepaDebitPaym...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/AccountSepaDebitPaymentsSettings.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # Constraints: | Create a new 'AccountSepaDebitPaymentsSettings' with all required fields.
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . | Contains the types generated from the schema AccountSepaDebitPaymentsSettings module StripeAPI.Types.AccountSepaDebitPaymentsSettings where import qualified Control.Monad.Fail import ...
9a2eeae8d0a9e76a3c550a3e622a514cfe5a6dcf0b556a50045200b19cc3a529
grin-compiler/grin
PrimOpsPrelude.hs
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Grin.ExtendedSyntax.PrimOpsPrelude where import Grin.ExtendedSyntax.Grin import Grin.ExtendedSyntax.TH {- These predefined primitive operations are optional. This is a utility module for front-ends and the grin CLI use `grin --no-prelude` to exc...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Grin/ExtendedSyntax/PrimOpsPrelude.hs
haskell
These predefined primitive operations are optional. This is a utility module for front-ends and the grin CLI use `grin --no-prelude` to exclude these predefined primitive operations String Conversion Int TODO: Remove? Float Bool
# LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns # module Grin.ExtendedSyntax.PrimOpsPrelude where import Grin.ExtendedSyntax.Grin import Grin.ExtendedSyntax.TH primPrelude :: Program primPrelude = [progConst| ffi effectful _prim_int_print :: T_Int64 -> T_Unit _prim_usleep :: T_Int64 -...
3c1dadefcc9a76591cc979c8c4383dcaba0511492b871c17ee40f4ce2c88f20a
milgra/cljs-brawl
defaults.cljc
(ns brawl.defaults) (defn local-storage-supported? [] (let [item "workshub-test-ls"] (try (.setItem js/localStorage item item) (.removeItem js/localStorage item) true (catch :default _ false)))) (defn load-defaults! [state] (if (and (local-storage-supported?) (= "true" (.getItem ...
null
https://raw.githubusercontent.com/milgra/cljs-brawl/e03cf6f032b1af0f6e38396e43e739f83446a3e4/src/brawl/defaults.cljc
clojure
todo validate with specs
(ns brawl.defaults) (defn local-storage-supported? [] (let [item "workshub-test-ls"] (try (.setItem js/localStorage item item) (.removeItem js/localStorage item) true (catch :default _ false)))) (defn load-defaults! [state] (if (and (local-storage-supported?) (= "true" (.getItem ...
04c7cb685dcd0674fde12bd15eda9b7aab5066783f7fa71d33ac0237a5e99699
irpap/Write-yourself-a-Scheme-in-48-hours
Test.hs
module Main where import Data.Char import Data.Complex import SchemeParser import Test.HUnit main = runTestTT $ test tests tests :: Test tests = TestList $ map TestCase [ assertEqual "Parsing a number" (Right (Number 33)) (readExpr "33" >>=eval) , assertEqu...
null
https://raw.githubusercontent.com/irpap/Write-yourself-a-Scheme-in-48-hours/ea283dbed42e3a359de7d91f1343c7e14ec986bc/chapter05-evaluation-part-2/Test.hs
haskell
module Main where import Data.Char import Data.Complex import SchemeParser import Test.HUnit main = runTestTT $ test tests tests :: Test tests = TestList $ map TestCase [ assertEqual "Parsing a number" (Right (Number 33)) (readExpr "33" >>=eval) , assertEqu...
e9f93e138020cee206d48a0db9f97e0a65e570023244a71798d675651646951b
silky/myth
nat_iseven.ml
#use "context.decls" let nat_iseven : nat -> bool |> { 0 => True | 1 => False | 2 => True | 3 => False } = ?
null
https://raw.githubusercontent.com/silky/myth/b631edefb2a27a1d731daa6654517d91ca660b95/tests/pldi-2015-contexts/nat_iseven.ml
ocaml
#use "context.decls" let nat_iseven : nat -> bool |> { 0 => True | 1 => False | 2 => True | 3 => False } = ?
9a4b04dede73c592cf94803a62cb863a4c27178ac4bf3e574e5c56dd64533675
cushon/project-euler
110.rkt
#lang racket (require "common.rkt") ; Find the least value of n for which the number of distinct integer solutions to 1 / x + 1 / y = 1 / n exceeds four million . (define (solve) (define cap 4000000) (define (prime-list size) (define (h n trial) (cond [(zero? n) '()] [(is-prime? tria...
null
https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/110.rkt
racket
Find the least value of n for which the number of distinct integer solutions
#lang racket (require "common.rkt") to 1 / x + 1 / y = 1 / n exceeds four million . (define (solve) (define cap 4000000) (define (prime-list size) (define (h n trial) (cond [(zero? n) '()] [(is-prime? trial) (cons trial (h (sub1 n) (add1 trial)))] [(h n (add1 trial))])) ...
d2bce7a10056849d749da00fefb38497742cf2008ff0b36c44892695e6844b1e
gogins/csound-extended-nudruz
midi2csound.lisp
(in-package :cm) ;; DOESN'T COPY AMPLITUDES -- USE "MIDI2CS.LISP" INSTEAD (setf tracks (import-events "hhc.mid")) (setf (elt midi-channel-names 9) "i1") (events tracks "hhc.sco") (setf tracks (import-events "snare.mid")) (setf (elt midi-channel-names 9) "i1") (events tracks "snare.sco") (setf tracks (import-events ...
null
https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/sources/midi2csound.lisp
lisp
DOESN'T COPY AMPLITUDES -- USE "MIDI2CS.LISP" INSTEAD
(in-package :cm) (setf tracks (import-events "hhc.mid")) (setf (elt midi-channel-names 9) "i1") (events tracks "hhc.sco") (setf tracks (import-events "snare.mid")) (setf (elt midi-channel-names 9) "i1") (events tracks "snare.sco") (setf tracks (import-events "bassdr.mid")) (setf (elt midi-channel-names 9) "i1") (ev...
5bab72bb55da7802ebc8ec163f193aab84653b2053d4e7ddc1e35565af316fa4
atlas-engineer/nyxt
section.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :analysis) ;;; section.lisp -- given a document, automatically generate sections (export-always 'extract-sections) (defun extract-sections (text &key (epsilon 0.5)) "Extract the sections from a string of tex...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/f73b5bda24afd1727c08c15690d44fc6dd42962c/libraries/analysis/section.lisp
lisp
section.lisp -- given a document, automatically generate sections
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :analysis) (export-always 'extract-sections) (defun extract-sections (text &key (epsilon 0.5)) "Extract the sections from a string of text. Epsilon refers to the distance between two points for them to be...
225a3668c61b202d0966641747f7ab387e8bafa48344f1ff65fd1d65664827a5
dvcrn/proton
core.cljs
(ns proton.layers.tools.expose.core (:require [proton.lib.helpers :as helpers]) (:use [proton.layers.base :only [init-layer! get-initial-config get-keybindings get-packages get-keymaps describe-mode]])) (defmethod init-layer! :tools/expose [_ {:keys [config layers]}] (helpers/console! "init" :tools/expose)) (...
null
https://raw.githubusercontent.com/dvcrn/proton/427d83ffdb61d84a04e3d30032b792a9cfbfc53f/src/cljs/proton/layers/tools/expose/core.cljs
clojure
(ns proton.layers.tools.expose.core (:require [proton.lib.helpers :as helpers]) (:use [proton.layers.base :only [init-layer! get-initial-config get-keybindings get-packages get-keymaps describe-mode]])) (defmethod init-layer! :tools/expose [_ {:keys [config layers]}] (helpers/console! "init" :tools/expose)) (...
3d242623eb040263a8a63c3f588b2774f982c239e424a310ddd54bed7f24b0fd
hopv/MoCHi
ref_trans.mli
open Syntax val trans : term -> term * ((Syntax.id -> Ref_type.t) -> Syntax.id -> Ref_type.t) val make_fun_tuple : term -> term
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/ref_trans.mli
ocaml
open Syntax val trans : term -> term * ((Syntax.id -> Ref_type.t) -> Syntax.id -> Ref_type.t) val make_fun_tuple : term -> term
aadbd9716632280050697730f6bcbbd4a21569602fba1bc69e5a605ff8c21243
binsec/haunted
concrete_eval.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/simulation/concrete_eval.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
2285a8dff5f09e83aa179f76655c4e770609ed345ab5d830c054a87698f7b3de
SKA-ScienceDataProcessor/RC
BinaryInstances.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE MagicHash #-} module BinaryInstances where import GHC.Prim import GHC.Ptr import GHC.Types import Data.Binary import Foreign.CUDA.Ptr import Foreign.C.Types -- NOTE: addr2Int# and int2Addr# are strongly deprecated instance Binary (Ptr a) where put (Ptr addr...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS3/Sketches/Utils/BinaryInstances.hs
haskell
# LANGUAGE MagicHash # NOTE: addr2Int# and int2Addr# are strongly deprecated
# OPTIONS_GHC -fno - warn - orphans # module BinaryInstances where import GHC.Prim import GHC.Ptr import GHC.Types import Data.Binary import Foreign.CUDA.Ptr import Foreign.C.Types instance Binary (Ptr a) where put (Ptr addr#) = put (I# (addr2Int# addr#)) get = fmap i2a get where i2a (I# i#) = Ptr (int2Addr...
b3eec723963a9be8347b61565072834997ad3ded2faa929015bbff35fb6662e5
JHU-PL-Lab/jaylang
jil.ml
open Core open Dbmc let usage_msg = "jil -i <file> [<input_i>]" let source_file = ref "" let inputs = ref [] let anon_fun i_raw = let this_i = int_of_string_opt i_raw in inputs := !inputs @ [ this_i ] let run_program source = let program = Dj_common.File_utils.read_source source in let session = { ...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/81abf9ff185758a2aaefd90478da4c7bb53f4384/src/bin/jil.ml
ocaml
open Core open Dbmc let usage_msg = "jil -i <file> [<input_i>]" let source_file = ref "" let inputs = ref [] let anon_fun i_raw = let this_i = int_of_string_opt i_raw in inputs := !inputs @ [ this_i ] let run_program source = let program = Dj_common.File_utils.read_source source in let session = { ...
226fc131fdc5053bfe6880e4a1d4f2e3a14676c12e515a3be33d52f5891298b0
exoscale/clojure-kubernetes-client
policy_v1beta1_host_port_range.clj
(ns clojure-kubernetes-client.specs.policy-v1beta1-host-port-range (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare policy-v1beta1-host-port-range-data policy-v1beta1-host-port-range) (def policy-v1beta1-host-port-range-data { (ds...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/policy_v1beta1_host_port_range.clj
clojure
(ns clojure-kubernetes-client.specs.policy-v1beta1-host-port-range (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare policy-v1beta1-host-port-range-data policy-v1beta1-host-port-range) (def policy-v1beta1-host-port-range-data { (ds...
25ade3c4b17d3cbdf30d01e0621145209973d5ff96ec65f860adfcb8e9155e5c
sunng87/papaline
project.clj
(defproject info.sunng/papaline "0.10.5-SNAPSHOT" :description "Clojure concurrent pipeline on core.async" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/core.async "0.3.465"]] :scm {:url "" :nam...
null
https://raw.githubusercontent.com/sunng87/papaline/cd97e76695bd390fd63a152cd666915124d7912d/project.clj
clojure
(defproject info.sunng/papaline "0.10.5-SNAPSHOT" :description "Clojure concurrent pipeline on core.async" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/core.async "0.3.465"]] :scm {:url "" :nam...
5704877381ef8d7377ac02440bd05076138e554f0d85bcc19dd47adf377cd8fb
8c6794b6/guile-tjit
t-vector-ref-04.scm
;;; Loop to catch out-of-range error with `vector-ref/immediate'. (define (loop1 v n) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (+ acc (vector-ref v 2)))))) (define (loop2 n) (let ((v #(1 2 3))) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (+ acc ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-vector-ref-04.scm
scheme
Loop to catch out-of-range error with `vector-ref/immediate'. Call `loop2' enough times to make peeled loop in `loop1' hot.
(define (loop1 v n) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (+ acc (vector-ref v 2)))))) (define (loop2 n) (let ((v #(1 2 3))) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (+ acc (loop1 v n))))))) (define (loop3 n) (let ((v #(1))) (let lp...
360d1b80176234470dc9be58521c8a53491ebe92087a731a7f3faf744f3945db
aerosol/signerl
tcap_ism_fsm.erl
$ I d : tcap_ism_fsm.erl , v 1.3 2005/08/04 09:33:17 vances Exp $ %%%--------------------------------------------------------------------- 2010 - 2011 @author < > %%% @end %%% Copyright ( c ) 2010 - 2011 , < > %%% %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, wit...
null
https://raw.githubusercontent.com/aerosol/signerl/b85bdc8e2a740afd80c64006e777269496aaa5dc/TCAP/src/ITU/tcap_ism_fsm.erl
erlang
--------------------------------------------------------------------- @end All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright ...
$ I d : tcap_ism_fsm.erl , v 1.3 2005/08/04 09:33:17 vances Exp $ 2010 - 2011 @author < > Copyright ( c ) 2010 - 2011 , < > - Neither the name of Motivity Telecom nor the names of its " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INC...
0e59f3cbaf9a4a98548e651f1f0fc5393b4250eaace2a68d95edae4982f3aa27
jwiegley/notes
Simple.hs
sourceGenerator :: Monad m => (forall s. ((Generator s -> Conduit (Generatee s) m Integer) -> Source m Integer)) -> Source m Integer sourceGenerator f = f $ \gen -> conduit (go gen) where go start z yield g = loop start...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/782a5e0feddf0c314d20/Simple.hs
haskell
sourceGenerator :: Monad m => (forall s. ((Generator s -> Conduit (Generatee s) m Integer) -> Source m Integer)) -> Source m Integer sourceGenerator f = f $ \gen -> conduit (go gen) where go start z yield g = loop start...
efdaae20b0508c948456ca2c0c5a4691ca7e3297a559b27d84e3d0e88c3e1e74
brownplt/LambdaS5
ljs_clean_assertion_harsh.ml
open Prelude open Ljs_opt open Ljs_syntax open Exp_util let is_internal_checks exp = match exp with | App (_, Id (_, "%TypeError"), _) -> true | _ -> false let rec clean_assertion_harsh (exp : exp) : exp = match exp with | If (p, tst, thn, els) -> if is_internal_checks thn then clean_assertion_har...
null
https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/optimization/ljs_clean_assertion_harsh.ml
ocaml
open Prelude open Ljs_opt open Ljs_syntax open Exp_util let is_internal_checks exp = match exp with | App (_, Id (_, "%TypeError"), _) -> true | _ -> false let rec clean_assertion_harsh (exp : exp) : exp = match exp with | If (p, tst, thn, els) -> if is_internal_checks thn then clean_assertion_har...
d8edc6fd63afe548ea4074ca6f401840d8d51f34ffba49f3aa92d2b0af98be5a
turquoise-hexagon/euler
solution.scm
(import (chicken sort) (euler) (srfi 69)) (define (id n) (list->string (sort (string->list (number->string n)) char<?))) (define (solve n) (let ((mem (make-hash-table))) (let loop ((i 1)) (let* ((value (* i i i)) (acc (hash-table-update!/default mem (id value) (lam...
null
https://raw.githubusercontent.com/turquoise-hexagon/euler/2b47e7bd187e120c0814bab781f2fb89bf1ee29b/src/062/solution.scm
scheme
(import (chicken sort) (euler) (srfi 69)) (define (id n) (list->string (sort (string->list (number->string n)) char<?))) (define (solve n) (let ((mem (make-hash-table))) (let loop ((i 1)) (let* ((value (* i i i)) (acc (hash-table-update!/default mem (id value) (lam...
de84facebbfb41695bebee1f01a1507fdaef339be1ae6a480bb7a9702549bd38
input-output-hk/smash
Offline.hs
# LANGUAGE LambdaCase # {-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # module Cardano.SMASH.Offline ( fetchInsertNewPoolMetadata , fetchInsertNewPoolMetadataOld , runOfflineFetchThread ) where import Cardano.Prelude ...
null
https://raw.githubusercontent.com/input-output-hk/smash/a089c53f7477eb2c301e60cb546d6181262ec966/smash/src/Cardano/SMASH/Offline.hs
haskell
# LANGUAGE NumericUnderscores # # LANGUAGE Rank2Types # This is what we call from the actual block-syncing code. Please note that it is possible that a user submits the same pool hash several times which will result in the fetch being done for each of the entry. We do this in order to make sure that the m...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Cardano.SMASH.Offline ( fetchInsertNewPoolMetadata , fetchInsertNewPoolMetadataOld , runOfflineFetchThread ) where import Cardano.Prelude hiding (from, groupBy, on, ...
76cc5d110052d407abd560a0ccb811b19a1235f07e04361dc6f816476746a988
CryptoKami/cryptokami-core
Logic.hs
-- | Main Toss logic. module Pos.Ssc.Toss.Logic ( verifyAndApplySscPayload , applyGenesisBlock , rollbackSsc , normalizeToss , refreshToss ) where import Control.Lens (at) import Control.Monad.Except (MonadError, runExceptT) import Crypto.Random ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/ssc/Pos/Ssc/Toss/Logic.hs
haskell
| Main Toss logic. @verifySscPayload@. We perform @verifySscPayload@ for block when we construct it (in the 'recreateGenericBlock'). So this check is just in case. Apply We can freely clear shares after 'slotSecurityParam' because it's guaranteed that rollback on more than 'slotSecurityParam' can't happen | A...
module Pos.Ssc.Toss.Logic ( verifyAndApplySscPayload , applyGenesisBlock , rollbackSsc , normalizeToss , refreshToss ) where import Control.Lens (at) import Control.Monad.Except (MonadError, runExceptT) import Crypto.Random (MonadRandom) import q...
6903bc96c6b5afea32fd30dabcccf5f19884f09f73dff4d23b30164300ccb384
2600hz/kazoo
kazoo_tts_google_utils.erl
%%%----------------------------------------------------------------------------- ( C ) 2018 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_speech/src/tts/kazoo_tts_google_utils.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2018 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kazoo_tts_google_utils). -export([getJson/1]). -include("kazoo_tts_google.hrl"). -spec getJson(synthesi...
d4be4cc3ce4e5d84ec80a10f1033d5f3265617875c9d8926efb26650eb18771e
kdltr/chicken-core
loopy-test.scm
(import (only chicken.format printf) (only chicken.time current-process-milliseconds) chicken.load) (load-relative "loopy-loop.scm") (load-relative "matchable.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SRFI-64 subset + test-approx= (define *pass* 0) (define *fail* 0) ...
null
https://raw.githubusercontent.com/kdltr/chicken-core/b2e6c5243dd469064bec947cb3b49dafaa1514e5/tests/loopy-test.scm
scheme
SRFI-64 subset + test-approx= run tests
(import (only chicken.format printf) (only chicken.time current-process-milliseconds) chicken.load) (load-relative "loopy-loop.scm") (load-relative "matchable.scm") (define *pass* 0) (define *fail* 0) (define *start* 0) (define (run-test name thunk expect eq pass-msg fail-msg) (let ((result (thunk))) ...
ad3c2dd5204dbca14a7281c5db0b4e95d14eef2906bcf3b6d95acd163e9f66ee
smimram/funk
cpu.ml
let int32_in_string n s offs = let s_char_of_int n = char_of_int n in s.[offs + 3] <- s_char_of_int (Int32.to_int (Int32.shift_right n 24)); let n = Int32.to_int n in s.[offs + 2] <- s_char_of_int ((n lsr 16) land 0xff); s.[offs + 1] <- s_char_of_int ((n lsr 8) land 0xff); s.[offs + 0]...
null
https://raw.githubusercontent.com/smimram/funk/88328dd9087c9097b1bfe2cf5394ba99fa631934/src/drivers/cpu.ml
ocaml
* vendor string * features TODO: handle smp, HT, ... * The currently detected cpu. add a feature family F family F.0 if mobile, prefix with "Mobile " if mobile, prefix with "Mobile " if mobile, prefix with "Mobile " family F family F model B family F model C family F model E TODO: %f is not wo...
let int32_in_string n s offs = let s_char_of_int n = char_of_int n in s.[offs + 3] <- s_char_of_int (Int32.to_int (Int32.shift_right n 24)); let n = Int32.to_int n in s.[offs + 2] <- s_char_of_int ((n lsr 16) land 0xff); s.[offs + 1] <- s_char_of_int ((n lsr 8) land 0xff); s.[offs + 0]...
7f135f7bc8df41df2a71cef1eea51dbb5c869ec31b3e1b0315789072867b9df1
elastic/eui-cljs
icon_logo_rabbitmq.cljs
(ns eui.icon-logo-rabbitmq (:require ["@elastic/eui/lib/components/icon/assets/logo_rabbitmq.js" :as eui])) (def logoRabbitmq eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_logo_rabbitmq.cljs
clojure
(ns eui.icon-logo-rabbitmq (:require ["@elastic/eui/lib/components/icon/assets/logo_rabbitmq.js" :as eui])) (def logoRabbitmq eui/icon)
1e48f67ccae055c4200dc960e582ac177e6a2a8bcedef60e0209eb99401ecb48
daypack-dev/daypack-lib
debug_print.ml
let indent_single = " " let bprintf ?(indent_level : int = 0) buffer fmt = for _ = 0 to indent_level - 1 do Buffer.add_string buffer indent_single done; Printf.bprintf buffer fmt
null
https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/debug_print.ml
ocaml
let indent_single = " " let bprintf ?(indent_level : int = 0) buffer fmt = for _ = 0 to indent_level - 1 do Buffer.add_string buffer indent_single done; Printf.bprintf buffer fmt
faf138953ebb14acddaf4fd2157f285e70b2ad9f1f9b1071f8251ffd634ab876
glguy/ssh-hans
TerminalModes.hs
module Network.SSH.TerminalModes where import qualified Data.ByteString as S import Data.Serialize.Get import Data.Word parseTerminalModes :: S.ByteString -> Either String [(TerminalFlag, Word32)] parseTerminalModes = runGet loop where loop = do tag <- getWord8 case codeToTermFlag tag of Nothi...
null
https://raw.githubusercontent.com/glguy/ssh-hans/25d05366d4655eb249bfb13f9a6d473b49885bd9/src/Network/SSH/TerminalModes.hs
haskell
---- -------- ----------- ---- -------- -----------
module Network.SSH.TerminalModes where import qualified Data.ByteString as S import Data.Serialize.Get import Data.Word parseTerminalModes :: S.ByteString -> Either String [(TerminalFlag, Word32)] parseTerminalModes = runGet loop where loop = do tag <- getWord8 case codeToTermFlag tag of Nothi...
1687541f9f90d266932fd509f4e1841c4c164270eec2b87424ba8ca51cf8845f
ml4tp/tcoq
cString.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/cString.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * We include the standard library *...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Module type [ S ] is the on...
ec74cfefebfc300dadd532180cfee1d1bf0c0e74fe8f97d8154d6ec563987b60
inaka/canillita
canillita_newspapers_repo.erl
%%% @doc Newspapers repository -module(canillita_newspapers_repo). -export([exists/1]). %% @doc Checks that there is a newspaper with the given name. -spec exists(NewspaperName::canillita_newspapers:name()) -> boolean(). exists(NewspaperName) -> notfound /= sumo:fetch(canillita_newspapers, NewspaperName).
null
https://raw.githubusercontent.com/inaka/canillita/56e7fa6b7441a591dbf2396dc85a43cdca6878c6/src/canillita_newspapers_repo.erl
erlang
@doc Newspapers repository @doc Checks that there is a newspaper with the given name.
-module(canillita_newspapers_repo). -export([exists/1]). -spec exists(NewspaperName::canillita_newspapers:name()) -> boolean(). exists(NewspaperName) -> notfound /= sumo:fetch(canillita_newspapers, NewspaperName).
3c6cbb516d8f5f2f45ea2fc6fc1a0a72c1bc2d37c6a39cf584e4da9511395c29
marick/fp-oo
javascript.clj
(def mimic (fn [object & property-pairs] (assoc (apply hash-map property-pairs) :__proto__ object))) (declare ^:dynamic *context-object*) (def generic-object (fn [& property-pairs] (apply mimic nil property-pairs))) (def dot (fn [object key] (cond (nil? object) ...
null
https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/old-code/javascript.clj
clojure
I made this check errors because the behavior when :undefined is applied-in-context can be confusing. At this point, *context-object* is normally a mimic of a constructor's prototype ======= Starting code for exercises
(def mimic (fn [object & property-pairs] (assoc (apply hash-map property-pairs) :__proto__ object))) (declare ^:dynamic *context-object*) (def generic-object (fn [& property-pairs] (apply mimic nil property-pairs))) (def dot (fn [object key] (cond (nil? object) ...
ecbff9173c75993abbc65551d00216e0717836ed31cb0a897ee14ed3b47e8e39
kumarshantanu/promenade
util_test.cljc
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 LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/kumarshantanu/promenade/f9f8ad9382a8c6e8bdbbbe7b7dbfe2a2036fd9b8/test/promenade/util_test.cljc
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 LICENSE 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 ...
Copyright ( c ) . All rights reserved . (ns promenade.util-test (:require #?(:cljs [cljs.test :refer-macros [deftest is testing]] :clj [clojure.test :refer [deftest is testing]]) #?(:cljs [promenade.core :as prom :include-macros true] :clj [promenade.core :as prom]) #?(:c...
eda12f3debb80c0859e7c152f51b96afdee9dbfcbd85f8336b92ba22d031f926
RedPRL/redtt
Dir.mli
type t type 'a m = [`Ok of 'a | `Same of I.t * I.t] val make : I.t -> I.t -> t m val gen_const : I.atom -> [`Dim0 | `Dim1] -> t val swap : t -> t val unleash : t -> I.t * I.t val act : I.action -> t -> t m
null
https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/core/Dir.mli
ocaml
type t type 'a m = [`Ok of 'a | `Same of I.t * I.t] val make : I.t -> I.t -> t m val gen_const : I.atom -> [`Dim0 | `Dim1] -> t val swap : t -> t val unleash : t -> I.t * I.t val act : I.action -> t -> t m
249127a3058ee0be657004dab6220de6beb0e1a225d8e865ade3f4aa2aa3d097
twosigma/waiter
kerberos.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; 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...
null
https://raw.githubusercontent.com/twosigma/waiter/bdba007c2fafe95d0836cc870c42ce29dd87dd19/waiter/src/waiter/auth/kerberos.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns waiter.auth.kerberos (:require [clj-time.core :as t] [clojure.core.async :as async] [clojure.java.shell :as shell] [clojure.string :as str] [clojure....
39c9f5359205d102b520c491666a8270835ac8662cc739ca32d1f368e05423a5
dbuenzli/logs
tags.ml
(* This code is in the public domain. *) (* Example with tags and custom reporter. *) let stamp_tag : Mtime.span Logs.Tag.def = Logs.Tag.def "stamp" ~doc:"Relative monotonic time stamp" Mtime.Span.pp let stamp c = Logs.Tag.(empty |> add stamp_tag (Mtime_clock.count c)) let run () = let rec wait n = if n = 0 the...
null
https://raw.githubusercontent.com/dbuenzli/logs/346f2cb5279a0dfee0e57fff109b8994982ce66f/test/tags.ml
ocaml
This code is in the public domain. Example with tags and custom reporter.
let stamp_tag : Mtime.span Logs.Tag.def = Logs.Tag.def "stamp" ~doc:"Relative monotonic time stamp" Mtime.Span.pp let stamp c = Logs.Tag.(empty |> add stamp_tag (Mtime_clock.count c)) let run () = let rec wait n = if n = 0 then () else wait (n - 1) in let c = Mtime_clock.counter () in Logs.info (fun m -> m ...
4b13b1087621ccb6c6592fd3af989598d2259500bbe531ca10533fd3b6e19783
aperiodic/many-worlds
console.cljs
(ns many-worlds.console (:require-macros [cljs.core.async.macros :refer [go-loop]]) (:require [ajax.core :as ajax] [cljs.core.async :refer [<! >! alts! chan close! put! timeout]] [clojure.string :as str] [figwheel.client :as fw] [om.core :as om] [sablono.c...
null
https://raw.githubusercontent.com/aperiodic/many-worlds/be6401e973f8107d22f5ad865fda0ae63e52ab6f/src/cljs/many_worlds/console.cljs
clojure
Constants previews update at this interval in ms, and they Application Actions Components Om App
(ns many-worlds.console (:require-macros [cljs.core.async.macros :refer [go-loop]]) (:require [ajax.core :as ajax] [cljs.core.async :refer [<! >! alts! chan close! put! timeout]] [clojure.string :as str] [figwheel.client :as fw] [om.core :as om] [sablono.c...
4d1b8f754ab2668c94dec87e632d55d53c5b2394885f29a480ee2abc08333125
CRogers/obc
symfile.mli
* symfile.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * 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 . Redistribution...
null
https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/compiler/symfile.mli
ocaml
* symfile.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * 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 . Redistribution...
b26233703e2cbbc50ba3b523029caedcd637491b4aa1e4b6e79869a4ffc21a5c
LexiFi/menhir
LRijkstra.mli
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/LRijkstra.mli
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
41a2d224b4d1da5d66e088ddca1a562010f5c5cb9f7184d17d1109317a33feab
Kappa-Dev/KappaTools
list_core.mli
val sanity_check: bool val test_workbench: bool val list_equal: 'a -> 'a -> bool val get_skeleton: ('a List_sig.list, 'b) List_sig.precell List_sig.prelist -> (int, 'b) List_sig.precell List_sig.prelist val build_list: ('a -> ('b -> 'b -> int) -> 'c -> 'd List_sig.cell -> (int ->...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/5e756eb3529db9976cf0a0884a22676925985978/core/KaSa_rep/abstract_domains/mvbdu/list_core.mli
ocaml
val sanity_check: bool val test_workbench: bool val list_equal: 'a -> 'a -> bool val get_skeleton: ('a List_sig.list, 'b) List_sig.precell List_sig.prelist -> (int, 'b) List_sig.precell List_sig.prelist val build_list: ('a -> ('b -> 'b -> int) -> 'c -> 'd List_sig.cell -> (int ->...
003df8b4d0fe1dab0134982e52dc16fb93c65ec5a9cd1871a2dd4ccaa72a0bdb
PLTools/GT
genum.ml
* Generic transformers : plugins . * Copyright ( C ) 2016 - 2022 * aka Kakadu * St. Petersburg State University , JetBrains Research * Generic transformers: plugins. * Copyright (C) 2016-2022 * Dmitrii Kosarev aka Kakadu * St.Petersburg State University, JetBrains Research *) * { i } plugin...
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/plugins/genum.ml
ocaml
TODO: copy-paste from show. Maybe refactor to separate class? Adapted to generate only single method per constructor definition
* Generic transformers : plugins . * Copyright ( C ) 2016 - 2022 * aka Kakadu * St. Petersburg State University , JetBrains Research * Generic transformers: plugins. * Copyright (C) 2016-2022 * Dmitrii Kosarev aka Kakadu * St.Petersburg State University, JetBrains Research *) * { i } plugin...
c604015456465cacb9ef710e01d3c2e6177f058aceedd5139a2177e64449fad7
lilactown/dom
dom.cljc
(ns town.lilac.flex.dom (:require [town.lilac.flex :as flex] [town.lilac.dom :as dom]) #?(:cljs (:require-macros [town.lilac.flex.dom]))) (defmacro track [& body] `(let [pfn# (fn [] ~@body) fx# (flex/effect [el#] (if (some? el#) (dom/pa...
null
https://raw.githubusercontent.com/lilactown/dom/d51f63077bb95c65f0aaf0d65460eac79e6b98de/example/todomvc-client/src/town/lilac/flex/dom.cljc
clojure
(ns town.lilac.flex.dom (:require [town.lilac.flex :as flex] [town.lilac.dom :as dom]) #?(:cljs (:require-macros [town.lilac.flex.dom]))) (defmacro track [& body] `(let [pfn# (fn [] ~@body) fx# (flex/effect [el#] (if (some? el#) (dom/pa...
bfd862a97abb9c80aacc8207600c4e2d550a2cff2341ee98ca0a165726f57445
hiroshi-unno/coar
forwardPropagate.ml
open Core open Common.Ext open Ast open Ast.Logic * recursion - free CHC solver based on forward propagation we assume that CHC is satisfiable and contains no undefined predicate variable let pos_pvars = Set.Poly.map ~f:(fun c -> match Set.Poly.choose @@ Clause.pos_pvars c with | None -> assert false ...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/pCSP/forwardPropagate.ml
ocaml
open Core open Common.Ext open Ast open Ast.Logic * recursion - free CHC solver based on forward propagation we assume that CHC is satisfiable and contains no undefined predicate variable let pos_pvars = Set.Poly.map ~f:(fun c -> match Set.Poly.choose @@ Clause.pos_pvars c with | None -> assert false ...
088aa52b0f14787b3e53f1daf00182f0dacfdddd83daaf1dd39bc6258035937b
atolab/zenoh
zenoh_storages_storage.ml
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * -2.0 , or the Apache License , Version 2.0 * which is available at -2.0 . * * SPDX - License - Ident...
null
https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-storages/zenoh-storages-be/zenoh-storages-be-lib/zenoh_storages_storage.ml
ocaml
query the remote storages (to get historical data)
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * -2.0 , or the Apache License , Version 2.0 * which is available at -2.0 . * * SPDX - License - Ident...
cee215f56df55a0af853b7fecb59fc6ff1568ff948033d9bd70b84a93bf472c9
ryanpbrewster/haskell
sudoku.hs
-- sudoku.hs {- - A simple recursive-descent sudoku solver, using monads. -} import Control.Monad import Control.Monad.ST import Data.Array import Data.Array.ST import Data.Maybe import Data.List ((\\)) main = printBoard $ fromJust $ solvePuzzle test chunks k [] = [] chunks k xs = let (f,r) = splitAt k xs in f:chu...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/sudoku.hs
haskell
sudoku.hs - A simple recursive-descent sudoku solver, using monads.
import Control.Monad import Control.Monad.ST import Data.Array import Data.Array.ST import Data.Maybe import Data.List ((\\)) main = printBoard $ fromJust $ solvePuzzle test chunks k [] = [] chunks k xs = let (f,r) = splitAt k xs in f:chunks k r test :: Array (Int,Int) Int test = listArray ((0,0),(8,8)) [0,0,0,0,0,...
3555fb186f2fcc9d5d664f6412543161022e99cfedf93033730c06512d9b3765
yminer/libml
reteConditionsParser.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * [ LibML - Machine Learning Library ] Copyright ( C ) 2002 - 2003 LAGACHERIE This program is free software ; you can redistribute it and/or modify it under the te...
null
https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/expert-systems/rete/reteConditionsParser.ml
ocaml
* This class create from a bunch of conditions a structure which can easily be processed by the RETE algorithm. The conditions can contain constants or variables As an example : From the conditions (!x is-a-sf-book) we construct a rule * This function take a string in input and return a type condition. ...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * [ LibML - Machine Learning Library ] Copyright ( C ) 2002 - 2003 LAGACHERIE This program is free software ; you can redistribute it and/or modify it under the te...
09f0bad48d5dcddb46fb6e46d221b90af96bfdfff02e3fe9f11c188dc434d7c8
hiredman/clojurebot
code_lookup.clj
DEPENDS clojure - json (ns hiredman.clojurebot.code-lookup (:use (hiredman.clojurebot core)) (:use (hiredman utilities)) (:require [clojurebot.json :as json]) (:import (java.io File InputStreamReader BufferedReader))) (def google-code-url "/") (def google-java-code-url "/") (def contrib-url "-contrib/raw/g...
null
https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/src/hiredman/clojurebot/code_lookup.clj
clojure
end comp (def clojurebot-rev (get-rev-number)) end comp ; horrible patching for github #(.replace % bar foo)
DEPENDS clojure - json (ns hiredman.clojurebot.code-lookup (:use (hiredman.clojurebot core)) (:use (hiredman utilities)) (:require [clojurebot.json :as json]) (:import (java.io File InputStreamReader BufferedReader))) (def google-code-url "/") (def google-java-code-url "/") (def contrib-url "-contrib/raw/g...
d1586da480214b8e31200fa25a3881e8363210fc3d0d223e1597353ebb5dbf95
hadolint/hadolint
DL3033.hs
module Hadolint.Rule.DL3033 (rule) where import qualified Data.Text as Text import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule Shell.ParsedShell rule = dl3033 <> onbuild dl3033 # INLINEABLE rule # dl3033 :: Rule Shell.ParsedShell dl3033 = simpleRule code severit...
null
https://raw.githubusercontent.com/hadolint/hadolint/6c4632387a3485a9b7e1bf46c58da697178e02e2/src/Hadolint/Rule/DL3033.hs
haskell
# INLINEABLE dl3033 #
module Hadolint.Rule.DL3033 (rule) where import qualified Data.Text as Text import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule Shell.ParsedShell rule = dl3033 <> onbuild dl3033 # INLINEABLE rule # dl3033 :: Rule Shell.ParsedShell dl3033 = simpleRule code severit...
56d8ed07ffff76af2d28407c14768216a084a7872541cccb6f804fef00ffc52a
sru-systems/protobuf-simple
SFixed32ListPacked.hs
-- Generated by protobuf-simple. DO NOT EDIT! module Types.SFixed32ListPacked where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype SFixed32ListPacked = SFixed32ListPacked { value :: PB.Seq PB.Int32 } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default SFixe...
null
https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/SFixed32ListPacked.hs
haskell
Generated by protobuf-simple. DO NOT EDIT!
module Types.SFixed32ListPacked where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype SFixed32ListPacked = SFixed32ListPacked { value :: PB.Seq PB.Int32 } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default SFixed32ListPacked where defaultVal = SFixed32Lis...
72841a4373852fcbca6ba581dfbb1bf45bad25b7f4bf295e61afbb39a123042d
acl2/acl2
bls12-381-prime@useless-runes.lsp
(PRIMES::BLS12-381-SCALAR-FIELD-PRIME) (PRIMES::PRIMEP-OF-BLS12-381-SCALAR-FIELD-PRIME-CONSTANT) (PRIMES::PRIMEP-OF-BLS12-381-SCALAR-FIELD-PRIME) (PRIMES::BLS12-381-SCALAR-FIELD-PRIME-LINEAR) (DM::PRIMEP913875068) (DM::PRIMEP883092156 (1 1 (:REWRITE DEFAULT-CDR)) (1 1 (:REWRITE DEFAULT-CAR)) )
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/crypto/primes/.sys/bls12-381-prime%40useless-runes.lsp
lisp
(PRIMES::BLS12-381-SCALAR-FIELD-PRIME) (PRIMES::PRIMEP-OF-BLS12-381-SCALAR-FIELD-PRIME-CONSTANT) (PRIMES::PRIMEP-OF-BLS12-381-SCALAR-FIELD-PRIME) (PRIMES::BLS12-381-SCALAR-FIELD-PRIME-LINEAR) (DM::PRIMEP913875068) (DM::PRIMEP883092156 (1 1 (:REWRITE DEFAULT-CDR)) (1 1 (:REWRITE DEFAULT-CAR)) )
a0627498c513ad9481af07da5ce285d848f8ecde9fd8778c9fabd8b27a4d96b0
alonsodomin/haskell-schema
Gen.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Test.Schema.QuickCheck.Internal.Gen ( ToGen (..) ) where import Control.Applica...
null
https://raw.githubusercontent.com/alonsodomin/haskell-schema/4f12bda9550e83000b9f886c1c12a8becb6ad7d7/hschema-quickcheck/src/Test/Schema/QuickCheck/Internal/Gen.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Test.Schema.QuickCheck.Internal.Gen ( ToGen (..) ) where import Control.Applicative (liftA2) import ...
a3df430319fcef48f10cf63a2813dc3ad7ebe9e4da2a8ad9612ff5564e1e80b9
tweag/inline-java
SafeSpec.hs
# LANGUAGE DataKinds # # LANGUAGE ExplicitNamespaces # {-# LANGUAGE LinearTypes #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE QualifiedDo # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # -- Test that inline-java produces cod...
null
https://raw.githubusercontent.com/tweag/inline-java/b04fe241e8892d01942c772e0c02e7227591203e/tests/Language/Java/Inline/SafeSpec.hs
haskell
# LANGUAGE LinearTypes # Test that inline-java produces code without warnings or errors. # OPTIONS_GHC -dcore-lint -Wall -Werror -Wno-name-shadowing # Arrays comes from the java.util package. Named _x to avoid spurious "unused" warning
# LANGUAGE DataKinds # # LANGUAGE ExplicitNamespaces # # LANGUAGE NoImplicitPrelude # # LANGUAGE QualifiedDo # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Language.Java.Inline.SafeSpec(spec) where import qualifie...
4571e41a97630eb0041b4a22dff822ef3b4a560a85087626be70990f70ce2cb6
elaforge/karya
EnvKey.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt | Define a few inhabitants of Environ which are used by the built - in set of -- calls. Expected types are in 'Derive.Env.hardcoded_types'. module Derive.EnvKey where import Data.Text ...
null
https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Derive/EnvKey.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt calls. Expected types are in 'Derive.Env.hardcoded_types'. Also see 'Derive.Call.Post.make_delayed'. an event is at the end of the block. track. | VInstrument: Default instrument. Some scales conceptually...
Copyright 2013 | Define a few inhabitants of Environ which are used by the built - in set of module Derive.EnvKey where import Data.Text (Text) | Symbols to look up a val in the ' ValMap ' . type Key = Text * directly supported by core derivers | VList : arguments for a ' Derive . Call . Tags.requires_...
bf016195d25f0f3d24802e45140100e9a088d6d5fe9592b5a79537d38eb5a97d
karimarttila/clojure
user_datomic.clj
(ns simpleserver.service.user.user-datomic (:require [clojure.tools.logging :as log] [simpleserver.service.user.user-interface :as ss-user-i] [simpleserver.service.user.user-common :as ss-user-common] [datomic.api :as d])) (defrecord DatomicR [conn] ss-user-i/UserInterface (e...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/webstore-demo/re-frame-demo/src/clj/simpleserver/service/user/user_datomic.clj
clojure
(ns simpleserver.service.user.user-datomic (:require [clojure.tools.logging :as log] [simpleserver.service.user.user-interface :as ss-user-i] [simpleserver.service.user.user-common :as ss-user-common] [datomic.api :as d])) (defrecord DatomicR [conn] ss-user-i/UserInterface (e...
ec2f1388eb685e9f5ea1d1978fb915e205da7a62ed68c503ec08559a619c9028
malcolmsparks/plugboard
webfunctions.clj
Copyright 2010 . ;; This file is part of Plugboard . ;; Plugboard 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 , or ( at your option ) any ;; later version. ...
null
https://raw.githubusercontent.com/malcolmsparks/plugboard/c1e78afc5dde60b08b48020c6f3ef800f05d1ada/src/test/clojure/plugboard/demos/forms/webfunctions.clj
clojure
later version. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
Copyright 2010 . This file is part of Plugboard . Plugboard 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 , or ( at your option ) any Plugboard is distribut...
d4c4ba5cac5fac53e520497dd6bed92291a81207157ec48db87906ebd602700a
gheber/kenzo
cl-space-efhm-test.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - * (in-package :kenzo-test-7) (in-suite :kenzo-7) (test cs-hat-u-t (cat-7:cat-init) (let ((c (cat-7:cs-hat-u-t (cat-7:k-z-1))) abar-degr gnrt) (dotimes (i 10) (let ((abar (random-abar 8 4))) ...
null
https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/test/kenzo-7/cl-space-efhm-test.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 - *
(in-package :kenzo-test-7) (in-suite :kenzo-7) (test cs-hat-u-t (cat-7:cat-init) (let ((c (cat-7:cs-hat-u-t (cat-7:k-z-1))) abar-degr gnrt) (dotimes (i 10) (let ((abar (random-abar 8 4))) (setf abar-degr (apply #'+ (mapcar #'car (cat-7:abar-list abar)...
e4df4f20a21be18d2ebab23676dd389acde080de126bcce990b36d38dd3311bb
iu-parfunc/haskell_dsl_tour
L15IntroduceProcedurePrimitives.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # module FrameworkHs.GenGrammars.L15IntroduceProcedurePrimitives where import FrameworkHs.Prims import FrameworkHs.Helpers import Text.PrettyPrint.HughesPJ (text) import Blaze.ByteString.Builder (fromByteString) data Prog = Expr Expr data Expr = I...
null
https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/middle_end/nanopass/course_example/FrameworkHs/GenGrammars/L15IntroduceProcedurePrimitives.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE StandaloneDeriving # module FrameworkHs.GenGrammars.L15IntroduceProcedurePrimitives where import FrameworkHs.Prims import FrameworkHs.Helpers import Text.PrettyPrint.HughesPJ (text) import Blaze.ByteString.Builder (fromByteString) data Prog = Expr Expr data Expr = If Expr Expr Expr | Begin [Expr] E...
0bb9368b437d1822e868f905ea7d36f46c876ebe59fa65b606441da2f80cb24c
janestreet/async_smtp
mail_log_tags.mli
open! Core val command : string val component : string val email_fingerprint : string val flow : string val local_id : string val local_ip_address : string val location : string val message_size : string val recipient : string val remote_address : string val remote_ip_address : string val reply : string val rfc822_id ...
null
https://raw.githubusercontent.com/janestreet/async_smtp/72c538d76f5c7453bbc89af44d93931cd499a912/src/mail_log_tags.mli
ocaml
open! Core val command : string val component : string val email_fingerprint : string val flow : string val local_id : string val local_ip_address : string val location : string val message_size : string val recipient : string val remote_address : string val remote_ip_address : string val reply : string val rfc822_id ...
b62680c919558d38121c7e9f6dfa0abd92613b71d0c6b9483fddc4275045fbed
haskell-compat/base-compat
Batteries.hs
{-# LANGUAGE PackageImports #-} # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # -- | Reexports "Data.IORef.Compat" -- from a globally unique namespace. module Data.IORef.Compat.Repl.Batteries ( module Data.IORef.Compat ) where import "this" Data.IORef.Compat
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Data/IORef/Compat/Repl/Batteries.hs
haskell
# LANGUAGE PackageImports # | Reexports "Data.IORef.Compat" from a globally unique namespace.
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # module Data.IORef.Compat.Repl.Batteries ( module Data.IORef.Compat ) where import "this" Data.IORef.Compat
1b00887f7994a85c4a0ca94cbbeba233ae32e42f2bdbd8ec8ccd73639c139c9e
jaspervdj/digestive-functors
List.hs
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} | Functionality related to index storage and the DefaultList type . module Text.Digestive.Form.List ( indicesRef , parseIndices , unparseIndices , DefaultList (..) , defaultListIndex...
null
https://raw.githubusercontent.com/jaspervdj/digestive-functors/5827b47404a93b103cc57ad0f54f4dc0bdf94e24/digestive-functors/src/Text/Digestive/Form/List.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------------------------...
| Functionality related to index storage and the DefaultList type . module Text.Digestive.Form.List ( indicesRef , parseIndices , unparseIndices , DefaultList (..) , defaultListIndex ) where import Control.Applicative ((<$>), (<*>)) import Data.Foldable (Foldable (....
c35aab3163f4412d33ac3a8fa16455a0249343a66b7c56ce60f9ce425250bef1
ankushdas/Nomos
Parse.ml
Parser (* Handwritten shift/reduce parser to support * best possible error messages *) module R = Arith module A = Ast module PS = Parsestate module M = TokStream module T = Terminal module L = Lex (******************) (* Error Messages *) (******************) let pp_tok t = "'" ^ T.toString t ^ "'...
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/rast/Parse.ml
ocaml
Handwritten shift/reduce parser to support * best possible error messages **************** Error Messages **************** ************************** Building abstract syntax ************************** ***************** Data structures ***************** operator precedence, for arithmetic stack items for s...
Parser module R = Arith module A = Ast module PS = Parsestate module M = TokStream module T = Terminal module L = Lex let pp_tok t = "'" ^ T.toString t ^ "'";; let rec pp_toks toks = match toks with [] -> "" | [t] -> " or " ^ pp_tok t | t::ts -> pp_tok t ^ ", " ^ pp_toks ts;; let parse_erro...
e5ecb769c164c00b403f533686c6883eb59c6461d78d1f56e9ae25e9ed8fcb2f
hyperfiddle/electric
incr1.clj
(ns dustin.via.incr1 "dataflow" (:require [dustin.via.free :refer [Interpreter interpret interpret-1 eval-id fapply join pure bind if2]] [minitest :refer [tests]] [missionary.core :as m])) (defn call [f & args] (apply f args)) (def eval-flow (reify Interpreter (fappl...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/via/incr1.clj
clojure
ready ready ready ready foreach2 :: Flow List a -> (a -> Flow b) -> Flow Flow List b (tests "foreach" (def !xs (atom [{:id 1 :name "alice"} {:id 2 :name "bob"}])) (def xs (m/watch !xs)) (def !result (atom [])) (run-incr {'println (partial println! !result) 'foreach foreach} (foreach. @xs pr...
(ns dustin.via.incr1 "dataflow" (:require [dustin.via.free :refer [Interpreter interpret interpret-1 eval-id fapply join pure bind if2]] [minitest :refer [tests]] [missionary.core :as m])) (defn call [f & args] (apply f args)) (def eval-flow (reify Interpreter (fappl...
ed2791fb488520ab28ecea7bc6c2cf1eaa7353ebd0ed229eb3c9fa4de14f3e6e
falsetru/htdp
43.1.1.scm
#lang racket (define (in-place-sort V) sort - aux : ( vectorof number ) N - > void effect : to sort the interval [ ) of V in place (define (sort-aux i) (cond [(zero? i) (void)] [else (begin sort the segment [ 0,(sub1 i ) ): (sort-aux (sub1 i)) ;; insert (vector-ref V (s...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/43/43.1.1.scm
scheme
insert (vector-ref V (sub1 i)) into the segment
#lang racket (define (in-place-sort V) sort - aux : ( vectorof number ) N - > void effect : to sort the interval [ ) of V in place (define (sort-aux i) (cond [(zero? i) (void)] [else (begin sort the segment [ 0,(sub1 i ) ): (sort-aux (sub1 i)) [ ) so that it becomes sorted '...
9d132d2ce36c4e4c917fca07793e1acb152120db36dbf808bf4820d90fa2b5b5
tmfg/mmtis-national-access-point
url.cljc
(ns ote.util.url "URL related utilities for clj/cljs." #?(:clj (:import (java.net URLEncoder URLDecoder)))) (defn encode-url [url] #?(:clj (URLEncoder/encode (str url) "UTF-8") :cljs (js/encodeURI url))) (defn decode-url [url] #?(:clj (URLDecoder/decode (str url) "UTF-8") :clj...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljc/ote/util/url.cljc
clojure
(ns ote.util.url "URL related utilities for clj/cljs." #?(:clj (:import (java.net URLEncoder URLDecoder)))) (defn encode-url [url] #?(:clj (URLEncoder/encode (str url) "UTF-8") :cljs (js/encodeURI url))) (defn decode-url [url] #?(:clj (URLDecoder/decode (str url) "UTF-8") :clj...
73a54957ab03371dea5a6c4b98945e83d7ce9a1c422a8d6b0c1500f587fa68b3
hexpm/hex_core
hex_tarball.erl
%% @doc %% Functions for creating and unpacking Hex tarballs. -module(hex_tarball). -export([create/2, create/3, create_docs/1, create_docs/2, unpack/2, unpack/3, unpack_docs/2, unpack_docs/3, format_checksum/1, format_error/1]). -ifdef(TEST). -export([do_decode_metadata/1, gzip/1, normalize_requirements/1]). -endi...
null
https://raw.githubusercontent.com/hexpm/hex_core/b5a22dbcd62871bb5aba5311885eacee057919a5/src/hex_tarball.erl
erlang
@doc Functions for creating and unpacking Hex tarballs. ==================================================================== API functions ==================================================================== @doc Creates a package tarball. Returns the binary of the tarball the "inner checksum" and "outer checksu...
-module(hex_tarball). -export([create/2, create/3, create_docs/1, create_docs/2, unpack/2, unpack/3, unpack_docs/2, unpack_docs/3, format_checksum/1, format_error/1]). -ifdef(TEST). -export([do_decode_metadata/1, gzip/1, normalize_requirements/1]). -endif. -define(VERSION, <<"3">>). -define(BUILD_TOOL_FILES, [ ...
1a3f60c2e1627bf92a5a8ea5494dbb9adc0d409f44ee557a546a72252ba34c09
fjvallarino/monomer
TimeFieldSpec.hs
| Module : . Widgets . Singles . TimeFieldSpec Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Unit tests for TimeField widget . Module : Monomer.Widgets.Singles.TimeFieldSpec Copyrig...
null
https://raw.githubusercontent.com/fjvallarino/monomer/d4270caafea4ff4fdd80bb1c9b78443ae480cfc5/test/unit/Monomer/Widgets/Singles/TimeFieldSpec.hs
haskell
Presses a key to reset the shift = true state Used only to have focus
| Module : . Widgets . Singles . TimeFieldSpec Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Unit tests for TimeField widget . Module : Monomer.Widgets.Singles.TimeFieldSpec Copyrig...
a1092eb76336a0a04b1b8b5cd6a5da22c7ef934b6823e3c5e0844aa0b61a4f9d
kframework/semantic-approaches
Imp_Bigstep.hs
-- This module defines imp in bigstep semantics module Imp_Bigstep (execute, Configuration (ConfPgm)) where import Imp_Syntax import Imp_State import Imp_Buffer import qualified Data.Map.Strict as Map import qualified Data.List as List -- NEW: [Integer] is a list of integers, acting as either a...
null
https://raw.githubusercontent.com/kframework/semantic-approaches/6f64eac09e005fe4eae7141e3c0e0f5711da0647/haskell/imp/2-imp-input-output/1-imp-bigstep/Imp_Bigstep.hs
haskell
This module defines imp in bigstep semantics NEW: [Integer] is a list of integers, acting as either an output or input buffer. All the rules are updated for the new buffers NEW NEW okfunc is used to tell if the divisor is not 0 and dfunc does the division, these are added to reuse code Do this here rather than on...
module Imp_Bigstep (execute, Configuration (ConfPgm)) where import Imp_Syntax import Imp_State import Imp_Buffer import qualified Data.Map.Strict as Map import qualified Data.List as List type State = (Map.Map String Integer) type Buffer = [Integer] data Configuration = ConfAExp...
2db656e56b9482ce07117e50026c4363f76768a69fd69ede9e707a156e4aaf89
ygrek/mldonkey
commonShared.mli
type 'a shared_impl = { impl_shared_fullname : string; impl_shared_codedname : string; mutable impl_shared_val : 'a; mutable impl_shared_update : int; mutable impl_shared_num : int; mutable impl_shared_ops : 'a shared_ops; mutable impl_shared_uploaded : int64; mutable impl_shared_size : int64; mutable...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonShared.mli
ocaml
type 'a shared_impl = { impl_shared_fullname : string; impl_shared_codedname : string; mutable impl_shared_val : 'a; mutable impl_shared_update : int; mutable impl_shared_num : int; mutable impl_shared_ops : 'a shared_ops; mutable impl_shared_uploaded : int64; mutable impl_shared_size : int64; mutable...
e814aea3ed307c1f9f2421c45871c39e91073370c06a09e927c532eb61cab2fb
flipstone/haskell-for-beginners
5_case_expressions.hs
-- Rewrite your implementation of reverse from earlier -- using a case expression. -- Write a function to greet people based on their names. -- The function should: -- * Give some response for all names. * Have a special greating for -- * Insult anyone who's name starts with Q -- * Tell anyone with a n...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_04/5_case_expressions.hs
haskell
Rewrite your implementation of reverse from earlier using a case expression. Write a function to greet people based on their names. The function should: * Give some response for all names. * Insult anyone who's name starts with Q * Tell anyone with a name shorter than BONUS: This is more convenient if...
* Have a special greating for 3 characters to get a real name greeting :: String -> String greeting name = undefined
a7e6e2f9636c6fa642c67b47e5932de923fd9f9b037c65d1c4cf7814fc1f2d2e
cbaggers/l-lisp
splineed.lisp
;;; *** splineed.lisp *** ;;; This file is part of L - Lisp by . ;;; An OpenGL based spline editor. (in-package :spline-editor) (defun tri-solve (a d c b) "Solve a tridiagonal set of equations. Input: A, D, C: the diagonal vectors of the matrix B: the right-hand vector Outputs a solution ve...
null
https://raw.githubusercontent.com/cbaggers/l-lisp/7a09d3a5a59cf63fead2a15b7b995787d7c6971d/splineed.lisp
lisp
*** splineed.lisp *** An OpenGL based spline editor. check sizes; will allow that C has length n-1 Gauss elimination (eliminating A) save multiplicator in A update D and B back substitution (eliminating C) save multiplicator in C update B final step: b[k] = b[k] / d[k], then return b make sure we're in the ...
This file is part of L - Lisp by . (in-package :spline-editor) (defun tri-solve (a d c b) "Solve a tridiagonal set of equations. Input: A, D, C: the diagonal vectors of the matrix B: the right-hand vector Outputs a solution vector X. The Matrix is on the form: | d0 c0 : ...
74926984d21b72367f937d4eee952f36edb63e1658e54e4621d6827a759c6bd5
larcenists/larceny
16iter6.scm
(bits 16) (text (iter (begin (iter (seq (pop bx) (= bx 2))) (iter (seq (pop bx) (= bx 3)))))) 00000000 5B pop ebx 00000001 83FB02 cmp bx , byte +0x2 00000004 74FA jz 0x0 ; 00000006 5B pop ebx 00000007 83FB03 cmp bx ...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims16/16iter6.scm
scheme
00000006 5B pop ebx Why it makes sense that the outer loop doesn't loop: Iter can never win, it can only loop forever or lose, in which case the loop is exited. The begin wins or loses depending on its last tail. In this case, the last tail can never win, since it's an iter, but it can lose. But i...
(bits 16) (text (iter (begin (iter (seq (pop bx) (= bx 2))) (iter (seq (pop bx) (= bx 3)))))) 00000000 5B pop ebx 00000001 83FB02 cmp bx , byte +0x2 00000004 74FA jz 0x0 00000007 83FB03 cmp bx , byte +0x3 0000000A 74FA ...
0dfb5b2d748f2eb1d4e974b56a0175d17320bc30b02938f3e02c371af8a96f61
rbkmoney/cds
cds_card_data.erl
TODO %% - Revise card network detection %% - Provide more links to the regulator issued documents -module(cds_card_data). -export([get_card_info/1]). -export([marshal_cardholder_data/1]). -export([marshal_session_data/1]). -export([unmarshal_cardholder_data/1]). -export([unmarshal_session_data/1]). -type cardnu...
null
https://raw.githubusercontent.com/rbkmoney/cds/b1e03ab1669fc73cdade6507e9fe9b46c772cfa3/apps/cds/src/cds_card_data.erl
erlang
- Revise card network detection - Provide more links to the regulator issued documents NOTE: New CDS store card number only, expiration date and cardholder name will be stored elsewhere. This design allows to reduce amount of data stored for the card with the same card number but different (or unknown) expira...
TODO -module(cds_card_data). -export([get_card_info/1]). -export([marshal_cardholder_data/1]). -export([marshal_session_data/1]). -export([unmarshal_cardholder_data/1]). -export([unmarshal_session_data/1]). -type cardnumber() :: binary(). -type exp_date() :: {1..12, pos_integer()}. -type cardholder() :: binary()....
ef08b2ae1dbfb9d5cc8d5d8c1dfb8731295f63876fd4dfaa2e7a532fa4941488
bazurbat/chicken-scheme
srfi-13.import.scm
srfi-13.import.scm - import library for " srfi-13 " module ; Copyright ( c ) 2008 - 2016 , The CHICKEN Team ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redistributions of source code...
null
https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/srfi-13.import.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributio...
srfi-13.import.scm - import library for " srfi-13 " module Copyright ( c ) 2008 - 2016 , The CHICKEN Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES...
916fdc29819b3b00d1530f4517313ae10e07b4f023db204c6e1bdd37c825fa15
haskell-waargonaut/waargonaut
JNumber.hs
module Types.JNumber ( genJNumber ) where import Control.Applicative (liftA2) import Control.Lens (( # )) import Hedgehog import qualified Hedgehog.Gen as Gen import Types.Common (genDecimalDigitNoZero, ...
null
https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/ba1dbbc170c2279749ea29bc8aaf375bdb659ad2/test/Types/JNumber.hs
haskell
module Types.JNumber ( genJNumber ) where import Control.Applicative (liftA2) import Control.Lens (( # )) import Hedgehog import qualified Hedgehog.Gen as Gen import Types.Common (genDecimalDigitNoZero, ...
cea7e19df762e3995f147f9dc5f480b6b26f5764d8b7aba99ad6fedf323dc4ac
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} # LANGUAGE NoRebindableSyntax # {-# LANGUAGE OverloadedStrings #-} module Duckling.D...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Duration/BG/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE NoRebindableSyntax # module Duckling.Duration.BG.Rules ( rules ) where import Data.String import Data.Text (Text) import Prelude import qualified Data.Text as Text import Duckling.Dimensions.Types import Duckling.Duration.Helpers import Duckling.Num...
7e6cc983ad66865ad0477fc5a556bc7769d2b0865dc3ece617304d62241c1f4c
mmottl/postgresql-ocaml
prompt.ml
A simple replacement for psql open Printf open! Postgresql let _ = if Array.length Sys.argv <> 2 then ( eprintf "\n Usage: %s conninfo\n" Sys.argv.(0); exit 1) let conninfo = Sys.argv.(1) let print_conn_info conn = printf "db = %s\n" conn#db; printf "user = %s\n" conn#user; printf "pass ...
null
https://raw.githubusercontent.com/mmottl/postgresql-ocaml/7c0c90119d09cc72d6296538b40d312c81486732/examples/prompt.ml
ocaml
A simple replacement for psql open Printf open! Postgresql let _ = if Array.length Sys.argv <> 2 then ( eprintf "\n Usage: %s conninfo\n" Sys.argv.(0); exit 1) let conninfo = Sys.argv.(1) let print_conn_info conn = printf "db = %s\n" conn#db; printf "user = %s\n" conn#user; printf "pass ...
e300aa4248ec5bd88fb896fdb6841e161cdb86695eb919471a083ce94eace9cb
michiakig/sicp
ex-2.14.scm
;;;; Structure and Interpretation of Computer Programs Chapter 2 Section 1 Introduction to Data Abstraction Exercise 2.14 (define (par1 r1 r2) (div-interval (mul-interval r1 r2) (add-interval r1 r2))) (define (par2 r1 r2) (let ((one (make-interval 1 1))) (div-interval one ...
null
https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch2/ex-2.14.scm
scheme
Structure and Interpretation of Computer Programs
Chapter 2 Section 1 Introduction to Data Abstraction Exercise 2.14 (define (par1 r1 r2) (div-interval (mul-interval r1 r2) (add-interval r1 r2))) (define (par2 r1 r2) (let ((one (make-interval 1 1))) (div-interval one (add-interval (div-interval one r1) ...
53dde13ce133805841f6a7b0ad1b3fa6a4741e8218ba3980d16024f9f6ab4674
yesodweb/wai
Util.hs
# LANGUAGE CPP # -- | Some helpers functions. module Network.Wai.Util ( dropWhileEnd , splitCommas , trimWS ) where import qualified Data.ByteString as S import Data.Word8 (Word8, _comma, _space) -- | Used to split a header value which is a comma separated list splitCommas :: S.ByteString -> [S.ByteSt...
null
https://raw.githubusercontent.com/yesodweb/wai/f132bcf575fa13bce31405b73f57d671a93c8800/wai-extra/Network/Wai/Util.hs
haskell
| Some helpers functions. | Used to split a header value which is a comma separated list Trim whitespace | Dropping all 'Word8's from the end that satisfy the predicate.
# LANGUAGE CPP # module Network.Wai.Util ( dropWhileEnd , splitCommas , trimWS ) where import qualified Data.ByteString as S import Data.Word8 (Word8, _comma, _space) splitCommas :: S.ByteString -> [S.ByteString] splitCommas = map trimWS . S.split _comma trimWS :: S.ByteString -> S.ByteString trimWS ...
75eb8f37c2b8a893e45d0199df5d9796c01956a8c0919ac686419a014e518b50
lamdu/lamdu
Fuzzy.hs
| A wrapper for the fuzzyset library that makes it a Fuzzy map # LANGUAGE TemplateHaskell , DerivingVia # module Lamdu.Fuzzy ( Fuzzy, make, matches , Distance(..), isFuzzy, distanceInts , memoableMake ) where import qualified Control.Lens as Lens import Control.Lens.Extended ((~~>)) import ...
null
https://raw.githubusercontent.com/lamdu/lamdu/c731af3be3b933ab3e2ce4e8d79fa4d40e0f91d0/src/Lamdu/Fuzzy.hs
haskell
| Takes the number of skips in given string that are allowed <-- try skipping a char performance/sharing reasons (where clauses do not depend on last Text param) Use const cause lower scores are better, use those for dups
| A wrapper for the fuzzyset library that makes it a Fuzzy map # LANGUAGE TemplateHaskell , DerivingVia # module Lamdu.Fuzzy ( Fuzzy, make, matches , Distance(..), isFuzzy, distanceInts , memoableMake ) where import qualified Control.Lens as Lens import Control.Lens.Extended ((~~>)) import ...
9c3433f7cad9d664bbd5292d7e4dd30b8106fcf74a7365e4f14f71dfd9a7af84
YoshikuniJujo/funpaala
cells.hs
data Cell = Cell Char Int deriving Show column :: Cell -> Char column (Cell c _) = c row :: Cell -> Int row (Cell _ r) = r cell1 :: Cell cell1 = Cell 'A' 8
null
https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/21_adt/cells.hs
haskell
data Cell = Cell Char Int deriving Show column :: Cell -> Char column (Cell c _) = c row :: Cell -> Int row (Cell _ r) = r cell1 :: Cell cell1 = Cell 'A' 8
d9ac6762f6aa6a24d9e0663a48ff55046a8010e2878d6ea0c45ef0a19e91500c
tommaisey/aeon
osc.help.scm
(with-sc3 (lambda (fd) (async fd (b-alloc 10 512 1)) (async fd (b-gen1 10 "sine1" (list (+ 1 2 4) 1 1/2 1/3 1/4 1/5))))) (audition (out 0 (mul (osc ar 10 220 0) 0.1))) ;; Modulate freq (let ((f (x-line kr 2000 200 1 remove-synth))) (audition (out 0 (mul (osc ar 10 f 0) 0.5)))) ;; Modulate freq (let* ((f1 ...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/osc.help.scm
scheme
Modulate freq Modulate freq Modulate phase Change the buffer while its playing
(with-sc3 (lambda (fd) (async fd (b-alloc 10 512 1)) (async fd (b-gen1 10 "sine1" (list (+ 1 2 4) 1 1/2 1/3 1/4 1/5))))) (audition (out 0 (mul (osc ar 10 220 0) 0.1))) (let ((f (x-line kr 2000 200 1 remove-synth))) (audition (out 0 (mul (osc ar 10 f 0) 0.5)))) (let* ((f1 (x-line kr 1 1000 9 remove-synth))...
0cbbfaf83646c4f900aeade18fa23899833efc643821e1c72ec139462c03c0e5
jcclinton/wow-emulator
stats.erl
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x %% Copyright ( C ) 2014 < jamieclinton.com > %% %% 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 Found...
null
https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/lib/stats.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU G...
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x Copyright ( C ) 2014 < jamieclinton.com > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy...
ceb335e0ed95f520fbde422274ad225c157c051f5bc6d6f1f063952e9faed13e
dominicfreeston/freeston-dot-me
feed.clj
Copyright ( c ) 2022 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 , distribut...
null
https://raw.githubusercontent.com/dominicfreeston/freeston-dot-me/083a0e8720b0b752878cec0304903cc5c3c80e7b/src/freeston/feed.clj
clojure
Copyright ( c ) 2022 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 , distribut...
593cb10c589c340278bbad93373c0a37e749fe28b5895964d03e56c66513a058
y-taka-23/time-machine
CockpitSpec.hs
module Control.Monad.TimeMachine.CockpitSpec ( spec ) where import Test.Hspec import Test.Hspec.QuickCheck (prop) import Control.Monad.TimeMachine.Cockpit spec :: Spec spec = do describe "jan/feb/.../dec" $ do it "clips too large day, hour and minmute values" $ d...
null
https://raw.githubusercontent.com/y-taka-23/time-machine/c82f15d51d12b800438aa74401f42d39e0c472fe/test/Control/Monad/TimeMachine/CockpitSpec.hs
haskell
module Control.Monad.TimeMachine.CockpitSpec ( spec ) where import Test.Hspec import Test.Hspec.QuickCheck (prop) import Control.Monad.TimeMachine.Cockpit spec :: Spec spec = do describe "jan/feb/.../dec" $ do it "clips too large day, hour and minmute values" $ d...
2055e88057ea279d1e12855843d1a6d9f51272d601afb0817d5dcaed65ec0930
matlux/lambda-game-engine
board.clj
(ns zone.lambda.game.board (:require [clojure.math.numeric-tower :as math] [net.matlux.utils :refer [unfold dbg display-assert]]) (:import clojure.lang.PersistentVector)) (def ^:dynamic *file-key* \a) (def ^:dynamic *rank-key* \0) (def BLANK :.) (defn c2dto1d [column-nb v] (let [[x y] v] (+ x (* colu...
null
https://raw.githubusercontent.com/matlux/lambda-game-engine/07109206714d80db2e3a2b65c84cd987a81006c4/src/zone/lambda/game/board.clj
clojure
{:post [(and (< % 8) (>= % 0))]} {:post [(display-assert (and (< % (* raw-nb column-nb)) (>= % 0)) (int (.charAt (name rank) 0)))]} {:post [(and (< % 8) (>= % 0))]} {:post [(and (< % raw-nb) (>= % 0))]} {:pre [(and (char? (.charAt (name file) 0)) (char? (.charAt (name rank) 0)))]} (pos-between-incl [0 0] [4 0]) (get-h...
(ns zone.lambda.game.board (:require [clojure.math.numeric-tower :as math] [net.matlux.utils :refer [unfold dbg display-assert]]) (:import clojure.lang.PersistentVector)) (def ^:dynamic *file-key* \a) (def ^:dynamic *rank-key* \0) (def BLANK :.) (defn c2dto1d [column-nb v] (let [[x y] v] (+ x (* colu...
cc7dc89d13cb0071a798515221d0dc4fca780d4cc689f27d323106ba21643450
2600hz/kazoo
gen_attachment.erl
%%%----------------------------------------------------------------------------- ( C ) 2018 - 2020 , 2600Hz %%% @doc Storage attachment behaviour. @author %%% 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...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_attachments/src/gen_attachment.erl
erlang
----------------------------------------------------------------------------- @doc Storage attachment behaviour. @end ----------------------------------------------------------------------------- map of the "settings" object from handler's config ====================================================================...
( C ) 2018 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(gen_attachment). -include("kz_att.hrl"). -type db_name() :: kz_term:ne_binary(). -t...
1e35a586e927cc4db8237a5f9b28c6cdafa5b25fd01baded89c24224dcfa0aa6
ebresafegaga/tina
desugarData.ml
transform all tuple and variant patterns and expressions into record patterns and expressions { 0 : ... 1 : ... 2 : ... . . . n : ... } field 0 is a tag , field 1 to n represent the field that they hold into record patterns and express...
null
https://raw.githubusercontent.com/ebresafegaga/tina/66fa8daa66c0c6e65260bbea3e8e2ddcc2f9d2d0/runtime/desugarData.ml
ocaml
[reduce_to_record f g xs tag] takes a contructor function [f], a transformation function [g] a list of transformable items [xs], and a [tag] which is already tranformed. it then created an a list of pairs of transformed items tagged with a field name. the list starts with [(0, tag)] then all the other t...
transform all tuple and variant patterns and expressions into record patterns and expressions { 0 : ... 1 : ... 2 : ... . . . n : ... } field 0 is a tag , field 1 to n represent the field that they hold into record patterns and express...
c3a86c58bd95a757b197bb4aec9907c7d9ae3c28769a0dc9b54bac4427eb873e
amalloy/amalloy-utils
seq.clj
(ns amalloy.utils.seq (:use amalloy.utils [clojure.walk :only [postwalk-replace]])) (defcomp iterations "Return a sequence of (f start), (f (f start))...until nil is encountered. Like clojure.core/iterate, but doesn't include the original element and doesn't go on forever." [f start] trim-seq rest ...
null
https://raw.githubusercontent.com/amalloy/amalloy-utils/a0be8eba37b23bd99e266602e9da2d66a8418156/src/amalloy/utils/seq.clj
clojure
(ns amalloy.utils.seq (:use amalloy.utils [clojure.walk :only [postwalk-replace]])) (defcomp iterations "Return a sequence of (f start), (f (f start))...until nil is encountered. Like clojure.core/iterate, but doesn't include the original element and doesn't go on forever." [f start] trim-seq rest ...
d8b5ac399b60ec8d35b4b3f2337ae354ccba4bb6df7bf85d4c1801961ba0ca51
ranjitjhala/haddock-annot
Types.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Dependency.Types Copyright : ( c ) 2008 -- License : BSD-like -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Common types for dependency resolution...
null
https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/cabal-install-0.10.3/Distribution/Client/Dependency/Types.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Client.Dependency.Types License : BSD-like Maintainer : Stability : provisional Portability : portable Common types for dependency resolution. --------------------------------------------------...
Copyright : ( c ) 2008 module Distribution.Client.Dependency.Types ( DependencyResolver, PackageConstraint(..), PackagePreferences(..), InstalledPreference(..), Progress(..), foldProgress, ) where import Distribution.Client.Types ( AvailablePackage(..), InstalledPackage ) ...
2ac9b581e0ef0d1c817d97d4d38fcdc5efb2a856a28f3cd77f485dd8dcc773ec
2600hz-archive/whistle
mochilogfile2.erl
@author < > @copyright 2010 Mochi Media , Inc. %% @doc Write newline delimited log files, ensuring that if a truncated %% entry is found on log open then it is fixed before writing. Uses %% delayed writes and raw files for performance. -module(mochilogfile2). -author(''). -export([open/1, write/2, cl...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/mochiweb-1.7.1/src/mochilogfile2.erl
erlang
@doc Write newline delimited log files, ensuring that if a truncated entry is found on log open then it is fixed before writing. Uses delayed writes and raw files for performance. @spec open(Name) -> Handle @doc Open the log file Name, creating or appending as necessary. All data at the end of the ...
@author < > @copyright 2010 Mochi Media , Inc. -module(mochilogfile2). -author(''). -export([open/1, write/2, close/1, name/1]). open(Name) -> {ok, FD} = file:open(Name, [raw, read, write, delayed_write, binary]), fix_log(FD), {?MODULE, Name, FD}. name(Handle ) - > string ( ) name({?MODULE, Na...