_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
47952a06f03888364cd253c86e0076d743e3bd5b04759887e0d8ab8a0468f660
ocaml-sf/learn-ocaml-corpus
template.ml
(* TO DO: Define the type ['a t] and the functions [make], [get], and [set]. *) type 'a t (* = ... *) let make (x : 'a) : 'a t = raise TODO let get (a : 'a t) (i : int) : 'a = raise TODO let set (a : 'a t) (i : int) (x : 'a) : unit = raise TODO
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/infinite_arrays/wrong/template.ml
ocaml
TO DO: Define the type ['a t] and the functions [make], [get], and [set]. = ...
let make (x : 'a) : 'a t = raise TODO let get (a : 'a t) (i : int) : 'a = raise TODO let set (a : 'a t) (i : int) (x : 'a) : unit = raise TODO
516a5cc7198b68fc63e0da9ff1206bfab167694992bf3945ec980f3b2bbd2a99
pokepay/aws-sdk-lisp
iot.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/iot (:use) (:use-reexport #:aws-sdk/services/iot/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/iot.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/iot (:use) (:use-reexport #:aws-sdk/services/iot/api))
98e330aaab2b478e71ed565763a3c261b2e16e793757a8a83c95dcbdbe56ac96
soulomoon/haskell-katas
ISO.hs
module Kyu2.ISO where import Data.Tuple import Data.Void import Data.Maybe -- Please copy your code of Isomorphism to here. type ISO a b = (a -> b, b -> a) given ISO a b , we can go from a to b substL :: ISO a b -> (a -> b) substL = fst -- and vice versa substR :: ISO a b -> (b -> a) substR = snd There can be ...
null
https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/src/Kyu2/ISO.hs
haskell
Please copy your code of Isomorphism to here. and vice versa isomorphism is reflexive isomorphism is symmetric isomorphism is transitive We can combine isomorphism: Going another way is hard (and is generally impossible) Is the same as the original value. You need this to prove some case are impossible. We ca...
module Kyu2.ISO where import Data.Tuple import Data.Void import Data.Maybe type ISO a b = (a -> b, b -> a) given ISO a b , we can go from a to b substL :: ISO a b -> (a -> b) substL = fst substR :: ISO a b -> (b -> a) substR = snd There can be more than one ISO a b isoBool :: ISO Bool Bool isoBool = (id, id) ...
bb123d0a74956dc1221c720f3c21351b7220d74a4986260c04c1d048944c33b4
Quviq/epoch-eqc
fate_compiler_eqc.erl
File : fate_compiler_eqc.erl Author : %%% Description : Created : 8 Apr 2019 by -module(fate_compiler_eqc). -compile([export_all, nowarn_export_all]). -include_lib("eqc/include/eqc.hrl"). %% -- Compiling and running -------------------------------------------------- -define(VM_FATE_1, 5...
null
https://raw.githubusercontent.com/Quviq/epoch-eqc/87fb692697f9377b95a3fa3f04efce75d8b52f87/aesophia_eqc/fate_compiler_eqc.erl
erlang
Description : -- Compiling and running -------------------------------------------------- -- Generators ------------------------------------------------------------- TODO: int()? -- Pretty printing -------------------------------------------------------- -- Interpretation -----------------------------------------...
File : fate_compiler_eqc.erl Author : Created : 8 Apr 2019 by -module(fate_compiler_eqc). -compile([export_all, nowarn_export_all]). -include_lib("eqc/include/eqc.hrl"). -define(VM_FATE_1, 5). -define(VM_FATE_2, 6). run(Code, Contract, Function0, Arguments) -> try Function ...
460ab3b705e7fc47d554d368993b2bac5cc7388ed6775fa196a3eb70d97e881f
scarvalhojr/haskellbook
section9.11.hs
myZip :: [a] -> [b] -> [(a, b)] myZip [] _ = [] myZip _ [] = [] myZip (x:xs) (y:ys) = (x, y) : myZip xs ys myZipWith :: (a -> b -> c) -> [a] -> [b] -> [c] myZipWith _ [] _ = [] myZipWith _ _ [] = [] myZipWith f (x:xs) (y:ys) = (f x y) : myZipWith f xs ys myZip' :: [a] -> [b] -> [...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter9/section9.11.hs
haskell
myZip :: [a] -> [b] -> [(a, b)] myZip [] _ = [] myZip _ [] = [] myZip (x:xs) (y:ys) = (x, y) : myZip xs ys myZipWith :: (a -> b -> c) -> [a] -> [b] -> [c] myZipWith _ [] _ = [] myZipWith _ _ [] = [] myZipWith f (x:xs) (y:ys) = (f x y) : myZipWith f xs ys myZip' :: [a] -> [b] -> [...
5f7478c4ee17cc3625e84c05d186502af4ae2e9b0212b59e26b2394b636e468a
SchornacklabSLCU/amfinder
uIMagnifier.mli
AMFinder - ui / uIMagnifier.mli * * MIT License * Copyright ( c ) 2021 * * 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 withou...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/ui/uIMagnifier.mli
ocaml
* Module parameters. * Number of tiles to display on the Y axis. * Number of tiles to display on the X axis. * Size, in pixels, of a magnified tile. * Main application window. * Packing function to bind the magnified view to the interface. * Output module. * Matrix of event boxes. * Takes a screenshot of the wh...
AMFinder - ui / uIMagnifier.mli * * MIT License * Copyright ( c ) 2021 * * 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 withou...
90c4779f11b0c3703d3edcc15ee8ca5d575d77a68ba0f87f0ca0598b73f48b13
valderman/haste-compiler
Setup.hs
We need to do some ugly hacks here because of GHC magic module Main (main) where import Control.Monad import Data.List import Data.Maybe import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import Distribution.Simple.Utils im...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/ghc-7.10/ghc-prim/Setup.hs
haskell
I'm not sure which one of these we actually need to change. Replace a file only if the new version is different from the old. This prevents make from doing unnecessary work after we run 'setup makefile' quiet
We need to do some ugly hacks here because of GHC magic module Main (main) where import Control.Monad import Data.List import Data.Maybe import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import Distribution.Simple.Utils im...
e02f5a6538c636d07e49dcc63212716da990eec55d5b8ddb7488e8def0fe84de
stackbuilders/scalendar
Test.hs
module Main where import Test.Hspec import Test.QuickCheck.Property (property) import SCalendarTest.Internal ( alwaysGreateOrEqualThanN , eqIntervalsIfIncludeEachOther , returnsTargetZipper , isLeftMostTopNode ...
null
https://raw.githubusercontent.com/stackbuilders/scalendar/3778aef23f736878669613fb01dad6f4e153384d/test/Test.hs
haskell
module Main where import Test.Hspec import Test.QuickCheck.Property (property) import SCalendarTest.Internal ( alwaysGreateOrEqualThanN , eqIntervalsIfIncludeEachOther , returnsTargetZipper , isLeftMostTopNode ...
cd5916e4ff271fa89a792aab2bce8df2dcf8beaf7e37fb84a060267b9299f8f6
spurious/chibi-scheme-mirror
parse.scm
;; parse.scm -- Parser Combinators Copyright ( c ) 2013 . All rights reserved . ;; BSD-style license: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; parse stream type ;; ;; Abstraction to treat ports as proper streams so that we can backtrack from previous states . A single Pars...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/parse/parse.scm
scheme
parse.scm -- Parser Combinators BSD-style license: parse stream type Abstraction to treat ports as proper streams so that we can represents a single buffered chunk of text. The file the data came from, for debugging and error reporting. The underlying port. A vector of characters read from the port. We use ...
Copyright ( c ) 2013 . All rights reserved . backtrack from previous states . A single Parse - Stream record (define-record-type Parse-Stream (%make-parse-stream filename port buffer cache offset prev-char line column tail) parse-stream? (filename parse-stream-filename) (port parse-stream-port) ...
7073a9b26bac4b8e4f19018445150755b6f39ef40c7191995a59adb80e2a0b78
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Numeral.MY.Rules ( rules ) wh...
null
https://raw.githubusercontent.com/facebook/duckling/c6a48a1d0678a389f86d17db2676e1a289e355ce/Duckling/Numeral/MY/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Numeral.MY.Rules ( rules ) where import Data.HashMap.Strict (HashMap) import Data.String import Data.Text (Text) import Duckling.Dimensions.Types import Duckling.Numeral.Helpers import Duckling.Numeral.Types (NumeralData...
ce75507341efbd4a2228be7fd70c153d38de88990090f29a2cbbc0b6ea210f5f
swarmpit/swarmpit
edit.cljs
(ns swarmpit.component.registry-acr.edit (:require [material.icon :as icon] [material.components :as comp] [material.component.composite :as composite] [swarmpit.component.common :as common] [swarmpit.component.mixin :as mixin] [swarmpit.component.state :as ...
null
https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/registry_acr/edit.cljs
clojure
(ns swarmpit.component.registry-acr.edit (:require [material.icon :as icon] [material.components :as comp] [material.component.composite :as composite] [swarmpit.component.common :as common] [swarmpit.component.mixin :as mixin] [swarmpit.component.state :as ...
e4018f9478109e6937f4f1c7a1affb73f00f05a032141bd7fba86105323a0b8d
theosotr/buildfs
graph.mli
* Copyright ( c ) 2018 - 2020 * * 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 , version 3 . * * This program is distributed in the hope that it will be useful , but ...
null
https://raw.githubusercontent.com/theosotr/buildfs/3cd287da0d1184934c1bcd28d301f2545196f44b/src/analysis/graph.mli
ocaml
* Type for task graph. * The type of nodes. * The type of edges. * This type specifies the edge labels of the graph. * A type that represents different formats for storing task graphs. * Type that represents the output of the DFS algorithm. In particular, this type contains all nodes that are visited by the gi...
* Copyright ( c ) 2018 - 2020 * * 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 , version 3 . * * This program is distributed in the hope that it will be useful , but ...
00ac61d3347d355d1604ae06ee970b097a273ab0b96ca0510e04d8ddc0092bd8
GlideAngle/flare-timing
MeridianRMain.hs
import Test.Tasty (TestTree, testGroup, defaultMain) import qualified Meridian.Sphere as S import qualified Meridian.Ellipsoid.Vincenty as V main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Earth tests (with rationals)" [ testGroup "Haversines Math" [S.unitsR] , testGro...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/test-suite-meridian-r/MeridianRMain.hs
haskell
import Test.Tasty (TestTree, testGroup, defaultMain) import qualified Meridian.Sphere as S import qualified Meridian.Ellipsoid.Vincenty as V main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Earth tests (with rationals)" [ testGroup "Haversines Math" [S.unitsR] , testGro...
a479c514b4c736b5b5a0d5e9ee2901805d78893c597e2b7ce6ec21edefc56798
zakwilson/ceilingbounce
runtime.clj
(ns com.flashlightdb.ceilingbounce.runtime (:require [neko.activity :refer [defactivity set-content-view!]] [neko.notify :as notify] [neko.resource :as res] [neko.find-view :refer [find-view]] [neko.threading :refer [on-ui]] [neko.log :as log] ...
null
https://raw.githubusercontent.com/zakwilson/ceilingbounce/3701bf2f316b7b720701b7af0ca7a34cd01e7d72/src/clojure/com/flashlightdb/ceilingbounce/runtime.clj
clojure
java.lang.ExceptionInInitializerError While the chart view should have a .toBitmap method, it returns nil probably because the larger chart is not drawn, so we draw it manually writing the bitmap has to happen after the drawing stuff is done but let's not block the UI thread slow down the sample rate so the graph...
(ns com.flashlightdb.ceilingbounce.runtime (:require [neko.activity :refer [defactivity set-content-view!]] [neko.notify :as notify] [neko.resource :as res] [neko.find-view :refer [find-view]] [neko.threading :refer [on-ui]] [neko.log :as log] ...
a8b252f4ea832084831f2c0700d5b2c53d9f22d02eb94901dfc262e15e5628cb
ucsd-progsys/dsolve
mapfilter.ml
qual P(x): 0 < x;; qual N(x): x < 0;; ? letrec mapfilter = fun f -> fun l -> match l with [] -> [] | h::t -> let r = mapfilter f t in let x = f h in match x with [] -> r | z::e -> z::r in let pos = fun y -> if 0 < y then y::[] else ...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/mapfilter.ml
ocaml
qual P(x): 0 < x;; qual N(x): x < 0;; ? letrec mapfilter = fun f -> fun l -> match l with [] -> [] | h::t -> let r = mapfilter f t in let x = f h in match x with [] -> r | z::e -> z::r in let pos = fun y -> if 0 < y then y::[] else ...
2569063298a268e329018fcb30cb7f4f2e0fd1a03eb77051e8d02949073c8ab1
cannadayr/ebqn
ebqn_core.erl
-module(ebqn_core). -import(lists,[seq/2,flatten/1]). -import(math,[log/1,exp/1,pow/2]). -import(ebqn,[list/1,call/4]). -export([fns/0,fn/1]). -export([arr/2,r1/1,r2/1,type/3,fill/3,log/3,group_len/3,group_ord/3, plus/3,minus/3,times/3,divide/3,power/3,floor/3,equals/3,lesseq/3,shape/3, reshape/3,pi...
null
https://raw.githubusercontent.com/cannadayr/ebqn/288193970950576deabac5006493044524a0dc77/src/ebqn_core.erl
erlang
use '==' for float-to-int comparisons monadic scan inner with no modifier monadic scan inner with modifier scan monadic outer scan dyadic inner scan dyadic outer
-module(ebqn_core). -import(lists,[seq/2,flatten/1]). -import(math,[log/1,exp/1,pow/2]). -import(ebqn,[list/1,call/4]). -export([fns/0,fn/1]). -export([arr/2,r1/1,r2/1,type/3,fill/3,log/3,group_len/3,group_ord/3, plus/3,minus/3,times/3,divide/3,power/3,floor/3,equals/3,lesseq/3,shape/3, reshape/3,pi...
b1f8d5fdde24a820e09f9b6919809aafc4aa3874e7d3e7568b10ac89f9f4a40d
roglo/mlrogue
rob_misc.ml
$ I d : , v 1.28 2018/04/26 09:52:37 deraugla Exp $ #load "pa_if_match.cmo"; open Printf; open Scanf; open Rob_def; open Rob_position; value string_create = Bytes.create; value string_set = Bytes.set; value string_of_bytes = Bytes.to_string; (* language dependent *) value end_with str s = let len = String.len...
null
https://raw.githubusercontent.com/roglo/mlrogue/b73238bbbc8cd88c83579c3b72772a8c418020e5/rob_misc.ml
ocaml
language dependent probable big room probable big room paths
$ I d : , v 1.28 2018/04/26 09:52:37 deraugla Exp $ #load "pa_if_match.cmo"; open Printf; open Scanf; open Rob_def; open Rob_position; value string_create = Bytes.create; value string_set = Bytes.set; value string_of_bytes = Bytes.to_string; value end_with str s = let len = String.length s in String.length ...
10b5ebf453595ac963dac98ecac9998394a9028eb588e0efdcf5bb48529057ad
i-am-tom/learn-me-a-haskell
GhcUtil.hs
# LANGUAGE CPP # module GhcUtil (withGhc) where import GHC.Paths (libdir) #if __GLASGOW_HASKELL__ < 707 import Control.Exception import GHC hiding (flags) import DynFlags (dopt_set) #else import GHC import DynFlags (gopt_set) #endif import Panic (th...
null
https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/vendor/doctest-0.16.0/src/GhcUtil.hs
haskell
| Save static flag globals, run action, and restore them. We basically do the same thing as `ghc/Main.hs` to distinguish "unrecognised flags" from source files.
# LANGUAGE CPP # module GhcUtil (withGhc) where import GHC.Paths (libdir) #if __GLASGOW_HASKELL__ < 707 import Control.Exception import GHC hiding (flags) import DynFlags (dopt_set) #else import GHC import DynFlags (gopt_set) #endif import Panic (th...
33ae4a629e19b7d2f197a10b9a3b95b7d109cef4e522005e0997124c23e12d06
basho-labs/riak_explorer
re_wm_proxy.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2015 Basho Technologies , Inc. All Rights Reserved . %% 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 ob...
null
https://raw.githubusercontent.com/basho-labs/riak_explorer/3d06ca2b14a57ed2850e56efc280d7e5b5f4bbbc/src/re_wm_proxy.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2015 Basho Technologies , Inc. All Rights Reserved . 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...
5d3e04d1b89bf2ffc06bfcc7a95ccf0c9bab8d3dbcc771340b67216dbe9655a4
chrisdone/freenect
GlutBoundary.hs
# LANGUAGE ViewPatterns # {-# OPTIONS -fno-warn-name-shadowing #-} | Freenect example with GLUT , showing connection boundaries . -- Video demo here: module Main where import Control.Concurrent import Control.Monad import Data.Bits import Data.IORef import Dat...
null
https://raw.githubusercontent.com/chrisdone/freenect/2f17e5a2351b766a7343dca983f240e21f9ba365/examples/src/GlutBoundary.hs
haskell
# OPTIONS -fno-warn-name-shadowing # Video demo here: initialDisplayMode $= [DoubleBuffered]
# LANGUAGE ViewPatterns # | Freenect example with GLUT , showing connection boundaries . module Main where import Control.Concurrent import Control.Monad import Data.Bits import Data.IORef import Data.Vector.Storable (Vector,(!)) import qualified Data.Vector...
0302ea458a9809b99463969e3723f51d5d6708988f0dfe73d3e5b274dfca1fa5
kryonix/pg_cuckoo
OperSem.hs
| Module : OperSem Description : Operational Semantics Monad Copyright : ( c ) Torsten Grust , 2014 , 2019 License : AllRightsReserved Maintainer : < > Stability : stable Generic support to implement operational semantics ( inference rules ) . Module : O...
null
https://raw.githubusercontent.com/kryonix/pg_cuckoo/755e3199b4831d99e716637fbbebbe794a9a7104/PgCuckoo/src/Database/PgCuckoo/OperSem.hs
haskell
|A monad for operational semantics (provides log to trace rule application) * e: environment (e.g., let/for variable bindings) * a: inferred semantic object * l: logged information |Run operational semantics (= apply inference rule r in state s under environment e) |Run operational semantics and return final st...
| Module : OperSem Description : Operational Semantics Monad Copyright : ( c ) Torsten Grust , 2014 , 2019 License : AllRightsReserved Maintainer : < > Stability : stable Generic support to implement operational semantics ( inference rules ) . Module : O...
8b56eb41a2c2f2ed55bf38708dd22a2f3faf1feaef419a81d1e38b5d2e5f4928
jbclements/RSound
check-resample-speed.rkt
#lang typed/racket (require/typed ffi/vector [#:opaque S16Vector s16vector?] [s16vector-length (S16Vector -> Natural)] [s16vector-ref (S16Vector Natural -> Fixnum)] [s16vector-set! (S16Vector Natural Fixnum -> Void)] [make-s16vector (Natural -> S16Vector)] ) (require/typed racket/unsafe/ops [unsafe-s16vec...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/test/check-resample-speed.rkt
racket
add the 'min 1' to the other code no matter what else happens... done cast shouldn't be necessary? Not in inner loop, though. after this new eliminate this cast hopefully: given a number of frames and a left and right generator and a sample rate, produce a sound. avoidable cast? eliminate the exact->inexact?
#lang typed/racket (require/typed ffi/vector [#:opaque S16Vector s16vector?] [s16vector-length (S16Vector -> Natural)] [s16vector-ref (S16Vector Natural -> Fixnum)] [s16vector-set! (S16Vector Natural Fixnum -> Void)] [make-s16vector (Natural -> S16Vector)] ) (require/typed racket/unsafe/ops [unsafe-s16vec...
affeeca2b631233d18dc7c7dfc94bb53f903c733846c6f1b6df03408f34d3290
zyrolasting/racket-vulkan
info.rkt
#lang info (define collection "vulkan") (define deps '("base" "compatibility-lib" "txexpr" "graph-lib" "draw-lib" "natural-cli")) (define build-deps '("scribble-lib" "racket-doc" "rackunit-lib")) (define scribblings '(("scribblings/vulkan.scrbl" (multi-page)))) (define pkg-desc "Vulkan integration for Racket") (define ...
null
https://raw.githubusercontent.com/zyrolasting/racket-vulkan/4f743b4b2933173ee4f141e5ae94739895c54b67/info.rkt
racket
#lang info (define collection "vulkan") (define deps '("base" "compatibility-lib" "txexpr" "graph-lib" "draw-lib" "natural-cli")) (define build-deps '("scribble-lib" "racket-doc" "rackunit-lib")) (define scribblings '(("scribblings/vulkan.scrbl" (multi-page)))) (define pkg-desc "Vulkan integration for Racket") (define ...
44c5049383a92a29e7c945039a6d5938d1380f5643e5f24e416399a7f178ea4c
willghatch/racket-rash
with-transactional-file-list.rkt
#lang rash ;; This isn't *really* transactional. But with proper file system hooks to make ;; things transactional, a truly transactional expression could be this easy to run. (provide call-with-transactional-file-list with-transactional-file-list ) (require shell/utils/bourne-expansion-utils racket/file racke...
null
https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/rash-demos/rash/demo/with-transactional-file-list.rkt
racket
This isn't *really* transactional. But with proper file system hooks to make things transactional, a truly transactional expression could be this easy to run. This is testing a file written as part of a demo of better error handling, yet I'm doing shoddy error handling here. Hmmm...
#lang rash (provide call-with-transactional-file-list with-transactional-file-list ) (require shell/utils/bourne-expansion-utils racket/file racket/list (for-syntax racket/base syntax/parse )) (define (move-or-copy-file src dst) (with-handlers ([(λ(e)#t) (λ (e) (copy-file src dst #t))]) (rename-fi...
2d14d660d66499f87d4e73a52b9bce8623c73e557ddd1013a251c0000ca20fe8
Javran/advent-of-code
Day25.hs
module Javran.AdventOfCode.Y2020.Day25 ( ) where import Control.Monad import qualified Data.HashMap.Strict as HM import Data.Mod import GHC.Natural import GHC.TypeNats (KnownNat, natVal) import Javran.AdventOfCode.Prelude data Day25 deriving (Generic) type ModP = Mod 20201227 babyStepGiantStep :: KnownNat n => Mo...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2020/Day25.hs
haskell
-step_giant-step#The_algorithm
module Javran.AdventOfCode.Y2020.Day25 ( ) where import Control.Monad import qualified Data.HashMap.Strict as HM import Data.Mod import GHC.Natural import GHC.TypeNats (KnownNat, natVal) import Javran.AdventOfCode.Prelude data Day25 deriving (Generic) type ModP = Mod 20201227 babyStepGiantStep :: KnownNat n => Mo...
ba788db6fde92df4d5b9fb0a6c91f506039c7c58c9da190d17fad738444d1627
nilswloka/midje-html-checkers
core.clj
(ns midje-html-checkers.core (:use [midje.checkers.defining :only [defchecker checker]]) (:use [midje.checkers.extended-equality :only [extended-=]]) (:use [net.cgrand.enlive-html :only [select text html-resource text-pred]]) (:import java.io.StringReader)) (defn html-resource-from-string "Creates a html-res...
null
https://raw.githubusercontent.com/nilswloka/midje-html-checkers/6209566aba7e45a221e893b9011e13228831decd/src/midje_html_checkers/core.clj
clojure
(ns midje-html-checkers.core (:use [midje.checkers.defining :only [defchecker checker]]) (:use [midje.checkers.extended-equality :only [extended-=]]) (:use [net.cgrand.enlive-html :only [select text html-resource text-pred]]) (:import java.io.StringReader)) (defn html-resource-from-string "Creates a html-res...
287676bcfdb9cc0d5163a9b5f2152c0f80bec9e2b79ce04bae89934e12b533f4
facet-lang/facet
IO.hs
{-# LANGUAGE GADTs #-} # LANGUAGE UndecidableInstances # module Facet.Carrier.Output.IO ( -- * Output carrier runOutput , OutputC(OutputC) -- * Output effect , module Facet.Effect.Readline ) where import Control.Algebra import Control.Monad.Fix import Control.Monad.IO.Class import Control.Monad.Trans.Class import ...
null
https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Carrier/Output/IO.hs
haskell
# LANGUAGE GADTs # * Output carrier * Output effect
# LANGUAGE UndecidableInstances # module Facet.Carrier.Output.IO runOutput , OutputC(OutputC) , module Facet.Effect.Readline ) where import Control.Algebra import Control.Monad.Fix import Control.Monad.IO.Class import Control.Monad.Trans.Class import Facet.Effect.Readline import Facet.Pretty (putDocWith) import Face...
349510c81e2b96fd3fcb8bf88a302c0b9d593cecccc42983e9d823119900ec5a
naoiwata/sicp
ex3.80.scm
;; ;; @author naoiwata SICP Chapter3 Exercise 3.80 . ;; ; ------------------------------------------------------------------------ ; question ; ------------------------------------------------------------------------ (add-load-path "./pages/" :relative) (load "stream.scm") (define (add-streams s1 s2) (stream-m...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.80.scm
scheme
@author naoiwata ------------------------------------------------------------------------ question ------------------------------------------------------------------------
SICP Chapter3 Exercise 3.80 . (add-load-path "./pages/" :relative) (load "stream.scm") (define (add-streams s1 s2) (stream-map + s1 s2)) (define (scale-stream stream factor) (stream-map (lambda (x) (* x factor)) stream)) (define (integral integrand initial-value dt) (define int (cons-stream initial-v...
d40e8ae79203d0b65cc32c7aaeab46a5dfafef438d56217fc600d4dbfac62bce
stonebuddha/eopl
syntax.mli
type program = | AProgram of top_level list and top_level = | ValTop of string * expression | FunTop of string * expression and expression = | ConstExp of int * Ploc.t | DiffExp of expression * expression * Ploc.t | IsZeroExp of expression * Ploc.t | IfExp of expression * expression * expression * Ploc....
null
https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/EXPLICIT-REFS-EXT/syntax.mli
ocaml
type program = | AProgram of top_level list and top_level = | ValTop of string * expression | FunTop of string * expression and expression = | ConstExp of int * Ploc.t | DiffExp of expression * expression * Ploc.t | IsZeroExp of expression * Ploc.t | IfExp of expression * expression * expression * Ploc....
e23ebc37b6717e973a38826767d5f503f12e22e0aec985537abacc052e1b1c75
metabase/metabase
files.clj
(ns metabase.util.files "Low-level file-related functions for implementing Metabase plugin functionality. These use the `java.nio.file` library rather than the usual `java.io` stuff because it abstracts better across different filesystems (such as files in a normal directory vs files inside a JAR.) As much as ...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/util/files.clj
clojure
--------------------------------------------------- Path Utils --------------------------------------------------- -> #object[sun.nio.fs.UnixPath 0x4d378139 \"/Users/cam/metabase/metabase/plugins\"]" ----------------------------------------------- Other Basic Utils ------------------------------------------------ -...
(ns metabase.util.files "Low-level file-related functions for implementing Metabase plugin functionality. These use the `java.nio.file` library rather than the usual `java.io` stuff because it abstracts better across different filesystems (such as files in a normal directory vs files inside a JAR.) As much as ...
02842829e049b52d46ff02cf63f74182498f52fe0dd69f6c714c296631e635aa
phadej/vec
Main.hs
module Main (main) where /-/issues/19397 import qualified Tests main :: IO () main = Tests.main
null
https://raw.githubusercontent.com/phadej/vec/a895ab79e054987938295d5a149758eb79d85683/tests/test/Main.hs
haskell
module Main (main) where /-/issues/19397 import qualified Tests main :: IO () main = Tests.main
a32f14da9e95ce0bdf8cee14594a5308e45f10b3956132e92dc318ef19cd9065
jeromesimeon/Galax
lexing_util.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/lexing/lexing_util.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : lexing_util.ml , v 1.29 2007/10/16 01:25:34 open Error open Xquery_common_ast open Xquery_ast open Xquery_core_ast open Parse_xquery Lexing global parameters type encoding_kind = | Utf8 | Iso88591 type language_kind ...
f3b10137ca56cd7f57df49ed9ed12607daccf284a7fa276dd55e98fb323e37d8
ghc/packages-Cabal
CabalDoctestSetup.hs
This is Distribution . Extra . Doctest module from cabal - doctest-1.0.4 -- This isn't technically a Custom-Setup script, but it /was/. Copyright ( c ) 2017 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the followin...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/tests/custom-setup/CabalDoctestSetup.hs
haskell
This isn't technically a Custom-Setup script, but it /was/. # LANGUAGE OverloadedStrings # | The provided 'generateBuildModule' generates 'Build_doctests' module. That module exports enough configuration, so your doctests could be simply @ module Main where main :: IO () main = do traverse_ putStrLn args...
This is Distribution . Extra . Doctest module from cabal - doctest-1.0.4 Copyright ( c ) 2017 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code ...
bab8d01cd653013efd7f60c0123581c895b166263577da8bd1d35f65c9a123c9
johnlawrenceaspden/hobby-code
user.clj
;; Code to run before any repls start You can add an incantation to leiningen which means that this only gets run in ' run ' tasks , and not packaged into jars and such (println "beginning of user.clj") ( set ! * print - length * 27 ) does n't work because this gets run before thread - local bindings ! (alter-var...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/hidefromleiningen/user.clj
clojure
Code to run before any repls start
You can add an incantation to leiningen which means that this only gets run in ' run ' tasks , and not packaged into jars and such (println "beginning of user.clj") ( set ! * print - length * 27 ) does n't work because this gets run before thread - local bindings ! (alter-var-root #'*print-length* (constantly 27)...
dc7b2ebedbbde68652618da32672c65bd7e9c5d83a7b71dfa46249f18126ae26
onedata/op-worker
atm_openfaas_activity_feed_test_SUITE.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Tests of OpenFaaS activity feed, c...
null
https://raw.githubusercontent.com/onedata/op-worker/cc7842f97f2a8652648f405776084fa6ea2d507e/test_distributed/suites/automation/atm_openfaas_activity_feed_test_SUITE.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Tests of OpenFaaS activity feed, covering the WebSocket server and the communication protocol. Tests integration with openfaas-pod-status-monitor and openfaas-lambda-res...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(atm_openfaas_activity_feed_test_SUITE). -author("Lukasz Opiola"). -include("modules/automation/atm_execution.hrl"). -include("onenv_test_utils.hrl"). -include_lib("cluster_worker/include/au...
1142bc31fdfd1dddb946a279aa72df66faca6c923bb3ec3f790b98aa4fd7c0ab
dongcarl/guix
cargo.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 , 2016 , 2019 < > Copyright © 2013 < > Copyright © 2013 < > Copyright © 2016 < > Copyright © 2019 < > Copyright © 2020 < > Copyright © 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is fr...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/build-system/cargo.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 , 2015 , 2016 , 2019 < > Copyright © 2013 < > Copyright © 2013 < > Copyright © 2016 < > Copyright © 2019 < > Copyright © 2020 < > Copyright © 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the G...
7841d86c219f7656f45da63a57214811c3624efaaef9a1bd478efd7bf7a77520
dbuenzli/topkg
topkg_conf.ml
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/topkg/e30927fed486e4642e9f167908fd92cbd44609d1/src/topkg_conf.ml
ocaml
Configuration value converters Configuration keys unique id for the key. key name. key value converter. value if unspecified. environment variable to override [absent]. convert to universal value. convert from universal value. documentation for the key. WARNING raises Failure exciting... Predef...
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
8338c59c88f795517c934b25dc16b61380e35c5c17c11a1e4bbd33990cce6ad0
cbaggers/varjo
switch.lisp
(in-package :vari.glsl) (in-readtable fn:fn-reader) ;;------------------------------------------------------------ Switch (v-defmacro switch (test-form &body clauses) (assert (loop :for (test) :in clauses :always (valid-for-switch-statementp test)) () 'switch-type-error :form (cons test-for...
null
https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/vari.glsl/special-operators/switch.lisp
lisp
------------------------------------------------------------ ------------------------------------------------------------
(in-package :vari.glsl) (in-readtable fn:fn-reader) Switch (v-defmacro switch (test-form &body clauses) (assert (loop :for (test) :in clauses :always (valid-for-switch-statementp test)) () 'switch-type-error :form (cons test-form clauses)) `(case ,test-form ,@clauses)) (defun valid-for-s...
7113ca9e956bb6245cad86a96270b12527c9d89d84f8990534ed441cfe69bcb2
wdebeaum/step
wearisome.lisp
;;;; W::wearisome ;;;; (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (W::wearisome (SENSES ((meta-data :origin cardiac :entry-date 20090422 :change-date 20090821 :comments nil :wn ("difficult%3:00:00")) (EXAMPLE "It's tiresome [for him]") ) (TEMPL adj-content-affected-optional-...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wearisome.lisp
lisp
W::wearisome (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (W::wearisome (SENSES ((meta-data :origin cardiac :entry-date 20090422 :change-date 20090821 :comments nil :wn ("difficult%3:00:00")) (EXAMPLE "It's tiresome [for him]") ) (TEMPL adj-content-affected-optional-xp-templ) ...
2231e172a73328ab049df76bdcc0ccb8bd78794cc03dabcb747eb005e590b0ed
alvatar/spheres
mirror-equ.scm
(cout nl "Structural Inductive proof with equational theory: mirror" nl) $ I d : mirror - equ.scm , v 4.50 2005/02/12 00:04:46 oleg Exp $ ; See mirror.scm for preliminaries (define btree (lambda (kb) (extend-relation (t) (fact (val) `(btree (leaf ,val))) (relation (t1 t2) (to-show `(btree (root ...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/doc/logic/kanren-examples/mirror-equ.scm
scheme
See mirror.scm for preliminaries reflexivity symmetry transitivity equational theory of trees equality commutes with root equality on leaves follows from the reflexivity of equality equational theory of mirror equality commutes with root myeq(leaf(X),mirror(leaf(X))). (define mirror-axiom-eq-2 (forall ?t1...
(cout nl "Structural Inductive proof with equational theory: mirror" nl) $ I d : mirror - equ.scm , v 4.50 2005/02/12 00:04:46 oleg Exp $ (define btree (lambda (kb) (extend-relation (t) (fact (val) `(btree (leaf ,val))) (relation (t1 t2) (to-show `(btree (root ,t1 ,t2))) (all (trace-vars 'bt...
1a4bbe8cebb000fe4aa7ea2bc3f91183d345966e293fea0f800f39f6c09097bb
gedge-platform/gedge-platform
credentials_obfuscation.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2019 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(credentials_obfuscation). %% Configurati...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/credentials_obfuscation/src/credentials_obfuscation.erl
erlang
Configuration API API
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2019 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(credentials_obfuscation). -export([enabled/0, ...
3a14a692e497502c977f6e4d2eb9c8b79a0225616d0c4c17ca803a762405138b
hiroshi-unno/coar
state.ml
open Core open Common.Ext open Ast type info = { num_cegis_iters : int } type output = PCSP.Problem.solution * info let merge_infos infos = { num_cegis_iters = List.fold ~init:0 ~f:(+) (List.map infos ~f:(fun info -> info.num_cegis_iters)) } type _ t = | Sat of CandSol.t | Unsat | Timeout | OutSpace of Ide...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/common/state.ml
ocaml
* with solution * without solution
open Core open Common.Ext open Ast type info = { num_cegis_iters : int } type output = PCSP.Problem.solution * info let merge_infos infos = { num_cegis_iters = List.fold ~init:0 ~f:(+) (List.map infos ~f:(fun info -> info.num_cegis_iters)) } type _ t = | Sat of CandSol.t | Unsat | Timeout | OutSpace of Ide...
271f26345dde3022b706bd6116f55dffcd98f05f7b1f25c76d23dc20474f5876
samrushing/irken-compiler
t_insert0.scm
;; -*- Mode: Irken -*- (include "lib/basis.scm") (include "lib/map.scm") (printn (insert (list 0 1 2 3 4 5) 0 99)) (printn (insert (list 0 1 2 3 4 5) 1 99)) (printn (insert (list 0 1 2 3 4 5) 2 99)) (printn (insert (list 0 1 2 3 4 5) 3 99)) (printn (insert (list 0 1 2 3 4 5) 4 99)) (printn (insert (list 0 1 2 3 4 5) ...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_insert0.scm
scheme
-*- Mode: Irken -*-
(include "lib/basis.scm") (include "lib/map.scm") (printn (insert (list 0 1 2 3 4 5) 0 99)) (printn (insert (list 0 1 2 3 4 5) 1 99)) (printn (insert (list 0 1 2 3 4 5) 2 99)) (printn (insert (list 0 1 2 3 4 5) 3 99)) (printn (insert (list 0 1 2 3 4 5) 4 99)) (printn (insert (list 0 1 2 3 4 5) 5 99)) (printn (insert ...
3873080ca05e35a4d80ba3ae75e0dffc031913f47ed7a4e0227958fba1be125e
PLSysSec/lio
Application.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Application where import Prelude hiding (writeFile, readFile, appendFile) import Control.Applicative import Control.Monad import Control.Monad.IO.Class import Blog.Common import Data.Aeson import qualified Data.Byt...
null
https://raw.githubusercontent.com/PLSysSec/lio/622a3e7bc86a3b42ab4ce8be954064a5f142247a/lio-simple/examples/blog/Application.hs
haskell
# LANGUAGE OverloadedStrings # Data model | Directory containing all posts | Get post by id | Get all posts | Save post to file | Get all the post id's Respond to "/new" Repond to GET "/:id" Create form
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Application where import Prelude hiding (writeFile, readFile, appendFile) import Control.Applicative import Control.Monad import Control.Monad.IO.Class import Blog.Common import Data.Aeson import qualified Data.ByteString.Char8 as S8 import Data.Lis...
79ea3a33a4709639a6d2397aa9a9b832234f994b8d9120b01f7876b32248d8e1
JustusAdam/language-haskell
GADTs.hs
SYNTAX TEST " source.haskell " " GADTs " data G :: a -> (b :: B) -> c -> Type where ^^^^ ^^ ^^ keyword.operator.double-colon.haskell ^ ^ ^ variable.other.generic-type.haskell -- ^^ ^^ ^^ keyword.operator.arrow.haskell ^ ...
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tests/GADTs.hs
haskell
^^ ^^ ^^ keyword.operator.arrow.haskell ^^^^^^ keyword.other.where.haskell ^ constant.other.haskell ^ constant.other.haskell ^^ constant.other.operator.prefix.haskell ^ storage.type.infix.haskell ...
SYNTAX TEST " source.haskell " " GADTs " data G :: a -> (b :: B) -> c -> Type where ^^^^ ^^ ^^ keyword.operator.double-colon.haskell ^ ^ ^ variable.other.generic-type.haskell ^ ^ ^^^^ storage.type.haskell A :: G A b c ...
1644a4154a03d0911f2f32bbaf4412051ecc324b62e4c8de61d3d57f9b9d663c
monadfix/shower
Parser.hs
-- | A @megaparsec@ implementation of a parser for 'Shower'. module Shower.Parser (pShower) where import Data.Void import Data.Char import Text.Megaparsec import Text.Megaparsec.Char import Shower.Class type Parser = Parsec Void String pLexeme :: Parser a -> Parser a pLexeme p = p <* space -- | Parser for 'Shower'...
null
https://raw.githubusercontent.com/monadfix/shower/3e02d92e0500e41b4e9932294f4960463a7222d4/lib/Shower/Parser.hs
haskell
| A @megaparsec@ implementation of a parser for 'Shower'. | Parser for 'Shower' expressions.
module Shower.Parser (pShower) where import Data.Void import Data.Char import Text.Megaparsec import Text.Megaparsec.Char import Shower.Class type Parser = Parsec Void String pLexeme :: Parser a -> Parser a pLexeme p = p <* space pShower :: Shower a => Parsec Void String a pShower = space *> pExpr pExpr :: Shower...
fd372f3d9f9e0d5f06043d7ddbd22e4faa47f6bee25acc857d554389019a5842
justinethier/cyclone
fac.scm
(import (scheme base) (scheme write)) (define (fac n) (if (= n 0) 1 (* n (fac (- n 1))))) (write (fac 10))
null
https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/examples/fac.scm
scheme
(import (scheme base) (scheme write)) (define (fac n) (if (= n 0) 1 (* n (fac (- n 1))))) (write (fac 10))
37972341380b8cf7b4611fc0d60286f32957b4c18003ec83005b1e1b3316d721
coq/coq
tac2stdlib.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/4b812ba203b09e30f88e0174cc72abdf5da22e26/plugins/ltac2/tac2stdlib.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
1b3fdd6ff6516ed87ed860a62bc3dba23f82c9baf174b503379125d1b90e65fd
brendanhay/gogol
List.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-logging/gen/Gogol/Logging/Folders/Logs/List.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /See:/ </ Cloud Logging API Reference> for @logging.folders.logs.list@. * Resource ** Constructing a Request | A...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
67951477b1442cbc07e3e92e00b71146be8ebd44bb260dfe2a390585809c8920
GaloisInc/saw-script
What4.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE GADTs #-} module SAWScript.Prover.What4 where import Control.Lens ((^.)) import Data.List (nub) import Data.Set (Set) import qualified Data.Map as Map...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/a31e031a9269da9192fafc824c2e2b3500cd1d75/src/SAWScript/Prover/What4.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # -------------------------------------------------------------- trivial state TODO: get rid of GlobalNonceGenerator ??? Write smt out Assume unsat ^ Hash-consing of What4 terms ^ A proposition to be proved ^ Solver tactic ^ Hash-consing of What4 terms ^ A propositi...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # module SAWScript.Prover.What4 where import Control.Lens ((^.)) import Data.List (nub) import Data.Set (Set) import qualified Data.Map as Map import qualified Data.Text as Text import ...
f101bc4ff307b2aa3898033cb5371386d9cddef38cdd578a287c63225ca27b2b
nikita-volkov/rerebase
Class.hs
module Data.Semigroup.Traversable.Class ( module Rebase.Data.Semigroup.Traversable.Class ) where import Rebase.Data.Semigroup.Traversable.Class
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Semigroup/Traversable/Class.hs
haskell
module Data.Semigroup.Traversable.Class ( module Rebase.Data.Semigroup.Traversable.Class ) where import Rebase.Data.Semigroup.Traversable.Class
dab9fbcceb55b1f7b557e01fe06ab538d82b3a0dcc937196ffac1eb62037c42f
YoEight/eventstore
PersistOperations.hs
-------------------------------------------------------------------------------- -- | -- Module : Database.EventStore.Internal.Operation.PersistOperations Copyright : ( C ) 2017 -- License : (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- Portability : non-portable -- -----------------...
null
https://raw.githubusercontent.com/YoEight/eventstore/8ca0f72acfc85b97de0a1862d38ee6e9f2ae2e4c/Database/EventStore/Internal/Operation/PersistOperations.hs
haskell
------------------------------------------------------------------------------ | Module : Database.EventStore.Internal.Operation.PersistOperations License : (see the file LICENSE) Stability : provisional Portability : non-portable ------------------------------------------------------------------------------ ---...
Copyright : ( C ) 2017 Maintainer : < > module Database.EventStore.Internal.Operation.PersistOperations ( createPersist , updatePersist , deletePersist ) where import Data.ProtocolBuffers import Database.EventStore.Internal.Command import Database.EventStore.Internal.Communication (Transmit(..)) impo...
5d0db03b0ed9dac9e627b4ca0b08803c7f42b997a70bd3a774e2bcf68380c007
basho/stableboy
sb_file.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved . %% 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 ob...
null
https://raw.githubusercontent.com/basho/stableboy/fcb944872069a0994da0b288257acefe8256009a/src/sb_file.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved . 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...
7989032926e64ddacc56243aee67ca0174f1830a28032bf7acc19b27e25eebea
stackbuilders/scalendar
Constructors.hs
module SCalendarTest.Constructors where import Time.SCalendar.Operations (augmentCalendar) import SCalendarTest.Helpers (startDay) import Data.Maybe (fromMaybe) import Time.SCalendar.Internal ( daysBetween , getInterval ) import Time.SCalendar.Types ( SCalendar(..) ...
null
https://raw.githubusercontent.com/stackbuilders/scalendar/3778aef23f736878669613fb01dad6f4e153384d/test/SCalendarTest/Constructors.hs
haskell
module SCalendarTest.Constructors where import Time.SCalendar.Operations (augmentCalendar) import SCalendarTest.Helpers (startDay) import Data.Maybe (fromMaybe) import Time.SCalendar.Internal ( daysBetween , getInterval ) import Time.SCalendar.Types ( SCalendar(..) ...
077dcce975d6ca9c2d5abf5ae4acd6921038bc1ff8782ce4fe02ad0221199945
shayan-najd/QFeldspar
CDSL.hs
module QFeldspar.CDSL (module QFeldspar.Prelude.MiniFeldspar{-,shared-},(.), evaluate,compile,compileF,normalise,normaliseF,compileF', simplify,simplifyF,cdsl,makeIP,makeIPAt) where import QFeldspar.Prelude.MiniFeldspar import QFeldspar.Prelude.Environment import QFeldspar.Singleton import QFeldspar.MyPrelude ...
null
https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/CDSL.hs
haskell
,shared
module QFeldspar.CDSL evaluate,compile,compileF,normalise,normaliseF,compileF', simplify,simplifyF,cdsl,makeIP,makeIPAt) where import QFeldspar.Prelude.MiniFeldspar import QFeldspar.Prelude.Environment import QFeldspar.Singleton import QFeldspar.MyPrelude (frmRgt,String,(.),(++),IO,writeFile,return) import quali...
3eb4c60aef5bee3e090c7c95c2abe8f509b4962345b586cdc94cc65b3bdf88db
suhailshergill/extensible-effects
Utils.hs
module Utils where import Control.Exception (ErrorCall, catch) import Control.Monad import Control.Monad.Trans.Control import System.IO.Silently import Data.Tuple (swap) import Test.HUnit hiding (State) -- | capture stdout -- [[][source]] catchOutput :: IO a -> IO (a, String) catchOutput f = swap `fmap` capture f ...
null
https://raw.githubusercontent.com/suhailshergill/extensible-effects/249073ccc26f0c49b4bb72cc577d75ef19635f06/test/Utils.hs
haskell
| capture stdout [[][source]]
module Utils where import Control.Exception (ErrorCall, catch) import Control.Monad import Control.Monad.Trans.Control import System.IO.Silently import Data.Tuple (swap) import Test.HUnit hiding (State) catchOutput :: IO a -> IO (a, String) catchOutput f = swap `fmap` capture f withError :: a -> ErrorCall -> a wit...
20a80fcb4462004ee0682a65f3dc0862957e5df1dcbb85e48075a6f7b5fc4c54
geocaml/ocaml-topojson
topojsone.ml
(* Handling Large size TopoJSON document *) Copyright ( c ) 2013 < > Copyright ( c ) 2021 - 2022 < > Permission to use , copy , modify , and/or distribute this software for any purpose with or without fee is hereby granted , provided that the above copyright notice and this permission notic...
null
https://raw.githubusercontent.com/geocaml/ocaml-topojson/7c2e19871bf2c4ac4f43142f177e36cb48aa4d3d/src/topojsonm/topojsone.ml
ocaml
Handling Large size TopoJSON document
Copyright ( c ) 2013 < > Copyright ( c ) 2021 - 2022 < > Permission to use , copy , modify , and/or distribute this software for any purpose with or without fee is hereby granted , provided that the above copyright notice and this permission notice appear in all copies . THE SOFTWARE ...
13aa495248f49f2e69b0b5618aa7e6d82ab288f515c7b5b614f16dc16b2ff8b6
dwayne/eopl3
ex1.13.rkt
#lang racket ;; S-list ::= ({S-exp}*) ;; S-exp ::= Symbol | S-list ;; symbol? symbol? s-list? . -> . s-list? (define (subst new old slist) (map ;; subst-in-s-exp (lambda (sexp) (if (symbol? sexp) (if (symbol=? sexp old) new sexp) (subst new old sexp))) slist)) (module+ test (requ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/01-ch1/racket/ex1.13.rkt
racket
S-list ::= ({S-exp}*) S-exp ::= Symbol | S-list symbol? symbol? s-list? . -> . s-list? subst-in-s-exp
#lang racket (define (subst new old slist) (map (lambda (sexp) (if (symbol? sexp) (if (symbol=? sexp old) new sexp) (subst new old sexp))) slist)) (module+ test (require rackunit) (check-equal? (subst 'a 'b '((b c) (b () d))) '((a c) (a () d))))
52901743ab77f6d376e9ed9c5200e8508256fe9da01a377eeb3873f78105059f
c-cube/ocaml-bigstring
test.ml
module Unix_ = Unix open Alcotest let socketpair _dom ty proto = let open Unix_ in let s = socket PF_INET ty proto and c = socket PF_INET ty proto in bind s (ADDR_INET (inet_addr_loopback, 0)); let saddr = getsockname s in match ty with | SOCK_DGRAM -> connect c saddr; let caddr = getsockname...
null
https://raw.githubusercontent.com/c-cube/ocaml-bigstring/6cd528ed4bce75500fb7d73d6789093e9720522a/test/test.ml
ocaml
module Unix_ = Unix open Alcotest let socketpair _dom ty proto = let open Unix_ in let s = socket PF_INET ty proto and c = socket PF_INET ty proto in bind s (ADDR_INET (inet_addr_loopback, 0)); let saddr = getsockname s in match ty with | SOCK_DGRAM -> connect c saddr; let caddr = getsockname...
0dc7b6b70e0a1648496b65c6ab0ab6c6c0d27d33d7b4ca4dbec1600edb631eaa
glossopoeia/glossolalia
finnish-like.rkt
#lang glossolalia Sounds ------ -- Despite seeming simple upon first glance, Finnish is suprisingly -- difficult to replicate. I'm still not sure I've got it right. @onset = m, n, p, t, k, f, s, h, w, l, j, r @short = a, e, i, o, u, y, ä = 5%, ö = 5% @long = aa, ee, ii, oo, uu, yy, ää = 5%, öö = 5% @coda = m, n, n...
null
https://raw.githubusercontent.com/glossopoeia/glossolalia/2f7d6c2865267aaee4709ca6640243b89ecf6c6d/examples/finnish-like.rkt
racket
#lang glossolalia Sounds ------ -- Despite seeming simple upon first glance, Finnish is suprisingly -- difficult to replicate. I'm still not sure I've got it right. @onset = m, n, p, t, k, f, s, h, w, l, j, r @short = a, e, i, o, u, y, ä = 5%, ö = 5% @long = aa, ee, ii, oo, uu, yy, ää = 5%, öö = 5% @coda = m, n, n...
103c392d5c6b9d4cd27dbcaeb883aa10e5f5e226dacfb9ef70d42a3e27cc97bd
tek/polysemy-hasql
Tree.hs
module Polysemy.Db.Type.Data.Tree where import qualified Data.Text as Text import Exon (exon) import Generics.SOP (All, Compose, K (K), NP, NS, hcmap, hcollapse) import Prelude hiding (Compose) import qualified Text.Show as Show import Polysemy.Db.Data.FieldId (FieldIdText, fieldIdTextRaw) import qualified Polysemy.D...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/2bdfb5c4a0c15b66a33412e24c1668efa7e66e08/packages/db/lib/Polysemy/Db/Type/Data/Tree.hs
haskell
module Polysemy.Db.Type.Data.Tree where import qualified Data.Text as Text import Exon (exon) import Generics.SOP (All, Compose, K (K), NP, NS, hcmap, hcollapse) import Prelude hiding (Compose) import qualified Text.Show as Show import Polysemy.Db.Data.FieldId (FieldIdText, fieldIdTextRaw) import qualified Polysemy.D...
a89a7135830c0d17e01221bbe29a4a2cd215a097d5ca66d856fe380cac320a5f
schleyfox/storm-test
drpc.clj
(ns storm.test.test.drpc (:use [clojure.test]) (:use [backtype.storm testing config]) (:use [storm.test drpc capturing-topology util]) (:import [backtype.storm LocalDRPC]) (:import [storm.test DRPCExclamationTopology])) (defn drpc-exclamation-topology [drpc] (DRPCExclamationTopology/makeTopology drpc)) ...
null
https://raw.githubusercontent.com/schleyfox/storm-test/db55be66c059e5310a2a90ae1423f3a4667b238a/test/storm/test/test/drpc.clj
clojure
(ns storm.test.test.drpc (:use [clojure.test]) (:use [backtype.storm testing config]) (:use [storm.test drpc capturing-topology util]) (:import [backtype.storm LocalDRPC]) (:import [storm.test DRPCExclamationTopology])) (defn drpc-exclamation-topology [drpc] (DRPCExclamationTopology/makeTopology drpc)) ...
cbc3e648d867be78bbea7fb3f7eebbf8fc790066fed021147b8e7c2343e9b2ef
NetworkVerification/nv
BddFunc.mli
open Cudd open Syntax type t = | BBool of Bdd.vt | BInt of Bdd.vt array | BOption of Bdd.vt * t | Tuple of t list | BMap of BddMap.t | Value of Syntax.value val bdd_of_bool : bool -> Cudd.Man.v Cudd.Bdd.t val value_mtbdd_bool_mtbdd : value Cudd.Mtbdd.unique Cudd.Vdd.t -> bool Cudd.Mtbdd.unique Cudd....
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/lang/BDD/BddFunc.mli
ocaml
open Cudd open Syntax type t = | BBool of Bdd.vt | BInt of Bdd.vt array | BOption of Bdd.vt * t | Tuple of t list | BMap of BddMap.t | Value of Syntax.value val bdd_of_bool : bool -> Cudd.Man.v Cudd.Bdd.t val value_mtbdd_bool_mtbdd : value Cudd.Mtbdd.unique Cudd.Vdd.t -> bool Cudd.Mtbdd.unique Cudd....
dbcf6bbfe91d83362dac8435759fd3f26f26b9ff7632cb9d4aac4ba852d35b5c
abtv/tech-radar
statistic_test.clj
(ns tech-radar.analytics.statistic-test (:require [clojure.test :refer :all] [clj-time.core :refer [now]] [tech-radar.analytics.model :refer [new-model]] [tech-radar.analytics.protocols :as protocols])) (deftest statistic-test (let [model (new-model nil {:max-tweet-count ...
null
https://raw.githubusercontent.com/abtv/tech-radar/167c1c66ff2cf7140fe1de247d67a7134b0b1748/test/tech_radar/analytics/statistic_test.clj
clojure
(ns tech-radar.analytics.statistic-test (:require [clojure.test :refer :all] [clj-time.core :refer [now]] [tech-radar.analytics.model :refer [new-model]] [tech-radar.analytics.protocols :as protocols])) (deftest statistic-test (let [model (new-model nil {:max-tweet-count ...
b7443c0b10bd3fe2b51fdcf7417d4209e8c1041bcd2d1e872d81a1e2fe6e7aed
FranklinChen/hugs98-plus-Sep2006
Quadrics.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GLU.Quadrics Copyright : ( c ) 2002 - 2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : ...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GLU/Quadrics.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GLU.Quadrics License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : provisional Portability : portable -------------------------------------------...
Copyright : ( c ) 2002 - 2005 This module corresponds to chapter 6 ( Quadrics ) of the GLU specs . module Graphics.Rendering.OpenGL.GLU.Quadrics ( QuadricNormal, QuadricTexture(..), QuadricOrientation(..), QuadricDrawStyle(..), QuadricStyle(..), Radius, Height, Angle, Slices, Stacks, Loops, Quadric...
5f62bd596b6ed3abcac293285fe661e4eae0a42aef943b655a5b0c9c1e923334
pjagielski/disclojure-ui
config.cljs
(ns disclojure-ui.config) (def debug? ^boolean js/goog.DEBUG) (when debug? (enable-console-print!)) (def api-base "/api") (def res 0.25)
null
https://raw.githubusercontent.com/pjagielski/disclojure-ui/327d2af8f5a904e4ad66f79dc1682d5d79bea0d2/src/cljs/disclojure_ui/config.cljs
clojure
(ns disclojure-ui.config) (def debug? ^boolean js/goog.DEBUG) (when debug? (enable-console-print!)) (def api-base "/api") (def res 0.25)
d03b3f29da446c9ff5a9a13b3c777768036ba103b9f2c8fb3e6ef830012b3724
ubf/ubf-jsonrpc
jsf_driver.erl
@doc Protocol driver process for JSF ( JavaScript Format ) protocol %% sessions. -module(jsf_driver). -behaviour(contract_driver). -export([start/1, start/2, init/1, init/2, encode/3, decode/4]). start(Contract) -> start(Contract, []). start(Contract, Options) -> proc_utils:spawn_link_debug(fun() -> contr...
null
https://raw.githubusercontent.com/ubf/ubf-jsonrpc/5cae67c1668d4c3b645a3025143e0b90343480dc/src/jsf_driver.erl
erlang
sessions.
@doc Protocol driver process for JSF ( JavaScript Format ) protocol -module(jsf_driver). -behaviour(contract_driver). -export([start/1, start/2, init/1, init/2, encode/3, decode/4]). start(Contract) -> start(Contract, []). start(Contract, Options) -> proc_utils:spawn_link_debug(fun() -> contract_driver:st...
c3b643459aa5095ca4bf06049ba2115bd88a8a095b09954db335485192903002
kototama/picobit
test-gc.scm
(define (foo c) (let ((x (cons 2 3))) (cons 3 (foo c))) ( if ( display ( car ( cons 2 3 ) ) ) ;; (foo) ;; (foo)) ) (foo '())
null
https://raw.githubusercontent.com/kototama/picobit/8bdfc092266803bc6b1151177a7e668c9b050bea/tests/test-gc.scm
scheme
(foo) (foo))
(define (foo c) (let ((x (cons 2 3))) (cons 3 (foo c))) ( if ( display ( car ( cons 2 3 ) ) ) ) (foo '())
ba2c20f367f00d7de946b517ecf55eccd0207995cbd9a802d649d1d303c13cdb
geremih/xcljb
xprint_types.clj
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.xprint-types (:require [xcljb gen-common] [xcljb.gen xproto-types])) (def STRING8 xcljb.gen.xproto-types/char) (def PRINTER (xcljb.gen-common/->Struct [(xcljb.gen-common/->Field "name-len" xcljb.gen.xproto-types/CARD32) (xcl...
null
https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/xprint_types.clj
clojure
Manually written.
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.xprint-types (:require [xcljb gen-common] [xcljb.gen xproto-types])) (def STRING8 xcljb.gen.xproto-types/char) (def PRINTER (xcljb.gen-common/->Struct [(xcljb.gen-common/->Field "name-len" xcljb.gen.xproto-types/CARD32) (xcl...
5e1ebc21cfc4a404fee6ee687dd2c3e1d86b88fcb4bd1a44a30d8db4fa3e95ab
gar1t/lambdapad
lpad_file.erl
Copyright 2014 < > %%% 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 distribute...
null
https://raw.githubusercontent.com/gar1t/lambdapad/483b67694723923a82fc699aa37d580d035bd420/src/lpad_file.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 pe...
Copyright 2014 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(lpad_file). -behavior(lpad_generator). -export([copy_file/2, write_file/2, create_dir/1, handle_generator_spec/2]). -include_lib("kernel/incl...
37053252550b8d9db041047e2438f92f045cb6f97dc0ba8d3a3fe92cebffdb79
serhiip/org2any
AppleScript.hs
| Module : Data . . Sync . AppleScript Description : AppleScript interpreter of ` Command . Command`s License : GPL-3 Maintainer : < > Stability : experimental Executes the sequence of ` Data . . Sync . Command . Command`s to syncronize a list of reminders to Reminders application on...
null
https://raw.githubusercontent.com/serhiip/org2any/06dae386defe693ecc5ef169de3accc9a8267685/src/Data/OrgMode/Sync/AppleScript.hs
haskell
# LANGUAGE OverloadedStrings # | Execute commands by producing calls (side effects) to Reminders OS X application via <-page/osx/1/osascript/ osascript> system utility
| Module : Data . . Sync . AppleScript Description : AppleScript interpreter of ` Command . Command`s License : GPL-3 Maintainer : < > Stability : experimental Executes the sequence of ` Data . . Sync . Command . Command`s to syncronize a list of reminders to Reminders application on...
db10486b2d5c2c84c9764e582545c4b727e0a9ae736eb1a754538fc6bd2691e0
argp/bap
vc.ml
(* Verification conditions XXX: Rename functions *) module D=Debug.Make(struct let name = "Vc" and default = `NoDebug end) open D open Utils_common open Type type options = { k : int; mode : formula_mode; full_subst : bool; } let default_options = { k = 1; mode = Sat; full_subst = true; } type ast_v...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/vc.ml
ocaml
Verification conditions XXX: Rename functions
module D=Debug.Make(struct let name = "Vc" and default = `NoDebug end) open D open Utils_common open Type type options = { k : int; mode : formula_mode; full_subst : bool; } let default_options = { k = 1; mode = Sat; full_subst = true; } type ast_vc = options -> Ast.program -> Ast.exp -> Ast.exp * Ast.v...
aad0ce2b57c5de78b8cd94ed2cf8cf36f8f2a3221f0310cfa85dd6d10fb2254d
ds-wizard/engine-backend
Detail_GET.hs
module Registry.Specs.API.Locale.Detail_GET ( detail_get, ) where import Data.Aeson (encode) import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai.Matcher import Registry.Api.Resource.Locale.LocaleDetailJM () import qualif...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-registry/test/Registry/Specs/API/Locale/Detail_GET.hs
haskell
------------------------------------------------------------------------ GET /locales/{lclId} ------------------------------------------------------------------------ ---------------------------------------------------- ---------------------------------------------------- -----------------------------------------...
module Registry.Specs.API.Locale.Detail_GET ( detail_get, ) where import Data.Aeson (encode) import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai.Matcher import Registry.Api.Resource.Locale.LocaleDetailJM () import qualif...
261e0c825914db498a2765d4d8b7b2d79b162191af8f0eec2e8469cd9107b6b8
justinethier/nugget
tail-call-testing.scm
;; A program to use all available memory, and eventually crash (letrec ((foo (lambda (x) (write (length x)) (bar (cons 1 x)))) (bar (lambda (x) (foo (cons 1 x))))) (foo '())) ;; TODO: try rewriting it so memory is reclaimed. Does it run ;; forever now? ( ( ( foo ( lambda...
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/examples/tail-call-testing.scm
scheme
A program to use all available memory, and eventually crash TODO: try rewriting it so memory is reclaimed. Does it run forever now? (write (length x)) (foo '()))
(letrec ((foo (lambda (x) (write (length x)) (bar (cons 1 x)))) (bar (lambda (x) (foo (cons 1 x))))) (foo '())) ( ( ( foo ( lambda ( x ) ( bar ( cons 1 x ) ) ) ) ( bar ( lambda ( x ) ( foo ( cons 1 x ) ) ) ) )
dd1e8e508b952c40d1cfbc760ead3c0e4493ec5ee562f6e4460873fba32c2325
acl2/acl2
rp-state-functions@useless-runes.lsp
(RP::LEMMA1 (87 45 (:REWRITE DEFAULT-+-2)) (45 45 (:REWRITE DEFAULT-+-1)) (18 9 (:REWRITE DEFAULT-<-1)) (16 9 (:REWRITE DEFAULT-<-2)) (9 9 (:REWRITE DEFAULT-CAR)) (2 2 (:REWRITE CAR-CONS)) ) (RP::LEMMA2 (51 27 (:REWRITE DEFAULT-+-2)) (27 27 (:REWRITE DEFAULT-+-1)) (10 5 (:REWRITE DEFAULT-<-1)) (9 5 (:REWRITE...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/projects/rp-rewriter/.sys/rp-state-functions%40useless-runes.lsp
lisp
(RP::LEMMA1 (87 45 (:REWRITE DEFAULT-+-2)) (45 45 (:REWRITE DEFAULT-+-1)) (18 9 (:REWRITE DEFAULT-<-1)) (16 9 (:REWRITE DEFAULT-<-2)) (9 9 (:REWRITE DEFAULT-CAR)) (2 2 (:REWRITE CAR-CONS)) ) (RP::LEMMA2 (51 27 (:REWRITE DEFAULT-+-2)) (27 27 (:REWRITE DEFAULT-+-1)) (10 5 (:REWRITE DEFAULT-<-1)) (9 5 (:REWRITE...
d060aea569b45433cf25ec7940cf493d5174ae17ebad25028825f7abe6ce8743
monadicsystems/okapi
Server.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Conduit.Server where import Conduit.Auth import qualified Conduit.Database as DB import Conduit.Type import Control.Applicative import Control.Monad.Combi...
null
https://raw.githubusercontent.com/monadicsystems/okapi/2ff768fac047770137c6fd09258218fd132efd0e/examples/realworld-json/Conduit/Server.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Conduit.Server where import Conduit.Auth import qualified Conduit.Database as DB import Conduit.Type import Control.Applicative import Control.Monad.Combinators import Control.Monad.Except import Control.Monad.Trans.Reader...
19c70a5aaa77954320fb80b5b9789cf74a89dcc1821febe40e8ed32e18270b21
Enecuum/Node
Language.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TemplateHaskell # module Enecuum.Core.State.Language where import Enecuum.Prelude import qualified Enecuum.Core.Types as D import qualified Enecuum.Core.HGraph.Language as L import qualified Enecuum.Core.Logger.Language as L im...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/State/Language.hs
haskell
# LANGUAGE GADTs # | Create variable. | Read variable. | Write variable. | Retry until some variable is changed in this atomic block. | Eval graph atomically. | Eval "delayed" logger: it will be written after successfull state operation. | Create variable. | Read variable. | Write variable. | Modify variable ...
# LANGUAGE TemplateHaskell # module Enecuum.Core.State.Language where import Enecuum.Prelude import qualified Enecuum.Core.Types as D import qualified Enecuum.Core.HGraph.Language as L import qualified Enecuum.Core.Logger.Language as L import Language...
cde5b11ad297e460ff92b02eaf7f73feee95f3279ee09e9e74e2b21b4c176cc2
dradtke/Lisp-Text-Editor
introspection.lisp
(defpackage :gtk-doc-introspection #+(or clozure-common-lisp openmcl) (:shadowing-import-from :closer-mop #:defgeneric #:ensure-generic-function #:standard-generic-function) (:use :cl :gtk :gobject :gdk :iter :closer-mop) (:export #:get-gobject-classes #:generate-doc-for-class #:generate-tex...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/doc/introspection.lisp
lisp
(defpackage :gtk-doc-introspection #+(or clozure-common-lisp openmcl) (:shadowing-import-from :closer-mop #:defgeneric #:ensure-generic-function #:standard-generic-function) (:use :cl :gtk :gobject :gdk :iter :closer-mop) (:export #:get-gobject-classes #:generate-doc-for-class #:generate-tex...
dde13338e663d58c1f62b966a4004e720eee25d54df75f39a13b186660e01790
borgeby/jarl
bits.cljc
(ns jarl.builtins.bits (:require [jarl.exceptions :as errors] [jarl.types :as types] #?(:cljs [jarl.utils :as utils]))) (defn- non-integer? [num] (not (zero? (mod num 1)))) (defn- ensure-pos [a b] (when (neg? a) (throw (errors/type-ex "operand 1 must be an unsigned integer number but...
null
https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/main/cljc/jarl/builtins/bits.cljc
clojure
(ns jarl.builtins.bits (:require [jarl.exceptions :as errors] [jarl.types :as types] #?(:cljs [jarl.utils :as utils]))) (defn- non-integer? [num] (not (zero? (mod num 1)))) (defn- ensure-pos [a b] (when (neg? a) (throw (errors/type-ex "operand 1 must be an unsigned integer number but...
7015b82bb91b7c820c363391e76d6ae5a12b18a186e8bc40ef607ff3eb65f2a6
ahrefs/devkit
memory.ml
* Memory reporting - GC and OS , optionally malloc General background : - VSZ is not very intersting , this is the amount of memory which is mapped to the process address space . It 's not really memory use , only the amount of memory the process can access without triggering a segfault . - RSS is resident s...
null
https://raw.githubusercontent.com/ahrefs/devkit/cbd49eb78925cb50238ce26ec11d45d6304fa784/memory.ml
ocaml
* resident set size * virtual memory size * number of VM mappings * used swap size process smaps hooks for Memory_gperftools called in reverse - and it is fine
* Memory reporting - GC and OS , optionally malloc General background : - VSZ is not very intersting , this is the amount of memory which is mapped to the process address space . It 's not really memory use , only the amount of memory the process can access without triggering a segfault . - RSS is resident s...
7a377a98a0abaea60010947e79571489d780865ce34bbff08564f97e25bb0134
inhabitedtype/ocaml-aws
modifyDocumentPermission.ml
open Types open Aws type input = ModifyDocumentPermissionRequest.t type output = unit type error = Errors_internal.t let service = "ssm" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service r...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/modifyDocumentPermission.ml
ocaml
open Types open Aws type input = ModifyDocumentPermissionRequest.t type output = unit type error = Errors_internal.t let service = "ssm" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service r...
f94e660b6ff90d5413729ee0527d261957b72c892f5da83e98cf4a741cd9a8b0
erlyaws/yaws
yaws_rpc_SUITE.erl
-module(yaws_rpc_SUITE). -include("testsuite.hrl"). -compile(export_all). all() -> [ unicode ]. groups() -> [ ]. %%==================================================================== init_per_suite(Config) -> Config. end_per_suite(_Config) -> ok. init_per_group(_Group, Config) -> ...
null
https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/testsuite/yaws_rpc_SUITE.erl
erlang
==================================================================== ====================================================================
-module(yaws_rpc_SUITE). -include("testsuite.hrl"). -compile(export_all). all() -> [ unicode ]. groups() -> [ ]. init_per_suite(Config) -> Config. end_per_suite(_Config) -> ok. init_per_group(_Group, Config) -> Config. end_per_group(_Group, _Config) -> ok. init_per_testcase...
f463a118c9758cff59b5bcb0b1d718ae1c25d59db07c46cf86d75a79705cda7c
phaazon/luminance
Cmd.hs
# LANGUAGE GeneralizedNewtypeDeriving # ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2015 , 2016 -- License : BSD3 -- Maintainer : < > -- Stability : experimental -- Portability : portable ------------------------------------------------------...
null
https://raw.githubusercontent.com/phaazon/luminance/88b8f40b8d1ceec1f8fd1a111ccaffec5d9283a8/src/Graphics/Luminance/Core/Cmd.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Stability : experimental Portability : portable --------------------------------------------------------------------------- |Command type . Used to accumulate GPU commands . Use ' runCmd ' to execute the whole cha...
# LANGUAGE GeneralizedNewtypeDeriving # Copyright : ( C ) 2015 , 2016 Maintainer : < > module Graphics.Luminance.Core.Cmd where import Control.Monad.IO.Class ( MonadIO(..) ) import Graphics.Luminance.Core.Framebuffer import Graphics.Luminance.Core.RW ( Readable, Writable ) import Graphics.Luminance.Cor...
ef3ab30984746d367cf8291eb38e095cb9add771a8cb0dedc8277a1c5937f261
ijp/guildhall
upgrade.scm
upgrade.scm --- Dorodango for Copyright ( C ) 2011 Free Software Foundation , Inc. Copyright ( C ) 2009 , 2010 < > Author : < > Author : < > ;; 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 So...
null
https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/scripts/upgrade.scm
scheme
This program is free software; you can redistribute it and/or either version 3 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 more details. ...
upgrade.scm --- Dorodango for Copyright ( C ) 2011 Free Software Foundation , Inc. Copyright ( C ) 2009 , 2010 < > Author : < > Author : < > modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a co...
7614bc30512ee3707e2174741409b932df59dc04dfe8570897a6a8be8b1e5cf6
sras/servant-examples
CustomPostMultipleFormats.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # module CustomPostMultipleFormats where import Servant ( PlainText , JSON , MimeUnrender(..) ...
null
https://raw.githubusercontent.com/sras/servant-examples/923b54a13e14a4c2a37a3633dc7e2fa8fe49adc6/src/CustomPostMultipleFormats.hs
haskell
# LANGUAGE OverloadedStrings # Syntax for importing type operator In this example, we see how we can accept data in multiple formats, including custom ones. This is what enables our endpoint to recieve a value of type If you were wondering, the JSON format is bundled in with Servant. Just output back the input ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # module CustomPostMultipleFormats where import Servant ( PlainText , JSON , MimeUnrender(..) , Accept(..) , Ge...
d39f0f1b320d75d7276c5343a53bd98c86d0942b63950fc137975d9a06fd3497
Innf107/cobble-compiler
Parser.hs
module Cobble.Parser where import Cobble.Prelude.Parser hiding (assign) import Cobble.Syntax import Cobble.Syntax.PrettyPrint import Cobble.Parser.Tokenizer (Token(..), TokenData(..)) import Data.Text qualified as T import Data.Char import Text.Parsec.Pos import Data.List qualified as L type NextPass = 'SolveModu...
null
https://raw.githubusercontent.com/Innf107/cobble-compiler/d6b0b65dad0fd6f1d593f7f859b1cc832e01e21f/src/Cobble/Parser.hs
haskell
| Patterns that need additional parentheses when nested note [(not . isUpper) vs isLower] We have to use (not . isUpper) instead of isLower to parse variant constructors, since "_" is neither an uppercase nor a lowercase character. "_x" should obviously be a valid variable name (and therefore an invalid variant const...
module Cobble.Parser where import Cobble.Prelude.Parser hiding (assign) import Cobble.Syntax import Cobble.Syntax.PrettyPrint import Cobble.Parser.Tokenizer (Token(..), TokenData(..)) import Data.Text qualified as T import Data.Char import Text.Parsec.Pos import Data.List qualified as L type NextPass = 'SolveModu...
22b7dae6fd3d3ae538bd768430697cd2ef7298a7773cc63b6efb657cadee5b0f
wlitwin/graphv
paint.ml
type t = { (*xform : Matrix.t;*) mutable m0 : float; mutable m1 : float; mutable m2 : float; mutable m3 : float; mutable m4 : float; mutable m5 : float; mutable extent_x : float; mutable extent_y : float; mutable radius : float; mutable feather : float; mutable inner_colo...
null
https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/src/core/paint.ml
ocaml
xform : Matrix.t; let set_inner_color (t : t) (color : Color.t) (alpha : float) = t.inner_color_r <- color.r; t.inner_color_g <- color.g; t.inner_color_b <- color.b; t.inner_color_a <- color.a *. alpha; ;; let set_outer_color (t : t) (color : Color.t) (alpha : float) = t.outer_color_r <- color.r; ...
type t = { mutable m0 : float; mutable m1 : float; mutable m2 : float; mutable m3 : float; mutable m4 : float; mutable m5 : float; mutable extent_x : float; mutable extent_y : float; mutable radius : float; mutable feather : float; mutable inner_color_r : float; mutable i...
741fcbe372d71ce4204ac777da6e9c4c13b1641e6f7ba09c27f46879bfa519ab
abdulapopoola/SICPBook
Ex2.10.scm
#lang planet neil/sicp ;;helpers (define (make-interval a b) (cons a b)) (define (lower-bound interval) (car interval)) (define (upper-bound interval) (cdr interval)) (define (mul-interval x y) (let ((p1 (* (lower-bound x) (lower-bound y))) (p2 (* (lower-bound x) (upper-bound...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.1/Ex2.10.scm
scheme
helpers #f #t #t #f Divisor error Works
#lang planet neil/sicp (define (make-interval a b) (cons a b)) (define (lower-bound interval) (car interval)) (define (upper-bound interval) (cdr interval)) (define (mul-interval x y) (let ((p1 (* (lower-bound x) (lower-bound y))) (p2 (* (lower-bound x) (upper-bound y))) ...
f692830648a200aac7f5552c1a29362aec9a126ab2638a4d9df42cccdc82af59
jgoerzen/twidge
Update.hs
# LANGUAGE CPP # Copyright ( C ) 2006 - 2008 < > 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 . This pro...
null
https://raw.githubusercontent.com/jgoerzen/twidge/1efa65da2c2c21fbed05590f4a22b34c9085244f/Commands/Update.hs
haskell
No match means no "after" look either for [bitly] or [jmp] section in config [bitly] or [jmp] section should define both login and apikey use default report bit.ly errors NOTE: This technique works with the is.gd "API" but does not work with the tinyurl.com "API"
# LANGUAGE CPP # Copyright ( C ) 2006 - 2008 < > 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 . This pro...
e81faebc378cada7e570099a6601f72c38521acc53893576c5d25ad7b2bbcdf2
jbclements/RSound
test-paste-util.rkt
#lang racket (require "../rsound.rkt" "../util.rkt" "../paste-util.rkt" ffi/vector rackunit) (provide the-test-suite) (define the-test-suite (test-suite "paste-util" (let () (define s (noise 50)) (zero-buffer! (s16vector->cpointer (rsound-data s)) ...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/test/test-paste-util.rkt
racket
test for an rsound that's clipped
#lang racket (require "../rsound.rkt" "../util.rkt" "../paste-util.rkt" ffi/vector rackunit) (provide the-test-suite) (define the-test-suite (test-suite "paste-util" (let () (define s (noise 50)) (zero-buffer! (s16vector->cpointer (rsound-data s)) ...
952d7982161ae47ddfa82f299bfaa038dc69b43457ead12b24da990114b4eb0d
thosmos/riverdb
state.clj
(ns riverdb.state (:require [datomic.api :as d] [datomock.core :as mock] [theta.log :as log] dotenv)) ;(def uri (or (dotenv/env :DATOMIC_URI) "datomic:free:4334/test-db")) (def default-uri "datomic:dev:4334/riverdb") ( defn get - mysql - uri [ db - name sql - user sql - password ] ( str " datomi...
null
https://raw.githubusercontent.com/thosmos/riverdb/b47f01a938da26298ee7924c8b2b3a2be5371927/src/server/riverdb/state.clj
clojure
(def uri (or (dotenv/env :DATOMIC_URI) "datomic:free:4334/test-db"))
(ns riverdb.state (:require [datomic.api :as d] [datomock.core :as mock] [theta.log :as log] dotenv)) (def default-uri "datomic:dev:4334/riverdb") ( defn get - mysql - uri [ db - name sql - user sql - password ] ( str " datomic : sql:// " db - name " ? : mysql:3306 / datomic?user= " sql - user ...
10217ffdbb727f23919a3b1ef3ce9f0ceff9b19f1598c00e75a46cfef73285c7
fons/cl-twitter
twitter-entity.lisp
(in-package :cl-twitter) indices are lists of ids . See the twitter - social - graph where idendity is defined ... ;; (defun parse-identity (ref) ref) (define-element url-entity ((indices (identity))) "a url entity " (id "" nil) (url "" nil) (display-url "" nil) (expanded-url "" nil) (indices "" nil)...
null
https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/api/twitter-entity.lisp
lisp
------- -------- -------- ------ ---helper functions.... ---------------------------------
(in-package :cl-twitter) indices are lists of ids . See the twitter - social - graph where idendity is defined ... (defun parse-identity (ref) ref) (define-element url-entity ((indices (identity))) "a url entity " (id "" nil) (url "" nil) (display-url "" nil) (expanded-url "" nil) (indices "" nil)) ...
2451b16cc3d7b11ddfdda7b1db0873847cfba29ed74c91f0cf4ddecdb0cb25d2
cram2/cram
package.lisp
;;; Copyright ( c ) 2017 , < > < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyrigh...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_tutorials/cram_bullet_world_tutorial/src/package.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redi...
Copyright ( c ) 2017 , < > < > * Neither the name of the Intelligent Autonomous Systems Group/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT S...
efc1a20c0c6c034aa2d7fbf9fbd0dfec5db2817058e3fb84ffd12b355b3e09df
Frechmatz/cl-synthesizer
cc-mapper.lisp
(in-package :cl-synthesizer-midi) (defun cc-mapper () (let ((map-fns nil)) (labels ((get-value (controller-number control-value) (let ((value nil)) (dolist (fn map-fns) (setf value (funcall fn controller-number control-value)) (if value (return))) value)) (assert-not-mapped...
null
https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/7490d12f0f1e744fa1f71e014627551ebc4388c7/src/modules/midi/cc-mapper.lisp
lisp
(in-package :cl-synthesizer-midi) (defun cc-mapper () (let ((map-fns nil)) (labels ((get-value (controller-number control-value) (let ((value nil)) (dolist (fn map-fns) (setf value (funcall fn controller-number control-value)) (if value (return))) value)) (assert-not-mapped...
4f3e8bbbdf44ad1c633b8e168dcb8e4cd0f15fe99b52a312610246970d9bbb70
threatgrid/clj-momo
logging_test.clj
(ns clj-momo.test-helpers.logging-test (:require [clj-momo.test-helpers.logging :as sut] [clojure.test :refer [is deftest testing]] [clojure.tools.logging :as log])) (deftest test-with-test-logging (testing "with only `last-log-atom` (backwards compat)" (sut/with-test-logging [#{:warn} ...
null
https://raw.githubusercontent.com/threatgrid/clj-momo/7bc0a411593eee4a939b6a3d0f628413518e09e2/test/clj_momo/test_helpers/logging_test.clj
clojure
TODO: Should be false by default
(ns clj-momo.test-helpers.logging-test (:require [clj-momo.test-helpers.logging :as sut] [clojure.test :refer [is deftest testing]] [clojure.tools.logging :as log])) (deftest test-with-test-logging (testing "with only `last-log-atom` (backwards compat)" (sut/with-test-logging [#{:warn} ...
50e28f86a7fc7d4b5752eb584fb1b94851f34e9c5e45900cef85ea849e309a58
jabber-at/ejabberd-contrib
atom_pubsub.erl
%% % This module enables access to the PEP node "urn:xmpp:microblog" via an Atompub compliant interface . % % -module(atom_pubsub). -author(''). -include("ejabberd.hrl"). -include("jlib.hrl"). -include("pubsub.hrl"). -include("ejabberd_http.hrl"). -include("logger.hrl"). -export([process/2]). process([Domain,Use...
null
https://raw.githubusercontent.com/jabber-at/ejabberd-contrib/d5eb036b786c822d9fd56f881d27e31688ec6e91/atom_pubsub/src/atom_pubsub.erl
erlang
This module enables access to the PEP node "urn:xmpp:microblog" via make sure user belongs to pubsub domain Service document Collections = mnesia:dirty_match_object(#pubsub_node{nodeid={get_host(Uri), '_'},_ = '_'}), Collection Add new collection FIXME Slug FilteredPayload2 = case xml:get_subtag(FilteredPaylo...
an Atompub compliant interface . -module(atom_pubsub). -author(''). -include("ejabberd.hrl"). -include("jlib.hrl"). -include("pubsub.hrl"). -include("ejabberd_http.hrl"). -include("logger.hrl"). -export([process/2]). process([Domain,User|_]=LocalPath, #request{auth = Auth} = Request)-> case get_auth(Auth) of {Us...
f20d65dc4270b9c318a227d8bb565217d3560c7664fa2e55bc99565d390dc5ef
biocom-uib/vpf-tools
Search.hs
# language AllowAmbiguousTypes # # language DeriveGeneric # # language RecordWildCards # # language StandaloneDeriving # {-# language Strict #-} # language TemplateHaskell # {-# language UndecidableInstances #-} module VPF.Ext.HMMER.Search ( HMMSearch , hmmsearch , HMMSearchError(..) , HMMSearchConfig , hmmse...
null
https://raw.githubusercontent.com/biocom-uib/vpf-tools/dd88a543f28eb339cf0dcb89f34479c84b3a8056/src/VPF/Ext/HMMER/Search.hs
haskell
# language Strict # # language UndecidableInstances #
# language AllowAmbiguousTypes # # language DeriveGeneric # # language RecordWildCards # # language StandaloneDeriving # # language TemplateHaskell # module VPF.Ext.HMMER.Search ( HMMSearch , hmmsearch , HMMSearchError(..) , HMMSearchConfig , hmmsearchPath , hmmsearchDefaultArgs , newHMMSearchConfig , H...
9b1cd088e171a02632b09a1d8b88b8631646fe8c5a66a45081978bf20322b7a5
AdaCore/why3
constant.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/03f27e383b7191f9df0c7df84016a6450603f864/src/util/constant.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Format open Number type constant = | ConstInt of int_constant | ConstReal of real_constant | C...
17b819b1a3bc75df2d82d0e1c1872009c192bee9f2161e3e4988345fe62faba8
ocaml-ppx/ppx_deriving
ppx_deriving_create.cppo.ml
open Ppxlib open Asttypes open Parsetree open Ast_helper open Ppx_deriving.Ast_convenience let deriver = "create" let raise_errorf = Ppx_deriving.raise_errorf let parse_options options = options |> List.iter (fun (name, expr) -> match name with | _ -> raise_errorf ~loc:expr.pexp_loc "%s does not support opt...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_deriving/7211546d6527bf57d3eff8174c90fc3c22250dae/src_plugins/create/ppx_deriving_create.cppo.ml
ocaml
open Ppxlib open Asttypes open Parsetree open Ast_helper open Ppx_deriving.Ast_convenience let deriver = "create" let raise_errorf = Ppx_deriving.raise_errorf let parse_options options = options |> List.iter (fun (name, expr) -> match name with | _ -> raise_errorf ~loc:expr.pexp_loc "%s does not support opt...
75a104d623311ccc1a3634883744d7d58703ddec207e07ebc117bd7c34cb8c2c
ferzcam/tropical-geometry
Polyhedral.hs
module Geometry.Polyhedral where import Geometry.ConvexHull3 import Data.List import Data.Maybe import Data.Function -- | Given a vertex of a convex hull, computes the facets adjacent to the vertex. adjacentFacets :: Point3D -> ConvexHull -> [Facet] adjacentFacets p c = sortFacets p $ filter (isPointInFacet p) (face...
null
https://raw.githubusercontent.com/ferzcam/tropical-geometry/de366949f28530ac1008c7423122d37488b3b049/library/Geometry/Polyhedral.hs
haskell
| Given a vertex of a convex hull, computes the facets adjacent to the vertex. | For each vertex of a polyhedron, the facets must be ordered clockwise since we need there normals to point inside the polyhedron | The facets are ordered counterclockwise with respect to a vertex. [Optimizable] | Computes normal vector...
module Geometry.Polyhedral where import Geometry.ConvexHull3 import Data.List import Data.Maybe import Data.Function adjacentFacets :: Point3D -> ConvexHull -> [Facet] adjacentFacets p c = sortFacets p $ filter (isPointInFacet p) (facets c) isPointInFacet :: Point3D -> Facet -> Bool isPointInFacet p f = p `elem` ...