_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
d006401b079da6bde803bf9ad10af31e7cf6eca00a96335c277ee983a7af57c7
sharplispers/ironclad
secp384r1.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- ;;;; secp384r1.lisp -- secp384r1 (a.k.a. NIST P-384) elliptic curve (in-package :crypto) ;;; class definitions (defclass secp384r1-public-key () ((y :initarg :y :reader secp384r1-key-y :type (simple-array (unsigned-byte 8) (*))))) (defclass secp384r1-private-key ()...
null
https://raw.githubusercontent.com/sharplispers/ironclad/6cc4da8554558ee2e89ea38802bbf6d83100d4ea/src/public-key/secp384r1.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*- secp384r1.lisp -- secp384r1 (a.k.a. NIST P-384) elliptic curve class definitions coordinates (X, Y, Z), with x = X / Z^2 and y = Y / Z^3. constant and function definitions Compressed point Uncompressed point Note that hashing is not performed here.
(in-package :crypto) (defclass secp384r1-public-key () ((y :initarg :y :reader secp384r1-key-y :type (simple-array (unsigned-byte 8) (*))))) (defclass secp384r1-private-key () ((x :initarg :x :reader secp384r1-key-x :type (simple-array (unsigned-byte 8) (*))) (y :initarg :y :reader secp384r1-key-y :type (s...
1babe154afa6299c03eb1238a34406b7d8342826c3a9fc57514d5b5acbce3961
alesaccoia/festival_flinger
cmu_us_aup_duration.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Carnegie Mellon University ; ; ; and and ; ; ; Copyright ( c ) 1998 - 2000 ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_aup_cg/festvox/cmu_us_aup_duration.scm
scheme
;;; ; ; ; ; ; ; ; ; ;;; Permission is hereby granted, free of charge, to use and distribute ;;; this software and its documentation without restriction, including ;;; withou...
Duration for English (require 'cmu_us_aup_durdata) (define (cmu_us_aup::select_duration) "(cmu_us_aup::select_duration) Set up duration for English." (set! duration_cart_tree cmu_us_aup::zdur_tree) (set! duration_ph_info cmu_us_aup::phone_durs) (Parameter.set 'Duration_Method 'Tree_ZScores) (Parameter.set...
2440f1c1a44dfe3be1002a6c7adff1b9326e1df37edb20b7c65c3eeaec83eb89
facebook/infer
PulseArithmetic.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/8386f9fcbd46061208664264cba61ac80c61e3f0/infer/src/pulse/PulseArithmetic.mli
ocaml
* Wrapper around {!PulseFormula} that operates on {!AbductiveDomain.t}. * helper function wrapping [prune_binop] * helper function wrapping [prune_binop] * helper function wrapping [prune_binop] * helper function wrapping [prune_binop] * helper function wrapping [prune_binop]
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
659c4fee30bd81cc9481b3177417e87e68097823268441bf1d6a00dc928992dc
jrm-code-project/LISP-Machine
share-disk.lisp
-*- Mode : LISP ; Package : NF ; Base:8 ; : ZL -*- routines to support shared disk -pace (defun multibus-address-to-8086-ptr (adr) (dpb (ldb (byte 16. 4) adr) (byte 16. 16.) (ldb (byte 4. 0) adr))) (defun 8086-ptr-to-multibus-address (ptr) (+ (ash (ldb (byte 16. 16.) ptr) 4) (ldb (byt...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/nf/share-disk.lisp
lisp
Package : NF ; Base:8 ; : ZL -*- first there is the share-iopb-chain, located at a well known place debug-byte - 1 byte set to the debug level given to the share starter 8086 program check valid bit (if print-iopbs to it with our multibus mapping reg no interrupts
routines to support shared disk -pace (defun multibus-address-to-8086-ptr (adr) (dpb (ldb (byte 16. 4) adr) (byte 16. 16.) (ldb (byte 4. 0) adr))) (defun 8086-ptr-to-multibus-address (ptr) (+ (ash (ldb (byte 16. 16.) ptr) 4) (ldb (byte 16. 0) ptr) #xff000000)) in multibus memory ...
b2602d90436733b74a9c2a1d10f55a8c17037ac0592e7857f04c11beaca4f61e
clojurewerkz/money
hiccup.clj
This source code is dual - licensed under the Apache License , version 2.0 , and the Eclipse Public License , version 1.0 . ;; ;; The APL v2.0: ;; ;; ---------------------------------------------------------------------------------- Copyright ( c ) 2012 - 2014 , , and the ClojureWerkz Team ;; Licensed unde...
null
https://raw.githubusercontent.com/clojurewerkz/money/734b99e2c8d4617e69b20a68d1a1760262d7786f/src/clojure/clojurewerkz/money/hiccup.clj
clojure
The APL v2.0: ---------------------------------------------------------------------------------- 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 CONDIT...
This source code is dual - licensed under the Apache License , version 2.0 , and the Eclipse Public License , version 1.0 . Copyright ( c ) 2012 - 2014 , , and the ClojureWerkz Team distributed under the License is distributed on an " AS IS " BASIS , The EPL v1.0 : Copyright ( c ) 2012 - 2014 , , ...
d4f5de0da269a9318f9baa224ab8c041461263bdc144b1dbafec67c5a904d572
pokepay/aws-sdk-lisp
dax.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/dax (:use) (:use-reexport #:aws-sdk/services/dax/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/dax.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/dax (:use) (:use-reexport #:aws-sdk/services/dax/api))
1081f48e5b74f8c04311cff01f79c65a23d063658ec19dfb3b12e45e9e4f601a
ssardina/ergo
arrays.scm
#lang racket ;;; This provides a cheap multi-dimensional array facility. For example ( define x ( build - array ( list 3 5 ) ( lambda ( x y ) 13 ) ) ) ( array - ref x ( list 0 2 ) ) = = > 13 ( array - set ! x ( list 0 3 ) 4 ) then ( array - ref x ( list 0 3 ) ) = = > 4 (provide build-array array-ref...
null
https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/System/arrays.scm
scheme
This provides a cheap multi-dimensional array facility. For example calculate a vector index given the multi-dimensional array indices << this is not the most efficient way, but # of dims should be small >> the internal data structure: a list of dimensions and a single vector make an array with given dims, whose ...
#lang racket ( define x ( build - array ( list 3 5 ) ( lambda ( x y ) 13 ) ) ) ( array - ref x ( list 0 2 ) ) = = > 13 ( array - set ! x ( list 0 3 ) 4 ) then ( array - ref x ( list 0 3 ) ) = = > 4 (provide build-array array-ref array-set array-set* make-array array-set!) (define (dope-vector dims i...
71c0a2a3c6a00ca479066337aa250e80a6dcd2e8327f64920a4eb4106f4cb99a
haskell-rewriting/term-rewriting
Substitution.hs
-- This file is part of the 'term-rewriting' library. It is licensed under an MIT license . See the accompanying ' LICENSE ' file for details . -- Authors : -- Tests for Data.Rewriting.Substitution module Substitution where import Arbitrary import Data.Rewriting.Term (Term (..)) import Data.Rewriting.Substitu...
null
https://raw.githubusercontent.com/haskell-rewriting/term-rewriting/d01ee419f9fd3c2011d37b6417326a9373d5ee9c/test/Substitution.hs
haskell
This file is part of the 'term-rewriting' library. It is licensed Tests for Data.Rewriting.Substitution
under an MIT license . See the accompanying ' LICENSE ' file for details . Authors : module Substitution where import Arbitrary import Data.Rewriting.Term (Term (..)) import Data.Rewriting.Substitution import Data.Rewriting.Substitution.Type import Control.Applicative import Control.Monad import Data.Maybe i...
d4102d1b4c6075d034af7fe3c3d7aa43521baffdf3fee938403919de7316e301
ndmitchell/catch
ReadInt.hs
module ReadInt where main x = read x :: Int
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/ReadInt.hs
haskell
module ReadInt where main x = read x :: Int
c5c649de424fef41f526df3e5b36615d0f3a6a9a44af0e28fce05ab91f685556
incoherentsoftware/defect-process
Dog.hs
module Configs.All.Enemy.Dog ( DogEnemyConfig(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import Attack.Util import Enemy.DeathEffectData.Types import Enemy.HurtEffectData.Types import Enemy.SpawnEffectData.Types import Util import Window.Graph...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/14ec46dec2c48135bc4e5965b7b75532ef19268e/src/Configs/All/Enemy/Dog.hs
haskell
module Configs.All.Enemy.Dog ( DogEnemyConfig(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import Attack.Util import Enemy.DeathEffectData.Types import Enemy.HurtEffectData.Types import Enemy.SpawnEffectData.Types import Util import Window.Graph...
33353767d21650232f8ffee18693f06d1305913c1612259a17547c7512c5ecfc
daypack-dev/daypack-lib
time_slot.mli
exception Time_slot_is_invalid exception Time_slot_is_empty type t = int64 * int64 val lt : t -> t -> bool val le : t -> t -> bool val gt : t -> t -> bool val ge : t -> t -> bool val compare : t -> t -> int val to_string : t -> string val join : t -> t -> t option val overlap_of_a_over_b : a:t -> b:t -> t opt...
null
https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/time_slot.mli
ocaml
exception Time_slot_is_invalid exception Time_slot_is_empty type t = int64 * int64 val lt : t -> t -> bool val le : t -> t -> bool val gt : t -> t -> bool val ge : t -> t -> bool val compare : t -> t -> int val to_string : t -> string val join : t -> t -> t option val overlap_of_a_over_b : a:t -> b:t -> t opt...
708030be2db253c834b295bcefe5d0f038288e92116dd094ee7fca40933980fd
gigamonkey/monkeylib-prose-diff
diff.lisp
(in-package :com.gigamonkeys.prose-diff) ;;; Generic functions for diffing vectors of objects . ;;; (defun diff-vectors (old new &optional (lcs-frobber #'identity)) "Diff two vectors returning a vector with the elements of old and new wrapped in conses whose CAR is either :LCS, :DELETE, or :ADD. Optionally frob t...
null
https://raw.githubusercontent.com/gigamonkey/monkeylib-prose-diff/9e393807671ef54b1c9b47f570a93267ac85b62a/diff.lisp
lisp
(in-package :com.gigamonkeys.prose-diff) Generic functions for diffing vectors of objects . (defun diff-vectors (old new &optional (lcs-frobber #'identity)) "Diff two vectors returning a vector with the elements of old and new wrapped in conses whose CAR is either :LCS, :DELETE, or :ADD. Optionally frob the compu...
9ab801eb868e20f70e71dfb8b871eb94ce39409a00b11350f7cbb7a30e8c6eb1
achirkin/vulkan
FramebufferCreateFlags.hs
# OPTIONS_HADDOCK ignore - exports # {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # {-# LANGUAGE PatternSynonyms #-} # LANGUAGE StandaloneDeriving # {-# LANGUAGE Strict ...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Types/Enum/FramebufferCreateFlags.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeSynonymInstances #
# OPTIONS_HADDOCK ignore - exports # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE StandaloneDeriving # module Graphics.Vulkan.Types.Enum.FramebufferCreateFlags (VkFramebufferCreateBitmask(VkFramebufferCreateBitmask, ...
f780b57da172281c762571f5fbefca6e69d21bb86d512df1a069c71898b7de6e
metabase/metabase
assert_exprs.clj
(ns metabase.test-runner.assert-exprs "Custom implementations of a few [[clojure.test/is]] expressions (i.e., implementations of [[clojure.test/assert-expr]]): `query=` and `sql=`. Other expressions (`re=`, `schema=`, `=?`, and so forth) are implemented with the Hawk test-runner." (:require [clojure.data :a...
null
https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/test/metabase/test_runner/assert_exprs.clj
clojure
don't bother adding names unless the test actually failed [[t/testing]] context has to be done around the call to [[t/do-report]] [[t/do-report]] has to be in the expansion, otherwise it picks up the wrong filename and line metadata.
(ns metabase.test-runner.assert-exprs "Custom implementations of a few [[clojure.test/is]] expressions (i.e., implementations of [[clojure.test/assert-expr]]): `query=` and `sql=`. Other expressions (`re=`, `schema=`, `=?`, and so forth) are implemented with the Hawk test-runner." (:require [clojure.data :a...
8b98d13f83d872806f7b8ae98a18fd09520ca2ab183cb5e836b1bf9e2822a660
arenadotio/pgx
config.ml
open Mirage let packages = [ package "pgx" ~pin:"file://../" ; package "pgx_lwt" ~pin:"file://../" ; package "pgx_lwt_mirage" ~pin:"file://../" ; package "logs" ; package "mirage-logs" ] ;; let stack = generic_stackv4v6 default_network let database = let doc = Key.Arg.info ~doc:"database to use" [ "db"...
null
https://raw.githubusercontent.com/arenadotio/pgx/3f2c0fc385db40d108466df80dad7980587d4342/unikernel/config.ml
ocaml
open Mirage let packages = [ package "pgx" ~pin:"file://../" ; package "pgx_lwt" ~pin:"file://../" ; package "pgx_lwt_mirage" ~pin:"file://../" ; package "logs" ; package "mirage-logs" ] ;; let stack = generic_stackv4v6 default_network let database = let doc = Key.Arg.info ~doc:"database to use" [ "db"...
8bb312bbe6f03ee45ded5fc66b66025b8c63992545d78ac0598d0694fcc51263
helpshift/hydrox
numbers.clj
(ns hydrox.doc.link.numbers) (def new-counter {:chapter 0 :section 0 :subsection 0 :subsubsection 0 :code 0 :image 0 :equation 0 :citation 0}) (defn increment "increments a string for alphanumerics and numbers (increment \"1\") => \"2\" (increment \"A\") => \"B\"" {:added "0...
null
https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/src/hydrox/doc/link/numbers.clj
clojure
(ns hydrox.doc.link.numbers) (def new-counter {:chapter 0 :section 0 :subsection 0 :subsubsection 0 :code 0 :image 0 :equation 0 :citation 0}) (defn increment "increments a string for alphanumerics and numbers (increment \"1\") => \"2\" (increment \"A\") => \"B\"" {:added "0...
9a82d4ddd474f8c8c0cbcbc18fed23da1778fdebc1915957b4af35a35dd86645
b0-system/b0
b0_cmd_pack.mli
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/tool-b0/b0_cmd_pack.mli
ocaml
* [cmd] is the command line for [pack].
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
9ced89a2207317c3c4c60735a6dc2c2153005452a1814eba36c192ed0b0fd3dd
mt-caret/io_uring
http.ml
open Core a ( wip ) port of module Handler = struct open Httpaf let request_handler reqd = match Reqd.request reqd with | { Request.meth = `POST; headers; _ } -> let response = let content_type = match Headers.get headers "content-type" with | None -> "application/oct...
null
https://raw.githubusercontent.com/mt-caret/io_uring/78012a69a55faf81ab2fbb710c6d5ae71f6b44f0/example/http.ml
ocaml
we use nops when yielding to simplify logic TODO: fix handling?
open Core a ( wip ) port of module Handler = struct open Httpaf let request_handler reqd = match Reqd.request reqd with | { Request.meth = `POST; headers; _ } -> let response = let content_type = match Headers.get headers "content-type" with | None -> "application/oct...
92bf2400fabecbd26e774affbc95a38e6e1dfef841bab461b8fd31234f7f22d1
naveensundarg/prover
wffs.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- ;;; File: wffs.lisp The contents of this file are subject to the Mozilla Public License ;;; Version 1.1 (the "License"); you may not use this file except in ;;; compliance with the License. You may obtain a copy of the License at ;;; / ;;; Software distrib...
null
https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/wffs.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- File: wffs.lisp Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific languag...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is SNARK . The Initial Developer of the Original Code is SRI International . Portions created by the Initial Developer are Copyright ( C ) 1981 - 2011 . ...
b7b16f4916688551ed37e84b22a892a80085d11fa1e15a45e9ca6850b1fb1972
Perry961002/SICP
exa4.2.2-thunk.scm
创建槽,包装一个包含表达式和对应环境的表 (define (delay-it exp env) (list 'thunk exp env)) (define (thunk? obj) (tagged-list? obj 'thunk)) (define (thunk-exp thunk) (cadr thunk)) (define (thunk-env thunk) (caddr thunk)) 带记忆化的槽 (define (evaluated-thunk? obj) (tagged-list? obj 'evaluated-thunk)) (define (thunk-valu...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/example/exa4.2.2-thunk.scm
scheme
创建槽,包装一个包含表达式和对应环境的表 (define (delay-it exp env) (list 'thunk exp env)) (define (thunk? obj) (tagged-list? obj 'thunk)) (define (thunk-exp thunk) (cadr thunk)) (define (thunk-env thunk) (caddr thunk)) 带记忆化的槽 (define (evaluated-thunk? obj) (tagged-list? obj 'evaluated-thunk)) (define (thunk-valu...
2a6fcd46d085c6188daca96eabad33ac482873c55ce776d046803f838eef39f5
tek/helic
Options.hs
{-# options_haddock prune #-} |CLI Options , Internal module Helic.Cli.Options where import Exon (exon) import Options.Applicative ( CommandFields, Mod, Parser, ReadM, argument, auto, command, help, hsubparser, info, long, option, progDesc, readerError, strOption, switch, ) import ...
null
https://raw.githubusercontent.com/tek/helic/055b2ffa063936ad4ae6249c9e6e0603482baaa9/packages/helic/lib/Helic/Cli/Options.hs
haskell
# options_haddock prune #
|CLI Options , Internal module Helic.Cli.Options where import Exon (exon) import Options.Applicative ( CommandFields, Mod, Parser, ReadM, argument, auto, command, help, hsubparser, info, long, option, progDesc, readerError, strOption, switch, ) import Options.Applicative.Types (rea...
c1377bc8d34f061cf61feeebd14d4839caae3f94a36e1bd83dc8095a70a8118c
no-defun-allowed/concurrent-hash-tables
phony-redis-no-mailbox.lisp
According to a presentation by an Amazon Web Services engineer , ;;; one cannot design an in-memory database using a garbage collected ;;; language implementation, because it would be too slow due to collection . He then goes to use a hash table with just one lock , ;;; copies the data to be stored just 'cause, f...
null
https://raw.githubusercontent.com/no-defun-allowed/concurrent-hash-tables/1b9f0b5da54fece4f42296e1bdacfcec0c370a5a/Examples/phony-redis-no-mailbox.lisp
lisp
one cannot design an in-memory database using a garbage collected language implementation, because it would be too slow due to copies the data to be stored just 'cause, finds performance similar to Redis, and calls it a day. Using structure sharing and a concurrent hash table, we can go really taking the problem ...
According to a presentation by an Amazon Web Services engineer , collection . He then goes to use a hash table with just one lock , much faster . Perhaps a magnitude or two faster - not that I 'm (defpackage :phony-redis (:use :cl) (:export #:make-server #:connect-to-server #:find-value #:clo...
f26271e19677e02176fd34c20d03dacc60b93c8008903f017c3e947722199138
facebook/duckling
SV_XX.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory . -------------...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/SV_XX.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant --------------------------------------------------------------- Auto-generated by regenClassifiers DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W...
Copyright ( c ) 2016 - present , Facebook , Inc. of patent rights can be found in the PATENTS file in the same directory . @generated module Duckling.Ranking.Classifiers.SV_XX (classifiers) where import Data.String import Prelude import qualified Data.HashMap.Strict as HashMap import Duckling.Ranking.Types cla...
4243e993f1561740b1a6d9fac686e3c638ad090d997911ecc4f586f2272b1762
CSCfi/rems
catalogue_items.cljs
(ns rems.administration.catalogue-items (:require [cljs-time.coerce :as time-coerce] [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.administration.catalogue-item :as catalogue-item] [rems.administration.status-flags :as status-flags...
null
https://raw.githubusercontent.com/CSCfi/rems/9abf233b728272c6e99c07a98d0e94da042ec2c7/src/cljs/rems/administration/catalogue_items.cljs
clojure
secondary sort by created, reverse push "No form" cases to the top of the list when sorting
(ns rems.administration.catalogue-items (:require [cljs-time.coerce :as time-coerce] [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.administration.catalogue-item :as catalogue-item] [rems.administration.status-flags :as status-flags...
3782e6b7fbd19a8b9ff96e64c917533997d6470211c8b51c8d866425303d1986
esl/MongooseIM
mongoose_service_SUITE.erl
-module(mongoose_service_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("eunit/include/eunit.hrl"). all() -> [starts_and_stops_services, ensures_service, reverts_config_when_service_fails_to_start, does_not_change_config_when_service_fails_to_stop, replaces_services, rep...
null
https://raw.githubusercontent.com/esl/MongooseIM/40d41eebf2e333843aeb3f60a31f92dc5a88591c/test/mongoose_service_SUITE.erl
erlang
Test cases Start service_b, which depends on service_c Stop service_a, and start service_b, both depending on service_c Helpers
-module(mongoose_service_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("eunit/include/eunit.hrl"). all() -> [starts_and_stops_services, ensures_service, reverts_config_when_service_fails_to_start, does_not_change_config_when_service_fails_to_stop, replaces_services, rep...
ff7609dfb79612b5a558d59efef14eb1ea5d4c17639f3713da093a9230fabc2a
JAremko/spacetools
core.clj
(ns spacetools.fs-io.core "File-system I/O." (:require [cats.core :as m] [cats.monad.exception :as exc] [clojure.core.reducers :as r] [clojure.java.io :as io] [clojure.set :refer [union]] [clojure.spec.alpha :as s] [clojure.string :as str] ...
null
https://raw.githubusercontent.com/JAremko/spacetools/d047e99689918b5a4ad483022f35802b2015af5f/components/fs-io/src/spacetools/fs_io/core.clj
clojure
(ns spacetools.fs-io.core "File-system I/O." (:require [cats.core :as m] [cats.monad.exception :as exc] [clojure.core.reducers :as r] [clojure.java.io :as io] [clojure.set :refer [union]] [clojure.spec.alpha :as s] [clojure.string :as str] ...
7ac47c64136a61dd5b1da6270d04e39b1be5d4e021e52d3f2b741cc0a3e08d70
polysemy-research/polysemy
Setup.hs
import Distribution.Extra.Doctest (defaultMainWithDoctests) main = defaultMainWithDoctests "polysemy-plugin-test"
null
https://raw.githubusercontent.com/polysemy-research/polysemy/43a67061fb2a6cd2f545c5bd5e8320f2a228fb6b/polysemy-plugin/Setup.hs
haskell
import Distribution.Extra.Doctest (defaultMainWithDoctests) main = defaultMainWithDoctests "polysemy-plugin-test"
c9bf793dfaa82de2fe6f6156ca24ccec5cca10dc991503339ab8cf7990b248ad
hoophq/sequence
security.clj
(ns decimals.security (:import java.security.MessageDigest java.util.Base64) (:require [clojure.tools.logging :as log] [environ.core :refer [env]] [clojure.walk] [clojure.string :as str] [clojure.data.json :as json])) (defn sha256 [string] (let [digest...
null
https://raw.githubusercontent.com/hoophq/sequence/f968a88ffdceeb51956e1dc20e487faff416885b/src/decimals/security.clj
clojure
(ns decimals.security (:import java.security.MessageDigest java.util.Base64) (:require [clojure.tools.logging :as log] [environ.core :refer [env]] [clojure.walk] [clojure.string :as str] [clojure.data.json :as json])) (defn sha256 [string] (let [digest...
28142af3d66a67a967b65dd26d6fc5818ea9a0307a78c6431ea5f577af1c9850
simmone/racket-simple-xlsx
line-3d-chart-head-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../lib/lib.rkt") (require"../../../../xl/charts/line-chart.rkt") (require racket/runtime-path) (define-runtime-path line_3d_chart_head_file "line_3d_chart_head.xml") (define test-line-3d-chart-head (test-suite "test-line...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/charts/line-chart/line-3d-chart-head-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../lib/lib.rkt") (require"../../../../xl/charts/line-chart.rkt") (require racket/runtime-path) (define-runtime-path line_3d_chart_head_file "line_3d_chart_head.xml") (define test-line-3d-chart-head (test-suite "test-line...
1310ad085c7b126eb37061459371c746bbdcfb075bfed8e2e991b97d6ae83f11
returntocorp/semgrep
lib_parsing_php.ml
(*s: lib_parsing_php.ml *) (*s: Facebook copyright *) * * Copyright ( C ) 2009 - 2011 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with t...
null
https://raw.githubusercontent.com/returntocorp/semgrep/db9b44c8a606ffa84f92b45b79d96ed821c420ee/languages/php/ast/lib_parsing_php.ml
ocaml
s: lib_parsing_php.ml s: Facebook copyright e: Facebook copyright module Ast = Cst_php *************************************************************************** Wrappers *************************************************************************** *******************************************************************...
* * Copyright ( C ) 2009 - 2011 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file...
93350ce6cff2829a7fcdefe6acfb0a8343d2231dd9455208cd484dfdafe97534
exercism/clojurescript
example.cljs
(ns binary-search-tree) (defn value [node] (first node)) (defn left [node] (second node)) (defn right [node] (last node)) (defn singleton [n] [n nil nil]) (defn insert [v node] (if (empty? node) (singleton v) (let [x (value node)] (if (>= x v) [x (insert v (left node)) (right node)] ...
null
https://raw.githubusercontent.com/exercism/clojurescript/0135bc589c556557397650fe5e52ac7df3d4ddb5/exercises/practice/binary-search-tree/src/example.cljs
clojure
(ns binary-search-tree) (defn value [node] (first node)) (defn left [node] (second node)) (defn right [node] (last node)) (defn singleton [n] [n nil nil]) (defn insert [v node] (if (empty? node) (singleton v) (let [x (value node)] (if (>= x v) [x (insert v (left node)) (right node)] ...
be629c115df8c081ab0d96c023d9d5ecd574fa3bfacce1d5615cc075db0d1add
alexkazik/qrcode
Kanji.hs
# LANGUAGE BinaryLiterals # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Codec.QRCode.Mode.Kanji ( kanji , kanjiB , kanjiMap ) where import Codec.QRCode.Base import Data.Binary (decode) import qualified Data.Map.Strict ...
null
https://raw.githubusercontent.com/alexkazik/qrcode/7ee12de893c856a968dc1397602a7f81f8ea2c68/qrcode-core/src/Codec/QRCode/Mode/Kanji.hs
haskell
# LANGUAGE OverloadedStrings # | Generate a segment representing the specified text data encoded as QR code Kanji. it may be impossible to encode all text in this encoding. But it is possible to encode some of it and combine it with others like ISO-8859-1. This map is generated, see below on how it was done. ...
# LANGUAGE BinaryLiterals # # LANGUAGE NoImplicitPrelude # module Codec.QRCode.Mode.Kanji ( kanji , kanjiB , kanjiMap ) where import Codec.QRCode.Base import Data.Binary (decode) import qualified Data.Map.Strict as M import qualified Codec.QR...
3f53e1ded14896378469a94c58604ba82c86b180fbbaa105fdc1796479c2bca8
janestreet/hardcaml_of_verilog
with_interface.mli
open Base module Make (I : Hardcaml.Interface.S) (O : Hardcaml.Interface.S) : sig val create : ?verbose:bool -> ?passes:Pass.t list -> Verilog_design.t -> (Hardcaml.Signal.t I.t -> Hardcaml.Signal.t O.t Or_error.t) Or_error.t end
null
https://raw.githubusercontent.com/janestreet/hardcaml_of_verilog/c1d4e5abe18a1b15e8858151a43aa69efcbbe07b/src/with_interface.mli
ocaml
open Base module Make (I : Hardcaml.Interface.S) (O : Hardcaml.Interface.S) : sig val create : ?verbose:bool -> ?passes:Pass.t list -> Verilog_design.t -> (Hardcaml.Signal.t I.t -> Hardcaml.Signal.t O.t Or_error.t) Or_error.t end
9641062073c199e80b6bd71d9f56136b331c8922c5d8da43bf7eb2aa4e3a2633
lichenscript/lichenscript
transform.ml
* Copyright 2022 * * Licensed under the Apache License , Version 2.0 ( the " License " ) ; * you may not use this file except in compliance with the License . * You may obtain a copy of the License at * * -2.0 * * Unless required by applicable law or agreed to in writing , software ...
null
https://raw.githubusercontent.com/lichenscript/lichenscript/d159486f178972d01ac6ed5cf060e972267f097b/lib/ir/transform.ml
ocaml
* Convert TypedTree to C-op * It's a monad, represent the `continuation` of pattern test * if (test) { * (* continuation here * logical name -> realname * * only this class, does NOT includes ancester's automatic reference counting * Some variables are local, but some are global, * suc...
* Copyright 2022 * * Licensed under the Apache License , Version 2.0 ( the " License " ) ; * you may not use this file except in compliance with the License . * You may obtain a copy of the License at * * -2.0 * * Unless required by applicable law or agreed to in writing , software ...
8f38a7e2e21b0dd27597e50b53917bdc92992bfd812f50ec4a717c23a0701372
barrel-db/barrel
barrel_replicate_remote_SUITE.erl
%%%------------------------------------------------------------------- @author benoitc ( C ) 2017 , < COMPANY > %%% @doc %%% %%% @end Created : 29 . Jun 2017 15:46 %%%------------------------------------------------------------------- -module(barrel_replicate_remote_SUITE). -author("benoitc"). %% API %% API -ex...
null
https://raw.githubusercontent.com/barrel-db/barrel/1695ca4cfe821808526f9ecb2e019bc1b8eff48e/test/barrel_replicate_remote_SUITE.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API API ============================== internal helpers a hack to filter rebar path see
@author benoitc ( C ) 2017 , < COMPANY > Created : 29 . Jun 2017 15:46 -module(barrel_replicate_remote_SUITE). -author("benoitc"). -export([ all/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2 ]). -export([ one_doc/1 ]). all() -> [ one_doc ]. init_per_suite(C...
4ae7dda30f9f415b00b91d0a3e86b647f5001d12b3014557ce2c70eb710c68d2
PacktWorkshops/The-Clojure-Workshop
repl.clj
;;; In REPL from Exercise 4.06 (def game-users [{:id 9342 :username "speedy" :current-points 45 :remaining-lives 2 :experience-level 5 :status :active} {:id 9854 :username "stealthy" :current-points 1201 :remaining-lives 1 :experience-level 8 :status :speed-boost} {:id...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter04/Exercise4.07/repl.clj
clojure
In REPL In REPL
from Exercise 4.06 (def game-users [{:id 9342 :username "speedy" :current-points 45 :remaining-lives 2 :experience-level 5 :status :active} {:id 9854 :username "stealthy" :current-points 1201 :remaining-lives 1 :experience-level 8 :status :speed-boost} {:id 3014 :u...
497e584ef79936b3cd4738412c9811aa1c50752b89f9292da5e442dcd133f53a
TorXakis/TorXakis
TExprLinearization.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and University of Twente See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and University of Twente See LICENSE at root directory of this repository. -} -----------------------------------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/lpeq/src/preparation/TExprLinearization.hs
haskell
--------------------------------------------------------------------------- | Module : TExprLinearization License : BSD3 Maintainer : Stability : experimental --------------------------------------------------------------------------- linearizeTExprs printProcsInBody ("Current form of " ++ show...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and University of Twente See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and University of Twente See LICENSE at root directory of this repository. -} Copyright : TNO and Universi...
18a08e6e6ab9553d169e9aa84254c25d062fe94fd698ca5b6247e0f34e389ff5
escherize/defrag
specs.clj
(ns defrag.specs (:require [clojure.spec.alpha :as s])) ;;; This ns coppied from clojure.core.specs.alpha 0.2.44, with slight modifications ;;;; destructure (s/def ::local-name (s/and simple-symbol? #(not= '& %))) (s/def ::binding-form (s/or :local-symbol ::local-name :seq-destructure ::seq-binding-form...
null
https://raw.githubusercontent.com/escherize/defrag/385158007ea9af19db6e6f4edc936a1816bbec7d/src/defrag/specs.clj
clojure
This ns coppied from clojure.core.specs.alpha 0.2.44, with slight modifications destructure sequential destructuring map destructuring bindings defn, defn-, fn (s/fdef clojure.core/defn :args ::defn-args (s/fdef clojure.core/defn- :args ::defn-args (s/fdef clojure.core/fn
(ns defrag.specs (:require [clojure.spec.alpha :as s])) (s/def ::local-name (s/and simple-symbol? #(not= '& %))) (s/def ::binding-form (s/or :local-symbol ::local-name :seq-destructure ::seq-binding-form :map-destructure ::map-binding-form)) (s/def ::seq-binding-form (s/and vector? ...
d1f3b2b73fb4d4fb1a4ffd10590b3a85729edaf79c18d666f69d4004d077e3ff
vlstill/hsExprTest
Union.hs
# LANGUAGE DataKinds , ScopedTypeVariables , TypeFamilies , MultiParamTypeClasses , FlexibleInstances , UndecidableInstances , ConstraintKinds , PolyKinds , FlexibleContexts , TypeOpera...
null
https://raw.githubusercontent.com/vlstill/hsExprTest/0c7754979cf837d48f5740674639e2decb96e547/testlib/Test/QuickCheck/Union.hs
haskell
# OVERLAPPING # # OVERLAPPING #
# LANGUAGE DataKinds , ScopedTypeVariables , TypeFamilies , MultiParamTypeClasses , FlexibleInstances , UndecidableInstances , ConstraintKinds , PolyKinds , FlexibleContexts , TypeOpera...
78e513bc0a69bdd7dd9ecc72aab677ced1418d928e42c687670c7b0eb59821d5
adamwynne/twitter-api
creds.clj
(ns twitter.test.creds (:require [twitter.oauth :refer [make-oauth-creds]])) (defn assert-get "get a value from the environment, otherwise throw an exception detailing the problem" [key-name] (or (System/getenv key-name) (throw (Exception. (format "please define %s in the test environment" key-name))))) ...
null
https://raw.githubusercontent.com/adamwynne/twitter-api/6443d1c8ed7d6b6cc9f5efaa5fd9c7cc176e80f0/test/twitter/test/creds.clj
clojure
(ns twitter.test.creds (:require [twitter.oauth :refer [make-oauth-creds]])) (defn assert-get "get a value from the environment, otherwise throw an exception detailing the problem" [key-name] (or (System/getenv key-name) (throw (Exception. (format "please define %s in the test environment" key-name))))) ...
91648a20337ce0f500870eb4091868e358f3f6b78ca03fd0ce9ae67c4258d759
haskell/cabal
Dependency.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # module Distribution.Types.Dependency ( Dependency(..) , mkDependency , depPkgName , depVerRange , depLibraries , simplifyDependency , mainLibSet ) where import Distribution.Compat.Prelude import Prelude () import Distribution.Types.V...
null
https://raw.githubusercontent.com/haskell/cabal/23536274bb7baabe5c33140620471e897cf34cf2/Cabal-syntax/src/Distribution/Types/Dependency.hs
haskell
# LANGUAGE DeriveDataTypeable # | Describes a dependency on a source package (API) set of library names. in 'Set' or as the key to a 'Map'. For these and similar use cases see ^ The set of libraries required from the package. Only the selected libraries will be built. It does not affect the cabal-install solv...
# LANGUAGE DeriveGeneric # module Distribution.Types.Dependency ( Dependency(..) , mkDependency , depPkgName , depVerRange , depLibraries , simplifyDependency , mainLibSet ) where import Distribution.Compat.Prelude import Prelude () import Distribution.Types.VersionRange (isAnyVersionLight) impo...
7ffdd3da6b6d169be98ab6fc1cbd8decf1706a619943d5a6ccfd0a84b15bd22b
nuprl/gradual-typing-performance
run.rkt
#lang racket/base (date-display-format 'iso-8601) TODO ;; - add option to change governor, default to something reasonable ;; Benchmark driver ;; ;; Usage: run.rkt ;; This will: ;; - Create directories `BENCHMARK/benchmark` and `BENCHMARK/benchmark/base` - Spawn jobs for each of the 2**n configurations ;; ...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/run.rkt
racket
- add option to change governor, default to something reasonable Benchmark driver Usage: This will: - Create directories `BENCHMARK/benchmark` and `BENCHMARK/benchmark/base` Each job will create a new directory & save results to a file - Aggregate the results from all sub-jobs Same as calling from the comman...
#lang racket/base (date-display-format 'iso-8601) TODO run.rkt - Spawn jobs for each of the 2**n configurations (provide run-benchmark ) (require benchmark-util/data-lattice gtp-summarize/stats-helpers (only-in glob in-glob) (only-in racket/file file->value) (only-in r...
a6514cc5e48ebdf747e19bf3130bbb3fb8678847fc5b739bca33f1331436f8de
dfinity/motoko
async_cap.ml
(* Async capabilities *) module T = Type type async_cap = | QueryCap of T.con (* can (query) async (i.e. in a shared query func) *) | ErrorCap (* can try, catch (i.e. in the async body of shared query func) *) | AsyncCap of T.con (* can async, send (i.e. in a func of async type or shared func) *) ...
null
https://raw.githubusercontent.com/dfinity/motoko/d8e13023dfdc965907512432c0181c8d137d84ad/src/mo_types/async_cap.ml
ocaml
Async capabilities can (query) async (i.e. in a shared query func) can try, catch (i.e. in the async body of shared query func) can async, send (i.e. in a func of async type or shared func) can async, send, try, catch, await (i.e. in an async expression none of the above
module T = Type type async_cap = let top_cap = Cons.fresh "$top-level" (T.Def([],T.Any)) let initial_cap () = AwaitCap top_cap
bd35da8e607f54259f4722e5d0f0d7520980bf5d7c9da73c641f294b256b9927
xapi-project/xen-api
xapi_diagnostics.ml
Copyright ( C ) Citrix Systems Inc. This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; version 2.1 only . with the special exception on linking described in file LICE...
null
https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/xapi_diagnostics.ml
ocaml
Use Printf.sprintf to keep format
Copyright ( C ) Citrix Systems Inc. This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; version 2.1 only . with the special exception on linking described in file LICE...
71cd63d53475a77d20274a2b4f2edbd2606db2d28314dafab899370f620bcdb1
TerrorJack/ghc-alter
T7787.hs
import Control.Concurrent.MVar import Control.Exception main = do mv <- newMVar 'x' e <- try (modifyMVar mv $ \_ -> return undefined) let _ = e :: Either SomeException () withMVar mv print -- should not hang
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/T7787.hs
haskell
should not hang
import Control.Concurrent.MVar import Control.Exception main = do mv <- newMVar 'x' e <- try (modifyMVar mv $ \_ -> return undefined) let _ = e :: Either SomeException ()
7b988e2162b41838291dab7e0c948060f425e947ab7be9ad97f32f8bbe939ec4
ssor/erlangDemos
my_module.erl
This is a simple Erlang module -module(my_module). -export([pie/0, print/1, either_or_both/2, area/1, sign/1, yesno/1, render/0, sum/1, do_sum/1, rev/1, tailrev/1]). pie() -> 3.14. print(Term) -> io:format("The value of Term is: ~w.~n", [Term]). either_or_both(true, B) when is_boolean(B) -> true...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/erlware-Erlang-and-OTP-in-Action-Source/chapter_02/my_module.erl
erlang
This is a simple Erlang module -module(my_module). -export([pie/0, print/1, either_or_both/2, area/1, sign/1, yesno/1, render/0, sum/1, do_sum/1, rev/1, tailrev/1]). pie() -> 3.14. print(Term) -> io:format("The value of Term is: ~w.~n", [Term]). either_or_both(true, B) when is_boolean(B) -> true...
c7b5a3e48a15a4fddb2fabfb7c9f7783fc60444ca381e78bdfd9dc0b634ee465
kappelmann/engaging-large-scale-functional-programming
SubmissionList.hs
# LANGUAGE CPP # {-# LANGUAGE PackageImports #-} module Competition.SubmissionList (submissions) where import Competition.Game.StrategyWrapper (wrapStrategyEvaluation) import Competition.Types (Submission (..)) #include "SubmissionList.Imports.generated" submissions :: [Submission] submissions = tail [ undefined ...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/80e8a732c38691ff4e602e0cf77ff2eefb486284/resources/game_tournament_framework/backend/tournament-runner/src/Competition/SubmissionList.hs
haskell
# LANGUAGE PackageImports #
# LANGUAGE CPP # module Competition.SubmissionList (submissions) where import Competition.Game.StrategyWrapper (wrapStrategyEvaluation) import Competition.Types (Submission (..)) #include "SubmissionList.Imports.generated" submissions :: [Submission] submissions = tail [ undefined #include "SubmissionList.generat...
9fda7e4d9c2943af4d92336647a40d9694614311db11d678425088b301b7b410
nionita/Barbarossa
TransTab.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE MagicHash # # LANGUAGE CPP # module Hash.TransTab ( Cache, newCache, freeCache, retrieveEntry, readCache, writeCache, newGener, -- checkProp ) where import Control . Applicative ( ( < $ > ) ) import Data.Bits import Data.Int import ...
null
https://raw.githubusercontent.com/nionita/Barbarossa/81032b17ac36dc01771cbcfaaae88c30e7661d7b/Hash/TransTab.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE EmptyDataDecls # checkProp import Test.QuickCheck hiding ((.&.)) type Index = Int this should be the size in bytes of a memory cache line on modern processors The data type Cell and its Storable instance is declared only for alignement purposes The operations in the cell are d...
# LANGUAGE MagicHash # # LANGUAGE CPP # module Hash.TransTab ( Cache, newCache, freeCache, retrieveEntry, readCache, writeCache, newGener, ) where import Control . Applicative ( ( < $ > ) ) import Data.Bits import Data.Int import Data.Word import Foreign.Marshal.Array import Foreign.Marshal.Alloc (free) impo...
142dbdd2561ae77ed317123f3c8d703665eab66dd7e9adea65cd40ef66cf2de0
mirage/ptt-deployer
logging.mli
val init : unit -> unit (** Initialise the Logs library with some sensible defaults. *) val run : unit Current.or_error Lwt.t -> unit Current.or_error (** [run x] is like [Lwt_main.run x], but logs the returned error, if any. *)
null
https://raw.githubusercontent.com/mirage/ptt-deployer/9a2bd4464c6dbc189ba1331adeaedc73defe01d2/src/logging.mli
ocaml
* Initialise the Logs library with some sensible defaults. * [run x] is like [Lwt_main.run x], but logs the returned error, if any.
val init : unit -> unit val run : unit Current.or_error Lwt.t -> unit Current.or_error
64c144b507db07555056ff271725cbb28dc2747b25b67c12fc8f2d4b69bb55b2
chetmurthy/ensemble
socksupp.mli
(**************************************************************) (* SOCKSUPP.MLI *) Ohad Rodeh : 10/2002 (**************************************************************) type buf = string type len = int type ofs = int type socket = Unix.file_descr type timeval = { mutable sec10...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/socket/socksupp.mli
ocaml
************************************************************ SOCKSUPP.MLI ************************************************************
Ohad Rodeh : 10/2002 type buf = string type len = int type ofs = int type socket = Unix.file_descr type timeval = { mutable sec10 : int ; mutable usec : int } type mcast_send_recv = | Recv_only | Send_only | Both type win = Win_3_11 | Win_95_98 | Win_NT_3_5...
45997a57bff3bebb9c7b9b7a24c3d7ed87198dd585c31cb752214b96b52cfa16
tmfg/mmtis-national-access-point
error_landing.cljs
(ns ote.views.error.error-landing (:require [stylefy.core :as stylefy] [ote.style.buttons :as style-buttons] [ote.localization :refer [tr]])) (defn error-landing-vw [{:keys [error-landing]}] [:div [:h2 (or (:title error-landing) (tr [:error-landing :resource-not-found]))] ...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/views/error/error_landing.cljs
clojure
(ns ote.views.error.error-landing (:require [stylefy.core :as stylefy] [ote.style.buttons :as style-buttons] [ote.localization :refer [tr]])) (defn error-landing-vw [{:keys [error-landing]}] [:div [:h2 (or (:title error-landing) (tr [:error-landing :resource-not-found]))] ...
b0277dbcb5e8d1ff505690db5466fc6ab39a755dce6bcc9596ae03ecedd47dbd
cyverse-archive/DiscoveryEnvironmentBackend
serve_test.clj
(ns user-preferences.serve-test (:use [midje.sweet] [kameleon.user-prefs-queries] [kameleon.misc-queries] [user-preferences.serve] [ring.util.response])) (fact "santize works" (sanitize {:foo "bar"}) => {:foo "bar"} (sanitize nil) => {} (sanitize {:preferences "{\"f...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/user-preferences/test/user_preferences/serve_test.clj
clojure
Testing the (get-req) function Testing the (post-req) function testing the (delete-req) function
(ns user-preferences.serve-test (:use [midje.sweet] [kameleon.user-prefs-queries] [kameleon.misc-queries] [user-preferences.serve] [ring.util.response])) (fact "santize works" (sanitize {:foo "bar"}) => {:foo "bar"} (sanitize nil) => {} (sanitize {:preferences "{\"f...
30ab920bd2e995ff5e30283cd7be7f4a0a2fd12044102e243f1dccff8db99306
borkdude/advent-of-cljc
mrmcc3.cljc
(ns aoc.y2018.d08.mrmcc3 (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format]] [aoc.y2018.d08.data :refer [input answer-1 answer-2]] [clojure.test :refer [is testing]] [clojure.string :as str])) (def count-vals (map (comp count :vals))) (def...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d08/mrmcc3.cljc
clojure
delay
(ns aoc.y2018.d08.mrmcc3 (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format]] [aoc.y2018.d08.data :refer [input answer-1 answer-2]] [clojure.test :refer [is testing]] [clojure.string :as str])) (def count-vals (map (comp count :vals))) (def...
1be234d8dc5eda417804f336b3d4c7542c15935adc937f2465d8027e3c203a35
manuel-serrano/bigloo
dsssl.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / recette / dsssl.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/dsssl.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / recette / dsssl.scm * / * Author : * / * Creation : Tue Mar 31 09:21:59 1998 * / * Last change : Mon Nov 11 08:39:25 2013 ( serrano ) * / * DSSSL ...
010a807a5accfed72a31ad92beb1cc567d708b7f38435e452c50d8d3b9436789
tatut/reagent-leaflet
core.cljs
(ns reagent-leaflet.core (:require [reagent.core :as reagent :refer [atom]])) ;;;;;;;;; ;; Define the React lifecycle callbacks to manage the LeafletJS ;; Javascript objects. (declare update-leaflet-geometries) (defn- leaflet-did-mount [this] "Initialize LeafletJS map for a newly mounted map component." (let [...
null
https://raw.githubusercontent.com/tatut/reagent-leaflet/edd68b3dba2bd9c10f5bf2b7af25747663eed789/src/reagent_leaflet/core.cljs
clojure
Define the React lifecycle callbacks to manage the LeafletJS Javascript objects. (.log js/console "L.tileLayer = " layer) If mapspec defines callbacks, bind them to leaflet Add callback for leaflet pos/zoom changes watcher for pos/zoom atoms If the mapspec has an atom containing geometries, add watcher so that ...
(ns reagent-leaflet.core (:require [reagent.core :as reagent :refer [atom]])) (declare update-leaflet-geometries) (defn- leaflet-did-mount [this] "Initialize LeafletJS map for a newly mounted map component." (let [mapspec (:mapspec (reagent/state this)) leaflet (js/L.map (:id mapspec)) view (:v...
f1229430037f8fc4a95f42f713006e6c59ae290fee8931fba91654ec416ad798
gar1t/erlang-cli
cli_opt.erl
-module(cli_opt). -export([new/2]). -export([key/1, desc/1, has_arg/1, short/1, long/1, metavar/1, visible/1]). -export([int_val/4]). -record(opt, {key, desc, has_arg, short, long, metavar, visible}). %% =================================================================== %% New %% ========================...
null
https://raw.githubusercontent.com/gar1t/erlang-cli/4f2b097c43a6959f842969c036e2816e8626fabb/src/cli_opt.erl
erlang
=================================================================== New =================================================================== =================================================================== =================================================================== ======================================...
-module(cli_opt). -export([new/2]). -export([key/1, desc/1, has_arg/1, short/1, long/1, metavar/1, visible/1]). -export([int_val/4]). -record(opt, {key, desc, has_arg, short, long, metavar, visible}). new(Key, Opts) -> {Short, Long} = short_long_from_opts(Opts, Key), #opt{ key=Key, ...
b07a28c074b49fcbc07d8c0b72ab0b977af72cc90514b95e6bab9905d4348869
transient-haskell/transient-stack
Testspark.hs
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-} module Main where import Transient.Base import Transient.Stream.Resource import Data.Char import Control.Monad.IO.Class main= keep . threads 0 $ do chunk <- sourceFile "../transient.cabal" liftIO $ print chunk return $ map ...
null
https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient-universe/tests/Testspark.hs
haskell
# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #
module Main where import Transient.Base import Transient.Stream.Resource import Data.Char import Control.Monad.IO.Class main= keep . threads 0 $ do chunk <- sourceFile "../transient.cabal" liftIO $ print chunk return $ map toUpper chunk `sinkFile` "outfile"
c8d1d405c2937106fe46fdfe7b63bb53bd102728e613fd999f732b9431abb78e
onixie/w32api
user32.lisp
(defpackage #:w32api.user32 (:use #:common-lisp #:cffi #:w32api.type) (:export GetSystemMetrics GetProcessWindowStation EnumDesktopsW CreateDesktopW OpenDesktopW OpenInputDesktop SwitchDesktop CloseDesktop SetThreadDesktop GetThreadDesktop GetUserObjectInformation...
null
https://raw.githubusercontent.com/onixie/w32api/bc2c17a3ff493b4dc22c8c0479ca1bf0bdcce5cc/api/user32.lisp
lisp
CreateWindowA be aware of return -1 when attached window destroyed
(defpackage #:w32api.user32 (:use #:common-lisp #:cffi #:w32api.type) (:export GetSystemMetrics GetProcessWindowStation EnumDesktopsW CreateDesktopW OpenDesktopW OpenInputDesktop SwitchDesktop CloseDesktop SetThreadDesktop GetThreadDesktop GetUserObjectInformation...
4dca973d9cf0825d7682668faac91ec833dff82b2a503f091d1f7ef51f231ca0
panda-planner-dev/ipc2020-domains
p-10.lisp
(defproblem problem domain ( (In_City HauptbahnhofUlm Ulm) (In_City HauptbahnhofMuenchen Muenchen) (At_Vehicle Eisenbahnwagen HauptbahnhofUlm) (At_Vehicle Lokomotive HauptbahnhofUlm) (Connects UlmMuenchenRailRoute HauptbahnhofUlm HauptbahnhofMuenchen) (Available UlmMuenchenRailRoute) (Ava...
null
https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/UM-Translog/other/SHOP2/p-10.lisp
lisp
(defproblem problem domain ( (In_City HauptbahnhofUlm Ulm) (In_City HauptbahnhofMuenchen Muenchen) (At_Vehicle Eisenbahnwagen HauptbahnhofUlm) (At_Vehicle Lokomotive HauptbahnhofUlm) (Connects UlmMuenchenRailRoute HauptbahnhofUlm HauptbahnhofMuenchen) (Available UlmMuenchenRailRoute) (Ava...
9e0ba5cf45efcc1021c12589687380e4fa4289a87bb5178a81f40f9c826a6181
Rober-t/apxr_run
apxr_run_sup.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( C ) 2018 ApproximateReality %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%---------------------------------------------------------------------------- @doc ApxrRun top level supervisor ....
null
https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/src/apxr_run_sup.erl
erlang
---------------------------------------------------------------------------- @end ---------------------------------------------------------------------------- Supervisor callbacks ============================================================================ Types ====================================================...
Copyright ( C ) 2018 ApproximateReality @doc ApxrRun top level supervisor . -module(apxr_run_sup). -behaviour(supervisor). Start / Stop -export([ start_link/0 ]). -export([ init/1 ]). -type sup_flags() :: #{ intensity => non_neg_integer(), period => pos_integer(), strategy => one_for_all | one_for...
788ec49b86c42d5138d822fb73f907bbeae71562e70104db8d777f05fae6d6fa
Haskell-ITA/fuga
Common.hs
module Common where import Data.Flat import Types applyDirection :: Direction -> Position -> Position applyDirection N (x,y) = (x, y + 1) applyDirection S (x,y) = (x, y - 1) applyDirection E (x,y) = (x + 1, y) applyDirection W (x,y) = (x - 1, y) messageOrError :: Either DecodeException c -> c messageOrError = eithe...
null
https://raw.githubusercontent.com/Haskell-ITA/fuga/7fffc42b5943f53ec6270b2a38b24e6bf6c580da/lib/Common.hs
haskell
module Common where import Data.Flat import Types applyDirection :: Direction -> Position -> Position applyDirection N (x,y) = (x, y + 1) applyDirection S (x,y) = (x, y - 1) applyDirection E (x,y) = (x + 1, y) applyDirection W (x,y) = (x - 1, y) messageOrError :: Either DecodeException c -> c messageOrError = eithe...
a8f3224dda77e044c7300db0f85aebce1056167958140092b36e418b13540c16
rubenbarroso/EOPL
1.scm
(let ((time-stamp "Time-stamp: <2001-05-10 05:30:06 dfried>")) (eopl:printf "1.scm: code for chapter 1 ~a~%" (substring time-stamp 13 29))) (define count-nodes (lambda (s) (if (number? s) 1 (+ (count-nodes (cadr s)) (count-nodes (caddr s)) 1)))) (define list-of-numbers? (lambda...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/1.scm
scheme
\new3 \new3 \new3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; This one will be in the text. ; (define vector-sum ; (lambda (von) ; (partial-vector-sum von (vector-length von)))) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
(let ((time-stamp "Time-stamp: <2001-05-10 05:30:06 dfried>")) (eopl:printf "1.scm: code for chapter 1 ~a~%" (substring time-stamp 13 29))) (define count-nodes (lambda (s) (if (number? s) 1 (+ (count-nodes (cadr s)) (count-nodes (caddr s)) 1)))) (define list-of-numbers? (lambda...
bf49381250e0a49d11838f93cfa31d2fb3cd6b590452ff63eb97154d65dc3290
returntocorp/ocaml-tree-sitter-core
Indent.ml
(* Simple, functional pretty-printer. *) open Printf module Types = struct type node = | Line of string | Block of node list | Inline of node list | Space | Group of node list end open Types type t = node list (* Expand Inline nodes, remove empty blocks. *) let rec simplify l = List.m...
null
https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/3ed014873a0eed91fe7a0e6eb32bed29efa91dfa/src/gen/lib/Indent.ml
ocaml
Simple, functional pretty-printer. Expand Inline nodes, remove empty blocks. Length of a collapsible group. If None, the group is not collapsible. removed by 'simplify' removed by 'simplify'
open Printf module Types = struct type node = | Line of string | Block of node list | Inline of node list | Space | Group of node list end open Types type t = node list let rec simplify l = List.map simplify_node l |> List.flatten and simplify_node = function | Line _ as x -> [x] | B...
d8452f6887832fd9be8443425090036784c2e7361faf3066efeffd45d351c614
dpiponi/Moodler
TopologicalSort.hs
# LANGUAGE FlexibleContexts # module TopologicalSort(topologicalSort) where import Control.Monad.State import Data.Maybe import qualified Data.Map as M import qualified Data.Set as S import MoodlerSymbols import Synth import Utils import Debug.Trace inputSource :: Out -> Maybe ModuleName inputSource Disconnected = ...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/src/TopologicalSort.hs
haskell
Topological sort of synth nodes working backwards from output.
# LANGUAGE FlexibleContexts # module TopologicalSort(topologicalSort) where import Control.Monad.State import Data.Maybe import qualified Data.Map as M import qualified Data.Set as S import MoodlerSymbols import Synth import Utils import Debug.Trace inputSource :: Out -> Maybe ModuleName inputSource Disconnected = ...
f8afce640296ef79c03f695fb99c881a416fb1334c78fab25ed259461a288509
huangjs/cl
comm.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/comm.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; op and opr properti...
(in-package :maxima) * * ( c ) Copyright 1982 Massachusetts Institute of Technology * * (macsyma-module comm) (declare-top (special $exptsubst $linechar $nolabels $inflag $piece $dispflag $gradefs $props $dependencies derivflag derivlist $linenum $partswitch linelable nn* dn* islinp $power...
e1f2bebebf6f6c073aa47003c9a5ce588205b763abd6e92456f455eddfc5bf4b
ashinn/chibi-scheme
hamt-test.scm
HAMT Core Tests Copyright MMXV - MMXVII . All rights reserved . ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the righ...
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/146/hamt-test.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
HAMT Core Tests Copyright MMXV - MMXVII . All rights reserved . files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT ...
374fc533688c6564aca176b4f7d389d94f103bcd1c64b3088dd79e4adf40228f
janestreet/accessor_base
accessor_list.mli
open! Base open! Import (** See also: [Accessor_core.List] *) (** Access [()] iff the list is empty. *) val nil : (_, unit, 'a list, [< variant ]) Accessor.t (** Access the head and tail of a list, if it is nonempty. *) val cons : ( 'i -> 'a * 'a list -> 'b * 'b list , 'i -> 'a list -> 'b list , [< variant...
null
https://raw.githubusercontent.com/janestreet/accessor_base/8384c29a37e557168ae8a43b2a5a531f0ffc16e4/src/accessor_list.mli
ocaml
* See also: [Accessor_core.List] * Access [()] iff the list is empty. * Access the head and tail of a list, if it is nonempty. * Access an element at a specified position in a list, if the list is long enough to have such an element. * Access a reversed version of a list. * [prefixed prefix ~equal] verifies th...
open! Base open! Import val nil : (_, unit, 'a list, [< variant ]) Accessor.t val cons : ( 'i -> 'a * 'a list -> 'b * 'b list , 'i -> 'a list -> 'b list , [< variant ] ) Accessor.General.t val nth : int -> (_, 'a, 'a list, [< optional ]) Accessor.t val reversed : ( 'i -> 'a list -> 'b list , ...
725c475b3eaa58478dc98884efcf92e212c1c71013dc92cfd2f8e2a1d07dd952
RyanGlScott/gists
WorkingAroundT12564.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module WorkingAroundT12564 where import Data.Kind import Data.Type.Equality data Nat = Z | S Nat type family Len (xs :: [a]) :: ...
null
https://raw.githubusercontent.com/RyanGlScott/gists/81a033bc52c721d566d724122818e422718552a9/src/WorkingAroundT12564.hs
haskell
# LANGUAGE GADTs # --- Attempt 1 (failed) --- --- --- Unit tests --- Attempt 2 (alternative approach) --- Unit tests
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module WorkingAroundT12564 where import Data.Kind import Data.Type.Equality data Nat = Z | S Nat type family Len (xs :: [a]) :: Nat where Len '[] ...
767827296ca8315ab0660efcaba699a1746a98508df33d572cc01116e2113463
hexresearch/nixdeploy
Aeson.hs
-- | Overrides aeson TH functions to generate instances module Deployment.Nix.Aeson( A.deriveJSON , dropPrefixOptions ) where import Control.Monad import Data.Aeson.TH (Options (..), SumEncoding (..)) import Data.Aeson.Types (camelTo2, ToJSON(..), FromJSON(..), Value(..)) import Data.Char (isUpper, toLower, is...
null
https://raw.githubusercontent.com/hexresearch/nixdeploy/d68c3555662490fbe1c304f8343d1590bc3f6f15/src/Deployment/Nix/Aeson.hs
haskell
| Overrides aeson TH functions to generate instances | Strip prefix of name that exactly matches specified prefix ^ Prefix ^ Name ^ Name without prefix | Remove from names things like ' and etc | Drop upper case prefixes from constructor names Example: | Options for aeson TH generator, that generates followi...
module Deployment.Nix.Aeson( A.deriveJSON , dropPrefixOptions ) where import Control.Monad import Data.Aeson.TH (Options (..), SumEncoding (..)) import Data.Aeson.Types (camelTo2, ToJSON(..), FromJSON(..), Value(..)) import Data.Char (isUpper, toLower, isLower, isPunctuation) import Data.List (findIndex) impor...
8bd74b11c39121ff84494d0a71d537c1192836ac40a92e9f061dca2e2f9248e5
swlkr/majestic-web
html.clj
(ns {{name}}.html (:require [hiccup.page :refer [html5 include-css include-js]] [hiccup.form :refer [hidden-field text-field submit-button]] [ring.middleware.anti-forgery :refer [*anti-forgery-token*]])) (defn layout [content] (html5 [:head [:meta {:name "viewport" :content "width=...
null
https://raw.githubusercontent.com/swlkr/majestic-web/3d247f6b5ccc4ff3662a64544a4ca27beada971b/resources/leiningen/new/majestic_web/html.clj
clojure
(ns {{name}}.html (:require [hiccup.page :refer [html5 include-css include-js]] [hiccup.form :refer [hidden-field text-field submit-button]] [ring.middleware.anti-forgery :refer [*anti-forgery-token*]])) (defn layout [content] (html5 [:head [:meta {:name "viewport" :content "width=...
758e2c9ed5593659e35619f371d6abdfce4be419f489413444fb4041da88885b
aperiodic/many-worlds
api.clj
(ns many-worlds.api (:require [clojure.edn :as edn] [compojure.core :refer [GET PUT routes]] [compojure.route :as route] [quil.core :as quil] [quil.applet :refer [*applet*]] [qutils.animation :as _a] ; purely to load the defrecords [qutils.curve ...
null
https://raw.githubusercontent.com/aperiodic/many-worlds/be6401e973f8107d22f5ad865fda0ae63e52ab6f/src/clj/many_worlds/api.clj
clojure
purely to load the defrecords purely to load the defrecords if only the current position of the bezier walk if it's not a number, or it's console application
(ns many-worlds.api (:require [clojure.edn :as edn] [compojure.core :refer [GET PUT routes]] [compojure.route :as route] [quil.core :as quil] [quil.applet :refer [*applet*]] [ring.adapter.jetty :refer [run-jetty]] [ring.middleware.cors :refer [wr...
846109705d40d774d6b220617d738047d9d287766e51037c4643237b25bad20a
margnus1/kid-mud
colour.erl
Copyright ( c ) 2012 , , and See the file license.txt for copying permission . -module(colour). -include_lib("eunit/include/eunit.hrl"). -export([text/2, text/3]). -type io_list() :: [integer() | io_list()]. -type colour() :: black | red | green | yellow | blue | magenta | cyan | white. @doc Formats th...
null
https://raw.githubusercontent.com/margnus1/kid-mud/56d759593e79d9c8ba7c45f9fc716d65de2554a7/src/colour.erl
erlang
@todo Implement it The control characters are escaped by io:fprint so this is currently useless @doc and background colour Background @end @todo Implement it
Copyright ( c ) 2012 , , and See the file license.txt for copying permission . -module(colour). -include_lib("eunit/include/eunit.hrl"). -export([text/2, text/3]). -type io_list() :: [integer() | io_list()]. -type colour() :: black | red | green | yellow | blue | magenta | cyan | white. @doc Formats th...
86af837e7e6e86ce05a67aeee9f081e6100fd8388e335de01d82544980a81794
mrosset/nomad
repl.scm
;; repl.scm Copyright ( C ) 2017 - 2018 < > This file is part of Nomad Nomad 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 vers...
null
https://raw.githubusercontent.com/mrosset/nomad/c94a65ede94d86eff039d2ef62d5ef3df609568a/scheme/nomad/repl.scm
scheme
repl.scm (at your option) any later version. 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. with this program. If not, see </>. FIXME: if socket clients are connected, (server-force-delete) will...
Copyright ( C ) 2017 - 2018 < > This file is part of Nomad Nomad 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 Nomad is distributed in the hope that it wi...
5e722f37785bd374320f14bdc807af6c17f0bfe2e847cfec7b70a925e8539d9d
DavidAlphaFox/RabbitMQ
rabbit_access_control.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_access_control.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
06a236976573af2c0cef40ab64260ab1a7f79103be3f4caa8be5c49d69977434
ericclack/overtone-loops
pattern_03_06.clj
(ns overtone-loops.dph-book.pattern-03-06 (:use [overtone.live] [overtone-loops.loops] [overtone-loops.samples])) ;; Stop any currently playing music and clear any patterns (set-up) BAR1 BAR2 BAR3 BAR4 ;; ...
null
https://raw.githubusercontent.com/ericclack/overtone-loops/54b0c230c1e6bd3d378583af982db4e9ae4bda69/src/overtone_loops/dph_book/pattern_03_06.clj
clojure
Stop any currently playing music and clear any patterns 1 & 2 & 3 & 4 & // 1 & 2 & 3 & 4 & // 1 & 2 & 3 & 4 & // 1 & 2 & 3 & 4 & Variations We use at-bar to schedule the loops Now mix it up: Bars 5-8 Bars 13-16 (stop)
(ns overtone-loops.dph-book.pattern-03-06 (:use [overtone.live] [overtone-loops.loops] [overtone-loops.samples])) (set-up) BAR1 BAR2 BAR3 BAR4 (defloop closed-hhs 1/2 cymbal-closed [7 5 7 4 6 3 8 4 ...
83593d8c2f30463f91bcf62020eb6cd5bfc08647bad772530bad38711810d09e
lexi-lambda/litpub
api-unit.rkt
#lang racket/unit (require "../model.rkt" "../util/client-ip.rkt" "../util/jsexpr.rkt" "api-sig.rkt") (import) (export api^) (define (story-likes:create req story-id) (let ([ip (client-ip req)]) (create-story-like! story-id ip) (response/jsexpr #:code 201 #:message #"Cr...
null
https://raw.githubusercontent.com/lexi-lambda/litpub/2f326c1c0e0ee8cad0b8b3f7f7b4a49a02ac62b5/handler/api-unit.rkt
racket
#lang racket/unit (require "../model.rkt" "../util/client-ip.rkt" "../util/jsexpr.rkt" "api-sig.rkt") (import) (export api^) (define (story-likes:create req story-id) (let ([ip (client-ip req)]) (create-story-like! story-id ip) (response/jsexpr #:code 201 #:message #"Cr...
b920105759c8095a37fb1271b6bca070d5af1a2bb35caf7a49b32d1cbed30962
pablo-meier/ScrabbleCheat
movesearch_tests.erl
-module(movesearch_tests). -include_lib("eunit/include/eunit.hrl"). runs Eunit tests from a .eunit directory ; cd out , maybe %% later find a way to more cleanly set $PROJECT_HOME or some such %% var. -define(TESTDICT, lists:concat([code:priv_dir(scrabblecheat), "/testdict.dict"])). -import(game_parser, [new_boa...
null
https://raw.githubusercontent.com/pablo-meier/ScrabbleCheat/718cb768a910f2ba7ca6cd1d2aae0e342849bf0a/code/server/test/eunit/movesearch_tests.erl
erlang
later find a way to more cleanly set $PROJECT_HOME or some such var. Getting candidate locations Zoomtiles Move Generation Walls Test ZYGOTE, where 'TE' hooks onto bottom of AB in ABLE this has been crashing in the client, worth automating this has been crashing in the client, worth automating Another inco...
-module(movesearch_tests). -include_lib("eunit/include/eunit.hrl"). runs Eunit tests from a .eunit directory ; cd out , maybe -define(TESTDICT, lists:concat([code:priv_dir(scrabblecheat), "/testdict.dict"])). -import(game_parser, [new_board/0]). -import(board, [place_word/4, get_tile/3]). -import(gaddag, [get_br...
2e622e95d5113d029ccc2c68bcf9d3b23b19bda34f75103f8c7ad94c68e6464a
lowasser/TrieMap
Buildable.hs
# LANGUAGE BangPatterns , UnboxedTuples , MagicHash , NamedFieldPuns , RecordWildCards , FlexibleInstances , MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Data.TrieMap.WordMap.Buildable (WordStack) where import Data.TrieMap.TrieKey import Data.Word import Data.TrieMap.WordMap.Base import Data.TrieMap.Word...
null
https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/WordMap/Buildable.hs
haskell
# LANGUAGE BangPatterns , UnboxedTuples , MagicHash , NamedFieldPuns , RecordWildCards , FlexibleInstances , MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Data.TrieMap.WordMap.Buildable (WordStack) where import Data.TrieMap.TrieKey import Data.Word import Data.TrieMap.WordMap.Base import Data.TrieMap.Word...
f87129f4476ad18aece16261ff8613b79716c5f5ee08797251c7fa59788fd40d
wdebeaum/step
phrase.lisp
;;;; ;;;; W::phrase ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::phrase (SENSES ((LF-PARENT ONT::linguistic-component) ;linguistic-object) (EXAMPLE "type a word or phrase in the box") (meta-data :origin task-learning :entry-date 20050817 :change-date nil :wn ("phrase%1:10:00") ...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/phrase.lisp
lisp
W::phrase linguistic-object)
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::phrase (SENSES (EXAMPLE "type a word or phrase in the box") (meta-data :origin task-learning :entry-date 20050817 :change-date nil :wn ("phrase%1:10:00") :comments nil) ) ) ) ))
633bc3a9e1293ffa72b6380c950dc73dfd20c086f446968704e0e006d1a88d41
ocaml-flambda/ocaml-jst
bytepackager.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/bytecomp/bytepackager.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the " Package " a set of .cmo files into one .cmo file having the original compilation units as sub - ...
acff7467703d1f1580edb7f96846c2b8702546023d20a24feae9ddec0c7e8318
kazu-yamamoto/cab
Main.hs
module Main where import Control.Exception (Handler(..)) import qualified Control.Exception as E (catches) import Control.Monad (when) import Data.List (isPrefixOf, intercalate) import Data.Maybe (isNothing) import Distribution.Cab import System.Console.GetOpt (ArgOrder(..), OptDescr(..), getOpt') import System.Enviro...
null
https://raw.githubusercontent.com/kazu-yamamoto/cab/a7bdc7129b079b2d980e529c6ad8c4c6e0456d23/src/Main.hs
haskell
-------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- FixME -------------------------------------------------------------- -------------------------------------------------------------...
module Main where import Control.Exception (Handler(..)) import qualified Control.Exception as E (catches) import Control.Monad (when) import Data.List (isPrefixOf, intercalate) import Data.Maybe (isNothing) import Distribution.Cab import System.Console.GetOpt (ArgOrder(..), OptDescr(..), getOpt') import System.Enviro...
84639e0cc411cd83ce87af4e8f6c742328568630199271f753c4e755601ad910
nuvla/api-server
group.cljc
(ns sixsq.nuvla.server.resources.spec.group (:require [clojure.spec.alpha :as s] [sixsq.nuvla.server.resources.spec.common :as common] [sixsq.nuvla.server.util.spec :as su] [spec-tools.core :as st])) (def user-id-regex #"^user/[a-zA-Z0-9-]+$") (def group-id-regex #"^group/([a-zA-Z0-9]([a-zA-Z0-9_-]*[...
null
https://raw.githubusercontent.com/nuvla/api-server/a595d6956c4f9eae0d6ba96f8af4f1c813f67131/code/src/sixsq/nuvla/server/resources/spec/group.cljc
clojure
(ns sixsq.nuvla.server.resources.spec.group (:require [clojure.spec.alpha :as s] [sixsq.nuvla.server.resources.spec.common :as common] [sixsq.nuvla.server.util.spec :as su] [spec-tools.core :as st])) (def user-id-regex #"^user/[a-zA-Z0-9-]+$") (def group-id-regex #"^group/([a-zA-Z0-9]([a-zA-Z0-9_-]*[...
23944669bdd4fdd09404eeabee3c0cba5b0268acc0935097ceee1e6c1b4874be
psandahl/hats
CallbackTests.hs
module CallbackTests ( callingCallbacks ) where import Control.Concurrent.MVar import Control.Monad (when) import Data.Maybe (isNothing, isJust) import System.Timeout (timeout) import Test.HUnit import Gnatsd import Network.Nats -- | Check that callbacks are called when needed at connection and -- disconnect...
null
https://raw.githubusercontent.com/psandahl/hats/2503edefbda64209d20509b075b3ab90cac39b8d/test/CallbackTests.hs
haskell
| Check that callbacks are called when needed at connection and disconnection. Wait for connection. Check that no disconnect has happen. Shoot down gnatsd ... Now a disconnect shall have happen. Start gnatsd again ... Check that we have a new connect callback. Done. Close.
module CallbackTests ( callingCallbacks ) where import Control.Concurrent.MVar import Control.Monad (when) import Data.Maybe (isNothing, isJust) import System.Timeout (timeout) import Test.HUnit import Gnatsd import Network.Nats callingCallbacks :: Assertion callingCallbacks = do connect <- newEmptyMV...
3ee3ff5e1172963ac6e1103bb98b6440b8807f750ff473ab60b519c485872d92
nha/boot-uglify
boot_task.clj
(ns nha.boot-uglify.boot-task {:boot/export-tasks true} (:require [clojure.java.io :as io :refer [as-file]] [clojure.string :as string] [boot.pod :as pod] [boot.core :as core :refer [deftask tmp-dir! tmp-get tmp-path tmp-file commit! rm add-resource]] ...
null
https://raw.githubusercontent.com/nha/boot-uglify/df0cffb2734bdd1db2be1fab5fcefdda5f735e68/src/nha/boot_uglify/boot_task.clj
clojure
join consecutive statemets with the “comma operator” discard unreachable code discard “debugger” statements some unsafe optimizations optimize if-s and conditional expressions optimize comparisons evaluate constant expressions optimize boolean expressions optimize loops drop unused variables/functions hoist ...
(ns nha.boot-uglify.boot-task {:boot/export-tasks true} (:require [clojure.java.io :as io :refer [as-file]] [clojure.string :as string] [boot.pod :as pod] [boot.core :as core :refer [deftask tmp-dir! tmp-get tmp-path tmp-file commit! rm add-resource]] ...
e31f25df068afe1c8895d26e6ae4510562f4c8b979c366de074bde7744327e93
haskell-beam/beam
Database.hs
module Database.Beam.Migrate.Tool.Database where import Database.Beam.Migrate.Backend import Database.Beam.Migrate.Log import Database.Beam.Migrate.Tool.Backend import Database.Beam.Migrate.Tool.CmdLine import Database.Beam.Migrate.Tool.Registry import Contr...
null
https://raw.githubusercontent.com/haskell-beam/beam/596981a1ea6765b9f311d48a2ec4d8460ebc4b7e/beam-migrate-cli/Database/Beam/Migrate/Tool/Database.hs
haskell
Get the constraints and see if the migration table already exists
module Database.Beam.Migrate.Tool.Database where import Database.Beam.Migrate.Backend import Database.Beam.Migrate.Log import Database.Beam.Migrate.Tool.Backend import Database.Beam.Migrate.Tool.CmdLine import Database.Beam.Migrate.Tool.Registry import Contr...
5e9a070c1dde321fdadbe39b65aebf86ba062262697633b003f74c837d10bd98
AbstractMachinesLab/caramel
env.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/typing/409/env.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Types open Misc type summary = Env_empty | Env_value of summary * Ident.t * value_descriptio...
1bbc5c292a12011891740f5f4645a80dfe0014584f9a7d28595d53d433eefb57
haskell-distributed/network-transport-tcp
Internal.hs
-- | Utility functions for TCP sockets module Network.Transport.TCP.Internal ( ControlHeader(..) , encodeControlHeader , decodeControlHeader , ConnectionRequestResponse(..) , encodeConnectionRequestResponse , decodeConnectionRequestResponse , forkServer , recvWithLength , recvExact , recvWord32 , ...
null
https://raw.githubusercontent.com/haskell-distributed/network-transport-tcp/b8bf605ec3aab410664ba519c93f570b848082ef/src/Network/Transport/TCP/Internal.hs
haskell
| Utility functions for TCP sockets | Local identifier for an endpoint within this transport | Identifies the version of the network-transport-tcp protocol. established. | Control headers | Tell the remote endpoint that we created a new connection | Tell the remote endpoint we will no longer be using a connectio...
module Network.Transport.TCP.Internal ( ControlHeader(..) , encodeControlHeader , decodeControlHeader , ConnectionRequestResponse(..) , encodeConnectionRequestResponse , decodeConnectionRequestResponse , forkServer , recvWithLength , recvExact , recvWord32 , encodeWord32 , tryCloseSocket , try...
03db7c42f1d9a91d883ec48d1eec9a7602531035af87b1d71912eb620c7e0f66
racket/slideshow
info.rkt
#lang info (define scribblings '(("slideshow.scrbl" (multi-page) (tool))))
null
https://raw.githubusercontent.com/racket/slideshow/4588507e83e9aa859c6841e655b98417d46987e6/slideshow-doc/scribblings/slideshow/info.rkt
racket
#lang info (define scribblings '(("slideshow.scrbl" (multi-page) (tool))))
82f4016fe9c775d549102e1c27c2ae005a0741014a92666c3865ef17f05cdfaf
tomhanika/conexp-clj
contexts_test.clj
;; Copyright ⓒ the conexp-clj developers; all rights reserved. ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bou...
null
https://raw.githubusercontent.com/tomhanika/conexp-clj/9f53c71913fa39b95516c388d9e426bec34e3a77/src/test/clojure/conexp/io/contexts_test.clj
clojure
Copyright ⓒ the conexp-clj developers; all rights reserved. The use and distribution terms for this software are covered by the which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not re...
Eclipse Public License 1.0 ( -1.0.php ) (ns conexp.io.contexts-test (:use conexp.base conexp.fca.contexts conexp.fca.many-valued-contexts conexp.io.contexts conexp.io.util-test) (:use clojure.test)) (def- contexts-oi "Context to use for out-in testing" [(make-context #{"a" "...
1ca95b15991971324923e154ea42b00f7d556cfdfc367daaf94c954b79331980
yuriy-chumak/ol
Windows.scm
(setq user32 (load-dynamic-library "user32.dll")) (setq gdi32 (load-dynamic-library "gdi32.dll")) (setq opengl32 (load-dynamic-library "opengl32.dll")) (setq CreateWindowEx (user32 fft-void* "CreateWindowExW" fft-int type-string-wide type-string-wide fft-int fft-int fft...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/0f38ec46e80724e468ebc5ed205812065c3adf4a/libraries/lib/gl/Windows.scm
scheme
functions WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN x y width height no parent window no menu instance nVersion iPixelType - PFD_TYPE_RGBA cColorBits cRedBits, cRedShift, cGreenBits, cGreenShift, cBlueBits, cBlueShift (Not used) cAlphaBits, cAlphaShift cDepthBits cAuxBuffers iLayerType - PF...
(setq user32 (load-dynamic-library "user32.dll")) (setq gdi32 (load-dynamic-library "gdi32.dll")) (setq opengl32 (load-dynamic-library "opengl32.dll")) (setq CreateWindowEx (user32 fft-void* "CreateWindowExW" fft-int type-string-wide type-string-wide fft-int fft-int fft...
c8cc9d800033dcc659c73df4b4544c906d8e0519e394a6857d6e1e692e14ab6c
ocaml-multicore/ocaml-tsan
raise_through_handler.ml
TEST * tsan * * native ocamlopt_flags = " -g " include unix set TSAN_OPTIONS="detect_deadlocks=0 " * tsan ** native ocamlopt_flags = "-g" include unix set TSAN_OPTIONS="detect_deadlocks=0" *) open Printf open Effect open Effect.Deep let g_ref = ref 0 let [@inline never] race () = g_ref := 42 l...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/594bd94629e59507c643e00408fb4a0f46d2630c/testsuite/tests/tsan/raise_through_handler.ml
ocaml
TEST * tsan * * native ocamlopt_flags = " -g " include unix set TSAN_OPTIONS="detect_deadlocks=0 " * tsan ** native ocamlopt_flags = "-g" include unix set TSAN_OPTIONS="detect_deadlocks=0" *) open Printf open Effect open Effect.Deep let g_ref = ref 0 let [@inline never] race () = g_ref := 42 l...
2d60a0dbf48ecb3a551089ddb63554a25dbf7b372e1df6add869cd3745fad8c2
pjotrp/guix
monad-repl.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 , 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/guix/monad-repl.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 , 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix monad-repl) #:use-module (guix store) #:use-module (guix monads) #:use-module (g...
9cf6368ec9540be09c0993455ad81c5ad3c1ea940f581a48697cf13565a019eb
avsm/mirage-duniverse
topkg_codec.mli
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/topkg/src/topkg_codec.mli
ocaml
* {1 Codec}
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
4faf2b7da77724a8a089fd59386e14a728146151ac9281d28f0a600a5b4c9220
s-expressionists/Cleavir
packages.lisp
(defpackage #:cleavir-graph-test-utilities (:use #:cl #:cleavir-graph) (:export #:node #:make-node #:name #:successors #:random-flow-chart))
null
https://raw.githubusercontent.com/s-expressionists/Cleavir/e0293780d356a9d563af9abf9317019f608b4e1d/Graph/Test-utilities/packages.lisp
lisp
(defpackage #:cleavir-graph-test-utilities (:use #:cl #:cleavir-graph) (:export #:node #:make-node #:name #:successors #:random-flow-chart))
625ad157b6ca2da58c4e24f9d5a0551239a2079330f1ce5cb08865b6fee88461
janestreet/async
rpc.mli
* This module just re - exports lots of modules from [ Async_rpc_kernel ] and adds some Unix - specific wrappers in [ Connection ] ( for using [ Reader ] , [ Writer ] , and [ ] ) . For documentation , see { { ! Async_rpc_kernel . Rpc}[Rpc ] } and { { ! Async_rpc_kernel__.Connection_intf}[Connection...
null
https://raw.githubusercontent.com/janestreet/async/56d8d18f61e010fbb975ce3c6df2ab4cc86f6543/async_rpc/src/rpc.mli
ocaml
* These functions are mostly the same as the ones with the same names in [Async_rpc_kernel.Rpc.Connection]; see [Connection_intf] in that library for documentation. The differences are that: - they take an [Async_unix.Reader.t], [Async_unix.Writer.t] and [max_message_size] instead of a [Trans...
* This module just re - exports lots of modules from [ Async_rpc_kernel ] and adds some Unix - specific wrappers in [ Connection ] ( for using [ Reader ] , [ Writer ] , and [ ] ) . For documentation , see { { ! Async_rpc_kernel . Rpc}[Rpc ] } and { { ! Async_rpc_kernel__.Connection_intf}[Connection...
1cbd46557e9df9920050f25606cd1eaf6fbd27bf5ab4282f643d0427670925fc
ConsumerDataStandardsAustralia/validation-prototype
PayeesTest.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeApplications # module Web.ConsumerData.Au.Api.Types.Banking.PayeesTest where import Control.Lens import Data.Functor.Identity (Identity) import Data.Tagged (Tagged) import Test.Tasty ...
null
https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/tests/Web/ConsumerData/Au/Api/Types/Banking/PayeesTest.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE RankNTypes #
# LANGUAGE TypeApplications # module Web.ConsumerData.Au.Api.Types.Banking.PayeesTest where import Control.Lens import Data.Functor.Identity (Identity) import Data.Tagged (Tagged) import Test.Tasty (TestTree) import Text.URI.QQ (uri) import Waargonaut.Decode (Decoder) import Waar...
80e8aff2020e6f951b08bd285f18bc505fc9ace866b0bc8b5034d97444a5792c
lisp/de.setf.xml
namespace.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:ni...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/sweet-jpl-nasa-gov/ontology/space-owl/namespace.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (xqdm:find-namespace "#" :if-does-not-exist :load)
(in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:nicknames) (:export "Admin...
371ca104154fa4708c10823cb8b679b007fed103971cf18708f3a6ee7a374f6b
newque/newque
http_prot.ml
open Core open Lwt open Cohttp open Cohttp_lwt_unix module Logger = Log.Make (struct let section = "Http" end) type t = { generic: Config_t.config_listener; specific: Config_t.config_http_settings; sock: Lwt_unix.file_descr; stop_w: unit Lwt.u; ctx: Cohttp_lwt_unix_net.ctx; thread: unit Lwt.t; exception...
null
https://raw.githubusercontent.com/newque/newque/dee73e2cb7be8700847f9e5cf900731cc20b1b8c/src/server/protocols/http_prot.ml
ocaml
Catch errors that bubbled up from the backend
open Core open Lwt open Cohttp open Cohttp_lwt_unix module Logger = Log.Make (struct let section = "Http" end) type t = { generic: Config_t.config_listener; specific: Config_t.config_http_settings; sock: Lwt_unix.file_descr; stop_w: unit Lwt.u; ctx: Cohttp_lwt_unix_net.ctx; thread: unit Lwt.t; exception...
025ccd57cc68e8b462d016bc6970345cc137e17d3aab6bc884176530aa9f8b99
statebox/cql
Lib.hs
SPDX - License - Identifier : AGPL-3.0 - only This file is part of ` statebox / cql ` , the categorical query language . Copyright ( C ) 2019 < This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free So...
null
https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/http/src/Api/Lib.hs
haskell
servant-server warp
SPDX - License - Identifier : AGPL-3.0 - only This file is part of ` statebox / cql ` , the categorical query language . Copyright ( C ) 2019 < This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free So...
17da6123e6102feed8341640785d1ff31b45bb78857cfb3a8318accc37414283
alissa-tung/hs-http
Internal.hs
module Z.Data.HTTP.Internal where import Data.Maybe import qualified Z.Data.ASCII as C import qualified Z.Data.Builder as B import qualified Z.Data.Parser as P import qualified Z.Data.Vector as V data HTTPVersion = HTTP1_1 versionToBytes :: HTTPVersion -> V.Bytes versionToBytes = \case HTTP1_1 -> "HTTP/1.1" parse...
null
https://raw.githubusercontent.com/alissa-tung/hs-http/d2871b730b00ad6671aa18bbef24312eaf67844c/Z/Data/HTTP/Internal.hs
haskell
| message-body = *OCTET
module Z.Data.HTTP.Internal where import Data.Maybe import qualified Z.Data.ASCII as C import qualified Z.Data.Builder as B import qualified Z.Data.Parser as P import qualified Z.Data.Vector as V data HTTPVersion = HTTP1_1 versionToBytes :: HTTPVersion -> V.Bytes versionToBytes = \case HTTP1_1 -> "HTTP/1.1" parse...