_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
003ffdd316ced558cb6a6228a982d7d4ddd9421c6573714824d9dbeb3a4fefe6
finnishtransportagency/harja
yhteyshenkilot_test.clj
(ns harja.palvelin.palvelut.yhteyshenkilot-test (:require [clojure.test :refer :all] [taoensso.timbre :as log] [harja.palvelin.komponentit.tietokanta :as tietokanta] [harja.palvelin.palvelut.yhteyshenkilot :refer :all] [harja.testi :refer :all] [com.stuartsi...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/4bf1d2f4b8d667fcebe9f957c73404d93331f58d/test/clj/harja/palvelin/palvelut/yhteyshenkilot_test.clj
clojure
(ns harja.palvelin.palvelut.yhteyshenkilot-test (:require [clojure.test :refer :all] [taoensso.timbre :as log] [harja.palvelin.komponentit.tietokanta :as tietokanta] [harja.palvelin.palvelut.yhteyshenkilot :refer :all] [harja.testi :refer :all] [com.stuartsi...
0e4a9c14a0cc4ec97778dfc3a727d8f3d6ba7f06fd7374c5e764ed53cd5e60a7
facebook/flow
libflowparser.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/f360297ed2112e2828d4fe3dc9d75ec2d347ab98/src/parser/libflowparser.ml
ocaml
do NOT change the order of these constructors! the C code relies on ocaml's memory representation, which is order dependent. TODO: this is inefficient, push ints to C ignore unknown stuff for future-compatibility TODO: register/handle Parse_error.Error
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
0597cabf281f93ea5ebd52f26eb7991ef0da78a6ec9ba43d00a0a9af44b51c6c
static-analysis-engineering/codehawk
xsimplifyTest.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHT/CH_tests/xprlib_tests/txxprlib/xsimplifyTest.ml
ocaml
xprlib v <= v simplifies to true (v - 2) - (v - 1) simplifies to -1 (v - 2) < (v - 1) simplifies to true (v1 < v2) != 0 simplifies to v1 < v2
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
91f38c68c3332a0b20a24c865126485bc25f0083ba14aa25d76423fa1b83f1e9
kyleburton/clj-etl-utils
repl.clj
(ns clj-etl-utils.repl (:require [clojure.tools.nrepl.server :refer [start-server stop-server]] [cider.nrepl :refer [cider-nrepl-handler]] [clojure.tools.logging :as log] [schema.core :as s])) (defonce nrep...
null
https://raw.githubusercontent.com/kyleburton/clj-etl-utils/bcc927b3e05464ecac15cf33540c8a99cdd431a8/src/clj_etl_utils/repl.clj
clojure
(ns clj-etl-utils.repl (:require [clojure.tools.nrepl.server :refer [start-server stop-server]] [cider.nrepl :refer [cider-nrepl-handler]] [clojure.tools.logging :as log] [schema.core :as s])) (defonce nrep...
1db37d93f4ec4aeadd7187421612df84ead1a3834314599d0851736e35f5197e
hjcapple/reading-sicp
exercise_3_23.scm
#lang sicp P183 - [ 练习 3.23 ] (define (make-queue-node item prev next) (cons item (cons prev next))) (define (set-node-prev! node prev) (set-car! (cdr node) prev)) (define (set-node-next! node next) (set-cdr! (cdr node) next)) (define (node-item node) (car node)) (define (node-prev node) (car (cdr node))) (define...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_23.scm
scheme
#lang sicp P183 - [ 练习 3.23 ] (define (make-queue-node item prev next) (cons item (cons prev next))) (define (set-node-prev! node prev) (set-car! (cdr node) prev)) (define (set-node-next! node next) (set-cdr! (cdr node) next)) (define (node-item node) (car node)) (define (node-prev node) (car (cdr node))) (define...
ecee4d48d851273bba2286c31b726549c889646033c60aefd1afc669847d53d0
goldfirere/units
UnitParser.hs
Test units package quasiquoter mechanism Copyright ( c ) 2014 Copyright (c) 2014 Richard Eisenberg -} # LANGUAGE QuasiQuotes , CPP , DataKinds # module Tests.Compile.UnitParser where import Tests.Compile.UnitParser.Quoters ( ms ) import Data.Metrology.SI import Data.Metrology len1, len2 :: Length len1...
null
https://raw.githubusercontent.com/goldfirere/units/0ffc07627bb6c1eacd60469fd9366346cbfde334/units-test/Tests/Compile/UnitParser.hs
haskell
Test units package quasiquoter mechanism Copyright ( c ) 2014 Copyright (c) 2014 Richard Eisenberg -} # LANGUAGE QuasiQuotes , CPP , DataKinds # module Tests.Compile.UnitParser where import Tests.Compile.UnitParser.Quoters ( ms ) import Data.Metrology.SI import Data.Metrology len1, len2 :: Length len1...
bd54950859e4515afa1e48b248b58fd173910757ddea7ed332e5eaf525c36332
thoughtstem/morugamu
puzzle-difficulty.rkt
#lang racket (provide make-graph) ; Imports a required package for list functions. (require racket/list) ; Imports a required package called plot for the visual graph. (require plot) ; This creates a list of puzzles (boolean, clock, etc) (define mylist (list '(and T(or F T(not T F))) '(or...
null
https://raw.githubusercontent.com/thoughtstem/morugamu/a9095ddebe364adffb036c3faed95c873a4d9f3c/puzzles/puzzle-difficulty.rkt
racket
Imports a required package for list functions. Imports a required package called plot for the visual graph. This creates a list of puzzles (boolean, clock, etc) This is a function that makes a graph given a list of puzzles, l. Define levels as an updated list without duplicates. Map iterates through every eleme...
#lang racket (provide make-graph) (require racket/list) (require plot) (define mylist (list '(and T(or F T(not T F))) '(or F(not T)) '(and(and F F)(or T (and T T))) '(and(not (or T F))(and T (or F T))) '(not(not(and F(and ...
93fd1b028833300f1bfde2d14f2bf1fb1fca9cb78a38649be476a409e4ff175e
dgiot/dgiot
emqx_vm_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2017 - 2022 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/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/test/emqx_vm_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 ) 2017 - 2022 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_vm_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("eunit...
fe08afca05b9202356be6ba658ae8fbcbf38a7fdc5c5db5de56ded6e2f27e8c5
softwarelanguageslab/maf
R5RS_scp1_unfringe-3.scm
; Changes: * removed : 0 * added : 2 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((unfringe-1 (lambda (l) (<change> () ()) (if (null? l) () ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_unfringe-3.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 0 * added : 2 * swaps : 0 (letrec ((unfringe-1 (lambda (l) (<change> () ()) (if (null? l) () (if (null? (cdr l)) (list (car...
6e3ba753c0c1d1a0149405e0b576b3785914158febe527a98f3f4d923db34896
nuvla/api-server
resource_metadata_action_test.cljc
(ns sixsq.nuvla.server.resources.spec.resource-metadata-action-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.spec.resource-metadata-action :as spec] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def valid {:name "my-action" :uri ...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/resource_metadata_action_test.cljc
clojure
action action vector
(ns sixsq.nuvla.server.resources.spec.resource-metadata-action-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.spec.resource-metadata-action :as spec] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def valid {:name "my-action" :uri ...
e76abdc2c904f56e61ffd281ee5e4f7f1b792e89b138ff7622c5bc46e903b3e2
FranklinChen/learn-you-some-erlang
pq_stats.erl
%%% Rolls dice to generate statistics or level increases for a character -module(pq_stats). -export([initial_roll/0, roll/0]). First roll , when setting the stats up for the first time initial_roll() -> [{charisma, roll(3)}, {constitution, roll(3)}, {dexterity, roll(3)}, {intelligence, roll(3)}, ...
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/processquest/apps/processquest-1.1.0/src/pq_stats.erl
erlang
Rolls dice to generate statistics or level increases for a character Rolls a single die. Used when leveling up Rolls Num 6-faced dice
-module(pq_stats). -export([initial_roll/0, roll/0]). First roll , when setting the stats up for the first time initial_roll() -> [{charisma, roll(3)}, {constitution, roll(3)}, {dexterity, roll(3)}, {intelligence, roll(3)}, {strength, roll(3)}, {wisdom, roll(3)}]. roll() -> roll(1). ro...
a5aaa039625d2d86c78716d5ac54781e71ff797b2a0ca3a0a9652981929f254d
NorfairKing/cursor
Insert.hs
# LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Cursor.Tree.Insert ( treeCursorInsert, treeCursorInsertAndSelect, treeCursorInsertNodeSingleAndSelect, treeCursorInsertNodeAndSelect, treeCursorAppend, treeCursorAppendAndSelect, treeCursorAppendNodeSingleAndSelect, treeCursorA...
null
https://raw.githubusercontent.com/NorfairKing/cursor/ff27e78281430c298a25a7805c9c61ca1e69f4c5/cursor/src/Cursor/Tree/Insert.hs
haskell
# LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Cursor.Tree.Insert ( treeCursorInsert, treeCursorInsertAndSelect, treeCursorInsertNodeSingleAndSelect, treeCursorInsertNodeAndSelect, treeCursorAppend, treeCursorAppendAndSelect, treeCursorAppendNodeSingleAndSelect, treeCursorA...
b831747b6eb276a3702691456f9a590cf6f8769e4175657c1373037815e6b176
falsetru/htdp
14.2.2.scm
(define-struct node (ssn name left right)) (define (contains-bt number bt) (cond [(false? bt) false] [(= (node-ssn bt) number) true] [else (or (contains-bt number (node-left bt)) (contains-bt number (node-right bt)))])) (define (search-bt n bt) (cond [(false? bt) false] [...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/14/14.2.2.scm
scheme
(define-struct node (ssn name left right)) (define (contains-bt number bt) (cond [(false? bt) false] [(= (node-ssn bt) number) true] [else (or (contains-bt number (node-left bt)) (contains-bt number (node-right bt)))])) (define (search-bt n bt) (cond [(false? bt) false] [...
6d4881fbae0f6031af26ee122011eb2eb015008779852a24ddc07ee3f53c5daf
sweet-tooth-clojure/todo-example
data.clj
(ns sweet-tooth.todo-example.backend.test.data (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [datomic.api :as d] [reifyhealth.specmonstah.core :as rs] [reifyhealth.specmonstah.spec-gen :as rsg] [sweet-tooth.todo-example.backend.duct] ...
null
https://raw.githubusercontent.com/sweet-tooth-clojure/todo-example/4acb37459bc3d2f534bb00dee07d9e361f414e8f/test/sweet_tooth/todo_example/backend/test/data.clj
clojure
for side effects
(ns sweet-tooth.todo-example.backend.test.data (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [datomic.api :as d] [reifyhealth.specmonstah.core :as rs] [reifyhealth.specmonstah.spec-gen :as rsg] [sweet-tooth.todo-example.backend.test.d...
a1f1653b8c42ef7cb38b2aa5e9f5fe49284bb12f63f44dcb84140eee502a3252
jchavarri/rebind
location.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/jchavarri/rebind/ccfa1725ff5b16574daf4d0044c49dbf719aa105/vendor/ocaml/parsing/location.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . Source code locations ( ranges of pos...
e1b611431ff9d9584ea51e65a88e9ec133492ff3b757305688f6aad1326aa2c9
ocaml-multicore/multicoretests
lin_tests_dsl.ml
(* ********************************************************************** *) (* Tests of thread-unsafe [Bytes] *) (* ********************************************************************** *) module BConf = struct type t = Bytes.t let init () = Stdlib.Bytes.make 42 '0' let c...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/bytes/lin_tests_dsl.ml
ocaml
********************************************************************** Tests of thread-unsafe [Bytes] **********************************************************************
module BConf = struct type t = Bytes.t let init () = Stdlib.Bytes.make 42 '0' let cleanup _ = () open Lin let api = [ val_ "Bytes.get" Bytes.get (t @-> int @-> returning_or_exc char); val_ "Bytes.sub_string" Bytes.sub_string (t @-> int @-> int @-> returning_or_exc string); val_...
b458a57753b332f5781247c678b10b250d0c6e6343122152ae3e4ea443f3c750
mhuebert/maria
parse.cljc
modified from ;; -cljs/blob/master/LICENSE (ns lark.tree.parse (:require [lark.tree.reader :as rd] [lark.tree.emit :as emit] [lark.tree.node :as n] [clojure.string :as string] [cljs.tools.reader.impl.commons :refer [parse-symbol]] [lark.tree.util :as uti...
null
https://raw.githubusercontent.com/mhuebert/maria/15586564796bc9273ace3101b21662d0c66b4d22/editor/vendor/lark/tree/parse.cljc
clojure
-cljs/blob/master/LICENSE ) :comment -------------- from cljs.tools.reader.edn ------------------ \^ \( \) \[ \] \{ \} \\ \#) true ------------------------------------------------------------- is it important to validate whether this is a valid keyword? is it important to detect invalid tokens? namespaced maps
modified from (ns lark.tree.parse (:require [lark.tree.reader :as rd] [lark.tree.emit :as emit] [lark.tree.node :as n] [clojure.string :as string] [cljs.tools.reader.impl.commons :refer [parse-symbol]] [lark.tree.util :as util] #?@(:cljs [[clj...
2641282831b860ca0ff003263e3ab047c7cf683fe82c6771e8542ad5253093aa
district0x/cljs-orbitdb
keyvalue.cljs
(ns orbitdb.keyvalue) (defn keyvalue "Creates and opens a keyvalue database. Takes an OrbitDB instance and a map with: `:name` or `:address` whether you want to create a new or connect to an existing database. `:opts`: a map of options (see `orbitdb.core/create-database`) Returns a js/Promise resolving to...
null
https://raw.githubusercontent.com/district0x/cljs-orbitdb/9928bf877c66c926a7f0bec086e8c7755240d15c/src/orbitdb/keyvalue.cljs
clojure
(ns orbitdb.keyvalue) (defn keyvalue "Creates and opens a keyvalue database. Takes an OrbitDB instance and a map with: `:name` or `:address` whether you want to create a new or connect to an existing database. `:opts`: a map of options (see `orbitdb.core/create-database`) Returns a js/Promise resolving to...
fec269e2f1c74ea4ac90af0b8abe1cf179de99b160c89d533586df51e023d124
janestreet/merlin-jst
depend.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_413/parsing/depend.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the module String = Misc.Stdlib.String type map_tree = Node of String.Set.t * bound_map and bound_map = ma...
3826a74388a29a1e5c172474c21f3bfa73312fecb77e7475bdcdacdfa110b809
factisresearch/mq-demo
IO.hs
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -F -pgmF htfpp # module Mgw.Util.IO ( hFlush, hClose, openFile, readFileStrict, readFileStrictBSL , withTempFd, fdWriteAll, fdWriteAllLazy , IO.Handle, IO.hSetBinaryMode, IO.stdout, IO.stderr , IO.IOMode(..), IO.hGetLine, IO.hSetEncoding, ...
null
https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/server/src/lib/Mgw/Util/IO.hs
haskell
write function cleanup function BS.useAsCStringLen if there's any chance fdWriteBuf might alter the buffer. Tests putStrLn s putStrLn f
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -F -pgmF htfpp # module Mgw.Util.IO ( hFlush, hClose, openFile, readFileStrict, readFileStrictBSL , withTempFd, fdWriteAll, fdWriteAllLazy , IO.Handle, IO.hSetBinaryMode, IO.stdout, IO.stderr , IO.IOMode(..), IO.hGetLine, IO.hSetEncoding, ...
a68db3587420d55a771ec0aedd4caaf62d67675410904c0a9be65728c9533322
nikodemus/SBCL
target-misc.lisp
Environment query functions , DOCUMENTATION and DRIBBLE . ;;;; FIXME : If there are exactly three things in here , it could be exactly three files named e.g. equery.lisp , doc.lisp , and dribble.lisp . This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This softwar...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/target-misc.lisp
lisp
more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. function names and documentation we're allowed to return NIL here freely, it seems plausible that small changes to the circumstances under w...
Environment query functions , DOCUMENTATION and DRIBBLE . FIXME : If there are exactly three things in here , it could be exactly three files named e.g. equery.lisp , doc.lisp , and dribble.lisp . This software is part of the SBCL system . See the README file for This software is derived from the CMU CL syst...
52c22c78e6a3d8efacb3e405fc1399636cdfa8f28462c57658f2e0079e77b57c
realworldocaml/book
ppxlib_metaquot.ml
open Ppxlib open Ast_builder.Default module E = Extension module A = Ast_pattern module Make (M : sig type result val annotate : result -> core_type -> result val cast : extension -> result val location : location -> result val location_stack : (location -> result) option val attributes : (location -> res...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppxlib/metaquot/ppxlib_metaquot.ml
ocaml
open Ppxlib open Ast_builder.Default module E = Extension module A = Ast_pattern module Make (M : sig type result val annotate : result -> core_type -> result val cast : extension -> result val location : location -> result val location_stack : (location -> result) option val attributes : (location -> res...
dbb8b4e80ac69686481133ab6bea6caad93f7dd381d861362e5e5c8c1dce8b17
albertoruiz/easyVision
OpenCV.hs
# LANGUAGE ForeignFunctionInterface # {-# LANGUAGE TypeSynonymInstances #-} module OpenCV( gaussianBlur, canny, hough, cascadeClassifier, solvePNP, findHomography, findHomographyRANSAC, findHomographyLMEDS, estimateRigidTransform, MotionType(..), findTransformECC, surf, warp8u, warp8u3, warp32f, CV...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/ip/opencv/src/OpenCV.hs
haskell
# LANGUAGE TypeSynonymInstances # ------------------------------------------------------------------------------ ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ------------...
# LANGUAGE ForeignFunctionInterface # module OpenCV( gaussianBlur, canny, hough, cascadeClassifier, solvePNP, findHomography, findHomographyRANSAC, findHomographyLMEDS, estimateRigidTransform, MotionType(..), findTransformECC, surf, warp8u, warp8u3, warp32f, CVPix(..), warp, undistort8u, webcam...
af9e423866710f1d0ce8523b6ba2d2d6b018144e84441d58c57aa9a5b2673ac0
CindyLinz/Haskell.js
Main.hs
module Main where import Language.Haskell.Exts.Annotated myParseMode filename = ParseMode { parseFilename = filename , baseLanguage = Haskell2010 , extensions = map EnableExtension [ OverlappingInstances , UndecidableInstances , IncoherentInstances , InstanceSigs , DoRec , RecursiveDo ...
null
https://raw.githubusercontent.com/CindyLinz/Haskell.js/78429a49181a15f6bdae426f17bdae722ad17141/trans/show-src/Main.hs
haskell
Hugs98 的功能, 看想不想做
module Main where import Language.Haskell.Exts.Annotated myParseMode filename = ParseMode { parseFilename = filename , baseLanguage = Haskell2010 , extensions = map EnableExtension [ OverlappingInstances , UndecidableInstances , IncoherentInstances , InstanceSigs , DoRec , RecursiveDo ...
401591dff00f2da77077a123630b6a022711e75bd3e4fdbd72d883a6d54cec8b
dbuenzli/vg
mui.ml
--------------------------------------------------------------------------- Copyright ( c ) 2013 The vg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/vg/0d84bca1c9dc689f64f923dcd20a7dda7c552011/test/mui.ml
ocaml
Logging functions. Events Scroll if needed Up Left Down Right Persistent storage Timing functions
--------------------------------------------------------------------------- Copyright ( c ) 2013 The vg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
ebc79813d1515486ce0a5768f56b08717879b5510d519b7041855cfaceea2305
xvw/preface
util.mli
(** Some utils. *) (** {1 Utils functions} *) val swap : 'a * 'b -> 'b * 'a val assoc : ('a * 'b) * 'c -> 'a * ('b * 'c) val unassoc : 'a * ('b * 'c) -> ('a * 'b) * 'c val swap_either : ('a, 'b) Either.t -> ('b, 'a) Either.t val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c...
null
https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_laws/util.mli
ocaml
* Some utils. * {1 Utils functions} * [Id] is [type 'a t = 'a]. * A full profunctorial function module. * [Endo] is a function from ['a] to ['a]. * The [Dual] of a monoid combines element in the opposite order.
val swap : 'a * 'b -> 'b * 'a val assoc : ('a * 'b) * 'c -> 'a * ('b * 'c) val unassoc : 'a * ('b * 'c) -> ('a * 'b) * 'c val swap_either : ('a, 'b) Either.t -> ('b, 'a) Either.t val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c val assoc_either : (('a, 'b) Either.t, 'c)...
bbb6d35719d4a39b76b1c3befe91894f0f2d1ca5cb30da1c4c68606c8d96f2f8
flosell/lambdacd
api.cljs
(ns lambdacd.api (:require [lambdacd.ajax :as ajax] [lambdacd.route :as route]) (:import goog.History)) (defn get-build-history [] (let [result (ajax/GET "api/builds/")] result)) (defn get-build-state [build-number] (let [result (ajax/GET (str "api/builds/" build-number "/"))] result)) (d...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/src/cljs/lambdacd/api.cljs
clojure
(ns lambdacd.api (:require [lambdacd.ajax :as ajax] [lambdacd.route :as route]) (:import goog.History)) (defn get-build-history [] (let [result (ajax/GET "api/builds/")] result)) (defn get-build-state [build-number] (let [result (ajax/GET (str "api/builds/" build-number "/"))] result)) (d...
73e3b912c4391d5ce4226fc8c5a80550f71ae3a0aea4ffab5dc179c8e6a1d7ee
mzp/coq-ide-for-ios
equality.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/tactics/equality.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i true = support rewriting depend...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : equality.mli 13323 ...
d74c6a82fc4f9c7e9f933bf13365ba2eaa6b41f6d03c93f73bc7567c55f69210
bendoerr/real-world-haskell
Lending.hs
lend amount balance = let reserve = 100 newBalance = balance - amount in if balance < reserve then Nothing else Just newBalance lend2 amount balance = if amount < reserve * 0.5 then Just n...
null
https://raw.githubusercontent.com/bendoerr/real-world-haskell/fa43aa59e42a162f5d2d5655b274b964ebeb8f0a/ch03/Lending.hs
haskell
lend amount balance = let reserve = 100 newBalance = balance - amount in if balance < reserve then Nothing else Just newBalance lend2 amount balance = if amount < reserve * 0.5 then Just n...
f745738bb19800e82a3641fba9283269a7a0869f807926a40b4bde7e4fb1cd53
byorgey/diagrams-play
SJT.hs
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # import Data.List (genericLength) import Diagrams.Prelude import Diagrams.Backend.Rasterific.CmdLine import Data.Colour.Palette.BrewerSet sjt 0 = [[]] sjt n = concat $ zipWith ($) (cycle [map reverse . inserts (n-1) . revers...
null
https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/SJT.hs
haskell
with actual sjt lists; use those for coloring. terms of positions) rather than lists. Easier to reconstruct lists from swaps than vice versa, perhaps. this assumes there is a single swap.
# LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # import Data.List (genericLength) import Diagrams.Prelude import Diagrams.Backend.Rasterific.CmdLine import Data.Colour.Palette.BrewerSet sjt 0 = [[]] sjt n = concat $ zipWith ($) (cycle [map reverse . inserts (n-1) . revers...
f90d6f18e6e1b60179e5d0c7be2eb30052be2ee541c359ab20419a06e6732a85
audreyt/openafp
CDD.hs
module OpenAFP.Records.AFP.CDD where import OpenAFP.Types import OpenAFP.Internals data CDD = CDD { cdd_Type :: !N3 ,cdd_ :: !N3 ,cdd :: !NStr } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/CDD.hs
haskell
module OpenAFP.Records.AFP.CDD where import OpenAFP.Types import OpenAFP.Internals data CDD = CDD { cdd_Type :: !N3 ,cdd_ :: !N3 ,cdd :: !NStr } deriving (Show, Typeable)
bdd28b934601af7b299efdb0e7b94fcfe059ac98ff27e8585fdafabc662f030b
bitnomial/bitcoind-rpc
Main.hs
# LANGUAGE NumericUnderscores # module Main (main) where import Control.Concurrent (threadDelay) import Network.HTTP.Client (defaultManagerSettings, newManager) import Test.Tasty (defaultMain, testGroup) import Bitcoin.Core.Regtest (withBitcoind) import Bitcoin.Core.Test.Generator (testGenerator) import Bitcoin.Core...
null
https://raw.githubusercontent.com/bitnomial/bitcoind-rpc/c9c95b08c4adc479fba94e4e8a5bc5518dfb6a0f/bitcoind-regtest/test/Main.hs
haskell
# LANGUAGE NumericUnderscores # module Main (main) where import Control.Concurrent (threadDelay) import Network.HTTP.Client (defaultManagerSettings, newManager) import Test.Tasty (defaultMain, testGroup) import Bitcoin.Core.Regtest (withBitcoind) import Bitcoin.Core.Test.Generator (testGenerator) import Bitcoin.Core...
1c07dc3516d523852514349d5fda15f59092399a003441044abbc5c502cb4e51
clojure-interop/google-cloud-clients
SpannerBatchUpdateException.clj
(ns com.google.cloud.spanner.SpannerBatchUpdateException (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner SpannerBatchUpdateException])) (defn get-update-counts "Returns the number of rows affected by each statement that is successfully run. returns: `long[]`" ([^SpannerBa...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/SpannerBatchUpdateException.clj
clojure
(ns com.google.cloud.spanner.SpannerBatchUpdateException (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner SpannerBatchUpdateException])) (defn get-update-counts "Returns the number of rows affected by each statement that is successfully run. returns: `long[]`" ([^SpannerBa...
3c35a4c219e4696fcfdf693b157bc6646cc68abe51e0b5b33da7cfa17bab968f
gcross/LogicGrowsOnTrees
Supervisor.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE ImpredicativeTypes #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWi...
null
https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Parallel/Common/Supervisor.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # # LANGUAGE ImpredicativeTypes # # LANGUAGE RankNTypes # * Types ** Statistics ** Constraints ** Supervisor types * Functions ** Worker interaction ** Supervisor interaction ** Inquiries ** Launching the supervisor ** Testing the s...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # needed to define the MTL inst...
bebc277936371abab287270d3e8e857099b9faccf2f512dc866e89ef0430014d
fujita-y/ypsilon
mutable-strings.scm
#!nobacktrace (library (rnrs mutable-strings (6)) (export string-set! string-fill!) (import (core primitives)))
null
https://raw.githubusercontent.com/fujita-y/ypsilon/f742470e2810aabb7a7c898fd6c07227c14a725f/sitelib/rnrs/mutable-strings.scm
scheme
#!nobacktrace (library (rnrs mutable-strings (6)) (export string-set! string-fill!) (import (core primitives)))
29a195f8f6d5ed96d5cf579db69488be544d2fe454a1c6f3a37cb0e611187ecc
cstar/ejabberd-old
mod_announce.erl
%%%---------------------------------------------------------------------- %%% File : mod_announce.erl Author : < > %%% Purpose : Manage announce messages Created : 11 Aug 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free software; you can redistribute...
null
https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/mod_announce.erl
erlang
---------------------------------------------------------------------- File : mod_announce.erl Purpose : Manage announce messages This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but...
Author : < > Created : 11 Aug 2003 by < > ejabberd , Copyright ( C ) 2002 - 2010 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 Founda...
cc62f62c12b242b6917c433661f4866c22072a8a1edd6b5534701606571cb701
metametadata/clj-fakes
core.cljc
(ns clj-fakes.core "Simpler API for working in implicit dynamic context. Implements almost the same set of functions as [[clj-fakes.context]]." (:require [clj-fakes.context :as fc] #?@(:clj [ [clj-fakes.macro :as m]])) #?(:cljs (:require-macros [clj-fakes.core]))) ;;;;;;;;;;;;;;;;;;;;;;;; Re-ex...
null
https://raw.githubusercontent.com/metametadata/clj-fakes/d928ddfd11b150b1cd2df5621265c447bf42395a/src/clj_fakes/core.cljc
clojure
Re-exports for usage convenience instead, always use framework API. ClojureScript Function fakes Protocol fakes Assertions Assertions for protocol methods
(ns clj-fakes.core "Simpler API for working in implicit dynamic context. Implements almost the same set of functions as [[clj-fakes.context]]." (:require [clj-fakes.context :as fc] #?@(:clj [ [clj-fakes.macro :as m]])) #?(:cljs (:require-macros [clj-fakes.core]))) #?(:clj (defmacro arg [matc...
3249c3cb6929cbc1ca6062371c46445abfab15869cf0c3ad4dc510f470cc7534
ocaml/odoc
errors.ml
open Odoc_model module Tools_error = struct open Paths (** Errors raised by Tools *) type handle_subs_error = [ `UnresolvedPath of [ `Module of Cpath.module_ ] (* Failed to resolve a module path when applying a fragment item *) ] type reference_kind = [ `S | `T | `C | `CT | `Page | `Cons | `F...
null
https://raw.githubusercontent.com/ocaml/odoc/c3f025d2e67d2a6f236bad5b0db7891ad0a7973f/src/xref2/errors.ml
ocaml
* Errors raised by Tools Failed to resolve a module path when applying a fragment item The module does not have an expansion The module signature depends upon a forward path The path to the module or module type could not be resolved The `module type of` expression could not be expanded Internal error: Foun...
open Odoc_model module Tools_error = struct open Paths type handle_subs_error = [ `UnresolvedPath of [ `Module of Cpath.module_ ] type reference_kind = [ `S | `T | `C | `CT | `Page | `Cons | `Field | `Label ] type expansion_of_module_error = | `UnresolvedForwardPath | `UnresolvedPath of ...
d3446e3823dcc8697878cf7265631775a6124ffe4766770559f17484a9c4a00d
noam-io/lemma_erlang
lemma_erlang_tcp.erl
-module(lemma_erlang_tcp). -behaviour(gen_server). -define(SERVER, ?MODULE). -include("lemma_erlang_types.hrl"). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([start_link/0,register/8,message_...
null
https://raw.githubusercontent.com/noam-io/lemma_erlang/84f14ad466f58d9c4ad66bbf53d203816f92ed27/src/lemma_erlang_tcp.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ -------------------------...
-module(lemma_erlang_tcp). -behaviour(gen_server). -define(SERVER, ?MODULE). -include("lemma_erlang_types.hrl"). -export([start_link/0,register/8,message_transformer/4,send_message_back_to_listener/1]). gen_server Function Exports -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code...
81b2f5e60437ddc62c9ade66e64746dca34e668c36df20599a6f85aaef55d6e8
camllight/camllight
Search_isos.ml
(*************************************************************************) (* *) (* Projet Formel *) (* *) (* ...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/search_isos/Search_isos.ml
ocaml
*********************************************************************** Projet Formel CamlLi...
78150 Rocquencourt France SearchIsos.ml Main program for the standalone library search #open "sys";; #open "arg";; #open "unix";; #open "module_iterator";; #o...
ec19b00d7a48e462258b9bab9f1c04b6c2d5398508bdaa2c3f1ccec9bc1dee9c
graninas/Functional-Design-and-Architecture
Common.hs
module Andromeda.Common ( ) where
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/5046a3b9cd1d0ef90054c99933c846dc5068c7ad/Second-Edition-Manning-Publications/BookSamples/CH04/Section4p2/src/Andromeda/Common.hs
haskell
module Andromeda.Common ( ) where
50f2960ad989291c60a3caed49defde2b77906b4e353d262395df7afdef267a0
banacorn/formal-language
Language.hs
module Language ( ----------------- -- types ----------------- State, States, Alphabet(..), StackElement, Alphabets, StackElements, Language, Transitions(..), -- Regular Language DFA(..), NFA(..), GNFA(..), RE(..), Context - free Language PDA...
null
https://raw.githubusercontent.com/banacorn/formal-language/063ae0ce03955b332c3edebae6b55a42209813d0/haskell-legacy/Language.hs
haskell
--------------- types --------------- Regular Language ------------------------- Regular Language ------------------------- RE ------------------------- ------------------------- ------------------------------------------------------------
module Language ( State, States, Alphabet(..), StackElement, Alphabets, StackElements, Language, Transitions(..), DFA(..), NFA(..), GNFA(..), RE(..), Context - free Language PDA(..), driverDFA, driverNFA, dfa2nfa, nfa2dfa, trimUnrea...
7e4425b7e07ee9311c51e86f560f3704b65ad5a423079f5985271d253a42e333
hugoduncan/swell
spi.clj
(ns swell.spi "Service provider interface for swell" (:require [swell.internal :as internal])) (declare default-interactive-restart-fn) (def ^{:dynamic true :doc "Interactive restart fn"} *interactive-restart-fn* #'default-interactive-restart-fn) (defn handlers "Map of currently bound handlers" []...
null
https://raw.githubusercontent.com/hugoduncan/swell/51932d92b3c4dc13393a28426a4f139b7880ad72/src/swell/spi.clj
clojure
(ns swell.spi "Service provider interface for swell" (:require [swell.internal :as internal])) (declare default-interactive-restart-fn) (def ^{:dynamic true :doc "Interactive restart fn"} *interactive-restart-fn* #'default-interactive-restart-fn) (defn handlers "Map of currently bound handlers" []...
5b2e35cec182824493634dd26cfcec099fd7700898310a4dd573e5b2a9c84a23
roman01la/minimax
listeners.clj
(ns fg.listeners (:require [fg.state :as state] [minimax.glfw.listeners :as listeners]) (:import (org.lwjgl.glfw GLFW))) (set! *warn-on-reflection* true) (defn key-callback [window key scancode action mods] (let [action (condp = action GLFW/GLFW_PRESS :press GLFW/GLFW_REP...
null
https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/fg/listeners.clj
clojure
(ns fg.listeners (:require [fg.state :as state] [minimax.glfw.listeners :as listeners]) (:import (org.lwjgl.glfw GLFW))) (set! *warn-on-reflection* true) (defn key-callback [window key scancode action mods] (let [action (condp = action GLFW/GLFW_PRESS :press GLFW/GLFW_REP...
edcd0b0e225807e1ac7a1e903f77be1408b7650f3c9a7d62d1757c99aef88713
rowangithub/DOrder
popl07.ml
let rec loop x y (m:int) (n:int) = if (x < m) then if (x < n) then loop (x+1) y m n else loop (x+1) (y+1) m n else y let main m = let x = 0 in let y = 3 in if (m > y && y > 0) then let res = loop x y m y in assert (res = m) else () let _ = main 10 let _ = main 2 let _ = main (-1)
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/icfp/popl07.ml
ocaml
let rec loop x y (m:int) (n:int) = if (x < m) then if (x < n) then loop (x+1) y m n else loop (x+1) (y+1) m n else y let main m = let x = 0 in let y = 3 in if (m > y && y > 0) then let res = loop x y m y in assert (res = m) else () let _ = main 10 let _ = main 2 let _ = main (-1)
58dc73142c77e87d1e53a49b6b0cb15ed01c57afd88015efc59d219b8bda8209
haskell-repa/repa
Rate.hs
module Data.Array.Repa.Series.Rate ( RateNat (..) , rateOfRateNat , rateNatOfInt , Down2 (..), Down4 (..), Down8(..) , Tail2 (..), Tail4 (..), Tail8(..)) where import GHC.Exts -- | Holds the value-level version of a type-level rate variable. -- -- All the functio...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-series/Data/Array/Repa/Series/Rate.hs
haskell
| Holds the value-level version of a type-level rate variable. All the functions in the repa-series API ensures that the value-level and type-level rates match up. Should be treated abstactly by user code. | Take the rate of a `RateNat`. # INLINE [1] rateOfRateNat # | Wrap an Int into a `RateNat`. # INL...
module Data.Array.Repa.Series.Rate ( RateNat (..) , rateOfRateNat , rateNatOfInt , Down2 (..), Down4 (..), Down8(..) , Tail2 (..), Tail4 (..), Tail8(..)) where import GHC.Exts data RateNat k = RateNat Word# rateOfRateNat :: RateNat k -> Word# rateOfRateNa...
820967b6d5032bc9a33d935ef682154acb8a72dff7994089c6ed6bd860dfd3a0
input-output-hk/marlowe-cardano
ScriptContext.hs
----------------------------------------------------------------------------- -- -- Module : $Headers License : Apache 2.0 -- -- Stability : Experimental Portability : Portable -- | Test the ` Plutus . V1.Ledger . Contexts . ScriptContext ` functions used by the validators . -- ----------------...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/b1b5d77e3fc78caa9fd67106e49c97ebc49438ec/marlowe-test/src/Spec/Marlowe/Plutus/ScriptContext.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental --------------------------------------------------------------------------- * Testing | Run tests. | `findDatumHash` locates a datum hash in a script context. | `txSignedBy` detects ...
License : Apache 2.0 Portability : Portable | Test the ` Plutus . V1.Ledger . Contexts . ScriptContext ` functions used by the validators . # LANGUAGE NamedFieldPuns # # LANGUAGE TupleSections # module Spec.Marlowe.Plutus.ScriptContext tests ) where import Data.List (find) import Data.Maybe ...
4844210600aa07d19db21784c96bb325fe6243a9c5ce70e5baf9cd274fcfaf1a
derbear/steal
feeaugment.rkt
TODO basic fee compensation for a standard tx (define [feecompensate con ntxn addrs fees] (if (null? addrs) con (let [con1 (append con `(&& (= (gtxn (+ 1 ,ntxn) receiver) (first addrs)) (= (gtxn (+ 1 ,ntxn) fee) (first fees))))] (feecompens...
null
https://raw.githubusercontent.com/derbear/steal/afd746a574728dd04c76a5538449caa6f6876d99/examples/feeaugment.rkt
racket
TODO basic fee compensation for a standard tx (define [feecompensate con ntxn addrs fees] (if (null? addrs) con (let [con1 (append con `(&& (= (gtxn (+ 1 ,ntxn) receiver) (first addrs)) (= (gtxn (+ 1 ,ntxn) fee) (first fees))))] (feecompens...
83648b587ffcf42aec0c1ad7e7e8b7bdec41f3abd7ad7bdfefb908bd47cb3760
xapix-io/axel-f
json.cljc
(ns axel-f.buddy.codecs.json #?(:clj (:require [cheshire.core :as json]))) (defn- update-keys [m f] (cond (map? m) (reduce-kv (fn [a k v] (assoc a (f k) (update-keys v f))) m m) (sequential? m) (reduce (fn [a v] (conj a (update-keys v f))) [] m) :el...
null
https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/src/axel_f/buddy/codecs/json.cljc
clojure
(ns axel-f.buddy.codecs.json #?(:clj (:require [cheshire.core :as json]))) (defn- update-keys [m f] (cond (map? m) (reduce-kv (fn [a k v] (assoc a (f k) (update-keys v f))) m m) (sequential? m) (reduce (fn [a v] (conj a (update-keys v f))) [] m) :el...
198f1b306c3846f99c06477e89675f990855748f2eb740013e5c981bcccb8da5
scrintal/heroicons-reagent
chat_bubble_left.cljs
(ns com.scrintal.heroicons.outline.chat-bubble-left) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/chat_bubble_left.cljs
clojure
(ns com.scrintal.heroicons.outline.chat-bubble-left) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round...
348e90e126ebaf1638d2ac16caf8fe7bb544d9068f91221a2eec749d755dd2a8
nunchaku-inria/nunchaku
Trans_fo_tptp.mli
(* This file is free software, part of nunchaku. See file "license" for more details. *) * { 1 Translation FO / FO_tptp } open Nunchaku_core * Assume there are no types ( other than ` Unitype ) , no datatypes , no pattern match ... pattern match... *) module To_tptp : sig exception Error of string va...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/transformations/Trans_fo_tptp.mli
ocaml
This file is free software, part of nunchaku. See file "license" for more details. * @raise Error if conversion failed * convert the statement. Some statements will just disappear (mostly, declarations). @raise Error if conversion failed
* { 1 Translation FO / FO_tptp } open Nunchaku_core * Assume there are no types ( other than ` Unitype ) , no datatypes , no pattern match ... pattern match... *) module To_tptp : sig exception Error of string val conv_form : FO.T.t -> FO_tptp.form val conv_statement : (FO.T.t, FO.Ty.t) FO.stateme...
169b5e75f4ada81192d1f7c333a0a46611f30263702068d0a25ef799f384d57b
diagrams/monoid-extras
WithSemigroup.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # ----------------------------------------------------------------------------- -- | -- Module : Data.Monoid.WithSemigroup ...
null
https://raw.githubusercontent.com/diagrams/monoid-extras/f0a3c2e160c175543e7b78828ae4ce02cb96b70d/src/Data/Monoid/WithSemigroup.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE CPP # --------------------------------------------------------------------------- | Module : Data.Monoid.WithSemigroup License : BSD-style (see LICENSE) Maintainer : ------------------------------------------------------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Copyright : ( c ) 2011 diagrams - core team ( see LICENSE ) Convenience alias for the combination of @Monoid@ and @Semigroup@ constraints . module Data.Monoid.WithSemigroup ( Monoid' ...
e22ede6d52ec59edd3383f596c479f05ef9ebbff384101e7509c3b36467af573
clojure-interop/google-cloud-clients
GrpcProductSearchStub.clj
(ns com.google.cloud.vision.v1p3beta1.stub.GrpcProductSearchStub "gRPC stub implementation for Cloud Vision API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.vision.v1p3beta1.stub GrpcProductSearchStub]))...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.clj
clojure
(ns com.google.cloud.vision.v1p3beta1.stub.GrpcProductSearchStub "gRPC stub implementation for Cloud Vision API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.vision.v1p3beta1.stub GrpcProductSearchStub]))...
da24a05c9fed8277042f7c57e1c214fb036a532784b09fe674d647e0d884591c
psg-mit/probzelus-haskell
MetaGen.hs
# LANGUAGE GeneralizedNewtypeDeriving , DeriveFunctor # module MetaGen where import Prelude hiding (replicate) import Control.Arrow (second) import Control.Monad.Bayes.Class import Control.Monad.Bayes.Weighted import Data.Dynamic import Data.List (isPrefixOf) import Data.Map (Map) import qualified Data.Map as M impo...
null
https://raw.githubusercontent.com/psg-mit/probzelus-haskell/a4b66631451b6156938a9c5420cfff2999ecbbc6/haskell/src/MetaGen.hs
haskell
logpdf_retval_and_trace, propose, and extend all ignore extra/irrelevant trace key-value pairs. instance MonadTrans Gen where lift x = Gen x (lift (lift x))
# LANGUAGE GeneralizedNewtypeDeriving , DeriveFunctor # module MetaGen where import Prelude hiding (replicate) import Control.Arrow (second) import Control.Monad.Bayes.Class import Control.Monad.Bayes.Weighted import Data.Dynamic import Data.List (isPrefixOf) import Data.Map (Map) import qualified Data.Map as M impo...
09ed7cd6ef7b79f1f66c0a9de2364662f2a84894600cf7e5a92b993bb46f6835
lowasser/TrieMap
Tests.hs
# LANGUAGE ScopedTypeVariables , DeriveFunctor , ViewPatterns # module Data.TrieMap.TrieKey.Tests (tests) where import Control.Monad.Option import Data.TrieMap.Sized import Data.TrieMap.TrieKey import qualified Data.Map as M import Data.TrieMap.TrieKey.Tests.Utils import qualified Data.TrieMap.TrieKey.Subset.Tests...
null
https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/TrieKey/Tests.hs
haskell
# LANGUAGE ScopedTypeVariables , DeriveFunctor , ViewPatterns # module Data.TrieMap.TrieKey.Tests (tests) where import Control.Monad.Option import Data.TrieMap.Sized import Data.TrieMap.TrieKey import qualified Data.Map as M import Data.TrieMap.TrieKey.Tests.Utils import qualified Data.TrieMap.TrieKey.Subset.Tests...
163d70bab598641f402e40d079ce76b3fad31fea8897b80421cedd308c0a1c81
basho/riak_test
ts_simple_http_api_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 Basho Technologies , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the Li...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_simple_http_api_SUITE.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(ts_simple_http_api_SUITE...
9c1096489356bfdde398c7cc5799b3ffcd0fee38f4387d6abb471c432bcbb5fc
bolducp/SICP
01.39.scm
A continued fraction representation of the tangent function was published in 1770 by the German mathematician . ; ;Define a procedure (tan-cf x k) that computes an approximation to the tangent function based on Lambert 's formula . k specifies the number of terms to compute , ;as in Exercise 1-37. (define (cont-fra...
null
https://raw.githubusercontent.com/bolducp/SICP/871babe9296b84b2b9648a02f9202752d21ebf93/exercises/chapter_01/1.3_exercises/01.39.scm
scheme
Define a procedure (tan-cf x k) that computes an approximation to the tangent as in Exercise 1-37.
A continued fraction representation of the tangent function was published in 1770 by the German mathematician . function based on Lambert 's formula . k specifies the number of terms to compute , (define (cont-frac-iterative n d k) (define (iterative-frac i acc) (if (= i 0) acc (iterative-frac ...
508f8f208204a47b84b097eb444edd8268654e9af2fb1ccdfbbd266fe7e5e1b2
ChaosEternal/guile-scsh
utilities.scm
;;; Random useful utilities. Copyright ( c ) 1993 by . See file COPYING . (define-module (scsh utilities) :use-module (srfi srfi-1) :use-module (scsh loophole) :use-module (scsh bitwise) :export (del first? nth mapv mapv! vector-every? copy-vector initialize-vector vector-app...
null
https://raw.githubusercontent.com/ChaosEternal/guile-scsh/1a76e006e193a6a8c9f93d23bacb9e51a1ff6c4c/scsh/utilities.scm
scheme
Random useful utilities. call/cc reverse! omitted. every: use srfi-1. first: incompatible with srfi-1. (define call/cc call-with-current-continuation) (define (delete pred lis) (filter (lambda (x) (not (pred x))) lis)) (if (pair? lis) (lp (cdr lis) (kons (car lis) ans)) ans))) (let recu...
Copyright ( c ) 1993 by . See file COPYING . (define-module (scsh utilities) :use-module (srfi srfi-1) :use-module (scsh loophole) :use-module (scsh bitwise) :export (del first? nth mapv mapv! vector-every? copy-vector initialize-vector vector-append vfold vfold-right ...
8d4dd8dcc9c364c3db40b41d59cdceed4eedb6bbb11a65462415612e2af196e8
cesarpinera/TargetAndroid
project.clj
(defproject factorial "0.1.0-SNAPSHOT" :description "A simple factorial library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src/common"] :java-source-paths ["src/java"] :profiles {:non-android {:dependencies [[org.clojure/clojure "1.4.0"]] ...
null
https://raw.githubusercontent.com/cesarpinera/TargetAndroid/aebdc2682977c55cb5c24ddaf6d0ec14f35892f4/factorial/project.clj
clojure
(defproject factorial "0.1.0-SNAPSHOT" :description "A simple factorial library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src/common"] :java-source-paths ["src/java"] :profiles {:non-android {:dependencies [[org.clojure/clojure "1.4.0"]] ...
1e62e4108ef3fb343a2a0a21b2ab69571364f2238475a0c63e626d7b0c5190ca
avichalp/hql
project.clj
(defproject hql "0.0.1-SNAPSHOT" :description "A DSL to write GraphQL queries" :url "" :scm {:name "git" :url ""} :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.0"] [expound "0.8.2"]] :plugins [[lein-cloverage ...
null
https://raw.githubusercontent.com/avichalp/hql/b216eaa0de499d29b891a28e5c8f21b7a1cbee45/project.clj
clojure
(defproject hql "0.0.1-SNAPSHOT" :description "A DSL to write GraphQL queries" :url "" :scm {:name "git" :url ""} :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.0"] [expound "0.8.2"]] :plugins [[lein-cloverage ...
8b6becb1ca28972f376a3f2cc400ede56d281b74ffee019dd3306015d34a9272
hkuplg/fcore
FeatherWeightJava.hs
# LANGUAGE TemplateHaskell # module FWJava (Classname, Superclass, Fieldname, Variable, Methodname, CT, CL, Field, Constructor, Method, Term, fields, mtype, mbody, override, subtype, isValue, eval) ...
null
https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/examples/case_studies/FeatherWeightJava.hs
haskell
data Type = TyVar String | TyTop | --show---- -try---- -some method Field lookup Method type lookup helper function Method body lookup helper function Valid method overriding : judge whether a method m is defined in a subclass of D subtyping ---evaluation E-PROJNEW E-INVKNEW danger E-INVK-RECV ...
# LANGUAGE TemplateHaskell # module FWJava (Classname, Superclass, Fieldname, Variable, Methodname, CT, CL, Field, Constructor, Method, Term, fields, mtype, mbody, override, subtype, isValue, eval) ...
64bdfd025ca05bb2845e3e28172d50535ea30f2e841d3ed1b0700b055b757c60
artemkin/git-lfs-server
test_get_metadata.ml
#!/usr/bin/env ocaml #use "test.ml" let request = {| GET /objects/ebdaa749534bbbf8e1fc02c4f634648d749d5401e09b11fefbe283fe913b7d39 HTTP/1.1 Host: localhost |} let response = {| HTTP/1.1 200 OK connection: keep-alive content-length: 402 content-type: application/vnd.git-lfs+json { "oid": "ebdaa749534bbbf8e1f...
null
https://raw.githubusercontent.com/artemkin/git-lfs-server/e31ff1c2e4c4c9474d64f7af71abc2dc40a1a561/tests/test_get_metadata.ml
ocaml
#!/usr/bin/env ocaml #use "test.ml" let request = {| GET /objects/ebdaa749534bbbf8e1fc02c4f634648d749d5401e09b11fefbe283fe913b7d39 HTTP/1.1 Host: localhost |} let response = {| HTTP/1.1 200 OK connection: keep-alive content-length: 402 content-type: application/vnd.git-lfs+json { "oid": "ebdaa749534bbbf8e1f...
918193fd55d7fb351b346a70d24407e48140a27c83548a4533231187aee24388
ndmitchell/supero
Type.hs
{-# LANGUAGE DeriveDataTypeable #-} module Core.Type where import Data.Generics type VarName = String -- a locally defined variable type FunName = String -- a top-level function type ConName = String -- a constructor type PrmName = String -- a primitive type Pat = (ConName,[VarName]) data Core = Var VarName ...
null
https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/supero2/Core/Type.hs
haskell
# LANGUAGE DeriveDataTypeable # a locally defined variable a top-level function a constructor a primitive
module Core.Type where import Data.Generics type Pat = (ConName,[VarName]) data Core = Var VarName | Fun FunName | Con ConName | Prm PrmName | App Core Core | Let VarName Core Core | Case Core [(Pat,Core)] deriving (Data,Typeable,Eq) apps x...
b680f33ca83d2bff0bc79a4588c8ce77d81296b4f63863bee1c36802b6086d26
acl2/acl2
defobject.lisp
C Library ; Copyright ( C ) 2023 Kestrel Institute ( ) Copyright ( C ) 2023 Kestrel Technology LLC ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "C") (i...
null
https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/c/atc/defobject.lisp
lisp
C Library Copyright ( C ) 2023 Kestrel Institute ( ) Copyright ( C ) 2023 Kestrel Technology LLC ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) (in-package "C") (include-book "abstract-syntax") (include-book "arrays") (include-book "term-checkers-com...
3c955e7c2143c26bef4ebf4310f7b614287dea20f1a00ce3ba39f7980abd5ced
SamirTalwar/advent-of-code
AOC_07_2.hs
import Data.Bits import Data.Map.Lazy (Map, (!)) import qualified Data.Map.Lazy as Map import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.IO as IO import Text.Parsec import Text.Parsec.Text type Connection = (Wire, Operation) type Connections = Map Wire Operation newtype Wire = Wir...
null
https://raw.githubusercontent.com/SamirTalwar/advent-of-code/66bd9e31f078c9b81ece0264fb869e48964afa63/2015/AOC_07_2.hs
haskell
import Data.Bits import Data.Map.Lazy (Map, (!)) import qualified Data.Map.Lazy as Map import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.IO as IO import Text.Parsec import Text.Parsec.Text type Connection = (Wire, Operation) type Connections = Map Wire Operation newtype Wire = Wir...
39e93ee56168f9ee98b8bee6fb1d6349a592b911702894bcbb2d54c5da0dd636
tolysz/prepare-ghcjs
Classes.hs
{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Classes Copyright : ( c ) 2013 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : portable -- of the ...
null
https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base-pure/Data/Functor/Classes.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | Module : Data.Functor.Classes License : BSD-style (see the file LICENSE) Maintainer : Stability : experimental Portability : portable unary and binary type constructors. These classes are needed ...
Copyright : ( c ) 2013 of the Prelude classes ' Eq ' , ' ' , ' Read ' and ' Show ' to transformers in portable . Thus for a new transformer @T@ , > instance ( Eq1 f ) = > Eq1 ( T f ) where ... > instance ( ) = > ( T f ) where ... > instance ( Show1 f ) = > Show1 ( T f ) where ... > instance...
bbc6ddb254f45db4728068dfb7ed4e11735e89fa27da25a3a3a54fe989e498ef
simingwang/emqx-plugin-kafkav5
inet_config.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/inet_config.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1997 - 2020 . 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(inet_config). -include("inet_config.hrl"). -include("inet.hrl"). -import(lists, [foreach/2, member/2, rever...
375e69df736f57844bd0df4801574dd9335b9e99e2b635895259020098fb1b97
avsm/platform
opamLocal.ml
(**************************************************************************) (* *) Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA (* ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/repository/opamLocal.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA GNU Lesser General Public License version 2.1 , with the special open OpamTypes open OpamTypesBase open OpamProcess.Job.Op let log fmt = OpamConsole.log "RSYN...
2ebafeeb6c498bac990fc44f210d30ff274665800c05cfcedd6cd430ba06de9a
haskell/hsc2hs
BDD.hs
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # {-# LANGUAGE GADTs #-} module BDD where import Control.Monad (ap) import Test.Framework (defaultMain, TestName, Test, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit (Assertion, (@?=)) #if !MIN_VERSION_base(4,8,0) import Control.Applicative (Ap...
null
https://raw.githubusercontent.com/haskell/hsc2hs/fe518b0e86a45826b5b1f4642037981bac7413d7/test/BDD.hs
haskell
# LANGUAGE GADTs # ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- accumulating in reverse order. ----------------------------------------------------------------------------- describe, it ---------------------...
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # module BDD where import Control.Monad (ap) import Test.Framework (defaultMain, TestName, Test, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit (Assertion, (@?=)) #if !MIN_VERSION_base(4,8,0) import Control.Applicative (Applicative (..)) #endif ...
bcafb8d44d3666f452abfa0a0377705a0cf2750268d145c715d91049ff20ba56
michiakig/LispInSmallPieces
chap9b.scm
$ I d : chap9b.scm , v 4.0 1995/07/10 06:52:16 queinnec Exp $ ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest ve...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap9b.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) end of chap9b.scm
$ I d : chap9b.scm , v 4.0 1995/07/10 06:52:16 queinnec Exp $ LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz (define-abbreviation (define-abbreviation call . body) `(inst...
ae02c8b855c2ebbd284e8824612dc7fc33276e5a5b11a4d03ebd98e425fb8672
fons/cl-twitter
twitter-timeline.lisp
(in-package :twitter) ;;---------> for elements see twitter-tweet-status ;; Time line resources as per ;; statuses/home_timeline ;; statuses/user_timeline ;; statuses/mentions ;; statuses/retweets_of_me ;; ;; (define-command stat...
null
https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/api/twitter-timeline.lisp
lisp
---------> for elements see twitter-tweet-status statuses/home_timeline statuses/user_timeline statuses/mentions statuses/retweets_of_me ---------------------end of timeline resources ---------------------------------------------...
(in-package :twitter) Time line resources as per (define-command statuses/home-timeline (:get (:tweet)) (twitter-app-uri "statuses/home_timeline.json") "Returns the 20 most recent statuses, including retweets if they exist, posted by the authenticating user and the user's they follow. This is the s...
096af348f9f6ba584fc6c5ecc8e3b0ba4ad89efd2eab59747b91e40ce4edad9a
input-output-hk/cardano-wallet
Unsafe.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # -- | Copyright : © 2020 - 2021 IOHK -- License: Apache-2.0 -- -- Conversion functions whic...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/157a6d5f977f4600373596b7cfa9700138e8e140/lib/primitive/lib/Cardano/Wallet/Unsafe.hs
haskell
# LANGUAGE RankNTypes # | License: Apache-2.0 Conversion functions which don't have error handling. These are quite convenient to use for jobs like testing, debugging, etc. But these "unsafe" functions should not be used in application code, unless it's certain that the error case will never happen. | Take the...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # Copyright : © 2020 - 2021 IOHK module Cardano.Wallet.Unsafe ( unsafeRight , unsafeFromHex , unsafeFromHex...
359e23bb2cfcd91fe9db261e53fd69d186161aaf2c36916677cf45d1f54a9c40
CATechnologiesTest/arete
context_test.clj
(ns engine.context-test (:require [engine.core :refer :all])) (def foo (atom 6)) (defrule dummy => 6) (defcontext {:before (fn [] (swap! foo #(+ % (context-value :to-add)))) :after #(if (= @foo 28) (reset! foo 496) (throw (RuntimeException. "Context fail...
null
https://raw.githubusercontent.com/CATechnologiesTest/arete/1ccaa554abd3ee4499cbe2381af2ed2af33fb420/test/engine/context_test.clj
clojure
(ns engine.context-test (:require [engine.core :refer :all])) (def foo (atom 6)) (defrule dummy => 6) (defcontext {:before (fn [] (swap! foo #(+ % (context-value :to-add)))) :after #(if (= @foo 28) (reset! foo 496) (throw (RuntimeException. "Context fail...
496fb51cf54235749ce46e061b94e5eb6f2d390264e3bce0c9ab2e63c4e09a4e
jafingerhut/clojure-benchmarks
fasta.clj-11.clj
The Computer Language Benchmarks Game ;; / contributed by speed improvements by (ns fasta (:gen-class)) (set! *warn-on-reflection* true) ;; Handle slight difference in function name between Clojure 1.2.0 and ;; 1.3.0-alpha* ability to use type hints to infer fast bit ;; operations. (defmacro my-unch...
null
https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/fasta/fasta.clj-11.clj
clojure
/ Handle slight difference in function name between Clojure 1.2.0 and 1.3.0-alpha* ability to use type hints to infer fast bit operations. generated an unnecessary call to Integer.valueOf() to discard that value. By assigning the return value of aset to throwaway-val, the compiler actually generates faster c...
The Computer Language Benchmarks Game contributed by speed improvements by (ns fasta (:gen-class)) (set! *warn-on-reflection* true) (defmacro my-unchecked-add-int [& args] (if (and (== (*clojure-version* :major) 1) (== (*clojure-version* :minor) 2)) `(unchecked-add ~@args) `(unche...
21060b89d96a41fa8ef4459976a8bd784fdec77f650464be54abbef5758b35b5
nilenso/time-tracker
spec.clj
(ns time-tracker.invoices.spec (:require [clojure.spec :as s] [clojure.spec.gen :as gen] [time-tracker.users.spec :as users-spec] [time-tracker.spec :as core-spec] [time-tracker.util :as util])) (s/def ::hours (core-spec/positive-bigdec 2)) (s/def ::rate ::core-spec/m...
null
https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/src/clj/time_tracker/invoices/spec.clj
clojure
Note: This should actually serve an XOR of the keys, but does not seem possible with spec.
(ns time-tracker.invoices.spec (:require [clojure.spec :as s] [clojure.spec.gen :as gen] [time-tracker.users.spec :as users-spec] [time-tracker.spec :as core-spec] [time-tracker.util :as util])) (s/def ::hours (core-spec/positive-bigdec 2)) (s/def ::rate ::core-spec/m...
5d21c1687183ecaeeacfd2f347ca803b9ae58c1bcbba99328c15f3018f4a60b8
jgm/unicode-collation
CanonicalCombiningClass.hs
# LANGUAGE TemplateHaskell # module Text.Collate.CanonicalCombiningClass ( canonicalCombiningClass ) where import Text.Collate.UnicodeData (genCanonicalCombiningClassMap) import qualified Data.IntMap as M import Data.Maybe (fromMaybe) -- | Map from code points to canonical combining classes. -- Only nonzero elements...
null
https://raw.githubusercontent.com/jgm/unicode-collation/c811b536a1fd06610ea97660fe10bf8d921a9678/src/Text/Collate/CanonicalCombiningClass.hs
haskell
| Map from code points to canonical combining classes. Only nonzero elements are included. | Determine the canonical combining class for a code point. optimization
# LANGUAGE TemplateHaskell # module Text.Collate.CanonicalCombiningClass ( canonicalCombiningClass ) where import Text.Collate.UnicodeData (genCanonicalCombiningClassMap) import qualified Data.IntMap as M import Data.Maybe (fromMaybe) combiningClassMap :: M.IntMap Int combiningClassMap = $(genCanonicalCombiningClass...
a34c57dbada0213bbcd19f69fe68f15ad1c5592d127c1a8610e13ea477f220fc
racket/plai
run-test.rkt
#lang racket (require tests/eli-tester racket/runtime-path "../util.rkt") (module test racket/base (require syntax/location) (parameterize ([current-command-line-arguments (vector "-g")]) (dynamic-require (quote-module-path "..") #f))) (define-runtime-path here ".") (define (in-directory pt...
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/run-test.rkt
racket
#lang racket (require tests/eli-tester racket/runtime-path "../util.rkt") (module test racket/base (require syntax/location) (parameterize ([current-command-line-arguments (vector "-g")]) (dynamic-require (quote-module-path "..") #f))) (define-runtime-path here ".") (define (in-directory pt...
e9c4d4a1002a7be74787fc99caccb00c70f63572dbecfb3ea18afd644399eecb
NixOS/cabal2nix
DB.hs
{- | Maintainer: Stability: provisional Portability: portable -} module Distribution.Hackage.DB ( HackageDB, PackageData, VersionData(..) , readTarball, parseTarball, hackageTarball ) where import Distribution.Hackage.DB.Parsed import Distribution.Hackage.DB.Path
null
https://raw.githubusercontent.com/NixOS/cabal2nix/0d1a5a7d227683e9d099665f645a8618ec48ef94/hackage-db/src/Distribution/Hackage/DB.hs
haskell
| Maintainer: Stability: provisional Portability: portable
module Distribution.Hackage.DB ( HackageDB, PackageData, VersionData(..) , readTarball, parseTarball, hackageTarball ) where import Distribution.Hackage.DB.Parsed import Distribution.Hackage.DB.Path
534eacb2731a47bd89047b8afa6c92c2fe8b3736d4221027bf31905926b74627
goldfirere/thesis
Sec4.hs
adapted from 's ICFP 2013 paper # LANGUAGE TypeInType , RebindableSyntax , TypeFamilies , GADTs , TypeOperators , ScopedTypeVariables , UndecidableInstances , , FlexibleContexts , ConstraintKinds , TypeApplications # TypeOperators, ScopedTypeVariables, Unde...
null
https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/effects/Sec4.hs
haskell
adapted from 's ICFP 2013 paper # LANGUAGE TypeInType , RebindableSyntax , TypeFamilies , GADTs , TypeOperators , ScopedTypeVariables , UndecidableInstances , , FlexibleContexts , ConstraintKinds , TypeApplications # TypeOperators, ScopedTypeVariables, Unde...
d92ba8409c9909b6d66e1508e4b66e72de157b4d8ba96a539ad562e1411daaed
samrocketman/home
bates-layers-delete.scm
; ; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; Mass delete layers script for GIMP 2.4 Created by ; ; Tags: public domain, layers, delete ; ; Author statement: ; ; Script designed to mass delete layers from current image ; User uses numbers to denote start and end point of deletio...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/bates-layers-delete.scm
scheme
The GIMP -- an image manipulation program Tags: public domain, layers, delete Author statement: Script designed to mass delete layers from current image User uses numbers to denote start and end point of deletion -------------------------------------------------------------------- -------------------------...
Copyright ( C ) 1995 and Mass delete layers script for GIMP 2.4 Created by Distributed by Gimp FX Foundry project (define (script-fu-delete-layers theImage theDraw theLayer1 theLayer2) (let* ( (theNumber 0) (theRepeat 0) (theLayerRef 0) ) (if (> theLayer1 theLayer2) (begin (set! theL...
395f79013e0e77ae10e098e5e43e953130fb2119b3c43c0269ed645d1ef2c3d7
videolang/interactive-syntax
surrogate.rkt
#lang racket/base (provide (all-defined-out)) (require racket/class (prefix-in gui: racket/gui/base) racket/unit racket/runtime-path racket/list racket/fasl racket/path racket/pretty syntax/modread drracket/tool framework ...
null
https://raw.githubusercontent.com/videolang/interactive-syntax/8c13d83ac0f5dbd624d59083b32f765952d1d440/editor/private/surrogate.rkt
racket
Need the text object when enabled Ensure all editors in a buffer use the same namespace (define frame (send (send text get-tab) get-frame)) (send frame show-editor-error-panel (exn-message e)))]) Ensure that #editor()() format is used Finally, replace their text with an actual editor snip Go from end of file to st...
#lang racket/base (provide (all-defined-out)) (require racket/class (prefix-in gui: racket/gui/base) racket/unit racket/runtime-path racket/list racket/fasl racket/path racket/pretty syntax/modread drracket/tool framework ...
58cb54a787a42a4df658f575792d22626c479a12e8cf3743f7e9d463fda7aeb8
LightTable/LightTable
tcp.cljs
(ns lt.objs.clients.tcp "Define tcp server for use with language plugins" (:refer-clojure :exclude [send]) (:require [cljs.reader :as reader] [lt.object :as object] [lt.objs.clients :as clients] [lt.objs.console :as console] [clojure.string :as string]) (:require-...
null
https://raw.githubusercontent.com/LightTable/LightTable/3760844132a17fb0c9cf3f3b099905865aed7e3b/src/lt/objs/clients/tcp.cljs
clojure
TODO: some system-wide error reporting on a new line
(ns lt.objs.clients.tcp "Define tcp server for use with language plugins" (:refer-clojure :exclude [send]) (:require [cljs.reader :as reader] [lt.object :as object] [lt.objs.clients :as clients] [lt.objs.console :as console] [clojure.string :as string]) (:require-...
1ae40dac60073fe565e5cb5241d739487f7213194e4d675900397c2c1a4e20dd
xvw/preface
indexed_foldable.mli
(** Building an {!module:Preface_specs.INDEXED_FOLDABLE} *) (** {1 Using the minimal definition} *) * { 2 Using fold_map } Build a { ! module - type : Preface_specs . INDEXED_FOLDABLE } using { ! module - type : Preface_specs . Indexed_foldable . } . Standard method , using the minimal definition...
null
https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_make/indexed_foldable.mli
ocaml
* Building an {!module:Preface_specs.INDEXED_FOLDABLE} * {1 Using the minimal definition} * {2 Using fold_right} Build a {!module-type:Preface_specs.INDEXED_FOLDABLE} using {!module-type:Preface_specs.Indexed_foldable.WITH_FOLD_RIGHT}. Standard method, using the minimal definition of an alt to derive it...
* { 2 Using fold_map } Build a { ! module - type : Preface_specs . INDEXED_FOLDABLE } using { ! module - type : Preface_specs . Indexed_foldable . } . Standard method , using the minimal definition of an alt to derive its full API . Build a {!module-type:Preface_specs.INDEXED_FOLDABLE}...
22496f659daf1a0558ad9d53943beaf6927eb2b9e4430e8fc5aebd2732638966
Holmusk/elm-street
Aeson.hs
# OPTIONS_GHC -fno - warn - redundant - constraints # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # | Options used to derive FromJSON / ToJSON instance . These options generally comply to @elm - street@ rules regarding names . comply to @elm-street@ rule...
null
https://raw.githubusercontent.com/Holmusk/elm-street/9aa15b26aff53a56147a62adb2179f714f684dc9/src/Elm/Aeson.hs
haskell
-----------------------------+--------------------------+ -----------------------------+--------------------------+ -----------------------------+--------------------------+ -----------------------------+--------------------------+ -----------------------------+--------------------------+ --------------------------...
# OPTIONS_GHC -fno - warn - redundant - constraints # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # | Options used to derive FromJSON / ToJSON instance . These options generally comply to @elm - street@ rules regarding names . comply to @elm-street@ rule...
276ff478c1b6bb21093041f8624bfe0fc259b701226391837f5435005b2ec141
mare5x/LispQR
encode.lisp
(in-package :mare5x.lispqr.encode) (defparameter *encode-debug* nil) (defmacro when-debugging (&body body) `(when *encode-debug* ,@body)) (defclass version-ec-level-characteristics () ((version :initarg :version :accessor version) (ec-level :initarg :ec-level :accessor ec-level) (total-code...
null
https://raw.githubusercontent.com/mare5x/LispQR/2ceb212f9893dc51aacf4e94e5e8652e4908499c/src/encode.lisp
lisp
List of numbers. The table cannot be generated at compile time, since the array's contents are class instances. Hence, this macro outputs a template that does the job. The character at the i-th index has a value of i. | Numeric mode | Alphanumeric mode | Byte mode | Kanji mode Version 1 to 9 | ...
(in-package :mare5x.lispqr.encode) (defparameter *encode-debug* nil) (defmacro when-debugging (&body body) `(when *encode-debug* ,@body)) (defclass version-ec-level-characteristics () ((version :initarg :version :accessor version) (ec-level :initarg :ec-level :accessor ec-level) (total-code...
5b96751529ca5e76167860db1cc44ffb22a31e541ac33c8a73c6876e833c5995
buntine/Simply-Scheme-Exercises
19-4.scm
; Our accumulate combines elements from right to left. That is, ; ( accumulate - ' ( 2 3 4 5 ) ) ; computes 2 − ( 3 − ( 4 − 5 ) ) . Write left - accumulate , which will compute ( ( 2 − 3 ) − 4 ) − 5 ; instead. (The result will be the same for an operation such as +, for which grouping ; order doesn't matter, but wi...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/19-implementing-higher-order-functions/19-4.scm
scheme
Our accumulate combines elements from right to left. That is, instead. (The result will be the same for an operation such as +, for which grouping order doesn't matter, but will be different for -.) You could take it further to work with all data types.
( accumulate - ' ( 2 3 4 5 ) ) computes 2 − ( 3 − ( 4 − 5 ) ) . Write left - accumulate , which will compute ( ( 2 − 3 ) − 4 ) − 5 note : I 've implemented this simply just to demonstrate I understand the concept . (define (last sent) (if (null? (cdr sent)) (car sent) (last (cdr sent)))) (define...
1c20ccd077ad476e6c3728ffa3d5611f2fe93bdd7bcc4f617fcc506327dd81bd
ghcjs/ghcjs-dom
SVGPathSeg.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.SVGPathSeg (pattern PATHSEG_UNKNOWN, pattern PATHSEG_CLOSEPATH, pattern PATHSEG...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGPathSeg.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.SVGPathSeg (pattern PATHSEG_UNKNOWN, pattern PATHSEG_CLOSEPATH, pattern PATHSEG_MOVETO_ABS, pattern PATHSEG_MOVETO_REL, pattern PATHSEG_LINETO_ABS, pattern PATHSEG_LINETO...
6e84ab5f8489136dad8bf9139cb9c2d22c71cae3ef9afb987678adc1ee99e990
finkel-lang/finkel
M03.hs
;;; -*- mode: finkel -*- (module M03) (:require M01) (:: m03 (IO ())) (= m03 (do (m01) (putStrLn "plugin/M03.hs")))
null
https://raw.githubusercontent.com/finkel-lang/finkel/74ce4bb779805ad2b141098e29c633523318fa3e/finkel-kernel/test/data/plugin/M03.hs
haskell
;;; -*- mode: finkel -*- (module M03) (:require M01) (:: m03 (IO ())) (= m03 (do (m01) (putStrLn "plugin/M03.hs")))
3927a63b0ca7612f0a6416630d9367ace9ffdb5f152384ac85b7994c0b628810
skanev/playground
56.scm
SICP exercise 4.56 ; ; Formulate compound queries that retrieve the following information: ; a. the names of all people who are supervised by , together ; with their addresses b. all people whose salary is less than , together with their salary and salary ; c. all people who are supervised by some...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/56.scm
scheme
Formulate compound queries that retrieve the following information: with their addresses c. all people who are supervised by someone who is not in the computer division, together with the supervisor's name and job
SICP exercise 4.56 a. the names of all people who are supervised by , together b. all people whose salary is less than , together with their salary and salary (define query-a '(and (address ?person ?address) (supervisor ?person (Bitdiddle Ben)))) (define query-b '(and (salary ?...
c27eae6e7e054d5c9a4e70664a8492467101a8c238c6d73b18c270b00ac1827f
AllureOfTheStars/Allure
Screen.hs
Copyright ( c ) 2008 - -2011 Copyright ( c ) 2010 - -2021 and others ( see git history ) This file is a part of the computer game Allure of the Stars and is released under the terms of the GNU Affero General Public License . -- For license and copyright information, see the file LICENSE. -- # LANGUAGE Templ...
null
https://raw.githubusercontent.com/AllureOfTheStars/Allure/0c70befd581ad6a6c19b90a7decc9fb673ea136e/GameDefinition/game-src/Client/UI/Content/Screen.hs
haskell
For license and copyright information, see the file LICENSE. | The default screen layout and features definition. | Description of default screen layout and features. A title. No new paragraph. A title. No new paragraph.
Copyright ( c ) 2008 - -2011 Copyright ( c ) 2010 - -2021 and others ( see git history ) This file is a part of the computer game Allure of the Stars and is released under the terms of the GNU Affero General Public License . # LANGUAGE TemplateHaskell # module Client.UI.Content.Screen ( standardLayoutAndF...
0ce9cf69b91a78fa2cd90c47ace8df7efdfd84a14759dc0fa29a5b3c116d8176
scalaris-team/scalaris
yaws_ctl.erl
%%%---------------------------------------------------------------------- %%% File : yaws_ctl.erl Author : < > %%% Purpose : Created : 29 Apr 2002 by < > %%%---------------------------------------------------------------------- %% some code to remoteley control a running yaws server -module(yaws_ctl)....
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/contrib/yaws/src/yaws_ctl.erl
erlang
---------------------------------------------------------------------- File : yaws_ctl.erl Purpose : ---------------------------------------------------------------------- some code to remoteley control a running yaws server internal assumes the appropriate file structures are already created with the right pe...
Author : < > Created : 29 Apr 2002 by < > -module(yaws_ctl). -author(''). -include_lib("kernel/include/file.hrl"). -include("../include/yaws.hrl"). -include("../include/yaws_api.hrl"). -include("yaws_debug.hrl"). -export([start/2, actl_trace/1]). -export([ls/1,hup/1,stop/1,status/1,load/1, che...
c2ef29e3c2bc69004ea97cf15d643291cbff1ef7721c10da4313bbcda87db381
s-expressionists/Cleavir
compute-conflicts.lisp
(in-package #:cleavir-register-allocation) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Compute a set of conflicts for the register allocator. Recall that two variables generate a conflict when one is live at the ;;; point where the other is written to. Furthermore, all items that...
null
https://raw.githubusercontent.com/s-expressionists/Cleavir/e0293780d356a9d563af9abf9317019f608b4e1d/Register-allocation/compute-conflicts.lisp
lisp
Compute a set of conflicts for the register allocator. Recall point where the other is written to. Furthermore, all items that are written to by the same instruction conflict with each other. We do not want multiple copies of some conflict. We have to be careful because the relation is symmetric, so that if ...
(in-package #:cleavir-register-allocation) that two variables generate a conflict when one is live at the a conflict in the set , we do not want to add ( L2 . L1 ) because it (defun same-conflict-p (c1 c2) (or (and (eq (car c1) (car c2)) (eq (cdr c1) (cdr c2))) (and (eq (car c1) (cdr c2)) (eq (cdr...
c8941bbe9a9a9773db2657dbfd685fd545b9a701a766b8c34ac8563e645e0a7c
abhay/eunit
eunit_server.erl
%% This library 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 2 of the %% License, or (at your option) any later version. %% %% This library is distributed in the hope that it will be...
null
https://raw.githubusercontent.com/abhay/eunit/fa9b549955101d6e98d31876e2e44feb96ca4d54/src/eunit_server.erl
erlang
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHA...
published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA $ Id:$ @author < > 2006 @private @doc EUnit server process -module(eunit_server). ...
e7d9f8112c215e7fbe1e63a2f9b820510c126d29baa02715fc27e6b05479a4a3
mdedwards/slippery-chicken
coming.lsp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; File: coming.lsp ;;; ;;; Project: you are coming into us who cannot withstand you for Ensemble Aventure , Freiburg ;;; ;;; Purpose: Code for generation of score ;;; Author : ...
null
https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/tests/coming.lsp
lisp
File: coming.lsp Project: you are coming into us who cannot withstand you Purpose: Code for generation of score $$ Last modified: 12:57:49 Wed Jul 4 2012 BST It will not be simple, it will not take long It will take little time, it will take all your thought It will ta...
for Ensemble Aventure , Freiburg Author : : Creation date : 27th December 2010 ( Wals , Austria ) The title is taken from the poem , Final Notions , by ( 1929- ): (in-package :sc) (in-scale :quarter-tone) (defparameter +coming-rthm-chain-main+ 8 in total '(((e)...
e5dfcf130039f497fb4fd0874db8297e92b97fc90a9d16488c9abf6daa2794f3
CommonDoc/common-doc
unique-ref.lisp
(in-package :common-doc.ops) (defun fill-unique-refs (doc-or-node) "Recur through a document, giving unique reference IDs to each section." (let ((taken (make-hash-table :test #'equal))) ;; `taken` is a hash table of node references to booleans (with-document-traversal (doc-or-node node) ;; Go throug...
null
https://raw.githubusercontent.com/CommonDoc/common-doc/66cabe67241449a1c0e2cbdc955a60c9439869e6/src/operations/unique-ref.lisp
lisp
`taken` is a hash table of node references to booleans Go through every node, noting the reference ID's that are taken `table` is a hash table that maps the position of a section (0 for Determine if `ref` is in the table Determine if the reference is taken Generate a unique ref for a section Add it to the table ...
(in-package :common-doc.ops) (defun fill-unique-refs (doc-or-node) "Recur through a document, giving unique reference IDs to each section." (let ((taken (make-hash-table :test #'equal))) (with-document-traversal (doc-or-node node) (when (reference node) (setf (gethash (reference node) taken) t)))...
e7593596ddc616dbfdb1a135b5366f77c4250f0355f94f22771cadaf600d5876
heyoka/faxe
win_util.erl
%% Date: 06.01.17 - 19:29 Ⓒ 2017 heyoka %% -module(win_util). -author("Alexander Minichmair"). %% API -export([sync/2, split/2, sync_q/2]). %% @doc head - drop as many entries in the first list , as there are in the second return the first , maybe shortened list %% @end -spec sync(list(), list()) -> list(). syn...
null
https://raw.githubusercontent.com/heyoka/faxe/be58dfd82bec54c19e32bf3e4d298089d89417f5/apps/faxe/src/components/win_util.erl
erlang
Date: 06.01.17 - 19:29 API @doc @end @doc provide a list of timestamps and a reference timestamp -> and get back a list of timestamps, which are older than the reference lager:notice("Pred in split_ea : ~p ", [Pred]), find old/outdated items, keep rest lager:debug("~p evict ~p",[?MODULE, Ts]),
Ⓒ 2017 heyoka -module(win_util). -author("Alexander Minichmair"). -export([sync/2, split/2, sync_q/2]). head - drop as many entries in the first list , as there are in the second return the first , maybe shortened list -spec sync(list(), list()) -> list(). sync(List, []) -> List; sync([_LH|L], [_E|R]) -> ...
b78ad3e76601986c5651313aadf3520df3883d7d6596ca7d85ce0b10109cf660
joneshf/open-source
CodeVersion.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} | Module : . Item . CodeVersion Description : Metadata for describing versions of software Copyright : ( c ) , 2017 License : BSD3 Maintainer : Stability : experimental Module : Rollbar.I...
null
https://raw.githubusercontent.com/joneshf/open-source/e3412fc68c654d89a8d3af4e12ac19c70e3055ec/packages/rollbar-hs/src/Rollbar/Item/CodeVersion.hs
haskell
# LANGUAGE OverloadedStrings # | Rollbar supports different ways to say what version the code is. It's 'T.Text' because who knows if you actually got it right... | Plain integers. | Should be a Git SHA.
# LANGUAGE DeriveGeneric # | Module : . Item . CodeVersion Description : Metadata for describing versions of software Copyright : ( c ) , 2017 License : BSD3 Maintainer : Stability : experimental Module : Rollbar.Item.CodeVersion Description : M...
a9eb186a46aff518156baaca22bf5e879a771d3b586b3fb6467688e121678d03
Helium4Haskell/helium
TupleSize1.hs
module TupleSize1 where f :: Int -> (Int,Int) f 0 = (1,1) f i = let (a,b) = f (i-1) in (a+b,a,b)
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Heuristics/TupleSize1.hs
haskell
module TupleSize1 where f :: Int -> (Int,Int) f 0 = (1,1) f i = let (a,b) = f (i-1) in (a+b,a,b)
7912eed5a70239c99a9c985098b01226697f1ed2a23c3173210810ee0537d7e6
cubicle-model-checker/cubicle
ty.ml
(**************************************************************************) (* *) Cubicle (* *) ...
null
https://raw.githubusercontent.com/cubicle-model-checker/cubicle/04f045573093353447a5afc586b0b6ced7630acd/smt/ty.ml
ocaml
************************************************************************ ...
Cubicle Copyright ( C ) 2011 - 2014 and Universite Paris - Sud 11 This file is distributed under the terms ...
d8b4a34251491d3242e5fb5388382a4be25729580aa80ba8eaf98968fa52f465
ghcjs/jsaddle-dom
HTMLHRElement.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLHRElement (setAlign, getAlign, setColor, getColor, setNoShade, getNoShade, setSize, getSize, setWidth, ...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLHRElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLHRElement (setAlign, getAlign, setColor, getColor, setNoShade, getNoShade, setSize, getSize, setWidth, getWidth, HTMLHRElement(..), gTypeHTMLHRElement) where import Prelude ((.), (==), (>...