_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
0d917894a4a6eb965cb737ed6d4366eeeb021408eec4b84c247149c2b22b6e0d
sneerteam/sneer
convo_summarization_test.clj
(ns sneer.convo-summarization-test (:require [midje.sweet :refer :all] [clojure.core.async :refer [chan close!]] [sneer.async :refer [sliding-chan]] [sneer.commons :refer [submap?]] [sneer.test-util :refer [<!!? >!!? <emits closes tmp-file]] [sneer.integrati...
null
https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/test/clojure/sneer/convo_summarization_test.clj
clojure
(ns sneer.convo-summarization-test (:require [midje.sweet :refer :all] [clojure.core.async :refer [chan close!]] [sneer.async :refer [sliding-chan]] [sneer.commons :refer [submap?]] [sneer.test-util :refer [<!!? >!!? <emits closes tmp-file]] [sneer.integrati...
1df7f34989bdbe11b73c632763a1126c7d3f9c3d58aa50a4cd95d48d2adf88e7
input-output-hk/plutus-apps
TxOutBalance.hs
{-# LANGUAGE DerivingVia #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MonoLocalBinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # module Plutus.ChainIndex.TxOutBalance where import Control.Len...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/252574b2678c6cb9c717dec0bba7a0fc2493a392/plutus-chain-index-core/src/Plutus/ChainIndex/TxOutBalance.hs
haskell
# LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # | Given the current block, compute the status for the given transaction output by getting the state of the transaction that produced it and checking if the output is spent or unspent. ^ Current block number for inspecting the state of the transac...
# LANGUAGE FlexibleInstances # # LANGUAGE MonoLocalBinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # module Plutus.ChainIndex.TxOutBalance where import Control.Lens (view) import Data.Map qualified as Map import Data.Set (Set) import Data.Se...
9a528dac5656c48b5f557e35638f633cbb9bea24332fc88ea0f55299b34fbcf6
fishcakez/sbroker
sregulator_statem_valve_statem.erl
%%------------------------------------------------------------------- %% Copyright ( c ) 2016 , < > %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file %% except in compliance with the License. You may obtain %% a copy of the License at %% %% -2.0 ...
null
https://raw.githubusercontent.com/fishcakez/sbroker/10f7e3970d0a296fbf08b1d1a94c88979a7deb5e/test/sregulator_statem_valve_statem.erl
erlang
------------------------------------------------------------------- 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, KIND, either express or implied. See the Lic...
Copyright ( c ) 2016 , < > This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(sregulator_statem_valve_statem). -include_lib("proper/include/proper.hrl"). -export([module/0]). -...
61d279193aef7f9cd4221ad040dc758a1b23c8e0ec1cc05123b080124f3f55b1
jessealama/laramie
data.rkt
#lang racket/base (require racket/require (multi-in ".." ("types.rkt" "tokenize.rkt" "tokens.rkt"))) (module+ test (require rackunit racket/format syntax/parse/define)) (module+ test (define-simple-macro (check-it test-name...
null
https://raw.githubusercontent.com/jessealama/laramie/89dee24f6977d668ee1e1ae958c5644d1d15be2c/laramie-lib/laramie/tokenizer/tests/data.rkt
racket
string intact , no error ) ) ))
#lang racket/base (require racket/require (multi-in ".." ("types.rkt" "tokenize.rkt" "tokens.rkt"))) (module+ test (require rackunit racket/format syntax/parse/define)) (module+ test (define-simple-macro (check-it test-name...
de4d6ff988b43683f53792042cfa655a1c6d7d96b4e4609a703ea35e18c7e027
stalefruits/aufi
rate.clj
(ns aufi.ring.middlewares.rate (:require [clojure.tools.logging :refer [warnf]])) # # Initialize (def ^:private defaults {:period 5000 :rate 10}) (defn- initialize-counter "Initialize counter structure." [opts] (atom (merge defaults (select-keys opts [:period :rate]) {:since 0 ...
null
https://raw.githubusercontent.com/stalefruits/aufi/def535f9ef958e6ea7273a19524e8f12c832bd59/src/aufi/ring/middlewares/rate.clj
clojure
## Count ## Response
(ns aufi.ring.middlewares.rate (:require [clojure.tools.logging :refer [warnf]])) # # Initialize (def ^:private defaults {:period 5000 :rate 10}) (defn- initialize-counter "Initialize counter structure." [opts] (atom (merge defaults (select-keys opts [:period :rate]) {:since 0 ...
d4c7d35cb4317fab8807a4a6fe42d23286e725329bb46dde1c80234d012f0a05
graninas/The-Amoeba-World
StateInjectionTest.hs
# LANGUAGE TemplateHaskell # module Main where import Test.QuickCheck import Test.QuickCheck.All import Control.Monad.State import Control.Monad import System.Random data Context = Context { ctxNextId1 :: State Context Int , ctxNextId2 :: State Context Int } -- Client code. Knows nothing ab...
null
https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/Test/Experiments/StateInjection/StateInjectionTest.hs
haskell
Client code. Knows nothing about random gens, but uses external state. The state, which will be injected into client code.
# LANGUAGE TemplateHaskell # module Main where import Test.QuickCheck import Test.QuickCheck.All import Control.Monad.State import Control.Monad import System.Random data Context = Context { ctxNextId1 :: State Context Int , ctxNextId2 :: State Context Int } getNextId1 = get >>= ctxNextId1 ...
1fd5d45c79f8b68bb0a8de857ca4243555679abf0f6530321d0e838c2ea78620
matijapretnar/eff
jseff.ml
open Utils open Js_of_ocaml let js_formatter _format echo = let buffer = ref "" in let out s p n = buffer := !buffer ^ String.sub s p n in let flush () = (Js.Unsafe.fun_call echo [| Js.Unsafe.inject (Js.string !buffer) |] : unit); buffer := "" in Format.make_formatter out flush module Shell = Loader...
null
https://raw.githubusercontent.com/matijapretnar/eff/d1a0405ed6c1ffe4ceb872d05994ac817300d9fd/src/jseff/jseff.ml
ocaml
open Utils open Js_of_ocaml let js_formatter _format echo = let buffer = ref "" in let out s p n = buffer := !buffer ^ String.sub s p n in let flush () = (Js.Unsafe.fun_call echo [| Js.Unsafe.inject (Js.string !buffer) |] : unit); buffer := "" in Format.make_formatter out flush module Shell = Loader...
717950808fc975daa8826e0bb81e4d78734a350ff295805332891c48e963cf9e
ocsigen/obrowser
char.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/rt/caml/char.mli
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 $ I d : char.mli 7164 2005 - 10 - 25 ...
a2bd75bc61e2ce3b5fc4af3d8b27871c7346a6bc8bf4358e5816e5047c7c1443
dradtke/Lisp-Text-Editor
string.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; string.lisp --- UTF8 string operations for CFFI ;;; ;;; Copyright ( C ) 2007 , < > ;;; (in-package #:cffi-object) (define-foreign-type gtk-string () () (:actual-type :pointer) (:simple-parser gtk-string)) (defun string->ptr (value) "string -> fore...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/cffi/string.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*-
string.lisp --- UTF8 string operations for CFFI Copyright ( C ) 2007 , < > (in-package #:cffi-object) (define-foreign-type gtk-string () () (:actual-type :pointer) (:simple-parser gtk-string)) (defun string->ptr (value) "string -> foreign pointer char*" (typecase value (null (null-pointer)) ...
e369f4cf1b20bc0e6f8b46fb5973b2c6bb8bae24ce2d969f771410104c354890
lfe/lfe
lfe_bits.erl
Copyright ( c ) 2011 - 2020 %% 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...
null
https://raw.githubusercontent.com/lfe/lfe/dbfd16af065b12d2dbce26ff1fbad151765243fd/src/lfe_bits.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2011 - 2020 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , File : lfe_bits.erl Author : -module(lfe_bits). -export([parse_bitspecs/1,get_bitspecs/1]). -import(lists, [foldl/3]). -record(s...
4cbaf07ffd0c9c5ef99cc3e1fbab6333330fce1cf3a272483ce5736692cef649
bitemyapp/esqueleto
Test.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module SQLite.Test where import Common.Test.Import hiding (from, on) import Control.Monad (void) import Control.Monad.Logger (runNoLoggingT, runStderrLoggingT) impor...
null
https://raw.githubusercontent.com/bitemyapp/esqueleto/34047e1f5f7c06c0aa09f1c3069dffc9b4faffff/test/SQLite/Test.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module SQLite.Test where import Common.Test.Import hiding (from, on) import Control.Monad (void) import Control.Monad.Logger (runNoLoggingT, runStderrLoggingT) import Database.Esqueleto.Legacy hiding (random_) import Database.Es...
f3da2737833fcb46e6d93ed3aa1c8af2b05ccd1cf60ab7e1e386f01b753c358a
pentlandedge/s4607
hrr_exist_mask.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright 2016 Pentland Edge Ltd. %% 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 %% %% Un...
null
https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/src/hrr_exist_mask.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Copyright 2016 Pentland Edge Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(hrr_exist_mask). -export([ decode/1, encode/1, new/1, display/1, get_revisit_index/1, ge...
3f2da4f282e9cfa0ea8781d197e29f8a790a405c79df0a847f61fa3b6e0049c9
tek/helic
Helic.hs
|A clipboard management CLI tool built with Polysemy , Servant and GI.Gtk . module Helic ( -- $intro -- -- * Effects -- ** Agent Agent, AgentTag, Agents, -- ** XClipboard XClipboard, -- ** Gtk Gtk, -- ** GtkMain GtkMain, * * GtkClipboard, -- * Interpreters interpretAgentNet, inte...
null
https://raw.githubusercontent.com/tek/helic/055b2ffa063936ad4ae6249c9e6e0603482baaa9/packages/helic/lib/Helic.hs
haskell
$intro * Effects ** Agent ** XClipboard ** Gtk ** GtkMain * Interpreters * Data * Utilities $intro
|A clipboard management CLI tool built with Polysemy , Servant and GI.Gtk . module Helic ( Agent, AgentTag, Agents, XClipboard, Gtk, GtkMain, * * GtkClipboard, interpretAgentNet, interpretAgentX, interpretAgentTmux, interpretXClipboardGtk, interpretGtk, interpretGtkMain, handleGtkMain,...
dc43bed79f7a8c282d18d577bd52768e03c857acb40c3a72b437885211cda7ef
nbloomf/webdriver-w3c
Config.hs
| Module : Test . Tasty . WebDriver . Config Description : Helpers for parsing config files . Copyright : 2018 , Automattic , Inc. License : GPL-3 Maintainer : ( ) Stability : experimental Portability : POSIX Module : Test.Tasty.WebDriver.Config Description : Helpers for par...
null
https://raw.githubusercontent.com/nbloomf/webdriver-w3c/e48dbd65597631c694e039dde493ca02333a3a4a/src/Test/Tasty/WebDriver/Config.hs
haskell
# LANGUAGE RecordWildCards, OverloadedStrings # * Parsing | Remote end name. | Pool of remote end connections per driver. | Push a remote end to the pool stack for a given driver. | Attempt to pop a remote end from the pool stack for a given driver. Returns the new pool, whether or not a remote end was popped. Ret...
| Module : Test . Tasty . WebDriver . Config Description : Helpers for parsing config files . Copyright : 2018 , Automattic , Inc. License : GPL-3 Maintainer : ( ) Stability : experimental Portability : POSIX Module : Test.Tasty.WebDriver.Config Description : Helpers for par...
e7f8747220fc834685997d35ebf657f4671415d844e8686613e49bd37da56cb0
cbaggers/daft
region-predicates.lisp
(in-package :daft) ;;------------------------------------------------------------ (defun in-screen-p (&optional (actor *self*)) ;; TODO: WAT! ↓↓↓↓↓↓ (and (< (y (%pos actor)) 400) (> (y (%pos actor)) -400) (< (x (%pos actor)) 400) (> (x (%pos actor)) -400))) (defun in-world-p (&optional (acto...
null
https://raw.githubusercontent.com/cbaggers/daft/62c4b8b883469eb121b55403b6afabad5052b204/src/user-api/region-predicates.lisp
lisp
------------------------------------------------------------ TODO: WAT! ↓↓↓↓↓↓ TODO: WAT! ↓↓↓↓↓↓ ------------------------------------------------------------
(in-package :daft) (defun in-screen-p (&optional (actor *self*)) (and (< (y (%pos actor)) 400) (> (y (%pos actor)) -400) (< (x (%pos actor)) 400) (> (x (%pos actor)) -400))) (defun in-world-p (&optional (actor *self*)) (and (< (y (%pos actor)) 1024) (> (y (%pos actor)) -1024) (...
fd67944aa71173ddf6ed145f695d17a7771d4fd14e23778649401e8ce1c622a3
bjorng/wings
wings_shapes.erl
%% %% wings_shapes.erl -- %% %% This module contains definition of all primitive shapes that can be created , such as Cube , Sphere , %% and Grid. %% Copyright ( c ) 2001 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/src/wings_shapes.erl
erlang
wings_shapes.erl -- This module contains definition of all primitive and Grid. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. The string below is intentionally not translated. The string below is intentionally not tr...
shapes that can be created , such as Cube , Sphere , Copyright ( c ) 2001 - 2011 -module(wings_shapes). -export([menu/2,command/2]). -export([transform_obj_dlg/0, transform_obj/4, transform_obj/2]). -export([tri_sphere/1, tri_cube/1, tri_disc/1]). -include("wings.hrl"). -import(lists, [map/2,seq/2,seq/3])....
5bb094b76897dbee8e56d439967dc363d9448bdb3c95573d2a455727c50ae928
andrejbauer/coop
runtime.ml
type environment = { env_vars : Value.t list ; env_container : Value.container } type error = | InvalidDeBruijn of int | UnhandledOperation of Name.t | UnhandledSignal of Name.t | UnhandledException of Name.t | UnknownExternal of string | IllegalRenaming of Name.t | IllegalComparison of Value.t...
null
https://raw.githubusercontent.com/andrejbauer/coop/173d0889795c55a370f79fb42425b77a5c0c8464/src/runtime.ml
ocaml
* Extend the variables with a variable * Comparison of values ** Auxiliary ** * Exception handler part which reraises every expresions, user mode * Exception handler part which reraises every expresions, kernel mode * Lookup an exception, to be used in a [with] clause. * Lookup an exception, to be used in a [final...
type environment = { env_vars : Value.t list ; env_container : Value.container } type error = | InvalidDeBruijn of int | UnhandledOperation of Name.t | UnhandledSignal of Name.t | UnhandledException of Name.t | UnknownExternal of string | IllegalRenaming of Name.t | IllegalComparison of Value.t...
b420a99762b9d6602d1b816b8cb6f4305354ddbb27ec807175c51bba381e97c3
schell/gelatin
Renderer.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE JavaScriptFFI # {-# LANGUAGE LambdaCase #-} # LANGUAGE PartialTypeSignatures # # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # module Gelatin.WebGL.Renderer where import Control.Concurrent ...
null
https://raw.githubusercontent.com/schell/gelatin/04c1c83d4297eac4f4cc5e8e5c805b1600b3ee98/gelatin-webgl/src/Gelatin/WebGL/Renderer.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Setup and underlying machinery ------------------------------------------------------------...
# LANGUAGE JavaScriptFFI # # LANGUAGE PartialTypeSignatures # # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # module Gelatin.WebGL.Renderer where import Control.Concurrent (threadDelay) import Control.Concurrent.STM import System.E...
be8f101c869a6f356aef3baceed6e09f6768e97ad9d6b53eb27c617fd53be2e4
alexandroid000/improv
GetPlanResponse.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Nav_msgs.GetPlanResponse where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBina...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Nav_msgs/Ros/Nav_msgs/GetPlanResponse.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Nav_msgs.GetPlanResponse where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import qualified GHC.Generics as G i...
f025f78d634ac1dfcba8bdac7577bbf9ed370f68f51b87cfcea8499a5478992a
binaryage/chromex
display.clj
(ns chromex.ext.system.display "Use the system.display API to query display metadata. * available since Chrome 36 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/system/display.clj
clojure
-- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------...
(ns chromex.ext.system.display "Use the system.display API to query display metadata. * available since Chrome 36 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-...
98e225fed2aeabf0fd6595e7810d7b5a31f0a8c14d333cf841fda4ef0100c679
slime/slime
gray.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; swank-gray.lisp stream based IO redirection . ;;; Created 2003 ;;; ;;; This code has been placed in the Public Domain. All warranties ;;; are disclaimed. ;;; (in-package swank/backend) #.(progn (defvar *gray-stream-symbols* '(fundamental-character-outp...
null
https://raw.githubusercontent.com/slime/slime/5e8fc7cad5ae7dc19b434c559ebaee3185d80b98/swank/gray.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- This code has been placed in the Public Domain. All warranties are disclaimed. buffer write lock. Another alternative would be to grab the world-lock here, but that's less future-proof, and could introduce other lock-ordering issues in the future.
swank-gray.lisp stream based IO redirection . Created 2003 (in-package swank/backend) #.(progn (defvar *gray-stream-symbols* '(fundamental-character-output-stream stream-write-char stream-write-string stream-fresh-line stream-force-output stream-finish-output fundame...
104aa10387e5505b41c9ed6dcaaadbca94f7659e4f0320b22d2fd2ca1c5253c3
tweag/ormolu
record.hs
module Main where -- | Something. data Foo = Foo { fooX :: Int -- ^ X , fooY :: Int -- ^ Y , fooBar, fooBaz :: NonEmpty (Identity Bool) -- ^ BarBaz , fooGag, fooGog :: NonEmpty (Indentity Bool) -- ^ GagGog , fooFoo , barBar :: Int -- ^ Huh! } deriving (Eq, Show)...
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/data/record.hs
haskell
| Something. ^ X ^ Y ^ BarBaz ^ GagGog ^ Huh!
module Main where data Foo = Foo , fooGag, fooGog :: NonEmpty (Indentity Bool) , fooFoo } deriving (Eq, Show)
277bfad5d62a58742b1bf66f2073cd00e959da4b19565c96ac5d2c85e05af23b
spurious/sagittarius-scheme-mirror
%3a49.scm
;; how should we test this? #!compatible #!reader=srfi/:49 (import (rnrs) (srfi :49) (srfi :64)) (test-begin "SRFI-49 tests") (test-assert "srfi-49-load" (srfi-49-load (string-append (current-directory) "/test/data/srfi-49-test.scm"))) (test-equal "srfi-49-read" '(let ((foo (+ 1 2)) (bar (+ 3 4))) (...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/srfi/%253a49.scm
scheme
how should we test this?
#!compatible #!reader=srfi/:49 (import (rnrs) (srfi :49) (srfi :64)) (test-begin "SRFI-49 tests") (test-assert "srfi-49-load" (srfi-49-load (string-append (current-directory) "/test/data/srfi-49-test.scm"))) (test-equal "srfi-49-read" '(let ((foo (+ 1 2)) (bar (+ 3 4))) (+ foo bar)) (srfi-49-re...
729074f88d8699d606d669044eee7063cea5a2490a8c7ba25b64c958bf802c09
kelamg/HtDP2e-workthrough
ex314.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-intermediate-lambda-reader.ss" "lang")((modname ex314) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex314.rkt
racket
about the language level of this file in a form that our tools can easily process. Oldest Generation: Middle Generation: Youngest Generation: An FF is [List-of FF] interpretation a family forest represents several families (say, a town) and their ancestor trees FT -> Boolean does an-ftree contain a child str...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex314) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct no-parent []) (define NP (make-no-paren...
933665a647104d398cc731ac34d469f8070829fa494e49c61b00e1f1221cc768
avsm/eeww
main.ml
open Eio.Std let load_config () = (* A real system would load the file and then pass it to the running service somehow, but we're just demonstrating signal handling so just sleep to simulate some time taken to load the new configuration. *) Eio_unix.sleep 2.0 (* $MDX part-begin=main *) let main ~config_...
null
https://raw.githubusercontent.com/avsm/eeww/684af99c194ff082836dbb1ada05c8a023dbd844/lib/eio/examples/signals/main.ml
ocaml
A real system would load the file and then pass it to the running service somehow, but we're just demonstrating signal handling so just sleep to simulate some time taken to load the new configuration. $MDX part-begin=main We could cancel the loading fiber now, in case it's still running, but ...
open Eio.Std let load_config () = Eio_unix.sleep 2.0 let main ~config_changed = while true do Fiber.both (fun () -> First , we start waiting for SIGHUP . This is so that if we get SIGHUP before we finish loading the old configuration then we 'll start again . Th...
676566667e060392d6260ce51313c3c49c98b311b573566bcc7d2364c4aac682
ghc/nofib
RandomFix.hs
This module implements a ( good ) random number generator . The June 1988 ( v31 # 6 ) issue of the Communications of the ACM has an article by called , " Efficient and Portable Combined Random Number Generators " . Here is the Portable Combined Generator of L'Ecuyer for 32 - bit computers ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/scs/RandomFix.hs
haskell
This module implements a ( good ) random number generator . The June 1988 ( v31 # 6 ) issue of the Communications of the ACM has an article by called , " Efficient and Portable Combined Random Number Generators " . Here is the Portable Combined Generator of L'Ecuyer for 32 - bit computers ...
ba4f01f9220df06604f131905d27b6e71e7cb34c7a799cb07cb9a6a627bf52e5
jasonstolaruk/CurryMUD
Hierarchy.hs
module Mud.Data.State.Util.Hierarchy where import Mud.Data.State.MudData import Mud.Data.State.Util.Get conTypes :: [Type] conTypes = [ ConType, CorpseType ] entTypes :: [Type] entTypes = objTypes ++ mobTypes objTypes :: [Type] objTypes = [ ArmType, ClothType, FoodType, LightType, ObjType, VesselType, WpnType, Writ...
null
https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Data/State/Util/Hierarchy.hs
haskell
--- ---
module Mud.Data.State.Util.Hierarchy where import Mud.Data.State.MudData import Mud.Data.State.Util.Get conTypes :: [Type] conTypes = [ ConType, CorpseType ] entTypes :: [Type] entTypes = objTypes ++ mobTypes objTypes :: [Type] objTypes = [ ArmType, ClothType, FoodType, LightType, ObjType, VesselType, WpnType, Writ...
057335887b0eaeaf6013f527cb0865472518250c65315c87c73765e0b94b6ded
digitallyinduced/ihp-blog-example-app
Show.hs
module Web.View.Comments.Show where import Web.View.Prelude data ShowView = ShowView { comment :: Comment } instance View ShowView where html ShowView { .. } = [hsx| <nav> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href={CommentsAction}>Comments</a></li> ...
null
https://raw.githubusercontent.com/digitallyinduced/ihp-blog-example-app/a79824f2587701f537487d86d514b86dae9f6834/Web/View/Comments/Show.hs
haskell
module Web.View.Comments.Show where import Web.View.Prelude data ShowView = ShowView { comment :: Comment } instance View ShowView where html ShowView { .. } = [hsx| <nav> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href={CommentsAction}>Comments</a></li> ...
9765bca2241338ba33a4c12016b235cd50ff7474e1795cd599b9f8b8820b3008
vouillon/osm
highway.ml
OSM tools * Copyright ( C ) 2013 * * 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 , with linking exception ; * either version 2.1 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/vouillon/osm/5b06ed6fc6c508b8187209628cf02129a119b50a/osm/highway.ml
ocaml
** XXX Duplicated code... ** ** let identity = stream "highway" "way/id" in XXX Not sure this is correct when we have ways with no node... Format.eprintf "%d %d %d %d %d@." lon lat lon' lat' dist; ************************************************************** ** Format.eprintf "%d <-> %d@." i0 o0;
OSM tools * Copyright ( C ) 2013 * * 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 , with linking exception ; * either version 2.1 of the License , or ( at your opti...
a099638ae5ffd878a218834f662ae8860f72cc4bc90bf8ab567b5f552cdf7f3b
williamleferrand/accretio
object_payment.ml
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
null
https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/graph/object_payment.ml
ocaml
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
ab129d6f3777fafa6eae8db93a4f9b1d8437a650253b19544c2fcc77243b3c52
rowangithub/DOrder
nest-if.ml
let rec loopb i k n = if i < n then (assert (1 <= k); loopb (i+1) k n) else () let rec loopc i n = if i < n then loopc (i+1) n else () let rec loopa i k n = if k < n then (loopb 1 k n; if i < n then loopc 1 n else (); loopa i (k+1) n) else () let main i n = let k = 1 in loopa i k n ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/nest-if.ml
ocaml
let rec loopb i k n = if i < n then (assert (1 <= k); loopb (i+1) k n) else () let rec loopc i n = if i < n then loopc (i+1) n else () let rec loopa i k n = if k < n then (loopb 1 k n; if i < n then loopc 1 n else (); loopa i (k+1) n) else () let main i n = let k = 1 in loopa i k n ...
e3ba6feba3ab6030832824eb4ce1a51613342ee7491894a1e1cdf285a31dabdf
askvortsov1/nittany_market
buyer.ml
module Buyer = struct type t = { email : string; first_name : string; last_name : string; gender : string; age : int; home_address_id : string; billing_address_id : string; } [@@deriving fields, csv] type key = string type fields = (string * string * string * string) * (int * stri...
null
https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/lib/models/buyer.ml
ocaml
module Buyer = struct type t = { email : string; first_name : string; last_name : string; gender : string; age : int; home_address_id : string; billing_address_id : string; } [@@deriving fields, csv] type key = string type fields = (string * string * string * string) * (int * stri...
7fba7ea121a9f1747237029bc7abecaea52785a3e29fa2473ccbd121540203e3
herd/herdtools7
lexFmt.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/litmus/lexFmt.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2014 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
6137f2a085693d9c510f113bc447d1015cbab347aff184d632456213c16f5b41
dparis/phzr
core.cljs
(ns phzr.core) (defprotocol IPhaserObj (pset! [this k v])) (def ^:private blend-modes {:normal 0 :add 1 :multiply 2 :screen 3 :overlay 4 :darken 5 :lighten 6 :color_dodge 7 :color_burn 8 :hard_light 9 :soft_light 10 :difference 11 :exclus...
null
https://raw.githubusercontent.com/dparis/phzr/5a798f280a36db137d4e4576d6f324bfd3212112/src/phzr/core.cljs
clojure
(ns phzr.core) (defprotocol IPhaserObj (pset! [this k v])) (def ^:private blend-modes {:normal 0 :add 1 :multiply 2 :screen 3 :overlay 4 :darken 5 :lighten 6 :color_dodge 7 :color_burn 8 :hard_light 9 :soft_light 10 :difference 11 :exclus...
b8621d000b21e7242ee81a820436d5429101e288ee919ad72bf74623dc581981
drlivingston/kabob
abstraction_extending_rules.clj
;;;; Rules to generate bio constructs from drugbank targets obo / INO_0000002 ; interaction obo / MI_0000 ; psi - mi " molecular interaction " TODO the restrictions need to be properly reified `{:name "connect-GP-to-GorGP-abstraction" ;; this need to be hashed and have proper classes :head ((?/geneProduct rd...
null
https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/abstraction/abstraction_extending_rules.clj
clojure
Rules to generate bio constructs from drugbank targets interaction psi - mi " molecular interaction " this need to be hashed and have proper classes
TODO the restrictions need to be properly reified `{:name "connect-GP-to-GorGP-abstraction" :head ((?/geneProduct rdfs/subClassOf ?/gorgporv)) :body ((?/gene rdf/type kbio/GeneSpecificGClass) (?/gene [rdfs/subClassOf clojure.core/*] ?/gorgporv) (?/gorgporv rdf/type kbio/GeneSpecificGorGPorVClass) ...
d4ba63b85edc544fb8bb55c1daf917186111e23d6ae890227905f3dce8da647d
haskell/containers
IntMapValidity.hs
module IntMapValidity (valid) where import Data.Bits (xor, (.&.)) import Data.IntMap.Internal import Test.Tasty.QuickCheck (Property, counterexample, property, (.&&.)) import Utils.Containers.Internal.BitUtil (bitcount) {-------------------------------------------------------------------- Assertions ---------------...
null
https://raw.githubusercontent.com/haskell/containers/ff3d6af31ab6a27b7c3b8556d06ffc464d9bcb67/containers-tests/tests/IntMapValidity.hs
haskell
------------------------------------------------------------------- Assertions ------------------------------------------------------------------- Invariant: Prefix is the common high-order bits that all elements share to the left of the Mask bit. don't have the mask bit set; right is all the...
module IntMapValidity (valid) where import Data.Bits (xor, (.&.)) import Data.IntMap.Internal import Test.Tasty.QuickCheck (Property, counterexample, property, (.&&.)) import Utils.Containers.Internal.BitUtil (bitcount) | Returns true iff the internal structure of the IntMap is valid . valid :: IntMap a -> Property...
449e358a9e4c3e7bc6a9b576c7900c322de7c6c1ee1c4af1f28b3882b25c02bd
aeternity/aeternity
aec_consensus_common_tests.erl
-*- erlang - indent - level : 4 -*- %%% ------------------------------------------------------------------- ( C ) 2020 , Aeternity Anstalt %%% @doc Consensus module for common tests - used when we are only interested in the state transitions %%% @end %%% ------------------------------------------------------------...
null
https://raw.githubusercontent.com/aeternity/aeternity/c3cebf5c5d069c9d14191cddcc232c5ee344f196/apps/aecore/src/aec_consensus_common_tests.erl
erlang
------------------------------------------------------------------- @doc Consensus module for common tests - used when we are only interested in the state transitions @end ------------------------------------------------------------------- API Deserialization Building the Insertion Ctx Preconductor hook Dirty ...
-*- erlang - indent - level : 4 -*- ( C ) 2020 , Aeternity Anstalt -module(aec_consensus_common_tests). -export([]). -ifdef(TEST). -behavior(aec_consensus). -define(TAG, 1337). -export([ can_be_turned_off/0 , assert_config/1 , start/2 , stop/0 , is_providing_extra_http_endpoints...
23cc43a8525ccb30c05d0c3716f5c1c6a2753cc8602c36a6b58ab84553946aa2
emgrasmeder/clojenetics
trees_test.clj
(ns clojenetics.logics.trees-test (:require [clojure.test :refer :all] [clojenetics.logics.trees :as trees] [bond.james :as bond] [clojenetics.logics.terminals :as terminals] [clojenetics.logics.utils :as utils] [clojenetics.logics.setters :as setters] ...
null
https://raw.githubusercontent.com/emgrasmeder/clojenetics/6eb1986895e30c64b49ef6ea2b91db475a3f97a7/test/clojenetics/logics/trees_test.clj
clojure
(ns clojenetics.logics.trees-test (:require [clojure.test :refer :all] [clojenetics.logics.trees :as trees] [bond.james :as bond] [clojenetics.logics.terminals :as terminals] [clojenetics.logics.utils :as utils] [clojenetics.logics.setters :as setters] ...
2b2c7fa831e212c782b9681482a05f48478ba8aee55d1fc9929e2cb6fc5781a2
S8A/htdp-exercises
ex461.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-intermediate-lambda-reader.ss" "lang")((modname ex461) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex461.rkt
racket
about the language level of this file in a form that our tools can easily process. [Number -> Number] Number Number -> Number computes the area under the graph of f between a and b assume (< a b) holds Number Number Number Number -> Number Number Number Number Number -> Number Q: Does integrate-adaptive always ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex461) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define ε 0.01) (define (integrate-adaptive f a b) ...
62ea863a315e3e75cbf034ce2d7fffd4740af2c9783f5e5cca4a53dc06cc4bf6
janestreet/ecaml
key_sequence.mli
* A key sequence is a sequence of one or more input events that form a unit . Input events include characters , function keys , and mouse actions . [ ( Info - goto - node " ( elisp)Key Sequences " ) ] events include characters, function keys, and mouse actions. [(Info-goto-node "(elisp)Key Seque...
null
https://raw.githubusercontent.com/janestreet/ecaml/f97cb215b694e3d309e27d3d3eb3377738b212d3/src/key_sequence.mli
ocaml
* [(describe-function 'read-kbd-macro)] [(Info-goto-node "(elisp)Key Sequences")] [(Info-goto-node "(elisp)Decribing Characters")] Here are some example inputs: "C-c y" "C-M-q" "<f5>" "C-<f5>" "C-<right>" "<mouse-2>" "C-<down-mouse-3>" * [(describe-function 'execute-kbd-macro)...
* A key sequence is a sequence of one or more input events that form a unit . Input events include characters , function keys , and mouse actions . [ ( Info - goto - node " ( elisp)Key Sequences " ) ] events include characters, function keys, and mouse actions. [(Info-goto-node "(elisp)Key Seque...
d14dd511229fec4c65399c04ad950571c1221569f48505181dd19d797df10c32
informatimago/lisp
combination.lisp
-*- coding : utf-8 -*- ;;;;**************************************************************************** FILE : combination.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; ;;;; See defpackage documentation string. ;;;; <...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/cesarum/combination.lisp
lisp
**************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION See defpackage documentation string. LEGAL This program is free software: you can redistribute it and/or modify (at your option) any later version. ...
-*- coding : utf-8 -*- FILE : combination.lisp USER - INTERFACE : < PJB > < > MODIFICATIONS 2005 - 04 - 24 < PJB > Converted from BpCombi C++ classes . AGPL3 Copyright 2005 - 2016 it under the terms of the GNU Affero General Public License as published by th...
84083d04f12647fab17708b7491a2263c986a226fdb248bd31d768017fa87536
Kappa-Dev/KappaTools
domain_selection.ml
* domain_selection.ml * openkappa * , project Antique , INRIA Paris * * Creation : 2016 , the 30th of June * Last modification : Time - stamp : < Aug 22 2018 > * * Compute the relations between sites in the BDU data structures * * Copyright 2010,2011,2012,2013,2014,2015,201...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/reachability_analysis/domain_selection.ml
ocaml
* domain_selection.ml * openkappa * , project Antique , INRIA Paris * * Creation : 2016 , the 30th of June * Last modification : Time - stamp : < Aug 22 2018 > * * Compute the relations between sites in the BDU data structures * * Copyright 2010,2011,2012,2013,2014,2015,201...
8be91d39a5cae0d00ac66b7f4bb1985107e0eb9634f5dad0452694ce89fea031
well-typed/cborg
Decoding.hs
# LANGUAGE CPP # {-# LANGUAGE MagicHash #-} {-# LANGUAGE BangPatterns #-} # LANGUAGE RankNTypes # -- | -- Module : Codec.CBOR.Decoding Copyright : ( c ) 2015 - 2017 License : BSD3 - style ( see LICENSE.txt ) -- -- Maintainer : -- Stability : experimental Portability : non - por...
null
https://raw.githubusercontent.com/well-typed/cborg/00e9add7ac80829c575ac2466811d0f7b8948dbc/cborg/src/Codec/CBOR/Decoding.hs
haskell
# LANGUAGE MagicHash # # LANGUAGE BangPatterns # | Module : Codec.CBOR.Decoding Maintainer : Stability : experimental High level API for decoding values that were encoded with the "Codec.CBOR.Encoding" module, using a 'Monad' based interface. * Decode primitive operations ** Read input tokens :...
# LANGUAGE CPP # # LANGUAGE RankNTypes # Copyright : ( c ) 2015 - 2017 License : BSD3 - style ( see LICENSE.txt ) Portability : non - portable ( GHC extensions ) module Codec.CBOR.Decoding Decoder , DecodeAction(..) , liftST , getDecodeAction : : Decoder s Int32 : : Decoder ...
41726d5e0456bb8f84a7836160c822878ff1757768911c07c68c3f2878dab047
MLstate/opalang
base.mli
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/base.mli
ocaml
* {6 Guidelines} use module List e.g. * * * round a float with precision [10^(-i)] * windows stuff : \\r\\n * same as [invalid_arg (Printf.sprintf ...)] * * /!\ Unused alphabetic order
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
087f01e39f7b972664285df69e82cd67537ca991ca37d4b5ed388d5db3d770f2
Convex-Dev/convex-web
account.cljs
(ns convex-web.site.account (:require [convex-web.site.gui :as gui] [convex-web.site.gui.account :as guia] [convex-web.site.backend :as backend] [convex-web.site.session :as session] [convex-web.site.stack :as stack] [convex-web.site.command :as command] [convex-web.site.format :as format] [co...
null
https://raw.githubusercontent.com/Convex-Dev/convex-web/36dc8055366d34ed379f24be8e68e235ed05589b/src/main/clojure/convex_web/site/account.cljs
clojure
-- Fetch account if: - it's nil - it hasn't been fetched yet; - active address has changed - it's different from state account's address No active address Don't change `ajax/status` on resume to avoid showing the spinner - and don't bother about the error handler. -- Transfer Page 'From' defaults to active acc...
(ns convex-web.site.account (:require [convex-web.site.gui :as gui] [convex-web.site.gui.account :as guia] [convex-web.site.backend :as backend] [convex-web.site.session :as session] [convex-web.site.stack :as stack] [convex-web.site.command :as command] [convex-web.site.format :as format] [co...
75f9aa6c3c2284e0eaa20bc9d6e2ae479fa8543ae0791ad1e91de8cae8388ce9
hootener/How-do-you-that-in-Lisp-
TestSuite1.lisp
;; It is expected that your code has been saved to the file HowDoYouDoThatInLisp.lsp in the root dir of the C : drive . ;; If the file is saved elsewhere, change the ;; LOAD statement in the main test driver below. ;; test cube volume (defun test1 () (and zero case one case (equal (cube-volume 2 2 2) 8) ;corr...
null
https://raw.githubusercontent.com/hootener/How-do-you-that-in-Lisp-/b1f425c26dafaa1ebd772a90e542c3611f79f5d9/TestSuite1.lisp
lisp
It is expected that your code has been saved If the file is saved elsewhere, change the LOAD statement in the main test driver below. test cube volume correct eval case test euclid working case working case --float too many parameters too few parameters test path-distance working case, multiple inputs single ent...
to the file HowDoYouDoThatInLisp.lsp in the root dir of the C : drive . (defun test1 () (and zero case one case three case three list of case three list of number case )) (defun test2 () (and zero case zero case -- float case )) (defun test3 () (and zero case zero case -- float working case , tw...
286c731acd3c741bb98a4047ce89e0874aa081aff5971376fc4310b33dfed6e4
DHSProgram/DHS-Indicators-SPSS
PH_SCHOL.sps
* Encoding: UTF-8. ***************************************************************************************************** Program: PH_SCHOL.sps Purpose: Code to compute school attendance indicators Data inputs: BR and PR dataset Data outputs: coded variables Author: Trevor Croft, translated to SPSS by Ivana...
null
https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/5afc9e00d21fd0b842edd3334fc3b37dfe5da6ce/Chap02_PH/PH_SCHOL.sps
scheme
* Encoding: UTF-8. ***************************************************************************************************** Program: PH_SCHOL.sps Purpose: Code to compute school attendance indicators Data inputs: BR and PR dataset Data outputs: coded variables Author: Trevor Croft, translated to SPSS by Ivana...
9d3a7ab05fc0cf6637cc5502407330635acf475934642e6502d949c2e7f9c087
ekmett/intervals
Internal.hs
# LANGUAGE CPP # {-# LANGUAGE Rank2Types #-} {-# LANGUAGE DeriveDataTypeable #-} #if __GLASGOW_HASKELL__ >= 704 # LANGUAGE DeriveGeneric # #endif # OPTIONS_HADDOCK not - home # ----------------------------------------------------------------------------- -- | Module : Numeric . Interval . NonEmpty . Internal ...
null
https://raw.githubusercontent.com/ekmett/intervals/9a274528fabddc483dc33fb93ca6572e8f6f2f1e/src/Numeric/Interval/NonEmpty/Internal.hs
haskell
# LANGUAGE Rank2Types # # LANGUAGE DeriveDataTypeable # --------------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental Portability : DeriveDataTypeable Interval arithmetic -------------------------------------------------------------...
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 704 # LANGUAGE DeriveGeneric # #endif # OPTIONS_HADDOCK not - home # Module : Numeric . Interval . NonEmpty . Internal Copyright : ( c ) 2010 - 2014 module Numeric.Interval.NonEmpty.Internal ( Interval(..) , (...) , interval , whole , singleton ...
4a873bd8767211bb501d0d580e12d2145b15913ae6c9ad0914007eb09b3acc8b
volhovm/orgstat
Types.hs
# LANGUAGE RankNTypes , TemplateHaskell # -- | Types common among reports. module OrgStat.Outputs.Types ( TimelineParams (..) , tpColorSalt , tpLegend , tpTopDay , tpColumnWidth , tpColumnHeight , tpBackground , TimelineOutput (..) , SummaryParams (..) ...
null
https://raw.githubusercontent.com/volhovm/orgstat/92d55971be73d82f2e94435488654d7a14a12c0f/src/OrgStat/Outputs/Types.hs
haskell
| Types common among reports. -------------------------------------------------------------------------- Timeline -------------------------------------------------------------------------- ^ Salt added when getting color out of task name. ^ Include map legend? ^ Column width in percent ^ Column height ^ Color of...
# LANGUAGE RankNTypes , TemplateHaskell # module OrgStat.Outputs.Types ( TimelineParams (..) , tpColorSalt , tpLegend , tpTopDay , tpColumnWidth , tpColumnHeight , tpBackground , TimelineOutput (..) , SummaryParams (..) , SummaryOutput (..) ...
f914529fa0049366ee020348cf82e1edbdd15e9d4a487b609c75f51fcb814e17
emqx/emqx
emqx_rule_maps_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_rule_engine/test/emqx_rule_maps_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_rule_maps_SUITE). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_te...
4550cf979519399e32acc42e2ca3d69f6782e26c66d5e1fddc59797aad9484a1
achirkin/vulkan
VK_NV_win32_keyed_mutex.hs
# OPTIONS_HADDOCK not - home # {-# LANGUAGE DataKinds #-} {-# LANGUAGE MagicHash #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE Strict #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Vulkan.Ext.VK_NV_win32_keyed_mutex (AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(..), ...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_NV_win32_keyed_mutex.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE Strict # # LANGUAGE ViewPatterns # > #include "vk_platform.h"
# OPTIONS_HADDOCK not - home # # LANGUAGE PatternSynonyms # module Graphics.Vulkan.Ext.VK_NV_win32_keyed_mutex (AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(..), VkDeviceAddress(..), VkDeviceSize(..), VkFlags(..), VkSampleMask(..), VkPipelineBindPoint(..), VkPipelineCacheH...
6a98ae308420b448fa1ca401ba3b928fd4912bcd2ed068a3dd983d70879f7efb
softwarelanguageslab/maf
R5RS_scp1_scoreboard-5.scm
; Changes: * removed : 1 * added : 1 * swaps : 1 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 3 (letrec ((result ()) (output (lambda (i) (set! result (cons i result)))) (linebreak (lambda () (set! result (cons 'linebreak result...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_scoreboard-5.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 1 * added : 1 * swaps : 1 * calls to i d fun : 3 (letrec ((result ()) (output (lambda (i) (set! result (cons i result)))) (linebreak (lambda () (set! result (cons 'linebreak result)))) (create-counter (lambda () ...
dc2f9ed023b3ac489e08bcb0b29ae1dae6fd6a71843066af3b610a764f173e90
acieroid/scala-am
abstrct.scm
(define result '()) (define (display2 item) (set! result (cons item result))) (define (newline2) (set! result (cons 'newline result))) (define (make-row key name age wage) (vector key name age wage)) (define (key-ref row) (vector-ref row 0)) (define (name-ref row) (vector-ref row 1)) (define (age-ref row) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/ad/abstrct.scm
scheme
(define result '()) (define (display2 item) (set! result (cons item result))) (define (newline2) (set! result (cons 'newline result))) (define (make-row key name age wage) (vector key name age wage)) (define (key-ref row) (vector-ref row 0)) (define (name-ref row) (vector-ref row 1)) (define (age-ref row) ...
ee4cfff437ce89f7a32b0273a6382beb12c6168502d98aae2e46e7d767c4d3c7
fgalassi/cs61a-sp11
3.23.scm
(define (make-deque) (cons '() '())) (define (empty-deque? d) (not (deque-node? (front-node d)))) (define (front-deque d) (if (empty-deque? d) #f (deque-node-val (front-node d)))) (define (rear-deque d) (if (empty-deque? d) #f (deque-node-val (rear-node d)))) (define (front-insert-deque! d item) ...
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.23.scm
scheme
(define (make-deque) (cons '() '())) (define (empty-deque? d) (not (deque-node? (front-node d)))) (define (front-deque d) (if (empty-deque? d) #f (deque-node-val (front-node d)))) (define (rear-deque d) (if (empty-deque? d) #f (deque-node-val (rear-node d)))) (define (front-insert-deque! d item) ...
3f158972fed4145f270c9c789230f4d7e9a5e4cef0911abee790f6e52f2b1137
msantos/prx
prx_SUITE.erl
-module(prx_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("kernel/include/file.hrl"). -export([ suite/0, all/0, groups/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2 ]). -export([ cpid/1, parent/1, clone_process_image_stress/1,...
null
https://raw.githubusercontent.com/msantos/prx/e84f7363ef67f084fbc3c1ea28585911b3705980/test/prx_SUITE.erl
erlang
Pre-fork processes Pre-fork and execv() stress test Pre-fork processes, exec and kill Create a pipeline, exec()'ing the port process Create a pipeline, exec()'ing the port process Replace process image using the path (execve) and a file descriptor to the binary (fexecve) $ egrep "/proc" /proc...
-module(prx_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("kernel/include/file.hrl"). -export([ suite/0, all/0, groups/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2 ]). -export([ cpid/1, parent/1, clone_process_image_stress/1,...
78ca42c3e1e939b9f8c65f35848dcbe8e39ba0c21768a909f6d26b1812cb8212
cchalmers/diagrams
Light.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # ----------------------------------------------------------------------------- -- | -- Module : Diagrams.ThreeD.Render Copyrigh...
null
https://raw.githubusercontent.com/cchalmers/diagrams/d091a3727817905eea8eeabc1e284105f618db21/src/Diagrams/ThreeD/Light.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE FlexibleContexts # --------------------------------------------------------------------------- | Module : Diagrams.ThreeD.Render License : BSD-style (see LICENSE) Maintainer : Types to specify lighting for 3D rendering. ----------------------------...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE ) module Diagrams.ThreeD.Light where import Data.Colour import Data.Monoid import Data.Typeable import Ge...
eb747876b7a5c36b8acc49964efc458f4404a9f181a6391a8d1ec0b423568432
EFanZh/EOPL-Exercises
exercise-5.41-test.rkt
#lang racket/base (require rackunit) (require "../solutions/exercise-5.41.rkt") (check-equal? (run "2") (num-val 2)) (check-equal? (run "-(3, 3)") (num-val 0)) (check-equal? (run "-(3, 4)") (num-val -1)) (check-equal? (run "-(4, 3)") (num-val 1)) (check-equal? (run "zero?(0)") (bool-val #t)) (check-equal? (run "zero?...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-5.41-test.rkt
racket
#lang racket/base (require rackunit) (require "../solutions/exercise-5.41.rkt") (check-equal? (run "2") (num-val 2)) (check-equal? (run "-(3, 3)") (num-val 0)) (check-equal? (run "-(3, 4)") (num-val -1)) (check-equal? (run "-(4, 3)") (num-val 1)) (check-equal? (run "zero?(0)") (bool-val #t)) (check-equal? (run "zero?...
fb6cd1ef3e5768248cc5aff141b65da00fce37923cd8b1eb84339401185c838a
well-typed/large-records
R050.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif # LANGUAGE OverloadedLabels # module Experiment.SR_GetEvens.Sized.R050 where import SuperRecord (Rec) import qualified SuperRecord as SR import Bench.EvensOfSize.Ev...
null
https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R050.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings # 00 .. 09
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif # LANGUAGE OverloadedLabels # module Experiment.SR_GetEvens.Sized.R050 where import SuperRecord (Rec) import qualified SuperRecord as SR import Bench.EvensOfSize.Evens050 import Common.RowOfSize.Row050 getEvens :: Rec ExampleRow -> Evens getEvens r = Evens { ...
d54eee53455a96ea0b21ac40ef9c8467e1baa45dfd30a08b0adbef4b9eb48910
conscell/hugs-android
Calendar.hs
This is a modification of the calendar program described in section 4.5 of Bird and Wadler 's ` ` Introduction to functional programming '' , with two ways of printing the calendar ... as in B+W , or like UNIX ` cal ' : Run using : calFor " 1996 " or : putStr ( calendar 1996 ) or : putS...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/demos/Calendar.hs
haskell
Picture handling: For a standalone calendar program: To use this with "runhugs" on Unix: cat >cal #! /usr/local/bin/runhugs > module Main( main ) where > import Calendar > main = calProg <ctrl-D> ./cal 1997 End of calendar program
This is a modification of the calendar program described in section 4.5 of Bird and Wadler 's ` ` Introduction to functional programming '' , with two ways of printing the calendar ... as in B+W , or like UNIX ` cal ' : Run using : calFor " 1996 " or : putStr ( calendar 1996 ) or : putS...
e35e79aa9012ca61f0b0832fa84fe16a6a1c82ee2d2de686ab139b48bfb8ac3f
jaredly/belt
belt_HashSetString.ml
# 2 "../others/hashset.cppo.ml" type key = string type seed = int # 7 "../others/hashset.cppo.ml" (* @BenHack MMmmmmg what am I suppose to do here? Seems like hashing assumes 32bit ints *) let caml_hash_mix_string = Caml_hash.caml_hash_mix_string let final_mix = Caml_hash.caml_hash_final_mix let hash ...
null
https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt_src/belt_HashSetString.ml
ocaml
@BenHack MMmmmmg what am I suppose to do here? Seems like hashing assumes 32bit ints cell put at the end no overflow keep track of tail so that indexfun sees the new bucket count
# 2 "../others/hashset.cppo.ml" type key = string type seed = int # 7 "../others/hashset.cppo.ml" let caml_hash_mix_string = Caml_hash.caml_hash_mix_string let final_mix = Caml_hash.caml_hash_final_mix let hash (s : key) = Nativeint.to_int (final_mix (caml_hash_mix_string Nativeint.zero s )) # 50 "../oth...
a26b516fa13bf74d538c134a4b61b836f62668f032de8e5920f4fa9eb97fb1c7
graninas/The-Amoeba-World
Rules.hs
module Amoeba.GameLogic.Language.Translation.Rules where import Amoeba.GameLogic.Language.Translation.Triggers import Amoeba.GameLogic.Language.Translation.Actions import Amoeba.GameLogic.Language.Scheme scheme = [ onComment /> skip , onEmpty /> skip , onItem /> addItem , onWorld /> setupWo...
null
https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/GameLogic/Language/Translation/Rules.hs
haskell
module Amoeba.GameLogic.Language.Translation.Rules where import Amoeba.GameLogic.Language.Translation.Triggers import Amoeba.GameLogic.Language.Translation.Actions import Amoeba.GameLogic.Language.Scheme scheme = [ onComment /> skip , onEmpty /> skip , onItem /> addItem , onWorld /> setupWo...
4f70c0df18cd902b5b1ec9931c7a771f2b497f5717ce7c802757e321ab914370
shayne-fletcher/zen
main.ml
(*main.ml*) let main () = try let lexbuf = Lexing.from_channel stdin in while true do Rpcalc.input Lexer.token lexbuf done with | End_of_file -> exit 0 let () = Printexc.print main () $ rpcalc 4 9 + 13 3 7 + 3 4 5 * + - -13 3 7 + 3 4 5 * + - n % Note the unary minus , n 13 ...
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/ocamlyacc/rpcalc/main.ml
ocaml
main.ml
let main () = try let lexbuf = Lexing.from_channel stdin in while true do Rpcalc.input Lexer.token lexbuf done with | End_of_file -> exit 0 let () = Printexc.print main () $ rpcalc 4 9 + 13 3 7 + 3 4 5 * + - -13 3 7 + 3 4 5 * + - n % Note the unary minus , n 13 5 6 / 4 n ...
5c4439e47a4b7f4b3e1ab2c768302afceb3210f4e94a1f71447462ac9e1f01f5
static-analysis-engineering/codehawk
jCHNumericUtils.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpoly/jCHNumericUtils.mli
ocaml
jchlib jchpre
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
f73d5b6e0e7c9355a759689eec78fc951a4475d9eca382e9cb1a287994b9649f
ConsenSysMesh/Fae
Args.hs
| Module : FaeServer . Args Description : Handles command - line arguments for faeServer Copyright : ( c ) , 2017 - 2018 License : MIT Maintainer : Stability : experimental This very simple , ad - hoc command line parser is just explicit pattern - matching the flag strings ; fortunately , we do no...
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/bin/FaeServer/Args.hs
haskell
| faeServer is either actually running a server of some kind, or printing the help text. | The list contains unrecognized arguments. | This collection of data is passed around and various parts used all changing. ^ microseconds, 0 is disabled whereas it used to be 'True', which will wipe out unsuspecting users' ...
| Module : FaeServer . Args Description : Handles command - line arguments for faeServer Copyright : ( c ) , 2017 - 2018 License : MIT Maintainer : Stability : experimental This very simple , ad - hoc command line parser is just explicit pattern - matching the flag strings ; fortunately , we do no...
2fbec35b9385bc1a00c9f20286a0e29a1aaa9f874282d4494d840813fb66084a
janestreet/base
hasher.ml
open! Import (** Signatures required of types which can be used in [[@@deriving hash]]. *) module type S = sig (** The type that is hashed. *) type t * [ hash_fold_t state x ] mixes the content of [ x ] into the [ state ] . By default , all our [ hash_fold_t ] functions ( derived or not ) should satis...
null
https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/src/hasher.ml
ocaml
* Signatures required of types which can be used in [[@@deriving hash]]. * The type that is hashed.
open! Import module type S = sig type t * [ hash_fold_t state x ] mixes the content of [ x ] into the [ state ] . By default , all our [ hash_fold_t ] functions ( derived or not ) should satisfy the following properties . 1 . [ hash_fold_t state x ] should mix all the information present...
a51db622d88053638988226886ec74c3b4034d41856b4cb4c1e01fdcd8c85e3e
brosenan/lambda-kube
util_test.clj
(ns lambdakube.util-test (:require [midje.sweet :refer :all] [lambdakube.core :as lk] [lambdakube.util :as lku] [clojure.data.json :as json] [clojure.java.shell :as sh] [clojure.java.io :as io] [digest])) # Clojure Nanoservices It is someti...
null
https://raw.githubusercontent.com/brosenan/lambda-kube/89cea5246f5ab95fd827582d7a1800e4eb65cdb6/test/lambdakube/util_test.clj
clojure
consisting of only a few lines of code, from within a Lambda-Kube library. Such nanoservices can be useful as it avoids the need for used for more than small and simple nanoservices (and tests), since the code is written as a quoted s-expression, hindering the ability to test it within the enclosing project. a co...
(ns lambdakube.util-test (:require [midje.sweet :refer :all] [lambdakube.core :as lk] [lambdakube.util :as lku] [clojure.data.json :as json] [clojure.java.shell :as sh] [clojure.java.io :as io] [digest])) # Clojure Nanoservices It is someti...
461b3c28f987ca859d3dba74239231ec12451a58a8e4e63a2110412cd78e050a
tolitius/highlander
qpusher.clj
(ns bench.qpusher (:require [highlander.monitor.qstats :as q] [highlander.queue.zmq :as zmq] [highlander.queue.swpq :as swpq]) (:use [clojure.tools.cli :only [cli]] [clojure.tools.logging])) (defonce log-every 10000000) (defonce thing "[Did you know that the Answer to the Ultimate Q...
null
https://raw.githubusercontent.com/tolitius/highlander/406c21ca19e21d68c64d3e92d41d45a440331456/src/bench/qpusher.clj
clojure
(ns bench.qpusher (:require [highlander.monitor.qstats :as q] [highlander.queue.zmq :as zmq] [highlander.queue.swpq :as swpq]) (:use [clojure.tools.cli :only [cli]] [clojure.tools.logging])) (defonce log-every 10000000) (defonce thing "[Did you know that the Answer to the Ultimate Q...
fade989705a6a703614835c8a921684a6c3873071ae10413694ba22bc75fc426
tolysz/ghcjs-stack
IPI642.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.GHC.IPI642 Copyright : ( c ) The University of Glasgow 2004 -- License : BSD3 -- -- Maintainer : -- Portability : portable -- module Distribution.Simple.GHC.IPI642 ( InstalledPac...
null
https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/Distribution/Simple/GHC/IPI642.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.GHC.IPI642 License : BSD3 Maintainer : Portability : portable It's here purely for the 'Read' instance so that we can read the package package db directly, but we do need the info and unti...
Copyright : ( c ) The University of Glasgow 2004 module Distribution.Simple.GHC.IPI642 ( InstalledPackageInfo(..), toCurrent, ) where import qualified Distribution.InstalledPackageInfo as Current import qualified Distribution.Package as Current hiding (installedUnitId) import Distribution.Simple.GHC....
9bc81afb4b6b0a5b8a0c20f744c4490d81abac1c335873a28c4325dbd7b4e810
rm-hull/nvd-clojure
config_test.clj
The MIT License ( MIT ) ;; Copyright ( c ) 2016- ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy ;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights ;; to use, copy, modi...
null
https://raw.githubusercontent.com/rm-hull/nvd-clojure/ef64495bac790a55aac23737baf0243c5e5bb467/test/nvd/config_test.clj
clojure
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 furnished to do so, subject to the following conditions: The above copyright notice...
The MIT License ( MIT ) Copyright ( c ) 2016- in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
6b17c08763f51b760add1c31b079f1cf703f29a835bfefb4579a32263aa2bae6
turquoise-hexagon/euler
solution.scm
(import (chicken fixnum) (euler)) (define (make-rad n) (let ((acc (make-vector (fx+ n 1) 1))) (for-each (lambda (p) (let loop ((m p)) (unless (fx> m n) (vector-set! acc m (fx* (vector-ref acc m) p)) (loop (fx+ m p))))) (primes n)) (define (rad n) ...
null
https://raw.githubusercontent.com/turquoise-hexagon/euler/7af6520da28a6c6c8a7db86041d3495b68725965/src/spoilers/127/solution.scm
scheme
(import (chicken fixnum) (euler)) (define (make-rad n) (let ((acc (make-vector (fx+ n 1) 1))) (for-each (lambda (p) (let loop ((m p)) (unless (fx> m n) (vector-set! acc m (fx* (vector-ref acc m) p)) (loop (fx+ m p))))) (primes n)) (define (rad n) ...
471f9ecb53aca9c3f3c8b90f9f9bd803b7631da4d747fdb5f6b3396754e09391
tact-lang/tact-obsolete
partial_evaluator.ml
open Base open Errors module Make = functor (Config : Config.T) -> struct open Config open Interpreter.Make (Config) open Lang_types.Make (Config) class ['s] partial_evaluator (ctx : ctx) (errors : _) = object (self : 's) inherit [_] map as super (* Make a deep copy of t...
null
https://raw.githubusercontent.com/tact-lang/tact-obsolete/9846ca9ed28093078c890012416aba73af1b279d/lib/partial_evaluator.ml
ocaml
Make a deep copy of the ctx. Local values should not flow into code that call partial_evaluator. TODO: this won't work if `vars` will be actually a list. FIXME: This function should create new instance of the partial_evaluator and call new_instance#visit_function_ but there is some problems w...
open Base open Errors module Make = functor (Config : Config.T) -> struct open Config open Interpreter.Make (Config) open Lang_types.Make (Config) class ['s] partial_evaluator (ctx : ctx) (errors : _) = object (self : 's) inherit [_] map as super val mutable ctx = {ctx w...
828d8dbb3ae784728a565cf9e556be41d01f630464166c1c99eaf2fc2126e2c1
aria42/koala
core.clj
(ns koala.core (:import (clojure.lang IPersistentCollection IPersistentMap IPersistentVector))) (deftype FullSeries [key->index vals] clojure.lang.ILookup (valAt [this key] (when-let [idx (get key->index key)] (nth vals idx))) (valAt [this key not-found] (if-let [idx (get key->ind...
null
https://raw.githubusercontent.com/aria42/koala/9293b6dba65dc519199cfffee8ad5817be7c36cd/src/koala/core.clj
clojure
(ns koala.core (:import (clojure.lang IPersistentCollection IPersistentMap IPersistentVector))) (deftype FullSeries [key->index vals] clojure.lang.ILookup (valAt [this key] (when-let [idx (get key->index key)] (nth vals idx))) (valAt [this key not-found] (if-let [idx (get key->ind...
7ade0c1bc17be1745d810a47fe1fa90c81bad3cd13f570576defdeb599159798
dwayne/haskell-programming
ex1.hs
-- Exercises: Eq Instances 1 data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn m) (TisAn n) = m == n 2 data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two a b) (Two a' b') = a == a' && b == b' 3 data StringOrInt = TisAnInt Int | TisAString String ...
null
https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch6/ex1.hs
haskell
Exercises: Eq Instances
1 data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn m) (TisAn n) = m == n 2 data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two a b) (Two a' b') = a == a' && b == b' 3 data StringOrInt = TisAnInt Int | TisAString String instance Eq StringOrInt wh...
0dcf50f1ebc3c4e5a184d2e5e3270832ca7b8294cb9d9e99c6255c86ff19ecfc
drewolson/aoc-hs
Day12.hs
module Aoc.Year2021.Day12 ( part1, part2, ) where import Data.Char (toLower) import Data.Foldable (Foldable (foldl')) import Data.List.Split (splitOn) import Data.Map (Map, (!)) import Data.Map qualified as Map import Data.Maybe (mapMaybe) import Data.Set (Set) import Data.Set qualified as Set type Graph = Ma...
null
https://raw.githubusercontent.com/drewolson/aoc-hs/b0f06843e1f7d8c2af1da582e59a72d8f2bb73bf/aoc-year2021/src/Aoc/Year2021/Day12.hs
haskell
module Aoc.Year2021.Day12 ( part1, part2, ) where import Data.Char (toLower) import Data.Foldable (Foldable (foldl')) import Data.List.Split (splitOn) import Data.Map (Map, (!)) import Data.Map qualified as Map import Data.Maybe (mapMaybe) import Data.Set (Set) import Data.Set qualified as Set type Graph = Ma...
df0a978181707bab70f47f5bc9f0da8100fcbaaaecb1e2580ecae84cb2e7a315
aeternity/enoise
enoise_protocol.erl
%%% ------------------------------------------------------------------ 2018 , Aeternity Anstalt %%% %%% @doc Module defining Noise protocol configurations %%% %%% @end %%% ------------------------------------------------------------------ -module(enoise_protocol). -export([ cipher/1 , dh/1 , from_n...
null
https://raw.githubusercontent.com/aeternity/enoise/991d7390ea49216f0b170d7b9662b3ff0a925aaa/src/enoise_protocol.erl
erlang
------------------------------------------------------------------ @doc Module defining Noise protocol configurations @end ------------------------------------------------------------------
2018 , Aeternity Anstalt -module(enoise_protocol). -export([ cipher/1 , dh/1 , from_name/1 , hash/1 , msgs/2 , pattern/1 , pre_msgs/2 , supported/0 , to_name/1]). -ifdef(TEST). -export([to_name/4]). -endif. -type noise_pattern() :: nn | kn | nk | kk...
32f3cd5d415494b2974ced0184073b578fccdef805ebc73019a13c8a15bde60e
Frama-C/Frama-C-snapshot
slicingTransform.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/slicing/slicingTransform.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
8a23c52b5b96ba4c661566de05f2a304505cae6a08b91b53e931284f92c72885
Clozure/ccl-tests
princ-to-string.lsp
;-*- Mode: Lisp -*- Author : Created : Mon Jul 26 12:19:32 2004 ;;;; Contains: Tests of PRINC-TO-STRING (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest princ-to-string.1 (random-princ-to-string-test 1000) nil) (deftest princ-to-string.2 (with-standard-io-syntax (princ-to-str...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/princ-to-string.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of PRINC-TO-STRING Error tests
Author : Created : Mon Jul 26 12:19:32 2004 (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest princ-to-string.1 (random-princ-to-string-test 1000) nil) (deftest princ-to-string.2 (with-standard-io-syntax (princ-to-string 2)) "2") (deftest princ-to-string.error.1 (signals-err...
6c8f77006befdb8b3a2683f6dea720cb634f88acfe23f98cfc093cd46fda500b
markostanimirovic/re-action
dev.cljs
(ns ^:figwheel-no-load blog.dev (:require [blog.core :as core] [devtools.core :as devtools])) (extend-protocol IPrintWithWriter js/Symbol (-pr-writer [sym writer _] (-write writer (str "\"" (.toString sym) "\"")))) (enable-console-print!) (devtools/install!) (core/init!)
null
https://raw.githubusercontent.com/markostanimirovic/re-action/d6cb33d9ac73bedeac4f09996c2c741d21bda7ba/examples/blog/env/dev/cljs/blog/dev.cljs
clojure
(ns ^:figwheel-no-load blog.dev (:require [blog.core :as core] [devtools.core :as devtools])) (extend-protocol IPrintWithWriter js/Symbol (-pr-writer [sym writer _] (-write writer (str "\"" (.toString sym) "\"")))) (enable-console-print!) (devtools/install!) (core/init!)
d704513bcf171b56bb12b7399659a0038b709413beb127a255ccac716b373f0e
informatimago/lisp
readtable.lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (setf *readtable* (copy-readtable nil))) (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") (define-condition simple-stream-error (stream-error simple-condition) () (:report (lambda (condition stream) (format stream "~?" (simpl...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/languages/linc/readtable.lisp
lisp
) (set-dispatch-macro-character #\# #\i (function reader-dispatching-macro-c-preprocessor-token) readtable) (set-dispatch-macro-character #\# #\e (function reader-dispatching-macro-c-preprocessor-token) readtable) (set-dispatch-macro-character #\# *c-opening-brace* (function reader-dispat...
(eval-when (:compile-toplevel :load-toplevel :execute) (setf *readtable* (copy-readtable nil))) (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") (define-condition simple-stream-error (stream-error simple-condition) () (:report (lambda (condition stream) (format stream "~?" (simpl...
7e8013dbf83fa08d4cf8d21134533d78d61b03ba3f3c71606e77aec7eb0a5893
janestreet/bonsai
freeform_multiselect.mli
open! Core open! Bonsai_web * These controls come unstyled by default . - style provides css that will make the control and option pills pretty . the control and option pills pretty. *) val create : ?extra_attr:Vdom.Attr.t Value.t -> ?placeholder:string -> ?on_set_change:(String.Set.t -> unit Ui_...
null
https://raw.githubusercontent.com/janestreet/bonsai/33e9a58fc55ec12095959dc5ef4fd681021c1083/web_ui/freeform_multiselect/src/freeform_multiselect.mli
ocaml
open! Core open! Bonsai_web * These controls come unstyled by default . - style provides css that will make the control and option pills pretty . the control and option pills pretty. *) val create : ?extra_attr:Vdom.Attr.t Value.t -> ?placeholder:string -> ?on_set_change:(String.Set.t -> unit Ui_...
fcb02ea835747c751e39a9118691b9219084f428367abb39594f5836ef5961d3
APTE/APTE
constraint.ml
(*********************************** *** Support Set *** ************************************) type 'a support_set = (int * ('a list)) list type position = int * int let empty_set = [] (********* Modification *********) let add f_support elt set = let support = f_support elt in let rec add_r...
null
https://raw.githubusercontent.com/APTE/APTE/d5f1bbd29c2fc324a6015ac50173a0cc8ad66623/Source/standard_library/constraint.ml
ocaml
********************************** *** Support Set *** *********************************** ******** Modification ******** **[BEGIN DEBUG]** **[END DEBUG]** ******** Scanning ******** ******** Access ******** ******** Iterators ******** ******** Display ******** ********************************** ***...
type 'a support_set = (int * ('a list)) list type position = int * int let empty_set = [] let add f_support elt set = let support = f_support elt in let rec add_r = function | [] -> [(support,[elt])] | (s,l)::q when s = support -> (s,l@[elt])::q | (s,l)::q when s > support -> (support,[elt])::(s,l...
d27f204c1bf7585cc548fe589be4f3ab28ff3eebde5ea72c59a22adbce2ca856
JacquesCarette/Drasil
IntroSection.hs
module Drasil.PDController.IntroSection where import Data.Drasil.Citations (smithLai2005) import Drasil.PDController.Concepts import Language.Drasil import Language.Drasil.Chunk.Concept.NamedCombinators import qualified Language.Drasil.Sentence.Combinators as S introPara, introPurposeOfDoc, introscopeOfReq :: Senten...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/pdcontroller/lib/Drasil/PDController/IntroSection.hs
haskell
module Drasil.PDController.IntroSection where import Data.Drasil.Citations (smithLai2005) import Drasil.PDController.Concepts import Language.Drasil import Language.Drasil.Chunk.Concept.NamedCombinators import qualified Language.Drasil.Sentence.Combinators as S introPara, introPurposeOfDoc, introscopeOfReq :: Senten...
538fd0f990ba2a7da489dc361e2fab62be431d983a507322d246b557612d4715
Erdwolf/prolog
Main.hs
module Main where import Control.Applicative ((<$>)) import Control.Arrow ((>>>),(<<<)) import Language.Prolog (consult, parseQuery) import ParseArgs (parseArgs) import GraphViz (resolveTree, resolveTreeToFile) main = do (queryString, files, output) <- parseArgs p <- concat <$> mapM ((abortOnError=<<) . consult...
null
https://raw.githubusercontent.com/Erdwolf/prolog/d6ee4b35be2a0b29f0a2db404a90f0d241d97a6c/prolog-graph/Main.hs
haskell
case output of Nothing -> resolveTree p q {- FIXME Never shown since thread terminated. -} Just file -> resolveTreeToFile file p q >> return ()
module Main where import Control.Applicative ((<$>)) import Control.Arrow ((>>>),(<<<)) import Language.Prolog (consult, parseQuery) import ParseArgs (parseArgs) import GraphViz (resolveTree, resolveTreeToFile) main = do (queryString, files, output) <- parseArgs p <- concat <$> mapM ((abortOnError=<<) . consult...
a5d8c88e969ee57fd47594f18bd799c26d60c01ce258bc65b03f63cda043b1b8
kowey/GenI
GeniShow.hs
-- GenI surface realiser Copyright ( C ) 2005 and -- -- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -...
null
https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/src/NLP/GenI/GeniShow.hs
haskell
GenI surface realiser This program is free software; you can redistribute it and/or This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for mo...
Copyright ( C ) 2005 and modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 T...
9fd57953d53e5c6bd2537cc8a006c20a0f9d20c30f61061f4e942465a9915a4b
uw-unsat/leanette-popl22-artifact
geothings.rkt
#lang s-exp rosette geometric things in Wallingford / Rosette (require "../core/wallingford.rkt") (provide point point? point-x point-y make-point point-plus point-minus point-scale line line? line-end1 line-end2 make-line circle circle? circle-center circle-radius make-circle contains-point ...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/wallingford/applications/geothings.rkt
racket
Define colors as a mapping from integers to strings, so that we can put constraints on colors. Returns the index of the given color. Returns the color at the given index. structs for geometric objects (including colored objects) (struct colored-circle circle (color) #:transparent) functions to make symbolic objec...
#lang s-exp rosette geometric things in Wallingford / Rosette (require "../core/wallingford.rkt") (provide point point? point-x point-y make-point point-plus point-minus point-scale line line? line-end1 line-end2 make-line circle circle? circle-center circle-radius make-circle contains-point ...
d7a634e3ff7c607400481b0edb565e36a45c199889f91ee3a528eaba74a73347
inconvergent/cl-grph
qry-3.lisp
(in-package #:grph-tests) (plan 1) (subtest "qry rules" (let ((*ancestor '(((?x . 0) (?y . 1)) ((?x . 1) (?y . 3)) ((?x . 0) (?y . 2))))) (is (grph::rules/prev-matches *ancestor '(?x . ?z) '(?y . ?y)) '(((?Z . 0) (?Y . 1)) ((?Z . 1) (?Y . 3)) ((?Z . 0) ...
null
https://raw.githubusercontent.com/inconvergent/cl-grph/809dd3b5c5196e116a89c2a8d4c7b43503e33c3d/test/qry-3.lisp
lisp
(in-package #:grph-tests) (plan 1) (subtest "qry rules" (let ((*ancestor '(((?x . 0) (?y . 1)) ((?x . 1) (?y . 3)) ((?x . 0) (?y . 2))))) (is (grph::rules/prev-matches *ancestor '(?x . ?z) '(?y . ?y)) '(((?Z . 0) (?Y . 1)) ((?Z . 1) (?Y . 3)) ((?Z . 0) ...
8b975e209dbce9f134a5978bef48f98fa3aee994d67f02b517867828e21d54b6
giuliano108/guix-packages
vim-plug.scm
(define-module (vim-plug) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix build-system copy) #:use-module (guix git-download)) TODO : " helptags ALL " hook ;; ;; The documentation for the plugin does get installed, but it won't be ;; available via vim's :help ...
null
https://raw.githubusercontent.com/giuliano108/guix-packages/5bb057baf290455b11ab4a748e15c8293d086146/packages/vim-plug.scm
scheme
The documentation for the plugin does get installed, but it won't be available via vim's :help . This is because vim needs a `tags` file in ~/.guix-profile/share/vim/vimfiles/doc containing the tags for all the plugins installed around there, and we don't it would be great to rewrite that in scheme...
(define-module (vim-plug) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix build-system copy) #:use-module (guix git-download)) TODO : " helptags ALL " hook generate that . This seems to also be true for all the vim plugins that come with . Debian / Ubuntu...
199e6e637afa133f0041db37b771aa95b5f1c459e3826be0491b1737c76cf40a
dmvianna/haskellbook
Ch26-MorraState.hs
-- I know, it is a long file. Normally I would place it in a -- self-contained project with its own Module hierarchy. But -- I'm keeping it here with the other haskellbook exercises. module MorraState where import Control.Monad (replicateM_) import Control.Monad.IO.Class import Control.Monad.Trans.Reader import Cont...
null
https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch26-MorraState.hs
haskell
I know, it is a long file. Normally I would place it in a self-contained project with its own Module hierarchy. But I'm keeping it here with the other haskellbook exercises. Scores Random generator As we approach IO land, things get messier Strings Person input Modes poor man's blank screen
module MorraState where import Control.Monad (replicateM_) import Control.Monad.IO.Class import Control.Monad.Trans.Reader import Control.Monad.Trans.Except import Control.Monad.Trans.State.Lazy import Data.Word8 import System.Exit import System.IO import System.Random data Player = A | B deriving Show data Guess ...
eeb300f396866776ee2833784bffdfb55db627c2618673e580fb6078e58e12d7
mirage/mirage-qubes
rExec.mli
Copyright ( C ) 2015 , See the README file for details . See the README file for details. *) * QubesOS agent protocol . See : -os.org/doc/qrexec3/ See: -os.org/doc/qrexec3/ *) type t module Flow : S.FLOW module Client_flow : sig type t val write : t -> Cstruct.t -> [`Ok of unit | `Eof] L...
null
https://raw.githubusercontent.com/mirage/mirage-qubes/b2dcdfe29a90f86f9046788da4799abc451a0b9b/lib/rExec.mli
ocaml
* Read from stdout and stderr * [listen t handler] is a thread that reads incoming requests from [t] and handles each one asynchronously with [handler]. The loop ends if the client disconnects. * Close the underlying vchan. This will cause any listening thread to finish.
Copyright ( C ) 2015 , See the README file for details . See the README file for details. *) * QubesOS agent protocol . See : -os.org/doc/qrexec3/ See: -os.org/doc/qrexec3/ *) type t module Flow : S.FLOW module Client_flow : sig type t val write : t -> Cstruct.t -> [`Ok of unit | `Eof] L...
f8d5269fc2c83a20e768e35443cb373a9afde1a8a2193ef34ca16bfcc4427133
chetmurthy/ensemble
proxy.mli
(**************************************************************) PROXY.MLI Author : , 11/96 Designed with (**************************************************************) open Trans open Mutil (**************************************************************) (* Type of proxy clients. *) type t (* Create a p...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/groupd/proxy.mli
ocaml
************************************************************ ************************************************************ ************************************************************ Type of proxy clients. Create a proxy client. ************************************************************
PROXY.MLI Author : , 11/96 Designed with open Trans open Mutil type t val create : Alarm.t -> Hsys.socket -> t Join a maestro group via a proxy . *) val join : t -> group -> endpt -> ltime -> (coord_msg -> unit) -> (member_msg -> unit) Initialize a proxy server . *) val server : Alarm.t -...
76cbe1903632689e9dd572a85527a7beaf03af7c108558480afa31d1ced587c6
devth/dec
dec.clj
(ns dec "Core dec functions" (:require [clojure.string :as s])) (def default-delimiter "-") ;; private utilities (defn- path->key " Encode a path sequential as a Clojure keyword " [delimiter path] {:pre [(not-empty path) (not-empty delimiter)]} (keyword (s/join delimiter (map #(if (number? %...
null
https://raw.githubusercontent.com/devth/dec/8ff071421f20f09a1d208dc3799aa56d89e24471/src/dec.clj
clojure
private utilities "Test whether a value is flat, i.e. not a collection of values." "Ensure v has at least size elements. Fill with `nil` if necessary." "Build up nested path with possibly-numeric indices as vectors and other keys as maps" if k2 is a number we need to ensure the vector is large enough recurse if...
(ns dec "Core dec functions" (:require [clojure.string :as s])) (def default-delimiter "-") (defn- path->key " Encode a path sequential as a Clojure keyword " [delimiter path] {:pre [(not-empty path) (not-empty delimiter)]} (keyword (s/join delimiter (map #(if (number? %) % (name %)) path)))...
bdeeaa433dad259d2c4c891ce6942eded54488fc6985c2d1ce979fe0898bf0ed
egri-nagy/kigen
chain_test.clj
(ns kigen.chain-test (:require [clojure.test :refer :all] [kigen.chain :as chain])) (deftest chains-test (testing "Testing chains in cover relation." (let [r {1 #{2 3 4}, 2 #{6}, 3 #{5}, 4 #{5}, 5 #{6}}] (is (= (chain/chains 1 5 r) #{[1 3 5], [1 4 5]})) (is (= #{[1 2]} (cha...
null
https://raw.githubusercontent.com/egri-nagy/kigen/5248499fab9d8af05d7d0b07626d0676dfe580c9/test/kigen/chain_test.clj
clojure
(ns kigen.chain-test (:require [clojure.test :refer :all] [kigen.chain :as chain])) (deftest chains-test (testing "Testing chains in cover relation." (let [r {1 #{2 3 4}, 2 #{6}, 3 #{5}, 4 #{5}, 5 #{6}}] (is (= (chain/chains 1 5 r) #{[1 3 5], [1 4 5]})) (is (= #{[1 2]} (cha...
4e18222d5825a5f421f60bcf8ed5e1000210864afd55e16d0f61959d649670c2
leo-project/leo_mq
leo_mq_api_tests.erl
%%==================================================================== %% %% Copyright ( c ) 2012 - 2018 Rakuten , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/leo-project/leo_mq/450f2142a724e66428c13ef3e2485c179068b0ab/test/leo_mq_api_tests.erl
erlang
==================================================================== Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissi...
Copyright ( c ) 2012 - 2018 Rakuten , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(leo_mq_api_tests). -inc...
69abc408f2066de934b2e80f20c7d6e9cb9693559d94dd1d37fdfa9a6b66e543
webyrd/n-grams-for-synthesis
ephemerons-racket.scm
(define %make-ephemeron make-ephemeron) ephemeron ? is already defined correctly (define (make-ephemeron key datum) (%make-ephemeron key (cons key datum))) (define (ephemeron-broken? ephemeron) (not (ephemeron-value ephemeron))) (define (ephemeron-key ephemeron) (let ((value (ephemeron-value ephemeron))) ...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-124/ephemerons-racket.scm
scheme
(define %make-ephemeron make-ephemeron) ephemeron ? is already defined correctly (define (make-ephemeron key datum) (%make-ephemeron key (cons key datum))) (define (ephemeron-broken? ephemeron) (not (ephemeron-value ephemeron))) (define (ephemeron-key ephemeron) (let ((value (ephemeron-value ephemeron))) ...
6d5e05f66530e347cd847f4c871e365fb6787d4c42ef310e1af9345193307608
GrammaTech/sel
command-line.lisp
command-line.lisp --- General functionality for SEL command - line tools ;;; ;;; Command line utility functions and helpers for SEL-based ;;; command-line tools. ;;; ;;; This package extends the ;;; @url{-line-arguments, ;;; command-line-arguments} package with numerous option definitions ;;; and helper functions for...
null
https://raw.githubusercontent.com/GrammaTech/sel/699a241320c0a58d2e56400b6ee3184a9081beb4/command-line.lisp
lisp
Command line utility functions and helpers for SEL-based command-line tools. This package extends the @url{-line-arguments, command-line-arguments} package with numerous option definitions and helper functions for parsing command line arguments and list of the available options. Software objects. Components...
command-line.lisp --- General functionality for SEL command - line tools options which are specific to SEL . See the appendix for a full @texi{command - line } (uiop:define-package :software-evolution-library/command-line (:nicknames :sel/command-line) (:documentation "Generally useful functionality for ...
38671dc6f0c2b787a793fe8db6d62926042378c3ade22e0eb4eb06cc78c6d95c
johnlawrenceaspden/hobby-code
microsoftproblem.clj
;; The X and Y Dialogue Microsoft Research 15 Year Anniversary Riddle : Two integers x and y are selected such that 1 < x < = y < 100 . ;; Player A is given the product xy and player B is given the sum x+y. ;; The following dialogue takes place: ;; * A: I don’t know the values x and y. ;; * B: I knew y...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/microsoftproblem.clj
clojure
The X and Y Dialogue Player A is given the product xy and player B is given the sum x+y. The following dialogue takes place: * A: I don’t know the values x and y. * B: I knew you didn’t know. I don’t know them either. * A: Now I know x and y. * B: Now I know them too. Can you figure out x and y ...
Microsoft Research 15 Year Anniversary Riddle : Two integers x and y are selected such that 1 < x < = y < 100 . (defn xylist [n] (for [x (range 2 n) y (range x n)] [x y])) (def possible-products-and-sums (map (fn [[x y]] [(list x y) (* x y) (+ x y)]) (xylist 100))) ( [ ( 10 10 ) 100 20 ] [ ( 10 11 )...
bd692c96fc1dbd81f063645f2387d59bba04c29d3a1c47b71e7a595fe4ee0b80
cbaggers/daft
test-alien.lisp
(in-package :daft) (setf *screen-height-in-game-units* 800f0) (define-god ((spawn-counter (make-stepper (seconds 10) (seconds 10))) (spin-counter (make-stepper (seconds 2)))) (:game-starting (spawn 'ship (v! 0 -140)) (change-state :game-running)) (:game...
null
https://raw.githubusercontent.com/cbaggers/daft/62c4b8b883469eb121b55403b6afabad5052b204/test/test-alien.lisp
lisp
(in-package :daft) (setf *screen-height-in-game-units* 800f0) (define-god ((spawn-counter (make-stepper (seconds 10) (seconds 10))) (spin-counter (make-stepper (seconds 2)))) (:game-starting (spawn 'ship (v! 0 -140)) (change-state :game-running)) (:game...
0fc8e51de0eab560a39a7699c7f48dbd8fae594d8bc58b6cf36b90c8bf19acaf
stephendeyoung/python-in-racket
python-desugar.rkt
#lang plai-typed (require "python-syntax.rkt" "python-core-syntax.rkt") (define (desugar expr) (type-case PyExpr expr [PySeq (es) (get-vars es (list) (foldl (lambda (e1 e2) (CSeq e2 (desugar e1))) (desugar (first es)) (rest es)))] [PyNum (n) (CNum n)] [PyStr (s) (CStr s)] [PyNone () (CNone)...
null
https://raw.githubusercontent.com/stephendeyoung/python-in-racket/c5a0e3440f682f3495ce349d962fb745fc987652/python-desugar.rkt
racket
#lang plai-typed (require "python-syntax.rkt" "python-core-syntax.rkt") (define (desugar expr) (type-case PyExpr expr [PySeq (es) (get-vars es (list) (foldl (lambda (e1 e2) (CSeq e2 (desugar e1))) (desugar (first es)) (rest es)))] [PyNum (n) (CNum n)] [PyStr (s) (CStr s)] [PyNone () (CNone)...
6dad50b956f762cc17a97f6ec881e5bccb22ff891fbd07ec1880ada8ec71ea49
coccinelle/coccinelle
hashtbl.mli
type ('a, 'b) t val create : ?random:bool -> int -> ('a, 'b) t val clear : ('a, 'b) t -> unit val reset : ('a, 'b) t -> unit val copy : ('a, 'b) t -> ('a, 'b) t val add : ('a, 'b) t -> 'a -> 'b -> unit val find : ('a, 'b) t -> 'a -> 'b val find_opt : ('a, 'b) t -> 'a -> 'b option val find_all : ('a, 'b) t -> 'a -> 'b l...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.11/hashtbl.mli
ocaml
type ('a, 'b) t val create : ?random:bool -> int -> ('a, 'b) t val clear : ('a, 'b) t -> unit val reset : ('a, 'b) t -> unit val copy : ('a, 'b) t -> ('a, 'b) t val add : ('a, 'b) t -> 'a -> 'b -> unit val find : ('a, 'b) t -> 'a -> 'b val find_opt : ('a, 'b) t -> 'a -> 'b option val find_all : ('a, 'b) t -> 'a -> 'b l...
a98fb5d1fb0a5c274ba87c38f8d0bbae6ea5d118e9e211d27c688487ead06dec
rtoy/ansi-cl-tests
reverse.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Aug 20 23:47:28 2002 ;;;; Contains: Tests for REVERSE (in-package :cl-test) (deftest reverse-list.1 (reverse nil) nil) (deftest reverse-list.2 (let ((x '(a b c))) (values (reverse x) x)) (c b a) (a b c)) (deftest reverse-vector.1 (reverse #()...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/reverse.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for REVERSE Other unusual vectors Bit vectors Strings Order, number of times of evaluation Constant folding tests Error cases
Author : Created : Tue Aug 20 23:47:28 2002 (in-package :cl-test) (deftest reverse-list.1 (reverse nil) nil) (deftest reverse-list.2 (let ((x '(a b c))) (values (reverse x) x)) (c b a) (a b c)) (deftest reverse-vector.1 (reverse #()) #()) (deftest reverse-vector.2 (let ((x #(a b c d ...