_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
65bab956eb0215d63325657c63ec35e2983fbb62b4b66c7cb857aa64dbc5909a
unisonweb/unison
UriParser.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # module Unison.Test.UriParser where import Data.Functor (void) import qualified Data.Sequence as Seq import Data.Text (Text) import qualified Data.Text as Text import EasyTest import qualified Text.Megaparsec as P import Unison.Codebase.Editor.RemoteRepo ...
null
https://raw.githubusercontent.com/unisonweb/unison/84f36ff4a8306d47c82046d5e733c80bda4ee2d0/unison-cli/tests/Unison/Test/UriParser.hs
haskell
# LANGUAGE OverloadedStrings # Local Protocol File Protocol $ git clone [:treeish][:[#hash][.path]] <- imagined $ git clone ssh://[user@]server/project.git[:treeish][:[#hash][.path]] $ git clone [user@]server:project.git[:treeish][:[#hash][.path]]
# LANGUAGE PatternSynonyms # module Unison.Test.UriParser where import Data.Functor (void) import qualified Data.Sequence as Seq import Data.Text (Text) import qualified Data.Text as Text import EasyTest import qualified Text.Megaparsec as P import Unison.Codebase.Editor.RemoteRepo (ReadGitRepo (..), ReadRemoteNamesp...
e89f9ebd811fdaf3534a663f70cafab84777df46fdcc8d6104c7c878c3561237
OCamlPro/ocaml-benchs
almabench.ml
* ALMABENCH 1.0.1 * Objective Caml version * * A number - crunching benchmark designed for cross - language and vendor * comparisons . * * Written by , from versions for * C++ and java . * * No rights reserved . This is public domain software , for use by an...
null
https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/almabench/almabench.ml
ocaml
number of days to include in test tables for trigonometric terms to be added to the mean elements of the semi-major axes. tables giving the trigonometric terms to be added to the mean elements of the mean longitudes . Normalize angle into the range -pi <= A < +pi. The reference frame is equatorial and is...
* ALMABENCH 1.0.1 * Objective Caml version * * A number - crunching benchmark designed for cross - language and vendor * comparisons . * * Written by , from versions for * C++ and java . * * No rights reserved . This is public domain software , for use by an...
48ce5216d12793c6a47f8c5f6417949c38081fbd6cbdf292122db7728ef9226d
sbryant/clcss
package.lisp
(defpackage :clcss (:use :cl) (:export :read-css)) (in-package :clcss)
null
https://raw.githubusercontent.com/sbryant/clcss/d74cf029b258b0b65593892478462540728943dc/src/package.lisp
lisp
(defpackage :clcss (:use :cl) (:export :read-css)) (in-package :clcss)
5bbc57a12d4d103d1efa0aef899375cdff089b80deab8d68d075505f1ecdca0f
Clozure/ccl
isearchcoms.lisp
;;; -*- Mode: Lisp; Package: hemlock -*- ;;; ;;; Copyright 2007 Clozure Associates 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 applicab...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/src/isearchcoms.lisp
lisp
-*- Mode: Lisp; Package: hemlock -*- Copyright 2007 Clozure Associates you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp...
distributed under the License is distributed on an " AS IS " BASIS , (in-package :hemlock) (defmode "I-Search" :precedence :highest :default-command "I-Search Exit and Redo") (add-hook abort-hook 'end-isearch-mode) (defhvar "Self Insert Command Name" "The name of the command to handle quoted input (i.e. after...
c0981b85f504009a8c58953a35f132a3022ef9558c90fdfd311cb2bb0ba99e69
melange-re/melange
compile_rec_module.ml
type t = Lambda.lambda Utilities for compiling " module rec " definitions let bs_init_mod (args : t list) loc : t = Lprim (Pccall (Primitive.simple ~name:"#init_mod" ~arity:2 ~alloc:true), args, loc) let bs_update_mod (args : t list) loc : t = Lprim ( Pccall (Primitive.simple ~name:"#update_mod" ~arity...
null
https://raw.githubusercontent.com/melange-re/melange/ebe9a77babef56364032372c1d4215dc4ea277ec/jscomp/core/compile_rec_module.ml
ocaml
collect all function declarations if the module creation is just a set of function declarations and consts, it is good
type t = Lambda.lambda Utilities for compiling " module rec " definitions let bs_init_mod (args : t list) loc : t = Lprim (Pccall (Primitive.simple ~name:"#init_mod" ~arity:2 ~alloc:true), args, loc) let bs_update_mod (args : t list) loc : t = Lprim ( Pccall (Primitive.simple ~name:"#update_mod" ~arity...
bc9ca7315934f4f70d8e5bb1d5c85e092d495513b6e36bb7c95b491c7d7f5f18
bhaskara/programmable-reinforcement-learning
linear-fn-approx-with-bounds.lisp
(in-package fn-approx) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; definition of <linear-fn-approx-with-bounds> class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defclass <linear-fn-approx-with-bounds> (<linear-fn-approx>) ((mins :type vector :reader mins :initarg :m...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/fn-approx/linear-fn-approx-with-bounds.lisp
lisp
definition of <linear-fn-approx-with-bounds> class
(in-package fn-approx) (defclass <linear-fn-approx-with-bounds> (<linear-fn-approx>) ((mins :type vector :reader mins :initarg :mins :writer set-mins) (maxs :type vector :reader maxs :initarg :maxs :writer set-maxs)) (:documentation "Class for linear function approximation where some bounds on parame...
d00c94569de52e9f361bad43209a01281c7274db1e41ddf5406d000aa3e4939c
mroman42/discokitty
HasCups.hs
| Module : HasCups Description : A cup operation for a meaning type . License : GPL-3 Required operations for a meaning type to have some form of formal cups . These can be used for Lambek reductions on the meaning of the sentence . | Module: HasCups Description: A cup operation for a meaning type. Licen...
null
https://raw.githubusercontent.com/mroman42/discokitty/c9e6af9327b187549a3b0e2f3bb14657279ecdc5/source/Discokitty/HasCups.hs
haskell
meaning spaces. In a monoidal category, this should be the composition | Neutral element for the cup operation. This could be given by the identity morphism (state).
| Module : HasCups Description : A cup operation for a meaning type . License : GPL-3 Required operations for a meaning type to have some form of formal cups . These can be used for Lambek reductions on the meaning of the sentence . | Module: HasCups Description: A cup operation for a meaning type. Licen...
962543b5a645a489526d356ee7205ca642f13e48b395e8046fa7f98e582ec32f
jashmenn/smoker
gen.clj
(ns smoker.udtf.gen (:import [smoker.udf ClojureUDTF] [java.util ArrayList List] [org.apache.hadoop.hive.ql.exec UDFArgumentException] [org.apache.hadoop.hive.ql.metadata HiveException] [org.apache.hadoop.hive.ql.udf.generic GenericUDTF] [org.apache.hadoop.hive.serde2.objectinspector O...
null
https://raw.githubusercontent.com/jashmenn/smoker/79048c99a69d8fb8d1a57796a6881bf2e732fe0e/src/clj/smoker/udtf/gen.clj
clojure
(if (not (= (count args) (count emits))) (throw (UDFArgumentException. (str *ns* " takes exactly " (count emits) " arguments"))))
(ns smoker.udtf.gen (:import [smoker.udf ClojureUDTF] [java.util ArrayList List] [org.apache.hadoop.hive.ql.exec UDFArgumentException] [org.apache.hadoop.hive.ql.metadata HiveException] [org.apache.hadoop.hive.ql.udf.generic GenericUDTF] [org.apache.hadoop.hive.serde2.objectinspector O...
58a2f11af4f112608096dbd69178ccbca24b7dd22fd8ac9de511df18200e4047
exercism/babashka
example.clj
(ns scrabble-score (:require [clojure.string :refer [split]])) ;; The letter values as shown in the README (def ^:private letter-values {"AEIOULNRST" 1 "DG" 2 "BCMP" 3 "FHVWY" 4 "K" 5 "JX" 8 "QZ" 10}) ;; A map from letter (as string) to score (def ^:pri...
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/scrabble-score/.meta/src/example.clj
clojure
The letter values as shown in the README A map from letter (as string) to score Defaults to 0 for non-alphabetic input
(ns scrabble-score (:require [clojure.string :refer [split]])) (def ^:private letter-values {"AEIOULNRST" 1 "DG" 2 "BCMP" 3 "FHVWY" 4 "K" 5 "JX" 8 "QZ" 10}) (def ^:private letter->score (reduce-kv (fn [acc letters score] (-> (map str le...
4b11a16dfdd5fe14fedb9a0921b56dd66e96f32c9cb59f79d3e3edef247da234
google/lisp-koans
hash-tables.lisp
Copyright 2013 Google Inc. ;;; 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 distrib...
null
https://raw.githubusercontent.com/google/lisp-koans/43158d8c0eca7e36857dfe8bb49f81881038a78d/koans-solved/hash-tables.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2013 Google Inc. distributed under the License is distributed on an " AS IS " BASIS , (define-test make-hash-table (let ((my-hash-table (make-hash-table))) (true-or-false? t (typep my-hash-table 'hash-table)) (true-or-false? t (hash-table-p my-hash-table)) (true-or-false? nil (hash-table-p...
837792c9326056bd2b077bcb477861cec46bd3ff02dcf5bf37dbfcc68d159e70
processone/ejabberd
ejabberd_auth_external.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_auth_external.erl Author : < > %%% Purpose : Authentication via LDAP external script Created : 12 Dec 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% This program is free softw...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/ejabberd_auth_external.erl
erlang
---------------------------------------------------------------------- File : ejabberd_auth_external.erl Purpose : Authentication via LDAP external script This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope tha...
Author : < > Created : 12 Dec 2004 by < > ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along ...
df6a3c53986d190c0fcada57f15183658c8b111117159def9ada88b8c1355df5
titola/incudine
osc.lisp
(in-package :incudine-tests) (deftest open-sound-control.1 (incudine.osc:with-stream (oscout :direction :output) (list (incudine.osc:input-stream-p oscout) (incudine.osc:output-stream-p oscout) (incudine.osc:open-p oscout) (incudine.osc:block-p oscout) (incudin...
null
https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/tests/osc.lisp
lisp
INCUDINE.OSC:START-MESSAGE is usually used with a INCUDINE.OSC:OUTPUT-STREAM, but it is a test. Again, it's only a test, we don't have to fill a INCUDINE.OSC:INPUT-STREAM. Buffer to octets to buffer. OSC MIDI. "#bundle" timestamp SLIP END SLIP ESC
(in-package :incudine-tests) (deftest open-sound-control.1 (incudine.osc:with-stream (oscout :direction :output) (list (incudine.osc:input-stream-p oscout) (incudine.osc:output-stream-p oscout) (incudine.osc:open-p oscout) (incudine.osc:block-p oscout) (incudin...
4fb59e327238b5ef1c5cdee615a38e263c80ec4ecf4cfc12ed1d34bdf6a2e511
ijvcms/chuanqi_dev
active_mod.erl
%%%------------------------------------------------------------------- @author yubing ( C ) 2016 , < COMPANY > %%% @doc %%% 活动 全服相关活动,限量 %%% @end Created : 23 . 二月 2016 17:27 %%%------------------------------------------------------------------- -module(active_mod). -behaviour(gen_server). -include("common.hr...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/active/active_mod.erl
erlang
------------------------------------------------------------------- @doc 活动 全服相关活动,限量 @end ------------------------------------------------------------------- gen_server callbacks API =================================================================== API ==========================================================...
@author yubing ( C ) 2016 , < COMPANY > Created : 23 . 二月 2016 17:27 -module(active_mod). -behaviour(gen_server). -include("common.hrl"). -include("record.hrl"). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, ?MODULE). -record(state, {}). -expor...
e073c3a87a3dc9b0e949ec9bd30ec5298b9651b797814c6cc41ac8051a151826
MaskRay/OJHaskell
135.hs
import Data.Array m = 1000000 f = concat [takeWhile ((<m).fst) [(n*(4*k-n), 1)| k <- [1+(n`div`4)..n-1]] | n <- [1..m]] main = print $ length $ filter ((==10).snd) $ assocs $ accumArray (+) 0 (1,m) f
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/135.hs
haskell
import Data.Array m = 1000000 f = concat [takeWhile ((<m).fst) [(n*(4*k-n), 1)| k <- [1+(n`div`4)..n-1]] | n <- [1..m]] main = print $ length $ filter ((==10).snd) $ assocs $ accumArray (+) 0 (1,m) f
de6853aa501907df5ffbaa284ba659c5e98595a14f15c67b825d6f0e27cb1235
typelead/eta
T5655.hs
# LANGUAGE TypeFamilies , GADTs , ConstraintKinds , RankNTypes # module T5655 where import GHC.Exts (Constraint) class Show a => Twice a where twice :: a -> a instance Twice Int where twice = (*2) data ETwice where ETwice :: Twice a => a -> ETwice class E e where type C e :: * -> Constraint ap :: (forall a...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/T5655.hs
haskell
# LANGUAGE TypeFamilies , GADTs , ConstraintKinds , RankNTypes # module T5655 where import GHC.Exts (Constraint) class Show a => Twice a where twice :: a -> a instance Twice Int where twice = (*2) data ETwice where ETwice :: Twice a => a -> ETwice class E e where type C e :: * -> Constraint ap :: (forall a...
049127106b4f98fe1d8d41f29a0fa2395015dc9a206f0e225eb96ef1880ea62c
input-output-hk/cardano-sl
Throughput.hs
# LANGUAGE RecordWildCards # module Statistics.Throughput ( throughput ) where import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Time.Units (Microsecond) import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Diagrams (rende...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/tools/post-mortem/src/Statistics/Throughput.hs
haskell
# LANGUAGE RecordWildCards # module Statistics.Throughput ( throughput ) where import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Time.Units (Microsecond) import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Diagrams (rende...
86863c3d37ac5403ca0582e5fd77ad5e90647887b9a87dc757ebc7264f47ef2a
hyperfiddle/electric
dataflow4.clj
(ns dustin.dataflow4 "2021 Jan 31" (:require [dustin.fiddle :refer [submissions submission]] [missionary.core :as m])) (declare via) ; real world use case ; backend query, reactive ; frontend table render ; function composition (comment '{submissions (inc ~>x) query-page [(submissions (...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/dataflow/dataflow4.clj
clojure
real world use case backend query, reactive frontend table render function composition no closures means distinction between passed argument and lexical argument is gone, there are no lexical arguments meaning no reactive special forms inside closures submissions (fn2 [>x] (inc (<- >x))) ! program passives ...
(ns dustin.dataflow4 "2021 Jan 31" (:require [dustin.fiddle :refer [submissions submission]] [missionary.core :as m])) (declare via) (comment '{submissions (inc ~>x) query-page [(submissions (<- >first)) (let [x (<- >first)] (f (postwalk (fn [a] (+ a x...
0ba0e4ea6b42bc94da3425dd2ac9b77dfe819aa327ebecc0a614f133a8921ef3
JHU-PL-Lab/jaylang
ddpa_analysis_logging.ml
type ddpa_logging_level = | Log_nothing | Log_result | Log_everything [@@deriving eq, ord, show, to_yojson] ;; type ddpa_analysis_logging_config = { ddpa_json_logger : Yojson.Safe.t -> unit ; ddpa_cfg_logging_level : ddpa_logging_level ; ddpa_pdr_logging_level : ddpa_logging_level ; ddpa_pdr_deltas : boo...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/ddpa-analysis/ddpa_analysis_logging.ml
ocaml
type ddpa_logging_level = | Log_nothing | Log_result | Log_everything [@@deriving eq, ord, show, to_yojson] ;; type ddpa_analysis_logging_config = { ddpa_json_logger : Yojson.Safe.t -> unit ; ddpa_cfg_logging_level : ddpa_logging_level ; ddpa_pdr_logging_level : ddpa_logging_level ; ddpa_pdr_deltas : boo...
0f27f6743dc302683ef159b55623c2151f54f51a294db1ecc06fa06430fb0f67
patrickgombert/erlang-koans
hints.erl
-module(hints). -export([hint_for_invoking_function/2]). hint_for_invoking_function(about_atoms, truth) -> "Welcome to the Erlang Koans! For these first few koans, the goal is to get each function to evaluate to \"true\" by replacing the \"__\" statement. If this is your first time using Erlang, ...
null
https://raw.githubusercontent.com/patrickgombert/erlang-koans/d80032d99b6ee3537e585ea02b743fe681fad8cf/resources/hints.erl
erlang
-module(hints). -export([hint_for_invoking_function/2]). hint_for_invoking_function(about_atoms, truth) -> "Welcome to the Erlang Koans! For these first few koans, the goal is to get each function to evaluate to \"true\" by replacing the \"__\" statement. If this is your first time using Erlang, ...
abbb3bbf5feab6496133f63deb05152d9a22fae3365c9c284a5b9193977410fc
SimulaVR/godot-haskell
VisualShaderNodeBooleanUniform.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualShaderNodeBooleanUniform () where import Data.Coerce ...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeBooleanUniform.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualShaderNodeBooleanUniform () where import Data.Coerce ...
ffa8291322d6f1afefdd7c4b476c50fa3ec50f3ac0e196d9cfba076c836dd17c
ghosthamlet/algorithm-data-structure
hash_table.clj
(ns algorithm-data-structure.data-structures.hash-table "-algorithms/tree/master/src/data-structures/hash-table" (:require [algorithm-data-structure.data-structures.linked-list :as ll] [algorithm-data-structure.comparator :refer :all] [algorithm-data-structure.util :refer :all]) (:import [...
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/data_structures/hash_table.clj
clojure
(ns algorithm-data-structure.data-structures.hash-table "-algorithms/tree/master/src/data-structures/hash-table" (:require [algorithm-data-structure.data-structures.linked-list :as ll] [algorithm-data-structure.comparator :refer :all] [algorithm-data-structure.util :refer :all]) (:import [...
6afaf6a912bf79b890f07bf579bfc4aa020a1c1d4550af371c4092b9f694c4ae
alexwl/haskell-code-explorer
GhcUtils.hs
# LANGUAGE CPP # # LANGUAGE TupleSections # {-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module HaskellCodeExplorer.GhcUtils ( -- * Pretty-printing toText , instanceToText ...
null
https://raw.githubusercontent.com/alexwl/haskell-code-explorer/2f1c2a4c87ebd55b8a335bc4670eec875af8b4c4/src/HaskellCodeExplorer/GhcUtils.hs
haskell
# LANGUAGE Rank2Types # # LANGUAGE OverloadedStrings # * Pretty-printing * Syntax manipulation * Lookups * Location info * Type-related functions * Documentation processing ------------------------------------------------------------------------------ Pretty-printing ---------------------------------------------...
# LANGUAGE CPP # # LANGUAGE TupleSections # # LANGUAGE DuplicateRecordFields # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module HaskellCodeExplorer.GhcUtils toText , instanceToText , instanceDeclToText , nameToText , tyClDeclPrefix , demangleOccName , stringBu...
11be6570d7c063d015eb664e5abb9874c441a8b3c2bf887f7a340e2340ffd550
vbmithr/ocaml-libbitcoin
payment_address.ml
open Ctypes open Foreign let destroy = foreign "bc_destroy_payment_address" ((ptr void) @-> returning void) let of_string = foreign "bc_create_payment_address_String" (string @-> returning (ptr void)) let of_point = foreign "bc_create_payment_address_Point_Version" (ptr void @-> int @-> returning (ptr_op...
null
https://raw.githubusercontent.com/vbmithr/ocaml-libbitcoin/b93a5cca1d430c38dd822b45e47fc5132fb28ab9/src/payment_address.ml
ocaml
open Ctypes open Foreign let destroy = foreign "bc_destroy_payment_address" ((ptr void) @-> returning void) let of_string = foreign "bc_create_payment_address_String" (string @-> returning (ptr void)) let of_point = foreign "bc_create_payment_address_Point_Version" (ptr void @-> int @-> returning (ptr_op...
ca5cfb3cc04928b04ae8295cff0cb65b6fc0ddb32450f285760fefa88abfb8b0
redis-sd/erlang-ryng
ryng.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > @copyright 2014 , Pagoda Box , Inc. %%% @doc %%% %%% @end Created : 09 Sep 2013 by < > %%%--------...
null
https://raw.githubusercontent.com/redis-sd/erlang-ryng/6b9f3db2f6380de09b173721108083aade4d53ee/src/ryng.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API Name Server API Ring API Node API Object API gen_server callbacks ================================================================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > @copyright 2014 , Pagoda Box , Inc. Created : 09 Sep 2013 by < > -module(ryng). -behaviour(gen_server). -include("ryng.hrl"). -define(SERVER, ?MODULE). -define(TAB, ?MODULE). -define(TAB_RINGS, ryng_r...
f4c78e07bb2b74307054d1a690500a3a85f63cbfc533a5198f8d011ccb92da71
music-suite/music-suite
part.hs
# LANGUAGE OverloadedStrings , TypeFamilies , FlexibleContexts # -- | : Cantus in Memory of ( 1977 ) -- -- Inspired by the Abjad transcription -- module Main where import Music.Prelude hiding (open) import qualified Music.Score as S withTintin :: (HasPitches' a, S.GetPitch a ~ Pitch) => Pitch -> Score a -> S...
null
https://raw.githubusercontent.com/music-suite/music-suite/939d58689d1481523b54d018109bd0cb667a9f71/examples/part.hs
haskell
| Inspired by the Abjad transcription | | Given the melody interval (relative tonic), returns the tintinnabular voice interval. That is return the highest interval that is a member of the tonic minorTriad in any octave which is also less than the given interval fmap (annotate (show n)) $ cue :: Score (Mayb...
# LANGUAGE OverloadedStrings , TypeFamilies , FlexibleContexts # : Cantus in Memory of ( 1977 ) module Main where import Music.Prelude hiding (open) import qualified Music.Score as S withTintin :: (HasPitches' a, S.GetPitch a ~ Pitch) => Pitch -> Score a -> Score a withTintin p x = x <> tintin p x Given t...
883d09af08932c7d07e89f501b67e3bad3315f080ee5ed3ec1b0c9c994214bfb
nitrogen/NitrogenProject.com
demos_continuations.erl
-module (demos_continuations). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demos46.html" }. title() -> "Continuations". headline() -> "Continuations". left() -> [ " <p> Nitrogen supports some (possibly-confusingly named) ...
null
https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_continuations.erl
erlang
Do a lot of hard work here.
-module (demos_continuations). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demos46.html" }. title() -> "Continuations". headline() -> "Continuations". left() -> [ " <p> Nitrogen supports some (possibly-confusingly named) ...
d35a46c42abac2f3ce44a4a7b20c0d62bf2d1f9386c733ec5465b14f4907fe7b
lambdaisland/metabase-datomic
joins_test.clj
(ns metabase.driver.datomic.joins-test (:require [clojure.test :refer :all] [metabase.driver.datomic.test :refer [with-datomic]] [metabase.models.database :refer [Database]] [metabase.test.data :as data] [toucan.db :as db])) (deftest breakout-fk-test (testing "breako...
null
https://raw.githubusercontent.com/lambdaisland/metabase-datomic/7506e67bb5fe2ba0a2ff744ec17ccdeb573e869e/test/metabase/driver/datomic/joins_test.clj
clojure
(this query targets sightings and orders by cities.name and categories.name) (this query joins both cities and categories)
(ns metabase.driver.datomic.joins-test (:require [clojure.test :refer :all] [metabase.driver.datomic.test :refer [with-datomic]] [metabase.models.database :refer [Database]] [metabase.test.data :as data] [toucan.db :as db])) (deftest breakout-fk-test (testing "breako...
9fe75ee954cbc565618264c16279294ed34af25d12051e1ef079614ad933d92e
theodormoroianu/SecondYearCourses
lab6-sol_20210115144729.hs
-- / import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115144729.hs
haskell
/
import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l + 2 -...
86160d9b713df2910f1045f64be203547a4e92880074716539cdef1217d4b531
acieroid/scala-am
apple-tree.scm
(define boom '((blad (appel . golden)) (blad (appel . granny)) (((appel . golden) blad) blad (appel . cox)))) (define (blad? boom) (eq? boom 'blad)) (define (appel? boom) (and (pair? boom) (eq? (car boom) 'appel))) (define (type appel) (cdr appel)) (define (leafs boom) (cond ((null? boom) 0) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/apple-tree.scm
scheme
(define boom '((blad (appel . golden)) (blad (appel . granny)) (((appel . golden) blad) blad (appel . cox)))) (define (blad? boom) (eq? boom 'blad)) (define (appel? boom) (and (pair? boom) (eq? (car boom) 'appel))) (define (type appel) (cdr appel)) (define (leafs boom) (cond ((null? boom) 0) ...
778c8a7ff44aaaeadc3720e03c61033ee0ce27b1b3843952403bb8b3b511f89f
Clojure2D/clojure2d-examples
motion101_1_7.clj
(ns examples.NOC.ch01.motion101-1-7 (:require [clojure2d.core :refer :all] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [clojure2d.color :as c]) (:import fastmath.vector.Vec2)) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/ch01/motion101_1_7.clj
clojure
run few times
(ns examples.NOC.ch01.motion101-1-7 (:require [clojure2d.core :refer :all] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [clojure2d.color :as c]) (:import fastmath.vector.Vec2)) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-...
474bf63192c677dee9a19d80868ace901143b6c726de47717282256cd09de21d
andersfugmann/amqp-client
thread.ml
open Amqp_client_lib let (>>=) = Lwt.(>>=) let (>>|) = Lwt.(>|=) let return = Lwt.return let after ms = Lwt_unix.sleep (ms /. 1000.0) let spawn ?exn_handler t = Lwt.async (fun () -> match exn_handler with | Some handler -> Lwt.catch (fun () -> t) handler | None -> t ) let with_timeout milliseconds deferr...
null
https://raw.githubusercontent.com/andersfugmann/amqp-client/e6e92225b91742fa8777a02ad9b59a1dde45e752/lwt/src/thread.ml
ocaml
Replace with simpler Lwt.wait Pipes. Bounds are not implemented yet. * Not supported yet Can be readers and writers. Pipe of pipes. Must spawn more Start a process that writes
open Amqp_client_lib let (>>=) = Lwt.(>>=) let (>>|) = Lwt.(>|=) let return = Lwt.return let after ms = Lwt_unix.sleep (ms /. 1000.0) let spawn ?exn_handler t = Lwt.async (fun () -> match exn_handler with | Some handler -> Lwt.catch (fun () -> t) handler | None -> t ) let with_timeout milliseconds deferr...
f231eaa052df3c190caa4032af68917857e228f5147b973dc97127e40c9860dd
dnadales/sandbox
Lib.hs
module Lib ( someFunc , module A , module B ) where import A (A (A)) import B someFunc :: IO () someFunc = putStrLn "someFunc"
null
https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/haddock-re-exports/src/Lib.hs
haskell
module Lib ( someFunc , module A , module B ) where import A (A (A)) import B someFunc :: IO () someFunc = putStrLn "someFunc"
3bf502f80c03e99c4d120a8bfe6c4939f30261f5b1a7c45f40c0230ec20eea0b
patrickt/possession
Hitpoints.hs
-- | A (ℕ, ℕ) tuple representing the health of living things. module Data.Hitpoints ( HP (..), injure, isDead, isAlive, ) where import Apecs (Component (..), Map) import Data.Store (Store) import GHC.Generics (Generic) import Numeric.Natural (Natural) data HP = HP {current :: !Integer, total :: !Natur...
null
https://raw.githubusercontent.com/patrickt/possession/9bc9c121908070dfb49b6b97f86a79d10076b34c/src/Data/Hitpoints.hs
haskell
| A (ℕ, ℕ) tuple representing the health of living things.
module Data.Hitpoints ( HP (..), injure, isDead, isAlive, ) where import Apecs (Component (..), Map) import Data.Store (Store) import GHC.Generics (Generic) import Numeric.Natural (Natural) data HP = HP {current :: !Integer, total :: !Natural} deriving stock (Show, Generic, Eq) deriving anyclass (...
e032a3915cc74e20a97ec5d974e13670003a75ce208471327e011e0b09dade43
fpco/ide-backend
Run.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Run Copyright : 2009 -- -- Maintainer : -- Portability : portable -- -- This module provides a data type for program invocations and functions to -- run them. module Distributio...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/Simple/Program/Run.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.Program.Run Maintainer : Portability : portable This module provides a data type for program invocations and functions to run them. | Represents a specific invocation of a specific program. Th...
Copyright : 2009 module Distribution.Simple.Program.Run ( ProgramInvocation(..), IOEncoding(..), emptyProgramInvocation, simpleProgramInvocation, programInvocation, multiStageProgramInvocation, runProgramInvocation, getProgramInvocationOutput, getEffectiveEnvironment, )...
914c9fc0248b8e4b6d1482fd50831360295da09be22bc53151ea7cdb4e522d65
kupl/FixML
sub15.ml
let rec sigma : (int -> int) -> int -> int -> int = fun func a b -> if func a=func b then func a else (func a) + (sigma func (a+1) b) ;;
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/sigma/sigma1/submissions/sub15.ml
ocaml
let rec sigma : (int -> int) -> int -> int -> int = fun func a b -> if func a=func b then func a else (func a) + (sigma func (a+1) b) ;;
cc3a85313a017acb7810878e59d130f84594dd1f63f504a30e7028a3da09e1a2
input-output-hk/ouroboros-network
Assert.hs
# LANGUAGE CPP # # LANGUAGE TypeApplications # module Ouroboros.Consensus.Util.Assert ( assertEqWithMsg , assertWithMsg ) where import GHC.Stack (HasCallStack) import Ouroboros.Consensus.Util.RedundantConstraints assertWithMsg :: HasCallStack => Either String () -> a -> a #i...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/Util/Assert.hs
haskell
# LANGUAGE CPP # # LANGUAGE TypeApplications # module Ouroboros.Consensus.Util.Assert ( assertEqWithMsg , assertWithMsg ) where import GHC.Stack (HasCallStack) import Ouroboros.Consensus.Util.RedundantConstraints assertWithMsg :: HasCallStack => Either String () -> a -> a #i...
632e86bbedc4bb5913d4f252405bd5c622633670cad1fa758abb23d813267dfe
borgeby/jarl
exceptions_test.cljc
(ns jarl.exceptions-test (:require #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer [deftest testing is]]) [jarl.exceptions :refer [rego-type builtin-ex conflict-ex assignment-conflict-ex multiple-outputs-conflict-ex type-ex un...
null
https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/test/cljc/jarl/exceptions_test.cljc
clojure
(ns jarl.exceptions-test (:require #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer [deftest testing is]]) [jarl.exceptions :refer [rego-type builtin-ex conflict-ex assignment-conflict-ex multiple-outputs-conflict-ex type-ex un...
fac7c766b8224b6a8653dd64e89f27df474451bba89ddd1a6d51173320f32dcc
smuenzel/opile
set_of_closures_id.ml
open! Core include Compiler_without_sexp.Set_of_closures_id let sexp_of_t t = print Format.str_formatter t; Format.flush_str_formatter () |> [%sexp_of: string] module Map = struct include Compiler_without_sexp.Set_of_closures_id.Map let sexp_of_t sexp_of_a t = fold (fun key data acc -> (key, data) :: ...
null
https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/compiler-with-sexp/set_of_closures_id.ml
ocaml
open! Core include Compiler_without_sexp.Set_of_closures_id let sexp_of_t t = print Format.str_formatter t; Format.flush_str_formatter () |> [%sexp_of: string] module Map = struct include Compiler_without_sexp.Set_of_closures_id.Map let sexp_of_t sexp_of_a t = fold (fun key data acc -> (key, data) :: ...
f324c84c6be0920b59569aca8a684aac82bc397a527d46259ca23d9e9f64134f
monadbobo/ocaml-core
extended_array.mli
open Core.Std * Extensions to [ Core . Core_array ] . open Core.Std val foldi : init:'a -> 'b array -> f:(int -> 'a -> 'b -> 'a) -> 'a * makes a random split & subset of an array ; p ( the fraction that you want to split ) is constrained to be [ 0 , 1 ] . Note that the length of the first array will be the cl...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/extended_array.mli
ocaml
open Core.Std * Extensions to [ Core . Core_array ] . open Core.Std val foldi : init:'a -> 'b array -> f:(int -> 'a -> 'b -> 'a) -> 'a * makes a random split & subset of an array ; p ( the fraction that you want to split ) is constrained to be [ 0 , 1 ] . Note that the length of the first array will be the cl...
85f56201bf944f75558715ed8e4ca09a12d80ffad0e3aa906dbad040b3a7a80c
grin-compiler/ghc-grin
ParserSpec.hs
# LANGUAGE LambdaCase , QuasiQuotes , OverloadedStrings # module ParserSpec where import qualified Data.Text as Text import Test.Hspec import Test.QuickCheck import Lambda.TH import Lambda.Pretty import Lambda.Parse import Lambda.Syntax import Grin.Pretty (PP(..)) runTests :: IO () runTests = hspec spec spec :: Spe...
null
https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/lambda-grin/test/ParserSpec.hs
haskell
# LANGUAGE LambdaCase , QuasiQuotes , OverloadedStrings # module ParserSpec where import qualified Data.Text as Text import Test.Hspec import Test.QuickCheck import Lambda.TH import Lambda.Pretty import Lambda.Parse import Lambda.Syntax import Grin.Pretty (PP(..)) runTests :: IO () runTests = hspec spec spec :: Spe...
81f94b2654a7a6ed7d001374ae48c4f24236e48cf210e2688652b10aeb2b567e
DanielG/ghc-mod
Logger.hs
# LANGUAGE CPP , RankNTypes # module GhcMod.Logger ( withLogger , withLogger' , checkErrorPrefix , errsToStr , errBagToStrList ) where import Control.Arrow import Control.Applicative import Data.Ord import Data.List import Data.Maybe import Data.Function import Control.Monad.Reader (Reader, ask, runRead...
null
https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/core/GhcMod/Logger.hs
haskell
defaultLogAction does -------------------------------------------------------------- | Logged messages are returned as 'String'. Right is success and Left is failure. -------------------------------------------------------------- --------------------------------------------------------------
# LANGUAGE CPP , RankNTypes # module GhcMod.Logger ( withLogger , withLogger' , checkErrorPrefix , errsToStr , errBagToStrList ) where import Control.Arrow import Control.Applicative import Data.Ord import Data.List import Data.Maybe import Data.Function import Control.Monad.Reader (Reader, ask, runRead...
6375ae0703282f8e02e1636f6bd794feae8d3399eefc7d0297e85e07787bcf95
stumpwm/mahogany
view-interface.lisp
(in-package #:mahogany/wm-interface) (defclass view () ((x :initarg :view-x :reader view-x :initform 0 :type fixnum :documentation "Location of surface in output coordinates") (y :initarg :view-y :reader view-y :initform 0 :type fixnum :documentation "Location of su...
null
https://raw.githubusercontent.com/stumpwm/mahogany/3d8a4e761c5b17496a1b9c02a3562b8cedcd351e/lisp/interfaces/view-interface.lisp
lisp
(in-package #:mahogany/wm-interface) (defclass view () ((x :initarg :view-x :reader view-x :initform 0 :type fixnum :documentation "Location of surface in output coordinates") (y :initarg :view-y :reader view-y :initform 0 :type fixnum :documentation "Location of su...
732ea9ed4b9fd820fdf08a309c37a3f467c28fc362d52c64e8ffbc06581c1585
emqx/emqx
emqx_ratelimiter_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_ratelimiter_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_ratelimiter_SUITE). -compile(export_all). -compile(nowarn_export_all). -define(AP...
e95e71a70bf6b81010abc48bea46d62f48430e3ab1397f0882301d889a11241e
achirkin/qua-view
Local.hs
# LANGUAGE FlexibleContexts # module Commons.NoReflexDom.Local ( onlyChanges , nowAndOnUpdates ) where import Commons.NoReflex import Commons.NoReflexDom.Import import Reflex -- | Get a dynamic that has update events only when its value actually changes. It uses ` Eq ` instance to check if the value c...
null
https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Commons/NoReflexDom/Local.hs
haskell
| Get a dynamic that has update events only when its value actually changes. | Run an action on initial state of the dynamic and on each update.
# LANGUAGE FlexibleContexts # module Commons.NoReflexDom.Local ( onlyChanges , nowAndOnUpdates ) where import Commons.NoReflex import Commons.NoReflexDom.Import import Reflex It uses ` Eq ` instance to check if the value changed . onlyChanges :: ( Reflex t, Eq a, Monad m , MonadSample t...
eaf9c246635d2aea90c5f583bd03779b5421d4e73098a761faae6e6172ada40f
ryszard/clsql
test-fddl.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ====================================================================== ;;;; File: test-fddl.lisp Authors : < > and ;;;; Created: 30/03/2004 Updated : $ Id$ ;;;; Tests for the CLSQL Functional Data Definition Language ( ) . ;;;...
null
https://raw.githubusercontent.com/ryszard/clsql/9aafcb72bd7ca1d7e908938b6a5319753b3371d9/tests/test-fddl.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ====================================================================== File: test-fddl.lisp Created: 30/03/2004 (), also known as the LLGPL. ====================================================================== list current tables create a table, test for i...
Authors : < > and Updated : $ Id$ Tests for the CLSQL Functional Data Definition Language ( ) . This file is part of CLSQL . CLSQL users are granted the rights to distribute and use this software as governed by the terms of the Lisp Lesser GNU Public License (in-package #:clsql-tests) #.(clsql...
f50ef2af784bbe435d8098ff56d6acce8e17f60bd0d63e82222a2b34749c399b
phadej/generic-lens-lite
Example.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFam...
null
https://raw.githubusercontent.com/phadej/generic-lens-lite/b42622174fff42756d599399e9071c4358bd6829/generic-optics-lite/example/Example.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # # LANGUAGE ScopedTypeVariables # ----------------------------------------------------------------------------- Big record -------------------------------------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -funfolding # module Main (module Main) where import Data.Generics.Optics.Lite (HasField, field) import GHC.Generics ...
ef4cb66a469405336613f3de9d383b9757e24944e58626e78712d45b0231c766
Decentralized-Pictures/T4L3NT
test_gas_monad.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 , < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/test/test_gas_monad.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN A...
f29de48aa8305f3ab3aff205d83ad9b0f8aa0ee6bd5d2406758ead3c4a0d14c4
davide/erl_img
lzw.erl
%% File : img_lzw.erl Author : < > %%% Description : LZW compresion Created : 26 Mar 2003 by < > %%% lzw derived from wings e3d__tiff updated and fixed to %%% handle gif and tiff fillorder=2 %%% -module(lzw). -export([decompress_tiff/1, decompress_tiff/3, decompress_gif/1, decom...
null
https://raw.githubusercontent.com/davide/erl_img/1651b345b72086fab2f8faa6a775fd182fdb8eb1/src/lzw.erl
erlang
File : img_lzw.erl handle gif and tiff fillorder=2 should finalize the dictionary (if not using special process) reverse bytes and read the codes backwards needed for gif bit packing not used here reverse bits in a byte FIXME: must be able to write lsb byte order and bit order!
Author : < > Description : LZW compresion Created : 26 Mar 2003 by < > lzw derived from wings e3d__tiff updated and fixed to -module(lzw). -export([decompress_tiff/1, decompress_tiff/3, decompress_gif/1, decompress_gif/2]). -export([compress/1, compress/2, compress/5, compres...
efe02e604e7ea9c0e447218b4bd522353f9ee46c2426a1772ed979adb0e971e8
joinr/spork
general.clj
;;A collection for general utilities. This is basically a dumping ground for ;;small utilities that are undeserving of a seperate library. (ns spork.util.general (:require [clj-tuple :as tup] [spork.util [zipfile :as z] [io :as io]] [clojure.pprint :as pprint])) (defn...
null
https://raw.githubusercontent.com/joinr/spork/85fd342b03d6b7881655f1bd2428016f071e15a4/src/spork/util/general.clj
clojure
A collection for general utilities. This is basically a dumping ground for small utilities that are undeserving of a seperate library. objects may be = but not `identical?`, Derived from clojure.core/case the clauses are not considered This is actually a pretty naive way to parse paths...but I think it'll work for o...
(ns spork.util.general (:require [clj-tuple :as tup] [spork.util [zipfile :as z] [io :as io]] [clojure.pprint :as pprint])) (defn ref? "Predicate yields true if the obj supports (deref ...)" [obj] (instance? clojure.lang.IDeref obj)) (defn collect "Given a seq o...
a82cdee34261fb3437ae253f7f3a37f7bc8ebf532d28195938ea21b4a22abf3d
semmons99/clojure-euler
prob-061.clj
problem 061 ; ; ; ; ; ; ; ; ; ; (use '[clojure.euler.helpers :only (triangle? square? pentagonal? hexagonal? heptagonal? octagonal?)]) (defn from-cyclical [n] (Integer. (str (subs (str n) 2) "00"))) (defn to-cyclical [n] (inc (Integer. (str (subs (str n) 2) "99"))))...
null
https://raw.githubusercontent.com/semmons99/clojure-euler/3480bc313b9df7f282dadf6e0b48d96230f1bfc1/prob-061.clj
clojure
; ; ; ; ; ; ; ; ;
(use '[clojure.euler.helpers :only (triangle? square? pentagonal? hexagonal? heptagonal? octagonal?)]) (defn from-cyclical [n] (Integer. (str (subs (str n) 2) "00"))) (defn to-cyclical [n] (inc (Integer. (str (subs (str n) 2) "99")))) (defn to-type [n] (filter #(no...
4e1986dcf0bbadaa0b6ff612f3bf10cc0872c4a7a567df2cebcd746db4e972b4
martyall/servant-zeppelin
ContentTypes.hs
# OPTIONS_GHC -fno - warn - orphans # module Servant.Zeppelin.Server.Internal.ContentTypes where import Data.Aeson import Data.Functor.Identity import Data.Proxy import Data.Singletons.TypeLits import Data.Text (Text, pack) import Servant.API....
null
https://raw.githubusercontent.com/martyall/servant-zeppelin/2848a06974148614d062056cdad819671d0f2946/servant-zeppelin-server/src/Servant/Zeppelin/Server/Internal/ContentTypes.hs
haskell
------------------------------------------------------------------------------ JSON Instances ------------------------------------------------------------------------------ | A helper class for the JSON instances. # OVERLAPPABLE # # OVERLAPPABLE # # OVERLAPPING #
# OPTIONS_GHC -fno - warn - orphans # module Servant.Zeppelin.Server.Internal.ContentTypes where import Data.Aeson import Data.Functor.Identity import Data.Proxy import Data.Singletons.TypeLits import Data.Text (Text, pack) import Servant.API....
5cbc5f0c7c40da724e7c276a62a59a101296293d8af79a18a656386e64cd023a
motoshira/lib_for_competitive_programming
grid.lisp
;;; EOF ;;; (defpackage #:grid (:use #:cl) (:nicknames #:gr) (:export #:make-grid #:grid #:set-char! #:ref #:valid-p #:accessible-p #:do-dir!)) (in-package #:grid) (defstruct (grid (:constructor make-grid (height width))) (mat (make-array (l...
null
https://raw.githubusercontent.com/motoshira/lib_for_competitive_programming/e7d466918ef52affa24cb5b19304dc7985eee6f1/experimental/grid.lisp
lisp
EOF (defpackage #:grid (:use #:cl) (:nicknames #:gr) (:export #:make-grid #:grid #:set-char! #:ref #:valid-p #:accessible-p #:do-dir!)) (in-package #:grid) (defstruct (grid (:constructor make-grid (height width))) (mat (make-array (list heig...
d0813f5cb70b319a970c5ecb613b6a7d7ba9e828b51da587bd83c27ea5d21212
metabase/metabase
version_info.clj
(ns build.version-info (:require [clojure.string :as str] [metabuild-common.core :as u])) (def version-properties-filename (u/filename u/project-root-directory "resources" "version.properties")) (defn- shell-output-when-nonzero "Call an external shell command, and return the first line that is output if i...
null
https://raw.githubusercontent.com/metabase/metabase/5e9b52a32dfeab754d218c758d08fffbacb7c0e7/bin/build/src/build/version_info.clj
clojure
that 's what GitHub uses
(ns build.version-info (:require [clojure.string :as str] [metabuild-common.core :as u])) (def version-properties-filename (u/filename u/project-root-directory "resources" "version.properties")) (defn- shell-output-when-nonzero "Call an external shell command, and return the first line that is output if i...
1b01259c88876d1e3aedc86c709161b393dc84af4162e0cb28daf2e0b6a7ddc0
district0x/district-registry
events.cljs
(ns district-registry.ui.events (:require [cljs.reader :as reader] [cljsjs.buffer] [clojure.string :as string] [district-registry.shared.utils :as shared-utils] [district-registry.ui.config :as config] [district-registry.ui.contract.district-factory :as district-factory] [district-registry...
null
https://raw.githubusercontent.com/district0x/district-registry/63b1918bf384ef04e579aad4c80a51c4f9f98151/src/district_registry/ui/events.cljs
clojure
Adds the challenge to ipfs and if successfull dispatches ::create-challenge
(ns district-registry.ui.events (:require [cljs.reader :as reader] [cljsjs.buffer] [clojure.string :as string] [district-registry.shared.utils :as shared-utils] [district-registry.ui.config :as config] [district-registry.ui.contract.district-factory :as district-factory] [district-registry...
08d612020d1eeab9a4c7965e71bb9c039268ec4265b5e423e3fd77d5c7d6a723
m4b/rdr
MachLoadCommand.ml
(* # TODO: * Figure out lazy load of libraries and load weak dylibs, currently sending them to dylib_command *) module Types = MachLoadCommandTypes open MachLoadCommandTypes open MachLoadCommandMacro open MachThread64 type t = lc list let sections64_to_string sections = let b = Buffer.create ((List.length se...
null
https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/mach/MachLoadCommand.ml
ocaml
# TODO: * Figure out lazy load of libraries and load weak dylibs, currently sending them to dylib_command add implemented printing mechanisms here
module Types = MachLoadCommandTypes open MachLoadCommandTypes open MachLoadCommandMacro open MachThread64 type t = lc list let sections64_to_string sections = let b = Buffer.create ((List.length sections) * 32) in let indent = "\t\t" in List.iteri (fun i section -> Printf.sprintf "\n%s(%2d) %s addr: 0x%...
3ced321e54d4f721b4694517da7329e487dc150c4d0564505a78ab6599a5c70b
joom/fuzzy
Fuzzy.hs
# LANGUAGE FlexibleContexts # | Fuzzy string search in Haskell . Uses ' TextualMonoid ' to be able to run on different types of strings . module Text.Fuzzy where import Prelude hiding (filter) import qualified Prelude as P import Data.Char (toLower) import Data.List (sortOn) import Data.Maybe (isJust, mapMaybe) ...
null
https://raw.githubusercontent.com/joom/fuzzy/4ec30f0096175607b2debd154f87c184dac7e2f8/src/Text/Fuzzy.hs
haskell
Contains the original value given, the rendered string and the matching score. | Returns the rendered output and the matching score for a pattern and a text. Just ("infinite",3) >>> match "hsk" ("Haskell",1995) "<" ">" fst False Just ("<h>a<s><k>ell",5) ^ Pattern. ^ The value containing the text to search i...
# LANGUAGE FlexibleContexts # | Fuzzy string search in Haskell . Uses ' TextualMonoid ' to be able to run on different types of strings . module Text.Fuzzy where import Prelude hiding (filter) import qualified Prelude as P import Data.Char (toLower) import Data.List (sortOn) import Data.Maybe (isJust, mapMaybe) ...
d82b88cb057e071568fa7af5f416e40408aa073d512a9f5d7e09677d3a5d66db
kevinlynx/ext-blog
xmlrpc.lisp
;;;; xmlrpc.lisp ;;;; ;;;; This file is a part of ext-blog, a common lisp blog engine. ;;;; See file doc/LICENSE for license details. ;;;; Author : ( kevinlynx at gmail dot com ) (in-package #:xml-rpc-methods) (defparameter *blog* nil) (defun handle-metaweblog-request (blog) "Handle metaweblog http request." ...
null
https://raw.githubusercontent.com/kevinlynx/ext-blog/4f6a6f0ab64f9384d53d41d1208ebaa7b9575534/src/xmlrpc.lisp
lisp
xmlrpc.lisp This file is a part of ext-blog, a common lisp blog engine. See file doc/LICENSE for license details.
Author : ( kevinlynx at gmail dot com ) (in-package #:xml-rpc-methods) (defparameter *blog* nil) (defun handle-metaweblog-request (blog) "Handle metaweblog http request." (setf *blog* blog) (let ((stream (hunchentoot:raw-post-data :want-stream t))) (s-xml-rpc::handle-xml-rpc-call stream 0))) (defun set...
67a32939409a3a02418fb7da965013d7230465bfbb49753d609500c16cd70235
mcna/usocket
spawn-thread.lisp
$ I d : spawn-thread.lisp 614 2011 - 03 - 30 08:16:10Z ctian $ ;;;; $URL: svn-lisp.net/project/usocket/svn/usocket/tags/0.6.0.1/vendor/spawn-thread.lisp $ SPWAN - THREAD from 's PortableThreads.lisp (in-package :usocket) #+(and digitool ccl-5.1) (eval-when (:compile-toplevel :load-toplevel :execute) (pushnew ...
null
https://raw.githubusercontent.com/mcna/usocket/187e0ecd58ec0b2093d972e0eb607a50182a3efd/vendor/spawn-thread.lisp
lisp
$URL: svn-lisp.net/project/usocket/svn/usocket/tags/0.6.0.1/vendor/spawn-thread.lisp $ --------------------------------------------------------------------------- Add clozure feature to legacy OpenMCL: =========================================================================== Features & warnings ---------------...
$ I d : spawn-thread.lisp 614 2011 - 03 - 30 08:16:10Z ctian $ SPWAN - THREAD from 's PortableThreads.lisp (in-package :usocket) #+(and digitool ccl-5.1) (eval-when (:compile-toplevel :load-toplevel :execute) (pushnew ':digitool-mcl *features*)) #+(and openmcl (not clozure)) (eval-when (:compile-toplevel :l...
488994c4eca4bd836a9ec6a96f0d4428ef0f758620f258b2671ac14126d06a62
jjmrocha/kill-bill
kb_session.erl
%% Copyright 2013 - 14 %% 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 distributed under...
null
https://raw.githubusercontent.com/jjmrocha/kill-bill/1ba409c39524f2b47ff1338214bc9b4de3f2659e/src/kb_session.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2013 - 14 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(kb_session). -define(SESSION_COOKIE, <<"kb_session">>). -define(SESSION_PATH, <<"/">>). -define(SESSION_DATA, [{system, []}, {user, []}]). -ex...
2266295c1a9afafa6ce9c564bb84f4f55d6f310a75506a711a89cf664fad80f2
danielmiladinov/joy-of-clojure
regular_expressions.clj
;; Regular Expressions ;; --------------------------------------------------------------------------------------------------------------------- Some people , when confronted with a problem , think " I know , I 'll use regular expressions . " Now they have two problems . — , Usenet post , 12 August 1997 , alt.reli...
null
https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter4/regular_expressions.clj
clojure
Regular Expressions --------------------------------------------------------------------------------------------------------------------- Regular expressions are a powerful and compact way to find specific patterns in text strings. Although we sympathize The full capabilities of regular expressions (or regexes) are...
Some people , when confronted with a problem , think " I know , I 'll use regular expressions . " Now they have two problems . — , Usenet post , 12 August 1997 , alt.religion.emacs . with 's attitude and appreciate his wit , sometimes regular expressions are a useful tool to have on hand . at some of the wa...
ecd6108e26868056ee4ee24f1a4f9628bbe94baace9644470b014056c37ff42d
alyssa-p-hacker/SchemeBBS
srfi-26.scm
; REFERENCE IMPLEMENTATION FOR SRFI-26 "CUT" ; ========================================== ; , 5 - Jun-2002 . adapted from the posting by < > ; placed in the public domain ; ; The code to handle the variable argument case was originally proposed by and has been adapted to the new ; syntax of the macro using ...
null
https://raw.githubusercontent.com/alyssa-p-hacker/SchemeBBS/7a5506e7fad22472e1e94671b4fabfce6432199a/deps/srfi-26.scm
scheme
REFERENCE IMPLEMENTATION FOR SRFI-26 "CUT" ========================================== placed in the public domain The code to handle the variable argument case was originally syntax of the macro using an explicit rest-slot symbol. The code to evaluate the non-slots for cute has been proposed by and to process ...
, 5 - Jun-2002 . adapted from the posting by < > proposed by and has been adapted to the new . The code to allow a slot for the procedure position a suggestion by . The code found below is , with entirely written by . loading this file into Scheme 48 0.57 : SE , 6 - Feb-2002 : initial ve...
49028699b2cbde1522de9eddfc62efd9f30df51095fd8f2f45c0575dee52820c
bragful/ephp
ephp_const.erl
-module(ephp_const). -author(''). -include("ephp.hrl"). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([start_link/0, is_defined/4, get/4, get/5, get/6, get_ns/1, set/3, set/4, set/5, ...
null
https://raw.githubusercontent.com/bragful/ephp/119f1760a5cdf4c8b6a01739e852c7183af7acff/src/ephp_const.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ API Function Definitions ------------------------------------------------------------------
-module(ephp_const). -author(''). -include("ephp.hrl"). -export([start_link/0, is_defined/4, get/4, get/5, get/6, get_ns/1, set/3, set/4, set/5, set_bulk/2, set_bulk/3, set_bulk/4, destroy/1, special_consts/0]). special_consts() -> [<<"__CLASS__">>, <<"__METHOD__">>, <<"__FUNCTION__">>, <<"__NAMESPAC...
abd99be48023c152175614049b98cf5274a0c48f9b8201e35f5006a15fefa6d4
goblint/analyzer
threadIdDomain.ml
open GoblintCil open FlagHelper module type S = sig include Printable.S include MapDomain.Groupable with type t := t val threadinit: varinfo -> multiple:bool -> t val is_main: t -> bool val is_unique: t -> bool * Overapproximates whether the first TID can be involved in the creation fo the second TID val...
null
https://raw.githubusercontent.com/goblint/analyzer/78e8ce83e70585e89623ec84af355deb2b3b854d/src/cdomains/threadIdDomain.ml
ocaml
* If it is possible to get a list of unique thread create thus far, get it * Type to represent an abstract thread ID. TODO: should this consider main unique? Prefix is stored in reversed order (main is last) since prepending is more efficient. show in "unreversed" order hide empty set TODO: can be optimized ...
open GoblintCil open FlagHelper module type S = sig include Printable.S include MapDomain.Groupable with type t := t val threadinit: varinfo -> multiple:bool -> t val is_main: t -> bool val is_unique: t -> bool * Overapproximates whether the first TID can be involved in the creation fo the second TID val...
97980a7b4791cd8916b58d003dc90b0c4c6b16d6408355f445794bba9a5e383b
discus-lang/ddc
ToSalt.hs
module DDC.Driver.Command.ToSalt ( cmdToSaltFromFile , cmdToSaltSourceTetraFromFile , cmdToSaltSourceTetraFromString , cmdToSaltCoreFromFile , cmdToSaltCoreFromString) where import DDC.Driver.Command.Compile import DDC.Driver.Stage import DDC.Driver.Config import DDC.Driver.Inte...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-driver/DDC/Driver/Command/ToSalt.hs
haskell
----------------------------------------------------------------------------- The output is printed to @stdout@. Any errors are thrown in the `ExceptT` monad. ^ Driver config. ^ Interface store. ^ Module file path. Convert a Disciple Source Tetra module. Don't know how to convert this file. -----------------...
module DDC.Driver.Command.ToSalt ( cmdToSaltFromFile , cmdToSaltSourceTetraFromFile , cmdToSaltSourceTetraFromString , cmdToSaltCoreFromFile , cmdToSaltCoreFromString) where import DDC.Driver.Command.Compile import DDC.Driver.Stage import DDC.Driver.Config import DDC.Driver.Inte...
ea370c7b83b0ea8c32e64d6b1c0c8d009f1f5961bc7d6353026aa27718d119c1
ptal/AbSolute
unit_interpretation.mli
Copyright 2019 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 ; either version 3 of the License , or ( at your option ) any later version . This program is distr...
null
https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/domains/unit_interpretation.mli
ocaml
* This module is only provided when an abstract domain has no "representation". This is case for meta abstract domain coordinating others abstract domain. See also `Bound_unit`.
Copyright 2019 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 ; either version 3 of the License , or ( at your option ) any later version . This program is distr...
e80c73d5674c6362bbd809b0184ed84efd0c92bfc5722e2fb53cbd7f947da356
scrintal/heroicons-reagent
arrow_trending_up.cljs
(ns com.scrintal.heroicons.mini.arrow-trending-up) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M12.577 4.878a.75.75 0 01.919-.53l4.78 1.281a.75.75 0 01.531.919l-1.281 4...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrow_trending_up.cljs
clojure
(ns com.scrintal.heroicons.mini.arrow-trending-up) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M12.577 4.878a.75.75 0 01.919-.53l4.78 1.281a.75.75 0 01.531.919l-1.281 4...
281cbc0d28851423256653c5a8e6dd4da4b098e533dcc1372e58836e344898cd
amsen20/PL00Fall
B.rkt
#lang racket (provide (all-defined-out)) (define (find x ls) (cond [(null? ls) #f] [(equal? (car x) (car (car ls))) #t] [else (find x (cdr ls))] )) (define (merge_envs E1 E2) (cond [(null? E1) E2] [(find (car E1) E2) (merge_envs (cdr E1) E2)] [else (cons (car E1) (merge_envs (cdr E1) E...
null
https://raw.githubusercontent.com/amsen20/PL00Fall/5fdd8ff874a8f0bc452e9dee825317fa30f4d3ac/solutions/B.rkt
racket
#lang racket (provide (all-defined-out)) (define (find x ls) (cond [(null? ls) #f] [(equal? (car x) (car (car ls))) #t] [else (find x (cdr ls))] )) (define (merge_envs E1 E2) (cond [(null? E1) E2] [(find (car E1) E2) (merge_envs (cdr E1) E2)] [else (cons (car E1) (merge_envs (cdr E1) E...
f97e30c5b003bf1c2d24a34b15ca298cd14bb066e77421959e6bcba59e1c80fe
cbaggers/fn
mad.lisp
Macroexpand dammit -- a portable code walker for Common Lisp Written by at MSI ( ) Released ;;; into the public domain. ;;; -dammit ;;; Transforms code to return a quoted version its macroexpansion ;;; using the host lisp to implicitly augment the lexical environment. ;;; Expands macros, macrolets, symbol-mac...
null
https://raw.githubusercontent.com/cbaggers/fn/8d8587d03a7b5e26b306fc90018e385d9e5acc2c/mad.lisp
lisp
into the public domain. -dammit Transforms code to return a quoted version its macroexpansion using the host lisp to implicitly augment the lexical environment. Expands macros, macrolets, symbol-macros, symbol-macrolets, and compiler-macros. Removes macrolets and symbol-macrolets. Allegro 8.1 -- do not totally...
Macroexpand dammit -- a portable code walker for Common Lisp Written by at MSI ( ) Released Supports a few non - standard special forms for current ( 2009 ) Lisps . Lightly tested on SBCL 1.0.29 , ClozureCL 1.4 - pre , Lispworks 5.1 , 20100301 reported by on # lisp 20100701 - correct the mista...
6f847949292b51b0950b82a13741647732537e2bdda5a1b10a236b73841ad519
mfoemmel/erlang-otp
mnesia_checkpoint.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/mnesia/src/mnesia_checkpoint.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(mnesia_checkpoint). TM callback...
0597a74d9c8411dfc55dcf075ccc22d1a2408216975b4efddcd0d57a63ceb2ed
craigfe/sink
foldable.ml
open Sink_kernel include Foldable_intf module Of_left_assoc (X : Left_assoc) : General_indexed with type ('a, 'p) t := ('a, 'p) X.t and type 'a elt := 'a X.elt and type index := X.index = struct include X let reduce (type m) (m : m elt Monoid.t) = fold_left m.append m.empty let is_empty l = ...
null
https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/foldable.ml
ocaml
* [fold] without an initial accumulator value. Returns [None] in the case of an empty container.
open Sink_kernel include Foldable_intf module Of_left_assoc (X : Left_assoc) : General_indexed with type ('a, 'p) t := ('a, 'p) X.t and type 'a elt := 'a X.elt and type index := X.index = struct include X let reduce (type m) (m : m elt Monoid.t) = fold_left m.append m.empty let is_empty l = ...
329f48e6a796d91cd23155b444d2df8a5d2ab659f49cf96980335f5d85ac7536
dschrempf/elynx
Environment.hs
-- | -- Module : ELynx.Tools.Environment -- Description : Runtime environment Copyright : 2021 License : GPL-3.0 - or - later -- -- Maintainer : -- Stability : experimental -- Portability : portable -- Creation date : Thu Sep 2 22:46:02 2021 . module ELynx.Tools.Environment ( Envir...
null
https://raw.githubusercontent.com/dschrempf/elynx/f73f4474c61c22c6a9e54c56bdc34b37eff09687/elynx-tools/src/ELynx/Tools/Environment.hs
haskell
| Module : ELynx.Tools.Environment Description : Runtime environment Maintainer : Stability : experimental Portability : portable | The environment of an ELynx run. | Global arguments. | Local arguments of command. | List will be empty if using 'Quiet'. If an output base name is | MVar blocki...
Copyright : 2021 License : GPL-3.0 - or - later Creation date : Thu Sep 2 22:46:02 2021 . module ELynx.Tools.Environment ( Environment (..), initializeEnvironment, closeEnvironment, ) where import Control.Concurrent.MVar import Control.Monad import Data.Time import ELynx.Tools.InputOu...
ec3e8a744ae0a5c964bf6fc816a59b9627f93960312dc86ac4d5a1be3438283e
metabase/metabase
table.clj
(ns metabase-enterprise.sandbox.api.table (:require [clojure.set :as set] [compojure.core :refer [GET]] [metabase.api.common :as api] [metabase.api.table :as api.table] [metabase.db.query :as mdb.query] [metabase.mbql.util :as mbql.u] [metabase.models.card :refer [Card]] [metabase.models.inter...
null
https://raw.githubusercontent.com/metabase/metabase/79b08ee8627ad2b3d4d7703e9aeb1a48db5d3493/enterprise/backend/src/metabase_enterprise/sandbox/api/table.clj
clojure
if the user has segmented perms, temporarily upgrade their perms to read perms for the Table so they can see the metadata
(ns metabase-enterprise.sandbox.api.table (:require [clojure.set :as set] [compojure.core :refer [GET]] [metabase.api.common :as api] [metabase.api.table :as api.table] [metabase.db.query :as mdb.query] [metabase.mbql.util :as mbql.u] [metabase.models.card :refer [Card]] [metabase.models.inter...
efce718a40e8b4ce00ca3b52797b039323855a1b647f7a8862fd6ba6284ff136
wireless-net/erlang-nommu
f2.erl
-module(f2). -export([start/1]). start(Fun) -> spawn(fun() -> wait(Fun) end). wait(Fun) -> receive go -> Fun() end.
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/tools/test/cover_SUITE_data/otp_6115/f2.erl
erlang
-module(f2). -export([start/1]). start(Fun) -> spawn(fun() -> wait(Fun) end). wait(Fun) -> receive go -> Fun() end.
06742e55c83817f7b5ac21c427f9dbe28473a9e880b85abe64401147f7d053c8
oakes/Nightmod
utils.clj
(def vertical-tiles 6) (def pixels-per-tile 64) (def duration 0.2) (def damping 0.5) (def deceleration 0.9) (def map-width 25) (def map-height 25) (def aggro-distance 2) (def attack-distance 0.25) (def grid-tile-size 256) (def directions [:w :nw :n :ne :e :se :s :sw]) (def velocities [[-1 0] [-1 1] [0...
null
https://raw.githubusercontent.com/oakes/Nightmod/e1145a49d96c5322aaf4bdd5493ae14a7f0c0f8a/resources/isometric/utils.clj
clojure
(def vertical-tiles 6) (def pixels-per-tile 64) (def duration 0.2) (def damping 0.5) (def deceleration 0.9) (def map-width 25) (def map-height 25) (def aggro-distance 2) (def attack-distance 0.25) (def grid-tile-size 256) (def directions [:w :nw :n :ne :e :se :s :sw]) (def velocities [[-1 0] [-1 1] [0...
d2d4166f754efe5971bac1d63ad3beb2beef8177e74a42abebf3c512c99bd3fc
yesodweb/yesod
Header.hs
# LANGUAGE OverloadedStrings , TemplateHaskell , QuasiQuotes , TypeFamilies , MultiParamTypeClasses , ViewPatterns # TypeFamilies, MultiParamTypeClasses, ViewPatterns #-} module YesodCoreTest.Header ( headerTest , Widget , resourcesApp ) where import Data.Text (Text) import Network.HTTP.Types (decodePat...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/test/YesodCoreTest/Header.hs
haskell
# LANGUAGE OverloadedStrings , TemplateHaskell , QuasiQuotes , TypeFamilies , MultiParamTypeClasses , ViewPatterns # TypeFamilies, MultiParamTypeClasses, ViewPatterns #-} module YesodCoreTest.Header ( headerTest , Widget , resourcesApp ) where import Data.Text (Text) import Network.HTTP.Types (decodePat...
176da3b1951b1e488b1724bc818b77fe11aeebd4637631d9e7b75d69e9b01a1d
vikram/lisplibraries
acl.lisp
;;;; Copyright ( c ) 2008 , All Rights Reserved ;;;; ;;;; Redistribution and use in source and binary forms, with or without ;;;; modification, are permitted provided that the following conditions ;;;; are met: ;;;; ;;;; * Redistributions of source code must retain the above copyright ;;;; notice, this list o...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/zs3-1.0.4/acl.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form...
Copyright ( c ) 2008 , All Rights Reserved DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , acl.lisp (in-package #:zs3) (defclass access-control-list () ((owner :initarg :owner :accessor owner) (grants :in...
9b1f744053361b79dda53e7820cdb1a52de4f733fc8091007c20b13ec97ce533
MLstate/opalang
pass_PostgresCodeGeneration.ml
Copyright © 2011 - 2013 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/pass_PostgresCodeGeneration.ml
ocaml
List of queries which create table tb_default query (id of prepared statement, string query) delete (id of prepared statement, string query) update (id of prepared statement, string query) -keywords-appendix.html#KEYWORDS-TABLE cat sqlkeywords | cut -f 1,2 | grep -v "non-reserved" | grep reserved | cut...
Copyright © 2011 - 2013 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
670826d61c366615d61f41d116d115c6203580457a8d875586d14f552691b5e5
zwizwa/erl_tools
obj.erl
( c ) 2018 -- see LICENSE file -module(obj). -export([init/0, handle/2, call/2, call/3, reply/2, %% reply_from/3, get/2, get/3, set/3, gets/2, values/1, update/3, update/2, find/2, dump/1, replace/2, merge/2, update/4, remove/2, kvstore/1, kvstore/2]). %% Simple async object. ...
null
https://raw.githubusercontent.com/zwizwa/erl_tools/affd4060ab5b963e0cc8fcfd4a1ca5023aa518d3/src/obj.erl
erlang
reply_from/3, Simple async object. How to pick a representation of process state? If it's not obvious, and efficiency is not a concern, pick a Map. Doing so it makes sense to also expose generic getter/setter operations, It is useful for debugging. Note that while convenient, this is somewhat of an anti-pattern...
( c ) 2018 -- see LICENSE file -module(obj). get/2, get/3, set/3, gets/2, values/1, update/3, update/2, find/2, dump/1, replace/2, merge/2, update/4, remove/2, kvstore/1, kvstore/2]). -export_type([handle/1,obj_timeout/0]). init() -> #{}. reply(no_reply, _) -> ok; rep...
3637ff774f6b7d4d6e15a931781c6bca90a8fcff81b6a438bbbef0bb6c8158e1
chapmanb/clj-blend
tools.clj
(ns org.galaxyproject.clj-blend.tools "Run Galaxy tools through the remote API" (:require [clj-http.client :as client] [clojure.data.json :as json] [clojure.string :as string] [org.galaxyproject.clj-blend.histories :as histories] [org.galaxyproject.clj-blend.util :as ...
null
https://raw.githubusercontent.com/chapmanb/clj-blend/f11fc9b599eddc1127f5e1a5f2d3a57919752baf/src/org/galaxyproject/clj_blend/tools.clj
clojure
(ns org.galaxyproject.clj-blend.tools "Run Galaxy tools through the remote API" (:require [clj-http.client :as client] [clojure.data.json :as json] [clojure.string :as string] [org.galaxyproject.clj-blend.histories :as histories] [org.galaxyproject.clj-blend.util :as ...
df95b41fc6e9adbe755c0d60b2ab3319e203ca4633186ee95c7c5ffdc579aa61
GrammaTech/sel
typescript-tree-sitter.lisp
;;;; typescript-tree-sitter.lisp --- Typescript tree-sitter representation. (defpackage :software-evolution-library/test/typescript-tree-sitter (:nicknames :sel/test/typescript-tree-sitter :sel/test/ts-ts) (:use :gt/full :software-evolution-library/test/util :stefil+ :software-evolution-library ...
null
https://raw.githubusercontent.com/GrammaTech/sel/ca9d636c53686e49ac7caf4bdc9182fee5757363/test/typescript-tree-sitter.lisp
lisp
typescript-tree-sitter.lisp --- Typescript tree-sitter representation. Parsing tests It already works with `var' and `let', here to make sure we don't break anything. encoding?: string; }, string, any> = new RequestType('fs/content'); Make sure we don't break semicolons. ") Representation tests.
(defpackage :software-evolution-library/test/typescript-tree-sitter (:nicknames :sel/test/typescript-tree-sitter :sel/test/ts-ts) (:use :gt/full :software-evolution-library/test/util :stefil+ :software-evolution-library :software-evolution-library/software/parseable :software-evolution-libra...
33f56f353f00a7ecd29fb0d4e563e1a6185bcbc0eda68a40ce849bdd0c61960b
clash-lang/clash-compiler
CLZ.hs
# LANGUAGE MagicHash # module CLZ where import GHC.Prim import GHC.Types import Clash.Prelude import Clash.Explicit.Testbench topEntity :: Word -> Word -> Word topEntity (W# w1) (W# w2) = W# (clz# (or# w1 w2)) {-# NOINLINE topEntity #-} testBench :: Signal System Bool testBench = done where expectedOutput = o...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/BitVector/CLZ.hs
haskell
# NOINLINE topEntity #
# LANGUAGE MagicHash # module CLZ where import GHC.Prim import GHC.Types import Clash.Prelude import Clash.Explicit.Testbench topEntity :: Word -> Word -> Word topEntity (W# w1) (W# w2) = W# (clz# (or# w1 w2)) testBench :: Signal System Bool testBench = done where expectedOutput = outputVerifier' clk rst (61 ...
96c679acbdc46d652dde27e49841baf0d0ef437a9ed7f18311fe2475f53b9b5e
janestreet/opamcheck
util.ml
util.ml Copyright 2017 author : Copyright 2017 Inria author: Damien Doligez *) open Printf let sandbox = try Sys.getenv "OPCSANDBOX" with Not_found -> eprintf "opamcheck: environment variable OPCSANDBOX is undefined\n"; exit 5 module SM = Map.Make (String) module StringPair = stru...
null
https://raw.githubusercontent.com/janestreet/opamcheck/6af68a21805ed6f0b5427788a51f9cb6ba4c79c2/src/util.ml
ocaml
util.ml Copyright 2017 author : Copyright 2017 Inria author: Damien Doligez *) open Printf let sandbox = try Sys.getenv "OPCSANDBOX" with Not_found -> eprintf "opamcheck: environment variable OPCSANDBOX is undefined\n"; exit 5 module SM = Map.Make (String) module StringPair = stru...
9bbdd43924913bef5150cbef68839d81f61d9dc14d9d9ac07603aca7a99caa5e
yuriy-chumak/ol
isqrt__integer_square_root__of_x.scm
; (integer_square_root)_of_X#Ol (print "Integer square roots of 0..65") (for-each (lambda (x) (display (isqrt x)) (display " ")) (iota 66)) (print) (print "Integer square roots of 7^n") (for-each (lambda (x) (print "x: " x ", isqrt: " (isqrt x))) (map (lambda (i) (expt 7 i)) (io...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/isqrt__integer_square_root__of_x.scm
scheme
(integer_square_root)_of_X#Ol
(print "Integer square roots of 0..65") (for-each (lambda (x) (display (isqrt x)) (display " ")) (iota 66)) (print) (print "Integer square roots of 7^n") (for-each (lambda (x) (print "x: " x ", isqrt: " (isqrt x))) (map (lambda (i) (expt 7 i)) (iota 73 1))) (print)
1a410ef2c8d46070bb1c682412131413f90c5834a751055d916835ab19882591
ntoronto/drbayes
map-arrow.rkt
#lang typed/racket (require "../types.rkt" "set-ops.rkt" "branch-trace.rkt" "mapping.rkt" "bot-arrow.rkt") (provide (all-defined-out)) ;; =================================================================================================== ;; Mapping arrow (define-type (Map-Arrow X...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/direct/exact-semantics/map-arrow.rkt
racket
=================================================================================================== Mapping arrow (mapping f (domain/bot f A)) --------------------------------------------------------------------------------------------------- Mapping arrow lifts
#lang typed/racket (require "../types.rkt" "set-ops.rkt" "branch-trace.rkt" "mapping.rkt" "bot-arrow.rkt") (provide (all-defined-out)) (define-type (Map-Arrow X Y) ((Setof X) -> (Mapping X Y))) (: domain/bot (All (X Y) ((Bot-Arrow X Y) (Setof X) -> (Setof X)))) (define (domain/b...
f36e2f0aea949748b04c9bd577e1833e969b326838a28640202cb76b50a0750b
input-output-hk/hydra
CardanoNode.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # module CardanoNode where import Hydra.Prelude import Cardano.Slotting.Time (RelativeTime (getRelativeTime), diffRelativeTime, toRelativeTime) import...
null
https://raw.githubusercontent.com/input-output-hk/hydra/ad3dd93ae3fcfee1be158a7042157d33d0ccd2ef/hydra-cluster/src/CardanoNode.hs
haskell
# LANGUAGE DeriveAnyClass # | Configuration parameters for a single node devnet | Parent state directory | Blockchain start time | A list of port | Arguments given to the 'cardano-node' command-line to run a node. | Configuration of ports from the perspective of a peer in the context of a fully sockected topolog...
# LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # module CardanoNode where import Hydra.Prelude import Cardano.Slotting.Time (RelativeTime (getRelativeTime), diffRelativeTime, toRelativeTime) import CardanoClient (QueryPoint (Quer...
86cf1a08a3c148728f7312c5d76159bbd9c2b030050267a8cff3408ece3780e3
cbaggers/nineveh
simplex-helpers.lisp
(in-package :nineveh.noise) (defun-g simplex-3d-get-corner-vectors ((p :vec3)) (let* ((skew-factor (v3! (/ 1.0 3.0))) (unskew-factor (v3! (/ 1.0 6.0))) (simplex-corner-pos (v3! 0.5)) (simplex-pyramid-height (v3! 0.7071068))) (multf p simplex-pyramid-height) (let* ((pi (floor (+ p (...
null
https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/noise/simplex-helpers.lisp
lisp
(in-package :nineveh.noise) (defun-g simplex-3d-get-corner-vectors ((p :vec3)) (let* ((skew-factor (v3! (/ 1.0 3.0))) (unskew-factor (v3! (/ 1.0 6.0))) (simplex-corner-pos (v3! 0.5)) (simplex-pyramid-height (v3! 0.7071068))) (multf p simplex-pyramid-height) (let* ((pi (floor (+ p (...
16abd31cf552804a1a8d19c33b55fc818b03c7f4ba0ec4b37b09b4966f99c297
mgmillani/pictikz
Organizer.hs
Copyright 2017 This file is part of pictikz . pictikz is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) any later version. pictikz i...
null
https://raw.githubusercontent.com/mgmillani/pictikz/3bae9db14a8563f5b2c97bb5d9d30ba54f75b62f/src/Pictikz/Organizer.hs
haskell
(at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with pictikz. If not, see </>. | Join equal vertices which stand on the same position in subsequ...
Copyright 2017 This file is part of pictikz . pictikz 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 pictikz is distributed in the hope that it will b...
4de5822a9da361b3ce9d64a676268abff36775a1683b96ccec9f315811725bf2
erpuno/abac
abac.erl
-module(abac). -compile(export_all). -include("abac.hrl"). -include("request.hrl"). -include("objects.hrl"). -include("subjects.hrl"). -include_lib("kvs/include/metainfo.hrl"). -include_lib("kvs/include/kvs.hrl"). -behaviour(application). -behaviour(supervisor). -export([start/2, stop/1, init/1]). start(_StartType, _S...
null
https://raw.githubusercontent.com/erpuno/abac/686ea488c6a403e2c40b9c421518df76749aa4d1/src/abac.erl
erlang
-module(abac). -compile(export_all). -include("abac.hrl"). -include("request.hrl"). -include("objects.hrl"). -include("subjects.hrl"). -include_lib("kvs/include/metainfo.hrl"). -include_lib("kvs/include/kvs.hrl"). -behaviour(application). -behaviour(supervisor). -export([start/2, stop/1, init/1]). start(_StartType, _S...
731c036ee22ffa5f7f0ffbf18bab2b059af2b102882db4d566c13ceb00685e40
reach-sh/reach-lang
ETH_Solidity.hs
# LANGUAGE QuasiQuotes # module Reach.Connector.ETH_Solidity (connect_eth) where -- -sh/reach-lang/blob/8d912e0/hs/src/Reach/Connector/ETH_EVM.hs.dead import Control.Monad import Control.Monad.Extra import Control.Monad.Reader import Control.Monad.Trans.Except import Crypto.Hash (hash, SHA1) import Data.Aeson as Aes...
null
https://raw.githubusercontent.com/reach-sh/reach-lang/50e090b1c4134c33c8e3082844c31df1a397dd48/hs/src/Reach/Connector/ETH_Solidity.hs
haskell
-sh/reach-lang/blob/8d912e0/hs/src/Reach/Connector/ETH_EVM.hs.dead - Debugging tools - You can turn this to True and manually change the Solidity file - Solidity errors - Solidity helpers XXX save the full string in a dictionary and emit it - Compiler # OVERLAPS # XXX Copy the simplifications from ALGO.hs Sol canno...
# LANGUAGE QuasiQuotes # module Reach.Connector.ETH_Solidity (connect_eth) where import Control.Monad import Control.Monad.Extra import Control.Monad.Reader import Control.Monad.Trans.Except import Crypto.Hash (hash, SHA1) import Data.Aeson as Aeson import qualified Data.Aeson as AS import Data.Bifunctor (Bifunctor ...
73bb5a10e24df6c3e2d577b30a623ff6f1bde167a858f846d3e5dd4944bece9a
janestreet/install-ocaml
expect_test_example.ml
open! Core let%expect_test _ = let () = printf "foo" in [%expect {| bar |}] ;;
null
https://raw.githubusercontent.com/janestreet/install-ocaml/5e7824320c209c297497ccf80b739b9ddc4a4bfc/02-expect-tests/expect_test_example.ml
ocaml
open! Core let%expect_test _ = let () = printf "foo" in [%expect {| bar |}] ;;
d04e07e5232cfa664b521aac671c8ba1d26482f866f0cdd49f1e4578da3c7693
TristeFigure/shuriken
destructure.clj
(ns shuriken.destructure "### Destructuring destructuring forms" (:require [clojure.walk :refer [prewalk]] [clojure.set :refer [difference intersection]])) (declare disentangle) (defn- disentangle-sequential [binding-form] (let [as (->> binding-form (drop-while #(not= % :as)) second) mor...
null
https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/destructure.clj
clojure
=> [a b] => {a :a, b :b, :or {b 1}} => '[a x y m] => '{:a a :x x :y y :m m} We map values to binding symbols and binding symbols to hash keys => '[a] => '[[b] & more] => '{b :b :as all}
(ns shuriken.destructure "### Destructuring destructuring forms" (:require [clojure.walk :refer [prewalk]] [clojure.set :refer [difference intersection]])) (declare disentangle) (defn- disentangle-sequential [binding-form] (let [as (->> binding-form (drop-while #(not= % :as)) second) mor...
11dabf817e9f056cc8c44aae26d9041b83e859edaa6d9fda75972cb33608c400
CryptoKami/cryptokami-core
Errors.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Cryptokami.Wallet.API.V1.Errors where import Universum import Cryptokami.Wallet.API.Response.JSend (ResponseStatus (ErrorStatus)) import Data.Aeson import Generics.SOP.TH ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet-new/src/Cryptokami/Wallet/API/V1/Errors.hs
haskell
# LANGUAGE OverloadedStrings # Error handling | Type representing any error which might be thrown by wallet. ``` { "status": "error" "message" : <constr_name>, "diagnostic" : <data> } ``` and `<data>` is an object containing additional error data. Additional data contains constructor fields, f...
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Cryptokami.Wallet.API.V1.Errors where import Universum import Cryptokami.Wallet.API.Response.JSend (ResponseStatus (ErrorStatus)) import Data.Aeson import Generics.SOP.TH (deriveGeneric) import qualified Ne...
a5f0425e2de6c7018cceabc4246dd679420ac225031497d7399f873640b5a0c6
papertrail/slack-hooks
sentry_test.clj
(ns slack-hooks.service.sentry-test (:use clojure.test) (:require [slack-hooks.service.sentry :as sentry] [clojure.data.json :as json])) (deftest formatted-message-test (testing "Formatting a Sentry webhook" (let [text (slurp "test/resources/sentry.json") json (json/read-str text :key-...
null
https://raw.githubusercontent.com/papertrail/slack-hooks/e9cfdbfee40e678be956416366684ee22d6cb282/test/slack_hooks/service/sentry_test.clj
clojure
(ns slack-hooks.service.sentry-test (:use clojure.test) (:require [slack-hooks.service.sentry :as sentry] [clojure.data.json :as json])) (deftest formatted-message-test (testing "Formatting a Sentry webhook" (let [text (slurp "test/resources/sentry.json") json (json/read-str text :key-...
6555348ce2ffd2ee77b0e41bae4b699005e61160cf622149b7484a87f72c6374
ndmitchell/extra
Extra.hs
# LANGUAGE CPP # | Extra functions for working with ' NonEmpty ' lists . The package also exports the existing " Data . List . NonEmpty " functions . module Data.List.NonEmpty.Extra( module Data.List.NonEmpty, (|:), (|>), snoc, (!?), appendl, appendr, sortOn, union, unionBy, nubOrd, nubOrdBy,...
null
https://raw.githubusercontent.com/ndmitchell/extra/eb58c3f834e9f27690d2d759a7bdfbef867a211b/src/Data/List/NonEmpty/Extra.hs
haskell
| /O(n)/. Append an element to a non-empty list. | Synonym for '|>'. | /O(n)/. Append an element to a list. | A total variant of the list index function `(!?)`. | Append a list to a non-empty list. | Append a non-empty list to a list. | Sort by comparing the results of a function applied to each element. ...
# LANGUAGE CPP # | Extra functions for working with ' NonEmpty ' lists . The package also exports the existing " Data . List . NonEmpty " functions . module Data.List.NonEmpty.Extra( module Data.List.NonEmpty, (|:), (|>), snoc, (!?), appendl, appendr, sortOn, union, unionBy, nubOrd, nubOrdBy,...
802b4f30dc7c2c22dd4626dbcc7fd6166d4a55733e00ea77813f9279849df5b2
geneweb/geneweb
dbdisk.mli
* { 1 Aliases to [ Def ] and [ Adef ] } type fix = Adef.fix (* FIXME: expose its type *) type cdate = Def.cdate (* FIXME: expose its type *) type date = Def.date = Dgreg of dmy * calendar | Dtext of string and calendar = Def.calendar = Dgregorian | Djulian | Dfrench | Dhebrew and dmy = Def.dmy = { day : int; mon...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/gwdb-legacy/dbdisk.mli
ocaml
FIXME: expose its type FIXME: expose its type person family FIXME: expose its type * Extended person's entry in the base * Person's ascendants entry in the base * Person's union entry in the base * Family's entry in the base * Family's couple entry in the base * Family's descendants entry in the base * ...
* { 1 Aliases to [ Def ] and [ Adef ] } type date = Def.date = Dgreg of dmy * calendar | Dtext of string and calendar = Def.calendar = Dgregorian | Djulian | Dfrench | Dhebrew and dmy = Def.dmy = { day : int; month : int; year : int; prec : precision; delta : int; } and dmy2 = Def.dmy2 = { day2 : int; mon...
aa58d5dcb852b34753005b61ba56323251b9fb765e6ae52f54066af256fc6544
mishoo/sytes
parser.lisp
(in-package #:sytes.template) (defparameter *default-token-start* #\{) (defparameter *default-token-stop* #\}) (defparameter *token-start* *default-token-start*) (defparameter *token-stop* *default-token-stop*) (defparameter *list-terminator* #\)) (defun parse (input &key (template-name "UNKNOWN-TEMPLATE")) (let ((...
null
https://raw.githubusercontent.com/mishoo/sytes/263b2472943b2bbc1f07fae6ee653fd2ee2a7c21/template/parser.lisp
lisp
handle dot syntax ) ) (skip-comment) (read-token croak)) ) (= col 0)) ((string-equal dir "raw") (let ((stop (read-string))) ))
(in-package #:sytes.template) (defparameter *default-token-start* #\{) (defparameter *default-token-stop* #\}) (defparameter *token-start* *default-token-start*) (defparameter *token-stop* *default-token-stop*) (defparameter *list-terminator* #\)) (defun parse (input &key (template-name "UNKNOWN-TEMPLATE")) (let ((...
7f792b8af35965b69ce4408ebea068368f8e9c68ffbea2d6f77d360b20099096
8c6794b6/guile-tjit
apply-templates.scm
( sxml apply - templates ) -- xslt - like transformation for sxml ;;;; Copyright ( C ) 2009 Free Software Foundation , Inc. Copyright 2004 by < wingo at pobox dot com > . Written 2003 by < oleg at pobox dot com > as apply-templates.scm . ;;;; ;;;; This library is free software; you can redistribute ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/sxml/apply-templates.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ...
( sxml apply - templates ) -- xslt - like transformation for sxml Copyright ( C ) 2009 Free Software Foundation , Inc. Copyright 2004 by < wingo at pobox dot com > . Written 2003 by < oleg at pobox dot com > as apply-templates.scm . version 3 of the License , or ( at your option ) any later version...
df697f1fe7b5b82bd4e5cedcca4f65bb461988ba4a12ee5f31632631c01cd4cc
tezos/tezos-mirror
test_zk_rollup_encoding.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/39e976ad6eae6446af8ca17ef4a63475ab9fe2b9/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_zk_rollup_encoding.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
6c911aeadff5f1ceeaaa20610c9b543c22e4993475a616c89f850a95fde7d62c
achirkin/vulkan
VK_KHR_performance_query.hs
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} {-# LA...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_performance_query.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | supported: @vulkan@ contact: @Alon Or-bach @alo...
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # module Graphics.Vulkan.Ext.VK_KHR_performance_query * Vulkan extension : @VK_KHR_performance_query@ module Graphics.Vulkan.Marshal, VkAcquireProfilingLockB...
0d9962261d4358b6e6f5c83664e6379b9c7dc8a97fe5f4f4125591722be36bcd
Lisp-Stat/lisp-stat
usarrests.lisp
-*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : LS - USER -*- (in-package #:ls-user) (defdf usarrests (read-csv rdata:usarrests) "Violent Crime Rates by US State Description This data set contains statistics, in arrests per 100,000 residents, for assault, murder, and rape in each of the 50...
null
https://raw.githubusercontent.com/Lisp-Stat/lisp-stat/a95bbd3e45c944fc8711721a042f5b1705bfea82/data/usarrests.lisp
lisp
Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : LS - USER -*- change to the correct value
(in-package #:ls-user) (defdf usarrests (read-csv rdata:usarrests) "Violent Crime Rates by US State Description This data set contains statistics, in arrests per 100,000 residents, for assault, murder, and rape in each of the 50 US states in 1973. Also given is the percent of the population living in urban areas. ...