_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
4a914bb4fd9cc471b51c691179ddbcc7292b92015075c779964e73b036f20af8
mfoemmel/erlang-otp
xmerl_xpath_pred.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2003 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/xmerl/src/xmerl_xpath_pred.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2003 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " Description : Helper module to xmerl_x...
b8f68fbdd417962f47c0e1debb4eeed56a78f770853c8ebf62f9d06f7655a2ac
mitchellwrosen/planet-mitchell
Traversable.hs
module Alg.Traversable * Traversable(..) , for , mapAccumL , mapAccumR , traverseBy , sequenceBy -- * Traversable1 , Traversable1(..) -- * Bitraversable , Bitraversable(..) , bisequence , bifor , bimapAccumL , bimapAccumR -- * Bitraversable1 , Bitraversable1(..) -- * Defau...
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Alg/Traversable.hs
haskell
* Traversable1 * Bitraversable * Bitraversable1 * Default implementations
module Alg.Traversable * Traversable(..) , for , mapAccumL , mapAccumR , traverseBy , sequenceBy , Traversable1(..) , Bitraversable(..) , bisequence , bifor , bimapAccumL , bimapAccumR , Bitraversable1(..) , fmapDefault , foldMapDefault , bimapDefault , bifoldMapDefault , bifold...
fc5301682a6d87b47a104cfef97092334c7b52ebee3661c963563aa5b61f0e5e
LexiFi/menhir
CalcErrorReporting.ml
open Parser open Parser.MenhirInterpreter (* In order to submit artificial tokens to the parser, we need a function that converts a terminal symbol to a (dummy) token. Unfortunately, we cannot (in general) auto-generate this code, because it requires making up semantic values of arbitrary OCaml types. *) let...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/demos/ocamlbuild/calc-inspection/CalcErrorReporting.ml
ocaml
In order to submit artificial tokens to the parser, we need a function that converts a terminal symbol to a (dummy) token. Unfortunately, we cannot (in general) auto-generate this code, because it requires making up semantic values of arbitrary OCaml types.
open Parser open Parser.MenhirInterpreter let terminal2token (type a) (symbol : a terminal) : token = match symbol with | T_TIMES -> TIMES | T_RPAREN -> RPAREN | T_PLUS -> PLUS | T_MINUS -> MINUS | T_LPAREN -> LPAREN | T_INT -> INT 0 | T_EOL -> EOL | T_DIV -...
e2422fe9d63ff550fda7d2ee65b2fa71bdbd9be50fe1ee685a02bdb280a4aa8f
AndrewMagerman/wizard-book-study
ch4-ambeval.rkt
;;;;AMB EVALUATOR FROM SECTION 4.3 OF ;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS ;;;;Matches code in ch4.scm. ;;;; To run the sample programs and exercises, code below also includes ;;;; -- enlarged primitive-procedures list -- support for Let ( as noted in footnote 56 , p.428 ) ;;;;This file can be lo...
null
https://raw.githubusercontent.com/AndrewMagerman/wizard-book-study/77bf59e606df71281b321c5a6d1e6a400916c04d/missing_files/week_14/ch4-ambeval.rkt
racket
AMB EVALUATOR FROM SECTION 4.3 OF STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS Matches code in ch4.scm. To run the sample programs and exercises, code below also includes -- enlarged primitive-procedures list This file can be loaded into Scheme as a whole. **NOTE**This file loads the metacircular evaluator of ...
-- support for Let ( as noted in footnote 56 , p.428 ) sections 4.1.1 - 4.1.4 , since it uses the expression representation , the two lines at the end of the file ch4-mceval.scm Note : It is loaded first so that the section 4.2 definition of eval overrides the definition from 4.1.1 (load "ch4-mceval.rkt"...
ab18b72b009b3e5daf50cef94bb7c37c29333b91c9c0d9bfe2ad85f6d065b224
tokenmill/beagle
schema.clj
(ns beagle.schema (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.string :as str])) (s/def ::non-empty-string (s/and string? (complement str/blank?))) (s/def ::text ::non-empty-string) (s/def ::type (s/nilable string?)) (s/def ::id (s/nilable string?)) (s/def...
null
https://raw.githubusercontent.com/tokenmill/beagle/863ffa63364e9ae7e7a22a3c7e258fd02ace1632/src/beagle/schema.clj
clojure
(ns beagle.schema (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.string :as str])) (s/def ::non-empty-string (s/and string? (complement str/blank?))) (s/def ::text ::non-empty-string) (s/def ::type (s/nilable string?)) (s/def ::id (s/nilable string?)) (s/def...
f755d9a352968c9356d4dc628882b60eb306f9b50aea296688de8d4c47bedca5
fredlund/McErlang
basicPredicates.erl
-module(basicPredicates). -language(erlang). -include("erlang/state.hrl"). -include("erlang/process.hrl"). -include("erlang/node.hrl"). -export([logged_on/1,logon/1,logoff/1,send_to/1,message_from/1,message_to/3,message_received/3]). logged_on(Name) -> fun (State,_,_) -> mce_erl:has_probe_state({logged_on,Name},S...
null
https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/examples/Simple_messenger/basicPredicates.erl
erlang
allProcesses(State) -> lists:flatmap (fun (Node) -> Node#node.processes end, State#state.nodes).
-module(basicPredicates). -language(erlang). -include("erlang/state.hrl"). -include("erlang/process.hrl"). -include("erlang/node.hrl"). -export([logged_on/1,logon/1,logoff/1,send_to/1,message_from/1,message_to/3,message_received/3]). logged_on(Name) -> fun (State,_,_) -> mce_erl:has_probe_state({logged_on,Name},S...
4e24b7e629de3b5fa01fbf4b8799896b5547bc6454027357f4b3b4250b392e99
vadimbakaev/flatmap.io
Import.hs
flatmap.io IT job search based on geo and technology . Copyright ( C ) 2019 This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the Lice...
null
https://raw.githubusercontent.com/vadimbakaev/flatmap.io/766069a8b1317a1e5a4546f3358d04c3c901f693/src/Import.hs
haskell
flatmap.io IT job search based on geo and technology . Copyright ( C ) 2019 This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the Lice...
08f0ffa5466eaffcdd6727506411cc82530aab4b6d547b668117df1b7e1ea7fa
ivankelly/gambit
fig16-16.scm
#!/usr/bin/env gsi-script ; File: "fig16-16.scm" Copyright ( c ) 1997 - 2007 by , All Rights Reserved . Translation into Scheme of Figure 16.16 from Chapter 16 of Ousterhout 's " Tcl and the Tk Toolkit " . import Tcl / Tk procedures and variables (load "tcltk") (define color "color") (define width "wid...
null
https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/examples/tcltk/fig16-16.scm
scheme
File: "fig16-16.scm" menubutton .mbar.file -text File -underline 0 -menu .mbar.file.menu menubutton .mbar.edit -text Edit -underline 0 -menu .mbar.edit.menu -menu .mbar.graphics.menu menubutton .mbar.text -text Text -underline 0 -menu .mbar.text.menu menubutton .mbar.view -text View -underline 0 -men...
#!/usr/bin/env gsi-script Copyright ( c ) 1997 - 2007 by , All Rights Reserved . Translation into Scheme of Figure 16.16 from Chapter 16 of Ousterhout 's " Tcl and the Tk Toolkit " . import Tcl / Tk procedures and variables (load "tcltk") (define color "color") (define width "width") (frame ".mbar" re...
abd2281c8afc1e68d9a87e1fd636d684fe35315088be1ee1cfc00977fa83c130
zalora/sproxy
DB.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # module Sproxy.Server.DB ( Database , DataSource(..) , userAccess , userExists , userGroups , start ) where import Control.Concurrent (forkIO, threadDelay) import Control.Exception (SomeException, bracket, catch, finally) import Control.Monad (f...
null
https://raw.githubusercontent.com/zalora/sproxy/41112cddb49ad4d967d3b400936ed18c2a4f4197/src/Sproxy/Server/DB.hs
haskell
# LANGUAGE OverloadedStrings # stripes max connections. FIXME: make configurable? XXX always in lower case XXX case-sensitive by RFC2616 FIXME with bound parameters, but we don't expect any results.
# LANGUAGE QuasiQuotes # module Sproxy.Server.DB ( Database , DataSource(..) , userAccess , userExists , userGroups , start ) where import Control.Concurrent (forkIO, threadDelay) import Control.Exception (SomeException, bracket, catch, finally) import Control.Monad (filterM, forever, void) import Data....
8fc0ee1e526bb9021f0d0663e4a4a22e1560880f7624762e5bd6e461dd41815b
314eter/ocaml-stringsearch-benchmark
benchmark.ml
open Batteries module type Algorithm = sig val name : string val find_all : string -> string -> int end type benchmark = { name : string; text : string; patterns : string list; } let () = Random.init 0 let randomstring n = String.init n (fun _ -> Random.int 256 |> char_of_int) let patternlengths = [1; ...
null
https://raw.githubusercontent.com/314eter/ocaml-stringsearch-benchmark/bcf81514a2cffa919bc4283fb5be96a38dacf56d/benchmark.ml
ocaml
open Batteries module type Algorithm = sig val name : string val find_all : string -> string -> int end type benchmark = { name : string; text : string; patterns : string list; } let () = Random.init 0 let randomstring n = String.init n (fun _ -> Random.int 256 |> char_of_int) let patternlengths = [1; ...
2e6e6869e0bb5dc4b45561a019a5b791a21e21fe4da5472dd1db69b53098dc5d
life0fun/clojure-idiom
project.clj
(defproject dbconn "1.0.0-SNAPSHOT" :description "storage connection with mysql or redis" :repositories {"local" ~(str (.toURI (java.io.File. "local_jars")))} :dependencies [ [org.clojure/clojure "1.3.0"] [org.clojure/clojure-contrib "1.2.0"] ; for clojure.contrib.sql [korma "0.3.0-RC5"] ; awesom...
null
https://raw.githubusercontent.com/life0fun/clojure-idiom/481b297eeabea917a68b492b1fb78b8151408507/dbconn/project.clj
clojure
for clojure.contrib.sql awesome korma jdbc mysql jdbc driver postgresql sqlite json package set main entry
(defproject dbconn "1.0.0-SNAPSHOT" :description "storage connection with mysql or redis" :repositories {"local" ~(str (.toURI (java.io.File. "local_jars")))} :dependencies [ [org.clojure/clojure "1.3.0"] [clojure-rabbitmq "0.2.1"] ]
4ff4636dcafb45186499a9acf35523c8bb9ec9cbcf241ced630d090d3faae3a2
joearms/bertie
bertie_app.erl
-module(bertie_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> bertie_sup:st...
null
https://raw.githubusercontent.com/joearms/bertie/3bee32f15f51b4a6f42f66ec156bada71ce5506d/src/bertie_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(bertie_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> bertie_sup:start_link(). stop(_State) -> ok.
2790e45bbf03bd1f0f42abe7677aadefacd8c79c1c62551cdc355f9c2b0c4b05
dorchard/computational-semantics
TCOM.hs
module TCOM where import Data.List import FSynF import Model allNum, noNum :: Int -> Int -> Bool allNum = \ m n -> m == 0 noNum = \ m n -> n == 0 atleastNum, atmostNum :: Int -> Int -> Int -> Bool atleastNum k = \ m n -> n >= k atmostNum k = \ m n -> n <= k atleast2butnotall :: Int -> Int -> Bool atleast2butnot...
null
https://raw.githubusercontent.com/dorchard/computational-semantics/e11a80f86140451c9ce7b80a7c263d1482d8565f/TCOM.hs
haskell
module TCOM where import Data.List import FSynF import Model allNum, noNum :: Int -> Int -> Bool allNum = \ m n -> m == 0 noNum = \ m n -> n == 0 atleastNum, atmostNum :: Int -> Int -> Int -> Bool atleastNum k = \ m n -> n >= k atmostNum k = \ m n -> n <= k atleast2butnotall :: Int -> Int -> Bool atleast2butnot...
4dd0776cfe02a1220fddf733d97eede80cf1e7e5493f20d932842dd514d9a7e6
fujita-y/ypsilon
num-iters.scm
; Gabriel benchmarks (define boyer-iters 20) (define browse-iters 600) (define cpstak-iters 1000) (define ctak-iters 100) (define dderiv-iters 2000000) (define deriv-iters 2000000) (define destruc-iters 500) (define diviter-iters 1000000) (define divrec-iters 1000000) (define puzzle-iters...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/820aa1b0258eb1854172c7909aef7462bb0e2adb/bench/gambit-benchmarks/num-iters.scm
scheme
Gabriel benchmarks C benchmarks Other benchmarks
(define boyer-iters 20) (define browse-iters 600) (define cpstak-iters 1000) (define ctak-iters 100) (define dderiv-iters 2000000) (define deriv-iters 2000000) (define destruc-iters 500) (define diviter-iters 1000000) (define divrec-iters 1000000) (define puzzle-iters 100) (define ta...
35ebb54a588e6d8bd3b38d1fed78935f2387c6692d46e902a6e381cda836c701
gigasquid/eodermdrome
core_test.clj
(ns eodermdrome.core-test (:require [clojure.test :refer :all] [eodermdrome.core :refer :all] [eodermdrome.graph :as eg] [eodermdrome.parser :as parser] [loom.graph :refer [edges nodes] :as graph])) (deftest test-run-comment (testing "with two graphs" (let [resu...
null
https://raw.githubusercontent.com/gigasquid/eodermdrome/681b9205a8d27c86c72e5a22ae5d82496cbd29f0/test/eodermdrome/core_test.clj
clojure
(ns eodermdrome.core-test (:require [clojure.test :refer :all] [eodermdrome.core :refer :all] [eodermdrome.graph :as eg] [eodermdrome.parser :as parser] [loom.graph :refer [edges nodes] :as graph])) (deftest test-run-comment (testing "with two graphs" (let [resu...
99bb1ad2b19dc2448e2851ae30c564cfa792c595c187c7068ef14cd9a9df210d
gregtatcam/imaplet-lwt
imap_lock.mli
* Copyright ( c ) 2013 - 2016 < > * * Permission to use , copy , modify , and 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 IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/commands/imap_lock.mli
ocaml
* Copyright ( c ) 2013 - 2016 < > * * Permission to use , copy , modify , and 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 IS PROVIDED " AS IS " AND...
3a13c61632be90a7e900585b355e2465ddf1d4ff5fae37a7fbf3163b85f1b8eb
racket/compiler
embed-me13.rkt
#lang racket/base (require racket/runtime-path) (define-runtime-module-path-index _mod "embed-me14.rkt") (dynamic-require _mod #f)
null
https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/embed/embed-me13.rkt
racket
#lang racket/base (require racket/runtime-path) (define-runtime-module-path-index _mod "embed-me14.rkt") (dynamic-require _mod #f)
02ccf05f8e39da14cc24fb3e7283a664b0eda6aed0d799a58e7f9ffd4a89e311
pavponn/watcher
Main.hs
module Main where import Control.Monad.State import Control.Monad.Trans.Except import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.UTF8 as B import Data.Maybe (isNothing) import Data.Semigroup () import Data.Time.Clock (getCurrentTime) import FileSystemTypes import Handlers.FileManagerHandler...
null
https://raw.githubusercontent.com/pavponn/watcher/3eda352b20addd1f729025290c6349f5f2e94549/watcher/app/Main.hs
haskell
module Main where import Control.Monad.State import Control.Monad.Trans.Except import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.UTF8 as B import Data.Maybe (isNothing) import Data.Semigroup () import Data.Time.Clock (getCurrentTime) import FileSystemTypes import Handlers.FileManagerHandler...
921a44accd217f1ee32c91e9ffd36d55d6d079191e9ee56b449384a1d677ea06
DaisukeBekki/lightblue
UDTTwithName.hs
{-# OPTIONS -Wall #-} # LANGUAGE OverloadedStrings , TypeSynonymInstances , FlexibleInstances # | Module : DTS.UDTTwithName Copyright : ( c ) , 2016 Licence : All right reserved Maintainer : < > Stability : beta Underspecified Dependent Type Theory ( with variable names ) . Modul...
null
https://raw.githubusercontent.com/DaisukeBekki/lightblue/abdbf50c9418d64afb27b9e09c05b778dd4b98f9/src/DTS/UDTTwithName.hs
haskell
# OPTIONS -Wall # text text base base base ^ Variable ^ Constant symbol ^ The sort \"type\" ^ The sort \"kind\" ^ Dependent function type (or Pi type) ^ Negation ^ Lambda abstraction ^ Function Application ^ Pair ^ Variable-length lambda abstraction ^ Variable-length function application ^ The unit ter...
# LANGUAGE OverloadedStrings , TypeSynonymInstances , FlexibleInstances # | Module : DTS.UDTTwithName Copyright : ( c ) , 2016 Licence : All right reserved Maintainer : < > Stability : beta Underspecified Dependent Type Theory ( with variable names ) . Module : DTS.UDTTwithN...
77162d8e14241c488867f01bf6412433717a8529cb7f759c13c0c00894b3935f
opencog/miner
ugly-male-soda-drinker-corpus.scm
20 Persons : ;; ( ConceptNode " " ) ( ConceptNode " Abe " ) ( ConceptNode " " ) ( ConceptNode " Davion " ) ( ConceptNode " Hessley " ) ( ConceptNode " Jadrian " ) ( ConceptNode " Rio " ) ( ConceptNode " " ) ( ConceptNode " " ) ( ConceptNode " Zac " ) ( ConceptNode " Lily " ) ( ConceptNode ...
null
https://raw.githubusercontent.com/opencog/miner/d46a2c4e4c4df8e0d3115dafca32ac51889e0a23/tests/miner/scm/ugly-male-soda-drinker-corpus.scm
scheme
20 Persons : ( ConceptNode " " ) ( ConceptNode " Abe " ) ( ConceptNode " " ) ( ConceptNode " Davion " ) ( ConceptNode " Hessley " ) ( ConceptNode " Jadrian " ) ( ConceptNode " Rio " ) ( ConceptNode " " ) ( ConceptNode " " ) ( ConceptNode " Zac " ) ( ConceptNode " Lily " ) ( ConceptNode " E...
a2bc3c412e7918580a07264119996a41a01c7958df1ffefaf9dab8c9d02afc9a
atzedijkstra/chr
Instances.hs
# LANGUAGE UndecidableInstances # ------------------------------------------------------------------------------------------- -- Abstraction of Map like datatypes providing lookup ------------------------------------------------------------------------------------------- module CHR.Data.Lookup.Instances ( ) ...
null
https://raw.githubusercontent.com/atzedijkstra/chr/ad465828b1560831e90c4056e12338231872e8db/chr-data/src/CHR/Data/Lookup/Instances.hs
haskell
----------------------------------------------------------------------------------------- Abstraction of Map like datatypes providing lookup ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------...
# LANGUAGE UndecidableInstances # module CHR.Data.Lookup.Instances ( ) where import qualified Data.IntMap as IMap import qualified Data.Map as Map import qualified Data.HashMap.Strict as MapH import qualified Data.Set as Set import qualified CHR.Data...
dcbd877ecdf880b673f882613bc5be4752589e5184254266b88d25736737e362
xvw/planet
story.ml
open Bedrock open Util open Error open Paperwork type kind = | Long | Short type t = { permaname : string ; title : string ; synopsis : string ; links : (string * Link.simple list) list ; content : Text.t ; published : bool ; related_project : string option ; category : string ; tags : string li...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/shapes/story.ml
ocaml
open Bedrock open Util open Error open Paperwork type kind = | Long | Short type t = { permaname : string ; title : string ; synopsis : string ; links : (string * Link.simple list) list ; content : Text.t ; published : bool ; related_project : string option ; category : string ; tags : string li...
c9ed1297cb0d48157db128744a691199bd18877e2c3838338687f7915b7bfcae
expipiplus1/vulkan
Promoted_From_VK_EXT_separate_stencil_usage.hs
{-# language CPP #-} No documentation found for Chapter " Promoted_From_VK_EXT_separate_stencil_usage " module Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage ( ImageStencilUsageCreateInfo(..) , StructureType(..) ...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Core12/Promoted_From_VK_EXT_separate_stencil_usage.hs
haskell
# language CPP # | VkImageStencilUsageCreateInfo - Specify separate usage flags for the stencil aspect of a depth-stencil image = Description 'ImageStencilUsageCreateInfo' structure, then that structure includes the usage flags specific to the stencil aspect of the image for an image with a depth-stencil format...
No documentation found for Chapter " Promoted_From_VK_EXT_separate_stencil_usage " module Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage ( ImageStencilUsageCreateInfo(..) , StructureType(..) ...
bd04b952db73bac5531609d08e25c6f8486084963dd97f84ff442a3f9b2af3cc
TomMD/JuicyPixels-repa
Main.hs
import Data.Array.Repa as R import Graphics.Gloss import Data.Word import Codec.Picture.Repa import Codec.Picture import System.Environment (getArgs) import Data . Array . . Repr . ByteString as RB main = do ie <- getArgs >>= readImageRGBA . head let i = either error id ie mkPic img = let (Z:.c:.r:.z) = e...
null
https://raw.githubusercontent.com/TomMD/JuicyPixels-repa/2a69a8853190b85086869e85bd2cb26c315cf9b5/Test/Main.hs
haskell
import Data.Array.Repa as R import Graphics.Gloss import Data.Word import Codec.Picture.Repa import Codec.Picture import System.Environment (getArgs) import Data . Array . . Repr . ByteString as RB main = do ie <- getArgs >>= readImageRGBA . head let i = either error id ie mkPic img = let (Z:.c:.r:.z) = e...
3799ad42e777a24d7bb75ee9a33728b19e973432618a1e89561a8bc94999e36f
reach-sh/reach-lang
ALGO.hs
# LANGUAGE CPP # module Reach.Connector.ALGO (connect_algo, AlgoError (..)) where import Control.Monad.Extra import Control.Monad.Reader import Control.Monad.Trans.Except import Crypto.Hash import Data.Aeson ((.:), (.=), (.:?)) import qualified Data.Aeson as AS import Data.Bits (shiftL, shiftR, (.|.)) import qualifie...
null
https://raw.githubusercontent.com/reach-sh/reach-lang/50e090b1c4134c33c8e3082844c31df1a397dd48/hs/src/Reach/Connector/ALGO.hs
haskell
Errors for ALGO General tools that could be elsewhere Our control-flow graphs have the following structure: x ---det---> y x is a block label y is a block label det are the details of the transition called (the [a]) and the resources used (the b) For each x and y, there may be different edges between them...
# LANGUAGE CPP # module Reach.Connector.ALGO (connect_algo, AlgoError (..)) where import Control.Monad.Extra import Control.Monad.Reader import Control.Monad.Trans.Except import Crypto.Hash import Data.Aeson ((.:), (.=), (.:?)) import qualified Data.Aeson as AS import Data.Bits (shiftL, shiftR, (.|.)) import qualifie...
80861f2d07161969dfcfd75b6b17978cdedce2bcf9b892d6cb39ba6be9f06f4f
wireapp/wire-server
EJPD.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/9f46f4435479ebb1248e137887ee0ffb6630930e/libs/wire-api/src/Wire/API/Routes/Internal/Brig/EJPD.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. 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 PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Wire.API.Routes.Internal....
9c2721deae4e6df8339810cae55c1b9bd8016708054c7d1c164d668f43914d22
djjolicoeur/datamaps
facts.clj
(ns datamaps.facts (:require [datascript.query :as dq])) ;; Due to the unstsructured nature of map keys (i.e. no attribute constraints), ;; each generated entity will get its own attribute meta data for its keys. ;; this allows us to have duplicate keys in child entities with ;; different semantics and not lose the ...
null
https://raw.githubusercontent.com/djjolicoeur/datamaps/f7523e83a87c5f790f492bbfcce8a23980ef0077/src/datamaps/facts.clj
clojure
Due to the unstsructured nature of map keys (i.e. no attribute constraints), each generated entity will get its own attribute meta data for its keys. this allows us to have duplicate keys in child entities with different semantics and not lose the ability to rebuild the entity/map from the facts (see entity and da...
(ns datamaps.facts (:require [datascript.query :as dq])) (def coll-type ::coll) (def val-type ::val) (def ref-type ::ref) (def reverse-ref-type ::reverse-ref) (def attr-types #{coll-type val-type ref-type reverse-ref-type}) (defprotocol IFactStore (fact-partition [this] "Entity related facts") (reverse-p...
141a07f4156ea59170a8a3f1668b552aee7d33867cb0cef0ce71a6810cc6fd62
0xYUANTI/stdlib2
s2_gen_db.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% @doc A behaviour for simple, efficient, small databases. %%% @reference -DatabasesPaper-SOSP.pdf %%% @end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%_* Module declaration ========================...
null
https://raw.githubusercontent.com/0xYUANTI/stdlib2/0c334200fd9c7ddd79f6dcc3a63c0aa5de5d3a33/src/s2_gen_db.erl
erlang
@doc A behaviour for simple, efficient, small databases. @reference -DatabasesPaper-SOSP.pdf @end _* Module declaration =============================================== _* Exports ========================================================== gen_db behaviour gen_db API gen_server callbacks _* Includes =============...
-module(s2_gen_db). -behaviour(gen_server). -export([ behaviour_info/1 ]). -export([ new/2 , open/2 , insert/2 , lookup/2 , delete/2 , close/1 ]). -export([ code_change/3 , handle_call/3 , handle_cast/2 , handle_info/2 , init/1 ...
584b039684fbae0f67327993ff8784d81a4a2849068e35cb0eee7f9fdf9d3286
typelead/etlas
ProjectOrchestration.hs
# LANGUAGE CPP # {-# LANGUAGE RecordWildCards, NamedFieldPuns #-} # LANGUAGE RankNTypes , ScopedTypeVariables # -- | This module deals with building and incrementally rebuilding a collection of packages . It is what backs the @etlas build@ and @configure@ commands , as well as being a core part of @run@ , @test@ ,...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/ProjectOrchestration.hs
haskell
# LANGUAGE RecordWildCards, NamedFieldPuns # | This module deals with building and incrementally rebuilding a collection The primary thing is in fact rebuilding (and trying to make that quick by not redoing unnecessary work), so building from scratch is just a special case. The build process and the code can be ...
# LANGUAGE CPP # # LANGUAGE RankNTypes , ScopedTypeVariables # of packages . It is what backs the @etlas build@ and @configure@ commands , as well as being a core part of @run@ , @test@ , @bench@ and others . three major parts : * The \"do it\ " phase , where we take the ' ElaboratedInstallPlan ' and we the ...
b9a9a2ee3679d98827502e185296775c5e25ab6a1dbb01a176f6ba76d48ef284
philbaker/reagent-tailwind
views.cljs
(ns frontend.views (:require [frontend.state :refer [app-state]] [frontend.events :refer [increment decrement]])) (defn header [] [:div.px-6 [:h1.text-2xl.mt-6 "Reagent + Tailwind starter"]]) (defn counter [] [:div.mt-6.px-6 [:button.p-2.bg-blue-200 {:on-click #(decrement %)} "-"] ...
null
https://raw.githubusercontent.com/philbaker/reagent-tailwind/b31b0795f4d9e88a63af6fcabc3aa63601515c7d/src/main/frontend/views.cljs
clojure
(ns frontend.views (:require [frontend.state :refer [app-state]] [frontend.events :refer [increment decrement]])) (defn header [] [:div.px-6 [:h1.text-2xl.mt-6 "Reagent + Tailwind starter"]]) (defn counter [] [:div.mt-6.px-6 [:button.p-2.bg-blue-200 {:on-click #(decrement %)} "-"] ...
d9e8a7af612e8a9a263f41dec0ec956ca1917b28cc261f4aceed17d8b865d84f
dharrigan/startrek
routes.clj
(ns startrek.ui.lcars.authentication.routes {:author "David Harrigan"} (:require [ring.middleware.anti-forgery :as anti-forgery] [startrek.ui.lcars.authentication.handler :as handler] [startrek.ui.lcars.middleware.authentication :refer [public-authentication-middleware]])) (set! *warn-on-reflection* true)...
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/ui/lcars/authentication/routes.clj
clojure
it's post-login-success, as the middleware will have fetched (and checked) the user beforehand.
(ns startrek.ui.lcars.authentication.routes {:author "David Harrigan"} (:require [ring.middleware.anti-forgery :as anti-forgery] [startrek.ui.lcars.authentication.handler :as handler] [startrek.ui.lcars.middleware.authentication :refer [public-authentication-middleware]])) (set! *warn-on-reflection* true)...
503b5d2f60a5b0d0a3dcbde34c2b23e2d1829e54083408b728a9587243a4d4b3
hspec/hspec
DiffSpec.hs
# LANGUAGE ScopedTypeVariables # module Test.Hspec.Core.Formatters.DiffSpec (spec) where import Prelude () import Helper hiding (First) import Data.Char import Test.Hspec.Core.Formatters.Diff as Diff dropQuotes :: String -> String dropQuotes = init . tail spec :: Spec spec = ...
null
https://raw.githubusercontent.com/hspec/hspec/de163b72375335bb6e8899f392fc191c34a035ef/hspec-core/test/Test/Hspec/Core/Formatters/DiffSpec.hs
haskell
# LANGUAGE ScopedTypeVariables # module Test.Hspec.Core.Formatters.DiffSpec (spec) where import Prelude () import Helper hiding (First) import Data.Char import Test.Hspec.Core.Formatters.Diff as Diff dropQuotes :: String -> String dropQuotes = init . tail spec :: Spec spec = ...
348b4f7cea841c198e87917afc92a237091243ec5fd01cc33b54d1e5d248fa24
solita/mnt-teet
authorization_db.clj
(ns teet.authorization.authorization-db (:require [datomic.client.api :as d] [teet.contract.contract-db :as contract-db])) (defn user-roles-for-target [db user target] (->> (d/q '[:find ?role :in $ ?user ?target-param :where [?cce :company-contract-employee/u...
null
https://raw.githubusercontent.com/solita/mnt-teet/7985c960c8462f0b2f70704caaf8ef3e36738313/app/backend/src/clj/teet/authorization/authorization_db.clj
clojure
(ns teet.authorization.authorization-db (:require [datomic.client.api :as d] [teet.contract.contract-db :as contract-db])) (defn user-roles-for-target [db user target] (->> (d/q '[:find ?role :in $ ?user ?target-param :where [?cce :company-contract-employee/u...
a9fa7d8cb4670b30f558d53f876cf8924ec859eabf1a3ae5cc31f83942b4d329
JacobGabrielson/cl-rogue
weapons.lisp
;;;; Functions for dealing with problems brought about by weapons @(#)weapons.c 3.17 ( Berkeley ) 6/15/81 (in-package :cl-rogue) (defparameter w-names (vector "mace" "long sword" "short bow" "arrow" "dagger" "rock" "two handed sword" "sling" "dart" "crossbow" "crossbow bolt" ...
null
https://raw.githubusercontent.com/JacobGabrielson/cl-rogue/ecc0eba9224313cbc7f8003c15e35dbb0d2b57eb/weapons.lisp
lisp
Functions for dealing with problems brought about by weapons Long sword Bow Dagger Rock Sling Dart Get which thing we are hurling Get rid of the thing. If it is a non-multiple item object, or if it is the last thing, just drop it. Otherwise, create or if it misses (combat) the monster, put it on the ...
@(#)weapons.c 3.17 ( Berkeley ) 6/15/81 (in-package :cl-rogue) (defparameter w-names (vector "mace" "long sword" "short bow" "arrow" "dagger" "rock" "two handed sword" "sling" "dart" "crossbow" "crossbow bolt" "spear")) (defparameter init-dam (vector Arrow 2h swor...
e1f680a9fd68a97fb9cd4edc4092b2a9c2c84119ca56c997da21eda9fc8d395f
goldfirere/singletons
PolyKindsApp.hs
module Singletons.PolyKindsApp where import Data.Kind (Type) import Data.Singletons.TH $(singletons [d| class Cls (a :: k -> Type) where fff :: (a :: k -> Type) (b :: k) instance where = Proxy |])
null
https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons-base/tests/compile-and-dump/Singletons/PolyKindsApp.hs
haskell
module Singletons.PolyKindsApp where import Data.Kind (Type) import Data.Singletons.TH $(singletons [d| class Cls (a :: k -> Type) where fff :: (a :: k -> Type) (b :: k) instance where = Proxy |])
f0487450950ec12bd3905c8438e6c39389e8b7415a8e137f4fa529adeac2cdaa
takeoutweight/clojure-scheme
ns_test.cljs
(ns cljs.ns-test (:refer-clojure :exclude [+]) (:require [cljs.ns-test.foo :refer [baz]]) (:use [cljs.ns-test.bar :only [quux]])) (def + -) (defn test-ns [] (assert (= 4 (clojure.core/+ 2 1 1))) (assert (= 0 (cljs.ns-test/+ 2 1 1))) (assert (= 0 (+ 2 1 1))) (assert (= 123 (baz))) (assert (= 123 (quux)...
null
https://raw.githubusercontent.com/takeoutweight/clojure-scheme/6121de1690a6a52c7dbbe7fa722aaf3ddd4920dd/test/cljs/cljs/ns_test.cljs
clojure
(ns cljs.ns-test (:refer-clojure :exclude [+]) (:require [cljs.ns-test.foo :refer [baz]]) (:use [cljs.ns-test.bar :only [quux]])) (def + -) (defn test-ns [] (assert (= 4 (clojure.core/+ 2 1 1))) (assert (= 0 (cljs.ns-test/+ 2 1 1))) (assert (= 0 (+ 2 1 1))) (assert (= 123 (baz))) (assert (= 123 (quux)...
b9f9384ea5e12aa5c465f1f8b6833521cc6d19bf45498796ff8b794abe029277
RefactoringTools/wrangler
wrangler_expand_rule.erl
%%@hidden %%@private -module(wrangler_expand_rule). -export([parse_transform/2]). -compile(export_all). %% -define(ERROR(R, T, F, I), %% begin %% rpt_error(R, T, F, I), throw({error , erl_syntax : ( %% proplists:get_value(form,I)),{unknown,R}}) %% end). -define(ERROR(R, T, F, I), begin rp...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/d3d84879b4269759b26d009013edc5bcff49a1af/src/wrangler_expand_rule.erl
erlang
@hidden @private -define(ERROR(R, T, F, I), begin rpt_error(R, T, F, I), proplists:get_value(form,I)),{unknown,R}}) end). [_, MetaAppTemp] = erl_syntax:tuple_elements(Temp), Es = erl_syntax:list_elements(MetaAppTemp), Temps=[hd(erl_syntax:tuple_elements(E))||E<-Es], get_meta_var_and_atoms(Temps)...
-module(wrangler_expand_rule). -export([parse_transform/2]). -compile(export_all). throw({error , erl_syntax : ( -define(ERROR(R, T, F, I), begin rpt_error(R, T, F, I), throw({error,R}) end). -import(erl_syntax, [clause/3, clause_patterns/1, clause_body/1, clause_guard/1, ...
5f46295cb9720b637e2eaddd4884acc510dd01e1a407f2e583f772b0efc2a478
swift-nav/labsat
Parser.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Labsat.Parser where import Data.Attoparsec.ByteString import Data.Attoparsec.ByteString.Char8 (char, decimal, double, isDigit_w8, isEndOfLine, scientific, signed) import qua...
null
https://raw.githubusercontent.com/swift-nav/labsat/58ec344fffa6e06c27d30bc3f753103e312040ee/src/Labsat/Parser.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Parse comma separated lists | take [\r\n]+ | Parse everything up to [\r\n]+ | Parse everything until next prompt (debug)...
# LANGUAGE NoImplicitPrelude # module Labsat.Parser where import Data.Attoparsec.ByteString import Data.Attoparsec.ByteString.Char8 (char, decimal, double, isDigit_w8, isEndOfLine, scientific, signed) import qualified Data.ByteString ...
7572a037cc40b3e3e281e3e2b8960d041c755b4cbf211bd7bc82a868df898265
tomoyuki28jp/web4r
pages.lisp
(in-package :web4r-tests) (in-suite web4r) (test genpages (defpclass wiki () ((title :length 256 :index t) (body :length 3000))) (genpages wiki) (let ((class 'wiki)) (with-new-cookie (let ((oid (ignore-errors (http-test-make-instance class :title "title1" :body "body1"...
null
https://raw.githubusercontent.com/tomoyuki28jp/web4r/c0ebe1f8d29994af20bdece8e9ad8b356b136ae9/tests/pages.lisp
lisp
(in-package :web4r-tests) (in-suite web4r) (test genpages (defpclass wiki () ((title :length 256 :index t) (body :length 3000))) (genpages wiki) (let ((class 'wiki)) (with-new-cookie (let ((oid (ignore-errors (http-test-make-instance class :title "title1" :body "body1"...
937c3228d1b6969b23e9b62df54da2fb25aa927cff4a2be0bc80555dc3d45150
reasonml-old/bs-containers
bchar_test.ml
open InfiniteJest open InfiniteJest.Test open Bchar let suite = describe "Bchar" (fun () -> [ test "lowerCaseIfAscii - 'A'" (fun () -> 'A' |> lowerCaseIfAscii |> Expect.toEqual 'a'); test "lowerCaseIfAscii - '0'" (fun () -> '0' |> lowerCaseIfAscii |> Expect.toEqual '0'); ...
null
https://raw.githubusercontent.com/reasonml-old/bs-containers/dfd1360dc74ede57c09e9f9d837ce59285af6fd2/tests/bchar_test.ml
ocaml
open InfiniteJest open InfiniteJest.Test open Bchar let suite = describe "Bchar" (fun () -> [ test "lowerCaseIfAscii - 'A'" (fun () -> 'A' |> lowerCaseIfAscii |> Expect.toEqual 'a'); test "lowerCaseIfAscii - '0'" (fun () -> '0' |> lowerCaseIfAscii |> Expect.toEqual '0'); ...
4ba94501475de8525d31f2b61be7e4eb2deb3288c2ffe4c5e9c0dddba0d2fcb3
sgbj/MaximaSharp
dgehd2.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/dgehd2.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp 20d (20D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ " " f2cl6.l , v 1d5cbacbb...
e3dc1db3426739fd8d1c87dd935d25e3bb4b73d59e422dbab45745147ee32d5b
startalkIM/ejabberd
poolboy_eqc.erl
-module(poolboy_eqc). -compile([export_all, nowarn_export_all]). -ifdef(TEST). -ifdef(EQC). -include_lib("eqc/include/eqc.hrl"). -include_lib("eqc/include/eqc_statem.hrl"). -include_lib("eunit/include/eunit.hrl"). poolboy_test_() -> {timeout, 20, fun() -> ?assert(eqc:quickche...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/poolboy/test/poolboy_eqc.erl
erlang
checkout shrinks to checkout_nonblock so we can simplify counterexamples only start new pool when old one is stopped all other states need a running pool check model state against internal state, only used in sequential tests what states block blocking checkout can block if we expect a checkout to fail if ...
-module(poolboy_eqc). -compile([export_all, nowarn_export_all]). -ifdef(TEST). -ifdef(EQC). -include_lib("eqc/include/eqc.hrl"). -include_lib("eqc/include/eqc_statem.hrl"). -include_lib("eunit/include/eunit.hrl"). poolboy_test_() -> {timeout, 20, fun() -> ?assert(eqc:quickche...
0565ab2dd7e28490e3c46015f858b6aef9e0a50442a562e038b13118c9988482
schani/clojurec
ios.cljc
(ns cljc.user (:require [cljc.objc :as objc])) (§subclass ActionHandler (:subclasses NSObject) (:fields [handler]) ^{:type :id} (§ self :initWithHandler h) (do (§super :init) (set! handler h) self) ^{:type :void} (§ self ...
null
https://raw.githubusercontent.com/schani/clojurec/e0dc2be70d357a0c9bf883db441f2db935b4014e/samples/ios.cljc
clojure
(ns cljc.user (:require [cljc.objc :as objc])) (§subclass ActionHandler (:subclasses NSObject) (:fields [handler]) ^{:type :id} (§ self :initWithHandler h) (do (§super :init) (set! handler h) self) ^{:type :void} (§ self ...
5e33033df95fc7d65adb705566a34358e8758f9cbf3e64022c121903bd71d72b
margnus1/kid-mud
playermaster.erl
Copyright ( c ) 2012 , and , See the file license.txt for copying permission . %%%------------------------------------------------------------------- @author %%% @doc %%% %%% @end %%%------------------------------------------------------------------- -module(playermaster). -include_lib("eunit/include/...
null
https://raw.githubusercontent.com/margnus1/kid-mud/56d759593e79d9c8ba7c45f9fc716d65de2554a7/src/playermaster.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API =================================================================== ---...
Copyright ( c ) 2012 , and , See the file license.txt for copying permission . @author -module(playermaster). -include_lib("eunit/include/eunit.hrl"). -behaviour(gen_server). -export([start_link/0, start/0, start_player/2, stop_player/1, broadcast/1, tell/3]). -export([init/1, handle_call/3, handle...
b585e7c2b00b9d3af3ccfbbcd383e7a5ac98a0f40e1a26ac540fb44419111c2f
mirage/irmin-rpc
server.mli
include Server_intf.Server * @inline
null
https://raw.githubusercontent.com/mirage/irmin-rpc/d5d556830db794551f83da945579933e4d06691d/src/irmin-rpc/server.mli
ocaml
include Server_intf.Server * @inline
94b54225cebedc96656a0b5b6ccc97f23b313a86b8bed690e190a5e3bc964e2d
janestreet/accessor_base
accessor_option.mli
open! Base open! Import include sig type 'a t = | None | Some of 'a [@@deriving accessors] end with type 'a t := 'a Option.t * [ default x ~is_default ] is an isomorphism between an [ option ] and its contents , where [ None ] is considered the same as [ default ] . [ x ] is expected to be [ true ]...
null
https://raw.githubusercontent.com/janestreet/accessor_base/8384c29a37e557168ae8a43b2a5a531f0ffc16e4/src/accessor_option.mli
ocaml
open! Base open! Import include sig type 'a t = | None | Some of 'a [@@deriving accessors] end with type 'a t := 'a Option.t * [ default x ~is_default ] is an isomorphism between an [ option ] and its contents , where [ None ] is considered the same as [ default ] . [ x ] is expected to be [ true ]...
4f39d50474bbe1e046bc6bb5c6a4a9fbfa415f5e65ebd0bef582063f34151b62
LeapYear/aeson-schemas
SumType.hs
# LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module Tests.SumType where import Data.Aeson (ToJSON, eitherDecode, encode) import Data.Proxy (Proxy (..)) import Data.String (fromString) import Test.Tasty import Test.Tasty.Golden import Test.Tasty.HUnit...
null
https://raw.githubusercontent.com/LeapYear/aeson-schemas/7693390d8f84da6498470ec0a61768a871967abc/test/Tests/SumType.hs
haskell
Tests this should compile
# LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module Tests.SumType where import Data.Aeson (ToJSON, eitherDecode, encode) import Data.Proxy (Proxy (..)) import Data.String (fromString) import Test.Tasty import Test.Tasty.Golden import Test.Tasty.HUnit...
17bcff8efab96c2979ad3729ecc0acbcd23bf71d7331a38f4ff9023b8cc55bdd
onedata/op-worker
atm_audit_log_store_content_browse_options.erl
%%%------------------------------------------------------------------- @author ( C ) 2022 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Record expressing store content br...
null
https://raw.githubusercontent.com/onedata/op-worker/19487f9378046f76119600cb34313feacbf3d137/src/modules/automation/store/container/audit_log/atm_audit_log_store_content_browse_options.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Record expressing store content browse options specialization for @end ------------------------------------------------------------------- API ==========================...
@author ( C ) 2022 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . audit_log store used in automation machinery . -module(atm_audit_log_store_content_browse_options). -author("Bartosz Walkowicz"). -behaviour(atm_store_content_browse_options). -include("modules/...
095c1ea9bd5a6508a366f450d5ad3b2a6e77a971a44841a3eb43a5fc6beb998c
spell-music/amsterdam
Bell2.hs
| additional parameters : none This additive bell is built with the OSCIL1 unit generator , allowing individual durations to be controlled from within the orchestra file . The module OSCIL1i has been created specifically for this type of instrument design . Csound enforces the use of a K - rate output argum...
null
https://raw.githubusercontent.com/spell-music/amsterdam/ab491022c7826c74eab557ecd11794268f5a5ae0/02-additive-synth-same-units/Bell2.hs
haskell
| additional parameters : none This additive bell is built with the OSCIL1 unit generator , allowing individual durations to be controlled from within the orchestra file . The module OSCIL1i has been created specifically for this type of instrument design . Csound enforces the use of a K - rate output argum...
19d1311d5c448bdc31a14c675f49dfcaad0483df964675690538e68dbeaf027d
klarna-incubator/bec
bec_group_t.erl
%%============================================================================== Type definition for the Group data structure %%============================================================================== -module(bec_group_t). %%============================================================================== %% Expo...
null
https://raw.githubusercontent.com/klarna-incubator/bec/b090bfbeeff298b4fc40e16a9da217f2ce404844/src/bec_group_t.erl
erlang
============================================================================== ============================================================================== ============================================================================== Exports ==========================================================================...
Type definition for the Group data structure -module(bec_group_t). -export([ from_map/1, to_map/1]). -include("bitbucket.hrl"). -type name() :: binary(). -export_type([ name/0 ]). -spec from_map(map()) -> name(). from_map(#{ <<"name">> := Name }) -> Name. -spec to_map(name()) -> map(). to_map(Name) -> #{ <<...
5590c8e73a397a78c262fddca9d50c216e8db0eca4c18891a8cfd5544a406838
conjure-cp/conjure
Factorial.hs
# LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable # module Conjure.Language.Expression.Op.Factorial where import Conjure.Prelude import Conjure.Language.Expression.Op.Internal.Common import qualified Data.Aeson as JSON -- aeson import qualified Data.HashMap.Strict as M ...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Expression/Op/Factorial.hs
haskell
aeson unordered-containers vector
# LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable # module Conjure.Language.Expression.Op.Factorial where import Conjure.Prelude import Conjure.Language.Expression.Op.Internal.Common data OpFactorial x = OpFactorial x deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable...
61aa4c80f4dd43c8284412874d90785b62801f9c9c1211199d8eb02b71229e94
circuithub/fast-downward
Gripper.hs
{-# language DisambiguateRecordFields #-} | This module is an example of using @fast - downward@ to solve a problem of -- transporting balls between rooms using a robot. See the source listing for -- this file for the full example, and see -- <-12-25-fast-downward.html> for a -- detailed walk through. module FastDo...
null
https://raw.githubusercontent.com/circuithub/fast-downward/9f6375af83f693076c957251e8ac0ab5c3dd63d7/FastDownward/Examples/Gripper.hs
haskell
# language DisambiguateRecordFields # transporting balls between rooms using a robot. See the source listing for this file for the full example, and see <-12-25-fast-downward.html> for a detailed walk through.
| This module is an example of using @fast - downward@ to solve a problem of module FastDownward.Examples.Gripper where import Control.Monad import qualified FastDownward.Exec as Exec import FastDownward data Room = RoomA | RoomB deriving (Eq, Ord, Show) adjacent :: Room -> Room adjacent RoomA = RoomB adjace...
779478f6fb043b880a2a8d65f516e3d581d2d1355e182e355869fd84bc830404
ocsigen/ocaml-eliom
bdd.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/misc/bdd.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Translated to OCaml by Original code written in SML by ... type bdd = One | Zero | Node of bdd * i...
4d1cdbb23b15bf026449948ea166b5cc544b5ddb835d09e732ce73524cae1e29
mirage/ocaml-conduit
config.ml
open Mirage let client = foreign ~deps:[ abstract nocrypto ] "Unikernel.Client" @@ console @-> stackv4 @-> job let () = register ~libraries:[ "conduit.lwt"; "conduit.mirage"; "dns.mirage" ] ~packages:[ "mirage-dns"; "conduit" ] "conduit-client" [ client $ default_console $ generic_stackv4 de...
null
https://raw.githubusercontent.com/mirage/ocaml-conduit/e5421ab8f4e32a95e112629b06c1c496e471e6ee/tests/conduit-mirage/http-fetch/config.ml
ocaml
open Mirage let client = foreign ~deps:[ abstract nocrypto ] "Unikernel.Client" @@ console @-> stackv4 @-> job let () = register ~libraries:[ "conduit.lwt"; "conduit.mirage"; "dns.mirage" ] ~packages:[ "mirage-dns"; "conduit" ] "conduit-client" [ client $ default_console $ generic_stackv4 de...
daa89500afb64fa1e8545d4a06bc62b3299cdf32f94282cad27004e93c8ec098
broadinstitute/firecloud-ui
links.cljs
(ns broadfcui.common.links (:require [dmohs.react :as react] [broadfcui.common.icons :as icons] [broadfcui.common.style :as style] [broadfcui.utils :as utils] )) (defn create-internal [attributes & contents] [:a (utils/deep-merge {:href "javascript:;" :style {:textDecoration...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/common/links.cljs
clojure
nil :download is fine with React
(ns broadfcui.common.links (:require [dmohs.react :as react] [broadfcui.common.icons :as icons] [broadfcui.common.style :as style] [broadfcui.utils :as utils] )) (defn create-internal [attributes & contents] [:a (utils/deep-merge {:href "javascript:;" :style {:textDecoration...
2cd71bee1dffb403a622696c0349424272ebdad8e8115994e5941809cce58cff
AdRoll/kinetic
kinetic_sup.erl
-module(kinetic_sup). -behaviour(supervisor). -export([start_link/0, start_link/1]). -export([init/1, stop/1]). start_link() -> start_link([]). % Need the slightly stupid double code here to avoid an infinite loop % in case args is actually [] in the configuration. start_link([]) -> Args = kinetic_config:g(...
null
https://raw.githubusercontent.com/AdRoll/kinetic/e1c0c1f5f388b990fbb28ca4fda14e62bcefc3c2/src/kinetic_sup.erl
erlang
Need the slightly stupid double code here to avoid an infinite loop in case args is actually [] in the configuration.
-module(kinetic_sup). -behaviour(supervisor). -export([start_link/0, start_link/1]). -export([init/1, stop/1]). start_link() -> start_link([]). start_link([]) -> Args = kinetic_config:g(args), supervisor:start_link({local, ?MODULE}, ?MODULE, Args); start_link(Args) -> supervisor:start_link({local, ?...
4a2011384c658e696c13a2b9748c91fa3d9a555efaee67b2301db91a5381050a
ChaosEternal/guile-termite
pingpong.scm
(use-modules (thread-mailbox thread-mailbox) (srfi srfi-18)) (define t1 (current-thread)) (thread-mailbox-make-and-set!) (define (pong) (begin ; (display "here\n") ; (display (current-thread)) (thread-send t1 (thread-receive)) (pong))) (define t2 (make-thread (lambda () (pong)))) (thread-mail...
null
https://raw.githubusercontent.com/ChaosEternal/guile-termite/f571fd37bc2031e59e50496cdf0d53a8d2c7033a/test/pingpong.scm
scheme
(display "here\n") (display (current-thread)) (display 'here1)
(use-modules (thread-mailbox thread-mailbox) (srfi srfi-18)) (define t1 (current-thread)) (thread-mailbox-make-and-set!) (define (pong) (begin (thread-send t1 (thread-receive)) (pong))) (define t2 (make-thread (lambda () (pong)))) (thread-mailbox-make-and-set! t2) (thread-start! t2) (define (ping ...
a77f39d9432d25a26334cc4dc9e67b4dab4d39ae4a64557a7b4c6c0de2eb9581
ebresafegaga/tina
parser_tests.ml
open Parsing open Syntax module G = Grammar module P = ParserEntry module A = Ast (* useful functions *) let tokenize str = let lb = Lexing.from_string str in let rec loop () = match Lexer.read_token lb with | Grammar.EOF -> [] | token -> token :: loop () | exception Lexer.SyntaxError _ -> [] (* f...
null
https://raw.githubusercontent.com/ebresafegaga/tina/66fa8daa66c0c6e65260bbea3e8e2ddcc2f9d2d0/tests/parser_tests.ml
ocaml
useful functions for now
open Parsing open Syntax module G = Grammar module P = ParserEntry module A = Ast let tokenize str = let lb = Lexing.from_string str in let rec loop () = match Lexer.read_token lb with | Grammar.EOF -> [] | token -> token :: loop () in loop () let parse str = let lexbuf = Lexing.from_string str...
55add8217de59ea7a6ab62d195e5b26f821df027b83b10c10ad2ce6f8e2f5fab
heyoka/faxe
rest_helper.erl
%%%------------------------------------------------------------------- @author ( C ) 2019 , < COMPANY > %%% @doc %%% %%% @end Created : 20 . Aug 2019 16:02 %%%------------------------------------------------------------------- -module(rest_helper). -author("heyoka"). -include("faxe.hrl"). %% API -export([task...
null
https://raw.githubusercontent.com/heyoka/faxe/58963291e0a645241b0e16d04f54c998f26d8824/apps/faxe/src/web/rest_helper.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API
@author ( C ) 2019 , < COMPANY > Created : 20 . Aug 2019 16:02 -module(rest_helper). -author("heyoka"). -include("faxe.hrl"). -export([task_to_map/1, task_to_map/2, template_to_map/1, do_register/6, reg_fun/3, report_malformed/3, add_tags/2, set_tags/2, get_task_or_template_id/2, is_authorized/1, is_aut...
cd9cf5c8d34c24f61d8645a32cc624912fb4a44c6949b81e1b4abca3726b5dee
broom-lang/broom
ExpandPats.ml
open Streaming open Asserts module T = Fc.Type module E = Fc.Term.Expr module S = Fc.Term.Stmt type var = E.var type expr = E.t type pat = E.pat type stmt = Fc.Term.Stmt.t module Make (Env : TyperSigs.ENV) (K : TyperSigs.KINDING with type env = Env.t) = struct type env = Env.t type ctx = Inline | Shared of ...
null
https://raw.githubusercontent.com/broom-lang/broom/36d4d9ae234a16bc4da287eef751e9447705ee58/compiler_prev/lib/Typechecker/ExpandPats.ml
ocaml
TODO: Also deduplicate internal nodes as in Pettersson paper TODO: use `frees`? TODO: Warnings for redundant states (refcount = 0)
open Streaming open Asserts module T = Fc.Type module E = Fc.Term.Expr module S = Fc.Term.Stmt type var = E.var type expr = E.t type pat = E.pat type stmt = Fc.Term.Stmt.t module Make (Env : TyperSigs.ENV) (K : TyperSigs.KINDING with type env = Env.t) = struct type env = Env.t type ctx = Inline | Shared of ...
0d1f02e25db6fe43fa6e522dcd990a137ef0e08bcdfce9ddd0a04fc23e1ce6a1
HachiSecurity/plc-llvm
Text.hs
# LANGUAGE RecursiveDo # module Hachi.Compiler.CodeGen.Constant.Text ( strlen, strcpy, streq ) where ------------------------------------------------------------------------------- import LLVM.IRBuilder as IR import LLVM.AST import LLVM.AST.Constant import qualified LLVM.AST.IntegerPredicate as LLVM imp...
null
https://raw.githubusercontent.com/HachiSecurity/plc-llvm/c99c8d58ec7cbbb8942604338cfde00ad23e7f13/compiler/src/Hachi/Compiler/CodeGen/Constant/Text.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- | `strlen` @str@ generates code which implements the same behaviour as the @strlen@ function. I.e. it computes the length of @str@. new blocks we are essentiall...
# LANGUAGE RecursiveDo # module Hachi.Compiler.CodeGen.Constant.Text ( strlen, strcpy, streq ) where import LLVM.IRBuilder as IR import LLVM.AST import LLVM.AST.Constant import qualified LLVM.AST.IntegerPredicate as LLVM import Hachi.Compiler.CodeGen.Monad strlen :: (MonadCodeGen m, MonadIRBuilder m) ...
93ac9b283b07f60f3aa687cca0e8fc7aa876ca8aebb1a5f75048211c2df850ba
scarvalhojr/haskellbook
DogsRule.hs
module DogsRule ( dogs ) where dogs :: IO () dogs = do putStrLn "Hello, dogs!" putStrLn "Goodbye, dogs."
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter13/hello/src/DogsRule.hs
haskell
module DogsRule ( dogs ) where dogs :: IO () dogs = do putStrLn "Hello, dogs!" putStrLn "Goodbye, dogs."
3afa3062cf3007700c229b28377fec36040d8dec9d9849d0821f217db39d123a
metaocaml/ber-metaocaml
pr5663_ok.ml
(* TEST flags = " -w a " * setup-ocamlc.byte-build-env ** ocamlc.byte *** check-ocamlc.byte-output *) module F (M : sig type 'a t type 'a u = string val f : unit -> _ u t end) = struct let t = M.f () end
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules-bugs/pr5663_ok.ml
ocaml
TEST flags = " -w a " * setup-ocamlc.byte-build-env ** ocamlc.byte *** check-ocamlc.byte-output
module F (M : sig type 'a t type 'a u = string val f : unit -> _ u t end) = struct let t = M.f () end
6ae24692698de912d7b3214f6f51ec136611e87a13b291ea1b3c9a1c33a26dde
jbclements/RSound
read-wav.rkt
#lang racket/base ;; untested: error clauses (require ffi/vector racket/contract racket/match racket/bool) (provide (contract-out [read-sound/s16vector (-> path-string? exact-integer? (or/c exact-integer? false?) (list/c s16vector? exact-integer?))] [read...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/read-wav.rkt
racket
untested: error clauses given a file-string, a beginning frame, and an ending frame (or #f), return the data, the number of frames, and the sample-rate given a path-string, return the number of frames in the file and the sample rate file-path -> (list/c nat nat) parse the file to obtain the number of frames and t...
#lang racket/base (require ffi/vector racket/contract racket/match racket/bool) (provide (contract-out [read-sound/s16vector (-> path-string? exact-integer? (or/c exact-integer? false?) (list/c s16vector? exact-integer?))] [read-sound/formatting (-> path-...
fc961f089f4805b955cc709dd20133161e01da48165941e75d21e73fc4ab89d3
nklein/draw
transform.lisp
(in-package #:draw-pdf) (defmethod %translate ((renderer pdf-renderer) dx dy) (pdf:translate dx dy)) (defmethod %rotate ((renderer pdf-renderer) degrees) (pdf:rotate degrees)) (defmethod %scale ((renderer pdf-renderer) sx sy) (pdf:scale sx sy))
null
https://raw.githubusercontent.com/nklein/draw/2b7a51fa06c81a46dffc439a35b3b0ac18c94893/src/pdf/transform.lisp
lisp
(in-package #:draw-pdf) (defmethod %translate ((renderer pdf-renderer) dx dy) (pdf:translate dx dy)) (defmethod %rotate ((renderer pdf-renderer) degrees) (pdf:rotate degrees)) (defmethod %scale ((renderer pdf-renderer) sx sy) (pdf:scale sx sy))
c9f5771aee4992be3caf54b9b5c99e841e62870d3e345afb84995c10b2cac705
herbelin/coq-hh
typeops.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/kernel/typeops.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * s Type of a let in. * Kernel safe...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Univ open Ter...
b5a7a0ebc6c5dae2e3380ec3ad733ff3584ce0e792042b30f870805888a3ee99
bdeket/rktsicm
maps.rkt
#lang racket/base (require rackunit "../../main.rkt" "../helper.rkt" ) (rename-part 'derivative 'D) (define the-tests (test-suite "calculus/maps" (test-case "connection bases & diff" ;;; Explanation of the connection between the basis forms and the ;;; differentials of ...
null
https://raw.githubusercontent.com/bdeket/rktsicm/e7bdc2190f85703b98e573afb5b5d8a440bad3c4/rktsicm/sicm/tests/calculus/maps.rkt
racket
Explanation of the connection between the basis forms and the differentials of coordinate functions. but this is a fraud... Note that if we have a non-coordinate basis the dual does not work on the transported vector. However, if we kludge the correct argument it gives the expected answer. General path on the sp...
#lang racket/base (require rackunit "../../main.rkt" "../helper.rkt" ) (rename-part 'derivative 'D) (define the-tests (test-suite "calculus/maps" (test-case "connection bases & diff" (define-coordinates (up x y z) R3-rect) (define R3-rect-point ((R3-rect '->point) (up '...
ee5720d5ba5dc5396d8ee43e5a2e3368c48e24e7c00cab53b56e1adc4a80e514
uw-unsat/serval-sosp19
test.rkt
#lang rosette/safe (require serval/lib/unittest serval/lib/core serval/riscv/base serval/riscv/interp serval/riscv/objdump (only-in racket/base struct-copy for) "generated/monitors/toymon/verif/asm-offsets.rkt" (prefix-in toymon: (combine-in "generated/monitors/toymon.asm.rkt" "generate...
null
https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/monitors/toymon/verif/test.rkt
racket
#lang rosette/safe (require serval/lib/unittest serval/lib/core serval/riscv/base serval/riscv/interp serval/riscv/objdump (only-in racket/base struct-copy for) "generated/monitors/toymon/verif/asm-offsets.rkt" (prefix-in toymon: (combine-in "generated/monitors/toymon.asm.rkt" "generate...
375d56d3a6073d9ce8059e7fe3f1088030756263c79c74e7bcda5554a21b17af
Clozure/ccl
cocoa-grep-pre-lion.lisp
;;;-*-Mode: LISP; Package: GUI -*- ;;; ;;; Copyright 2007 Clozure Associates ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; -2.0 ;;; ;;; Unless required by applicable...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/cocoa-grep-pre-lion.lisp
lisp
-*-Mode: LISP; Package: GUI -*- Copyright 2007 Clozure Associates you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
distributed under the License is distributed on an " AS IS " BASIS , cocoa-grep.lisp for pre 10.7 ( pre - Lion ) versions of OSX (in-package "GUI") (defvar *grep-program* "grep") (defun cocoa-edit-grep-line (file line-num &optional search-string) (assume-cocoa-thread) (let ((view (find-or-make-hemlock-view...
419e0fa1bf7e5720738e47fba1dc99d9613c2a303ffaf4966b8df3835fe24567
triffon/fp-2019-20
ex03-20191022-solutions.rkt
; Зад.0 (define (accumulate op nv a b term next) (if (> a b) nv (op (term a) (accumulate op nv (next a) b term next)))) (define (filter-accum p? op nv a b term next) (cond ((> a b) nv) ((p? a) (op (term a) (filter-accum p? op nv (next a) b term next))) (els...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-1/ex03-20191022-solutions.rkt
racket
Зад.0 Зад.1 Зад.2 Зад.3 Зад.4 Зад.5 Зад.6 Зад.6.5 (define (any? p? a b) (not (all? (complement p?) a b))) или обратното :) Зад.7 Зад.8 Зад.9 Зад.10 Зад.11 ^^^^^^^^^^^^^^^^^^^ Зад.12
(define (accumulate op nv a b term next) (if (> a b) nv (op (term a) (accumulate op nv (next a) b term next)))) (define (filter-accum p? op nv a b term next) (cond ((> a b) nv) ((p? a) (op (term a) (filter-accum p? op nv (next a) b term next))) (else (filte...
107cabc50630f3adeaf503ebfb7af8e8ac5c309db14a974c45a02b2178fa5171
CryptoKami/cryptokami-core
Monitor.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} module Pos.Util.Monitor ( startMonitor , stopMonitor ) where import Control.Concurrent (killThread) import Control.Monad.IO.Class (MonadIO) import Mockable.Class (Mockable) import qualified Mockable.Metrics a...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Util/Monitor.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE FlexibleContexts # module Pos.Util.Monitor ( startMonitor , stopMonitor ) where import Control.Concurrent (killThread) import Control.Monad.IO.Class (MonadIO) import Mockable.Class (Mockable) import qualified Mockable.Metrics as Metrics import Node (N...
5217e932b0031a3e404c670ce4f79613527da0147f8ffc26d3a5aeb23583faf1
wireless-net/erlang-nommu
d.erl
-module(d). -export([start/0, stop/0]). -export([store/2, store/3, move/2, location/1, who_are_at/1, who_are_older/1, size/0]). -export([init/0]). % spawn -record(person, {name, age, location, moved=false}). %%%---------------------------------------------------------------------- %%% User interface functions %%...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/tools/test/cover_SUITE_data/d.erl
erlang
spawn ---------------------------------------------------------------------- User interface functions ---------------------------------------------------------------------- start() -> pid() stop() store(Name, Location) -> store(Name, Age, Location) -> ok | {error,Reason} Name = Location = atom() Age = integ...
-module(d). -export([start/0, stop/0]). -export([store/2, store/3, move/2, location/1, who_are_at/1, who_are_older/1, size/0]). -record(person, {name, age, location, moved=false}). start() -> spawn(?MODULE, init, []). stop() -> arne ! stop. store(Name, Location) -> store(Name, ?AGE, Location). sto...
fea54d8545267ed42076d91479c17b7a061287d6a6bd13ffa06da13f247c8b3c
sirherrbatka/vellum
cl-ds.lisp
(cl:in-package #:vellum.int) (defgeneric gather-column-data (range definitions result)) (defgeneric fill-columns-buffer-impl (range position buffer finish-callback key)) (defmethod fill-columns-buffer-impl ((range cl-ds.alg:group-by-result-range) ...
null
https://raw.githubusercontent.com/sirherrbatka/vellum/5ba920c9733a290226cde4738de28255b4307b69/src/integration/cl-ds.lisp
lisp
(cl:in-package #:vellum.int) (defgeneric gather-column-data (range definitions result)) (defgeneric fill-columns-buffer-impl (range position buffer finish-callback key)) (defmethod fill-columns-buffer-impl ((range cl-ds.alg:group-by-result-range) ...
55ea7f6f700ba40c84f454731497d8397600d65403115ddf54a8d190e7080828
EasyCrypt/easycrypt
ecPhlEqobs.ml
(* -------------------------------------------------------------------- *) open EcUtils open EcTypes open EcModules open EcFol open EcEnv open EcPV open EcCoreGoal open EcLowGoal open EcLowPhlGoal module TTC = EcProofTyping (* -------------------------------------------------------------------- *) let extend_body fs...
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/2e53a4272c940b41400de9ce42c8db7f6a514ee7/src/phl/ecPhlEqobs.ml
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- only called on concrete procedures -------------------------------------------------------------------- -------------------------------------------------------------------- ...
open EcUtils open EcTypes open EcModules open EcFol open EcEnv open EcPV open EcCoreGoal open EcLowGoal open EcLowPhlGoal module TTC = EcProofTyping let extend_body fsig body = let arg = pv_arg in let i = let args = let named_arg ov = match ov.ov_name with | Some v -> { v_name = v; v_ty...
d880b23f67dc99efa24f63b3a7a75765bc2de1006c145185db8e5e331d2786a1
michiakig/LispInSmallPieces
chap8e.scm
$ I d : chap8e.scm , v 4.0 1995/07/10 06:52:05 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest version may be...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap8e.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) end of chap8e.scm
$ I d : chap8e.scm , v 4.0 1995/07/10 06:52:05 LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz (defprimitive eval (lambda (v) (if (program? v) (evaluate v e...
07619b7e5b1e432340782b1fa063a2ffb1c12ad5b451985ad50698e379f4cdd1
SmartDev-0205/cardano-token-contract
Utils.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # -- | Util functions module ADADAO.Contracts.Utils where import Control.Lens (preview, view) import Data.Either.Combinators (rightToMaybe) import Data.List qualified as L import Data.Map q...
null
https://raw.githubusercontent.com/SmartDev-0205/cardano-token-contract/2a0fd76e9d8199becc8e47f99938e3c3710b300a/src/ADADAO/Contracts/Utils.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # | Util functions # INLINEABLE hasUnitValue # | Check whether the given value does not contain the given asset class. | Get all the value from inputs | Find the datum of an output | Get the value of the given ChainIndexTxOut | Get the datum of the given C...
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module ADADAO.Contracts.Utils where import Control.Lens (preview, view) import Data.Either.Combinators (rightToMaybe) import Data.List qualified as L import Data.Map qualified as M import Ledger (Address, ChainIndexTxOut, TxId (TxId), TxOutRef (TxOutRef, ...
a44112a923d2d92c98cbc3db6c94bfec092a4dcadc2698f3d3ed7431d4214fa5
leftaroundabout/constrained-categories
Constrained.hs
-- | Module : Control . Monad . Constrained Copyright : ( c ) 2013 -- License : GPL v3 (see COPYING) -- Maintainer : (@) jsag $ hvl.no -- {-# LANGUAGE ConstraintKinds #-} # LANGUAGE TypeFamilies # # LANGUAGE FunctionalDependencies # {-# LANGUAGE TypeOperat...
null
https://raw.githubusercontent.com/leftaroundabout/constrained-categories/3323dac2198e1a404307acc37452d5291905f861/Control/Monad/Constrained.hs
haskell
| License : GPL v3 (see COPYING) Maintainer : (@) jsag $ hvl.no # LANGUAGE ConstraintKinds # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # * Monads ...
Module : Control . Monad . Constrained Copyright : ( c ) 2013 # LANGUAGE TypeFamilies # # LANGUAGE FunctionalDependencies # # LANGUAGE FlexibleInstances # #if __GLASGOW_HASKELL__ >= 800 # LANGUAGE UndecidableSuperClasses # #endif # LANGUAGE TupleSections ...
7c25a3746205903b1ff7d5ee2977705f2984e875813b05ad5c81d53bab959703
hatsugai/SyncStitch
pe.ml
open Error open Csp open Guedra open DrawModel open Ts open PeFig type prop = { process_name : string; wch_toplevel : win_msg chan; width : int; height : int; } type ('a, 'b, 'c, 's) context = { (* selected state and figure id *) mutable cur_state : 's; mutable cur_state_fig_id : int; ...
null
https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/pe.ml
ocaml
selected state and figure id undo/redo layout of state figures sequence number for diagram filename Draw ext set later remove subtree under id NOTE: outgoing of the parent of id is not changed update draw model for selected item unselect checklist if selected on path Ctrl+Z: undo Ctrl+Y: redo ...
open Error open Csp open Guedra open DrawModel open Ts open PeFig type prop = { process_name : string; wch_toplevel : win_msg chan; width : int; height : int; } type ('a, 'b, 'c, 's) context = { mutable cur_state : 's; mutable cur_state_fig_id : int; mutable undo : ('s * int * ('a, 'b, ...
ddfe1acbfc5442d59c991d8e61f8dae3cba8a0161b0e971b0eb23f5bf1462052
fieldstrength/aeson-deriving
Unsafe.hs
module Data.Aeson.Deriving.Text.Unsafe where import Control.Monad (unless) import Data.Aeson import Data.Proxy import Data.Text (Text, unpack) import Text.Regex.TDFA ((=~)) import GHC.TypeLits (KnownSymbol, Symbol, symbolVal) newtype TextWithPatte...
null
https://raw.githubusercontent.com/fieldstrength/aeson-deriving/861dc8ebc05792a0924e8fe6aae2ae41a59fc751/src/Data/Aeson/Deriving/Text/Unsafe.hs
haskell
module Data.Aeson.Deriving.Text.Unsafe where import Control.Monad (unless) import Data.Aeson import Data.Proxy import Data.Text (Text, unpack) import Text.Regex.TDFA ((=~)) import GHC.TypeLits (KnownSymbol, Symbol, symbolVal) newtype TextWithPatte...
10a4bd836c36e3dad91c46139602ecf04b185ed59dd7b8409e063dbb29cd050a
erlangonrails/devdb
bulkowner.erl
2007 - 2010 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing,...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/bulkowner.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 gov...
2007 - 2010 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc Bulk owner operations ( for now only broadcasting ) . @version $ I d : bulkowner.erl 93...
713fe07e4f926035df004807985fad1689e90ec299a19c8de1c071eed20732ff
yomimono/stitchcraft
types.ml
some PPX - generated code results in warning 39 ; turn that off [@@@ocaml.warning "-32-39"] type cross_stitch = | Full (* X *) (* full stitch *) (* half stitches *) | Backslash (* \ *) (* upper left <-> lower right *) | Foreslash (* / *) (* lower left <-> upper right *) (* quarter stitches *) | Backt...
null
https://raw.githubusercontent.com/yomimono/stitchcraft/fce6506b50f73404f8f71dac1847de11469f0f1d/stitchy/lib/types.ml
ocaml
X full stitch half stitches \ upper left <-> lower right / lower left <-> upper right quarter stitches ` (upper left quadrant) , (lower left quadrant) mirrored ` (upper right quadrant) mirrored , (lower right quadrant) too wide for utop, probably poky, but we only do it for small substrates, ...
some PPX - generated code results in warning 39 ; turn that off [@@@ocaml.warning "-32-39"] type cross_stitch = [@@deriving eq, yojson] type stitch = | Cross of cross_stitch [@@deriving eq, yojson] let pp_cross_stitch fmt = function | Full -> Format.fprintf fmt "X" | Backslash -> Format.fprintf fmt "\\" | Fo...
d7da138f3939f3caec969295e058cf2c61944b9ed08d3cdb7219d52c2dee0292
Helium4Haskell/helium
ClassA.hs
module ClassA where class A a where id2 :: a -> a
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/classesQualified/ClassA.hs
haskell
module ClassA where class A a where id2 :: a -> a
1ea98c83d896da39f691861a36c1a03c56c110595ba63f2c39eac59557bc471d
keera-studios/keera-hails
VersionedModel.hs
-- | -- Copyright : ( C ) Keera Studios Ltd , 2013 -- License : BSD3 Maintainer : module Hails.MVC.Model.ProtectedModel.VersionedModel where import Data.ExtraVersion import Hails.MVC.Model.ProtectedModel import Hails.MVC.Model.ReactiveModel import Language.Haskell.TH.Syntax import Language.Haskell.TH.De...
null
https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails-mvc-solutions-gtk/src/Hails/MVC/Model/ProtectedModel/VersionedModel.hs
haskell
| License : BSD3 class VersionedReactiveModel a where getRMVersion :: a -> String
Copyright : ( C ) Keera Studios Ltd , 2013 Maintainer : module Hails.MVC.Model.ProtectedModel.VersionedModel where import Data.ExtraVersion import Hails.MVC.Model.ProtectedModel import Hails.MVC.Model.ReactiveModel import Language.Haskell.TH.Syntax import Language.Haskell.TH.DeriveField class VersionedBasi...
6ce2a8ba3742816ed0ac150f65789d1b7e7130484cfc457f4838cb18d72eb6c4
monstasat/janus-ocaml
promise.mli
type ('a, 'b) t type 'a resolve = 'a -> unit type 'a reject = 'a -> unit val is_supported : unit -> bool val make : ('a resolve -> 'b reject -> unit) -> ('a, 'b) t val resolve : 'a -> ('a, 'b) t val reject : 'b -> ('a, 'b) t val then_bind : on_fulfilled:('a -> ('c ,'b) t) -> ?on_rejected:('b -> ('c, 'b) t) -...
null
https://raw.githubusercontent.com/monstasat/janus-ocaml/b68e8b23a95dead8bd6921206ad8c1fe64e25e30/lib/jsoo/promise.mli
ocaml
type ('a, 'b) t type 'a resolve = 'a -> unit type 'a reject = 'a -> unit val is_supported : unit -> bool val make : ('a resolve -> 'b reject -> unit) -> ('a, 'b) t val resolve : 'a -> ('a, 'b) t val reject : 'b -> ('a, 'b) t val then_bind : on_fulfilled:('a -> ('c ,'b) t) -> ?on_rejected:('b -> ('c, 'b) t) -...
000c71282ce455529f93425c3bdded5724a62f22f09f0af55aefa2b668d6859b
haskell-github/github
Emails.hs
----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause Maintainer : < > -- -- The user emails API as described on < / > . module GitHub.Endpoints.Users.Emails ( currentUserEmailsR, currentUserPublicEmailsR, module GitHub.Data, ) where...
null
https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/src/GitHub/Endpoints/Users/Emails.hs
haskell
--------------------------------------------------------------------------- | License : BSD-3-Clause The user emails API as described on | List email addresses. See </#list-email-addresses-for-a-user> | List public email addresses. See </#list-public-email-addresses-for-a-user>
Maintainer : < > < / > . module GitHub.Endpoints.Users.Emails ( currentUserEmailsR, currentUserPublicEmailsR, module GitHub.Data, ) where import GitHub.Data import GitHub.Internal.Prelude import Prelude () currentUserEmailsR :: FetchCount -> Request 'RA (Vector Email) currentUserEmailsR = ...
956053582268f3ff26c050adc928d69fef785fe4245c64b4dbea6b243901b234
returntocorp/semgrep
Parse_csharp_tree_sitter.ml
Sjoerd Langkemper * * Copyright ( c ) 2021 R2C * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in ...
null
https://raw.githubusercontent.com/returntocorp/semgrep/dcea978347df81cbc8f2c2b49b80c1980f6194cf/languages/csharp/generic/Parse_csharp_tree_sitter.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Helpers ************************************************************************...
Sjoerd Langkemper * * Copyright ( c ) 2021 R2C * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in ...
aa4d70e717abd7dda65636ae62b54d89e5e37816427f31a4b268859575506c8f
links-lang/links
js.ml
open Utility let hide_database_info = Settings.(flag ~default:true "js_hide_database_info" |> privilege `System |> synopsis "Hides database credentials on the client-side" |> convert parse_bool |> sync) (** {0 Code generation} *) module Symbols = struct let words =...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/js.ml
ocaml
* {0 Code generation} "future keywords" TBD: it would be better if this split to chunks maximally matching (\w+)|(\W) then we would not split apart words in partly-symbolic idents. FIXME: this could conflict with Links names. Closure conversion means we can no longer rely on top-level ...
open Utility let hide_database_info = Settings.(flag ~default:true "js_hide_database_info" |> privilege `System |> synopsis "Hides database credentials on the client-side" |> convert parse_bool |> sync) module Symbols = struct let words = CharMap.from_alist ...
aa7d3e9711dde5501a37cb7987adc56c15696000aafe49ec9f7c54a975bb1068
ghuysmans/ocaml-fet
main.ml
open GMain open Spec.ProgramGettext.Gettext let _locale = GtkMain.Main.init () let run prog t = let open Unix in let argv = Spec.argv prog t in Array.iter prerr_endline argv; create_process prog argv stdin stdout stderr |> waitpid [] |> snd |> function | WEXITED 0 -> () FIXME let () = let title =...
null
https://raw.githubusercontent.com/ghuysmans/ocaml-fet/e1f2ce9e500e16e6d181baf9e440ede21d740ef7/gtk/main.ml
ocaml
FIXME +, -
open GMain open Spec.ProgramGettext.Gettext let _locale = GtkMain.Main.init () let run prog t = let open Unix in let argv = Spec.argv prog t in Array.iter prerr_endline argv; create_process prog argv stdin stdout stderr |> waitpid [] |> snd |> function | WEXITED 0 -> () FIXME let () = let title =...
be82f88557045436d815a6e40ed4fa5d14025f4d35e4485008fc8ec0bc31035e
fmnoise/zakon
project.clj
(defproject zakon "0.3.0" :description "Authorization library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]])
null
https://raw.githubusercontent.com/fmnoise/zakon/3886b6b6ba14bf907c95b63ddf0f034e751888e9/project.clj
clojure
(defproject zakon "0.3.0" :description "Authorization library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]])
72e0633850905cf2dd9521732a217debe20b4a4389bebfd7a07393d72e35d6ec
reflectionalist/S9fES
string-split.scm
Scheme 9 from Empty Space , Function Library By , 2009,2010 ; Placed in the Public Domain ; ; (string-split char string) ==> list ; Split a string into substrings . is interpreted as a separator . ; Return a list containing all coherent sequences of non-separating ; characters contained in the given string....
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/string-split.scm
scheme
Placed in the Public Domain (string-split char string) ==> list Return a list containing all coherent sequences of non-separating characters contained in the given string. When multiple subsequent separators are found, empty strings will be generated. Example: (string-split #\: "a::b:c:") ==> ("a" "" "b"...
Scheme 9 from Empty Space , Function Library By , 2009,2010 Split a string into substrings . is interpreted as a separator . (define (string-split c s) (letrec ((split (lambda (i k tmp res) (cond ((= i k) (cons tmp res)) ((char=? (string-ref s i) c) ...
c7c6b02312636ed71c205ac0f7136172554506934049cb8deaf06b758aff22c8
TrustInSoft/tis-interpreter
listset.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/qed/src/listset.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Soft...
bdc1bba17d42a2301bad2f3d7f5dd4cf1c0c649b010d1148afb2470609622340
haskell-foundation/foundation
Copy.hs
# LANGUAGE UndecidableInstances # # LANGUAGE CPP # module Foundation.Collection.Copy ( Copy(..) ) where import GHC.ST (runST) import Basement.Compat.Base ((>>=)) import Basement.Nat import Basement.Types.OffsetSize import qualified Basement.Block as BLK import qualified...
null
https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/Collection/Copy.hs
haskell
# LANGUAGE UndecidableInstances # # LANGUAGE CPP # module Foundation.Collection.Copy ( Copy(..) ) where import GHC.ST (runST) import Basement.Compat.Base ((>>=)) import Basement.Nat import Basement.Types.OffsetSize import qualified Basement.Block as BLK import qualified...
95560a98029f5e62eed3e788babd890793f63d667c12a40588f71753ec7d6905
nikivazou/verified_string_matching
Chunk.hs
------------------------------------------------------------------------------- -------- --------------------------------------------------- ------------------------------------------------------------------------------- {-@ reflect chunkString @-} {-@ chunkString :: Integer -> xs:RString -> List RString / [string...
null
https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/Data/RString/Chunk.hs
haskell
----------------------------------------------------------------------------- ------ --------------------------------------------------- ----------------------------------------------------------------------------- @ reflect chunkString @ @ chunkString :: Integer -> xs:RString -> List RString / [stringLen xs] @
chunkString :: Integer -> RString -> List (RString) chunkString i xs | i <= 1 || stringLen xs <= i = C xs N | otherwise = C (takeString i xs) (chunkString i (dropString i xs))
79c16e175e2a798c43ab8da701529f416d2f25fc2b8dd69705bc05ce14faa719
mmottl/gsl-ocaml
poly.mli
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 (** Polynomials *) open Gsl_complex type poly = float array * { 3 Polynomial Evaluation } external eval : poly -> float -> float =...
null
https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/poly.mli
ocaml
* Polynomials * {3 Quadratic Equations}
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 open Gsl_complex type poly = float array * { 3 Polynomial Evaluation } external eval : poly -> float -> float = "ml_gsl_poly_eval"...
fe31b6930fea51a338906259f6e431b3b22a6f2192219197ba451a8a9957d070
artyom-poptsov/guile-smc
puml.scm
puml.scm -- PlantUML parser written in Guile - SMC . Copyright ( C ) 2021 < > ;; ;; 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 3 of the License , or ;; (at your optio...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-smc/b5d8b8b3b1be699b1fe6ee0723d28fc96717d7e4/modules/smc/puml.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. The 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 ...
puml.scm -- PlantUML parser written in Guile - SMC . Copyright ( C ) 2021 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License 1 : / (define-...
636b3314d2a3995bf79e1db27f6a18fa37ac26ab09b8b042c8f6d5028c027cf3
haskell-CI/hackage-matrix-builder
Types.hs
# LANGUAGE GeneralizedNewtypeDeriving # -- | Copyright : © 2018 SPDX - License - Identifier : GPL-3.0 - or - later -- module Controller.Types where import Prelude.Local import Data.Pool import qualified Database.PostgreSQL.Simple as PGS import PkgId import PkgIdxTsSet ...
null
https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-exe/Controller/Types.hs
haskell
| | See 'fetchPkgLstCache' ^ see 'fetchPkgLstCache' ^ see 'fetchPkgIdxTsCache'
# LANGUAGE GeneralizedNewtypeDeriving # Copyright : © 2018 SPDX - License - Identifier : GPL-3.0 - or - later module Controller.Types where import Prelude.Local import Data.Pool import qualified Database.PostgreSQL.Simple as PGS import PkgId import PkgIdxTsSet ...
3c2007ff60ac84107db0f03d12d98b7aabcdb7662a746e447f8b04b5c1f87f42
billstclair/trubanc-lisp
streams.lisp
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 Copyright ( C ) 2007 Pixel // pinterface " the conditions and ENSURE - SSL - FUNCALL are by . " ;;; ;;; See LICENSE for details. (eval-when (:compile-toplevel) (declaim (optimize (speed 3) (space 1) (safety 1) (debug 0) (compilation-speed 0)))) ...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cl%2Bssl-2008-11-04/streams.lisp
lisp
See LICENSE for details. not enough space left? flush buffer. still doesn't fit? read-from-string is necessary because by #$, signaling"undefined dispatch character $", even though the defun in conditionalized by interface functions fixme: free the context when errors happen in this function fixme: free t...
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 Copyright ( C ) 2007 Pixel // pinterface " the conditions and ENSURE - SSL - FUNCALL are by . " (eval-when (:compile-toplevel) (declaim (optimize (speed 3) (space 1) (safety 1) (debug 0) (compilation-speed 0)))) (in-package :cl+ssl) (defclass ...
af47aa3b8c9d6fd3893daec61c587869e47ccd09b504f97f74bbb61614f4ac28
geni/geni-gedcom
import.clj
(ns geni.gedcom.import (:require [clojure.pprint :refer [pprint]] [gedcom.core :refer [parse-gedcom]] [useful.utils :refer [queue]] [useful.seq :refer [glue lazy-loop]] [useful.map :refer [merge-in update-each map-to map-vals map-vals-with-keys remove-vals update-each]]...
null
https://raw.githubusercontent.com/geni/geni-gedcom/35eef0be51d4e8e0531c12f1f25b3be2a8de6ad2/src/geni/gedcom/import.clj
clojure
(ns geni.gedcom.import (:require [clojure.pprint :refer [pprint]] [gedcom.core :refer [parse-gedcom]] [useful.utils :refer [queue]] [useful.seq :refer [glue lazy-loop]] [useful.map :refer [merge-in update-each map-to map-vals map-vals-with-keys remove-vals update-each]]...
72f262ae5a39867502c32a6002890220d282623185fde5b2b50647915d873715
imnisen/web3.lisp
http.lisp
(in-package :web3) ;;; Http Provider (defclass HTTPProvider (JSONBaseProvider) ()) (defmethod make-request ((provider HTTPProvider) method params) ;; (format t "~%request by http, params:~a ~%" params) (let ((raw-body (construct-body provider method params))) (drakma:http-request (provider-uri provider) ...
null
https://raw.githubusercontent.com/imnisen/web3.lisp/45b0363c2f09bbe0db746a7c56a9ba19feec35b2/src/providers/http.lisp
lisp
Http Provider (format t "~%request by http, params:~a ~%" params) check for errors ignore the rest of the response and return the result
(in-package :web3) (defclass HTTPProvider (JSONBaseProvider) ()) (defmethod make-request ((provider HTTPProvider) method params) (let ((raw-body (construct-body provider method params))) (drakma:http-request (provider-uri provider) :method :post :content-ty...
ede8b58869b873164a7b4667e0100b8d6fbd66686fe75352af1dc14af169bf19
NetworkVerification/nv
Interp_test.ml
Testing for SRP interpreter open Nv open Nv_lang open Nv_datastructures open Syntax open OUnit open Unsigned (* variables *) let x = Var.fresh "x" let y = Var.fresh "y" let xe = EVar x let ye = EVar y let xf = Var.fresh "f" let xfe = EVar xf (* values *) let t = VBool true let f = VBool false let z = VUInt32 UIn...
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/test/Interp_test.ml
ocaml
variables values expressions functions utilties
Testing for SRP interpreter open Nv open Nv_lang open Nv_datastructures open Syntax open OUnit open Unsigned let x = Var.fresh "x" let y = Var.fresh "y" let xe = EVar x let ye = EVar y let xf = Var.fresh "f" let xfe = EVar xf let t = VBool true let f = VBool false let z = VUInt32 UInt32.zero let one = VUInt32 UI...