_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
d7d34041403271016973cca8784d0e38ee01acb9e756f8edbe279a359e11800b
haas/harmtrace
ChromaChord.hs
# LANGUAGE ScopedTypeVariables # {-# OPTIONS_GHC -Wall #-} -------------------------------------------------------------------------------- -- | Module : HarmTrace . Audio . ChromaChord Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford -- License : GPL3 -- M...
null
https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Audio/ChromaChord.hs
haskell
# OPTIONS_GHC -Wall # ------------------------------------------------------------------------------ | License : GPL3 Stability : experimental Portability : non-portable Summary: Recognise audio chroma vectors into textual chord descriptions. -----------------------------------------------------...
# LANGUAGE ScopedTypeVariables # Module : HarmTrace . Audio . ChromaChord Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford Maintainer : , module HarmTrace.Audio.ChromaChord ( createChordRanks , beatSync , mergeByBeat ...
2df3722ca4135442b7d4916220b742059dcc2a6b6488955ea03d80e969107b8b
zotonic/zotonic
filter_urlencode.erl
@author < > [ ] @author < > 2008 , %% @doc 'urlencode' filter, translate a string to url safe characters %%% The MIT License %%% Copyright ( c ) 2007 , %%% %%% Permission is hereby granted, free of charge, to any person obtaining a copy %%% of this software and associated documentation ...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_urlencode.erl
erlang
@doc 'urlencode' filter, translate a string to url safe characters The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ...
@author < > [ ] @author < > 2008 , Copyright ( c ) 2007 , in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PRO...
7bc6358ea543c7b463ac007fdfe0df8bdbbfc3e01c9251a2d733f5c3b59db916
microsoft/SLAyer
TestGenProver.ml
Copyright ( c ) Microsoft Corporation . All rights reserved . (* Utility code to generate stand-alone unit tests *) open Library open Variable open Expression module E = Exp open SymbolicHeap let gen_query (id, kind, (_us, minuend, xs, subtrahend)) = match kind with | "subtract" -> TestGen.gen ("sub_...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/UnitTests/TestGenProver.ml
ocaml
Utility code to generate stand-alone unit tests
Copyright ( c ) Microsoft Corporation . All rights reserved . open Library open Variable open Expression module E = Exp open SymbolicHeap let gen_query (id, kind, (_us, minuend, xs, subtrahend)) = match kind with | "subtract" -> TestGen.gen ("sub_" ^ (string_of_int id)) (fun ff -> Format.fpri...
26223d54805809dd4a2002d1d64a36c2886def07a2ebee7d05b3266b29aeb2ab
tezos-commons/baseDAO
Management.hs
SPDX - FileCopyrightText : 2021 Tezos Commons SPDX - License - Identifier : LicenseRef - MIT - TC module SMT.Model.BaseDAO.Management ( applyAcceptOwnership , applyTransferOwnership , applyCallCustom ) where import Universum import Control.Monad.Except (throwError) import Lorentz.Address import Morley.U...
null
https://raw.githubusercontent.com/tezos-commons/baseDAO/c8cc03362b64e8f27432ec70cdb4c0df82abff35/haskell/test/SMT/Model/BaseDAO/Management.hs
haskell
SPDX - FileCopyrightText : 2021 Tezos Commons SPDX - License - Identifier : LicenseRef - MIT - TC module SMT.Model.BaseDAO.Management ( applyAcceptOwnership , applyTransferOwnership , applyCallCustom ) where import Universum import Control.Monad.Except (throwError) import Lorentz.Address import Morley.U...
9e95db17a86dfa275b25297a1bc09c09b9e179bba09ac7232210cafa6a48b991
hammerlab/ketrew
local_cache.ml
open Ketrew_pure open Internal_pervasives module Target_cache = struct type target_knowledge = [ | `None | `Summary of Target.Summary.t | `Pointer of Target.id * Target.Summary.t ] type flat_state = { retrieved: Time.t option; value: Target.State.Flat.t; } type query_description = [ ...
null
https://raw.githubusercontent.com/hammerlab/ketrew/8940d48fbe174709f076b7130974ecd0ed831d58/src/client-joo/local_cache.ml
ocaml
Log.(s "Target-cache: miss on " % s id @ verbose); Log.(s "Created `None` target signal for " % s id @ verbose); Hashtbl.replace targets id signal;
open Ketrew_pure open Internal_pervasives module Target_cache = struct type target_knowledge = [ | `None | `Summary of Target.Summary.t | `Pointer of Target.id * Target.Summary.t ] type flat_state = { retrieved: Time.t option; value: Target.State.Flat.t; } type query_description = [ ...
10eef15290337fe149e1d6a9fae05743691a6752e195deee4c15b35a8f22fa85
purescript/purescript
TestPscPublish.hs
module TestPscPublish where import Prelude import Control.Exception (tryJust) import Control.Monad (void, guard) import Control.Monad.IO.Class (liftIO) import Data.ByteString.Lazy (ByteString) import Data.Time.Clock (getCurrentTime) import qualified Data.Aeson as A import Data.Version import Data.Foldable (forM_) imp...
null
https://raw.githubusercontent.com/purescript/purescript/7f385cd116b6ac51cea49df01529d031580db005/tests/TestPscPublish.hs
haskell
^ encoding before, encoding after | Given a directory which contains a package, produce JSON from it, and then | attempt to parse it again, and ensure that it doesn't change. A version of Publish.preparePackage suitable for use in tests. We remove the output directory each time to ensure that we are actually testi...
module TestPscPublish where import Prelude import Control.Exception (tryJust) import Control.Monad (void, guard) import Control.Monad.IO.Class (liftIO) import Data.ByteString.Lazy (ByteString) import Data.Time.Clock (getCurrentTime) import qualified Data.Aeson as A import Data.Version import Data.Foldable (forM_) imp...
816d55e9bdfde665156b72d57ca18d796448a62e66057be4cd79a6df92020aa7
hellonico/origami
vido.clj
(ns opencv4.vido (:use camel-snake-kebab.core) (:require [clojure.string :as str] [opencv4.video :as vid]) (:import [org.opencv.videoio Videoio VideoWriter VideoCapture])) (defn- key-to-prop-s [k] (let [ks (name k) prop (str "CAP_PROP_" (clojure.string/upper-case (clojure.string/replace ks "-" "_")...
null
https://raw.githubusercontent.com/hellonico/origami/3f5d73e28b25fb43969777cff7ed41878d01168d/dev/opencv4/vido.clj
clojure
(debug-device (capture-device "cam.edn"))
(ns opencv4.vido (:use camel-snake-kebab.core) (:require [clojure.string :as str] [opencv4.video :as vid]) (:import [org.opencv.videoio Videoio VideoWriter VideoCapture])) (defn- key-to-prop-s [k] (let [ks (name k) prop (str "CAP_PROP_" (clojure.string/upper-case (clojure.string/replace ks "-" "_")...
780f199380565e138e65dca2f0e480f911690d6b9f939ff16fadcd901b5444d1
jarmitage/jarmlib
TrackClip.hs
-- -moss/DrivenByMoss-Documentation/blob/master/Generic-Tools-Protocols/Open-Sound-Control-(OSC).md#receive---track Track Clip OSC specs :{ bwTrackClip = [OSC "/track/{trackclip}/clip/{trackclipindex}/{trackclipprop}" $ ArgList [], -- select, launch, record, remove ( OSC " /track/{1 - 8}/clip/{1 - 8}/color " -- rg...
null
https://raw.githubusercontent.com/jarmitage/jarmlib/853f6d18ab32630397be91ea89846d55e59e3d70/tidal/osc/targets/Bitwig/OSCSpecs/TrackClip.hs
haskell
-moss/DrivenByMoss-Documentation/blob/master/Generic-Tools-Protocols/Open-Sound-Control-(OSC).md#receive---track select, launch, record, remove rgb(r , g , b ) with r , , b = 0 .. 255 select, launch, record, remove return to arrangement Track Clip param shortcuts select, launch, record, remove clip hush Track...
Track Clip OSC specs :{ OSC "/track/{trackclipstop}/clip/stop" $ ArgList [], OSC "/track/{trackcliparrange}/clip/returntoarrangement" $ ArgList []] :} Track Clip params :{ { 1 - BANK_PAGE_SIZE } { 1 - BANK_PAGE_SIZE } { 1 - BANK_PAGE_SIZE } :} :{ clip' t (#) c (+) p =...
4612c7ff6e61afe2c4139570ee6414a4eb23f6d749b5cb70c7b131605c747e5e
ajhc/ajhc
Stats.hs
module Stats( -- mutable Stats, new, tick, setPrintStats, ticks, theStats, isEmpty, null, Stats.print, clear, combine, -- pure printStat, printLStat, Stat, Stats.singleton, Stats.singleStat, prependStat, -- monad MonadStats(..), Sta...
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/Stats.hs
haskell
mutable pure monad combined [vLine] : [vLine] : Pure varients ------------ monad stats ------------ These are inlined so the 'toAtom' can become a caf and be shared ------------------ Stateful IO stats ------------------ --------------- pure + mutable ---------------
module Stats( Stats, new, tick, setPrintStats, ticks, theStats, isEmpty, null, Stats.print, clear, combine, printStat, printLStat, Stat, Stats.singleton, Stats.singleStat, prependStat, MonadStats(..), StatT, StatM, mtick, mtick', ...
ae0fac3c43f5b32d0609614dab5ef882c55475cabc82249bb4755bf14f6956a3
bevuta/pepa
smtp.clj
(ns pepa.smtp (:require [com.stuartsierra.component :as component] [pepa.model :as m] [pepa.db :as db] [pepa.log :as log] [clojure.string :as s]) (:import org.subethamail.smtp.helper.SimpleMessageListener org.subethamail.smtp.helper.SimpleMessageListenerAda...
null
https://raw.githubusercontent.com/bevuta/pepa/0a9991de0fd1714515ca3def645aec30e21cd671/src/pepa/smtp.clj
clojure
Extracted from TODO: Use proper mail address parser NOTE: auto-tag*! so we don't trigger an update on the notification bus
(ns pepa.smtp (:require [com.stuartsierra.component :as component] [pepa.model :as m] [pepa.db :as db] [pepa.log :as log] [clojure.string :as s]) (:import org.subethamail.smtp.helper.SimpleMessageListener org.subethamail.smtp.helper.SimpleMessageListenerAda...
bcfda463353858cb08c5534ec0b82b65dca2b891a586c3e8e678f89e88d53b7d
AlexKnauth/quote-bad
constructor-style-print.rkt
#lang racket/base (provide constructor-style-print constructor-style-println print-convert/constructor-style ) (require mzlib/pconvert racket/pretty ) (module+ test (require racket/port rackunit version/utils)) ;; print-convert/constructor-style : Any -> Any (define (pr...
null
https://raw.githubusercontent.com/AlexKnauth/quote-bad/251c2ed6f6cfd24b733ea7e0d41ff44c63cb3b2d/constructor-style-print/constructor-style-print.rkt
racket
print-convert/constructor-style : Any -> Any constructor-style-print : Any [Output-Port] [(U 0 1)] -> Void Prints v using constructor-style printing (without pretty-printing). constructor-style-println : Any [Output-Port] [(U 0 1)] -> Void Prints v followed by a newline, using constructor-style pretty printing. ...
#lang racket/base (provide constructor-style-print constructor-style-println print-convert/constructor-style ) (require mzlib/pconvert racket/pretty ) (module+ test (require racket/port rackunit version/utils)) (define (print-convert/constructor-style v) (parameterize...
f1964478603646eafa16a4c452cb21c7d9c9304cb16e1f2251a6c21aed481eea
S8A/htdp-exercises
ex111.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex111) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex111.rkt
racket
about the language level of this file in a form that our tools can easily process. (make-vec PositiveNumber PositiveNumber) interpretation represents a velocity vector creates a velocity vector (x,y) if x and y are positive numbers
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex111) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
585f71d87b3df642cc18d8b950be5dbbe07ae84ed9eeae875cd2ca7d31f38b72
rabbitmq/rabbitmq-jms-topic-exchange
sjx_evaluator.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2012 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% --------------------------------------------------...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-jms-topic-exchange/484ae191b96265467408a2d35b05709813234137/src/sjx_evaluator.erl
erlang
----------------------------------------------------------------------------- Derived from works which were: ----------------------------------------------------------------------------- Evaluate an SQL expression for filtering purposes -----------------------------------------------------------------------------...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2012 - 2020 VMware , Inc. or its affiliates . All rights reserved . Copyright ( c ) 2002 , 2012 ( ) Copyright ( c ) 2...
fed69b853241fba4c955b341fc2cc41a84d52f15a44ce502402e1abcf46e5de7
darkleaf/publicator
storage.clj
(ns publicator.use-cases.test.fakes.storage (:require [publicator.domain.identity :as identity] [publicator.domain.abstractions.aggregate :as aggregate] [publicator.use-cases.abstractions.storage :as storage] [publicator.utils.ext :as ext])) (deftype Transaction [data identity-map] storage/Transaction ...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/core/src/publicator/use_cases/test/fakes/storage.clj
clojure
(ns publicator.use-cases.test.fakes.storage (:require [publicator.domain.identity :as identity] [publicator.domain.abstractions.aggregate :as aggregate] [publicator.use-cases.abstractions.storage :as storage] [publicator.utils.ext :as ext])) (deftype Transaction [data identity-map] storage/Transaction ...
c2f2362720d9526a8043a9273c7ef3b8bddc27053691a3174dfa2093ce1a8d28
MATRIXKOO/test_for_sicp
e1_19.scm.rkt
#lang sicp (define (fib n) (fib-iter 1 0 0 1 n)) (define (q_star p q) (+ (* 2 (* p q)) (* q q) )) (q_star 1 2) (define (p_star p q) (+ (* p p) (* q q))) (q_star 1 2) (p_star 1 2) (define (fib-iter a b p q count) (cond ((= count 0) b) ((even? count) (fib-iter a b ...
null
https://raw.githubusercontent.com/MATRIXKOO/test_for_sicp/93f75a93aeb78c45da1832a7398c5b97d57263a4/Chapter1/e1_19.scm.rkt
racket
#lang sicp (define (fib n) (fib-iter 1 0 0 1 n)) (define (q_star p q) (+ (* 2 (* p q)) (* q q) )) (q_star 1 2) (define (p_star p q) (+ (* p p) (* q q))) (q_star 1 2) (p_star 1 2) (define (fib-iter a b p q count) (cond ((= count 0) b) ((even? count) (fib-iter a b ...
fa91f172e9c05d35ec70def863bcbbf0540f7e2ac70d5741beaa3228ecb11ef5
MarkCurtiss/sicp
ch4-query.scm
;;;;QUERY SYSTEM FROM SECTION 4.4.4 OF ;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS ;;;;Matches code in ch4.scm ;;;;Includes: -- supporting code from 4.1 , chapter 3 , and instructor 's manual -- data base from Section 4.4.1 -- see microshaft - data - base below ;;;;This file can be loaded into Scheme...
null
https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_4_exercises/book_code/ch4-query.scm
scheme
QUERY SYSTEM FROM SECTION 4.4.4 OF STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS Matches code in ch4.scm Includes: This file can be loaded into Scheme as a whole. In order to run the query system, the Scheme must support streams. Instead use initialize-data-base (from manual), supplied in this file. SECTION 4.4.4....
-- supporting code from 4.1 , chapter 3 , and instructor 's manual -- data base from Section 4.4.1 -- see microshaft - data - base below NB . PUT 's are commented out and no top - level table is set up . The Driver Loop and Instantiation (define input-prompt ";;; Query input:") (define output-prompt ";;; Qu...
5be1e3eef4274e1301294d327d1778ba929131375637210fb0490c3676dcbcb0
zero-one-group/fxl
core_test.clj
(ns zero-one.fxl.core-test (:require [clojure.java.io :as io] [clojure.spec.alpha :as s] [midje.sweet :refer [facts fact =>]] [zero-one.fxl.specs :as fs] [zero-one.fxl.core :as fxl]) (:import [java.io File FileOutputStream] [org.apache.poi.xssf.usermodel XSSFWorkbook])) (facts "On fxl/read-xls...
null
https://raw.githubusercontent.com/zero-one-group/fxl/5fb43a19b4aa1154e03e582475aa3bb1793d8f77/test/zero_one/fxl/core_test.clj
clojure
(ns zero-one.fxl.core-test (:require [clojure.java.io :as io] [clojure.spec.alpha :as s] [midje.sweet :refer [facts fact =>]] [zero-one.fxl.specs :as fs] [zero-one.fxl.core :as fxl]) (:import [java.io File FileOutputStream] [org.apache.poi.xssf.usermodel XSSFWorkbook])) (facts "On fxl/read-xls...
debeb186a29ce516668865d92ee25c9e1bbad3a8b6dfc42a60da141148271160
mattmundell/nightshade
wrlist.lisp
Assembly routines for write - list support . (in-package "MIPS") (define-assembly-routine (write-list-record) ((:arg object descriptor-reg a0-offset) (:arg offset non-descriptor-reg nl2-offset) (:arg value descriptor-reg a1-offset) (:temp nl0 non-descriptor-reg nl0-offset) (:temp nl1 no...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/assembly/mips/wrlist.lisp
lisp
The write into memory and the write into the write-list have to be atomic. No space, so we have to call out to gengc_FlushWriteList. We have to save all the descriptor registers on the stack in case we end up collecting garbage while in C. Save all lisp regs on the stack, so the garbage collector can find them. C...
Assembly routines for write - list support . (in-package "MIPS") (define-assembly-routine (write-list-record) ((:arg object descriptor-reg a0-offset) (:arg offset non-descriptor-reg nl2-offset) (:arg value descriptor-reg a1-offset) (:temp nl0 non-descriptor-reg nl0-offset) (:temp nl1 no...
9fcefd01383bf73706f559cfe276ecdff75e6f92cb77dd9b5fda3cc9f9977244
byteally/dbrecord
Sqlite.hs
module DBRecord.Sqlite ( module DBRecord.Sqlite.Internal.Query , module Database.SQLite.Simple.FromField , module Database.SQLite.Simple.FromRow , module Database.SQLite.Simple ) where import DBRecord.Sqlite.Internal.Query import Database.SQLite.Simple.FromField import Database.SQLit...
null
https://raw.githubusercontent.com/byteally/dbrecord/991efe9a293532ee9242b3e9a26434cf16f5b2a0/dbrecord-sqlite-simple/src/DBRecord/Sqlite.hs
haskell
module DBRecord.Sqlite ( module DBRecord.Sqlite.Internal.Query , module Database.SQLite.Simple.FromField , module Database.SQLite.Simple.FromRow , module Database.SQLite.Simple ) where import DBRecord.Sqlite.Internal.Query import Database.SQLite.Simple.FromField import Database.SQLit...
44f44e7539f15f3f6f2fae1fb5a0180cad207ba72361d471a8d76522103e818d
ku-fpg/kansas-lava
DUT.hs
import Test main = exportableDUT
null
https://raw.githubusercontent.com/ku-fpg/kansas-lava/cc0be29bd8392b57060c3c11e7f3b799a6d437e1/examples/DUT.hs
haskell
import Test main = exportableDUT
b80297498bee6ee9f6dfb4508bb07434f6ae8ce87ccb8822a6f38b92a3056ef5
namin/inc
tests-4.1.2-req.scm
(add-tests-with-string-output "write-char" [(begin (write-char #\a) (flush-output-port (current-output-port)) (exit)) => "a"] [(begin (write-char #\a) (close-output-port (current-output-port)) (exit)) => "a"] [(begin (write-char #\H) (write-char #\e) (write-char #\l) (wr...
null
https://raw.githubusercontent.com/namin/inc/3f683935e290848485f8d4d165a4f727f6658d1d/src/tests-4.1.2-req.scm
scheme
(add-tests-with-string-output "write-char" [(begin (write-char #\a) (flush-output-port (current-output-port)) (exit)) => "a"] [(begin (write-char #\a) (close-output-port (current-output-port)) (exit)) => "a"] [(begin (write-char #\H) (write-char #\e) (write-char #\l) (wr...
81fe81f19773c21edd2d604fea7da376d67d38b30033f3a4e40f64796f04dc00
PrecursorApp/precursor
assets.clj
(ns pc.assets (:require [amazonica.aws.s3 :as s3] [amazonica.aws.cloudfront :as cloudfront] [amazonica.core] [cemerick.url :as url] [cheshire.core :as json] [clj-http.client :as http] [clojure.java.io :as io] [clojure.string :as str] ...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/assets.clj
clojure
TODO: upload and assetify all of the sourcemap sources How the asset-manifest works: manifest is edn, maps local files to their keys in s3 keys are assetified by the md5 of their content (frontend.js -> frontend-:md5.js) XXX: test out with-cdn-credential TODO: make the caller set credentials TODO: upload publi...
(ns pc.assets (:require [amazonica.aws.s3 :as s3] [amazonica.aws.cloudfront :as cloudfront] [amazonica.core] [cemerick.url :as url] [cheshire.core :as json] [clj-http.client :as http] [clojure.java.io :as io] [clojure.string :as str] ...
1d353301475e0404ac441ec221cf2bba67bdc463cff6af0e10f9392b4f56e198
8c6794b6/guile-tjit
t-flonum-04.scm
(define *bailout* 16.0) (define *max-iterations* 1000) (define (mandelbrot x y) (let ((cr (- y 0.5)) (ci x) (zi 0.0) (zr 0.0)) (let lp ((i 0) (zr zr) (zi zi)) (if (< *max-iterations* i) 0 (let ((zi2 (* zi zi)) (zr2 (* zr zr))) (if (< *...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-flonum-04.scm
scheme
(define *bailout* 16.0) (define *max-iterations* 1000) (define (mandelbrot x y) (let ((cr (- y 0.5)) (ci x) (zi 0.0) (zr 0.0)) (let lp ((i 0) (zr zr) (zi zi)) (if (< *max-iterations* i) 0 (let ((zi2 (* zi zi)) (zr2 (* zr zr))) (if (< *...
5f4bfc808e6d8a8c591a5a5fd06b15161a31c408cc7d0ff2edecb0db8a5e7bd6
braidchat/braid
db.clj
(ns braid.rss.server.db (:require [braid.core.server.db :as db] [clojure.string :as string] [datomic.api :as d] [datomic.db])) (def schema [{:db/ident :rss/id :db/valueType :db.type/uuid :db/doc "Identifer of the RSS feed" :db/cardinality :db.cardinality/one :db/unique :db.unique/identi...
null
https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/rss/server/db.clj
clojure
(ns braid.rss.server.db (:require [braid.core.server.db :as db] [clojure.string :as string] [datomic.api :as d] [datomic.db])) (def schema [{:db/ident :rss/id :db/valueType :db.type/uuid :db/doc "Identifer of the RSS feed" :db/cardinality :db.cardinality/one :db/unique :db.unique/identi...
7dd62b3bb3d35ef16aeca852d9709eb7e5d758fcda4c12596f62d37aa48a34fb
fukamachi/assoc-utils
assoc-utils.lisp
(in-package :cl-user) (defpackage assoc-utils-test (:use :cl :assoc-utils :prove)) (in-package :assoc-utils-test) (plan 9) (subtest "aget" (is-error (aget 1 1) 'error) (is (aget nil 1) nil) (is (aget nil 1 "dflv") "dflv") (is-error (aget (cons 1 2) 1) 'error) (is-error (aget '((1 . 2) 3) #...
null
https://raw.githubusercontent.com/fukamachi/assoc-utils/74af16a3c0f10ad35e406167de02984744fc7854/t/assoc-utils.lisp
lisp
(in-package :cl-user) (defpackage assoc-utils-test (:use :cl :assoc-utils :prove)) (in-package :assoc-utils-test) (plan 9) (subtest "aget" (is-error (aget 1 1) 'error) (is (aget nil 1) nil) (is (aget nil 1 "dflv") "dflv") (is-error (aget (cons 1 2) 1) 'error) (is-error (aget '((1 . 2) 3) #...
a0a8122bd0f24ecd87c2ab2bf6b8a338306a30f6d75532075011d3b3b4c01ad9
samedhi/firemore
authentication_test.cljs
(ns firemore.authentication-test (:require [firemore.authentication :as sut] [cljs.core.async :as async] [cljs.test :as t :include-macros true] [clojure.string :as string] [firemore.authentication :as authentication])) (t/deftest login-anonymously!-test (t/async done (let [not-blank? (compleme...
null
https://raw.githubusercontent.com/samedhi/firemore/8a1829efbe9cbed367f1d49d0e92e01c5aa20ad5/test/firemore/authentication_test.cljs
clojure
(ns firemore.authentication-test (:require [firemore.authentication :as sut] [cljs.core.async :as async] [cljs.test :as t :include-macros true] [clojure.string :as string] [firemore.authentication :as authentication])) (t/deftest login-anonymously!-test (t/async done (let [not-blank? (compleme...
12e68045ca4e226dff136552a1f5c2aef08b56ffd4f700e37ef093ab8661c1fb
argp/bap
piqi_util.ml
Copyright 2009 , 2010 , 2011 , 2012 , 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqilib/piqi_util.ml
ocaml
* commonly used utility functions substitute character [x] with [y] in string [s] preserve the original string split string [s] into stubstring using character [sep] as a separator run (unit -> 'a) function with some boolean reference set to the specified * value before than and have the value restored back...
Copyright 2009 , 2010 , 2011 , 2012 , 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing...
892fa4a07870dbefc418b2c38fad6829d37298f7240125ffa36907cf66615904
lehitoskin/blight
helpers-test.rkt
#lang typed/racket/base (require typed/rackunit "../helpers.rkt") ; any->bool (assert (any->bool 'a) boolean?) (assert (any->bool #f) boolean?) (check-true (any->bool 'a)) (check-false (any->bool #f)) ; hex-string? (assert (hex-string? "DEADBEEF") boolean?) (check-true (hex-string? "0A")) (check-true (hex-s...
null
https://raw.githubusercontent.com/lehitoskin/blight/807b0437c92ee41c68ca5a767d973817ae416b65/tests/helpers-test.rkt
racket
any->bool hex-string? tox-id? (check-exn exn:fail:contract? (get-time)
#lang typed/racket/base (require typed/rackunit "../helpers.rkt") (assert (any->bool 'a) boolean?) (assert (any->bool #f) boolean?) (check-true (any->bool 'a)) (check-false (any->bool #f)) (assert (hex-string? "DEADBEEF") boolean?) (check-true (hex-string? "0A")) (check-true (hex-string? "A")) (check-true (...
7e7d9a7298510f26e44c33ee983b8ce426cd419d2462156a9ef6f474c676a83a
picnic/RelationExtraction
fixpointgen.mli
(****************************************************************************) RelationExtraction - Extraction of inductive relations for Coq (* *) (* This program is free software: you can redistribute it and/or modify *) it u...
null
https://raw.githubusercontent.com/picnic/RelationExtraction/a4cee37d0a8e5f0eff2e010e6305e037aa0d2564/fixpointgen.mli
ocaml
************************************************************************** This program is free software: you can redistribute it and/or modify (at your option) any later version. ...
RelationExtraction - Extraction of inductive relations for Coq it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Copyright 2...
51d1a9e6ed4d0806333f1f077097b86f19350e71b6e89b2f032b55a92084300f
active-group/reacl
new_api_test.cljs
(ns reacl2.test.new-api-test (:require [reacl2.core :as reacl :include-macros true] [reacl2.dom :as dom :include-macros true] [reacl2.test-util.beta :as tu] [reacl2.test-util.xpath :as xpath :include-macros true] [active.clojure.lens :as lens]) (:require-macros [cljs....
null
https://raw.githubusercontent.com/active-group/reacl/946e85a946d9659706b8875f9d1d2a7e0da55592/test-nodom/reacl2/test/new_api_test.cljs
clojure
additional check that args don't get messed up with the app-state: mount with a wrong 'sel' value: update the 'sel' argument then try the message to update something not sure if this is well-defined at all, and can/should be possible: set-parent should not affect message passing/handling: redirect-actions should...
(ns reacl2.test.new-api-test (:require [reacl2.core :as reacl :include-macros true] [reacl2.dom :as dom :include-macros true] [reacl2.test-util.beta :as tu] [reacl2.test-util.xpath :as xpath :include-macros true] [active.clojure.lens :as lens]) (:require-macros [cljs....
96c3f2577e6b1b01c98fbdb75a30725498557c239a20ce1b31c3695e62571c1c
tengstrand/lein-polylith
add.clj
(ns leiningen.polylith.cmd.add (:require [leiningen.polylith.cmd.shared :as shared] [leiningen.polylith.file :as file] [leiningen.polylith.utils :as utils])) (defn system-components [ws-path top-dir system] (let [dir (shared/full-name top-dir "/" "") components (shared/all-component...
null
https://raw.githubusercontent.com/tengstrand/lein-polylith/27bf508a7b4806e4d2dfac01787e99edf2c1c306/src/leiningen/polylith/cmd/add.clj
clojure
(ns leiningen.polylith.cmd.add (:require [leiningen.polylith.cmd.shared :as shared] [leiningen.polylith.file :as file] [leiningen.polylith.utils :as utils])) (defn system-components [ws-path top-dir system] (let [dir (shared/full-name top-dir "/" "") components (shared/all-component...
75301689664f8bf8ebfc7de9e997dcfaafa67ee61342a8826f50c5542b45fb01
xapi-project/xen-api-libs
testcamldm.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/camldm/testcamldm.ml
ocaml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
43cdff3a2beba94ee3da8fc65745ec0b4ff59d1eb0359cb797ff51bc234e5624
w3ntao/programming-in-haskell
Exercise_8_9_3.hs
# OPTIONS_GHC -Wall # module Exercise_8_9_3 where data Tree a = Leaf a | Node (Tree a) (Tree a) count :: Tree a -> Int count (Leaf _) = 1 count (Node l r) = count l + count r balanced :: Tree a -> Bool balanced (Leaf _) = True balanced (Node l r) = abs (count l - count r) <= 1 && balanced l && balanced r
null
https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-8/Exercise_8_9_3.hs
haskell
# OPTIONS_GHC -Wall # module Exercise_8_9_3 where data Tree a = Leaf a | Node (Tree a) (Tree a) count :: Tree a -> Int count (Leaf _) = 1 count (Node l r) = count l + count r balanced :: Tree a -> Bool balanced (Leaf _) = True balanced (Node l r) = abs (count l - count r) <= 1 && balanced l && balanced r
d0ac41712353dac7a6e2566bba46f3fb578596038755d594bbd94d2eba64c7e0
uim/sigscheme
test-obsolete.scm
;; Filename : test-obsolete.scm About : unit tests for obsolete miscellaneous R5RS things ;; Copyright ( C ) 2005 - 2006 < mover AT hct.zaq.ne.jp > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > ;; ;; All rights reserved. ;; ;; Redistribution and use in source and binar...
null
https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/test-obsolete.scm
scheme
Filename : test-obsolete.scm All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the f...
About : unit tests for obsolete miscellaneous R5RS things Copyright ( C ) 2005 - 2006 < mover AT hct.zaq.ne.jp > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must ...
5e6dfd7d578fb5d72403f7b8cdb146bfe6a698208fea3f8c56c87d06fb6e89e3
bcc32/advent-of-code
game_unit.ml
open! Core open! Async open! Import type t = { mutable loc : Loc.t ; mutable hit_points : int ; attack_power : int ; team : Team.t } [@@deriving fields, sexp_of] let create = Fields.create let is_alive t = t.hit_points > 0 let receive_damage t ~points = t.hit_points <- t.hit_points - points; if is_aliv...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2018/15/game_unit.ml
ocaml
open! Core open! Async open! Import type t = { mutable loc : Loc.t ; mutable hit_points : int ; attack_power : int ; team : Team.t } [@@deriving fields, sexp_of] let create = Fields.create let is_alive t = t.hit_points > 0 let receive_damage t ~points = t.hit_points <- t.hit_points - points; if is_aliv...
0ff0b3bcabe971ec5d270453da0eac44b249ad88db1250c4dad012653f526fc0
haskell-works/hw-prim
Positioning.hs
{-# LANGUAGE TypeSynonymInstances #-} module HaskellWorks.Data.Positioning ( Count , Position , lastPositionOf , toCount , toPosition ) where import Data.Int import Data.Word -- | A value representing a count type Count = Word64 -- | A value representing a position type Position = Int64 class ToPositio...
null
https://raw.githubusercontent.com/haskell-works/hw-prim/aff74834cd2d3fb0eb4994b24b2d1cdef1e3e673/src/HaskellWorks/Data/Positioning.hs
haskell
# LANGUAGE TypeSynonymInstances # | A value representing a count | A value representing a position | Convert to a position | Convert a count to a count | Get largest position in a sequenced container of size count.
module HaskellWorks.Data.Positioning ( Count , Position , lastPositionOf , toCount , toPosition ) where import Data.Int import Data.Word type Count = Word64 type Position = Int64 class ToPosition a where toPosition :: a -> Position instance ToPosition Count where toPosition = fromIntegral # INLINE...
9814082b4c79e21348737f799aa732a528d85900bb1c44855829e4d6ec5eee5b
mbj/mhs
ResponseHeader.hs
module OpenApi.ResponseHeader where import OpenApi.JSON import OpenApi.Prelude import OpenApi.ReferenceOr import OpenApi.Schema import OpenApi.TaggedText import qualified Data.Aeson as JSON data ResponseHeader = ResponseHeader { description :: Maybe (TaggedText "ResponseHeaderDescription") , schema :: Maybe...
null
https://raw.githubusercontent.com/mbj/mhs/3a5266840a9ae73df41d700deb6680d48f65bc1f/openapi/src/OpenApi/ResponseHeader.hs
haskell
module OpenApi.ResponseHeader where import OpenApi.JSON import OpenApi.Prelude import OpenApi.ReferenceOr import OpenApi.Schema import OpenApi.TaggedText import qualified Data.Aeson as JSON data ResponseHeader = ResponseHeader { description :: Maybe (TaggedText "ResponseHeaderDescription") , schema :: Maybe...
d6cfa294a123da4dd1b90cab11c8cd3afded4aa2a21077a26c2db2b645d9dbfb
Decentralized-Pictures/T4L3NT
rpc_config_logging.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/tests/rpc_config_logging.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN A...
5701498a2e8628efb60da09238bf4e6c3786461aa2f982eced4618634840729f
spechub/Hets
HasOps.hs
| Module : ./Maude / Meta / HasOps.hs Description : Accessing the Operators of Maude data types Copyright : ( c ) , Uni Bremen 2008 - 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Accessing the Operat...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Maude/Meta/HasOps.hs
haskell
| Represents something that contains a 'Set' of 'Operator's (as 'Symbol's). | Extract the 'Operator's contained in the input. | Map the 'Operator's contained in the input. * Predefined instances
| Module : ./Maude / Meta / HasOps.hs Description : Accessing the Operators of Maude data types Copyright : ( c ) , Uni Bremen 2008 - 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Accessing the Operat...
d2950dcc75b4558f38cc03777311e15b092f3f218b7b81a9284bafc8c3c9734f
wedesoft/aiscm
calibrate_camera.scm
(use-modules (oop goops) (aiscm core) (aiscm image) (aiscm v4l2) (aiscm xorg) (aiscm opencv)) (define v (make <v4l2>)) (define object-points '()) (define image-points '()) (show (lambda _ (let* [(img (from-image (read-image v))) (markers (detect-markers img DICT_4X4_50))] (if (zero? (size-of ...
null
https://raw.githubusercontent.com/wedesoft/aiscm/2c3db8d00cad6e042150714ada85da19cf4338ad/tests/integration/calibrate_camera.scm
scheme
(use-modules (oop goops) (aiscm core) (aiscm image) (aiscm v4l2) (aiscm xorg) (aiscm opencv)) (define v (make <v4l2>)) (define object-points '()) (define image-points '()) (show (lambda _ (let* [(img (from-image (read-image v))) (markers (detect-markers img DICT_4X4_50))] (if (zero? (size-of ...
27e40fe104b75aa25042d1094f308d0a4263a5a7b8cea70dc060fcb33781ab50
huangz1990/SICP-answers
p49-deriv.scm
p49-deriv.scm (define (deriv g) (lambda (x) (/ (- (g (+ x dx)) (g x)) dx))) (define dx 0.00001)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/p49-deriv.scm
scheme
p49-deriv.scm (define (deriv g) (lambda (x) (/ (- (g (+ x dx)) (g x)) dx))) (define dx 0.00001)
224bd4a8cddbbc275136d285029ca6a423ff68e810a2a4126d993d0a24cc8b65
coccinelle/coccinelle
string.mli
type t = string val make : int -> char -> string val init : int -> (int -> char) -> string external length : string -> int = "%string_length" external get : string -> int -> char = "%string_safe_get" val concat : string -> string list -> string val equal : t -> t -> bool val compare : t -> t -> int val contains_from : ...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.12/string.mli
ocaml
type t = string val make : int -> char -> string val init : int -> (int -> char) -> string external length : string -> int = "%string_length" external get : string -> int -> char = "%string_safe_get" val concat : string -> string list -> string val equal : t -> t -> bool val compare : t -> t -> int val contains_from : ...
9ba8c009de9338f7817b475eb02070a24739ecf97f9b65597f1b733b1c73622f
w3ntao/programming-in-haskell
Exercise_8_9_1.hs
# OPTIONS_GHC -Wall # module Exercise_8_9_1 where data Nat = Zero | Succ Nat deriving (Show) add :: Nat -> Nat -> Nat add Zero n = n add (Succ i) n = Succ (add i n) mult :: Nat -> Nat -> Nat mult Zero _ = Zero mult (Succ i) n = add n (mult i n)
null
https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-8/Exercise_8_9_1.hs
haskell
# OPTIONS_GHC -Wall # module Exercise_8_9_1 where data Nat = Zero | Succ Nat deriving (Show) add :: Nat -> Nat -> Nat add Zero n = n add (Succ i) n = Succ (add i n) mult :: Nat -> Nat -> Nat mult Zero _ = Zero mult (Succ i) n = add n (mult i n)
01fccb7f27109f8cb841deb25a8a3b1e94d59ce83112e78d8dd175d78264a2e7
TorXakis/TorXakis
CoreUtils.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} # LANGUAGE RecordWildCards # -- -------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/core/src/CoreUtils.hs
haskell
----------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------- -- export :: IOC.IOC IOB.EnvB :: I...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} # LANGUAGE RecordWildCards # module Co...
41f705b081a71f00816142437e982c99c8826b8b45ccb0b02dd8ff9f17b9cc6e
ocsigen/obrowser
format.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/rt/caml/format.ml
ocaml
********************************************************************* Objective Caml ...
, 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 GNU Library General Public License , with type size;; external size_of_int :...
904314957accd743e18c471ba2a1fba5e5f2e60dc3d03ecd1b727be7a8ef0711
MyDataFlow/ttalk-server
error_hook_sup.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(error_hook_sup). -behaviour(supervisor). %% API. -export([start_link/0]). %% supervisor. -export([init/1]). %% API. -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). %% supervisor...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/error_hook/src/error_hook_sup.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. supervisor. API. supervisor.
@private -module(error_hook_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> Procs = [], {ok, {{one_for_one, 10, 10}, Procs}}.
1be4e77879fe41aff493ab23045339059cf81fd08f7b50f591e0d337228a15d3
dongcarl/guix
mes.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2017 , 2018 , 2019 , 2020 , 2021 Jan ( janneke ) Nieuwenhuizen < > Copyright © 2017 , 2018 < > Copyright © 2018 < > Copyright © 2020 , 2021 < > Copyright © 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free softw...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/mes.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2017 , 2018 , 2019 , 2020 , 2021 Jan ( janneke ) Nieuwenhuizen < > Copyright © 2017 , 2018 < > Copyright © 2018 < > Copyright © 2020 , 2021 < > Copyright © 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU Gener...
9bec6b0577c606bbedb8f6ebc222e0ca6dc50fd711d849546a0bdd9f4801d542
Clozure/ccl
ppc-io.lisp
-*- Mode : Lisp ; Package : CCL ; -*- ;;; Copyright 1994 - 2009 Clozure Associates ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; -2.0 ;;; ;;; Unless required by ...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-0/PPC/ppc-io.lisp
lisp
Package : CCL ; -*- 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 ...
Copyright 1994 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") (defppclapfunction %get-errno () (ldr imm1 target::tcr.errno-loc target::rcontext) (lwz imm0 0 imm1) (stw rzero 0 imm1) (neg imm0 imm0) (box-fixnum arg_z imm0) (blr))
02e00283b2e5b94922b372c28a3df33027a36a2e18ac3d7b5b204a4837f6b84a
emqx/emqx-auth-ldap
emqx_auth_ldap_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-auth-ldap/2b8a5cb782a4620f708ba7d0acac20264d2f54a8/src/emqx_auth_ldap_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_auth_ldap_sup). -behaviour(supervisor). -include("emqx_auth_ldap.hrl"). -export([start_...
fce24fae1f5a86282d4c8c55d9358573e4dc46548993e4f34285c95634a0877b
elastic/eui-cljs
table.cljs
(ns eui.table (:require ["@elastic/eui/lib/components/table/table.js" :as eui])) (def EuiTable eui/EuiTable)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/table.cljs
clojure
(ns eui.table (:require ["@elastic/eui/lib/components/table/table.js" :as eui])) (def EuiTable eui/EuiTable)
eea1421ccbf7d38ae138009aac3f6e9e61fc8eea1698d3b2a8dcbe56cb4c935f
primetype/inspector
Markdown.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE FlexibleContexts # module Inspector.Export.Markdown ( run ) where import Foundation import Foundation.Collection (nonEmpty_) import Foundation.Monad import Foundation.IO (withFile, IOMode(..), hPut) import Foundation.VFS.FilePath import...
null
https://raw.githubusercontent.com/primetype/inspector/bd2ee67c757729d2a725282b27d3b98458f3fe2e/src/Inspector/Export/Markdown.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types #
# LANGUAGE FlexibleContexts # module Inspector.Export.Markdown ( run ) where import Foundation import Foundation.Collection (nonEmpty_) import Foundation.Monad import Foundation.IO (withFile, IOMode(..), hPut) import Foundation.VFS.FilePath import Foundation.String (toBytes, Encoding(UTF8)) import Control.Mo...
8f18725395c87f396efb1d7fb8713f7b9b828bc249571a61695b7fbdf167874c
sbcl/sbcl
pinned-objects.lisp
GC object pinning This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is ;;;; provided ...
null
https://raw.githubusercontent.com/sbcl/sbcl/e30d4154e24205a0908ff371cbd0e0e98d88f1ee/src/compiler/generic/pinned-objects.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. BODY is stuffed in a function to preserve the lexical environment. The cross-compiler prints either "unknown type: COMPILER-NOTE" at each us...
GC object pinning This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-VM") (defmacro with-pinned-objects ((&rest objects) &body body) #.(concatenate 'strin...
d3e2bc4d56dac5f1658c3ed629c8c54f59367e64830e25f2b4434bc142bcbea9
veikman/dmote-keycap
sand.clj
;;; Jigs for sanding keys. (ns dmote-keycap.sand (:require [scad-clj.model :as model] [scad-tarmi.core :refer [π sin cos]] [scad-tarmi.util :refer [loft]] [scad-tarmi.maybe :as maybe] [dmote-keycap.data :refer [style-defaults]] [dmote-keycap.misc :refer [ch...
null
https://raw.githubusercontent.com/veikman/dmote-keycap/ae79469cb7b3647513d18f5910de95c58dacddbe/src/dmote_keycap/sand.clj
clojure
Jigs for sanding keys. s for sagitta, w for width (radius), h for height (radius). The medallion. Block off any part of the sphere below the face of the plinth. Cut away below the base at the back. Cut away to the upper edge of the base at the front. The array of individual lanes. The shared base. Extra materi...
(ns dmote-keycap.sand (:require [scad-clj.model :as model] [scad-tarmi.core :refer [π sin cos]] [scad-tarmi.util :refer [loft]] [scad-tarmi.maybe :as maybe] [dmote-keycap.data :refer [style-defaults]] [dmote-keycap.misc :refer [chord-of-circle]])) (def bas...
2d7c2b84bd2055bc0999b08f4ec428ef5d480f3a5053e2d68a78927a1a550d6f
stumpwm/stumpwm
mode-line-formatters.lisp
Copyright ( C ) 2006 - 2008 ;; This file is part of stumpwm . ;; stumpwm is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 , or ( at your option ) ;; any later version. stumpwm is ...
null
https://raw.githubusercontent.com/stumpwm/stumpwm/ffeb9eba470a3c603567c3b553a674e074071936/mode-line-formatters.lisp
lisp
you can redistribute it and/or modify either version 2 , or ( at your option ) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with this software; see the file COPY...
Copyright ( C ) 2006 - 2008 This file is part of stumpwm . it under the terms of the GNU General Public License as published by stumpwm is distributed in the hope that it will be useful , You should have received a copy of the GNU General Public License (in-package :stumpwm) (export '(*hidden-window-co...
fde6eb47b5d89de727d8ee610cc3c4aaec5dfe58d98b82932fa998dcb37c9bba
jabber-at/ejabberd
mix_tests.erl
%%%------------------------------------------------------------------- Author : < > Created : 16 Nov 2016 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2017 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/test/mix_tests.erl
erlang
------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHA...
Author : < > Created : 16 Nov 2016 by < > ejabberd , Copyright ( C ) 2002 - 2017 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along ...
4965c959207599ca86ff459f67b0c60f88e33e8bb1b5f36a744da6193946b436
kupl/FixML
sub21.ml
type formula = | True | False | Not of formula | AndAlso of formula * formula | OrElse of formula * formula | Imply of formula * formula | Equal of exp * exp and exp = | Num of int | Plus of exp * exp | Minus of exp * exp let andAlso : bool * bool -> bool = fun f -> match f with | (true, true) -...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub21.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of formula * formula | OrElse of formula * formula | Imply of formula * formula | Equal of exp * exp and exp = | Num of int | Plus of exp * exp | Minus of exp * exp let andAlso : bool * bool -> bool = fun f -> match f with | (true, true) -...
64509778078ce868fc2b097cfe0118d52ff733627005de0cce91a4e4453f53e5
gcross/LogicGrowsOnTrees
Word_.hs
# LANGUAGE FlexibleInstances # # LANGUAGE UnicodeSyntax # | This module provides a temporary ' ArgVal ' instance for ' Word ' ( via a newtype wrapper ' Word _ ' ) until ' cmdtheline ' releases a new version that includes an ' ArgVal ' instance for ' Word ' itself . wrapper 'Word_') until 'cmdtheline...
null
https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Utils/Word_.hs
haskell
# LANGUAGE FlexibleInstances # # LANGUAGE UnicodeSyntax # | This module provides a temporary ' ArgVal ' instance for ' Word ' ( via a newtype wrapper ' Word _ ' ) until ' cmdtheline ' releases a new version that includes an ' ArgVal ' instance for ' Word ' itself . wrapper 'Word_') until 'cmdtheline...
477a6831c115dab50a23c11c89026d9c59b08e059f427237936fc1d6a538dfee
metaocaml/ber-metaocaml
t000.ml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) (* empty file *) * 0 ATOM0 1 SETGLOBAL T000 3 STOP...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t000.ml
ocaml
empty file
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) * 0 ATOM0 1 SETGLOBAL T000 3 STOP * 0 ATO...
2aff98849f7963ac09fca916c5c8818acd299eec876904fc2b0c1011a8405e67
ardumont/haskell-lab
account.hs
module Account where import Control.Concurrent import Control.Concurrent.STM -- Represent the balance of the account type Account = TVar Int -- transfer `amount` from account `from` to account `to` transfer :: Account -> Account -> Int -> IO () transfer from to amount = atomically ( do deposit to amount ...
null
https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/concurrency/account.hs
haskell
Represent the balance of the account transfer `amount` from account `from` to account `to` *Account> transferFromAccountAToAccountB Transfer 10 from A to B: *Account> withdrawFromAccountAWithRetry Transfer 11 from A (waiting if not enough money)...
module Account where import Control.Concurrent import Control.Concurrent.STM type Account = TVar Int transfer :: Account -> Account -> Int -> IO () transfer from to amount = atomically ( do deposit to amount withdraw from amount ) deposit :: Account -> Int -> STM () deposit acc amt = do balance <- ...
626faaf094a8cb311ac22cad745170bd8ebb2861eabcdb4e39bc5513f9206d8a
flipstone/orville
TestSchema.hs
module Test.Expr.TestSchema ( FooBar (..), mkFooBar, findAllFooBars, fooBarTable, fooColumn, fooColumnRef, barColumn, barColumnRef, encodeFooBar, orderByFoo, insertFooBarSource, withFooBarData, dropAndRecreateTestTable, assertEqualFooBarRows, assertEqualSqlRows,...
null
https://raw.githubusercontent.com/flipstone/orville/d31693a7e309e28a4fbe265b386a81543df356fa/orville-postgresql-libpq/test/Test/Expr/TestSchema.hs
haskell
module Test.Expr.TestSchema ( FooBar (..), mkFooBar, findAllFooBars, fooBarTable, fooColumn, fooColumnRef, barColumn, barColumnRef, encodeFooBar, orderByFoo, insertFooBarSource, withFooBarData, dropAndRecreateTestTable, assertEqualFooBarRows, assertEqualSqlRows,...
aae0a0993e471c6b8e8181a2c2a3c74aeb39fc3f19aad0d121ce10dc9f657e41
hstreamdb/hstream
RPC.hs
# OPTIONS_GHC -Wno - orphans # # LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternSynonyms #-} module HStream.Utils.RPC ( HStreamClientApi , SocketAddr(..) , runWithAddr , mk...
null
https://raw.githubusercontent.com/hstreamdb/hstream/a26306b11cfa177d7fd3f4903a24b20fd5552dfc/common/hstream/HStream/Utils/RPC.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE GADTs # # LANGUAGE PatternSynonyms # ------------------------------------------------------------------------------ A type synonym could also work but the pattern synonyms defined below cannot be bundled with a type synonym when other modules import these defini...
# OPTIONS_GHC -Wno - orphans # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # module HStream.Utils.RPC ( HStreamClientApi , SocketAddr(..) , runWithAddr , mkGRPCClientConf , mkGRPCClientConfWithSSL , mkClientNormalRequest , mkServerErrResp , returnErrRe...
7fa97e3f9d2c57a7cebdbad8f13d959cdf58dac9d086c2838dd30bcd3c4c6c7a
google/mlir-hs
AST.hs
Copyright 2021 Google LLC -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, software distributed un...
null
https://raw.githubusercontent.com/google/mlir-hs/b464be8b3e782693849fc2476b5c124238687e71/src/MLIR/AST.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2021 Google LLC Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module MLIR.AST where import qualified Data.ByteString as BS import Data.Typeable import Data.Int import Data.Word import Data.Coerce import Data....
38793fae389e3e220ba20b3e015674709462a57d756afd83d2275f4b5023ccde
AccelerateHS/accelerate-examples
World.hs
# LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # # LANGUAGE PatternGuards # # LANGUAGE RecordWildCards # {-# LANGUAGE TypeOperators #-} module World where import Config import Julia import Palette import Graphics.Gloss.Accelerate.Data.Picture as G import Graphics.Gloss.Inte...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/julia/World.hs
haskell
# LANGUAGE TypeOperators # World state ----------- Draw the world React to events zooming panning algorithm animation presets misc Move and zoom the display based on key state Update the picture Miscellaneous ------------- Presets -------
# LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # # LANGUAGE PatternGuards # # LANGUAGE RecordWildCards # module World where import Config import Julia import Palette import Graphics.Gloss.Accelerate.Data.Picture as G import Graphics.Gloss.Interface.Pure.Game ...
7c3f631caecb5eaa7effb8fd1b97c4d5933f92766e8dd468e10d7e29c8280289
oofp/Beseder
TimerDataApps.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE PartialTypeSignatures #-} # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE RebindableSyntax # {-# LANGUAGE...
null
https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/Examples/Timer/TimerDataApps.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PartialTypeSignatures # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # OPTIONS_GHC -fomit-interface-pragmas # import Beseder.Ba...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE RebindableSyntax # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE OverloadedLabels # # OPTIONS_GHC -fno - warn - ...
69a0842a858de85b243f4240a7c8fb2067cdc36d44b2251408957c1270f50865
DKurilo/hackerrank
solution_naive.hs
# LANGUAGE UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import Data.List.Split (chunksOf) import Debug.Trace import System.IO type Polynom = [Bool] data Convolution = C Int Int [Polynom] newtype Message = M [Bool] deriving (Eq) inst...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/convolutional-coding/solution_naive.hs
haskell
# LANGUAGE UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import Data.List.Split (chunksOf) import Debug.Trace import System.IO type Polynom = [Bool] data Convolution = C Int Int [Polynom] newtype Message = M [Bool] deriving (Eq) inst...
fb333fceaafda552c921709c2ed35500b6920d51a34d94f6eb20960246bd6961
Profpatsch/yarn-lock
Parse.hs
# LANGUAGE NoImplicitPrelude , GeneralizedNewtypeDeriving , OverloadedStrings # | Module : Yarn . Lock . Description : for yarn.lock files Maintainer : Profpatsch Stability : experimental This module provides a parser for the AST of @yarn.lock@ files . Module : Yarn.Lock.Parse Description : Parser for ya...
null
https://raw.githubusercontent.com/Profpatsch/yarn-lock/9e9467e7fdeb1b271d5f2ec21a3d4fc706ccf121/src/Yarn/Lock/Parse.hs
haskell
* Parsing ** Re-export ** Parsers * Internal Parsers | We use a simple (pure) @Megaparsec@ parser. | The @yarn.lock@ format doesn’t specifically include a fixed scheme, it’s just an unnecessary custom version of a list of fields. An field can either be a string or more fields w/ deeper indentation. The actua...
# LANGUAGE NoImplicitPrelude , GeneralizedNewtypeDeriving , OverloadedStrings # | Module : Yarn . Lock . Description : for yarn.lock files Maintainer : Profpatsch Stability : experimental This module provides a parser for the AST of @yarn.lock@ files . Module : Yarn.Lock.Parse Description : Parser for ya...
c3944e89bd6a873890e0486d28c78f14fe35b79b984b0082c4ae9911ee8726d1
synrc/mad
login.erl
-module(login). -compile(export_all). -include_lib("nitro/include/nitro.hrl"). -include_lib("n2o/include/n2o.hrl"). event(init) -> nitro:update(loginButton, #button{id=loginButton, body="Login",postback=login,source=[user,pass]}); event(login) -> User = nitro:to_list(nitro:q(user)), Roo...
null
https://raw.githubusercontent.com/synrc/mad/b8811aebd662c2a281c9f87642b5cab9321cf543/priv/nitro/src/login.erl
erlang
-module(login). -compile(export_all). -include_lib("nitro/include/nitro.hrl"). -include_lib("n2o/include/n2o.hrl"). event(init) -> nitro:update(loginButton, #button{id=loginButton, body="Login",postback=login,source=[user,pass]}); event(login) -> User = nitro:to_list(nitro:q(user)), Roo...
59851a2690aa6199297940b4f9dac0272094c7b4a53399f7893da5880f76c4d9
joshuamiller/cljs-react-navigation-example
server.cljs
(ns cljsjs.react.dom.server)
null
https://raw.githubusercontent.com/joshuamiller/cljs-react-navigation-example/45568ed191e782c3f8c0580d2d8774c6b2add52f/src/cljsjs/react/dom/server.cljs
clojure
(ns cljsjs.react.dom.server)
e7f8be0c58b8968cacbe751c462f9428221261d658f0238d20155d02e2455731
hslua/hslua
low-level-factorial.hs
-- lua_setglobal is unsafe in general and causes a compiler warning. {-# OPTIONS_GHC -Wno-warnings-deprecations #-} | Expose factorial function to Lua , using the low - level API . module Main where import Prelude import Control.Monad (void) import Foreign.C (withCString, withCStringLen) import Foreign.Ptr (nullPtr) im...
null
https://raw.githubusercontent.com/hslua/hslua/cfb7b7904654cbd85524cb73b3f4a93289d1bb06/hslua-examples/low-level-factorial/low-level-factorial.hs
haskell
lua_setglobal is unsafe in general and causes a compiler warning. # OPTIONS_GHC -Wno-warnings-deprecations # push as integer if the result is small enough, and as string otherwise. Load the script. Call the loaded script.
| Expose factorial function to Lua , using the low - level API . module Main where import Prelude import Control.Monad (void) import Foreign.C (withCString, withCStringLen) import Foreign.Ptr (nullPtr) import Lua luaScript :: String luaScript = unlines [ "print(' 5! =', factorial(5), type(factorial(5)))" , "print(...
4f6cb75c7cd1b2d0c66b55bc777bf0a8b100d1c9a132e7969e8676e662017bbc
ekmett/stable-maps
Unsafe.hs
# LANGUAGE Unsafe # -- | The API in "System.Mem.StableName.Map" allows @'Map' f@ only when 's parameter has a representational role . This module -- exports functions that defeat that restriction. If it breaks, -- you get to keep both pieces. In many cases, " System . Mem . StableName . TypedMap " will do the tri...
null
https://raw.githubusercontent.com/ekmett/stable-maps/7d3b9c16b4ff4fd4bda9a07436b0fc6a95e63444/System/Mem/StableName/Map/Unsafe.hs
haskell
| The API in "System.Mem.StableName.Map" allows @'Map' f@ only exports functions that defeat that restriction. If it breaks, you get to keep both pieces. In many cases, somewhat less efficient.
# LANGUAGE Unsafe # when 's parameter has a representational role . This module " System . Mem . StableName . TypedMap " will do the trick , but it 's module System.Mem.StableName.Map.Unsafe ( unsafeInsertWith , unsafeInsertWith' , unsafeAdjust , unsafeAdjust' , unsafeLookup , unsafeFind ...
6934f1fed0eb53a959e170ea65eccc3ba39e37b2680f569470d318fb63c3e9c0
votinginfoproject/data-processor
locality_test.clj
(ns vip.data-processor.validation.v5.locality-test (:require [vip.data-processor.validation.v5.locality :as locality] [clojure.test :refer :all] [korma.core :as korma] [vip.data-processor.test-helpers :refer :all] [vip.data-processor :as data-processor] [vip...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/locality_test.clj
clojure
(ns vip.data-processor.validation.v5.locality-test (:require [vip.data-processor.validation.v5.locality :as locality] [clojure.test :refer :all] [korma.core :as korma] [vip.data-processor.test-helpers :refer :all] [vip.data-processor :as data-processor] [vip...
50df73786edc16d62979646ff7c1ba6fcf6c25157142de181fc61f099f6bfea5
well-typed-lightbulbs/ocaml-esp32
printpat.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/typing/printpat.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes open Typedtree open Types open Format let is_cons = function | {cstr_name = "::"} -> true...
a69b2d1e86b2bbb91692e92548af74ab06cd9ddb90f76319f0a63073c20cf618
janestreet/universe
test_origin.ml
open! Base open! Expect_test_helpers_base let test = function | Sexp.Private.Raw_grammar.Ref (_, group) -> print_endline group.origin | Inline _ -> print_cr [%here] (Atom "Unexpected [Inline]") ;; type t = unit [@@deriving sexp_grammar] let extension_node = [%sexp_grammar: int] le...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_sexp_conv/test/expect/test_origin.ml
ocaml
Because the origin is generated at the type definition, it points to the functor definition rather than the functor application. ppx_deriving omits modules defined in expressions from the [path]. Maybe there's not a good way to bring the module name out of that scope. E.g., how to disambiguate multiple eva...
open! Base open! Expect_test_helpers_base let test = function | Sexp.Private.Raw_grammar.Ref (_, group) -> print_endline group.origin | Inline _ -> print_cr [%here] (Atom "Unexpected [Inline]") ;; type t = unit [@@deriving sexp_grammar] let extension_node = [%sexp_grammar: int] le...
c347592405bec36d425e55088eff7b8b09536944ffeeab301b557bfb35677b36
sionescu/bordeaux-threads
impl-genera.lisp
-*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Package : BORDEAUX - THREADS-2 ; Base : 10 ; -*- (in-package :bordeaux-threads-2) ;;; ;;; Threads ;;; (deftype native-thread () 'process:process) (defvar *thread-recursive-lock-key* 0) (defun %make-thread (function name) (flet ((top-level () (let (...
null
https://raw.githubusercontent.com/sionescu/bordeaux-threads/3b5fd64b768079425b2e9ad6ae8fc52dc8d63b3a/apiv2/impl-genera.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : BORDEAUX - THREADS-2 ; Base : 10 ; -*- Threads Introspection/debugging Non-recursive locks Recursive locks Condition variables CONDITION-VARIABLE-P is defined in API-CONDITION-VARIABLES.LISP Timeouts PROCESS:WITH-TIMEOUT either returns NIL on timeout or sig...
(in-package :bordeaux-threads-2) (deftype native-thread () 'process:process) (defvar *thread-recursive-lock-key* 0) (defun %make-thread (function name) (flet ((top-level () (let ((*thread-recursive-lock-key* 0)) (funcall function)))) (declare (dynamic-extent #'top-level)) (proce...
16d570863fd733e8e9d6c20c28f427ef32682a76ffdf3c84e171eeff3c835149
soulomoon/SICP
prompt.scm
(load "/Users/soulomoon/git/SICP/Chapter4/ex4.03.rkt") (define (setup-environment) (let ((initial-env (extend-environment (primitive-procedure-names) (primitive-procedure-objects) the-empty-environment))) (define-variable! 'true true initial-env) (define-variable! 'fals...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/prompt.scm
scheme
(load "/Users/soulomoon/git/SICP/Chapter4/ex4.03.rkt") (define (setup-environment) (let ((initial-env (extend-environment (primitive-procedure-names) (primitive-procedure-objects) the-empty-environment))) (define-variable! 'true true initial-env) (define-variable! 'fals...
df4ced798f5fac0c1d864945bd50161e272e07667069b61956c699eef7e1bd3a
LaurentMazare/ocaml-torch
env_gym_pyml.mli
open Torch type step = { obs : Tensor.t ; reward : float ; is_done : bool } type t val create : string -> action_repeat:int -> t val reset : t -> Tensor.t val step : t -> action:int -> step val actions : t -> string list val lives : t -> int
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/examples/reinforcement-learning/env_gym_pyml.mli
ocaml
open Torch type step = { obs : Tensor.t ; reward : float ; is_done : bool } type t val create : string -> action_repeat:int -> t val reset : t -> Tensor.t val step : t -> action:int -> step val actions : t -> string list val lives : t -> int
e762576234eeb54f14c6b11e1b4005900e9de43b1bbdec7d72d97d5df1338ca2
SamProtas/JuicyPixels-blurhash
Common.hs
-- | Module : Codec . Picture . . Internal . Common Copyright : ( c ) 2020 -- License: BSD3 Maintainer : < > -- Stability: experimental -- Portability: portable -- -- Internal Blurhash helper functions shared by encoding and decoding. -- -- __Note__: This is an internal module not subject to PVP adherence. ...
null
https://raw.githubusercontent.com/SamProtas/JuicyPixels-blurhash/7b0fd9e73840b12a67762a6fe6c8e0bf371849c8/src/Codec/Picture/Blurhash/Internal/Common.hs
haskell
| License: BSD3 Stability: experimental Portability: portable Internal Blurhash helper functions shared by encoding and decoding. __Note__: This is an internal module not subject to PVP adherence. respectively
Module : Codec . Picture . . Internal . Common Copyright : ( c ) 2020 Maintainer : < > module Codec.Picture.Blurhash.Internal.Common where import Codec.Picture (Image, PixelRGB8(..), PixelRGBF(..), pixelMap) | Helper function specified by other implementations signPow :: Float -> Float -> Float signPow...
27db2895c9036c61d565310fe5d04ebf3084c197367ae67d8774d98104273e35
dada-lang/dada-model
share-ty.rkt
#lang racket (require redex "../grammar.rkt" "../util.rkt") (provide apply-joint-perms-to-ty apply-perms ) (define-metafunction dada ;; apply-perms program perms ty ;; ;; Given the perms on a field owner, apply that perms to the type of ;; the field. Also used in other conte...
null
https://raw.githubusercontent.com/dada-lang/dada-model/307b4833bd4aa25b43a0d7659d989a564a91b9b3/racket/type-system/share-ty.rkt
racket
apply-perms program perms ty Given the perms on a field owner, apply that perms to the type of the field. Also used in other contexts. apply-joint-perms-to-ty program leases ty Transform a type by sharing it. "my" class becomes shared shared classes don't change jointly owned classes don't change data types ...
#lang racket (require redex "../grammar.rkt" "../util.rkt") (provide apply-joint-perms-to-ty apply-perms ) (define-metafunction dada apply-perms : program perms ty -> ty [(apply-perms program my ty) ty] [(apply-perms program our ty) (apply-joint-perms-to-ty program our ty)] ...
a0f66fc509bf95c6d3b81666717740ad05937be3250fdd771cc0cb853394a95c
dongcarl/guix
cpan.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2017 , 2018 < > Copyright © 2020 , 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under ...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/import/cpan.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2017 , 2018 < > Copyright © 2020 , 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < ...
622b0927da8884a6677bd50d5b937f5c76435fd8ad7ecb7a872b94d9306d49ff
nyu-acsys/drift
mc91_cps.ml
Res : OCaml - > 91 imprecision : Oct : 91 < = v : TODO : need to TEST ! Res: OCaml -> 91 imprecision: Oct: 91 <= v Liquid Haskell: TODO: need to TEST! *) let rec m x (k:int -> unit): unit = if x > 100 then k (x-10) else let f r = m r k in m (x+11) f let main (n:int(*-:{v:Int | true}*)) = le...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/high/mc91_cps.ml
ocaml
-:{v:Int | true}
Res : OCaml - > 91 imprecision : Oct : 91 < = v : TODO : need to TEST ! Res: OCaml -> 91 imprecision: Oct: 91 <= v Liquid Haskell: TODO: need to TEST! *) let rec m x (k:int -> unit): unit = if x > 100 then k (x-10) else let f r = m r k in m (x+11) f let k r = if n <= 101 then assert (r = 91...
b6ce268799c028764c0654b85e91eb66b6437c1bb1499e64943b14d523c3899d
g000001/arc-compat
variables.lisp
(in-package :arc-compat.internal) (in-readtable :common-lisp) ;;; Variables ;; def name params [body ...] ;;[code] [Macro] defmemo name parms [body ...] ;;Creates a memoized function. ;;[code] [Procedure] memo f Creates a memoized function from f. ;; safeset var value (defmacro safeset (var val) "Sets var to ...
null
https://raw.githubusercontent.com/g000001/arc-compat/2506c0717ba5564695af5bd216d6d88236b3b6cd/variables.lisp
lisp
Variables def name params [body ...] [code] [Macro] defmemo name parms [body ...] Creates a memoized function. [code] [Procedure] memo f safeset var value *** redefining var in x [choices ...] <- *onlisp* t >(in 1 '(1 2 3)) nil copy x [key val] ... (coerce 'foo 'string) [code] [Variable] sig Hash table containing...
(in-package :arc-compat.internal) (in-readtable :common-lisp) Creates a memoized function from f. (defmacro safeset (var val) "Sets var to value. This is similar to =, except it prints a warning if var is already defined." `(progn (when (boundp ',var) (warn "*** redefining ~S" ',var)) (cl:s...
6c0cc6629ef36843ff16b16a2568e99ddc4515194762caead6cb1e9b3487a8c7
nshepperd/funn
Network.hs
# LANGUAGE TypeFamilies , KindSignatures , FlexibleContexts # # LANGUAGE BangPatterns , MultiParamTypeClasses , FlexibleInstances # # LANGUAGE TypeOperators , GADTs , ScopedTypeVariables # # LANGUAGE TypeApplications , DataKinds # {-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-} # OPTIONS_GHC -fplugin GHC.TypeLits ....
null
https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/Network/Network.hs
haskell
# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise # # OPTIONS_GHC -fconstraint-solver-iterations=20 # idWith :: (Monad m) => proxy a -> Network m a a idWith _ = net_empty
# LANGUAGE TypeFamilies , KindSignatures , FlexibleContexts # # LANGUAGE BangPatterns , MultiParamTypeClasses , FlexibleInstances # # LANGUAGE TypeOperators , GADTs , ScopedTypeVariables # # LANGUAGE TypeApplications , DataKinds # # OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver # module AI.Funn.Network.Network ...
678b4b12f959e0a89d493eabb46aad35c8812481909432a78bb1c2280db6a879
quickdudley/hfnn
HFNN.hs
# LANGUAGE DataKinds # module AI.HFNN ( module AI.HFNN.Internal, module AI.HFNN.Activation, simpleLayer, backpropExample ) where import Control.Applicative import Control.Monad import AI.HFNN.Activation import AI.HFNN.Internal simpleLayer :: [Layer s] -> Word -> ActivationFunction -> NNBuilder d s (Layer s...
null
https://raw.githubusercontent.com/quickdudley/hfnn/fb12016f0588f48aa67abc81262f283f5c1ff69f/src/AI/HFNN.hs
haskell
# LANGUAGE DataKinds # module AI.HFNN ( module AI.HFNN.Internal, module AI.HFNN.Activation, simpleLayer, backpropExample ) where import Control.Applicative import Control.Monad import AI.HFNN.Activation import AI.HFNN.Internal simpleLayer :: [Layer s] -> Word -> ActivationFunction -> NNBuilder d s (Layer s...
a12b7fbff88a4f0f6cd28e459ae330f48421846a7848690d153f768b336470ce
racket/rhombus-prototype
interface-clause.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre enforest/transformer enforest/property enforest/proc-name "introducer.rkt" "realm.rkt") "enforest.rkt") (provide def...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/4e66c1361bdde51c2df9332644800baead49e86f/rhombus/private/interface-clause.rkt
racket
"accessor" closes over `class-data`:
#lang racket/base (require (for-syntax racket/base syntax/parse/pre enforest/transformer enforest/property enforest/proc-name "introducer.rkt" "realm.rkt") "enforest.rkt") (provide def...
fbeff864fc8620b8e0d3530f5f452635a96c45643f6daf95c25ca96f8e936680
gregcman/cl-c-parse
package.lisp
(defpackage :c-parse (:use :cl :esrap-liquid :yacc :trivia :deflazy)) (in-package :c-parse)
null
https://raw.githubusercontent.com/gregcman/cl-c-parse/4f9a6c61919c6ce5cb75a2500e9308b92cc5f6df/package.lisp
lisp
(defpackage :c-parse (:use :cl :esrap-liquid :yacc :trivia :deflazy)) (in-package :c-parse)
b6d1a72014cd3af14a4e696e155184f84b112f548ee22d1f11fd0146687ae381
tomjridge/imp_fs
v2_dir_impl.ml
* A simple directory implementation using a B - tree ; NOTE this module safe to open . Directories are one of the main objects we deal with . We implement a directory as a map from name ( string , max length 256 bytes ) to entry ( file , directory or symlink ) . Of course , this uses an underlying B - t...
null
https://raw.githubusercontent.com/tomjridge/imp_fs/8eb2bce99008be34b17aa5f4eb031d1be2b49e69/src/common/v2_dir_impl.ml
ocaml
$(PIPE2SH("""sed -n '/type[ ].*dir_origin =/,/}/p' >GEN.dir_origin.ml_""")) $(PIPE2SH("""sed -n '/type[ ].*dir_ops =/,/}/p' >GEN.dir_ops.ml_""")) * What we keep in memory to represent a dir (in addition to the used list and the dir map) $(PIPE2SH("""sed -n '/NOTE[ ].de stands for/,/^>/p' >GEN.dir_factory.ml_""...
* A simple directory implementation using a B - tree ; NOTE this module safe to open . Directories are one of the main objects we deal with . We implement a directory as a map from name ( string , max length 256 bytes ) to entry ( file , directory or symlink ) . Of course , this uses an underlying B - t...
55d8b04fb4204fd3b403063589e56eadcd442321e5cf29ad9a0b0c14202dbf0a
brendanhay/amazonka
ResponseTimeRootCauseEntity.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/ResponseTimeRootCauseEntity.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated | A collection of segments and corresponding subsegments associated to a response time warning. /See:/ 'newResponseTimeRootCauseEntity' smart constructor. | The type and messages of the exceptions. | The name of the entity. |...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Mo...
10309f972c6bcd680a351c4e50231804c523ba9d12d180328e61a5660a6879bb
hjcapple/reading-sicp
exercise_3_25_b.scm
#lang sicp P187 - [ 练习 3.25 - 解法 b ] 递归解法,沿用二维表格思路。当插入 ( list ' key1 ' key2 ' key3 ) value 时,可能会递归创建子表格 。 ; 但这种递归解法有缺陷。 ; 比如下面代码就会让程序崩溃 ; (define t (make-table)) ( insert ! ' a 1000 t ) ( insert ! ( list ' a ' b ) 1000 t ) 先插入了 key = ' a 这条记录。当插入 keys = ( list ' a ' b ) 时,因为 ' a 记录已经存在。程序会错误地将 ' a 记录当成...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_25_b.scm
scheme
但这种递归解法有缺陷。 比如下面代码就会让程序崩溃 (define t (make-table)) 子表格,再在其中寻找 'b 记录。但实际上 key = 'a 对应的记录是 1000,而非子表格。 而这段代码 (define t (make-table)) 就会错误地冲掉 keys = (list 'a 'b) 的记录。因为第二条语句,会将 key = 'a 的记录直接修改成 1000,这样就丢失了原来的子表格。 要统一处理两者会很麻烦,甚至是不可能的。 这种解法,虽然可以传入不同个数的 keys。但同一个表格中每个 keys 的个数最好相同,不适合在同一个表格中混用不同个数的 keys。 判断记录或者子表格。...
#lang sicp P187 - [ 练习 3.25 - 解法 b ] 递归解法,沿用二维表格思路。当插入 ( list ' key1 ' key2 ' key3 ) value 时,可能会递归创建子表格 。 ( insert ! ' a 1000 t ) ( insert ! ( list ' a ' b ) 1000 t ) 先插入了 key = ' a 这条记录。当插入 keys = ( list ' a ' b ) 时,因为 ' a 记录已经存在。程序会错误地将 ' a 记录当成是 ( insert ! ( list ' a ' b ) 1000 t ) ( insert !...
75170d852bf0fd7550b5b7cc40497f25471cd3ce420dcfb292067c86d4f1c513
charlieg/Sparser
extended-vr.lisp
;;; -*- Package: co; Mode: LISP; Syntax: Common-lisp -*- (in-package :co) ;;; BBN Technologies ;;; A Division of BBN Corporation ;;; Copyright ;;; All Rights Reserved 1999 ;;; ;; ASSUMING THAT ALL FORMULAE ARE IN CONJUNCTIVE NORMAL FORM !!! ;; Determine whether some complex vr R1 is less...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/lisp/sfl/extended-vr.lisp
lisp
-*- Package: co; Mode: LISP; Syntax: Common-lisp -*- A Division of BBN Corporation Copyright All Rights Reserved ASSUMING THAT ALL FORMULAE ARE IN CONJUNCTIVE NORMAL FORM !!! Determine whether some complex vr R1 is less restrictive than (or equivalent to) some other complex vr R2. Return LE...
(in-package :co) BBN Technologies 1999 EQUIVALENT if R1 and R2 are equally restrictive (defun compare-simple-term (r1 r2 &aux concept1 concept2 comp-fn) for the ordered pair defined by the two predicates -- see DEFINE - COMPARISON - FUNCTIONS (flet ((negationp (form) (and (listp form) (member ...
4ed690e3fe5f9cdf0d0841e7d462a5db051fd19d24ec6ca601a4d78106a53361
cedlemo/OCaml-GI-ctypes-bindings-generator
Check_menu_item.ml
open Ctypes open Foreign type t = unit ptr let t_typ : t typ = ptr void let create = foreign "gtk_check_menu_item_new" (void @-> returning (ptr Widget.t_typ)) let create_with_label = foreign "gtk_check_menu_item_new_with_label" (string @-> returning (ptr Widget.t_typ)) let create_with_mnemonic = foreign "gtk_ch...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Check_menu_item.ml
ocaml
open Ctypes open Foreign type t = unit ptr let t_typ : t typ = ptr void let create = foreign "gtk_check_menu_item_new" (void @-> returning (ptr Widget.t_typ)) let create_with_label = foreign "gtk_check_menu_item_new_with_label" (string @-> returning (ptr Widget.t_typ)) let create_with_mnemonic = foreign "gtk_ch...
6d103913c7a8187aed872dda334fae9f49c33220bd0b07b49eaacd8c5496b944
input-output-hk/hydra
Configuration.hs
module Hydra.Ledger.Cardano.Configuration ( module Hydra.Ledger.Cardano.Configuration, Ledger.Globals, Ledger.LedgerEnv, ) where import Hydra.Cardano.Api import Hydra.Prelude import qualified Cardano.Ledger.BaseTypes as Ledger import qualified Cardano.Ledger.Shelley.Genesis as Ledger import qualified Cardano.Le...
null
https://raw.githubusercontent.com/input-output-hk/hydra/9f4ea7818e77b6e3c1912228690dd52fe4bcb6e6/hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs
haskell
* Helpers * Globals FIXME: We should not need the shelley genesis as the Ledger.Globals are irrelevant (e.g. active slot coefficient) or can be derived from chain config (e.g. networkId). Consequence of this would be less configuration for the hydra-node (only protocol-parameters). NOTE: This is used by the ledg...
module Hydra.Ledger.Cardano.Configuration ( module Hydra.Ledger.Cardano.Configuration, Ledger.Globals, Ledger.LedgerEnv, ) where import Hydra.Cardano.Api import Hydra.Prelude import qualified Cardano.Ledger.BaseTypes as Ledger import qualified Cardano.Ledger.Shelley.Genesis as Ledger import qualified Cardano.Le...
45a9249250a10a3e9df430e24f69ea4f13d068d36113b60c0bb69dd6c7bdc6cb
spurious/sagittarius-scheme-mirror
json.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; text/json.scm - JSON utilities ;;; Copyright ( c ) 2017 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistribution...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/text/json.scm
scheme
coding : utf-8 -*- text/json.scm - JSON utilities Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditio...
Copyright ( c ) 2017 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (text json) (export :all) (import ...
2eff6cbb2981e97ad47d4c05d46512d67edee6272770d894088ce9af3919d557
zgbjgg/dasherl
dasherl_router_SUITE.erl
-module(dasherl_router_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([all/0, init_per_suite/1, end_per_suite/1]). -export([test_dasherl_router_add/1, test_dasherl_router_remove/1, test_dasherl_router_list/1]). all() -> [test_dasherl_router_add, ...
null
https://raw.githubusercontent.com/zgbjgg/dasherl/78c0345bded3ef263d276774fcb308976056d227/test/dasherl_router_SUITE.erl
erlang
-module(dasherl_router_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([all/0, init_per_suite/1, end_per_suite/1]). -export([test_dasherl_router_add/1, test_dasherl_router_remove/1, test_dasherl_router_list/1]). all() -> [test_dasherl_router_add, ...
7683e9999bb6f51ec3ffbb56912af5bc5a8a47f313bb04a74421615e1e2386eb
thephoeron/quipper-language
Generic.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE ...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/quipper/Quipper/Generic.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== # LANGUAGE TypeSynonymInstances # # LANGUAGE Rank2Types # | This module provides functions and operators that are \"generic\" on quant...
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # any quantum d...
71f64b10df01816787e2b42280a8f4c66187cbeee42b8bc1e010c420d419ab2a
evdubs/zacks-estimates-financial-statements
estimate-extract.rkt
#lang racket/base (require db gregor net/http-easy racket/cmdline racket/file racket/list racket/port tasks threading) (define (download-estimates symbol) (make-directory* (string-append "/var/tmp/zacks/estimates/" (~t (today) "yyyy-MM-dd"))) ...
null
https://raw.githubusercontent.com/evdubs/zacks-estimates-financial-statements/5c2519440a42821a725cd4086b4bb377ad2b5872/estimate-extract.rkt
racket
add a final task that will halt the task server
#lang racket/base (require db gregor net/http-easy racket/cmdline racket/file racket/list racket/port tasks threading) (define (download-estimates symbol) (make-directory* (string-append "/var/tmp/zacks/estimates/" (~t (today) "yyyy-MM-dd"))) ...
9a296c4148f7d802d8ee9540066542d2118af5b83c03f1b894d3098759760fc6
bitemyapp/fp-course
MonadSpec.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # module Course.MonadSpec where import Test.Hspec (Spec, describe, it, shouldBe) import Course.Core import Course.ExactlyOne (ExactlyOne (..)) import Course.List (List (..)) import ...
null
https://raw.githubusercontent.com/bitemyapp/fp-course/a9a325cd895a0953151ec3d02f40006eb7993fb8/test/Course/MonadSpec.hs
haskell
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # module Course.MonadSpec where import Test.Hspec (Spec, describe, it, shouldBe) import Course.Core import Course.ExactlyOne (ExactlyOne (..)) import Course.List (List (..)) import ...
12566783793c764d67502a852ca52374c2300209a5d0081fb6bea4f334d39bfa
fluree/fluree.cli
core.clj
(ns fluree.ledger.core (:require [fluree.ledger.flake :as flake] [fluree.ledger.constants :as constants] [fluree.crypto :as crypto] [abracad.avro :as avro] [clojure.java.io :as io] [cheshire.core :as cjson] [clojure.string :as str] [f...
null
https://raw.githubusercontent.com/fluree/fluree.cli/ba7e8410f8d782b2cbc285ce4469276f3b59a7ed/src/fluree/ledger/core.clj
clojure
matches just the last */* from full path get direct directories of network directories string full path names pull out just the ledger name (i.e. some/ledger ) only glob matches (println "blocks: " (pr-str blocks)) sort inputs list of continuous comparison values genesis block doesn't have a command to calc fro...
(ns fluree.ledger.core (:require [fluree.ledger.flake :as flake] [fluree.ledger.constants :as constants] [fluree.crypto :as crypto] [abracad.avro :as avro] [clojure.java.io :as io] [cheshire.core :as cjson] [clojure.string :as str] [f...
db2fcc3f7599f1d9a0e519b902482d79171071a3b13cb9631435ab4900bc1741
rm-hull/project-euler
primes.clj
(ns util.primes) (defn gcd "Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two integers, also known as the greatest common factor (GCF) or highest common factor (HCF). It is named after the Greek mathematician Euclid, who described it in Books VII and X of his...
null
https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/util/primes.clj
clojure
(ns util.primes) (defn gcd "Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two integers, also known as the greatest common factor (GCF) or highest common factor (HCF). It is named after the Greek mathematician Euclid, who described it in Books VII and X of his...
da9985f4d6de8f888ba968d62d907f9c18597a59d99878461babef64762c5640
rabbitmq/rabbitmq-external-exchange
rabbit_external_exchange.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-external-exchange/4b7c872267ebc7d1fee7d310c9b2c2a1c6ca142e/src/rabbit_external_exchange.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2013 VMware , Inc. All rights reserved . -module(rabbi...
4b7383b65f84f3138f7b8cfed7ed3febaf530e96a7a3f684fc929129a1ccaf1f
TheInnerLight/dormouse
Json.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Dormouse.Client.Generators.Json ( genJsonValue , JsonGenRanges(..) ) where import qualified Data.Aeson as A import qualified Data.Aeson.Key as AK import qualified Data.Scientific as S import qualified Data.Vector as V import Hedgehog import qualified Hedgehog.Ge...
null
https://raw.githubusercontent.com/TheInnerLight/dormouse/0c73017826e13a99bbb279bba1d77242b32c8c90/dormouse-client/test/Dormouse/Client/Generators/Json.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # module Dormouse.Client.Generators.Json ( genJsonValue , JsonGenRanges(..) ) where import qualified Data.Aeson as A import qualified Data.Aeson.Key as AK import qualified Data.Scientific as S import qualified Data.Vector as V import Hedgehog import qualified Hedgehog.Ge...