_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
6e4e5ce6e479ed732514d8b90b287198f8157afb46ae576dc55448f3e0573068
geophf/1HaskellADay
Exercise.hs
module Y2018.M02.D02.Exercise where - We have been able to download sets of articles and then we 've triaged them , but before we do triage , we have to do a bifurcation from before : we do n't want Associated Press articles showing up in our NEW / UPDATED / REDUNDANT stacks . Today 's problem is to remove...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M02/D02/Exercise.hs
haskell
} for downloading from the endpoint for determining how far back to go for triaging from the triage How many articles did you download? --------------------------------------------------------------- }
module Y2018.M02.D02.Exercise where - We have been able to download sets of articles and then we 've triaged them , but before we do triage , we have to do a bifurcation from before : we do n't want Associated Press articles showing up in our NEW / UPDATED / REDUNDANT stacks . Today 's problem is to remove...
7020b2bddc5d876f2eac51bc8d1075114332b2cc2e0b6af2e0305b77b35a66cc
acieroid/scala-am
f-7.scm
(letrec ((f (lambda (x) (+ (* x x) (* x x)))) (g (lambda (x) (+ (* x x) (* x x))))) (let ((_tmp1 (f 1))) (let ((_tmp2 (f 2))) (let ((_tmp3 (f 3))) (let ((_tmp4 (f 4))) (let ((_tmp5 (f 5))) (let ((_tmp6 (f 6))) (let ((_tmp7 (g 7))) (let ((_tmp8 (f 8))) (let ((_tmp9 (f 9))) (f 10)))))))))))
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/f1-tests/f-7.scm
scheme
(letrec ((f (lambda (x) (+ (* x x) (* x x)))) (g (lambda (x) (+ (* x x) (* x x))))) (let ((_tmp1 (f 1))) (let ((_tmp2 (f 2))) (let ((_tmp3 (f 3))) (let ((_tmp4 (f 4))) (let ((_tmp5 (f 5))) (let ((_tmp6 (f 6))) (let ((_tmp7 (g 7))) (let ((_tmp8 (f 8))) (let ((_tmp9 (f 9))) (f 10)))))))))))
7fd448ffbdcae9c866b7f609720644c0196457d2d772992e4fb1be38434a9bc8
samrushing/irken-compiler
t32.scm
;; -*- Mode: Irken -*- (include "lib/core.scm") (define (get-closure) (%%cexp (-> (irken-closure (string -> int))) "getc")) (define (thing s) (let ((closure (get-closure))) (%%cexp ((irken-closure (string -> int)) int string -> int) "irk" closure 1 s) )) (print (thing "--- testing ---\n")) (print (thing...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t32.scm
scheme
-*- Mode: Irken -*-
(include "lib/core.scm") (define (get-closure) (%%cexp (-> (irken-closure (string -> int))) "getc")) (define (thing s) (let ((closure (get-closure))) (%%cexp ((irken-closure (string -> int)) int string -> int) "irk" closure 1 s) )) (print (thing "--- testing ---\n")) (print (thing "... and testing again...
e09b8d010059502b2a74d787db4289be584c7367727011a5e47e6d5374a344c8
pixlsus/registry.gimp.org_static
lightsaber-effect.130.scm
; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; ; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ; (at your option) any later ve...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/lightsaber-effect.130.scm
scheme
The GIMP -- an image manipulation program 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; without even the implied warranty of ...
Copyright ( C ) 1995 and 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. , 675 Mass Ave , Cambridge , , USA . Lightsaber Effect - Creates a lightsaber effect . by < > Updates for stre...
935520da9aafba9d00f338c296cd58832b034385b3e01e793e334e14b911a3bc
NorfairKing/the-notes
Macro.hs
module Computability.Symbols.Macro where import Types import Macro.Math import Macro.MetaMacro -- * Symbols -- ** Symbol equality -- | Symbol equality sign symEqSign :: Note symEqSign = underset "s" "=" -- | Symbol equality operation symEq :: Note -> Note -> Note symEq = binop symEqSi...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Computability/Symbols/Macro.hs
haskell
* Symbols ** Symbol equality | Symbol equality sign | Symbol equality operation | Infix symbol equality operator * Alphabets | Concrete alphabet | Concrete alphabet and string * Strings | Empty string | Concrete string | Strings of alphabet | Strings of concrete alphabet ** Lists of symbols ** Concatenat...
module Computability.Symbols.Macro where import Types import Macro.Math import Macro.MetaMacro symEqSign :: Note symEqSign = underset "s" "=" symEq :: Note -> Note -> Note symEq = binop symEqSign (=@=) :: Note -> Note -> Note (=@=) = symEq alph_ :: Note alph_ = comm0 "Sigma" alph...
9cebc39e5e61955841f1672c9aa6ba77ad494dc7846ff4c79dcd3bc7191fa7a2
clj-easy/graalvm-clojure
main.clj
(ns simple.main (:require [datascript.core :as d]) (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (let [schema {:aka {:db/cardinality :db.cardinality/many}} conn (d/create-conn schema)] (d/transact! conn [ { :db/id -1 :name "Maksim" ...
null
https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/datascript/src/simple/main.clj
clojure
Destructuring, function call, predicate call, query over collection Recursive rule Aggregates
(ns simple.main (:require [datascript.core :as d]) (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (let [schema {:aka {:db/cardinality :db.cardinality/many}} conn (d/create-conn schema)] (d/transact! conn [ { :db/id -1 :name "Maksim" ...
b57980987d136a82ed626e83fa302dc878492a5fbf1534e228ae9f768bfa3eff
kadena-io/chainweb-node
DbCache.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # -- | Module : Chainweb . Pact . Backend . DbCache Copyright : Co...
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/6ebeb82e7ba05f21da92db6d308352fd40026c38/src/Chainweb/Pact/Backend/DbCache.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # | License: See LICENSE file -------------------------------------------------------------------------- -- ModuleCacheLimitBytes -------------------------------------------------------------------------- -- -------------------------------------------------...
# LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # Module : Chainweb . Pact . Backend . DbCache Copyright : Copyright © 2022 Kadena LLC . LRU cache for avoiding expensive JSON de...
9250e8153231fb62840788bc7df96a68666d971b4de39e6d28940688bd47b30b
ragkousism/Guix-on-Hurd
adns.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2015 , 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundati...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/adns.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 < > Copyright © 2015 , 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages adns) #:use-module (guix licenses) #:use-module ...
209673a7221c0f86cd0609812c73ef4cb2ebe8ecbde94cb2e2055143a4cc49d9
kmicinski/cmsc330examples
cek.ml
module L = List module CekMachine = struct type var = string type term = | Var of var (* Variables *) | Lam of string * term (* Lambda abstractions *) | App of term * term (* Applications *) let rec string_of_term = function | Var x -> x | Lam (x,t) -> "(\\" ^ x ...
null
https://raw.githubusercontent.com/kmicinski/cmsc330examples/78f5acaaae25f11a39817673433efcf33271df6d/lambda-calculus/cek.ml
ocaml
Variables Lambda abstractions Applications Pretty printing... How do we evaluate a variable? How do we evaluate an application? What do we do when we have a lambda and need to evaluate the argument? What do we do when we need to call the function we just computed? What do we do when there are no steps ...
module L = List module CekMachine = struct type var = string type term = let rec string_of_term = function | Var x -> x | Lam (x,t) -> "(\\" ^ x ^ ". " ^ (string_of_term t) ^ ")" | App (t1,t2) -> "(" ^ (string_of_term t1) ^ " " ^ (string_of_term t2) ^ ")" type control = ...
3693c6bd46129f631c99fec84ea5b265a73e824e95958b4cb5bc007bcad9c6a6
nyampass/conceit
commons.clj
(ns conceit.commons (require conceit.commons.ns)) (def ^{:private true} sub-namespaces '#{type assert boolean class fn map number string char byte coll date flow http meta multimethod regex ns named}) (doseq [sub-ns sub-namespaces] (let [sub-ns-full (symbol (str (name (ns-name *ns*)) "." (name sub-ns)))] (req...
null
https://raw.githubusercontent.com/nyampass/conceit/2b8ba8cc3d732fe2f58d320e2aa4ecdd6f3f3be5/conceit-commons/src/conceit/commons.clj
clojure
(ns conceit.commons (require conceit.commons.ns)) (def ^{:private true} sub-namespaces '#{type assert boolean class fn map number string char byte coll date flow http meta multimethod regex ns named}) (doseq [sub-ns sub-namespaces] (let [sub-ns-full (symbol (str (name (ns-name *ns*)) "." (name sub-ns)))] (req...
ba85321e53aba8035b0fab279585a4c1e7ec2568f892db884d241307fb833363
ocaml-sf/learn-ocaml-corpus
discr_ONat.ml
let pigeonhole_sort (bound : int) (kvs : (int * 'v) list) : 'v list = (* Create an array of buckets, each of which is initially empty. *) assert (0 <= bound); let bucket : 'v list array = Array.make bound [] in (* Place every value into an appropriate bucket, according to its key. *) List.iter (fun (k, v) -> ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/generic_sorting/wrong/discr_ONat.ml
ocaml
Create an array of buckets, each of which is initially empty. Place every value into an appropriate bucket, according to its key. Reverse the list stored in every bucket, so as to have a stable sort. Concatenate all buckets. The input list is empty. Return an empty output list. The input list is a singleton....
let pigeonhole_sort (bound : int) (kvs : (int * 'v) list) : 'v list = assert (0 <= bound); let bucket : 'v list array = Array.make bound [] in List.iter (fun (k, v) -> assert (0 <= k && k < bound); bucket.(k) <- v :: bucket.(k) ) kvs; for k = 0 to bound - 1 do bucket.(k) <- List.rev bucket.(k) d...
9450031b13afa5d183163550e3bc03f993ff4f10d9d2cb4fdc96ba03e87f1041
ocaml-multicore/ocaml-tsan
odoc_latex.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/ocamldoc/odoc_latex.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Odoc_info open Value open Type open Extension open Exception open Class open Module let separate_fi...
6d8e0f51724ed473034f2fe4b91b75b2963cc6c33ab7e467b06e891e6ebe7737
imandra-ai/ocaml-opentelemetry
logs_types.mli
(** logs.proto Types *) (** {2 Types} *) type severity_number = | Severity_number_unspecified | Severity_number_trace | Severity_number_trace2 | Severity_number_trace3 | Severity_number_trace4 | Severity_number_debug | Severity_number_debug2 | Severity_number_debug3 | Severity_number_debug...
null
https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/3dc7d63c7d2c345ba13e50b67b56aff878b6d0bb/src/logs_types.mli
ocaml
* logs.proto Types * {2 Types} * [default_severity_number ()] is the default value for type [severity_number] * [default_log_record ()] is the default value for type [log_record] * [default_scope_logs ()] is the default value for type [scope_logs] * [default_resource_logs ()] is the default value for type [resourc...
type severity_number = | Severity_number_unspecified | Severity_number_trace | Severity_number_trace2 | Severity_number_trace3 | Severity_number_trace4 | Severity_number_debug | Severity_number_debug2 | Severity_number_debug3 | Severity_number_debug4 | Severity_number_info | Severity...
11d777cc6c401cb081e7b75f0d8f6562ec7797e131ab172b8775f4b396c6785a
returntocorp/semgrep
metavar_equality_var.ml
let foo = (* ERROR: *) let myfile = open_file "file" in close myfile
null
https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/patterns/ocaml/metavar_equality_var.ml
ocaml
ERROR:
let foo = let myfile = open_file "file" in close myfile
861ba1b616702933c4d5a1fae08c0198e72fc8aa67001fe99d48783e7f1e70d0
hpdeifel/hledger-iadd
ConfigParserSpec.hs
{-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # module ConfigParserSpec (spec) where import Test.Hspec import Test.QuickCheck import Data.Text (Text) import qualified Data.Text as T import ConfigParser spec :: Spec spec = do fullTest defaultTest ...
null
https://raw.githubusercontent.com/hpdeifel/hledger-iadd/782239929d411bce4714e65dd5c7bb97b2ba4e75/tests/ConfigParserSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans # module ConfigParserSpec (spec) where import Test.Hspec import Test.QuickCheck import Data.Text (Text) import qualified Data.Text as T import ConfigParser spec :: Spec spec = do fullTest defaultTest syntaxTests valueTests commen...
dcfbe623333176273cc4f6a29ee1a4e8729fcd48c258d72731e0b3532eb436d9
haskellari/strict
These.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Safe #-} #if MIN_VERSION_base(4,9,0) #define LIFTED_FUNCTOR_CLASSES 1 #else #if MIN_VERSION_transformers(0,5,0) #define LIFTED_FUNCTOR_CLASSES 1 #else ...
null
https://raw.githubusercontent.com/haskellari/strict/4691acdfbe95dcd49725baec09127fa0077d93ba/strict/src/Data/Strict/These.hs
haskell
# LANGUAGE CPP # # LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # LANGUAGE Safe # * Functions to get rid of 'These' * Partition * Distributivity | This distributivity combinators aren't isomorphisms! $setup | The strict these type. -----------------------------------...
# LANGUAGE DeriveGeneric # #if MIN_VERSION_base(4,9,0) #define LIFTED_FUNCTOR_CLASSES 1 #else #if MIN_VERSION_transformers(0,5,0) #define LIFTED_FUNCTOR_CLASSES 1 #else #if MIN_VERSION_transformers_compat(0,5,0) && !MIN_VERSION_transformers(0,4,0) #define LIFTED_FUNCTOR_CLASSES 1 #endif #endif #endif module Dat...
8c353b113ffe24a98612b44049303f3800b5856ed3ec7a6a65a75f8c6e647148
dzaporozhets/clojure-web-application
helpers.clj
(ns sample.features.helpers (:require [sample.handler :refer [app]] [sample.models.user :as db] [sample.crypt :as crypt] [kerodon.core :refer :all] [kerodon.test :refer :all] [clojure.test :refer :all])) (def foo-email "") (defn create-user [] (if-not (d...
null
https://raw.githubusercontent.com/dzaporozhets/clojure-web-application/8d813fc95080a8ebc9532c0a4067f540f7f91553/test/sample/features/helpers.clj
clojure
(ns sample.features.helpers (:require [sample.handler :refer [app]] [sample.models.user :as db] [sample.crypt :as crypt] [kerodon.core :refer :all] [kerodon.test :refer :all] [clojure.test :refer :all])) (def foo-email "") (defn create-user [] (if-not (d...
b10ed2d730c32c0b5cf3c5f5cecb9004f448e37b0332a1b4504fb3192813ecfc
slipstream/SlipStreamServer
quota.clj
(ns com.sixsq.slipstream.ssclj.resources.quota " The collection of Quota resources defines the overall resource utilization policy for the SlipStream server. Each Quota resource defines a limit on an identified resource. For new resource requests, SlipStream will verify that the request will not exceed the defined qu...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/quota.clj
clojure
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description | multimethods for validation and operations use default ACL method CRUD operations provide an action that allows the quota to be evaluated returns the quota resource augmented with the keys (for all usage of the quota by that user). initialization
(ns com.sixsq.slipstream.ssclj.resources.quota " The collection of Quota resources defines the overall resource utilization policy for the SlipStream server. Each Quota resource defines a limit on an identified resource. For new resource requests, SlipStream will verify that the request will not exceed the defined qu...
0ba01f49e23e8cf571cdc30a71acaa261614c6b3526a9c3be16d5b67256c3c59
prepor/ocaml-edn
edn_cconv.mli
type t = Edn.t val source : t CConv.Decode.source val output : t CConv.Encode.output val encode : 'a CConv.Encode.encoder -> 'a -> t val decode : 'a CConv.Decode.decoder -> t -> 'a CConv.or_error val decode_exn : 'a CConv.Decode.decoder -> t -> 'a val to_string : t CConv.Encode.encoder -> t -> string val of_string : '...
null
https://raw.githubusercontent.com/prepor/ocaml-edn/3cc3c02dd24d5954aa3265cc743ada1fdd03c82c/cconv/edn_cconv.mli
ocaml
type t = Edn.t val source : t CConv.Decode.source val output : t CConv.Encode.output val encode : 'a CConv.Encode.encoder -> 'a -> t val decode : 'a CConv.Decode.decoder -> t -> 'a CConv.or_error val decode_exn : 'a CConv.Decode.decoder -> t -> 'a val to_string : t CConv.Encode.encoder -> t -> string val of_string : '...
5d867e52cae7dcd507711258ab5c1d1b864c05c4a5dc76a15a2f8a419dfecf0a
quil-lang/quilc
analysis-tests.lisp
;;;; analysis-tests.lisp ;;;; Author : (in-package #:cl-quil-tests) (defun same-list-p (a b) (and (= (length a) (length b)) (every #'= (sort (copy-seq a) #'<) (sort (copy-seq b) #'<)))) (a:define-constant +identity-defgate+ " DEFGATE I: 1, 0, 0, 0 ...
null
https://raw.githubusercontent.com/quil-lang/quilc/44442079373f8033c7ccc7f95854fcd2ea185dba/tests/analysis-tests.lisp
lisp
analysis-tests.lisp Identity map Reverse map Partial map Empty map Do we have the memory descriptor? Is it the right length? Is the recalc table of equal size? Are the members of the table correct? Are the actual expressions correct? expr E should be a[0] + 3 * b[1] Now we go through the program to make s...
Author : (in-package #:cl-quil-tests) (defun same-list-p (a b) (and (= (length a) (length b)) (every #'= (sort (copy-seq a) #'<) (sort (copy-seq b) #'<)))) (a:define-constant +identity-defgate+ " DEFGATE I: 1, 0, 0, 0 0, 1, 0, 0 0, 0, 1, 0 ...
05d3a7a165741cad28852670f739a8fa32c6d8331d58cfe61d7892c51c8864be
lspector/Clojush
uball5d.clj
;; uball5d.clj an example problem for clojush , a Push / PushGP system written in Clojure , , 2017 (ns clojush.problems.regression.uball5d (:use [clojush.pushgp.pushgp] [clojush.pushstate] [clojush.random] [clojush.interpreter] [clojure.math.numeric-tower])) ;;;;;;;;;;;; Flo...
null
https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/regression/uball5d.clj
clojure
uball5d.clj Each training case will be in the form [[x1 x2 x3 x4 x5] y], where the xs are inputs and y is the output.
an example problem for clojush , a Push / PushGP system written in Clojure , , 2017 (ns clojush.problems.regression.uball5d (:use [clojush.pushgp.pushgp] [clojush.pushstate] [clojush.random] [clojush.interpreter] [clojure.math.numeric-tower])) Floating point symbolic regress...
3dddb23a865f95353fea772741282eb61efc02a2b4542feba16f5efb83603fe8
swaywm/cl-wlroots
surface.lisp
(in-package #:wlr/types/surface) (export '(subsurface subsurface-create subsurface-state surface surface-create surface-for-each-surface surface-from-resource surface-get-extends surface-get-root-surface surface-get-texture surface-has-buffer surface-point-accepts-input surface-role surface-s...
null
https://raw.githubusercontent.com/swaywm/cl-wlroots/f8a33979e45086ecd5c7deefd5ee067b941e0998/wlr/types/surface.lisp
lisp
(in-package #:wlr/types/surface) (export '(subsurface subsurface-create subsurface-state surface surface-create surface-for-each-surface surface-from-resource surface-get-extends surface-get-root-surface surface-get-texture surface-has-buffer surface-point-accepts-input surface-role surface-s...
047eeba43b701e2978163be38f4566daf5e926970d35b7e74823fe023e5ed843
wavewave/hoodle
Histo.hs
{-# LANGUAGE BangPatterns #-} module Util.Histo ( aggregateCount, histoAdd, ) where import Data.List (group, sort) import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe (mapMaybe) aggregateCount :: [String] -> [(String, Int)] aggregateCount = mapMaybe count . group . sort where count...
null
https://raw.githubusercontent.com/wavewave/hoodle/7296b8a9b5646d5f1ad844ffc42e655eb10732b7/log/app/logcat/Util/Histo.hs
haskell
# LANGUAGE BangPatterns #
module Util.Histo ( aggregateCount, histoAdd, ) where import Data.List (group, sort) import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe (mapMaybe) aggregateCount :: [String] -> [(String, Int)] aggregateCount = mapMaybe count . group . sort where count ys@(x : _) = Just (x, length ...
65b2584b645bbf351da65f34fd6630607283eefeb501733c6f775e0a19144f60
camlp5/camlp5
q_MLast_test.ml
(* camlp5r *) (* q_MLast_test.ml *) open Testutil ; open Testutil2 ; open OUnit2 ; open OUnitTest ; Pcaml.inter_phrases.val := Some (";\n") ; value pa1 = PAPR.Implem.pa1 ; value pr = PAPR.Implem.pr ; value fmt_string s = Printf.sprintf "<<%s>>" s ; type instance = { name : string ; code : string ; expect : ...
null
https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/testsuite/q_MLast_test.ml
ocaml
camlp5r q_MLast_test.ml ;;; Local Variables: *** ;;; mode:tuareg *** ;;; End: ***
open Testutil ; open Testutil2 ; open OUnit2 ; open OUnitTest ; Pcaml.inter_phrases.val := Some (";\n") ; value pa1 = PAPR.Implem.pa1 ; value pr = PAPR.Implem.pr ; value fmt_string s = Printf.sprintf "<<%s>>" s ; type instance = { name : string ; code : string ; expect : string } ; value mktest i = i.name...
9e7c02ccdcf01b19aac3269f9fb6f5f3ce4421e47fda0fac179513afd9e065d9
kelvin-mai/clj-contacts
nav.cljs
(ns contacts.components.nav (:require [helix.core :refer [defnc]] [helix.dom :as d])) (defnc nav [] (d/nav {:class '[py-4 shadow]} (d/div {:class '[container]} (d/h2 {:class '[text-xl]} "Contact Book"))))
null
https://raw.githubusercontent.com/kelvin-mai/clj-contacts/0b349e706179aee2d1e1e7df02f38c6ee8faae72/src/cljs/contacts/components/nav.cljs
clojure
(ns contacts.components.nav (:require [helix.core :refer [defnc]] [helix.dom :as d])) (defnc nav [] (d/nav {:class '[py-4 shadow]} (d/div {:class '[container]} (d/h2 {:class '[text-xl]} "Contact Book"))))
d720a5e1402cebe89d1d072dbcb25c041d66d3f35743dbd5645442e59a0e42de
savonet/ocaml-posix
posix_uname_stubs.ml
open Ctypes module Def (F : Cstubs.FOREIGN) = struct open F module Types = Posix_uname_types.Def (Posix_uname_generated_types) open Types let uname = foreign "uname" (ptr Utsname.t @-> returning int) let strlen = foreign "strlen" (ptr char @-> returning int) end
null
https://raw.githubusercontent.com/savonet/ocaml-posix/d46d011de16154b34324eae6ee6e7010138cf4af/posix-uname/src/stubs/posix_uname_stubs.ml
ocaml
open Ctypes module Def (F : Cstubs.FOREIGN) = struct open F module Types = Posix_uname_types.Def (Posix_uname_generated_types) open Types let uname = foreign "uname" (ptr Utsname.t @-> returning int) let strlen = foreign "strlen" (ptr char @-> returning int) end
c428e6413d9499722b02916d99c63427e2463c850c2152025addddea795e2045
fjvallarino/monomer
PopupSpec.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Monomer.Widgets.Containers.PopupSpec where import Control.Lens import Control.Lens.TH (abbreviatedFields, makeLensesWith) ...
null
https://raw.githubusercontent.com/fjvallarino/monomer/7b1d59d754d75588aae1097a231712264cf61719/test/unit/Monomer/Widgets/Containers/PopupSpec.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Monomer.Widgets.Containers.PopupSpec where import Control.Lens import Control.Lens.TH (abbreviatedFields, makeLensesWith) ...
ced39cd1b01adc02a386acfb89f5d2652ed82bbc0d11bdbc73ee72da9105c31f
iand675/hs-opentelemetry
Raw.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DerivingStrategies # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Strict #-} module Raw ( newTraceIdFromHeader, newSpanIdFromHeader, newHeaderFromTraceId, newHeaderFromSpanId, showWord64BS, readWord64BS, asciiWord8ToWord8, word8ToAsciiWord8, ) where import C...
null
https://raw.githubusercontent.com/iand675/hs-opentelemetry/1f0328eb59fec2a97aec7ef98fe4f1e0d5c8f2ac/propagators/datadog/old-src/Raw.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE Strict # | ASCII numeric text | ASCII numeric text | Write a primitive value to the byte array with network-byte-order (big-endian). The offset is given in elements of type @a@ rather than in bytes. equivelent:
# LANGUAGE DerivingStrategies # module Raw ( newTraceIdFromHeader, newSpanIdFromHeader, newHeaderFromTraceId, newHeaderFromSpanId, showWord64BS, readWord64BS, asciiWord8ToWord8, word8ToAsciiWord8, ) where import Control.Monad.ST (ST, runST) import Data.Bits (Bits (complement, shift, (.&.))) import Dat...
78f20c018fb40c6c1b1eb057fe37aa2ddc3cfe6f43a1d36ae0c9b5446f971fec
coq/coq
cbn.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2019 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * *...
null
https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/tactics/cbn.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2019 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 * Weak - head reduction . Despite t...
41229631670c5c24cc0649482c49fbb7b482ca2ef08e61a8958e924a7e715fbb
eugeneia/athens
cast5.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- cast5.lisp -- implementation of rfc2144 CAST5 algorithm (in-package :crypto) ;;; s-boxes (declaim (type (simple-array (unsigned-byte 32) (256)) +cast5-sbox0+ +cast5-sbox1+ +cast5-sbox2+ +cast5-sbox3+ +cast5-sbox4+ +cast5-sbox5+ +cast5-s...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/ironclad-v0.40/src/ciphers/cast5.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*- s-boxes generate mask material generate shift amounts no padding necessary
cast5.lisp -- implementation of rfc2144 CAST5 algorithm (in-package :crypto) (declaim (type (simple-array (unsigned-byte 32) (256)) +cast5-sbox0+ +cast5-sbox1+ +cast5-sbox2+ +cast5-sbox3+ +cast5-sbox4+ +cast5-sbox5+ +cast5-sbox6+ +cast5-sbox7+)) (defconst +cast5-sbox0+ #32@(#x30fb4...
3511f7b1624bd95d63ec918bd589d205406322cd9aef027e72fb65abd27fc80d
samrushing/irken-compiler
t_sexp0.scm
;; -*- Mode: Irken -*- (include "lib/basis.scm") (include "lib/map.scm") (pp (sexp (int 1) (sym 'x) (char #\a) (sexp (int 0) (int 3) (string "test"))) 20) (pp (sexp (rec (a (sym 'int)) (b (sym 'list)))) 20) (define list0 (sexp (int 0) (int 1) (int 2))) (define list1 (sexpl (int 0) (int 1) (int 2))) (pp (sexp (string ...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_sexp0.scm
scheme
-*- Mode: Irken -*-
(include "lib/basis.scm") (include "lib/map.scm") (pp (sexp (int 1) (sym 'x) (char #\a) (sexp (int 0) (int 3) (string "test"))) 20) (pp (sexp (rec (a (sym 'int)) (b (sym 'list)))) 20) (define list0 (sexp (int 0) (int 1) (int 2))) (define list1 (sexpl (int 0) (int 1) (int 2))) (pp (sexp (string "[") list0 (string "]")...
9c66886f27db778a8c9eae5f11b93b7d5e6f6be4e4c0400568c1c110bbb775c1
facebook/flow
ast_loc_utils.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/parser_utils/ast_loc_utils.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
9e4384fb4648e6be2bd7d4169cee4c1e166f083c8855776b07be9e01a8b959e5
AshleyYakeley/Truth
GTK.hs
module Pinafore.Language.Library.GTK ( allGTKStuff , LangContext(..) ) where import Pinafore.Language.API import Pinafore.Language.Library.GTK.Clipboard import Pinafore.Language.Library.GTK.Context import Pinafore.Language.Library.GTK.Debug import Pinafore.Language.Library.GTK.Element import Pinafore.Langu...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/53900d89022f68bffb08d5c07b4e783ab0a0542e/Pinafore/pinafore-gnome/lib/Pinafore/Language/Library/GTK.hs
haskell
module Pinafore.Language.Library.GTK ( allGTKStuff , LangContext(..) ) where import Pinafore.Language.API import Pinafore.Language.Library.GTK.Clipboard import Pinafore.Language.Library.GTK.Context import Pinafore.Language.Library.GTK.Debug import Pinafore.Language.Library.GTK.Element import Pinafore.Langu...
4156a8790f8d8f3e2208cec9334e831ba63022f0e45d3ea744fbc7ce34db3676
racket/gui
const.rkt
#lang racket/base (provide (except-out (all-defined-out) <<)) (define (<< a b) (arithmetic-shift a b)) (define NSTitledWindowMask 1) (define NSBorderlessWindowMask 0) (define NSClosableWindowMask 2) (define NSMiniaturizableWindowMask 4) (define NSResizableWindowMask 8) (define NSUtilityWindowMask (1 . << . 4)) (defi...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/cocoa/const.rkt
racket
#lang racket/base (provide (except-out (all-defined-out) <<)) (define (<< a b) (arithmetic-shift a b)) (define NSTitledWindowMask 1) (define NSBorderlessWindowMask 0) (define NSClosableWindowMask 2) (define NSMiniaturizableWindowMask 4) (define NSResizableWindowMask 8) (define NSUtilityWindowMask (1 . << . 4)) (defi...
d038df725b5edd981af812b88af65d7459e04bbfce4df2075744f942f40183da
ssor/erlangDemos
echo_get.erl
%% Feel free to use, reuse and abuse the code in this file. -module(echo_get). %% API. -export([start/0]). %% API. start() -> ok = application:start(cowboy), ok = application:start(echo_get).
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_examples/echo_get/src/echo_get.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. API.
-module(echo_get). -export([start/0]). start() -> ok = application:start(cowboy), ok = application:start(echo_get).
1825d3da65931f52e1fb7d63beb86740d9beac8dfc92fa48864fbb154d17f62b
alex-hhh/ActivityLog2
validating-input-field.rkt
#lang racket/base ;; This file is part of ActivityLog2, an fitness activity tracker Copyright ( C ) 2018 < > ;; ;; 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 3 of the Lic...
null
https://raw.githubusercontent.com/alex-hhh/ActivityLog2/36a4bb8af45db19cea02e982e22379acb18d0c49/rkt/widgets/validating-input-field.rkt
racket
This file is part of ActivityLog2, an fitness activity tracker This program is free software: you can redistribute it and/or modify it any later version. This program is distributed in the hope that it will be useful, but WITHOUT without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR P...
#lang racket/base Copyright ( C ) 2018 < > under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) (require racket/class racket/gui/base racket/string) (provide validating-input-field%) (define...
3572a12d3e0d5df7a472e1fa97344e9fe90ce19ed88712b5cefd157af5b8137b
hyperfiddle/electric
rec.cljc
(ns dustin.rec (:require [hfdl.lang :as r :refer []] [hyperfiddle.photon-dom :as d] [missionary.core :as m])) (r/def bmi 30) (r/def weight 10) (r/defn slider [fv min max] (d/input {"type" "range" "value" (f bmi) "min" min "max" max :styl...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/photon/rec.cljc
clojure
(ns dustin.rec (:require [hfdl.lang :as r :refer []] [hyperfiddle.photon-dom :as d] [missionary.core :as m])) (r/def bmi 30) (r/def weight 10) (r/defn slider [fv min max] (d/input {"type" "range" "value" (f bmi) "min" min "max" max :styl...
3632c09739c9cac554f297e6aa823c54f98a3ab5ca32442fff23e0ce59543f53
JunSuzukiJapan/cl-reex
where-test.lisp
(defpackage where-test (:use :cl :cl-reex :cl-reex-test.logger :prove) (:shadowing-import-from :cl-reex :skip) ) (in-package :where-test) NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp . (plan 1) ;; blah blah blah. (defparameter logger (make-instance '...
null
https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/where-test.lisp
lisp
blah blah blah.
(defpackage where-test (:use :cl :cl-reex :cl-reex-test.logger :prove) (:shadowing-import-from :cl-reex :skip) ) (in-package :where-test) NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp . (plan 1) (defparameter logger (make-instance 'logger)) (defparam...
56cf33f5a6ad74a77f2c4c9d5cd1af75965beabc6c126f1d82a394cd83196244
hiroshi-unno/coar
baParser.ml
open Core open CSyntax open Common.Util.LexingHelper exception Err of string let parse_from_lexbuf lexbuf = try let graph = BaParsing.toplevel BaLexer.main lexbuf in let strid_to_intid_buf = Hashtbl.Poly.create ~size:123456 () in let initial_state = ref (-1) in let final_states = ref [] in let s...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/c/baParser.ml
ocaml
open Core open CSyntax open Common.Util.LexingHelper exception Err of string let parse_from_lexbuf lexbuf = try let graph = BaParsing.toplevel BaLexer.main lexbuf in let strid_to_intid_buf = Hashtbl.Poly.create ~size:123456 () in let initial_state = ref (-1) in let final_states = ref [] in let s...
c99485bcfbf740a2b578343e1b36e521a3ce49b6dc395befdff602e5ccf58e61
crategus/cl-cffi-gtk
gtk.table.lisp
;;; ---------------------------------------------------------------------------- ;;; gtk.table.lisp ;;; ;;; The documentation of this file is taken from the GTK 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK library . ;;; See <>. The API documentation of the Lisp binding is ava...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.table.lisp
lisp
---------------------------------------------------------------------------- gtk.table.lisp The documentation of this file is taken from the GTK 3 Reference Manual See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the...
Version 3.24 and modified to document the Lisp binding to the GTK library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for us...
7ee0390c332094bd3628ade7607550b6fd2d3b33bf91c8853c2289832d1bc30e
jabber-at/ejabberd
mod_disco.erl
%%%---------------------------------------------------------------------- File : Author : < > Purpose : Service Discovery ( XEP-0030 ) support Created : 1 Jan 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This program is free software; you can redistribute it ...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_disco.erl
erlang
---------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER...
File : Author : < > Purpose : Service Discovery ( XEP-0030 ) support Created : 1 Jan 2003 by < > ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You shou...
6fae0124502894b8ba52bb22eb4efe0ac184cd4f14e2a7f6ec751aa588225965
haskell-webgear/webgear
Basic.hs
module Properties.Trait.Auth.Basic ( tests, ) where import Control.Arrow (returnA, (>>>)) import Data.ByteString.Base64 (encode) import Data.ByteString.Char8 (elem) import Data.Either (fromRight) import Data.Functor.Identity (Identity, runIdentity) import Network.Wai (defaultRequest, requestHeaders) import Test.Quic...
null
https://raw.githubusercontent.com/haskell-webgear/webgear/13cf7733bfc090609b2d7307a3b220e99609fb4e/webgear-server/test/Properties/Trait/Auth/Basic.hs
haskell
module Properties.Trait.Auth.Basic ( tests, ) where import Control.Arrow (returnA, (>>>)) import Data.ByteString.Base64 (encode) import Data.ByteString.Char8 (elem) import Data.Either (fromRight) import Data.Functor.Identity (Identity, runIdentity) import Network.Wai (defaultRequest, requestHeaders) import Test.Quic...
1bd49d4d609e106b99592fdef1f3caddcdcf1751e30ac1faecfaf35f9188a284
ocaml-multicore/ocaml-tsan
test_c_thread_has_lock_systhread.ml
TEST modules = " test_c_thread_has_lock_cstubs.c " * hassysthreads include systhreads * * bytecode * * native modules = "test_c_thread_has_lock_cstubs.c" * hassysthreads include systhreads ** bytecode ** native *) external test_with_lock : unit -> bool = "with_lock" external...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/c-api/test_c_thread_has_lock_systhread.ml
ocaml
TEST modules = " test_c_thread_has_lock_cstubs.c " * hassysthreads include systhreads * * bytecode * * native modules = "test_c_thread_has_lock_cstubs.c" * hassysthreads include systhreads ** bytecode ** native *) external test_with_lock : unit -> bool = "with_lock" external...
1e610ecdd25c7d249ee346ebc0626c8cfb60bbc2aad71afa496121a1285acf0c
ocaml-multicore/ocaml-tsan
thread_sanitizer.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/e5bffcf5bb9835f31bb67cc13e7e1504b4642692/asmcomp/thread_sanitizer.ml
ocaml
************************************************************************ OCaml ...
, Purdue University Copyright 2022 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes open Cmm module V = Backend_var module VP = Backend_var.With_provenance type read_or_write...
d90cc4bc45c3a8a19c9bf8b2ecf5c99734996310619db63fd82c5d15d5af532a
imandra-ai/catapult
backend.ml
open Catapult_utils module P = Catapult module Tracing = P.Tracing module Atomic = P.Atomic_shim_ type event = P.Ser.Event.t module type ARG = sig val writer : Writer.t end module Make (A : ARG) : P.BACKEND = struct let writer = A.writer type local_buf = { t_id: int; buf: Buffer.t; mutable evs: st...
null
https://raw.githubusercontent.com/imandra-ai/catapult/4bc5444a8471c5d0d7cb9a376a5a895c0ab042e6/src/sqlite/backend.ml
ocaml
batch send current batch to the writer check if we need to flush the batch per-thread buffer emit [k:v] using printer [f] for the value access local buffer to write and add to batch
open Catapult_utils module P = Catapult module Tracing = P.Tracing module Atomic = P.Atomic_shim_ type event = P.Ser.Event.t module type ARG = sig val writer : Writer.t end module Make (A : ARG) : P.BACKEND = struct let writer = A.writer type local_buf = { t_id: int; buf: Buffer.t; mutable n_evs: ...
43d31810aac9f2b803aa1c078efd4122d0f20718b3035148d3a91121782a4139
kawasima/darzana
mapper_test.clj
(ns darzana.command.mapper-test (:require [integrant.core :as ig] [duct.core :as duct] [darzana.command.mapper :as sut] [darzana.api-spec.swagger] [darzana.validator.hibernate-validator] [darzana.runtime :as runtime] [clojure.test :refer :all])) ...
null
https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/test/darzana/command/mapper_test.clj
clojure
(ns darzana.command.mapper-test (:require [integrant.core :as ig] [duct.core :as duct] [darzana.command.mapper :as sut] [darzana.api-spec.swagger] [darzana.validator.hibernate-validator] [darzana.runtime :as runtime] [clojure.test :refer :all])) ...
8fe7148b8aa75d534bb49254417d5f4bc3a48022aed099f9a92154ab51e844a5
RobBlackwell/cl-azure
media.lisp
;;;; media.lisp Copyright ( c ) 2012 , . All rights reserved . (in-package #:cl-azure) See Windows Azure Media Services REST API Reference ;;; See -us/library/windowsazure/hh973618.aspx (defconstant +media-oauth-url+ "-13") (defconstant +media-api-url+ "-hs.cloudapp.net/api/") Define a protocol for dealin...
null
https://raw.githubusercontent.com/RobBlackwell/cl-azure/03b097256d85ea09f090987c0c833c61eb7b9b5d/media.lisp
lisp
media.lisp See -us/library/windowsazure/hh973618.aspx and a default implementation The REST API
Copyright ( c ) 2012 , . All rights reserved . (in-package #:cl-azure) See Windows Azure Media Services REST API Reference (defconstant +media-oauth-url+ "-13") (defconstant +media-api-url+ "-hs.cloudapp.net/api/") Define a protocol for dealing with Windows Azure Media Services credentials (defgeneric me...
8f5e07b9ab700f04841129651ba45b3fa3a84034fc418b2b5e5423c8b0cbd3dc
poroh/ersip
ersip_reply.erl
%% Copyright ( c ) 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% %% Defines ways of replying on the SIP request %% -module(ersip_reply). -export([new/1, new/2, status/1, reason/1, to_tag/1 ]). -expor...
null
https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/src/ersip_reply.erl
erlang
All rights reserved. Defines ways of replying on the SIP request =================================================================== Types =================================================================== =================================================================== API ==================================...
Copyright ( c ) 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . -module(ersip_reply). -export([new/1, new/2, status/1, reason/1, to_tag/1 ]). -export_type([options/0, params_list/0 ]). -record(option...
0dc34dd68c1e04ffbc44354481bbf1515293c72a505404293afbc72bcbbfc9e2
mit-pdos/mcqc
Bool.hs
{-# LANGUAGE OverloadedStrings #-} module Sema.Bool where import Data.MonoTraversable import CIR.Expr -- TODO: add more bool expression semantics boolSemantics :: CExpr -> CExpr -- Semantics for True and False boolSemantics CExprCall { _cd = CDef { _nm = "coq_true" }, _cparams = [] } = CExprBool True boolSemantics C...
null
https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/Sema/Bool.hs
haskell
# LANGUAGE OverloadedStrings # TODO: add more bool expression semantics Semantics for True and False
module Sema.Bool where import Data.MonoTraversable import CIR.Expr boolSemantics :: CExpr -> CExpr boolSemantics CExprCall { _cd = CDef { _nm = "coq_true" }, _cparams = [] } = CExprBool True boolSemantics CExprCall { _cd = CDef { _nm = "coq_false" }, _cparams = [] } = CExprBool False boolSemantics other = omap boolSe...
e2c5ac222fc9f4395dce9507732b7798f88b793933f313aaa0c0eb49f157e801
NetComposer/nksip
nksip_refer_plugin.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2019 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/plugins/nksip_refer_plugin.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2019 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(nksip_refer_plugin)....
04798bf2a61450cde16a306119a04d0446575add8effef617bb9e9ad9e11918b
McMasterU/HashedExpression
State.hs
-- | -- Module : HashedExpression.Differentiation.Reverse.State -- Copyright : (c) OCA 2020 License : MIT ( see the LICENSE file ) -- Maintainer : -- Stability : provisional -- Portability : unportable -- -- Helper for reverse accumulation method module HashedExpression.Differentiation.Reverse....
null
https://raw.githubusercontent.com/McMasterU/HashedExpression/cfe9f21165f1f3fc6d59ec27fb962c29e67a9bbb/src/HashedExpression/Differentiation/Reverse/State.hs
haskell
| Module : HashedExpression.Differentiation.Reverse.State Copyright : (c) OCA 2020 Maintainer : Stability : provisional Portability : unportable Helper for reverse accumulation method cumulative derivatives incurred by parents | | | |
License : MIT ( see the LICENSE file ) module HashedExpression.Differentiation.Reverse.State ( from, addDerivative, setPartialDerivative, ComputeReverseM, ComputeDState (..), ) where import Control.Monad.State.Strict import qualified Data.IntMap.Strict as IM import Data.List (foldl') impor...
24d0e5385320289a0dc7c5c5da88d781a15f0b9c35ffffb9948dc61440a735c8
mstksg/typelits-printf
Internal.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DefaultSignatures #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE Multi...
null
https://raw.githubusercontent.com/mstksg/typelits-printf/c0cd3d5da3696c80c4d630bafda36ffc403a1d10/src/GHC/TypeLits/Printf/Internal.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DefaultSignatures # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeInType # # LANGUAGE TypeOperators # | License : BSD3 Stabili...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # LANGUAGE UndecidableIns...
a9980b4f2a3c113321a0c20827e58eb4b102940b170f0a701426aabda7177a2d
basho/basho_bench
basho_bench.erl
%% ------------------------------------------------------------------- %% %% basho_bench: Benchmarking Suite %% Copyright ( c ) 2009 - 2012 Basho Techonologies %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License...
null
https://raw.githubusercontent.com/basho/basho_bench/aa66398bb6a91645dbb97e91a236f3cdcd1f188f/src/basho_bench.erl
erlang
------------------------------------------------------------------- basho_bench: Benchmarking Suite 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 spe...
Copyright ( c ) 2009 - 2012 Basho Techonologies This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(basho_bench). -export(...
db6066d75bbde7ccbdb6274c24bfad6c63eeeac0550370ca03cbc11ca8bbf8a2
alvatar/spheres
test-fmt.scm
(cond-expand (chicken (load "fmt-chicken.scm")) (else)) (cond-expand (chicken (use test) (import fmt)) (gauche (use gauche.test) (use text.fmt) (define test-begin test-start) (define orig-test (with-module gauche.test test)) (define-syntax test (syntax-rules () ((test name expected expr)...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/string/fmt/test/test-fmt.scm
scheme
basic data types (test "1e+23" (fmt #f (num 1e+23))) exact rationals (cond ((feature? 'full-numeric-tower) (test "1+2i" (fmt #f (string->number "1+2i"))) (test "1+2i" (fmt #f (num (string->number "1+2i")))) padding/trimming utilities shared structures without shared detection pretty printing (define-m...
(cond-expand (chicken (load "fmt-chicken.scm")) (else)) (cond-expand (chicken (use test) (import fmt)) (gauche (use gauche.test) (use text.fmt) (define test-begin test-start) (define orig-test (with-module gauche.test test)) (define-syntax test (syntax-rules () ((test name expected expr)...
00a66a8f85bc3ce718930a3690834385fcbbc2bc2ee1ad8ae1e2d1c99355a703
mirage/alcotest
pp_intf.ml
* Copyright ( c ) 2013 - 2016 < > * Copyright ( c ) 2019 < > * * 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 . * ...
null
https://raw.githubusercontent.com/mirage/alcotest/e2d5ddf31594e0f9c3bcef98ca4859856b281efc/src/alcotest-engine/pp_intf.ml
ocaml
* Type corresponding to a [%t] placeholder. * Wraps a formatter with `GNU-style quotation marks'. * Raise a user error, then fail.
* Copyright ( c ) 2013 - 2016 < > * Copyright ( c ) 2019 < > * * 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 . * ...
307f00ef5e3a7024932dcdedb5c68c2cc3f1b02906ab8d93200a23377982124a
duo-lang/duo-lang
BenchRunner.hs
module Main where import Criterion.Main import Control.Monad.Except import Data.List.NonEmpty (NonEmpty) import Driver.Definition (defaultDriverState, parseAndCheckModule) import Driver.Driver (inferProgramIO) import Errors import Syntax.CST.Program qualified as CST import Syntax.CST.Names import Syntax.TST.Program q...
null
https://raw.githubusercontent.com/duo-lang/duo-lang/ee1dfcfc2aba1011ffd7880debaa17ac9e645dcd/bench/BenchRunner.hs
haskell
module Main where import Criterion.Main import Control.Monad.Except import Data.List.NonEmpty (NonEmpty) import Driver.Definition (defaultDriverState, parseAndCheckModule) import Driver.Driver (inferProgramIO) import Errors import Syntax.CST.Program qualified as CST import Syntax.CST.Names import Syntax.TST.Program q...
3df61a152e6bc8653d0282718aca2b4276114a69cb9b6c75865d2eff1c61b530
BitGameEN/bitgamex
erlcloud_ec2_meta.erl
-module(erlcloud_ec2_meta). -include("erlcloud.hrl"). -include("erlcloud_aws.hrl"). -export([get_instance_metadata/0, get_instance_metadata/1, get_instance_metadata/2, get_instance_user_data/0, get_instance_user_data/1, get_instance_dynamic_data/0, get_instance_dynamic_data/1, get_instance_dynamic_dat...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/src/erlcloud_ec2_meta.erl
erlang
--------------------------------------------------------------------------- --------------------------------------------------------------------------- @doc Retrieve the instance meta data for the instance this code is running on. Will fail if not an EC2 instance. This convenience function will retrieve the instance...
-module(erlcloud_ec2_meta). -include("erlcloud.hrl"). -include("erlcloud_aws.hrl"). -export([get_instance_metadata/0, get_instance_metadata/1, get_instance_metadata/2, get_instance_user_data/0, get_instance_user_data/1, get_instance_dynamic_data/0, get_instance_dynamic_data/1, get_instance_dynamic_dat...
4e45f8b9b37631f84b0eda30de986a28ff38999bf961a48799891db5d92ece98
solita/mnt-teet
filename_metadata_test.clj
(ns teet.file.filename-metadata-test (:require [teet.file.filename-metadata :refer [filename->metadata metadata->filename]] [clojure.test :refer [deftest is]] [teet.util.string :as string])) (def example-filenames ["MA14658_EP_TL_PT_00_Proje...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/test/teet/file/filename_metadata_test.clj
clojure
(ns teet.file.filename-metadata-test (:require [teet.file.filename-metadata :refer [filename->metadata metadata->filename]] [clojure.test :refer [deftest is]] [teet.util.string :as string])) (def example-filenames ["MA14658_EP_TL_PT_00_Proje...
cd15fd3f89a4242e3aabaeb50674441e3684104894049a6eeed1ebbb96045be5
racket/racket7
atomic.rkt
#lang racket/base (require '#%unsafe (for-syntax racket/base)) (provide (protect-out in-atomic-mode? start-atomic end-atomic start-breakable-atomic end-breakable-atomic call-as-atomic ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/ffi/unsafe/atomic.rkt
racket
---------------------------------------- An exception may be constructed while we're entered: Increment atomicity level for cooperation with anything that is sensitive to the current depth of atomicity. Get out of atomic region before letting an exception handler work defer to previous exn handler disables spe...
#lang racket/base (require '#%unsafe (for-syntax racket/base)) (provide (protect-out in-atomic-mode? start-atomic end-atomic start-breakable-atomic end-breakable-atomic call-as-atomic ...
31795b0df738883a65ed33081b001a4982c8bdb1267e16fcc489db3df28e3c2d
avras/nsime
nsime_droptail_queue_SUITE.erl
%% Copyright ( C ) 2012 < > %% %% This file is part of nsime. %% nsime is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option) any later version....
null
https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/test/nsime_droptail_queue_SUITE.erl
erlang
This file is part of nsime. (at your option) any later version. nsime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with...
Copyright ( C ) 2012 < > nsime is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Author :...
2855800db3e281e89d478eee10ac58ad871c84ae909ebf90ceb19c983887d96f
emqx/emqx-exproto
emqx_exproto.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-exproto/7aff2dae106302fdcdcd0d5ce31fe90df4861013/src/emqx_exproto.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 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_exproto). -compile({no_auto_import, [register/1]}). -include("emqx_exproto.hrl"). -expo...
541da9bd60f4faab9b509e107b9a6f12321dcd0fae7eced6ba315f606f23cdaf
NorfairKing/smos
ClockSpec.hs
module Smos.Report.ClockSpec where import Data.GenValidity.Path () import Smos.Data.Gen () import Smos.Report.Clock import Smos.Report.Clock.Gen () import Smos.Report.Filter.Gen () import Test.Syd import Test.Syd.Validity spec :: Spec spec = do describe "zeroOutByFilter" $ it "produces valid smos files" $ ...
null
https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-report-gen/test/Smos/Report/ClockSpec.hs
haskell
module Smos.Report.ClockSpec where import Data.GenValidity.Path () import Smos.Data.Gen () import Smos.Report.Clock import Smos.Report.Clock.Gen () import Smos.Report.Filter.Gen () import Test.Syd import Test.Syd.Validity spec :: Spec spec = do describe "zeroOutByFilter" $ it "produces valid smos files" $ ...
e700d672187cefe151a7cc9eaefd3ba95e3426fcd16584e94f809a58e78dfc72
cabol/cross_db
person.erl
-module(person). -export([ new/2, new/3, new/4, changeset/2, all/2, list_to_map/1 ]). -include_lib("cross_db/include/xdb.hrl"). -schema({people, [ {id, integer, [primary_key]}, {first_name, string}, {last_name, string}, {age, integer}, {address, string}, {bir...
null
https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/src/test/models/person.erl
erlang
@equiv new(FirstName, LastName, undefined) @equiv new(FirstName, LastName, Age, undefined)
-module(person). -export([ new/2, new/3, new/4, changeset/2, all/2, list_to_map/1 ]). -include_lib("cross_db/include/xdb.hrl"). -schema({people, [ {id, integer, [primary_key]}, {first_name, string}, {last_name, string}, {age, integer}, {address, string}, {bir...
07ec773e557ab2ec4d20783271dd585d9a042953640ea1284b517e430195f8b2
kelamg/HtDP2e-workthrough
ex48.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 ex48) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex48.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex48) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (reward s) (cond [(<= 0 s 10) "bronze"] [(and (< ...
6c7cbdbbca1100f6f8cf95425ce4a67da86902173c1827f2f84318f3c796f7e7
argp/bap
unicode.ml
let say x = IO.nwrite IO.stdout x; IO.write IO.stdout '\n' let usay = IO.write_uline IO.stdout let s1 = "Simple ASCII string" and s2 = "Complex: á é í ó ú" let u1 = UTF8.of_string s1 let rope1 = Rope.of_ustring u1 and rope2 = Rope.of_latin1 s2 let rec exp_dup n r = if n <= 0 then r else exp_dup (n-1) (Rope.append ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/examples/snippets/unicode.ml
ocaml
let say x = IO.nwrite IO.stdout x; IO.write IO.stdout '\n' let usay = IO.write_uline IO.stdout let s1 = "Simple ASCII string" and s2 = "Complex: á é í ó ú" let u1 = UTF8.of_string s1 let rope1 = Rope.of_ustring u1 and rope2 = Rope.of_latin1 s2 let rec exp_dup n r = if n <= 0 then r else exp_dup (n-1) (Rope.append ...
2a8ec20a9fa18b858df073e0e7e410beaad27908d25db2376bb3ef5c4ec07b17
arttuka/reagent-material-ui
card_actions.cljs
(ns reagent-mui.material.card-actions "Imports @mui/material/CardActions as a Reagent component. Original documentation is at -ui/api/card-actions/ ." (:require [reagent.core :as r] ["@mui/material/CardActions" :as MuiCardActions])) (def card-actions (r/adapt-react-class (.-default MuiCardActions)))...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/card_actions.cljs
clojure
(ns reagent-mui.material.card-actions "Imports @mui/material/CardActions as a Reagent component. Original documentation is at -ui/api/card-actions/ ." (:require [reagent.core :as r] ["@mui/material/CardActions" :as MuiCardActions])) (def card-actions (r/adapt-react-class (.-default MuiCardActions)))...
f508aa63b1c29682111b887295f05fd54f6978e9c6b5ad94578131b68cf06a99
wireless-net/erlang-nommu
release_handler.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/sasl/src/release_handler.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 1996 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(release_handler). -behaviour(gen_se...
5a1646ec0b0733bda91ff47501689cd84c047c3ca619a49af9370fd0e730c7c6
yzh44yzh/practical_erlang
chat_user.erl
-module(chat_user). -behavior(gen_server). -export([start_link/0, add_message/3, get_messages/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -type(name() :: binary()). -type(message() :: {name(), binary()}). -record(state, { messages = [] :: [message()] ...
null
https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/10_gen_server_2/solution/chat_user.erl
erlang
module API gen_server API
-module(chat_user). -behavior(gen_server). -export([start_link/0, add_message/3, get_messages/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -type(name() :: binary()). -type(message() :: {name(), binary()}). -record(state, { messages = [] :: [message()] ...
779e67cfbbf863a84ba356f2229ac040609b75b341d84f7c4d87b909efe0f37a
VisionsGlobalEmpowerment/webchange
interactive_read_aloud_import.clj
(ns webchange.dev-templates.interactive-read-aloud-import (:require [webchange.dev-templates :as t] [webchange.templates.core :as templates] [webchange.course.core :as core])) (comment (def test-course-slug (-> (t/create-test-course) :slug)) (def scene-slug "test-activity") (core/updat...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/env/dev/clj/webchange/dev_templates/interactive_read_aloud_import.clj
clojure
add dialog add question Book copy: IRA copy: Fix book-link sleepy mr sloth ira 1: sleepy mr sloth
(ns webchange.dev-templates.interactive-read-aloud-import (:require [webchange.dev-templates :as t] [webchange.templates.core :as templates] [webchange.course.core :as core])) (comment (def test-course-slug (-> (t/create-test-course) :slug)) (def scene-slug "test-activity") (core/updat...
1daba4a750dcff6f910e92c689d389aca1bf472dfe93336ad2fe21470b2bd6ae
matsen/pplacer
fig.mli
open Ppatteries type t val figs_of_gtree: float -> Newick_gtree.t -> t val enum_by_score: (int -> float) -> float -> t -> (float * int) Enum.t val enum_all: t -> int Enum.t val length: t -> int val onto_decor_gtree: Decor_gtree.t -> t -> Decor_gtree.t
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/fig.mli
ocaml
open Ppatteries type t val figs_of_gtree: float -> Newick_gtree.t -> t val enum_by_score: (int -> float) -> float -> t -> (float * int) Enum.t val enum_all: t -> int Enum.t val length: t -> int val onto_decor_gtree: Decor_gtree.t -> t -> Decor_gtree.t
19df6b68408a55001aee0f87753d006698173cf8d7b23391b7fb29dde91030f9
rescript-association/doc-tools
Main.ml
module Config = struct let runtime_path ~bs_project_dir = bs_project_dir ^ "/jscomp/runtime" let belt_path ~bs_project_dir = bs_project_dir ^ "/jscomp/others" let odoc_cache_path ~output_dir = output_dir ^ "/_odoc" let json_path ~output_dir = output_dir ^ "/_json" end let run cmd = cmd ...
null
https://raw.githubusercontent.com/rescript-association/doc-tools/5dfdf4400a617c331409bb94f97f3daf930626b3/src/Main.ml
ocaml
* Given a package compile it and produce JSON files with odoc.
module Config = struct let runtime_path ~bs_project_dir = bs_project_dir ^ "/jscomp/runtime" let belt_path ~bs_project_dir = bs_project_dir ^ "/jscomp/others" let odoc_cache_path ~output_dir = output_dir ^ "/_odoc" let json_path ~output_dir = output_dir ^ "/_json" end let run cmd = cmd ...
eed9271dfda4655c1c2a4e58397510d5f9f3b99215852bb3f8551df65854c2e9
clojure/clojurescript
test.cljs
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; the t...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/samples/repl/src/repl/test.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. [clo...
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns repl.test (:require [clojure.browser.repl :as repl] )) (defonce conn (repl/connect ":9000/repl")) (comment Compile this project to JavaScript (use 'cljs.closure) (def opts {:output-to "samples/repl/main....
e2660bc76b5af3ee1451f6b3ad9475a6f4d517dadcc498928bdeb06893657cc4
gvolpe/musikell
Neo.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} -- | The Neo4j connection pool. module Repository.Neo ( mkPipePool ) where import Config ( Neo4jConfig(..) ) import Data.Pool ( Pool , createPool ...
null
https://raw.githubusercontent.com/gvolpe/musikell/2ec837b605b87b268e460cd6e13b82e7eea8169b/src/Repository/Neo.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards # | The Neo4j connection pool.
module Repository.Neo ( mkPipePool ) where import Config ( Neo4jConfig(..) ) import Data.Pool ( Pool , createPool ) import Data.Text ...
dee90f1745be4ef0007d6bb55cf5a97342bc00ec82ca8263c9263aa050c06755
auser/hermes
thrift_ambassador.erl
%%%------------------------------------------------------------------- %%% File : Author : %%% Description : %%% Created : We d Aug 12 14:19:36 PDT 2009 %%%------------------------------------------------------------------- -module (thrift_ambassador). -include ("hermes.hrl"). -include ("poolparty_types...
null
https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/src/ambassador/ambassadors/thrift_ambassador.erl
erlang
------------------------------------------------------------------- File : Description : ------------------------------------------------------------------- API gen_server callbacks args to start with thrift client pid port times to retry ===================================================================...
Author : Created : We d Aug 12 14:19:36 PDT 2009 -module (thrift_ambassador). -include ("hermes.hrl"). -include ("poolparty_types.hrl"). -include ("commandInterface_thrift.hrl"). -include ("poolparty_constants.hrl"). -behaviour(gen_server). -export([start_link/1]). -export ([ ask/3, ru...
8d04d67457229ac65e83bec6fafb4509410314156b270c78d3b85a3746d1991e
engineyard/vertebra-erl
error_builder.erl
Copyright 2008 , Engine Yard , Inc. % This file is part of Vertebra . % Vertebra is free software : you can redistribute it and/or modify it under the % terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any % lat...
null
https://raw.githubusercontent.com/engineyard/vertebra-erl/cf6e7c84f6dfbf2e31f19c47e9db112ae292ec27/lib/vertebra/src/error_builder.erl
erlang
terms of the GNU Lesser General Public License as published by the Free later version. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Copyright 2008 , Engine Yard , Inc. This file is part of Vertebra . Vertebra is free software : you can redistribute it and/or modify it under the Software Foundation , either version 3 of the License , or ( at your option ) any Vertebra is distributed in the hope that it will be useful , but WITHOUT ANY Yo...
300f4ec5454313db507ef94dabff5a079fb043ad5077c93105c4adbb022d3a84
denisidoro/graffiti
keyword.clj
(ns graffiti.keyword (:require [camel-snake-kebab.core :as snake] [clojure.spec.alpha :as s] [com.wsscode.pathom.connect :as pc] [quark.collection.map :as map] [clojure.string :as str])) (defn from-ident [ident] (let [get-spec (s/get-spec ident)] (if (keyword? ...
null
https://raw.githubusercontent.com/denisidoro/graffiti/f4ea2103e060fafe2c84a14aff5f68cf8039e1aa/src/graffiti/keyword.clj
clojure
(ns graffiti.keyword (:require [camel-snake-kebab.core :as snake] [clojure.spec.alpha :as s] [com.wsscode.pathom.connect :as pc] [quark.collection.map :as map] [clojure.string :as str])) (defn from-ident [ident] (let [get-spec (s/get-spec ident)] (if (keyword? ...
b559dff9f09711db6589821c9381448bc34320a98100fe9416999b6e0d539ad1
aelve/guide
Core.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # -- | Core types for content. -- -- The whole site is a list of categories ('Category'). Categories have -- items ('Item') in them. Items have some sections (fields inside of -- 'Item'), as well as traits ('Trait'). module Guide.Types.Core ( Trai...
null
https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Types/Core.hs
haskell
# LANGUAGE FlexibleContexts # | Core types for content. The whole site is a list of categories ('Category'). Categories have items ('Item') in them. Items have some sections (fields inside of 'Item'), as well as traits ('Trait'). acid-state ----------------------------------------------------------------------...
# LANGUAGE FlexibleInstances # module Guide.Types.Core ( Trait(..), TraitLenses(..), TraitType (..), ItemKind(..), hackageName, ItemSection(..), Item(..), ItemLenses(..), CategoryStatus(..), Category(..), CategoryLenses(..), categorySlug, ) where import Imports import Data.SafeCopy hid...
a9bb197f0a4e54ca752b020379cc27abd1c4512eceb408b843bf221466df47f2
meain/evil-textobj-tree-sitter
textobjects.scm
(block (body)? @block.inner ) @block.outer (block (body (_) @statement.outer)) (comment) @comment.outer
null
https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/f3b3e9554e5ecae55200454804e183e268b4a6fc/queries/hcl/textobjects.scm
scheme
(block (body)? @block.inner ) @block.outer (block (body (_) @statement.outer)) (comment) @comment.outer
65d04fd2f3096815e1473c7aba3c3b34369de64031ed45d9c9c9f8c85ac0eb22
Clozure/ccl-tests
numbers-aux.lsp
;-*- Mode: Lisp -*- Author : Created : Mon Apr 7 07:24:43 2003 ;;;; Contains: Auxiliary functions for number tests (in-package :cl-test) (eval-when (:compile-toplevel :load-toplevel :execute) (compile-and-load "random-aux.lsp")) ;;; Binary search on reals (defun float-binary-search (fn lo hi) "...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/numbers-aux.lsp
lisp
-*- Mode: Lisp -*- Contains: Auxiliary functions for number tests Binary search on reals to a float, the effect is as if the float is convert to a rational (by RATIONAL), not as if the rational is converted to a float. This means the calls to numbers-are-compatible are not necessary. (not (numbers-are-compati...
Author : Created : Mon Apr 7 07:24:43 2003 (in-package :cl-test) (eval-when (:compile-toplevel :load-toplevel :execute) (compile-and-load "random-aux.lsp")) (defun float-binary-search (fn lo hi) "FN is a function that, if true for X, is true for all Y > X. Find the smallest float in [lo,hi] for ...
0448e504c3dae537efb35a96e8ed947b0b9e335e7bf3370d75de35fc957a965c
Bogdanp/racket-forms
form-tests.rkt
#lang racket/base (require forms (submod forms/private/form internal) racket/match racket/string rackunit (only-in web-server/http make-binding:form) "util.rkt") (provide form-tests) (define empty-form (form* () #f)) (struct signup-data (username password) #...
null
https://raw.githubusercontent.com/Bogdanp/racket-forms/80e6dee1184ab4c435678bb3c45fa11bfabf56ee/forms-test/tests/forms/form-tests.rkt
racket
#lang racket/base (require forms (submod forms/private/form internal) racket/match racket/string rackunit (only-in web-server/http make-binding:form) "util.rkt") (provide form-tests) (define empty-form (form* () #f)) (struct signup-data (username password) #...
f24148c117864a7e3d5148dc384e616d879e8a2e77c1daecb9a0cfdca21df8d3
juxt/bolt
project.clj
Copyright © 2014 JUXT LTD . (defproject bolt "0.6.0-SNAPSHOT" :description "An integrated security system for applications built on component" :url "" :license {:name "The MIT License" :url ""} :dependencies [[org.clojure/tools.logging "0.3.1"] [juxt.modular/bidi "0.9.2" :exclusions [bidi]]...
null
https://raw.githubusercontent.com/juxt/bolt/f77be416f82c1ca19d5dc20a15942375edc9b740/project.clj
clojure
We should probably replace clj-jwt with buddy Important we exclude bc here otherwise get an this exception: class "org.bouncycastle.crypto.digests.SHA3Digest"'s signer information does not match signer information of other classes in the same package Possibly needed old dependencies
Copyright © 2014 JUXT LTD . (defproject bolt "0.6.0-SNAPSHOT" :description "An integrated security system for applications built on component" :url "" :license {:name "The MIT License" :url ""} :dependencies [[org.clojure/tools.logging "0.3.1"] [juxt.modular/bidi "0.9.2" :exclusions [bidi]]...
0af2637550095b0a7c8ebc42e23ca18e5d702d7aadcf039f335878b6f4bca075
racket/typed-racket
bad-vector-ref.rkt
#lang racket/base ;; Test applications of `vector-ref` that should fail due to mis-matched ;; values and type constructors (module t typed/racket/optional (: f (-> (Vectorof Natural) Natural)) (define (f x) (+ (vector-ref x 0) (vector-ref x 1))) (: g (-> (Vectorof (Vectorof Natural)) Natural)) (de...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/bad-vector-ref.rkt
racket
Test applications of `vector-ref` that should fail due to mis-matched values and type constructors
#lang racket/base (module t typed/racket/optional (: f (-> (Vectorof Natural) Natural)) (define (f x) (+ (vector-ref x 0) (vector-ref x 1))) (: g (-> (Vectorof (Vectorof Natural)) Natural)) (define (g x) (define v (vector-ref x 0)) (+ (vector-ref (vector-ref x 0) 0) (vector-ref v 1))) (: ...
ba736601e8b44a291e4c36a11c760d1c7808e5edbc0a66a70c835fceaf986184
taruen/apertiumpp
info.rkt
#lang info (define scribblings '(("scribblings/apertiumpp-kaz.scrbl" ())))
null
https://raw.githubusercontent.com/taruen/apertiumpp/73eeacc19015170e54c77824e015224f6456cf3e/apertiumpp-kaz/info.rkt
racket
#lang info (define scribblings '(("scribblings/apertiumpp-kaz.scrbl" ())))
7bb44a07fd110272ae48b4461fbef4b6cd65a3d2ef1c3f1052853ef72da22321
fpco/ide-backend
IPI641.hs
----------------------------------------------------------------------------- -- | Module : Distribution . Simple . Copyright : ( c ) The University of Glasgow 2004 -- License : BSD3 -- -- Maintainer : -- Portability : portable -- module Distribution.Simple.GHC.IPI641 ( InstalledPackageI...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/Simple/GHC/IPI641.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer : Portability : portable It's here purely for the 'Read' instance so that we can read the package package db directly, but we do need the info and until ghc-6.9 there was no better method.
Module : Distribution . Simple . Copyright : ( c ) The University of Glasgow 2004 module Distribution.Simple.GHC.IPI641 ( InstalledPackageInfo(..), toCurrent, ) where import qualified Distribution.InstalledPackageInfo as Current import qualified Distribution.Package as Current hiding (depe...
fd2fd9dc4ece9a5b9a1111227ce251bb2f54a98e8588e5b68bfd9c576fd1f29c
dalaing/reflex-host-examples
Host1.hs
Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} {-# LANGUAGE RankNTypes #-} module Host1 ( go1 ) where import Contr...
null
https://raw.githubusercontent.com/dalaing/reflex-host-examples/ef3aa5f428e87b289fd7999c97ee679c231b5e05/src/Host1.hs
haskell
# LANGUAGE RankNTypes # First we define a type for our applications. In this case, our applications will take an 'Event t String' as input return a 'Behavior t Int' as output. While we're at it, we capture various typeclass constraints that we know we're going to need in this type synonym. This is our sample ...
Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} module Host1 ( go1 ) where import Control.Monad (forever) import Co...
df09afe5cac04b0a20f0326fde59fe134c78d41eb791b32b0f02d98910db37dc
hiroshi-unno/coar
parser.mli
open Core val from_cctl_file: string -> (MuCLP.Problem.t, Error.t) result val from_cltl_file: string -> (MuCLP.Problem.t, Error.t) result val parse_cctl: string -> (MuCLP.Problem.t, Error.t) result val parse_cltl: string -> (MuCLP.Problem.t, Error.t) result
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/c/parser.mli
ocaml
open Core val from_cctl_file: string -> (MuCLP.Problem.t, Error.t) result val from_cltl_file: string -> (MuCLP.Problem.t, Error.t) result val parse_cctl: string -> (MuCLP.Problem.t, Error.t) result val parse_cltl: string -> (MuCLP.Problem.t, Error.t) result
343c744ef12c8d33262cef745833876453e1ca352a6fa615c787437c51f4cf92
ocaml/odoc
rendering.ml
open Odoc_document open Or_error let document_of_odocl ~syntax input = Odoc_file.load input >>= fun unit -> match unit.content with | Odoc_file.Page_content odoctree -> Ok (Renderer.document_of_page ~syntax odoctree) | Unit_content odoctree -> Ok (Renderer.document_of_compilation_unit ~syntax odoct...
null
https://raw.githubusercontent.com/ocaml/odoc/40aa7587a5140a88d77c2ce400f426acf5da79a8/src/odoc/rendering.ml
ocaml
open Odoc_document open Or_error let document_of_odocl ~syntax input = Odoc_file.load input >>= fun unit -> match unit.content with | Odoc_file.Page_content odoctree -> Ok (Renderer.document_of_page ~syntax odoctree) | Unit_content odoctree -> Ok (Renderer.document_of_compilation_unit ~syntax odoct...
ec6803b1072ebf2b334cba1b121498b33a0dc9d89f19a59833462b181b52926f
chaoxu/fancy-walks
133.hs
R(10^n ) = ( 10^(10^n ) - 1 ) / 9 R(10^n ) % p = = 0 < = = > 10^(10^n ) % ( 9 * n ) = = 1 < = = > 10^(10^n ) % 9 = = 1(surely ) & & 10^(10^n ) % p = = 1 < = = > 10^(10^n % ( p - 1 ) ) % p = = 1 < = = > 10^n % ( p - 1 ) should be mutiple of order...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/133.hs
haskell
R(10^n ) = ( 10^(10^n ) - 1 ) / 9 R(10^n ) % p = = 0 < = = > 10^(10^n ) % ( 9 * n ) = = 1 < = = > 10^(10^n ) % 9 = = 1(surely ) & & 10^(10^n ) % p = = 1 < = = > 10^(10^n % ( p - 1 ) ) % p = = 1 < = = > 10^n % ( p - 1 ) should be mutiple of order...
b3dd54ab43dc4c55fd79cee3ce00c572866bf9971b9aa36d1178252a0746e2fc
gedge-platform/gedge-platform
rabbit_mgmt_sup_sup.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_sup_sup). -behaviour(superviso...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_sup_sup.erl
erlang
This scope is used in the child process, so start it early. We don't attach it to the supervision tree because * rabbitmq_management and rabbitmq_management_agent share a scope * start an already running scope results in an "already started" error returned * such errors wreck supervision tree startup So we ex...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_sup_sup). -behaviour(supervisor). -...
1eafe25b6388d9f1698ff76d6a8d825e0bcc9861a9fdde1df52bab5ab9371906
BumblebeeBat/FlyingFox
channel_close_tx.erl
%If you did not get slashed, and you waited delay since channel_timeout, then this is how you close the channel and get the money out. -module(channel_close_tx). -export([doit/7, slow_close/2, id/1]). -record(channel_close, {acc = 0, nonce = 0, id = 0, fee = 0}). id(X) -> X#channel_close.id. doit(Tx, ParentKey, Chann...
null
https://raw.githubusercontent.com/BumblebeeBat/FlyingFox/0fa039cd2394b08b1a85559f9392086c6be47fa6/src/consensus/txs/channel_close_tx.erl
erlang
If you did not get slashed, and you waited delay since channel_timeout, then this is how you close the channel and get the money out.
-module(channel_close_tx). -export([doit/7, slow_close/2, id/1]). -record(channel_close, {acc = 0, nonce = 0, id = 0, fee = 0}). id(X) -> X#channel_close.id. doit(Tx, ParentKey, Channels, Accounts, TotalCoins, S, NewHeight) -> Id = Tx#channel_close.id, Channel = block_tree:channel(Id, ParentKey, Channels), ...
8c0fd751dde966ac637c82a5c3fbdd680716d7952ca874c15c9c184a47902cdb
lem-project/lem
ex-command.lisp
(defpackage :lem-vi-mode.ex-command (:use :cl :lem-vi-mode.ex-core) (:import-from #:lem-vi-mode.jump-motions #:with-jump-motion)) (in-package :lem-vi-mode.ex-command) (defun ex-write (range filename touch) (case (length range) (0 (if (string= filename "") (lem:save-current-buffer t...
null
https://raw.githubusercontent.com/lem-project/lem/4f620f94a1fd3bdfb8b2364185e7db16efab57a1/modes/vi-mode/ex-command.lisp
lisp
(defpackage :lem-vi-mode.ex-command (:use :cl :lem-vi-mode.ex-core) (:import-from #:lem-vi-mode.jump-motions #:with-jump-motion)) (in-package :lem-vi-mode.ex-command) (defun ex-write (range filename touch) (case (length range) (0 (if (string= filename "") (lem:save-current-buffer t...
412c527e2bcba457313e977796245fcd55da19bfa9b9f73ff0f50ca6d0d8e40e
jeroanan/rkt-coreutils
gidutil.rkt
#lang typed/racket/base Copyright 2020 ; See COPYING for details (provide gid->group-name get-user-groups) (require typed/racket/class) (require/typed "../libc/grp.rkt" [get-getgrgid (-> Number (Instance Getgrgid%))] [get-group-list (-> String Number (Listof Integer))]) (...
null
https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/repl/util/gidutil.rkt
racket
See COPYING for details Take a group id and return its name Get all groups that the given user-name is a member of
#lang typed/racket/base Copyright 2020 (provide gid->group-name get-user-groups) (require typed/racket/class) (require/typed "../libc/grp.rkt" [get-getgrgid (-> Number (Instance Getgrgid%))] [get-group-list (-> String Number (Listof Integer))]) (require/typed "../libc/pwd...
86b38bb5b4ba96dacb87ecd8291f9c2ba788eabb1211aab142ad625335a3414b
jrh13/hol-light
Propositional_logic.ml
TAUT `(~input_a ==> (internal <=> T)) /\ (~input_b ==> (output <=> internal)) /\ (input_a ==> (output <=> F)) /\ (input_b ==> (output <=> F)) ==> (output <=> ~(input_a \/ input_b))`;; TAUT `(i1 /\ i2 <=> a) /\ (i1 /\ i3 <=> b) /\ (i2 /\ i3 <=> c) /\ (i1 /\ c <=> d) /\ (m /\ r <=> e) /\ (m /\ w <=> f) /\ ...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Tutorial/Propositional_logic.ml
ocaml
TAUT `(~input_a ==> (internal <=> T)) /\ (~input_b ==> (output <=> internal)) /\ (input_a ==> (output <=> F)) /\ (input_b ==> (output <=> F)) ==> (output <=> ~(input_a \/ input_b))`;; TAUT `(i1 /\ i2 <=> a) /\ (i1 /\ i3 <=> b) /\ (i2 /\ i3 <=> c) /\ (i1 /\ c <=> d) /\ (m /\ r <=> e) /\ (m /\ w <=> f) /\ ...
cf03e0073c799253ee2ca5de3d9cb59836211f07e8948e054d69a839645ea80d
robdockins/edison
BraunSeq.hs
-- | -- Module : Data.Edison.Seq.BraunSeq Copyright : Copyright ( c ) 1998 - 1999 , 2008 License : MIT ; see COPYRIGHT file for terms and conditions -- Maintainer : robdockins AT fastmail DOT fm -- Stability : stable Portability : GHC , Hugs ( MPTC and FD ) -- One - ...
null
https://raw.githubusercontent.com/robdockins/edison/e9024cc5b9c4cf6b59d33baf7564e509366c79da/edison-core/src/Data/Edison/Seq/BraunSeq.hs
haskell
| Module : Data.Edison.Seq.BraunSeq Stability : stable "Data.Edison.Seq" except the following: * concat @O( n + m log m )@ * drop, splitAt @O( i log n )@ * subseq @O( i log n + len )@ @m@ is the length of the...
Copyright : Copyright ( c ) 1998 - 1999 , 2008 License : MIT ; see COPYRIGHT file for terms and conditions Maintainer : robdockins AT fastmail DOT fm Portability : GHC , Hugs ( MPTC and FD ) One - sided sequences . All running times are as listed in * lview , lcons , * ...
2639c6f16cb8fbfc48c5a7e0773fc824256027604ceb762fe4f5048b30ddefec
akhudek/zip-visit
visit_test.cljc
(ns zip.visit-test (:require [clojure.zip :as z] #?@(:clj [[clojure.test :refer :all] [zip.visit :as zv]]) #?@(:cljs [[cljs.test :refer-macros [deftest testing is]] [zip.visit :as zv :include-macros true]]))) (defn -xor [a b] (and (or a b) (not (and a b)))) (deftest false-is-n...
null
https://raw.githubusercontent.com/akhudek/zip-visit/e7bd7b6a013f3bf294bfc38b3575947d170fe2f8/test/zip/visit_test.cljc
clojure
(ns zip.visit-test (:require [clojure.zip :as z] #?@(:clj [[clojure.test :refer :all] [zip.visit :as zv]]) #?@(:cljs [[cljs.test :refer-macros [deftest testing is]] [zip.visit :as zv :include-macros true]]))) (defn -xor [a b] (and (or a b) (not (and a b)))) (deftest false-is-n...
288a9e92d05d426d399b80fa7940749999ce314585e494e2f9cdef2c8d6a647a
CryptoKami/cryptokami-core
Connection.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeFamilies # -- | Module for websockets implementation of Daedalus API. -- This implements unidirectional sockets from server to client. -- Every message received from client will be ignored. module Pos.Wallet.Web.Sockets.Connection ( MonadWalletWebSockets ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Sockets/Connection.hs
haskell
| Module for websockets implementation of Daedalus API. This implements unidirectional sockets from server to client. Every message received from client will be ignored. FIXME: we have no authentication and accept all incoming connections. Possible solution: reject pending connection if WS handshake doesn't have v...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeFamilies # module Pos.Wallet.Web.Sockets.Connection ( MonadWalletWebSockets , getWalletWebSockets , initWSConnections , closeWSConnections , upgradeApplicationWS , notifyAll ) where import Universum im...
9f10c942644314561b0f805d7b7afd39fa4ba06d72ed4a1015cc8aa5a1840f1b
prl-julia/juliette-wa
redex.rkt
#lang racket (require redex) ; import surface language (require "../../../src/redex/core/wa-surface.rkt") ; import full language (require "../../../src/redex/core/wa-full.rkt") ; import optimizations (require "../../../src/redex/optimizations/wa-optimized.rkt") (displayln "Test for litmus-wa/test05:") (define p ...
null
https://raw.githubusercontent.com/prl-julia/juliette-wa/1d1a2154e7b4e232ea2166fba485a3bf574ebd88/tests/litmus-wa/test05/redex.rkt
racket
import surface language import full language import optimizations
#lang racket (require redex) (require "../../../src/redex/core/wa-surface.rkt") (require "../../../src/redex/core/wa-full.rkt") (require "../../../src/redex/optimizations/wa-optimized.rkt") (displayln "Test for litmus-wa/test05:") (define p (term (evalg (seq (mdef "r3" () (mcall r2)) (seq (mdef...
c5375983216d6c896bdc3d18c723233df29a97d5534e5538aa0bc76c5a0c6345
OlafChitil/hat
List.hs
module List ( elemIndex, elemIndices, find, findIndex, findIndices, nub, nubBy, delete, deleteBy, (\\), deleteFirstsBy, union, unionBy, intersect, intersectBy, intersperse, transpose, partition, group, groupBy, inits, tails, isPrefixOf, isSuffixOf, mapAccumL, mapAccumR, sort, sortBy, in...
null
https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/libraries/List.hs
haskell
...and what the Prelude exports []((:), []), -- This is built-in syntax transpose is lazy in both rows and columns, and works for non-rectangular 'matrices' For example, transpose [[1,2],[3,4,5],[]] = [[1,3],[2,4],[5]] Note that [h | (h:t) <- xss] is not the same as (map head xss) group splits its list a...
module List ( elemIndex, elemIndices, find, findIndex, findIndices, nub, nubBy, delete, deleteBy, (\\), deleteFirstsBy, union, unionBy, intersect, intersectBy, intersperse, transpose, partition, group, groupBy, inits, tails, isPrefixOf, isSuffixOf, mapAccumL, mapAccumR, sort, sortBy, in...
86b8c555faad0da94cd874039325ae119337a08f6eb44411be54d78b92535720
RaphaelJ/friday
Threshold.hs
# LANGUAGE BangPatterns , FlexibleContexts , GADTs # , FlexibleContexts , GADTs #-} module Vision.Image.Threshold ( -- * Simple threshold ThresholdType (..), thresholdType , threshold -- * Adaptive threshold , AdaptiveThresholdKernel (..), AdaptiveT...
null
https://raw.githubusercontent.com/RaphaelJ/friday/13c6bb16bb04856e0cb226726017e7a7ad502cb5/src/Vision/Image/Threshold.hs
haskell
* Simple threshold * Adaptive threshold * Other methods | Specifies what to do with pixels matching the threshold predicate. | Given the thresholding method, a boolean indicating if the pixel match the thresholding condition and the pixel, returns the new pixel value. -----------------------------------------...
# LANGUAGE BangPatterns , FlexibleContexts , GADTs # , FlexibleContexts , GADTs #-} module Vision.Image.Threshold ( ThresholdType (..), thresholdType , threshold , AdaptiveThresholdKernel (..), AdaptiveThreshold , adaptiveThreshold, adaptiveThresholdFil...
08a97f61016c3be9fd79d95f59cea990276b23a82721931b75e8e94bbbea02ab
vikram/lisplibraries
store-api.lisp
(in-package :weblocks) (export '(open-store close-store clean-store *default-store* begin-transaction commit-transaction rollback-transaction persist-object delete-persistent-object delete-persistent-object-by-id find-persistent-objects find-persistent-object-by-id count-persistent-objects)) ;;; Store in...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/store/store-api.lisp
lisp
Store initialization and finalization Transactions Creating and deleting persistent objects Querying persistent objects
(in-package :weblocks) (export '(open-store close-store clean-store *default-store* begin-transaction commit-transaction rollback-transaction persist-object delete-persistent-object delete-persistent-object-by-id find-persistent-objects find-persistent-object-by-id count-persistent-objects)) (defgeneric ...