_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
8f6a0c56426ea64d6fbbfafa60fc25bd37386c97266a420a36fd071e4bebc5d2
klarna/leveldb_manager
leveldb_manager_sup.erl
%%%---------------------------------------------------------------- File : Author : < > Description : Supervisor for instances %%% Copyright ( c ) 2014 - 2015 Klarna AB %%% This file is provided to you under the Apache License , %%% Version 2.0 (the "License"); you may not use this file e...
null
https://raw.githubusercontent.com/klarna/leveldb_manager/fd604ffa69e939eec82a37481eb5612a54ba04bf/src/leveldb_manager_sup.erl
erlang
---------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions a...
File : Author : < > Description : Supervisor for instances Copyright ( c ) 2014 - 2015 Klarna AB This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS...
e9f3ac96b4e00a25eb096989bfe9feb628d46d837a2e91f60bc3c1cab7978a93
awslabs/s2n-bignum
curve25519_ladderstep_alt.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/01d5ee53066f8a4e820776505d21e4c1b9657637/arm/proofs/curve25519_ladderstep_alt.ml
ocaml
========================================================================= ========================================================================= *** print_literal_from_elf "arm/curve25519/curve25519_ladderstep_alt.o";; *** arm_MOV X19 X1 arm_MOV X20 X2 arm_MOV X21 X3 arm_ADDS X0 X0 X4 arm_ADDS X0 X0 X4...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) Montgomery ladder step in ( X , Z)-projective coordinates for . ...
d617a534a51976f08431ec6e9acee148aa8506547b9e0fd070b9a60da4ed0fb2
tcsprojects/mlsolver
validitygames.ml
type validity_answer = Validitygamesregistry.validity_answer type validity_procedure = Validitygamesregistry.validity_procedure let register_validity_procedure = Validitygamesregistry.register_validity_procedure;; let mem_validity_procedure = Validitygamesregistry.mem_validity_procedure;; let find_validity_...
null
https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/automata/validitygames.ml
ocaml
type validity_answer = Validitygamesregistry.validity_answer type validity_procedure = Validitygamesregistry.validity_procedure let register_validity_procedure = Validitygamesregistry.register_validity_procedure;; let mem_validity_procedure = Validitygamesregistry.mem_validity_procedure;; let find_validity_...
7da682f13b3ccc65ac93e15be6a737e07dd7e54e490feebf57b95e8b47064ffb
funcool/buddy-sign
jws.clj
Copyright ( c ) 2014 - 2018 < > ;; 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 distribu...
null
https://raw.githubusercontent.com/funcool/buddy-sign/dcc112eb348db5d4d1740090f14f50619b62db7f/src/buddy/sign/jws.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 perm...
Copyright ( c ) 2014 - 2018 < > Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , - -ietf-jose-json-web-algorithms-40 (ns buddy.sign.jws "Json Web Signature implementation." (:require [buddy.core.codecs :as codecs] ...
15a8140f83bee4bf265cee5b346588f5859b52e475d854f1043791edac8e5484
janestreet/core
unit.mli
* Module for the type [ unit ] , extended from { { ! Base . Unit}[Base . Unit ] } . This is mostly useful for building functor arguments . useful for building functor arguments. *) open! Import type t = unit [@@deriving typerep] * @inline include module type of struct include Base.Unit end with type t ...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/src/unit.mli
ocaml
* Module for the type [ unit ] , extended from { { ! Base . Unit}[Base . Unit ] } . This is mostly useful for building functor arguments . useful for building functor arguments. *) open! Import type t = unit [@@deriving typerep] * @inline include module type of struct include Base.Unit end with type t ...
65917bbc30312d1392feb6c954f13a6be391ab17164edaa4403839db87e9a089
eliascotto/tryclojure
tutorial.cljs
(ns app.tutorial (:require [clojure.string :as string] [sci.impl.vars :refer [SciVar]])) (def tutorial "Collection of map steps." [;; Strings {:title "Hello string!" :content "> Learn the principle, abide by the principle, and dissolve the principle. - Bruce Lee Let's start with the ...
null
https://raw.githubusercontent.com/eliascotto/tryclojure/4894e1d5d06cf8693894f4eeda89b4a75f02160f/src/app/tutorial.cljs
clojure
Strings Lists Math Functions Keywords it's called a *keyword*. Exercise - 01 Vectors Variables Let Maps F-list Range Filter Map Inline functions REPL
(ns app.tutorial (:require [clojure.string :as string] [sci.impl.vars :refer [SciVar]])) (def tutorial "Collection of map steps." {:title "Hello string!" :content "> Learn the principle, abide by the principle, and dissolve the principle. - Bruce Lee Let's start with the basic. Clojure...
a93d634b8e88fc4511995f61e1d079a4ed65e529f86046874830980e8b9ac558
huangz1990/SICP-answers
58-expand.scm
58-expand.scm (define (expand num den radix) (cons-stream (quotient (* num radix) den) (expand (remainder (* num radix) den) den radix)))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/58-expand.scm
scheme
58-expand.scm (define (expand num den radix) (cons-stream (quotient (* num radix) den) (expand (remainder (* num radix) den) den radix)))
ac4ba98d854ac653c2d7e7a3da09c3d6db21ddcb5300f82742fa4e58de0538a5
xh4/web-toolkit
mcl.lisp
MCL backend for USOCKET 0.4.1 < > , January 1 , 2009 (in-package :usocket) (defun handle-condition (condition &optional socket (host-or-ip nil)) ; incomplete, needs to handle additional conditions (flet ((raise-error (&optional socket-condition host-or-ip) (if socket-condition (co...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/usocket-0.8.3/backend/mcl.lisp
lisp
incomplete, needs to handle additional conditions BASIC MCL SOCKET IMPLEMENTATION like with-io-buffer-lock-grabbed but returns immediately instead of polling the lock crucial - clears bogus lock.value as in grab-io-buffer-lock-out-of-line: datagram socket methods
MCL backend for USOCKET 0.4.1 < > , January 1 , 2009 (in-package :usocket) (defun handle-condition (condition &optional socket (host-or-ip nil)) (flet ((raise-error (&optional socket-condition host-or-ip) (if socket-condition (cond ((typep socket-condition ns-error) ...
28b5cf55a2e5a86f66d7aaf623b038f5b829cec271ad2cd859d501edfad66e18
dgiot/dgiot
dtu_decoder.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy...
null
https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_bridge/priv/protocol/dtu_decoder.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , ( C ) 2019 , < dgiot > DTU通用协议解析 DTU设置 ; b.在每一数据包前加注册包 2.心跳 ; b.心跳数...
85bf4074d821d0ede219daa36ddfe658865fc318cbe45bce1832c8a5fe3eb64b
racket/htdp
master.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname master) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f...
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/htdp/tests/master.rkt
racket
about the language level of this file in a form that our tools can easily process. (load "tester.rkt") check-guess : color color color color -> symbol Tests:
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname master) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require htdp/master) (define (check-guess target1 target2 guess1...
42bdf7135309c3de5383d052ded6681a39245e802b57aed8e23b9410e6a3b0f0
wavewave/hoodle
Hashed.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # ----------------------------------------------------------------------------- -- | -- Module : Data.Hoodle.Hashed Copyright : ( c ) 2011 - 2014 --...
null
https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/types/src/Data/Hoodle/Hashed.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | Module : Data.Hoodle.Hashed License : BSD3 Stability : experimental | | wrapper of object embeddable in Layer | Pen stroke item | Image item | | | | | | Orphan instance for Pair | | ...
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # Copyright : ( c ) 2011 - 2014 Maintainer : < > Portability : GHC module Data.Hoodle.Hashed where import Data.ByteString.Char8 (ByteString, pack) import Data.Hoodle.Util (fst3...
30579368be99c9739a10c6029a7717e46e4b220ec32ded243a8a04c42b501553
let-def/cmon
cmon.mli
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/let-def/cmon/668d4bbce1e81a81202890ea10ba8eb9d62c3a7d/lib/cmon.mli
ocaml
* Unique identifiers to make sharing explicit. Variable names are automatically generated. * The output is the syntax of OCaml values (with unique identifiers for structured values) extended with variables and let-bindings to represent sharing. () [] true, false 'x' 0L, 1L, ... constant constru...
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
ae79542ec49707de6c02c650f147dd370fead3491e26f26125bb2c8b0604679a
reanimate/reanimate
Compatible.hs
# LANGUAGE ScopedTypeVariables # module Reanimate.Math.Compatible where import Data.Hashable import Data.List import Data.Maybe import Data.Ord import qualified Data.Vector as V import Linear.V2 import Linear.Vector import Reanimate.Anima...
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/reanimate-morph/Compatible.hs
haskell
import Debug.Trace import GHC.Stack 0..i,j..n-1 i..j | otherwise i = = 4 & & j = = 8 info = mkGroup in translate x1 y1 $ withFillColor "blue" $ mkCircle 0.04 in translate x1 y1 $ withFillColor "green" $ mkCircle 0.04 ] intersects = sortOn distToV : [ u | n <...
# LANGUAGE ScopedTypeVariables # module Reanimate.Math.Compatible where import Data.Hashable import Data.List import Data.Maybe import Data.Ord import qualified Data.Vector as V import Linear.V2 import Linear.Vector import Reanimate.Anima...
7d49958baa4c3f97ff4ec46de99ffb6fa9e9d0cf338d2b3ec61fc0f0ae476e22
chiroptical/book-of-monads
Freer.hs
{-# LANGUAGE GADTs #-} module Freer where import Control.Monad ( (<=<) ) data Freer instr a where Pure ::a -> Freer instr a Impure ::instr a -> (a -> Freer instr b) -> Freer instr b instance Functor (Freer instr) where fmap f (Pure x ) = Pure $ f x fmap f (Impure x k) = Impure ...
null
https://raw.githubusercontent.com/chiroptical/book-of-monads/c2eff1c67a8958b28cfd2001d652f8b68e7c84df/chapter14/src/Freer.hs
haskell
# LANGUAGE GADTs #
module Freer where import Control.Monad ( (<=<) ) data Freer instr a where Pure ::a -> Freer instr a Impure ::instr a -> (a -> Freer instr b) -> Freer instr b instance Functor (Freer instr) where fmap f (Pure x ) = Pure $ f x fmap f (Impure x k) = Impure x (fmap f . k) instanc...
c9ef0c4094f25a65e63a5741172ea63c2dc25e279744b04a146f38c08bb0a277
tomjridge/kv-hash
frontend_ro.ml
(** Read-only frontend *) * In addition to the main frontend , which writes logs and calls the merge process , we also have read - only processes that read the logs directly from disk , and also use the on - disk partition to access the bucket store . Steps to create : - open the control file , re...
null
https://raw.githubusercontent.com/tomjridge/kv-hash/5f017256d84a606db65e5837829ff7ebcbdd79ce/src/frontend_ro.ml
ocaml
* Read-only frontend FIXME we need to think about what to do if a log file becomes corrupted and cannot be read in full soft limit We read a partial value; try again check that we haven't somehow moved the position in the ic FIXME perhaps if the position has moved we should reset, rather than fail? The...
* In addition to the main frontend , which writes logs and calls the merge process , we also have read - only processes that read the logs directly from disk , and also use the on - disk partition to access the bucket store . Steps to create : - open the control file , read the current log number ...
1d89ec8ad48481c6a4b7bdbe5ca17888d6128ae8d13de6aac991fecf733693ad
Kappa-Dev/KappaTools
exception.ml
* * exception.ml * openkappa * , projet Abstraction , INRIA Paris - Rocquencourt * * Creation : 08/03/2010 * Last modification : Time - stamp : < Aug 15 2016 > * * * This library declares exceptions * * Copyright 2010 Institut National de Recherche en Informatique et * en Automatique ...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/error_handlers/exception.ml
ocaml
* * exception.ml * openkappa * , projet Abstraction , INRIA Paris - Rocquencourt * * Creation : 08/03/2010 * Last modification : Time - stamp : < Aug 15 2016 > * * * This library declares exceptions * * Copyright 2010 Institut National de Recherche en Informatique et * en Automatique ...
9a20079dac06524349d69172992f5b1a7ed6e06840c9ba7b51245b856b759e12
biocaml/biocaml
rSet.ml
type t = Range.t list (* retained in canonical form *) type range = Range.t let empty = [] let size t = List.fold_left ~f:(fun ans v -> ans + Range.size v) ~init:0 t let is_empty t = size t = 0 (* A canonical interval list is one in which adjacent intervals have gap between them and intervals retained in ascending or...
null
https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/rSet.ml
ocaml
retained in canonical form A canonical interval list is one in which adjacent intervals have gap between them and intervals retained in ascending order according to their coordinates. Order relation such that subset and after are larger. better implementation possible canoninicity could maybe be obtained simpl...
type range = Range.t let empty = [] let size t = List.fold_left ~f:(fun ans v -> ans + Range.size v) ~init:0 t let is_empty t = size t = 0 let rec is_canonical (vl : Range.t list) : bool = match vl with | [] | _ :: [] -> true | u :: (v :: _ as tail) -> u.Range.hi < v.Range.lo && is_canonical tail let to_canoni...
76b68db348a003d95b49b955a3dac0c8e075e7e0951e4eff599b726b9e45e2e3
athos/admin-kit
transit.cljc
(ns admin-kit.transit (:require [cognitect.transit :as transit])) (defrecord File [name content]) (defn file [name content-base64] (->File name content-base64)) (def write-handlers {File (transit/write-handler (constantly "admin-kit/file") #(into {} %))}) (def read-handlers {"admin-kit/file" (transit/read-h...
null
https://raw.githubusercontent.com/athos/admin-kit/0c18d85ea5c5d187a5712a9741e6c9cc776d3afb/src/cljc/admin_kit/transit.cljc
clojure
(ns admin-kit.transit (:require [cognitect.transit :as transit])) (defrecord File [name content]) (defn file [name content-base64] (->File name content-base64)) (def write-handlers {File (transit/write-handler (constantly "admin-kit/file") #(into {} %))}) (def read-handlers {"admin-kit/file" (transit/read-h...
74a4142ef36ce7ce78cdf1a27ed5f640f5dc24ac1e8bfc1a7dc6a6cff92c31e0
lep/jhcr
Auto.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE MultiWayIf #-} module Hot.Init.Auto (compile) where import Data.List import Data.String import Data.Function import qualified Data.Map as Map import qualified Data.Set as Set import Jass.Ast hiding (fmap, foldMap, traverse) import Hot.Var (Var, mkFn, mkLocal, mkOp) import qualif...
null
https://raw.githubusercontent.com/lep/jhcr/c38cbebec810481925412eb119395404dae326ea/Hot/Init/Auto.hs
haskell
# LANGUAGE GADTs # # LANGUAGE MultiWayIf # - This creates the _Auto_dummyFunction<n> and the _Auto_i2code - functions - This creates the _Auto_call_predefined function. - The _call_predefined function is used to call a native, blizzard-j - or otherwise defined function. This uses the in...
module Hot.Init.Auto (compile) where import Data.List import Data.String import Data.Function import qualified Data.Map as Map import qualified Data.Set as Set import Jass.Ast hiding (fmap, foldMap, traverse) import Hot.Var (Var, mkFn, mkLocal, mkOp) import qualified Hot.Var as H import qualified Hot.Types as Hot ...
a84f083ea23e1cfeeebd9dea639dad66ad80fa833fd5483b91500adae2941491
brianhempel/maniposynth
scope.ml
open Parsetree open Shared.Ast open Shared.Util (* Merge with Name.ml? *) (* Also searches in [@vis] attributes. *) let rec free_unqualified_names ?(fillings = Shared.Loc_map.empty) exp = let recurse = free_unqualified_names ~fillings in let free_unqualified_names_case { pc_lhs; pc_guard; pc_rhs } = List.diff...
null
https://raw.githubusercontent.com/brianhempel/maniposynth/1f6e54ed91d5306873e2f259c637eda891db3c1e/lib/scope.ml
ocaml
Merge with Name.ml? Also searches in [@vis] attributes. Any Ppat_open will make this wrong. Don't use them. Mapping is top-down, rather than bottom-up. Non-recursive Only handles single name pats for now, not as-pats.
open Parsetree open Shared.Ast open Shared.Util let rec free_unqualified_names ?(fillings = Shared.Loc_map.empty) exp = let recurse = free_unqualified_names ~fillings in let free_unqualified_names_case { pc_lhs; pc_guard; pc_rhs } = List.diff (free_unqualified_names_pat pc_lhs @ (pc_guard |>& recurse ||...
fa473577af4a1ea6dcfbcbf5ef12f4815b87b83b99eb8132e858a057d82e42d3
gafiatulin/codewars
Fibonacci.hs
-- Memoized Fibonacci -- / module Fibonacci where fibonacci :: Int -> Integer fibonacci = (map fib [0 ..] !!) where fib 0 = 0 fib 1 = 1 fib n = fibonacci (n-2) + fibonacci (n-1)
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Fibonacci.hs
haskell
Memoized Fibonacci /
module Fibonacci where fibonacci :: Int -> Integer fibonacci = (map fib [0 ..] !!) where fib 0 = 0 fib 1 = 1 fib n = fibonacci (n-2) + fibonacci (n-1)
794ea275fb3cecd8664eb87dd80924989cb343fda07bf2d854d94e69d1e59564
frex-project/metaocaml-frex
abelian_groups.ml
open Algebra open Aux module Aux'(A : CMONOID) = struct include A let (<*>) n a = match n with n when n < 0 -> raise (Invalid_argument "passed a negative integer") | 0 -> A.zero | n -> let rec sum n acc = match n with | 1 -> acc | n -> sum (n - 1) (acc <+> a) ...
null
https://raw.githubusercontent.com/frex-project/metaocaml-frex/e249551a41bd6a8af1a95d77bf9946822a19e3b0/lib/abelian_groups.ml
ocaml
open Algebra open Aux module Aux'(A : CMONOID) = struct include A let (<*>) n a = match n with n when n < 0 -> raise (Invalid_argument "passed a negative integer") | 0 -> A.zero | n -> let rec sum n acc = match n with | 1 -> acc | n -> sum (n - 1) (acc <+> a) ...
4de3d94fbde83722d088db15b46968789fea41686a8adc76b38dd426cac317bd
onaio/milia
charts.cljc
(ns milia.api.charts (:refer-clojure :exclude [get]) (:require #?@(:cljs [[goog.string :as gstring] [milia.api.http :refer [parse-http]] [milia.utils.remote :refer [make-url]]] :clj [[milia.api.http :refer [parse-http]] [milia.utils...
null
https://raw.githubusercontent.com/onaio/milia/e6a5b3456167523f0a6d842e52b29f8e6ad37121/src/milia/api/charts.cljc
clojure
(ns milia.api.charts (:refer-clojure :exclude [get]) (:require #?@(:cljs [[goog.string :as gstring] [milia.api.http :refer [parse-http]] [milia.utils.remote :refer [make-url]]] :clj [[milia.api.http :refer [parse-http]] [milia.utils...
2a851ad1b56297c44a2519bda21d2a012a6f61624117487fdb88bed2683f77b1
andersfugmann/aws-s3
io.ml
open Lwt.Infix module Deferred = struct type 'a t = 'a Lwt.t module Or_error = struct type nonrec 'a t = ('a, exn) Lwt_result.t let return = Lwt_result.return let fail = Lwt_result.fail let catch : (unit -> 'a t) -> 'a t = fun f -> Lwt.catch f Lwt_result.fail let (>>=) a b = a >>= ...
null
https://raw.githubusercontent.com/andersfugmann/aws-s3/77283ca25008b07ee85e6512cc0d842b80671819/aws-s3-lwt/io.ml
ocaml
If the writer is closed, so is the reader Lwt_io.input_channel We close input and output when input is closed
open Lwt.Infix module Deferred = struct type 'a t = 'a Lwt.t module Or_error = struct type nonrec 'a t = ('a, exn) Lwt_result.t let return = Lwt_result.return let fail = Lwt_result.fail let catch : (unit -> 'a t) -> 'a t = fun f -> Lwt.catch f Lwt_result.fail let (>>=) a b = a >>= ...
dbf67a54712b77e78313aad913d2951dc50b5b53138ed1421e477533ae3d99d9
emiflake/Advent-of-Code-2019
Core.hs
module Language.IntCode.Core where import Data . Vector ( Vector ) import qualified Data . Vector as import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import Control.Lens | Memory of the IntCode computer is represented as a Vector -- | It is also the code of the computer. type Me...
null
https://raw.githubusercontent.com/emiflake/Advent-of-Code-2019/f48328c223ea51288523cb616f8e7a01a603b223/Day13/haskell/src/Language/IntCode/Core.hs
haskell
| It is also the code of the computer. | An instruction's parameter ^ Immediate ^ Reference ^ Relative | An IntCode:tm: instruction ^ Halts the computer ^ Reads from input to a location ^ Writes to output ^ Adjusts the base value | Read an IntCode instruction from memory directly ^ Address to read at ^...
module Language.IntCode.Core where import Data . Vector ( Vector ) import qualified Data . Vector as import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import Control.Lens | Memory of the IntCode computer is represented as a Vector type Memory = IntMap Integer derivin...
3c1cac67f76f7e2afb62f12e4fa20483c63a84a139c219913565fc5de13e4159
Ramarren/unit-formula
unit-query.lisp
;; unit-formulas - library for unit checked formula definitions Copyright ( C ) 2008 ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , ...
null
https://raw.githubusercontent.com/Ramarren/unit-formula/f80d5c36219501acd9fbaba0f7b5fb72295cedb6/unit-query.lisp
lisp
unit-formulas - library for unit checked formula definitions This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; w...
Copyright ( C ) 2008 it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA (in-package :unit-formulas) (defparameter *quantit...
665e126ec858d5a2efb6f7cc8eefb67b19e3f913c07d6abfbb5a560e482f44a6
fccm/glMLite
texgen.ml
Copyright ( c ) 1993 - 1997 , Silicon Graphics , Inc. * ALL RIGHTS RESERVED * Permission to use , copy , modify , and distribute this software for * any purpose and without fee is hereby granted , provided that the above * copyright notice appear in all copies and that both the copyright notice * and t...
null
https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/RedBook-Samples/texgen.ml
ocaml
texgen.ml * This program draws a texture mapped teapot with * automatically generated texture coordinates. The * texture is rendered as stripes on the teapot. * Initially, the object is drawn with texture coordinates * based upon the object coordinates of the vertex * and distance from the plane x = 0. ...
Copyright ( c ) 1993 - 1997 , Silicon Graphics , Inc. * ALL RIGHTS RESERVED * Permission to use , copy , modify , and distribute this software for * any purpose and without fee is hereby granted , provided that the above * copyright notice appear in all copies and that both the copyright notice * and t...
b52da77d02ff90d831cea2da80913c14804ffcbdd8f843d01be9351ae244077a
cark/cark.behavior-tree
send_event.cljc
(ns cark.behavior-tree.node-defs.send-event "The :send-event node sends an event to the outside world. It may later be picked buy their core/get-events function. parameters: - :event : a keyword or keyword returning function. The event name. - :arg : an optional function returning the for this event" (:requ...
null
https://raw.githubusercontent.com/cark/cark.behavior-tree/4e229fcc2ed3af3c66e74d2c51dda6684927d254/src/main/cark/behavior_tree/node_defs/send_event.cljc
clojure
TODO : direct value ?
(ns cark.behavior-tree.node-defs.send-event "The :send-event node sends an event to the outside world. It may later be picked buy their core/get-events function. parameters: - :event : a keyword or keyword returning function. The event name. - :arg : an optional function returning the for this event" (:requ...
0a45036be2cb884b8fbc169741698fb15dc4de958c065c1d9f21e710636aabd5
corneliuhoffman/spatchcoqocaml
processinputs.mli
val replacelist : string -> (string * string) list -> string * replacelist str [ ( a1,b1 ) ; ( a2,b2 ) .... ] replaces ai by bi in str val cleanstr : string -> string (** replaces empty spaces *) val cleanforsearch : string -> string (** replaces empty spaces and "" *) val makevar : string -> string * makes the tactic ...
null
https://raw.githubusercontent.com/corneliuhoffman/spatchcoqocaml/1c3416a32199a3bd5c601526783be61e71be61a9/processinputs.mli
ocaml
* replaces empty spaces * replaces empty spaces and "" * creates a regular expression from a makevar string * check if the commands is a valid tactic * find the details of the tactic * gets the variables in the c=tcatic * replaces > and such * gets the text of theorem
val replacelist : string -> (string * string) list -> string * replacelist str [ ( a1,b1 ) ; ( a2,b2 ) .... ] replaces ai by bi in str val cleanstr : string -> string val cleanforsearch : string -> string val makevar : string -> string * makes the tactic notation into a string with VAR 's val makeregexp : string -> Pcr...
b2ed25a736db5614eff0cb3886ef8fcd215c36f8ffbec9c5f070ba24081333a1
the-dr-lazy/cascade
Server.hs
| Module : Cascade . Api . Network . Server Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION ! ! ...
null
https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Network/Server.hs
haskell
| Module : Cascade . Api . Network . Server Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION ! ! ...
0b8e4359336d9ae4fb100de404938eae5a179bb3480a2b6169debc9775965aaf
kingcons/clones
clones.lisp
(in-package :cl-user) (defpackage clones (:use :cl)) (in-package :clones) ;; blah blah blah.
null
https://raw.githubusercontent.com/kingcons/clones/a2f7d84ad6a12c0a33b50a453a377a1fb9e3afac/src/clones.lisp
lisp
blah blah blah.
(in-package :cl-user) (defpackage clones (:use :cl)) (in-package :clones)
6acdacedb1f7a964fea2ef3d14b01a75ea656bf025adc939297501082b711edc
ChrisTitusTech/gimphelp
210_create-new_text-balloon.scm
; 210_crerate-new_text-balloon.scm last modified / tested by [ gimphelp.org ] 05/11/2019 on GIMP 2.10.10 ;================================================== ; ; Installation: ; This script should be placed in the user or system-wide script folder. ; ; Windows 7/10 C:\Program Files\GIMP 2\share\gimp\2.0\scripts ...
null
https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_create-new_text-balloon.scm
scheme
210_crerate-new_text-balloon.scm ================================================== Installation: This script should be placed in the user or system-wide script folder. Windows 7/10 or Linux /home/yourname/.config/GIMP/2.10/scripts or Linux system-wide /usr/share/gimp/2.0/scripts =================...
last modified / tested by [ gimphelp.org ] 05/11/2019 on GIMP 2.10.10 C:\Program Files\GIMP 2\share\gimp\2.0\scripts C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Lice...
3d8b1b59e381734317351bf4d66a32561fc55b7c693c221bab596742ef077bc0
rbuchmann/samak
editor.cljs
(ns ui.editor (:require [ui.components :as ui] [ui.transitions :as t] [ui.modes :as m] [reagent.core :as r] [ui.components.graph-view :as graph] [ui.transitions :as transitions])) (defn root [state ...
null
https://raw.githubusercontent.com/rbuchmann/samak/ab98d1a180ee02c6cd784962b3c03e473a6d481b/ui_src/ui/editor.cljs
clojure
(ns ui.editor (:require [ui.components :as ui] [ui.transitions :as t] [ui.modes :as m] [reagent.core :as r] [ui.components.graph-view :as graph] [ui.transitions :as transitions])) (defn root [state ...
83291ef1cd0ae47f6445a27f68638821b3e73bc081b3d5face6dd060137160e3
well-typed-lightbulbs/ocaml-esp32
translcore.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/lambda/translcore.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Asttypes open Primitive open Types open Typedtree open Typeopt open Lambda type error = ...
eb0ea0f2ae8e9444076c25a7fbc339c130441e5b97e2fffa8cbc0269ca9e7834
andrewzhurov/brawl-haus
events.cljs
(ns brawl-haus.fit.events (:require [brawl-haus.utils :refer [l]] [brawl-haus.fit.state :as state] [brawl-haus.fit.utils :as u] [brawl-haus.fit.player :as player] [brawl-haus.fit.mnemo :as mnemo] [brawl-haus.fit.entities :as entities])) (defn add-evt [{:key...
null
https://raw.githubusercontent.com/andrewzhurov/brawl-haus/7f560c3dcee7b242fda545d87c102471fdb21888/src/cljs/brawl_haus/fit/events.cljs
clojure
CONTROLS Controls
(ns brawl-haus.fit.events (:require [brawl-haus.utils :refer [l]] [brawl-haus.fit.state :as state] [brawl-haus.fit.utils :as u] [brawl-haus.fit.player :as player] [brawl-haus.fit.mnemo :as mnemo] [brawl-haus.fit.entities :as entities])) (defn add-evt [{:key...
d547a2a4b02dcf2b30459e91979971553c8ce04c40c4d949d6b63e35c6764fed
kupl/LearnML
original.ml
type nat = ZERO | SUCC of nat let rec natadd (n1 : nat) (n2 : nat) : nat = match (n1, n2) with | ZERO, ZERO -> ZERO | SUCC n1', ZERO -> SUCC (natadd n1' n2) | ZERO, SUCC n2' -> SUCC (natadd n1 n2') | SUCC n1', SUCC n2' -> SUCC (natadd n1' n2) let rec natmul (n1 : nat) (n2 : nat) : nat = match (n1, n2) wi...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub5/original.ml
ocaml
type nat = ZERO | SUCC of nat let rec natadd (n1 : nat) (n2 : nat) : nat = match (n1, n2) with | ZERO, ZERO -> ZERO | SUCC n1', ZERO -> SUCC (natadd n1' n2) | ZERO, SUCC n2' -> SUCC (natadd n1 n2') | SUCC n1', SUCC n2' -> SUCC (natadd n1' n2) let rec natmul (n1 : nat) (n2 : nat) : nat = match (n1, n2) wi...
49d9623396bc3ee1740a68a7af027323950991985fea62ae5c0d4f5ff4a73414
janestreet/expect_test_helpers_core
test_expect_test_helpers_base.ml
open! Base open! Stdio open! Expect_test_helpers_base let%expect_test "[am_running_expect_test] and [assert_am_running_expect_test] when true" = require [%here] (am_running_expect_test ()); assert_am_running_expect_test [%here]; [%expect {| |}] ;; let%test_unit "[am_running_expect_test] and [assert_am_running_e...
null
https://raw.githubusercontent.com/janestreet/expect_test_helpers_core/0ce02bc504deb85638ceeaa041b8072f2a157c5e/expect_test_helpers_base/test/test_expect_test_helpers_base.ml
ocaml
It's silly to print the [None], but it doesn't seem worth special-casing. conversion works for all int64s conversion fails to round-trip for some int64s conversion raises for some int64s error message varies by platform, so we normalize it successful round-trip unsuccessful round-trip conversion raises
open! Base open! Stdio open! Expect_test_helpers_base let%expect_test "[am_running_expect_test] and [assert_am_running_expect_test] when true" = require [%here] (am_running_expect_test ()); assert_am_running_expect_test [%here]; [%expect {| |}] ;; let%test_unit "[am_running_expect_test] and [assert_am_running_e...
d8d99adb9f8355d2f188b851e66aaae55e254346e439cdc688e1ed131dd07104
dktr0/estuary
Definition.hs
# LANGUAGE DeriveGeneric # module Estuary.Types.Definition where import Data.Maybe (mapMaybe) import qualified Data.Map as M import qualified Data.IntMap.Strict as IntMap import Data.Text (Text) import GHC.Generics import Data.Aeson import Data.Time import Data.Sequence import Estuary.Tidal.Types impo...
null
https://raw.githubusercontent.com/dktr0/estuary/378dc4551860bd5125b65fd6c16abe58a0d6cdfc/common/src/Estuary/Types/Definition.hs
haskell
target target and start time
# LANGUAGE DeriveGeneric # module Estuary.Types.Definition where import Data.Maybe (mapMaybe) import qualified Data.Map as M import qualified Data.IntMap.Strict as IntMap import Data.Text (Text) import GHC.Generics import Data.Aeson import Data.Time import Data.Sequence import Estuary.Tidal.Types impo...
f648dc8f853836ae65fb14ff172688dbf59fc77d33207016040670b817d8c541
avsm/platform
element_content.ml
TyXML * * Copyright ( C ) 2016 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your op...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/ppx/element_content.ml
ocaml
Helpers. Given a parse tree [e], if [e] represents [_.txt s], where [s] is a string constant, evaluates to [Some s]. Otherwise, evaluates to [None]. * Test if the expression is a txt containing only whitespaces. Given a list of parse trees representing children of an element, filters out all children that c...
TyXML * * Copyright ( C ) 2016 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your op...
d97212d2b8dbd1b8454163b9de801204ef025c692708b762f45ebbfe96c4391a
sile/rafte
rafte_rpc.erl
Copyright ( c ) 2015 , < > %% @doc TODO -module(rafte_rpc). %%---------------------------------------------------------------------------------------------------------------------- %% Exported API %%-----------------------------------------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/sile/rafte/9392d25d0c5e41738af3e02065cfa7504c8d3bd5/src/rafte_rpc.erl
erlang
---------------------------------------------------------------------------------------------------------------------- Exported API ---------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------...
Copyright ( c ) 2015 , < > @doc TODO -module(rafte_rpc). -export([ request_vote/5, append_entries/2, append_entries/3, reply/2 ]). -export_type([ from/0, append_entries_arg/0 ]). -type from() :: {pid(), reference(), atom()}. ...
dd0eb36cdd3489d6ac1f0e5f6e0440f1511637d1257d820cce4312c776343310
sellout/haskerwaul
Automorphism.hs
module Haskerwaul.Automorphism ( module Haskerwaul.Automorphism -- * extended modules , module Haskerwaul.Isomorphism ) where import Haskerwaul.Isomorphism -- | [nLab]() type Automorphism c a = Isomorphism c a a -- | [nLab]() involution :: a `c` a -> Automorphism c a involution f = Iso f f
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Automorphism.hs
haskell
* extended modules | [nLab]() | [nLab]()
module Haskerwaul.Automorphism ( module Haskerwaul.Automorphism , module Haskerwaul.Isomorphism ) where import Haskerwaul.Isomorphism type Automorphism c a = Isomorphism c a a involution :: a `c` a -> Automorphism c a involution f = Iso f f
ef49df86577638b8be4fdfbfaf529610aa792fdc2b9075cdf367ac7d221665e7
sionescu/swap-bytes
sbcl.lisp
;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (in-package :swap-bytes) (defun swap-bytes-16 (integer) (declare (type (unsigned-byte 16) integer)) (swap-bytes-16 integer)) (defun swap-bytes-32 (integer) (declare (type (unsigned-byte 32) integer)) (swap-bytes-32 integer)) #+x86 (defun swap-bytes-64 (integer) ...
null
https://raw.githubusercontent.com/sionescu/swap-bytes/253ab928b91b8a1c3cea0434e87b8da5ce3c6014/sbcl.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*-
(in-package :swap-bytes) (defun swap-bytes-16 (integer) (declare (type (unsigned-byte 16) integer)) (swap-bytes-16 integer)) (defun swap-bytes-32 (integer) (declare (type (unsigned-byte 32) integer)) (swap-bytes-32 integer)) #+x86 (defun swap-bytes-64 (integer) (declare (type (unsigned-byte 64) integer) ...
d2acd1738d223b8eb178365f4e69a4eb726e4d7acf9921aac9fe88c6c7c09db5
toyokumo/kintone-client
url.cljc
MIT License ; Copyright ( c ) 2017 ayato - p ; ;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,...
null
https://raw.githubusercontent.com/toyokumo/kintone-client/32cf5abec1efa6d7ed5f33cf889535863358875b/src/kintone_client/url.cljc
clojure
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, distribute, sublicense, and/or sell furnished to...
MIT License Copyright ( c ) 2017 ayato - p copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , OR...
2882065cb9b3572541e1f86eaca14fa160f4e1909e89d28741074925654a4be7
binaryage/chromex
management.cljs
(ns chromex.app.management (:require-macros [chromex.app.management :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-all* [config] (gen-wrap :function ::get-all config)) (defn g...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/management.cljs
clojure
-- events -----------------------------------------------------------------------------------------------------------------
(ns chromex.app.management (:require-macros [chromex.app.management :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-all* [config] (gen-wrap :function ::get-all config)) (defn g...
1d491e7be6754c8cedea24c9d81a3a69865449bc456cf8616e74d9f6ee441cdb
nammayatri/beckn-gateway
Callback.hs
Copyright 2022 - 23 , Juspay India Pvt Ltd This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ...
null
https://raw.githubusercontent.com/nammayatri/beckn-gateway/dcdadbb647a3049d62df283d35ae61eb5420d50e/app/gateway/src/Types/Beckn/API/Callback.hs
haskell
Copyright 2022 - 23 , Juspay India Pvt Ltd This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ...
41462ca25251e1db7cef3d63453a86803b11017e038c110ad1d5d6a1351ab92f
MedeaMelana/Zwaluw
Core.hs
# LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # module Web.Zwaluw.Core ( -- * Types Router(..), (:-)(..), (.~) -- * Running routers , parse, unparse , parse1, unparse1 , xmap, pure, lit, xmaph , hhead, htail, hdMap, hdTraverse, pop, arg , val, duck, d...
null
https://raw.githubusercontent.com/MedeaMelana/Zwaluw/cbbdfe0ef40d599ecefdd221a478aef5e1255e5c/Web/Zwaluw/Core.hs
haskell
* Types * Running routers And it takes a @b@ to serialize to a URL and results in @a@ if serializing succeeds. | Reverse composition, but with the side effects still in left-to-right order. | Map over routers. | Lift a constructor-destructor pair to a pure router. | Routes a constant string. | A stack datatyp...
# LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # module Web.Zwaluw.Core ( Router(..), (:-)(..), (.~) , parse, unparse , parse1, unparse1 , xmap, pure, lit, xmaph , hhead, htail, hdMap, hdTraverse, pop, arg , val, duck, duck1, printAs ) where import Prelude ...
c0e911579d85eeef00182f8779f57fdef17a734744e1ad5792a708db07680888
ghc/packages-Cabal
Setup.hs
import Module (message) import Distribution.Simple main = putStrLn ("Setup.hs: " ++ message) >> defaultMain
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/pkg/Setup.hs
haskell
import Module (message) import Distribution.Simple main = putStrLn ("Setup.hs: " ++ message) >> defaultMain
58175bb589bc65f03811b81f6b4718a9d7950bca34a2b727a719ecf66be80e08
parsonsmatt/gear-tracker
Bike.hs
-- | A 'Bike' is a special case of a 'Component' - you can think of it as -- a top-level equipment configuration that specifies a number of other -- component options as well. module GT.DB.Schema.Bike where import GT.DB.Prelude import GT.DB.Schema.Component mkModel $(loadModel "Bike")
null
https://raw.githubusercontent.com/parsonsmatt/gear-tracker/b7a597b32322e8938192a443572e6735219ce8ff/src/GT/DB/Schema/Bike.hs
haskell
| A 'Bike' is a special case of a 'Component' - you can think of it as a top-level equipment configuration that specifies a number of other component options as well.
module GT.DB.Schema.Bike where import GT.DB.Prelude import GT.DB.Schema.Component mkModel $(loadModel "Bike")
2383fdd4969ca2f5bd4e84ea2f06bd38b4ff00f159eb6a3c80778c5ba2cf8254
janestreet/memtrace_viewer
fragment_trie.mli
(* this space intentionally left blank *)
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/test/common/fragment_trie.mli
ocaml
this space intentionally left blank
d92792ffeb187ed72633c2ad91b1dd5e7088049b69675e31dc913eb24da01e5d
jackfirth/rebellion
bit.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [bit? predicate/c] [bit->boolean (-> bit? boolean?)] [boolean->bit (-> boolean? bit?)])) (module+ test (require (submod "..") rackunit rebellion/private/static-name)) ;@--------------------------------------------...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/binary/bit.rkt
racket
@------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide (contract-out [bit? predicate/c] [bit->boolean (-> bit? boolean?)] [boolean->bit (-> boolean? bit?)])) (module+ test (require (submod "..") rackunit rebellion/private/static-name)) (define (bit? v) (or (zero? v) (equal? v 1)))...
541935efd965485463187ced321b7072716ea42d89eb6e75190ce4b4152d71e7
TDacik/Deadlock
monomorphic_map.mli
Signature of map without type . * * The purpose of this signature is to be included in monomorphic maps that defines type " t " * that can not be later overwrite by origincal Map . S signature . * * Author : ( ) , 2021 * * The purpose of this signature is to be included in monomorphic maps that...
null
https://raw.githubusercontent.com/TDacik/Deadlock/b69d47be037d4d7f90bce63dffbe82f306498a7a/src/utils/monomorphic_map.mli
ocaml
Type for keys Type for stored values Polymorphic map
Signature of map without type . * * The purpose of this signature is to be included in monomorphic maps that defines type " t " * that can not be later overwrite by origincal Map . S signature . * * Author : ( ) , 2021 * * The purpose of this signature is to be included in monomorphic maps that...
d1499fa99a28684a9d377a8e8f99ebb87c44d6fb9a84c6cea5c23578b6138294
SchornacklabSLCU/amfinder
uILayers.mli
AMFinder - ui / uILayers.mli * * MIT License * Copyright ( c ) 2021 * * 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 l...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/ui/uILayers.mli
ocaml
* Indicates which layer is currently active. * Updates the counter of the given annotation. * Sets a callback function to call when a button is toggled. The callback * function will be applied to all tool buttons. * Generator.
AMFinder - ui / uILayers.mli * * MIT License * Copyright ( c ) 2021 * * 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 l...
a6fcd824962957a23f16d32e2b158f024b852b5e9012fbb078bbd07185bb7c5d
palf/haskell-sdl2-examples
Common.hs
module Common where import qualified SDL import qualified SDL.Image import Control.Monad (void) import Control.Monad.IO.Class (MonadIO) import Data.Text (Text) import SDL (($=)) withSDL :: (MonadIO m) => m a -> m () withSDL op = do SDL.initialize [] void op SDL.quit withSDLImage :: (M...
null
https://raw.githubusercontent.com/palf/haskell-sdl2-examples/3b4af6eea5ed362ec7941331449ac64c8f31009e/common/lib/Common.hs
haskell
module Common where import qualified SDL import qualified SDL.Image import Control.Monad (void) import Control.Monad.IO.Class (MonadIO) import Data.Text (Text) import SDL (($=)) withSDL :: (MonadIO m) => m a -> m () withSDL op = do SDL.initialize [] void op SDL.quit withSDLImage :: (M...
f59250786f65c668a8340682b2bef2995444acf5d36db52d43b2b997a9bf954a
jonludlam/js_top_worker
rpc.ml
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc. * Copyright ( c ) 2006 - 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copi...
null
https://raw.githubusercontent.com/jonludlam/js_top_worker/efe16a688e1609c2687bf36402edf266bda48afd/idl/rpc.ml
ocaml
A type definition has a name and description Lenses is_notification is to be set as true only if the call was a notification
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc. * Copyright ( c ) 2006 - 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copi...
7f2b640a57439960c89e9ea8a9951f2bdf66880fedc2139ccfb5c77de4c37720
janestreet/bonsai
style.ml
open! Core open! Bonsai_web include [%css stylesheet {| html, body, .app { background:rgb(250, 250, 250); } * { box-sizing: border-box; } .app { padding:1em; font-size:20px; font-family: sans-serif; display: flex; align-items: flex-start; } .row { display:fle...
null
https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/examples/node_with_map_children/style.ml
ocaml
open! Core open! Bonsai_web include [%css stylesheet {| html, body, .app { background:rgb(250, 250, 250); } * { box-sizing: border-box; } .app { padding:1em; font-size:20px; font-family: sans-serif; display: flex; align-items: flex-start; } .row { display:fle...
9239069242e1403b502bf03c4945f0a7b8059355e233d800823e2ef376401eb8
lucasdicioccio/deptrack
Monadic.hs
# LANGUAGE DeriveFunctor # # LANGUAGE TupleSections # {-# LANGUAGE BangPatterns #-} module Deptrack.Monadic ( DepTrack -- basic building blocks , rec, nest, value , evalTree , drawDeps -- graph-representation , GraphWithLookupFunctions , evalGraph -- re-export applicative , module Control.Applica...
null
https://raw.githubusercontent.com/lucasdicioccio/deptrack/52a9e42d2c99edba7b3c0535903aea74f60b0bbc/src/Deptrack/Monadic.hs
haskell
# LANGUAGE BangPatterns # basic building blocks graph-representation re-export applicative | Dependency-tree building steps we can either push/pop dependency levels or record values. The `b` type parameter is the type of object we track when building the tree. TODO: move the recorded value after a "pop" in th...
# LANGUAGE DeriveFunctor # # LANGUAGE TupleSections # module Deptrack.Monadic ( DepTrack , rec, nest, value , evalTree , drawDeps , GraphWithLookupFunctions , evalGraph , module Control.Applicative ) where import Control.Monad.Free (Free (..), liftF) import Control.Applicative ((<$>), (<*), (*>), (<...
ee9a8ab3b1b22c64cdbe54cbfe78d58d3be59d59729e9db151879d5a1e9910ed
pingles/clj-hector
time.clj
(ns clj-hector.test.time (:import [java.util UUID] [org.joda.time Instant DateTime]) (:use [clojure.test] [clj-hector.time] :reload)) (defn close-enough? [a b] (< (Math/abs (- a b)) 500)) (deftest time-as-uuid (let [now (uuid-now) now-date (java.util.Date. )] (is (= now (...
null
https://raw.githubusercontent.com/pingles/clj-hector/020239c4148b21898a57830ef1696e6ca27a266c/test/clj_hector/test/time.clj
clojure
(ns clj-hector.test.time (:import [java.util UUID] [org.joda.time Instant DateTime]) (:use [clojure.test] [clj-hector.time] :reload)) (defn close-enough? [a b] (< (Math/abs (- a b)) 500)) (deftest time-as-uuid (let [now (uuid-now) now-date (java.util.Date. )] (is (= now (...
0df120c496bc25e91439c1cbb4de377478c4d994bc0bf7d7483483dd75fd0665
conjure-cp/conjure
CategoryOf.hs
module Conjure.Language.CategoryOf ( Category(..) , categoryOf , categoryChecking , initInfo_Lettings ) where -- conjure import Conjure.Prelude import Conjure.UserError import Conjure.Language.Definition import Conjure.Language.Domain import Conjure.Language.Pretty data Category = CatBottom | Cat...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/CategoryOf.hs
haskell
conjure TODO: the following should check for which variable we quantify over Run only after name resolution. only if this is a new error
module Conjure.Language.CategoryOf ( Category(..) , categoryOf , categoryChecking , initInfo_Lettings ) where import Conjure.Prelude import Conjure.UserError import Conjure.Language.Definition import Conjure.Language.Domain import Conjure.Language.Pretty data Category = CatBottom | CatConstant | ...
5df90663ec852856e41f559020f7ffacf708073b57e98be7a9b9348eb2fb5f0f
squest/clojure-tutorial
recprot.clj
(ns pratwo.intermediate.recprot) (defprotocol ICall (name-calling [this]) (status [this]) (say-something [this remark])) (defprotocol GetScore (score [this]) (increase [this change])) (defrecord Person [nama age score status] ICall (name-calling [this] (get this :nama)) (status [this] (get th...
null
https://raw.githubusercontent.com/squest/clojure-tutorial/5cf97832cb226928f63f043a56328c9a79c4a321/pratwo/src/pratwo/intermediate/recprot.clj
clojure
(ns pratwo.intermediate.recprot) (defprotocol ICall (name-calling [this]) (status [this]) (say-something [this remark])) (defprotocol GetScore (score [this]) (increase [this change])) (defrecord Person [nama age score status] ICall (name-calling [this] (get this :nama)) (status [this] (get th...
da294e24ce34a34ff763c81f79f6f4de6f6026eaa295c7d51cf1e354a914101a
jinwoo/cl-ui
package.lisp
(defpackage #:control-gallery (:use #:cl))
null
https://raw.githubusercontent.com/jinwoo/cl-ui/0fe3247554b3eae59ef5ec9a157d6cdce0df83ef/examples/control-gallery/package.lisp
lisp
(defpackage #:control-gallery (:use #:cl))
abbef2586d39963d18fa1bad7d194c42f0fbcb10968dbeb5f63cc9416fa3a067
EmileTrotignon/embedded_ocaml_templates
lexer.mli
type error = [`Unmatched_tag of Lexing.position] type 'a or_error = ('a, error) result val elt' : Sedlexing.lexbuf -> Template.elt' or_error option * None means ` EOF ` was reached val template : Sedlexing.lexbuf -> Template.t or_error val pp_error : Format.formatter -> error -> unit
null
https://raw.githubusercontent.com/EmileTrotignon/embedded_ocaml_templates/2baf51d1b07db050fe535615018864e7e850ce38/src/common/lexer.mli
ocaml
type error = [`Unmatched_tag of Lexing.position] type 'a or_error = ('a, error) result val elt' : Sedlexing.lexbuf -> Template.elt' or_error option * None means ` EOF ` was reached val template : Sedlexing.lexbuf -> Template.t or_error val pp_error : Format.formatter -> error -> unit
7c28c17bfffa57481f43e355ac6c0591c3541da630c2cbd07adc3d4d07b978f1
nvim-treesitter/nvim-treesitter
folds.scm
inherits : ecma [ (interface_declaration) (internal_module) (type_alias_declaration) ] @fold
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/typescript/folds.scm
scheme
inherits : ecma [ (interface_declaration) (internal_module) (type_alias_declaration) ] @fold
c089a464cd78d6cca3f59401af2075b4968f6071613b2b1476bfaf5d4cc2dbb9
jarvinet/scheme
section131.scm
Structure and Interpretation of Computer Programs , 1st edition ;------------------------------------------------------------- ; section 1.3.1 (define (cube x) (* x x x)) (define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (sum-cubes a b) (sum cube a 1+...
null
https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/Book/Edition1/section131.scm
scheme
------------------------------------------------------------- section 1.3.1 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- recursive: iterative: factorial pi approximation ------------------------------...
Structure and Interpretation of Computer Programs , 1st edition (define (cube x) (* x x x)) (define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (sum-cubes a b) (sum cube a 1+ b)) (define (pi-sum a b) (define (pi-term x) (/ 1 (* x (+ x 2)))) (de...
1a49749798a5a656e66bbb8697877afa8753a3ccc8e68aa3d7744f00c793cd6c
PDP-10/panda
sun.lsp
COPYRIGHT , 1977 ;;; Program to calculate sun - elevation and sun - azimuth . ;;; Given observers geographical position and time of observation. ;;; T = time in days since 1975/01/01 GMT 00:00:00 ;;; ;;; MEAN ANOMALY (M) = Geometric Mean Longitude - Mean Longitude of Perigee ;;; M = -2.4834 + .9...
null
https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/maclisp/sun.lsp
lisp
Given observers geographical position and time of observation. MEAN ANOMALY (M) = Geometric Mean Longitude - Mean Longitude of Perigee M = -2.4834 + .98560026 * T Mean Eccentricity e = .0l67343 ECCENTRIC ANOMALY (E) = Anomaly measured from focus of ellipse E + e sin(E) = M. Transcendental equati...
COPYRIGHT , 1977 Program to calculate sun - elevation and sun - azimuth . T = time in days since 1975/01/01 GMT 00:00:00 SQRT((1+e)/(1 - e ) ) = 1.016877 in the mean LONGITUDE OF EARTH PERIGEE ( G ) = 282.5103 + .00004707 * T TRUE = LONGITUDE OF PERIGEE + TRUE ANOMALY Position of MOON ...
1138ec601881563b5b32d33dd891d4757900f9323e20518c9fb12ba661dfd6e7
Autodesk-AutoCAD/AutoLispExt
unFormatted17.lsp
(defun c:flower( / R1 n1 n2 pt1 pt2 pt3 pt4 pt5) (princ "中文测试") (setq lst '("abc" nil nil 1 nil 10 nil 12)) (setq centerPt0 (getpoint "\n Please pick point in screen") R1 5 R2 (* 2 R1) R3 R1 n1 6 n2 12 2p (* 2 PI) ang (/ 360.0 n1) ang30 (* PI (/ 30 180.0)) ang60 (* PI (/ 6...
null
https://raw.githubusercontent.com/Autodesk-AutoCAD/AutoLispExt/b5323748a03286f01e987ef2c9d3aa9fdb32e7dd/extension/src/test/SourceFile/unFormatted17.lsp
lisp
(defun c:flower( / R1 n1 n2 pt1 pt2 pt3 pt4 pt5) (princ "中文测试") (setq lst '("abc" nil nil 1 nil 10 nil 12)) (setq centerPt0 (getpoint "\n Please pick point in screen") R1 5 R2 (* 2 R1) R3 R1 n1 6 n2 12 2p (* 2 PI) ang (/ 360.0 n1) ang30 (* PI (/ 30 180.0)) ang60 (* PI (/ 6...
056004b4f3a309da184a7ac5a1439059dbaf6b80968a21c7484941cd603c6f0c
ekmett/concurrent
MVar.hs
# LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # {-# LANGUAGE UnliftedFFITypes #-} # LANGUAGE GHCForeignImportPrim # # LANGUAGE ForeignFunctionInterface # module Concurrent.Primitive.MVar ( localTakeMVar ) where import GHC.IO import GHC.MVar import GHC.Prim foreign import prim "localTakeMVarzh" localTakeMVar# ::...
null
https://raw.githubusercontent.com/ekmett/concurrent/e22acb891890f412a7f16352836fdc4fb8de8936/src/Concurrent/Primitive/MVar.hs
haskell
# LANGUAGE UnliftedFFITypes #
# LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # # LANGUAGE GHCForeignImportPrim # # LANGUAGE ForeignFunctionInterface # module Concurrent.Primitive.MVar ( localTakeMVar ) where import GHC.IO import GHC.MVar import GHC.Prim foreign import prim "localTakeMVarzh" localTakeMVar# :: MVar# d a -> State# d -> (# State...
a71c97fae44d32216e672a11e3a7ae96cda8dbf973c2274399b382407646768b
triffon/fp-2022-23
02.selection-sort.rkt
#lang racket (require rackunit rackunit/text-ui) # # # Задача 2 ; Сортира списъка l по алгоритъма selection sort. (define (selection-sort l) 'тук) (run-tests (test-suite "selection-sort tests" (check-equal? (selection-sort '(5 1 2 6 3)) '(1 2 3 5 6)) (check-equal? (selection-sort '(5 1 2 1 6 3 2 2 6)) '(1...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/7778490adf231f7c5f1caf797c6e6c4f467e6329/exercises/cs2/05.scheme.fold-deeplists/02.selection-sort.rkt
racket
Сортира списъка l по алгоритъма selection sort.
#lang racket (require rackunit rackunit/text-ui) # # # Задача 2 (define (selection-sort l) 'тук) (run-tests (test-suite "selection-sort tests" (check-equal? (selection-sort '(5 1 2 6 3)) '(1 2 3 5 6)) (check-equal? (selection-sort '(5 1 2 1 6 3 2 2 6)) '(1 1 2 2 2 3 5 6 6))) 'verbose)
d8fda6971715cd099de78737cd8ca0f2b4f5f78abbbaf412d4ed24dc486b169f
andreasabel/Sit
Sit.hs
# LANGUAGE LambdaCase # module Sit (main, check, checkFile) where import System.Environment (getArgs) import System.Exit (exitFailure) import Control.Monad ((<=<)) import Data.Foldable import Sit.Abs import Sit.Lex import Sit.Par import Sit.Print import TypeChecker type Err = Either String -- | Type-check file g...
null
https://raw.githubusercontent.com/andreasabel/Sit/330c7d4582a2c602c7bf034670152ea57056dd40/src/Sit.hs
haskell
| Type-check file given by command line. | Handle error by failing hard. | Run the type checker on file given by path. | Run the type checker on text/contents of a file. forM_ decls $ \ d -> do putStrLn $ printTree d
# LANGUAGE LambdaCase # module Sit (main, check, checkFile) where import System.Environment (getArgs) import System.Exit (exitFailure) import Control.Monad ((<=<)) import Data.Foldable import Sit.Abs import Sit.Lex import Sit.Par import Sit.Print import TypeChecker type Err = Either String main :: IO () main = ...
d898d257690c856a62774cb135727a6f59dd009315c0a66b90f7f7f01ab6302a
hipsleek/hipsleek
mona.ml
#include "xdebug.cppo" 15 - 06 - 2006 15-06-2006 *) open Globals open VarGen open Gen open GlobProver open module CP = Cpure let set_prover_type () = Others.last_tp_used # set Others.Mona let is_mona_running = ref false let channels = ref ( stdin , stdout , stdin ) let last_test_number = ref 0 let test_...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/mona.ml
ocaml
pretty printing for primitive types same as for float lists are not supported | SLTyp ------------------------------------------ | MO_True | MO_False (order: int option) let new_c = mkMO_Var v1 order in new_c@ (None,[]) should return r so that the res...
#include "xdebug.cppo" 15 - 06 - 2006 15-06-2006 *) open Globals open VarGen open Gen open GlobProver open module CP = Cpure let set_prover_type () = Others.last_tp_used # set Others.Mona let is_mona_running = ref false let channels = ref ( stdin , stdout , stdin ) let last_test_number = ref 0 let test_...
59f6c0bef6a1599c05c6ac745f4048b52db64340657fc0b46da5256acde1a6b0
igorhvr/bedlam
format.scm
;;; "format.scm" Common LISP text output formatter for SLIB Written 1992 - 1994 by ( ) 2004 : made reentrant ; call slib : error for errors . ; ; This code is in the public domain. Authors of the original version ( < 1.4 ) were and . ; Please send error reports to the email address above. ; For document...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/format.scm
scheme
"format.scm" Common LISP text output formatter for SLIB call slib : error for errors . This code is in the public domain. Please send error reports to the email address above. For documentation see slib.texi and format.doc. For testing load formatst.scm. Configuration ------------------------------------------...
Written 1992 - 1994 by ( ) Authors of the original version ( < 1.4 ) were and . Version 3.0 (require 'string-case) (require 'string-port) (require 'multiarg/and-) (require 'rev4-optional-procedures) (require-if 'compiling 'pretty-print) (define format:symbol-case-conv #f) one arg closure which is eit...
bc4420b3e355da521297a38ad277464b37dbb27c0b1bea13f061051e252d44e2
naoiwata/sicp
ex3.51.scm
;; ;; @author naoiwata SICP Chapter3 Exercise 3.51 . ;; (add-load-path "./pages/" :relative) (load "stream.scm") ; ------------------------------------------------------------------------ ; question ; ------------------------------------------------------------------------ (define (show x) (display-line x) x...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.51.scm
scheme
@author naoiwata ------------------------------------------------------------------------ question ------------------------------------------------------------------------ ------------------------------------------------------------------------ solution ---------------------------------------------------------...
SICP Chapter3 Exercise 3.51 . (add-load-path "./pages/" :relative) (load "stream.scm") (define (show x) (display-line x) x) (define (stream-map proc . argstreams) (if (stream-null? (car argstreams)) the-empty-stream (cons-stream (apply proc (map stream-car argstreams)) (apply ...
d1f30272ca7b142a5cb537a7d28fca21d5dcca5e990dfe4639ffa4e987a17012
ska80/thinlisp
clos.lisp
(in-package "TLI") ;;;; Module CLOS Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1996 Gensym Corporation . ;;; All rights reserved. This file is part of ThinLisp . ThinLisp is open source ; you can redistribute it and/or modify it under the terms of the ThinLisp License as published by t...
null
https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tlt/lisp/clos.lisp
lisp
Module CLOS All rights reserved. you can redistribute it and/or modify it either version 1 or ( at your option ) any later version . WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. assumes that all classes that will be defined have already been defi...
(in-package "TLI") Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1996 Gensym Corporation . This file is part of ThinLisp . under the terms of the ThinLisp License as published by the ThinLisp ThinLisp is distributed in the hope that it will be useful , but For additional information s...
7039d7875caf40c9530b3139e522234349f61fbdf9aefcc3e5e5d20a39a09a69
input-output-hk/cardano-sl
Main.hs
module Main where import Universum import Test.Hspec import qualified Cardano.MnemonicSpec main :: IO () main = hspec $ do Cardano.MnemonicSpec.spec
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/mnemonic/test/Main.hs
haskell
module Main where import Universum import Test.Hspec import qualified Cardano.MnemonicSpec main :: IO () main = hspec $ do Cardano.MnemonicSpec.spec
64e3741da6542e17bbce1672f77c06824fc180b7d4818d1067ff301f3965db98
logicmoo/logicmoo_nlu
auxfns.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp -*- Code from Paradigms of AI Programming Copyright ( c ) 1991 ;;; File auxfns.lisp: Auxiliary functions used by all other programs ;;; Load this file before running any other programs. ;;;; Implementation-Specific Details (eval-when (eval compile load) ;; Make it ok t...
null
https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/e2c/paip/auxfns.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp -*- File auxfns.lisp: Auxiliary functions used by all other programs Load this file before running any other programs. Implementation-Specific Details Make it ok to place a function definition on a built-in LISP symbol. Don't warn if a function is defined in multiple files -- ...
Code from Paradigms of AI Programming Copyright ( c ) 1991 (eval-when (eval compile load) #+(or Allegro EXCL) (dolist (pkg '(excl common-lisp common-lisp-user)) (setf (excl:package-definition-lock (find-package pkg)) nil)) #+Lispworks (setq *PACKAGES-FOR-WARN-ON-REDEFINITION* nil) #+LCL (co...
ee81ac048d95a2c7ef42709f552fc256b124b93914ab05474f19ceb7935222f4
abyala/advent-2022-clojure
day05_test.clj
(ns advent-2022-clojure.day05-test (:require [clojure.test :refer :all] [advent-2022-clojure.day05 :refer :all])) (def test-data "") (def puzzle-data (slurp "resources/day05-puzzle.txt")) (deftest part1-test (is (= "SPFMVDTZT" (part1 puzzle-data)))) (deftest part2-test (is (= "ZFSJBPRFP" (part2 puz...
null
https://raw.githubusercontent.com/abyala/advent-2022-clojure/9038c2c52948a11e294a2b1e2c17facaf5213e70/test/advent_2022_clojure/day05_test.clj
clojure
(ns advent-2022-clojure.day05-test (:require [clojure.test :refer :all] [advent-2022-clojure.day05 :refer :all])) (def test-data "") (def puzzle-data (slurp "resources/day05-puzzle.txt")) (deftest part1-test (is (= "SPFMVDTZT" (part1 puzzle-data)))) (deftest part2-test (is (= "ZFSJBPRFP" (part2 puz...
095d06ed58fafe80655d818c49dfb3e290835725079a27e70b913a02176ff0ec
haskell-opengl/OpenGLRaw
TextureEnvCombine.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.TextureEnvCombine Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- --------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/TextureEnvCombine.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.EXT.TextureEnvCombine License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.EXT.TextureEnvCombine ( glGetEXTTextureEnvCombine, gl_EXT_texture_env_combine, pattern GL_ADD_SIGNED_EXT, pattern GL_COMBINE_ALPHA_EXT, pattern GL_COMBINE_EXT, pattern GL_COMBINE_RGB_EXT, pattern GL_...
dee717d1093444cb1236cc97a9269ee795fe0339fcc6a8ddede333b38b054087
clojerl/clojerl
erlang.Tuple.erl
-module('erlang.Tuple'). -include("clojerl.hrl"). -behavior('clojerl.ICounted'). -behavior('clojerl.IEncodeClojure'). -behavior('clojerl.IEquiv'). -behavior('clojerl.IHash'). -behavior('clojerl.ISequential'). -behavior('clojerl.IIndexed'). -behavior('clojerl.ISeqable'). -behavior('clojerl.IStringable'). -export([cou...
null
https://raw.githubusercontent.com/clojerl/clojerl/506000465581d6349659898dd5025fa259d5cf28/src/erl/erlang/erlang.Tuple.erl
erlang
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ clojerl.ICounted clojerl.IEquiv clojerl.IIndexed clojerl.IStringable
-module('erlang.Tuple'). -include("clojerl.hrl"). -behavior('clojerl.ICounted'). -behavior('clojerl.IEncodeClojure'). -behavior('clojerl.IEquiv'). -behavior('clojerl.IHash'). -behavior('clojerl.ISequential'). -behavior('clojerl.IIndexed'). -behavior('clojerl.ISeqable'). -behavior('clojerl.IStringable'). -export([cou...
abd1201904e206c356e5a62eda52739169a32def0b17ab1af95914d4a91ec9fb
digital-asset/ghc
tcrun019.hs
{-# LANGUAGE ImplicitParams, RankNTypes #-} GHC 5.02 got this one wrong . module Main where -- Implicit parameters bug 24 - Oct-2001 22:21:27 f :: (?x :: Int) => ((?x :: Int) => Int) -> Int -> Int f g y = if y == 0 then g else let ?x = ?x + 1 in f g (y - 1) h :: (?x :: Int) => Int...
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_run/tcrun019.hs
haskell
# LANGUAGE ImplicitParams, RankNTypes # Implicit parameters bug
GHC 5.02 got this one wrong . module Main where 24 - Oct-2001 22:21:27 f :: (?x :: Int) => ((?x :: Int) => Int) -> Int -> Int f g y = if y == 0 then g else let ?x = ?x + 1 in f g (y - 1) h :: (?x :: Int) => Int h = ?x main = print (let ?x = 0 in f h 10) The result should be 10 ...
2931ffa69fb940c7020d1cf8c7c62d120fb5b40445f11f446948c7ce62ab577b
lingnand/VIMonad
Config.hs
# OPTIONS_GHC -fno - warn - missing - signatures -fno - warn - orphans # # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | -- Module : XMonad.Config Copyright : ( c ) 2007 -- License : BSD3-style (see LICENSE) -- -- Maintainer : -- Stabil...
null
https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/xmonad/src/XMonad/Config.hs
haskell
--------------------------------------------------------------------------- | Module : XMonad.Config License : BSD3-style (see LICENSE) Maintainer : Stability : stable Portability : portable by providing your own @~\/.xmonad\/xmonad.hs@ that overrides specific fields in the default config, ...
# OPTIONS_GHC -fno - warn - missing - signatures -fno - warn - orphans # # LANGUAGE TypeFamilies # Copyright : ( c ) 2007 This module specifies the default configuration values for xmonad . DO NOT MODIFY THIS FILE ! It wo n't work . You may configure xmonad copy the @xmonad.hs@ found in the @man@ dir...
1afe91fcfc1b9fe648b1437e5a67bbfba311d47f264f934582a4b5be4045ff4d
egonSchiele/chips
Types.hs
# LANGUAGE TemplateHaskell , NoMonomorphismRestriction # module Chips.Types where import Chips.Imports data Direction = DirUp | DirDown | DirLeft | DirRight | Standing deriving (Show, Eq) opposite DirUp = DirDown opposite DirDown = DirUp opposite DirLeft = DirRight opposite DirRight = DirLeft data TilePos = Current |...
null
https://raw.githubusercontent.com/egonSchiele/chips/14bb957f9ad42fa05c5edc56e50b90fcde461a77/src/Chips/Types.hs
haskell
# LANGUAGE TemplateHaskell , NoMonomorphismRestriction # module Chips.Types where import Chips.Imports data Direction = DirUp | DirDown | DirLeft | DirRight | Standing deriving (Show, Eq) opposite DirUp = DirDown opposite DirDown = DirUp opposite DirLeft = DirRight opposite DirRight = DirLeft data TilePos = Current |...
473bbe8b1347679b0c8a758572f8df23750e98fa4e8497c8e46ecb10dfb449be
sunng87/stavka
dict.clj
(ns stavka.resolvers.dict (:require [stavka.protocols :as sp] [clojure.string :as str])) (defrecord DictionaryResolver [] sp/Resolver (resolve [this dict key] (let [key-path (str/split key #"\.")] (or (get-in dict key-path) (get-in dict (map keyword key-path))))) (initial-state ...
null
https://raw.githubusercontent.com/sunng87/stavka/0b0e23f24db1a535576eb5f9fb67c18abadca64d/src/stavka/resolvers/dict.clj
clojure
(ns stavka.resolvers.dict (:require [stavka.protocols :as sp] [clojure.string :as str])) (defrecord DictionaryResolver [] sp/Resolver (resolve [this dict key] (let [key-path (str/split key #"\.")] (or (get-in dict key-path) (get-in dict (map keyword key-path))))) (initial-state ...
7d7680cb156e723c5faf7ef7d3cc5dcb6e5ac0cff435cfc8b1697439ba143ad4
erlang/otp
socket_test_ttest_tcp_socket.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2018 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/otp/daccb908c6d46bef5b1129fac66e1cdacb5e0568/lib/kernel/test/socket_test_ttest_tcp_socket.erl
erlang
%CopyrightBegin% 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 l...
Copyright Ericsson AB 2018 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(socket_test_ttest_tcp_socket). -export([ accept/1, accept/2, active/2, close/1, connect/1, connect/...
d132203b4d1e278ff681a6e81eaa062c79b62507d2aee8d89c6107cc6ab8e265
sgbj/MaximaSharp
intl.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Package : INTL -*- $ Revision : 1.16 $ Copyright 1999 - 2010 ( ) ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining a copy of this Software to deal in the Software without restriction , ;;; including without limitation the rights t...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/intl.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : INTL -*- Permission is hereby granted, free of charge, to any person obtaining including without limitation the rights to use, copy, modify, merge, provided that the above copyright notice and this permission notice OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, T...
$ Revision : 1.16 $ Copyright 1999 - 2010 ( ) a copy of this Software to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , are included in all copies or substantial portio...
f883c3e72fafca49c1ae2e3f8aa693d2747abf992a27c55610df02f5b9b04ee6
charlieg/Sparser
loader.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1994,1995 -- all rights reserved ;;; ;;; File: "loader" ;;; Module: "objects;rules:DA:" Version : May 1995 initiated 10/27/94 v2.3 . Gave it substantial content 5/5/95 (in-package :sparser) (lload "rule objs;DA:obj...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/rules/DA/loader.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "loader" Module: "objects;rules:DA:"
copyright ( c ) 1994,1995 -- all rights reserved Version : May 1995 initiated 10/27/94 v2.3 . Gave it substantial content 5/5/95 (in-package :sparser) (lload "rule objs;DA:object") (lload "rule objs;DA:form") (lload "rule objs;DA:define") (lload "rule objs;DA:decode pattern") (lload "rule objs;DA:...
856567dd74d0b63023e91cf8b43d8a09d97226c99e0ee7897266a0926969578b
Holworth/SICP_Solutions
fringe.rkt
#lang sicp (define (reduce proc items) (if (= (length items) 1) (car items) (proc (car items) (reduce proc (cdr items))))) (define (fringe tree) (if (not (pair? tree)) (list tree) (reduce append (map fringe tree))) ) ( reduce append ( list ( list 1 ) ( list 2 ) ) ) (define x (list (lis...
null
https://raw.githubusercontent.com/Holworth/SICP_Solutions/852b94082669117692202fcdcb4190a8ecc1ce24/solutions/chap2/code/fringe.rkt
racket
#lang sicp (define (reduce proc items) (if (= (length items) 1) (car items) (proc (car items) (reduce proc (cdr items))))) (define (fringe tree) (if (not (pair? tree)) (list tree) (reduce append (map fringe tree))) ) ( reduce append ( list ( list 1 ) ( list 2 ) ) ) (define x (list (lis...
5339ab32b796aad27d7bdc075666ae81f3b288ccc55dc0c255b28a81250b5b48
RunOrg/RunOrg
token.mli
(* © 2014 RunOrg *) (** Tokens are used to identify the user performing the request. *) (** The type of a token string. *) module I : sig include Id.PHANTOM module Assert : sig val server_admin : 'a id -> [`ServerAdmin] id val person : 'a id -> [`Person] id end end (** The owner of a token. Determine...
null
https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/token.mli
ocaml
© 2014 RunOrg * Tokens are used to identify the user performing the request. * The type of a token string. * The owner of a token. Determines what the token is allowed to do. * Checks whether a token exists and is a server administrator. * Check whether a token exists and is a person of the current database....
module I : sig include Id.PHANTOM module Assert : sig val server_admin : 'a id -> [`ServerAdmin] id val person : 'a id -> [`Person] id end end type owner = [ `ServerAdmin | `Person of (Id.t * PId.t) ] * Create a new token in the token store . The token will be flushed after 48 hours have elaps...
8cd4b52e6ad81135f054cd31fb0b660d77470235fc5ef61abec27cfda8c97afc
dyoo/whalesong
collect-jump-targets.rkt
#lang typed/racket/base (require "../compiler/expression-structs.rkt" "../compiler/il-structs.rkt" "../compiler/lexical-structs.rkt" "../helpers.rkt" "../parameters.rkt" racket/list) (provide collect-general-jump-targets collect-entry-points) (: collect-general-...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/js-assembler/collect-jump-targets.rkt
racket
collects all the labels that are potential targets for GOTOs or branches. collects all the labels that are general entry points. The entry points are from the starting basic block, from functions headers, and finally return points. currently written this way because I'm hitting some bad type-checking behavior. ([(...
#lang typed/racket/base (require "../compiler/expression-structs.rkt" "../compiler/il-structs.rkt" "../compiler/lexical-structs.rkt" "../helpers.rkt" "../parameters.rkt" racket/list) (provide collect-general-jump-targets collect-entry-points) (: collect-general-...
e99010f1dd39b79befa1931d2c354a06b78d33c50e820ec45f88f747fcb52cc0
joodie/flutter-decline-demo
core.clj
(ns flutter-decline-demo.core ^{:doc "Oh great, another CRUD demo" :autor "Joost Diepenmaat"} (:use [ring.adapter.jetty] flutter-decline-demo.routes [ring.middleware params keyword-params])) (def handler (-> #'my-routes wrap-keyword-params wrap-params)) (def server (atom nil)) (...
null
https://raw.githubusercontent.com/joodie/flutter-decline-demo/076d5ba2e6c08234e7c7a553d539f53c901aaa54/src/flutter_decline_demo/core.clj
clojure
(ns flutter-decline-demo.core ^{:doc "Oh great, another CRUD demo" :autor "Joost Diepenmaat"} (:use [ring.adapter.jetty] flutter-decline-demo.routes [ring.middleware params keyword-params])) (def handler (-> #'my-routes wrap-keyword-params wrap-params)) (def server (atom nil)) (...
84c66d3c21d3014d55d5653f4d253628384e9e015ba3b5c0d608058473e29012
xach/zs3
xml-binding.lisp
;;;; Copyright ( c ) 2008 , 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 o...
null
https://raw.githubusercontent.com/xach/zs3/1294bd38c4cd00c6b2f628b05ad0f88b193c067a/xml-binding.lisp
lisp
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. * Redistributions in binary form...
Copyright ( c ) 2008 , All Rights Reserved DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package #:zs3) (defun skip-document-start (source) (let ((type (klacks:peek source))) (when (eql :start-document type) ...
1f96abeb7bcc65289d6303a42e82fd3eb8379295c67e8e7674116cc4271b4c10
fulcro-legacy/fulcro3
server.clj
(ns fulcro_todomvc.server (:require [clojure.core.async :as async] [com.fulcrologic.fulcro.algorithms.do-not-use :as util] [com.fulcrologic.fulcro.server.api-middleware :as fmw :refer [not-found-handler wrap-api]] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom.core :as p] [immutant.we...
null
https://raw.githubusercontent.com/fulcro-legacy/fulcro3/5d1b9ab274406afd68b792192d5a783f29963314/src/todomvc/fulcro_todomvc/server.clj
clojure
How to go from :person/id to that person's details normally you'd pull the person from the db, and satisfy the listed outputs. For demo, we just always return the same person details. how to go from :address/id to address details. define a list with our resolvers setup for a given connect system
(ns fulcro_todomvc.server (:require [clojure.core.async :as async] [com.fulcrologic.fulcro.algorithms.do-not-use :as util] [com.fulcrologic.fulcro.server.api-middleware :as fmw :refer [not-found-handler wrap-api]] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom.core :as p] [immutant.we...
45d4f8ad81135fdabb1c4ddbf9575ef8bb4c97937b6ad5ff2c6100edd70df6ee
samply/blaze
concept_spec.clj
(ns blaze.elm.concept-spec (:require [blaze.elm.code-spec :as code-spec] [blaze.elm.concept :as concept] [clojure.spec.alpha :as s]) (:import [blaze.elm.concept Concept])) (defn concept? [x] (instance? Concept x)) (s/fdef concept/to-concept :args (s/cat :codes (s/coll-of code-spec/code?)) ...
null
https://raw.githubusercontent.com/samply/blaze/693d07d8fbf9ac4e11af6684978e108bbd193780/modules/cql/test/blaze/elm/concept_spec.clj
clojure
(ns blaze.elm.concept-spec (:require [blaze.elm.code-spec :as code-spec] [blaze.elm.concept :as concept] [clojure.spec.alpha :as s]) (:import [blaze.elm.concept Concept])) (defn concept? [x] (instance? Concept x)) (s/fdef concept/to-concept :args (s/cat :codes (s/coll-of code-spec/code?)) ...
abc056d14c06c5774750a7c16f0039d0c21d303a366e9da7abf6dde98dfead5e
pjotrp/guix
freedesktop.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it...
null
https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/freedesktop.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not...
19f095da4ee5fc8017b2977d0069d689cc59468612584096c94dbf35830db14b
thelema/ocaml-community
pr5233.ml
open Printf;; PR#5233 : Create a dangling pointer and use it to access random parts of the heap . of the heap. *) (* The buggy weak array will end up in smuggle. *) let smuggle = ref (Weak.create 1);; (* This will be the weak array (W). *) let t = ref (Weak.create 1);; (* Set a finalisation function on W....
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/testsuite/tests/regression/pr5233/pr5233.ml
ocaml
The buggy weak array will end up in smuggle. This will be the weak array (W). Set a finalisation function on W. Free W and run its finalisation function. smuggle now contains W, whose pointers are not erased, even when the contents is deallocated. Check the data just to make sure. Fill the heap with oth...
open Printf;; PR#5233 : Create a dangling pointer and use it to access random parts of the heap . of the heap. *) let smuggle = ref (Weak.create 1);; let t = ref (Weak.create 1);; Gc.finalise (fun w -> smuggle := w) !t;; t := Weak.create 1;; Gc.full_major ();; let size = 1_000_000;; let check o = pr...
ca5b42e862cd52db60217a7851693845a9fa0af4ed0094e4ab49f7e1ff35402c
finnishtransportagency/harja
urakan_hoitokaudet_test.clj
(ns harja.kyselyt.urakan-hoitokaudet-test (:require [clj-time.core :as time] [clojure.test :refer [deftest is testing use-fixtures]] [harja.testi :refer :all] [clj-time.coerce :as coerce] [taoensso.timbre :as log])) (use-fixtures :each urakkatieto-fixture) (defn luo-hoito-urakka [] (u (str "INSERT...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/67b0ec8ba5029942438fb8979508ec735354835e/test/clj/harja/kyselyt/urakan_hoitokaudet_test.clj
clojure
")) ")) ")) (log/debug "HOITOKAUSI: " hoitokausi)
(ns harja.kyselyt.urakan-hoitokaudet-test (:require [clj-time.core :as time] [clojure.test :refer [deftest is testing use-fixtures]] [harja.testi :refer :all] [clj-time.coerce :as coerce] [taoensso.timbre :as log])) (use-fixtures :each urakkatieto-fixture) (defn luo-hoito-urakka [] (u (str "INSERT...
6cb13199d891e0c8fc75e57886cb5a8716a8f189e7b415b087e99b0a7eb7e689
uswitch/transducers-workshop
lab04.clj
(ns transducers-workshop.lab04 (:require [clojure.core.reducers :as r] [transducers-workshop.solutions.lab01 :as lab01] [transducers-workshop.xf :as xf] [clojure.core.async :as async])) LAB 04 : . There are essentially two approaches : one is using Reducers ( fork - join framework ) ; and apply...
null
https://raw.githubusercontent.com/uswitch/transducers-workshop/8779a70f55db58b2c40d98b1cb055f75f3442bf2/src/transducers_workshop/lab04.clj
clojure
and apply transducers when the smallest chunk is reached. The other is using core.async pipeline, another form of multi-threading The entry pointis the r/fold function. It requires a combine function and reducing function. we obtain our reducing function that we can use with reducers. Write here the missing part o...
(ns transducers-workshop.lab04 (:require [clojure.core.reducers :as r] [transducers-workshop.solutions.lab01 :as lab01] [transducers-workshop.xf :as xf] [clojure.core.async :as async])) LAB 04 : . There are essentially two approaches : one is using Reducers ( fork - join framework ) where eac...
bd275f672b581dc2b6d650d356b4438884896b6b58ba90e6d2309c92971cf6cd
bobbae/gosling-emacs
mh-send.ml
; This autoloaded file implements the "m" command of mhe. We call "comp" to ; compose the message into buffer "draft", and then when we are ready to ; send it we call "send" to do the evil deed. (defun (&mh-send actn #draft #draft-fn (setq #draft (if (= (recursion-depth) 1) "draft" (concat "draft-" (recurs...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/mh-send.ml
ocaml
; This autoloaded file implements the "m" command of mhe. We call "comp" to ; compose the message into buffer "draft", and then when we are ready to ; send it we call "send" to do the evil deed. (defun (&mh-send actn #draft #draft-fn (setq #draft (if (= (recursion-depth) 1) "draft" (concat "draft-" (recurs...
63c2ca6e7835584850c77e87457d168dbf57df73ab4a6990a24f4fb02fed403c
disteph/cdsat
top_level.mli
(************************************) Main entry point for Psyche runs (************************************) val init : ?withtheories:string list option -> ?withouttheories:string list option -> parser:Parsers.Register.t -> string -> (module Export.APIext)
null
https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/top_level.mli
ocaml
********************************** **********************************
Main entry point for Psyche runs val init : ?withtheories:string list option -> ?withouttheories:string list option -> parser:Parsers.Register.t -> string -> (module Export.APIext)
34a21a5a36b5745e877be77aab8e6f544cd181911c454c84de4297081c792e18
byteverse/byteslice
Windows1252.hs
-- | Placeholder module in case there is demand for treating 'Bytes' as -- Windows-1252-encoded text module Data.Bytes.Text.Windows1252 () where
null
https://raw.githubusercontent.com/byteverse/byteslice/71e6228fdad23d0bdcb944d46c3f918688879a3d/src/Data/Bytes/Text/Windows1252.hs
haskell
| Placeholder module in case there is demand for treating 'Bytes' as Windows-1252-encoded text
module Data.Bytes.Text.Windows1252 () where
7050bbfd1934c495dff0660088872dbb282ca835801674a6b4d4da0758bf91ba
acieroid/scala-am
pc.scm
;; Producer-consumer problem (define N (+ 10 (random 42))) (define NCONS (random 42)) (define buffer (ref '())) ; Protected by lock. (define done (ref #f)) (define lock (new-lock)) (define done-lock (new-lock)) (define (do-something element) (display element) (newline)) (define (producer n) (if (= n 0) (begin...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changes/cscheme/threads/pc.scm
scheme
Producer-consumer problem Protected by lock. <============================ <===============================================================
(define N (+ 10 (random 42))) (define NCONS (random 42)) (define done (ref #f)) (define lock (new-lock)) (define done-lock (new-lock)) (define (do-something element) (display element) (newline)) (define (producer n) (if (= n 0) (begin (acquire done-lock) (ref-set done #t) (release done...
5a3c30a38850690d8470eb7c968eedba9e186e94daadc7415c43c271adb2bb6b
Decentralized-Pictures/T4L3NT
translator_benchmarks.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_benchmarks_proto/translator_benchmarks.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...