_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
f940b18137af585f44bf155c9b8554d1c4f9e98d139d2e54714e8e1f6f766dd5
ryszard/clsql
oodml.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; $ Id$ ;;;; ;;;; The CLSQL Object Oriented Data Manipulation Language (OODML). ;;;; This file is part of CLSQL . ;;;; CLSQL users are granted the rights to distribut...
null
https://raw.githubusercontent.com/ryszard/clsql/9aafcb72bd7ca1d7e908938b6a5319753b3371d9/sql/oodml.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* The CLSQL Object Oriented Data Manipulation Language (OODML). (), also known as the LLGPL. ************************************************************************* Function used by 'genera...
$ Id$ This file is part of CLSQL . CLSQL users are granted the rights to distribute and use this software as governed by the terms of the Lisp Lesser GNU Public License (in-package #:clsql-sys) (defun key-qualifier-for-instance (obj &key (database *default-database*)) (let ((tb (view-table (class-of obj)))...
a9616132e38f5926125d70ec3f30ecb304dd3124b81139ed95f65de754bb93cb
mgi/cl-las
package.lisp
(defpackage :las (:use #:common-lisp #:binary-io) (:export ;; point classes #:legacy-point-data #:legacy-point-data-gps #:legacy-point-data-color #:legacy-point-data-color-gps #:legacy-point-data-gps-waveform #:legacy-point-data-color-gps-waveform #:point-data #:point-data-color #:poin...
null
https://raw.githubusercontent.com/mgi/cl-las/9794a6a674b7f4be0dd774bea3bdc3c0f8fce87b/package.lisp
lisp
point classes
(defpackage :las (:use #:common-lisp #:binary-io) (:export #:legacy-point-data #:legacy-point-data-gps #:legacy-point-data-color #:legacy-point-data-color-gps #:legacy-point-data-gps-waveform #:legacy-point-data-color-gps-waveform #:point-data #:point-data-color #:point-data-color-nir ...
afdb82d19ec38b0614c25fbdf88d026d9c48f6a776c5e62673cf34cdd1c6fe45
mgritter/aoc-lh
Main.hs
module Main (main) where import LoadLines import Data.List.Split import Data.List import Data.Maybe import qualified Data.Set as Set import Cplex @ data Resources = RS { ore : : , clay : : , obsidian : : , geode : : @ data Resources = RS { ore :: Nat, clay :: Nat, ...
null
https://raw.githubusercontent.com/mgritter/aoc-lh/459620a871f8652410d9c5de1680fe511c87d08d/2022/day19/Main.hs
haskell
robots_i(t+1) = robots_i(t) + purchases_i(t) resources_i(t+1) = resources_it - cost(purchases_it) + robots_it gr_i = geode robots on start of minute i br_i = obsidian robots on start of minute i cl_i = clay robots on start of minute i b_i, c_i, o_i = obsidian, clay, ore inventory on start of minute i ...
module Main (main) where import LoadLines import Data.List.Split import Data.List import Data.Maybe import qualified Data.Set as Set import Cplex @ data Resources = RS { ore : : , clay : : , obsidian : : , geode : : @ data Resources = RS { ore :: Nat, clay :: Nat, ...
378b622add883e77c63df33b607ec9ebcc6e02b5739513c9384fc718f7e7ae21
sampou-org/pfad
countdown4.hs
module Main where import Code20 main :: IO () main = putStrLn $ display (countdown4 831 [1,3,7,10,25,50])
null
https://raw.githubusercontent.com/sampou-org/pfad/3c2e0847bea9eac80672e1fbccb86ca5a6b09415/Code/countdown4.hs
haskell
module Main where import Code20 main :: IO () main = putStrLn $ display (countdown4 831 [1,3,7,10,25,50])
80effd5c9f10236c092be87d4c4dcf7b78dc9f7a148a131f9b0e6567d6cf805d
haskellfoundation/error-message-index
Error.hs
module Main where x :: Integer Just x = Just (5 :: Integer)
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-48361/example1/after/Error.hs
haskell
module Main where x :: Integer Just x = Just (5 :: Integer)
98ba278a6105bf375f969abd09ce76658bc27e7852a81420d6fc86b151c85831
rohitjha/DiMPL
prim.hs
Prim 's algorithm for Minimum module ( prim , Edge ( .. ) ) where prim, Edge(..) ) where-} import Data.List(sort) import Data.Set(member, notMember, empty, insert, singleton) import Graph data Edge t = Edge t t Double deriving (Eq, Show) instance Ord t => Ord (Edge t) where compare ...
null
https://raw.githubusercontent.com/rohitjha/DiMPL/087c499ba104dec897fe325f86580e6d623c86ee/examples/prim.hs
haskell
Prim 's algorithm for Minimum module ( prim , Edge ( .. ) ) where prim, Edge(..) ) where-} import Data.List(sort) import Data.Set(member, notMember, empty, insert, singleton) import Graph data Edge t = Edge t t Double deriving (Eq, Show) instance Ord t => Ord (Edge t) where compare ...
9a3f534a5e7c96f2fe507d07a715b2380a90589e614acdec340b52b466c0bab5
toyokumo/ring-middleware-csp
core_test.clj
(ns ring-middleware-csp.core-test (:require [clojure.test :refer :all] [ring-middleware-csp.core :refer :all])) (deftest compose-test (testing "without nonce" (is (= "" (compose {}))) (is (= "default-src 'self'" (compose {:default-src :self}))) (is (= "default-src 'self'" (compose {:default-src [...
null
https://raw.githubusercontent.com/toyokumo/ring-middleware-csp/79dafd7225f0f13c6fb414543ba9db7cb8d2e033/test/ring_middleware_csp/core_test.clj
clojure
(ns ring-middleware-csp.core-test (:require [clojure.test :refer :all] [ring-middleware-csp.core :refer :all])) (deftest compose-test (testing "without nonce" (is (= "" (compose {}))) (is (= "default-src 'self'" (compose {:default-src :self}))) (is (= "default-src 'self'" (compose {:default-src [...
2e68b30516e28c2abc15d2bcc27a8b60f4d06bb0b8443768c1b9f077b6f6dfec
inhabitedtype/ocaml-aws
terminateSession.mli
open Types type input = TerminateSessionRequest.t type output = TerminateSessionResponse.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/terminateSession.mli
ocaml
open Types type input = TerminateSessionRequest.t type output = TerminateSessionResponse.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
e87c4cdbd2746b3fdd25024a67405cdb648dcc30a11af7702ec9adfad6d957f7
DaveWM/willa
project.clj
(defproject willa "0.3.0" :description "A Clojure DSL for Kafka Streams" :url "" :license {:name "GPL V3" :url "-3.0.en.html"} :dependencies [[org.clojure/clojure "1.10.3"] [fundingcircle/jackdaw "0.9.6"] [aysylu/loom "1.0.2"] [rhizome "0.2.9"] ...
null
https://raw.githubusercontent.com/DaveWM/willa/f74a5f36a0206dbefab965be7222d5f0b841704c/project.clj
clojure
(defproject willa "0.3.0" :description "A Clojure DSL for Kafka Streams" :url "" :license {:name "GPL V3" :url "-3.0.en.html"} :dependencies [[org.clojure/clojure "1.10.3"] [fundingcircle/jackdaw "0.9.6"] [aysylu/loom "1.0.2"] [rhizome "0.2.9"] ...
8c08564d8c2d74fafd4bda0e73b1a0c965250e5405056771fdca95ca50c5405d
hexlet-basics/exercises-clojure
index.clj
(ns index) ;BEGIN (defn maps [fs as] (map map fs as)) ;END
null
https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/25-lists/20-builtin-loops-map/index.clj
clojure
BEGIN END
(ns index) (defn maps [fs as] (map map fs as))
92848e7ae22fdda62c7e4da5dee5e884da7b3b8deb6be377f06689b9bb95098f
fredrikt/yxa
transportlayer.erl
%%%------------------------------------------------------------------- %%% File : transportlayer @author < > %%% @doc Transport layer functions. %%% @since 01 Mar 2004 by < > %%% @end %%%------------------------------------------------------------------- -module(transportlayer). %%-----------...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/transportlayer/transportlayer.erl
erlang
------------------------------------------------------------------- File : transportlayer @doc Transport layer functions. @end ------------------------------------------------------------------- -------------------------------------------------------------------- External exports --------------------------...
@author < > @since 01 Mar 2004 by < > -module(transportlayer). -export([ start_link/0, send_proxy_request/4, send_proxy_response/2, send_result/5, send_result/6, stateless_proxy_request/2, stateless_proxy_ack/3, report_unreachable/3, report_unreachable/4, remove_blacklisting/1, ...
621af47c43ea3dee6087069c706a80fa6552114e766c9f1004441f372febdbfe
coccinelle/coccinelle
ctlcocci_integration.mli
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/engine/ctlcocci_integration.mli
ocaml
dropped isos dropped isos
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
6fce111daa96361fa5d744a660a55a15fbb0e1e9c5e4a0af58300dc6b153f921
Bodigrim/ntru
EES401EP1.hs
| NTRU cryptographic system using the EES401EP1 parameter set , for use at the 112 - bit security level . NTRU cryptographic system using the EES401EP1 parameter set, for use at the 112-bit security level. -} module Math.NTRU.EES401EP1 (keyGen, encrypt, decrypt) where import qualified Math.NTRU as NTRU | G...
null
https://raw.githubusercontent.com/Bodigrim/ntru/1974391559eb49ee1960db423b667867dfce946b/src/Math/NTRU/EES401EP1.hs
haskell
^ A list of ASCII values representing the message ^ A list of numbers representing the public key ^ A list of numbers representing the ciphertext ^ A list of numbers representing the private key ^ A list of numbers representing the public key ^ A list of numbers representing the ciphertext ^ A list of numbers re...
| NTRU cryptographic system using the EES401EP1 parameter set , for use at the 112 - bit security level . NTRU cryptographic system using the EES401EP1 parameter set, for use at the 112-bit security level. -} module Math.NTRU.EES401EP1 (keyGen, encrypt, decrypt) where import qualified Math.NTRU as NTRU | G...
d25b7af63ff57dd2fc9a41d9fd3aa4e56a641aa7a9817850520d480f87626dbc
tmattio/js-bindings
codeConverter.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - CreateFilesParams - DeleteFilesParams - RenameFilesParams - code . CallHierarchyItem - code . CodeAction - code . . CodeLens - code . Command ...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-languageclient/_gen/codeConverter.mli
ocaml
import * as code from 'vscode'; import * as proto from 'vscode-languageserver-protocol';
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - CreateFilesParams - DeleteFilesParams - RenameFilesParams - code . CallHierarchyItem - code . CodeAction - code . . CodeLens - code . Command ...
f3957a85444c4f027778d0644886877c2e89824bd12ecd766588662d5b0e6610
danehuang/augurv2
AugurFFI.hs
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
null
https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/FFI/AugurFFI.hs
haskell
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
25fd4f4c75810dd313f36f9ce5b198a984544ec480c7a833379193d48cfed962
gedge-platform/gedge-platform
rabbit_mqtt_frame.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mqtt_frame). -export([parse/2, in...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_mqtt/src/rabbit_mqtt_frame.erl
erlang
serialisation
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mqtt_frame). -export([parse/2, initial_...
51c0f7fd9dac38807bea488aa9881272536d9b1184370f457fc578537af69c6c
SjVer/Lamb
anf.ml
open Util type atom = | Int of int | Var of var | Glob of var and expr = | Return of atom (* return atom *) | Break of atom (* break atom *) | Fun of var * var list * expr * body (* let var(var, list) = expr in body *) | App of var * var * atom list * body (* let var = var(atom, list) in body *)...
null
https://raw.githubusercontent.com/SjVer/Lamb/1e901d8ae14d969a65da52e9f5f141b3fd260462/bin/anf.ml
ocaml
return atom break atom let var(var, list) = expr in body let var = var(atom, list) in body let var = atom bop atom in body let var = if atom then expr else expr in body let var = (atom; list) in body let var = var[int] in body
open Util type atom = | Int of int | Var of var | Glob of var and expr = | Return of atom | Break of atom | Fun of var * var list * expr * body | App of var * var * atom list * body | Bop of var * bop * atom * atom * body | If of var * atom * expr * expr * body | Tuple of var * atom list * body ...
4d8d99fef5c8d9fd0672f8fb7500e8d2333ce96b3b84f5c7910af91b1e1df289
psholtz/MIT-SICP
exercise1-11a.scm
;; Exercise 1.11 ;; A function f is defined by the rule that f(n ) = n if n < 3 , and f(n ) = f(n-1 ) + 2*f(n-2 ) + 3*f(n-3 ) if n > = 3 . Write a procedure ;; that computes f by means of a recursive process. Write a procedure ;; that computes f by means of an iterative process. ;; ;; ;; f defined as a recursiv...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.2/mit-scheme/exercise1-11a.scm
scheme
that computes f by means of a recursive process. Write a procedure that computes f by means of an iterative process. f defined as a recursive process: Run some simple unit tests:
Exercise 1.11 A function f is defined by the rule that f(n ) = n if n < 3 , and f(n ) = f(n-1 ) + 2*f(n-2 ) + 3*f(n-3 ) if n > = 3 . Write a procedure (define (f n) (if (< n 3) n (+ (f (- n 1)) (* 2 (f (- n 2))) (* 3 (f (- n 3)))))) (= (f -1) -1) (= (f 0) 0) (= (f 1) 1) (= (f 2) 2) (= (f 3) ...
2b975afeb83ad3740deb10a485217217c56284404e3ec6b8eefba4b83c4fcdbf
eeng/shevek
query.cljc
(ns shevek.schemas.query (:require [schema.core :as s])) (s/defschema AbsoluteTimeFilter {(s/optional-key :name) s/Str :interval [(s/one s/Str "from") (s/one s/Str "to")]}) (s/defschema RelativeTimeFilter {(s/optional-key :name) s/Str :period s/Str}) (s/defschema TimeFilter (s/if :interval AbsoluteTime...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljc/shevek/schemas/query.cljc
clojure
(ns shevek.schemas.query (:require [schema.core :as s])) (s/defschema AbsoluteTimeFilter {(s/optional-key :name) s/Str :interval [(s/one s/Str "from") (s/one s/Str "to")]}) (s/defschema RelativeTimeFilter {(s/optional-key :name) s/Str :period s/Str}) (s/defschema TimeFilter (s/if :interval AbsoluteTime...
e0ba7aec5a7c654dc03cc6e59ca09e85399acebab8e5e94f7c09720715fa8e58
simmsb/calamity
Component.hs
# LANGUAGE TemplateHaskell # -- | Message components module Calamity.Types.Model.Channel.Component ( CustomID (..), Component (..), Button (..), LinkButton (..), button, button', lbutton, lbutton', ButtonStyle (..), Select (..), select, SelectOption (..), sopt, TextInput (..), TextInputSt...
null
https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Types/Model/Channel/Component.hs
haskell
| Message components | Constuct a non-disabled 'Button' with the given 'ButtonStyle' and 'CustomID', all other fields are set to 'Nothing' | Constuct a non-disabled 'Button' with the given 'ButtonStyle', 'CustomID', and label, all other fields are set to 'Nothing' | Constuct a non-disabled 'LinkButton' with the...
# LANGUAGE TemplateHaskell # module Calamity.Types.Model.Channel.Component ( CustomID (..), Component (..), Button (..), LinkButton (..), button, button', lbutton, lbutton', ButtonStyle (..), Select (..), select, SelectOption (..), sopt, TextInput (..), TextInputStyle (..), textInput, ...
22ea9181004a05dd6df177dd7f7d5b8ca1404e5798a1b910bbbcb967d2cc3cf2
mathiasbourgoin/SPOC
Transform.ml
open Spoc open Kirc open Kirc_Ast open Skeletons (************** Composition ****************) let a_to_vect = function | IntVar (i,s) -> (new_int_vec_var ( i) s) | FloatVar (i,s) -> (new_float_vec_var (i) s) | a -> print_ast a; failwith "a_to_vect" let a_to_return_vect k1 k2 idx= match k1 with | IntVa...
null
https://raw.githubusercontent.com/mathiasbourgoin/SPOC/9014d26b6d64261d1ace97db7f3fe2256a7c459c/SpocLibs/Sarek/Transform.ml
ocaml
************* Composition *************** spoc_ker, kir_ker = (\* External from SPOC *\) external opencl_compile : string -> string -> Devices.generalInfo -> Kernel.kernel = "spoc_opencl_compile" external cuda_compile : string -> string -> Devices.generalInfo -> Kernel.kernel = "spoc_cuda_compile...
open Spoc open Kirc open Kirc_Ast open Skeletons let a_to_vect = function | IntVar (i,s) -> (new_int_vec_var ( i) s) | FloatVar (i,s) -> (new_float_vec_var (i) s) | a -> print_ast a; failwith "a_to_vect" let a_to_return_vect k1 k2 idx= match k1 with | IntVar (i,s) -> (set_vect_var (get_vec (var i s) ...
64eb1f9cefa52a97a455494b68a27f589ec122a25073e919ba070cc5554dcc01
aroemers/mount-lite
lite_test.clj
(ns mount.lite-test (:require [clojure.test :refer [deftest use-fixtures is]] [mount.lite :refer [start stop status with-substitutes state]] [mount.lite-test.test-state-1 :refer (state-1)] [mount.lite-test.test-state-2 :refer (state-2)] [mount.lite-test.test-state-2-ext...
null
https://raw.githubusercontent.com/aroemers/mount-lite/989282ec215ecf4b6dc471657b1234e8911b3b26/test/mount/lite_test.clj
clojure
Stop all states before and after every test. Tests
(ns mount.lite-test (:require [clojure.test :refer [deftest use-fixtures is]] [mount.lite :refer [start stop status with-substitutes state]] [mount.lite-test.test-state-1 :refer (state-1)] [mount.lite-test.test-state-2 :refer (state-2)] [mount.lite-test.test-state-2-ext...
c8340303dcec6e455ed6d1944d934c0c6f831cec0ed6229e838d4f6faf810e99
aleator/CV
Conversions.hs
# LANGUAGE ForeignFunctionInterface # -- |This module provides slow but functional means for exporting images from and to CArrays , which can easily be passed into foreign functions . module CV.Conversions ( -- Arrays of Double copyCArrayToImage ,copy8UCArrayToImage ,copyImageToCArray -- Arra...
null
https://raw.githubusercontent.com/aleator/CV/1e2c9116bcaacdf305044c861a1b36d0d8fb71b7/CV/Conversions.hs
haskell
|This module provides slow but functional means for exporting images from and to Arrays of Double Arrays of Float * Complex arrays * Copying * Acquiring images from pointers |Copy the contents of a CArray into CV.Image type. |Copy the contents of a CArray into CV.Image type. |Copy CArray of floats to image ...
# LANGUAGE ForeignFunctionInterface # CArrays , which can easily be passed into foreign functions . module CV.Conversions ( copyCArrayToImage ,copy8UCArrayToImage ,copyImageToCArray ,copyFCArrayToImage ,copyImageToFCArray ,copyComplexCArrayToImage ,copyImageToComplexCArray ,copyImage...
c5dc3bd8adf3ebccefecb321fed6f92bf8f5f9ac634b59458211a01de0a01a89
schmee/daguerreo
core_test.clj
(ns daguerreo.unit.core-test (:require [clojure.core.async :as a] [clojure.test :refer :all] [matcher-combinators.test] [daguerreo.core :as core] [daguerreo.helpers :as helpers]) (:import [java.util.concurrent Executors])) (defn run ([tasks] (run tasks {})) (...
null
https://raw.githubusercontent.com/schmee/daguerreo/872bab60f627c1cd38274f651c213c0d20c07000/test/daguerreo/unit/core_test.clj
clojure
(ns daguerreo.unit.core-test (:require [clojure.core.async :as a] [clojure.test :refer :all] [matcher-combinators.test] [daguerreo.core :as core] [daguerreo.helpers :as helpers]) (:import [java.util.concurrent Executors])) (defn run ([tasks] (run tasks {})) (...
404aed0831ac4715137f1bfbacb665456bcce86dd8f17aa30edd21b8645232f8
CryptoKami/cryptokami-core
Local.hs
# LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # -- | Logic for local processing of transactions. -- Local transaction is a transaction which has not yet been added to the blockchain. module Pos.Txp.Logic.Local ( TxpProcessTransactionMode , TxpNormalizeMempoolMode , txProcessTransaction ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/txp/Pos/Txp/Logic/Local.hs
haskell
| Logic for local processing of transactions. Local transaction is a transaction which has not yet been added to the blockchain. | Process transaction. 'TxId' is expected to be the hash of only. | Unsafe version of 'txProcessTransaction' which doesn't take a lock. Can be used in tests. Note: we need to read tip ...
# LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # module Pos.Txp.Logic.Local ( TxpProcessTransactionMode , TxpNormalizeMempoolMode , txProcessTransaction , txProcessTransactionNoLock , txNormalize , txGetPayload Utils to processing and nomralization tx , ProcessT...
bf68ffb1ab4157a0aa1ddf5b57cd596808589c487298c21e6ccd89e2aed611f7
tezos/tezos-mirror
protocol_migration.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/bbca5502eb430d3915ad697259d3bffc62c2d01d/tezt/tests/protocol_migration.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
5fdf6505ade0cfbfffe984ce537c0f719c4421b8454116def29d89360e04f2e5
glutamate/bugpan
TestGoal.hs
module Main where import Query import Driver import Expr import EvalM import QueryUtils import QueryTypes import PlotGnuplot import QueryPlots import NewSignal realTs nms = zip (words nms) $ repeat (NumT (Just RealT)) gampa = 1e-9 gk = 2e-7 main = do deleteSessionIfExists "rttest" inApproxSession "new:rttest" $...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/GenC/TestGoal.hs
haskell
let t0 = sigT1 $ head vm let showDur = [((t0, t0+0.1), ())]
module Main where import Query import Driver import Expr import EvalM import QueryUtils import QueryTypes import PlotGnuplot import QueryPlots import NewSignal realTs nms = zip (words nms) $ repeat (NumT (Just RealT)) gampa = 1e-9 gk = 2e-7 main = do deleteSessionIfExists "rttest" inApproxSession "new:rttest" $...
95f54f2901ac2340ea6371e3de85394922a170713ead26fbdd197c72b020db7c
jserot/lascar
lts.mli
(**********************************************************************) (* *) LASCAr (* *) Copyright ( c ) 2017 - prese...
null
https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/lib/lts.mli
ocaml
******************************************************************** This source code is licensed under the lic...
LASCAr Copyright ( c ) 2017 - present , . All rights reserved . * { 2 Labeled Transition Systems } A Labeled Transition System is 4 - uple [ ( Q , L , I , R ) ] where - [ Q ] is a set of state identifiers - [ L ] is a set of tra...
dbc5afb7057d035de8009328d1c02279079fa3f5455e6b566c45bf8b6278574e
lambdaisland/faker
yaml.clj
(ns repl-sessions.yaml (:require [clj-yaml.core :as yaml] [cognitect.transit :as transit] [clojure.string :as str] [clojure.java.io :as io])) (defn slurp-transit [f] (with-open [is (io/input-stream f)] (transit/read (transit/reader is :json)))) (def faker-data (atom {})) (...
null
https://raw.githubusercontent.com/lambdaisland/faker/00287af1bcb695c939ae4cd70a71965a7e34bc44/repl_sessions/yaml.clj
clojure
(ns repl-sessions.yaml (:require [clj-yaml.core :as yaml] [cognitect.transit :as transit] [clojure.string :as str] [clojure.java.io :as io])) (defn slurp-transit [f] (with-open [is (io/input-stream f)] (transit/read (transit/reader is :json)))) (def faker-data (atom {})) (...
9a784424c6fc50d895f44df46bd1be755efe299f5dd9763ba3f22d00b32794c3
spechub/Hets
ToDoc.hs
| Module : ./CASL / ToDoc.hs Description : pretty printing data types of BASIC_SPEC Copyright : ( c ) and Uni Bremen 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Pretty printing data types of ' BASIC...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/CASL/ToDoc.hs
haskell
^ attach separator to right argument? ^ left, separator and right arguments true for non-final | a helper class for calculating the pluralS of e.g. ops assume last sort is known | print a formula as a sentence
| Module : ./CASL / ToDoc.hs Description : pretty printing data types of BASIC_SPEC Copyright : ( c ) and Uni Bremen 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Pretty printing data types of ' BASIC...
a81976e3961d95a168ac3b8a748fe3f7b3da428f2707876ad8d8ae1b163c4ea0
imandra-ai/imandra-ros
visualization_msgs.ml
open Basic_types;; type interactiveMarkerPose = { interactiveMarkerPose_header : Std_msgs.header ; interactiveMarkerPose_pose : Geometry_msgs.pose ; interactiveMarkerPose_name : string ; } type menuEntry = { menuEntry_id : uint32 ; menuEntry_parent_id : uint32 ; menuEntry_title : string ; menuEnt...
null
https://raw.githubusercontent.com/imandra-ai/imandra-ros/e1380c267ee319dd4f86c4b54e0b270bc0738796/imandra_model/src-messages/visualization_msgs.ml
ocaml
open Basic_types;; type interactiveMarkerPose = { interactiveMarkerPose_header : Std_msgs.header ; interactiveMarkerPose_pose : Geometry_msgs.pose ; interactiveMarkerPose_name : string ; } type menuEntry = { menuEntry_id : uint32 ; menuEntry_parent_id : uint32 ; menuEntry_title : string ; menuEnt...
9104ecc60197b0ec228e850b545a85cf1065d8b6732bce917c19999cbd7bd5cf
lexi-lambda/racket-r7rs
r7rs-tests.rkt
#!r7rs -*- coding : utf-8 -*- (import (scheme base) (scheme char) (scheme lazy) (scheme inexact) (scheme complex) (scheme time) (scheme file) (scheme read) (scheme write) (scheme eval) (scheme process-context) (scheme case-lambda) (scheme r5rs) or ( srfi 64 ) ) R7RS test...
null
https://raw.githubusercontent.com/lexi-lambda/racket-r7rs/5834ec6e66f63c61589130aaebd0f25ab3eefc2b/r7rs-test/tests/r7rs/chibi/tests/r7rs-tests.rkt
racket
language except `delete-file'. Currently assumes full-unicode support, the full numeric tower and all standard libraries provided. and test, which could be defined as something like: (define (test-begin . o) #f) (define (test-end . o) #f) (define-syntax test (syntax-rules () ((test expecte...
#!r7rs -*- coding : utf-8 -*- (import (scheme base) (scheme char) (scheme lazy) (scheme inexact) (scheme complex) (scheme time) (scheme file) (scheme read) (scheme write) (scheme eval) (scheme process-context) (scheme case-lambda) (scheme r5rs) or ( srfi 64 ) ) R7RS test...
96e65cfb19253b9f2a03bd50ef05cc30acfe79664204a10ff09a8dea2fedbea6
webyrd/n-grams-for-synthesis
fact.scm
Copyright ( C ) ( 2017 ) . All Rights Reserved . ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, copy, ...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-157/examples/fact.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Copyright ( C ) ( 2017 ) . All Rights Reserved . files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
161f678b5342332b545ac2b37a8dcffed8641bef7ad66a93242c601a53a7fe4e
databrary/databrary
Notice.hs
# LANGUAGE TemplateHaskell , DataKinds , TypeFamilies , OverloadedStrings # # OPTIONS_GHC -fno - warn - orphans # module Model.Notification.Notice ( Delivery(..) , fromMaybeDelivery , periodicDelivery , Notice(..) , noticeId , getNotice , getNotice' ) where import qualified Data.Aeson.Types as JSON imp...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Notification/Notice.hs
haskell
makeDBEnum "notice_delivery" "Delivery"
# LANGUAGE TemplateHaskell , DataKinds , TypeFamilies , OverloadedStrings # # OPTIONS_GHC -fno - warn - orphans # module Model.Notification.Notice ( Delivery(..) , fromMaybeDelivery , periodicDelivery , Notice(..) , noticeId , getNotice , getNotice' ) where import qualified Data.Aeson.Types as JSON imp...
602900d1ae4891395b31f68d7563073c1eafa6075249c4510e60983ddf09fa00
oxidizing/sihl
contract_user.ml
open Sexplib.Conv type status = | Active | Inactive [@@deriving yojson, show, eq, sexp] let status_of_string = function | "active" -> Ok Active | "inactive" -> Ok Inactive | other -> Error (Format.sprintf "Invalid user status '%s'" other) ;; let status_to_string = function | Active -> "active" | Inacti...
null
https://raw.githubusercontent.com/oxidizing/sihl/1070575d3699319430aa589749b364a580ba40cf/sihl/src/contract_user.ml
ocaml
* [user_from_session ?ctx ?cookie_key ?secret ?key ?secret request] returns the user that is associated to the user id in the session of the [request]. [cookie_key] is the name/key of the session cookie. By default, the value is [_session]. [secret] is used to verify the signat...
open Sexplib.Conv type status = | Active | Inactive [@@deriving yojson, show, eq, sexp] let status_of_string = function | "active" -> Ok Active | "inactive" -> Ok Inactive | other -> Error (Format.sprintf "Invalid user status '%s'" other) ;; let status_to_string = function | Active -> "active" | Inacti...
c84138ce463ed5305cc90ffd0a5d27ab434a26df05c06bc0a63432838705cfb7
YoshikuniJujo/test_haskell
try-th-env.hs
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import ThEnv main :: IO () main = print $(lookupCompileEnvExp "NDEBUG")
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/aaa4fe7307daa773bc443b48a2bea0a02ba81db3/themes/gui/vulkan/try-vulkan-tutorial/app/try-th-env.hs
haskell
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import ThEnv main :: IO () main = print $(lookupCompileEnvExp "NDEBUG")
066c8c09d05d6533d899aa040e1cbb5a91d0fc12832b74aee4ad50c27a7602f3
haskell-tls/hs-tls
Handshake.hs
-- | -- Module : Network.TLS.Handshake -- License : BSD-style Maintainer : < > -- Stability : experimental -- Portability : unknown -- module Network.TLS.Handshake ( handshake , handshakeWith , handshakeClientWith , handshakeServerWith , handshakeClient , handshakeServer ) ...
null
https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/core/Network/TLS/Handshake.hs
haskell
| Module : Network.TLS.Handshake License : BSD-style Stability : experimental Portability : unknown This is to be called at the beginning of a connection, and during renegotiation Handshake when requested by the remote end This is called automatically by 'recvData', in a context where the read lock ...
Maintainer : < > module Network.TLS.Handshake ( handshake , handshakeWith , handshakeClientWith , handshakeServerWith , handshakeClient , handshakeServer ) where import Network.TLS.Context.Internal import Network.TLS.Struct import Network.TLS.Handshake.Common import Network.TLS.Hand...
465e28466e7a54a5c6622b6015bc500ffa7e543ef2ea381d8b96928c6d97eaee
bravit/hid-examples
coerce.hs
# LANGUAGE TypeFamilies # # LANGUAGE RoleAnnotations # import Data.Coerce import Unsafe.Coerce newtype Age = Age Int deriving (Show) toAges :: [Int] -> [Age] toAges = map Age toAges' :: [Int] -> [Age] toAges' = coerce data Student ageType = Student String ageType --type role Student nominal check :: Student Int...
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch12/deriv/coerce.hs
haskell
type role Student nominal Can't coerce: check2 :: Student2 Maybe Int -> Student2 Maybe Age check2 = coerce Can't coerce: {- -}
# LANGUAGE TypeFamilies # # LANGUAGE RoleAnnotations # import Data.Coerce import Unsafe.Coerce newtype Age = Age Int deriving (Show) toAges :: [Int] -> [Age] toAges = map Age toAges' :: [Int] -> [Age] toAges' = coerce data Student ageType = Student String ageType check :: Student Int -> Student Age check = coer...
45e42b0446af44b4de6622bcdf30905b6b355193bad8e0e9bc6b4941d60ccee2
emqx/emqx
emqx_authz_test_mod.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_authz_test_mod.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_authz_test_mod). -export([ init/1, authorize/2, description/0 ]). ini...
3b6540bcf1597d472490528f3102fcf8b01a3a8f125498009b22481e4471afa1
mirage/ocaml-dkim
dkim_mirage.mli
type 'a stream = unit -> 'a option Lwt.t module Make (R : Mirage_random.S) (T : Mirage_time.S) (C : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (S : Tcpip.Stack.V4V6) : sig type nameserver = [ `Plaintext of Ipaddr.t * int | `Tls of Tls.Config.client * Ipaddr.t * int ] val server : S...
null
https://raw.githubusercontent.com/mirage/ocaml-dkim/5712202045b6e1b212787187a9376c397b1dd6ca/mirage/dkim_mirage.mli
ocaml
type 'a stream = unit -> 'a option Lwt.t module Make (R : Mirage_random.S) (T : Mirage_time.S) (C : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (S : Tcpip.Stack.V4V6) : sig type nameserver = [ `Plaintext of Ipaddr.t * int | `Tls of Tls.Config.client * Ipaddr.t * int ] val server : S...
ed1745b55cd85c546fd4a84a4926e14621addb7551ce849cbf68ad82851c4f46
nuvla/api-server
binding_lifecycle.clj
(ns sixsq.nuvla.db.binding-lifecycle (:require [clojure.spec.alpha :as s] [clojure.test :refer [is]] [sixsq.nuvla.auth.utils :as auth] [sixsq.nuvla.db.binding :as db] [sixsq.nuvla.server.resources.spec.acl-resource :as acl-resource])) (s/def ::id string?) (s/def ::long int?) (s/def ::boolean...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/db/binding_lifecycle.clj
clojure
initialize the database create an entry in the database ensure that the entry can be retrieved check that it shows up in a query ensure that is can be retrieved (and flush index for elasticsearch) check that query has another entry adding the same entry again must fail update the entry make sure that the updat...
(ns sixsq.nuvla.db.binding-lifecycle (:require [clojure.spec.alpha :as s] [clojure.test :refer [is]] [sixsq.nuvla.auth.utils :as auth] [sixsq.nuvla.db.binding :as db] [sixsq.nuvla.server.resources.spec.acl-resource :as acl-resource])) (s/def ::id string?) (s/def ::long int?) (s/def ::boolean...
acac8bfccef2f637498f7b4afe6da08328103109d03a1d0204dd3a72dedf6402
ekmett/category-extras
Cata.hs
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | Module : Control . Morphism . Cata Copyright : ( C ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Portability...
null
https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Morphism/Cata.hs
haskell
# OPTIONS_GHC -fglasgow-exts # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable (rank-2 polymorphism) -------------------------------------------------------------------------- ca...
Module : Control . Morphism . Cata Copyright : ( C ) 2008 Maintainer : < > module Control.Morphism.Cata ( cata, g_cata, distCata , bicata, g_bicata , hcata , kcata, runkcata ) where import Control.Comonad import Control.Category.Hask import Control.Functor import Control.Functor.Point...
349483561800ec274fc9be8f2dcb05d19201c44e379774dc324ef50087ea6728
hasktorch/hasktorch
Script.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Torch.Script w...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/c34996b0a401a5b1b98b5774e892fde88adaa079/hasktorch/src/Torch/Script.hs
haskell
| See -IR Future Device Object Capsule | Load a torchscript file | module | output | module | output | module | output | module | output | Load all attributes including training flags To get Tensor type, use get getNamedParameters and getNamedBuffers. | module | output | module | output | module |...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Torch.Script w...
e69368452d59252fcbfd875fea108e9dd4c81bc2ece4d90f9f5a75d8fe8fa9ef
alt-romes/slfl
Replicate.hs
data Bool = False | True; data List a = Nil | Cons (a * List a); deq :: (Int -o Int ); leqzero :: (Int -o Bool); synth replicate :: (Int -> a -> List a);
null
https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/Replicate.hs
haskell
data Bool = False | True; data List a = Nil | Cons (a * List a); deq :: (Int -o Int ); leqzero :: (Int -o Bool); synth replicate :: (Int -> a -> List a);
d6bacef52af4f526246e2ab44fdfd6d53916e0735ba40dcc21774644499ab621
janestreet/universe
nonrec_test.ml
type t = float [@@deriving yojson] module M : sig type t = float list [@@deriving yojson] end = struct type nonrec t = t list [@@deriving yojson] end type 'a u = 'a [@@deriving yojson] module M2 : sig type 'a u = 'a list [@@deriving yojson] end = struct type nonrec 'a u = 'a u list [@@deriving yojson] end t...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_yojson_conv/test/nonrec_test.ml
ocaml
type t = float [@@deriving yojson] module M : sig type t = float list [@@deriving yojson] end = struct type nonrec t = t list [@@deriving yojson] end type 'a u = 'a [@@deriving yojson] module M2 : sig type 'a u = 'a list [@@deriving yojson] end = struct type nonrec 'a u = 'a u list [@@deriving yojson] end t...
304bf67f5859d0a32c3ecbe2d2ef0fcd127757522d971d8e1150feffef6b1e9a
dergraf/httptimer
httptimer_app.erl
%% ------------------------------------------------------------------ %% %% httptimer_app : Callbacks for the HttpTimer Application %% Copyright ( c ) 2011 < > , All Rights Reserved %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in co...
null
https://raw.githubusercontent.com/dergraf/httptimer/d39ae7fef15d462e2c309accdbb4d74d533fe662/src/httptimer_app.erl
erlang
------------------------------------------------------------------ httptimer_app : Callbacks for the HttpTimer Application Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See t...
Copyright ( c ) 2011 < > , All Rights Reserved This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(httptimer_app). -beha...
ea8e38b0cd9dfc70e5eb8637e0441049f904bf9a181605ef4b4f38fcf06d934e
compiling-to-categories/concat
Local.hs
# LANGUAGE CPP # # LANGUAGE InstanceSigs # # LANGUAGE FlexibleContexts # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE UndecidableSuperClasses # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE TypeApplicati...
null
https://raw.githubusercontent.com/compiling-to-categories/concat/49e554856576245f583dfd2484e5f7c19f688028/examples/src/ConCat/Local.hs
haskell
# LANGUAGE ConstraintKinds # # OPTIONS_GHC -Wno-unused-imports # TEMP | A category of local approximations (and probably other uses) • Illegal constraint ‘Ok k a’ in a superclass context • Potential superclass cycle for ‘OkLocal’ one of whose superclass constraints is headed by a type family: ‘Ok k a’ ...
# LANGUAGE CPP # # LANGUAGE InstanceSigs # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE UndecidableSuperClasses # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariab...
f92f16d668dd055fd1e769d7e5e6b7d2c730d17c40618d31101169a78dcbe3aa
hexlet-basics/exercises-clojure
test.clj
(ns str-format-test (:require [test-helper :refer [assert-solution]] [index :refer [number-presenter]])) (assert-solution [[63] [14] [2]] ["decimal 63 octal 77 hex 3f upper-case hex 3F" "decimal 14 octal 16 hex e upper-case hex E" "decimal 2 octal 2 hex 2 upper-case hex 2"] number-present...
null
https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/b718cda08578b7b35c004d2f589f661d39372d20/modules/30-strings/30-format/test.clj
clojure
(ns str-format-test (:require [test-helper :refer [assert-solution]] [index :refer [number-presenter]])) (assert-solution [[63] [14] [2]] ["decimal 63 octal 77 hex 3f upper-case hex 3F" "decimal 14 octal 16 hex e upper-case hex E" "decimal 2 octal 2 hex 2 upper-case hex 2"] number-present...
e5df9b06470184b23ed62045cf215e628d7188408bf5a52db08d272e7ef72a4b
dasuxullebt/uxul-world
uxul-world.lisp
Copyright 2009 - 2011 (defpackage #:uxul-world (:use #:cl) (:shadow #:room) (:export #:init-media #:level-editor #:create-room-from-item-list #:start-game #:run-room #:run-testing-room))
null
https://raw.githubusercontent.com/dasuxullebt/uxul-world/f05e44b099e5976411b3ef1f980ec616bd221425/uxul-world.lisp
lisp
Copyright 2009 - 2011 (defpackage #:uxul-world (:use #:cl) (:shadow #:room) (:export #:init-media #:level-editor #:create-room-from-item-list #:start-game #:run-room #:run-testing-room))
eff4c620bc9234475a0b40f7849f937171365082f4a44b5889bfe2222e7ef368
senapk/funcional_arcade
solver.hs
produtoEscalar xs ys = sum [x * y | (x, y) <- zip xs ys]
null
https://raw.githubusercontent.com/senapk/funcional_arcade/70fa04b4799d5a8c7e5add39d9f217f38f418600/base/064/solver.hs
haskell
produtoEscalar xs ys = sum [x * y | (x, y) <- zip xs ys]
3f4d7550177fbd5b7191d8acf54d8493f3102c63ea9eae25b54096f3b6cd1551
gsakkas/rite
20060321-21:07:58-0ebbcafc7586fac16a56ba7b103f69f7.seminal.ml
exception Unimplemented exception AlreadyDone (*** part a ***) # # # # # # # # # # # # # # # # # # # # # # # # # # # # type move = Home | Forward of float | Turn of float | For of int list # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060321-21%3A07%3A58-0ebbcafc7586fac16a56ba7b103f69f7.seminal.ml
ocaml
** part a ** ** part b ** ################################### ############# ################# ############################# ############################################### ############################################### ** part c ** ** part d ** ############################################################## ...
exception Unimplemented exception AlreadyDone # # # # # # # # # # # # # # # # # # # # # # # # # # # # type move = Home | Forward of float | Turn of float | For of int list # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
1792cb40097ea59393ded6bcd67e9be3f52946236f04096780c369e8360c7726
samrushing/irken-compiler
t_llt.scm
;; -*- Mode: Irken -*- (define (^llvm-mv r) (set! r.x 1934) r ) (^llvm-mv {x=3 y="testing" z=7})
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/llvm/t_llt.scm
scheme
-*- Mode: Irken -*-
(define (^llvm-mv r) (set! r.x 1934) r ) (^llvm-mv {x=3 y="testing" z=7})
f50929664386a6405a5503aaea40fe1fd8005cf0618d9287bbb9eb81797c4f61
amuletml/amulet
Constructor.hs
# LANGUAGE FlexibleContexts , FlexibleInstances , TypeOperators # module Generics.Constructor ( ConstructorName(..) , conNameOf ) where import GHC.Generics -- | Get the constructor name of a type. conNameOf :: (Generic a, ConstructorName (Rep a)) => a -> String conNameOf = gconNameOf . from class ConstructorNa...
null
https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Generics/Constructor.hs
haskell
| Get the constructor name of a type.
# LANGUAGE FlexibleContexts , FlexibleInstances , TypeOperators # module Generics.Constructor ( ConstructorName(..) , conNameOf ) where import GHC.Generics conNameOf :: (Generic a, ConstructorName (Rep a)) => a -> String conNameOf = gconNameOf . from class ConstructorName f where gconNameOf :: f a -> String ...
990d59371cc3952d32e6630a23da6d645837277145770dd6623e41cbcf104d39
flavioc/cl-hurd
get-owner.lisp
(in-package :hurd) (defcfun ("io_get_owner" %io-get-owner) err (file port) (owner :pointer)) (defun io-get-owner (file) "Get the file owner." (declare (type fixnum file)) (with-foreign-pointer (owner (foreign-type-size 'pid-t)) (select-error (%io-get-owner file owner) (mem-ref owner...
null
https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/hurd/io/get-owner.lisp
lisp
(in-package :hurd) (defcfun ("io_get_owner" %io-get-owner) err (file port) (owner :pointer)) (defun io-get-owner (file) "Get the file owner." (declare (type fixnum file)) (with-foreign-pointer (owner (foreign-type-size 'pid-t)) (select-error (%io-get-owner file owner) (mem-ref owner...
2a85499b079db023b84fbdee02c3049390258d688122bd2920d76e7339f7b738
koengit/satplus
Optimize.hs
{-| Module : SAT.Optimize Description : Finding the optimal solution, according to a specified objective -} module SAT.Optimize where import SAT as S import SAT.Unary as U import Data.Maybe( fromJust ) import System.IO( hFlush, stdout ) ----------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/koengit/satplus/d83b87732d3146b0df0ced3259d42a77b8d6f155/SAT/Optimize.hs
haskell
| Module : SAT.Optimize Description : Finding the optimal solution, according to a specified objective ---------------------------------------------------------------------------- * Simple optimization | Like 'solve', but finds the minimum solution, where the objective is a specified unary number. This functio...
module SAT.Optimize where import SAT as S import SAT.Unary as U import Data.Maybe( fromJust ) import System.IO( hFlush, stdout ) add a clause with @obj .<= k@ afterwards . solveMinimize :: Solver -> [Lit] -> Unary -> IO Bool solveMinimize s ass obj = fromJust `fmap` solveOptimize s ass obj (\_ -> return True) s...
540f47e5b442a86afdca632f1b56372b0e065628e9bbc64070209792a2581946
defaultxr/cl-patterns
cycles.lisp
;;;; t/cycles.lisp - tests for `pcycles' and related functions. (in-package #:cl-patterns/tests) (in-suite cl-patterns-tests) (test pcycles (is-true (every-event-equal (list (event :value :a :dur 1/3) (event :value :b :dur 1/3) (event :value :...
null
https://raw.githubusercontent.com/defaultxr/cl-patterns/e4bcdcf1dff29dcdf83de79ade4412896753a027/t/patterns/cycles.lisp
lisp
t/cycles.lisp - tests for `pcycles' and related functions.
(in-package #:cl-patterns/tests) (in-suite cl-patterns-tests) (test pcycles (is-true (every-event-equal (list (event :value :a :dur 1/3) (event :value :b :dur 1/3) (event :value :c :dur 1/3)) (next-upto-n (pcycles...
9a7f8be6a2d31dccfbb6606756a127ec9791ecb52735f71621e4dcdd3ea705c5
electric-sql/vaxine
antidote_crdt_flag_ew.erl
%% ------------------------------------------------------------------- %% Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal %% > %% This file is provided...
null
https://raw.githubusercontent.com/electric-sql/vaxine/872a83ea8d4935a52c7b850bb17ab099ee9c346b/apps/antidote_crdt/src/antidote_crdt_flag_ew.erl
erlang
------------------------------------------------------------------- > Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either expressed or implied. See the License for the specific language governing perm...
Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal This file is provided to you under the Apache License , except in compliance with the License . You...
6f20b2cc146565024365dfb5938e6aaae832c9b6081a52e469dc50b826a2635e
joinr/clclojure
reader.lisp
;;A package for defining read table extensions ;;for clojure data structures. ;;Pending.................. (defpackage :clclojure.reader (:use :common-lisp :common-utils :named-readtables :clclojure.pvector :clclojure.cowmap) (:export :*literals* :*reader-context* :quoted-children :quote-sym :literal?)) (in-pack...
null
https://raw.githubusercontent.com/joinr/clclojure/8b51214891c4da6dfbec393dffac70846ee1d0c5/dustbin/reader.lisp
lisp
A package for defining read table extensions for clojure data structures. Pending.................. Problem right now is that, when we read using delimited-list, When we have quoted we can use a completely custom reader...perhaps that's easiet.. Have to make this available to the compiler at compile time! Maybe mov...
(defpackage :clclojure.reader (:use :common-lisp :common-utils :named-readtables :clclojure.pvector :clclojure.cowmap) (:export :*literals* :*reader-context* :quoted-children :quote-sym :literal?)) (in-package :clclojure.reader) (comment (defconstant +left-bracket+ #\[) (defconstant +right-bracket+ #\]) (de...
3582e9c2a7dfeee9167248c95a3162decb3d6553246729616a81c61840fb86d7
CRogers/obc
expr.mli
* expr.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 . Redistributions o...
null
https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/compiler/expr.mli
ocaml
lookup_def -- find definition of a name, give error if none lookup_typename -- look up a type name is_var -- check that expression denotes a variable find_field -- search for field or method, or raise Not_found check_desig -- check and annotate a designator, return its type check_expr -- check and annotate a...
* expr.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 . Redistributions o...
9d8ebe5ced8536e5ac3a05f9a0bf3a196ddc4d88e3b47d0d83cc8c35cb6f21b9
ronxin/stolzen
scheme-numbers-tests.scm
#lang scheme (require rackunit) (require rackunit/text-ui) (require "../tags.scm") (require "../generic-operations.scm") (require "../scheme-numbers.scm") (require "../install-modules.scm") (define scheme-numbers-tags-suite (test-suite "Sheme numbers tags tests" (test-case "Scheme-nu...
null
https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.5/generic-ops/tests/scheme-numbers-tests.scm
scheme
#lang scheme (require rackunit) (require rackunit/text-ui) (require "../tags.scm") (require "../generic-operations.scm") (require "../scheme-numbers.scm") (require "../install-modules.scm") (define scheme-numbers-tags-suite (test-suite "Sheme numbers tags tests" (test-case "Scheme-nu...
4b4ea76cd2b81c526db0ec7eb5470a87ac9a46cd765411708ed8e7e04c6b96db
jacekschae/conduit
db.cljs
(ns conduit.db (:require [cljs.reader] [re-frame.core :refer [reg-cofx]])) ;; -- Default app-db Value --------------------------------------------------- ;; When the application first starts , this will be the value put in app - db ;; Look in: ;; 1. `core.cljs` for "(dispatch-sync [:initialise-db])...
null
https://raw.githubusercontent.com/jacekschae/conduit/1957f2ca86fcad84c652d2c05b0f319f8f529f89/src/conduit/db.cljs
clojure
-- Default app-db Value --------------------------------------------------- Look in: 1. `core.cljs` for "(dispatch-sync [:initialise-db])" 2. `events.cljs` for the registration of :initialise-db handler what gets put into app-db by default. -- Local Storage -----------------------------------------------...
(ns conduit.db (:require [cljs.reader] [re-frame.core :refer [reg-cofx]])) When the application first starts , this will be the value put in app - db (defn set-user-ls [user] sorted - map written as an EDN map (defn remove-user-ls [] (.removeItem js/localStorage conduit-user-key)) (reg-cofx...
e4bf818d9561e58ec9b12b626aeb1a0d0f3e0c4e8bf473c3f45c3677abafaf76
ntoronto/drbayes
info.rkt
#lang info (define collection 'multi) (define deps '("base" "typed-racket-lib" "typed-racket-more" "math-lib" )) (define build-deps '("images-lib" "plot-gui-lib" "plot-lib" "profile-lib" ...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" "typed-racket-lib" "typed-racket-more" "math-lib" )) (define build-deps '("images-lib" "plot-gui-lib" "plot-lib" "profile-lib" ...
e1ad47ac514347d8a5efaa09a560acf1254145ecedfacafe299e49f5897cc03d
andrewthad/sockets
Common.hs
# language LambdaCase # -- Functions like @close@ are the same regardless of whether -- a socket is connected, unconnected, internet-domain, or -- unix-domain. module Socket.Datagram.Common ( close ) where import Foreign.C.Error (Errno(..)) import Socket.Datagram (Socket(..)) import Socket.Error (die) import qual...
null
https://raw.githubusercontent.com/andrewthad/sockets/90d314bd2ec71b248a90da6ad964c679f75cfcca/src/Socket/Datagram/Common.hs
haskell
Functions like @close@ are the same regardless of whether a socket is connected, unconnected, internet-domain, or unix-domain. | Unbracketed function for closing a datagram socket. This must not
# language LambdaCase # module Socket.Datagram.Common ( close ) where import Foreign.C.Error (Errno(..)) import Socket.Datagram (Socket(..)) import Socket.Error (die) import qualified Posix.Socket as S import qualified Foreign.C.Error.Describe as D be used in conjunction with ' ' . close :: Socket c a -> IO (...
9f5dce6b83259bf1580773e9ebc403515cb6d51082ffe4f993a77baeeda8b74b
tek/polysemy-log
Main.hs
module Main where import Polysemy.Conc (runConc) import Polysemy.Log.Data.Severity (Severity (Error)) import qualified Polysemy.Log.Effect.Log as Log import Polysemy.Log.Stdout (interpretLogStdoutLevelConc) main :: IO () main = runConc $ interpretLogStdoutLevelConc (Just Error) do for_ @[] [1..500000] \ (i :: I...
null
https://raw.githubusercontent.com/tek/polysemy-log/31f276a7ff89080fd48b041646d378e437afb79f/packages/polysemy-log/benchmark/Main.hs
haskell
module Main where import Polysemy.Conc (runConc) import Polysemy.Log.Data.Severity (Severity (Error)) import qualified Polysemy.Log.Effect.Log as Log import Polysemy.Log.Stdout (interpretLogStdoutLevelConc) main :: IO () main = runConc $ interpretLogStdoutLevelConc (Just Error) do for_ @[] [1..500000] \ (i :: I...
0fa94991f481ea55c121bc14fca67bf8830abd499bf80613b85d1654966ca0a8
input-output-hk/cardano-base
Main.hs
import Test.Tasty import Test.Cardano.Slotting.EpochInfo (epochInfoTests) main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "EpochInfo" [epochInfoTests]
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/7e64caa79e0f751f1333ccbce4a64cb48752ae69/cardano-slotting/test/Main.hs
haskell
import Test.Tasty import Test.Cardano.Slotting.EpochInfo (epochInfoTests) main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "EpochInfo" [epochInfoTests]
8a3ec35e8abdfcde4713a0b464c77d1b470f1f86d4b8a0a3721042824cd27f47
haskell/directory
CurrentDirectory001.hs
# LANGUAGE CPP # module CurrentDirectory001 where #include "util.inl" import qualified Data.List as List main :: TestEnv -> IO () main _t = do prevDir <- getCurrentDirectory createDirectory "dir" setCurrentDirectory "dir" T(expectEq) () [".", ".."] . List.sort =<< getDirectoryContents "." setCurrentDirectory...
null
https://raw.githubusercontent.com/haskell/directory/a4df0bef429536ab74f2e94eddbf5dbb521707ed/tests/CurrentDirectory001.hs
haskell
# LANGUAGE CPP # module CurrentDirectory001 where #include "util.inl" import qualified Data.List as List main :: TestEnv -> IO () main _t = do prevDir <- getCurrentDirectory createDirectory "dir" setCurrentDirectory "dir" T(expectEq) () [".", ".."] . List.sort =<< getDirectoryContents "." setCurrentDirectory...
c8df53ebcb9cf5378a2e5e50abda8cd22520ee0ea76d09b169054341eaa5003e
dwayne/eopl3
interpreter.rkt
#lang eopl (require "./env.rkt") (require "./array.rkt") (require "./mutpair.rkt") (require "./parser.rkt") (require "./store.rkt") (provide ;; Expressed Values num-val bool-val ;; Interpreter run) (define (run s) (initialize-store!) (let ([init-env (extend-env 'i (newref (num-val 1)) ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/MUTABLE-PAIRS-4.30/interpreter.rkt
racket
Expressed Values Interpreter Procedure ADT Values
#lang eopl (require "./env.rkt") (require "./array.rkt") (require "./mutpair.rkt") (require "./parser.rkt") (require "./store.rkt") (provide num-val bool-val run) (define (run s) (initialize-store!) (let ([init-env (extend-env 'i (newref (num-val 1)) (extend-env ...
de22734315aa68fa5a7529118c394a6949c7eba9c0102f057b88e3cdfcc1f1b0
jayunit100/RudolF
project.clj
(defproject AminoAcidPredictor "0.0.1" :description "Application to predict gaps in Protein sequences" :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/clojure-contrib "1.2.0"] [commons-lang "2.3"] [incanter "1.2.3-SNAPSHOT"] [incanter/incanter-core ...
null
https://raw.githubusercontent.com/jayunit100/RudolF/8936bafbb30c65c78b820062dec550ceeea4b3a4/SequenceML/project.clj
clojure
(defproject AminoAcidPredictor "0.0.1" :description "Application to predict gaps in Protein sequences" :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/clojure-contrib "1.2.0"] [commons-lang "2.3"] [incanter "1.2.3-SNAPSHOT"] [incanter/incanter-core ...
86c2bbf19c7f4b8ac9a06415b1dd9930caa42d03f7efe13792ab01a3b2e0a74a
lispnik/cl-http
cl-http-init.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : cl - user ; Base : 10 -*- ;;; This file is the default for the -cl-http-init option. ;;; The server is started automatically after loading this file. (in-package :cl-user) ;; Load the demo examples and configuration. (load-system 'cl-http-examples)
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/lw/examples/cl-http-init.lisp
lisp
Syntax : ansi - common - lisp ; Package : cl - user ; Base : 10 -*- This file is the default for the -cl-http-init option. The server is started automatically after loading this file. Load the demo examples and configuration.
(in-package :cl-user) (load-system 'cl-http-examples)
cfdfeb854b47cbfc19589d1f6ae1bf46fa7f6f3ca7d1c6290383f8dc689ff676
csabahruska/jhc-components
Diff.hs
-- | Attempt to find pretty printable differences between terms. module E.Diff where import E.E import E.FreeVars() import E.Traverse import Stats import Support.FreeVars | take two expressions and return ( hopefully smaller ) expressions with their differences diff :: E -> E -> (E,E) diff a b = f a b where ...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-core/src/E/Diff.hs
haskell
| Attempt to find pretty printable differences between terms. show terms which contain interesting free variables
module E.Diff where import E.E import E.FreeVars() import E.Traverse import Stats import Support.FreeVars | take two expressions and return ( hopefully smaller ) expressions with their differences diff :: E -> E -> (E,E) diff a b = f a b where f (ELetRec ds e) (ELetRec ds' e') = (ELetRec (g ds ds') e, ELetRe...
24543487a6e138742adc62ee6a5d865a67f695d2bb98448772bacf2ce85760da
processone/xmpp
xep0221.erl
Created automatically by XML generator ( fxml_gen.erl ) %% Source: xmpp_codec.spec -module(xep0221). -compile(export_all). do_decode(<<"media">>, <<"urn:xmpp:media-element">>, El, Opts) -> decode_media(<<"urn:xmpp:media-element">>, Opts, El); do_decode(<<"uri">>, <<"urn:xmpp:media-element">>, El, ...
null
https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0221.erl
erlang
Source: xmpp_codec.spec
Created automatically by XML generator ( fxml_gen.erl ) -module(xep0221). -compile(export_all). do_decode(<<"media">>, <<"urn:xmpp:media-element">>, El, Opts) -> decode_media(<<"urn:xmpp:media-element">>, Opts, El); do_decode(<<"uri">>, <<"urn:xmpp:media-element">>, El, Opts) -> decode_...
642863493cb606ccbef81c52f3e6eda6472536cda1c86a82de23af62fc2a5983
fosskers/streaming-osm
Util.hs
# LANGUAGE BinaryLiterals # -- | Module : Streaming . Osm . Internal . Util Copyright : ( c ) Azavea , 2017 - 2020 -- License : BSD3 Maintainer : < > module Streaming.Osm.Internal.Util ( foldBytes , breakOn0 , pairs , both , unzig, undelta ) where import Data.Bits import qualifie...
null
https://raw.githubusercontent.com/fosskers/streaming-osm/4f86f88b1b8d45a055be96ec1283c324e55c9b15/lib/Streaming/Osm/Internal/Util.hs
haskell
| License : BSD3 - to16 :: Word8 -> Word16 to16 = fromIntegral to8 = fromIntegral unkey :: Word8 -> Word8 -> Either (Word8, Word8) Word8 (0, r) -> Right r (l, r) -> Left (setBit r 7, l) although in practice these are in `Word8` range. The results are left as numbers, since pattern matching on those sho...
# LANGUAGE BinaryLiterals # Module : Streaming . Osm . Internal . Util Copyright : ( c ) Azavea , 2017 - 2020 Maintainer : < > module Streaming.Osm.Internal.Util ( foldBytes , breakOn0 , pairs , both , unzig, undelta ) where import Data.Bits import qualified Data.ByteString as BS i...
632b82ae571932f9ef67bf19c0ad57a31a9e40ac0cbe7e58ef8018550ab39330
swiftbiosciences/primerclip
Paths_primerclip.hs
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - missing - import - lists # # OPTIONS_GHC -fno - warn - implicit - prelude # module Paths_primerclip ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception...
null
https://raw.githubusercontent.com/swiftbiosciences/primerclip/5742e717c2dc409a98c2c1691555c7175e83b4ca/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/primerclip-181230-2/autogen/Paths_primerclip.hs
haskell
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - missing - import - lists # # OPTIONS_GHC -fno - warn - implicit - prelude # module Paths_primerclip ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception...
67e9001ef5780bd83262e6e8c4f91169602af2f8ed0f0a39a295986580127295
hiposfer/hive
schema.cljs
(ns hive.state.schema (:require [hiposfer.gtfs.edn :as gtfs])) (def gtfs-data (js->clj (js/require "./resources/gtfs.json") :keywordize-keys true)) General Transfer Feed Specification - entities ;; identities (defn- gtfs-schema [] (let [identifiers (gtfs/identifiers gtfs-data)] (in...
null
https://raw.githubusercontent.com/hiposfer/hive/f17a5a1d0e17f719487d5b7375aefd8dc07f64e1/src/hive/state/schema.cljs
clojure
identities GTFS entities hive schema server support data mapbox data ephemeral data server response data provide a way for ERRORS to be registered
(ns hive.state.schema (:require [hiposfer.gtfs.edn :as gtfs])) (def gtfs-data (js->clj (js/require "./resources/gtfs.json") :keywordize-keys true)) General Transfer Feed Specification - entities (defn- gtfs-schema [] (let [identifiers (gtfs/identifiers gtfs-data)] (into (sorted-map...
d09ede4d9c294f3de033148add2b67c0e8d5d2b58dafc1d39447fca7394858e6
thheller/shadow-cljs
now.cljs
(ns demo.now) (defn handler [^js req ^js res] (.end res "Hello World"))
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/now.cljs
clojure
(ns demo.now) (defn handler [^js req ^js res] (.end res "Hello World"))
94d82a0a2ad448bb93ceb1b7bd610f3f4afd61ea76778e57076b6e88529c0618
pveber/prc
prc.mli
* Precision - Recall curve construction and AUC computation References : [ 1 ] The binormal assumption on precision - recall curves . , , and [ 2 ] Area Under the Precision - Recall Curve : Point Estimates and Confidence Intervals . , and [ 3 ] Precision - Recall - Gain Curv...
null
https://raw.githubusercontent.com/pveber/prc/303612842e810f17f370974283d4c6720ecc00cf/lib/prc.mli
ocaml
* Binary prediction scores with associated labels * Number of positive items in the dataset * [operating_points d] computes the list of score threshold, recall and precision triplets, sorted by decreasing threshold.
* Precision - Recall curve construction and AUC computation References : [ 1 ] The binormal assumption on precision - recall curves . , , and [ 2 ] Area Under the Precision - Recall Curve : Point Estimates and Confidence Intervals . , and [ 3 ] Precision - Recall - Gain Curv...
b21a55a349b415e1a4f80fe4f1adc5a29a9ceb2ce8a416b1de8fcf0e8351347f
fendor/hsimport
ModuleTest14.hs
module Blub ( blub , foo , bar ) where import Control.Monad
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/ModuleTest14.hs
haskell
module Blub ( blub , foo , bar ) where import Control.Monad
163c9dfbb5571914d09b6e8b810c7abfc9e3a380a656af7e0040d6154703c7c2
haskell/haskell-language-server
Nested.expected.hs
module Nested where function x = x where identity x = x
null
https://raw.githubusercontent.com/haskell/haskell-language-server/2b691b65cbc0c592471ae68597e32478d49b87f2/plugins/hls-retrie-plugin/test/testdata/Nested.expected.hs
haskell
module Nested where function x = x where identity x = x
c020b2da1ee4c6e621f87495e781e94b3e715b4a04f04814db9197b936fe0212
ocaml/ocaml
Plugin_1_0_0.ml
let () = Store.add "[0_0_1]->[]" let sqrt2 = let rec find c = if Float.abs (c *. c -. 2.) < 1e-3 then c else find ((c *. c +. 2.) /. (2. *. c)) in find 0x1.dd626133b25p+1 let add x = Store.add x let sqrt2 = let rec find c = if Float.abs (c *. c -. 2.) < 1e-3 then c else find ((c *. c +. 2.) /. (2....
null
https://raw.githubusercontent.com/ocaml/ocaml/67e6406511e6895fca71041b938ade60c8c14f03/testsuite/tests/lib-dynlink-domains/Plugin_1_0_0.ml
ocaml
let () = Store.add "[0_0_1]->[]" let sqrt2 = let rec find c = if Float.abs (c *. c -. 2.) < 1e-3 then c else find ((c *. c +. 2.) /. (2. *. c)) in find 0x1.dd626133b25p+1 let add x = Store.add x let sqrt2 = let rec find c = if Float.abs (c *. c -. 2.) < 1e-3 then c else find ((c *. c +. 2.) /. (2....
589b5ed02b68343ea556f2976779c9e2001b6c63f06f2562abfaa995b726081f
samply/blaze
cql_translator_test.clj
(ns blaze.cql-translator-test (:require [blaze.cql-translator :refer [translate]] [blaze.cql-translator-spec] [blaze.test-util :as tu] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as st] [clojure.test :as test :refer [are deftest testing]] [cognitect.anomalies :as anom] [juxt.i...
null
https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/cql/test/blaze/cql_translator_test.clj
clojure
(ns blaze.cql-translator-test (:require [blaze.cql-translator :refer [translate]] [blaze.cql-translator-spec] [blaze.test-util :as tu] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as st] [clojure.test :as test :refer [are deftest testing]] [cognitect.anomalies :as anom] [juxt.i...
314090437d1cf2c2d3756edb7bf888dccfb1dacf307d36417c77f52d3c9be348
rjnw/sham
object.rkt
#lang racket (require "define.rkt" "ctypes.rkt" ffi/unsafe) (provide (all-defined-out)) TODO
null
https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-llvm/sham/llvm/ffi/object.rkt
racket
#lang racket (require "define.rkt" "ctypes.rkt" ffi/unsafe) (provide (all-defined-out)) TODO
597486c4ee5967b1ad5c450b2193fe7c859eb5f01c806979931964f72b62615a
fukamachi/clack
toot.lisp
(in-package :cl-user) (defpackage clack.handler.toot (:use :cl :toot :split-sequence :ppcre) (:shadow :handle-request) (:import-from :toot :shutdown-p :listen-socket :listen-backlog :acceptor-process :accept-co...
null
https://raw.githubusercontent.com/fukamachi/clack/f22b36123a32146c4a2584bc97c95d5c9fdc8b12/src/handler/toot.lisp
lisp
nothing to response
(in-package :cl-user) (defpackage clack.handler.toot (:use :cl :toot :split-sequence :ppcre) (:shadow :handle-request) (:import-from :toot :shutdown-p :listen-socket :listen-backlog :acceptor-process :accept-co...
f2190c274b97a579a91e10cb216fc1ac69d424dcd1105b9316f5b36b35f4029a
goblint/analyzer
signs.ml
(** An analysis specification for didactic purposes. *) open Prelude.Ana open Analyses module Signs = struct include Printable.Std type t = Neg | Zero | Pos [@@deriving eq, ord, hash, to_yojson] let name () = "signs" let show x = match x with | Neg -> "-" | Zero -> "0" | Pos -> "+" include Pri...
null
https://raw.githubusercontent.com/goblint/analyzer/69d12c316e89e66d10ad655cbc4e235e4d51bc69/src/analyses/tutorials/signs.ml
ocaml
* An analysis specification for didactic purposes. TODO: An attempt to abstract integers, but it's just a little wrong... TODO: Maybe something missing? Now we turn this into a lattice by adding Top and Bottom elements. * We then lift the above operations to the lattice. Map of integers variables to our signs ...
open Prelude.Ana open Analyses module Signs = struct include Printable.Std type t = Neg | Zero | Pos [@@deriving eq, ord, hash, to_yojson] let name () = "signs" let show x = match x with | Neg -> "-" | Zero -> "0" | Pos -> "+" include Printable.SimpleShow (struct type nonrec t = t ...
b048565f4641469becc7cb137bee22570fea359c6888846decde8d70edda85b1
maacl/websocket-test
routes.clj
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) which ;; can be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by the ;; ter...
null
https://raw.githubusercontent.com/maacl/websocket-test/d79dfdf82762d566cd89b535c3dbede2788bb034/src/compojure/http/routes.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. Functions for lexing a string Don't comp...
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns compojure.http.routes "Macros and functions for compiling routes in the form (method path & body) into stand-alone functions that return the return value of the body, or the keyword :ne...
2ad1ad7ebd1fc9385f6b7ead6958e285d55aad65066023a5919010f5b4af1c60
fpco/ide-backend
SessionState.hs
-- | Maintained state in the sesssion module TestSuite.Tests.SessionState (testGroupSessionState) where import Test.HUnit import Test.Tasty import TestSuite.State import TestSuite.Assertions import TestSuite.Session testGroupSessionState :: TestSuiteEnv -> TestTree testGroupSessionState env = testGroup "Session stat...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/TestSuite/Tests/SessionState.hs
haskell
| Maintained state in the sesssion Module "A" is compiled before "Wrong", fails, so it's invalidated and all modules that depend on it are invalidated. Module "Wrong" is never compiled. This has to be disabled to get the different outcome below: Wrong place before or after target "A" depending on what kind of er...
module TestSuite.Tests.SessionState (testGroupSessionState) where import Test.HUnit import Test.Tasty import TestSuite.State import TestSuite.Assertions import TestSuite.Session testGroupSessionState :: TestSuiteEnv -> TestTree testGroupSessionState env = testGroup "Session state" [ stdTest env "Maintain list of...
5873744834d58f094676a1b1dcdd2946aa8a6078a5503ec8d1ad7666d5844f9d
seckcoder/course-compiler
s0_5.rkt
(let ([x 41]) (+ x 1))
null
https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s0_5.rkt
racket
(let ([x 41]) (+ x 1))
9cb46ab8b2013fbe2dd3c774a4df234ef72d4ad34007c3970dd814e7b1955cf0
mbenke/zpf2013
Free.hs
import Control.Monad import Control.Monad.Trans data Free f a = Pure a | Free (f (Free f a)) instance Functor f => Functor (Free f) where fmap f (Pure a) = Pure (f a) fmap f (Free as) = Free (fmap (fmap f) as) instance Functor f => Monad (Free f) where return = Pure the first monad law ! Free as >>= f...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Slides/05Monad/Free.hs
haskell
import Control.Monad import Control.Monad.Trans data Free f a = Pure a | Free (f (Free f a)) instance Functor f => Functor (Free f) where fmap f (Pure a) = Pure (f a) fmap f (Free as) = Free (fmap (fmap f) as) instance Functor f => Monad (Free f) where return = Pure the first monad law ! Free as >>= f...
611bc5b84b8dfd15b577685f24ed70789ccdef1494840368011474a934e86800
acieroid/scala-am
infinite-threads.scm
(define (f x) (fork (f x))) (f 42)
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/infinite-threads.scm
scheme
(define (f x) (fork (f x))) (f 42)
b63a32909ef18bb42363291018ba99fd29ea7dc1eaaf0009e2e15af4246623b3
input-output-hk/cardano-wallet-legacy
TypeLits.hs
module Cardano.Wallet.TypeLits ( module Pos.Util.KnownSymbols ) where import Pos.Util.KnownSymbols
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/TypeLits.hs
haskell
module Cardano.Wallet.TypeLits ( module Pos.Util.KnownSymbols ) where import Pos.Util.KnownSymbols
7996f59851c7a8d12c841f8ebc4d765c673ef3053419d507c5ca392333474cce
cl-unix-cybernetics/cl-unix-cybernetics
freebsd.lisp
;; cl-unix-cybernetics Copyright 2013 - 2022 < > ;; ;; Permission is hereby granted to use this software granted ;; the above copyright notice and this permission paragraph ;; are included in all copies and substantial portions of this ;; software. ;; ;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF ...
null
https://raw.githubusercontent.com/cl-unix-cybernetics/cl-unix-cybernetics/63e4862274e170bda7540b4caec6c94ed850a31c/unix/freebsd.lisp
lisp
cl-unix-cybernetics Permission is hereby granted to use this software granted the above copyright notice and this permission paragraph are included in all copies and substantial portions of this software. THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER...
Copyright 2013 - 2022 < > (in-package :cl-unix-cybernetics) (in-re-readtable) (defun get-sh-var (name file) (let (value) (with-sh-var (var val) (egrep (str "^" name "=") file) (when (string= name var) (setq value val))) value)) (defsetf get-sh-var (name file) (value) `(let ((name (re...
4b044c238eb8adb1099e2b8e21b930cf34e4c533ceaaa3f853f6a710ac031c36
mfikes/fifth-postulate
ns40.cljs
(ns fifth-postulate.ns40) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (xs...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns40.cljs
clojure
(ns fifth-postulate.ns40) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (xs...
ea7a06b69e73ff011d65a2b347a56629ea622cc6b85e73350a2086ce6248b575
mbuczko/revolt
assets.clj
(ns revolt.tasks.assets (:require [clojure.string :as str] [clojure.java.io :as io] [clojure.tools.logging :as log] [revolt.utils :as utils]) (:import (java.io File) (java.nio.file StandardCopyOption) (java.nio.file Files))) (def ^:const buffer-len 2048)...
null
https://raw.githubusercontent.com/mbuczko/revolt/65ef8de68d7aa77d1ced40e7d669ebcbba8a340e/src/revolt/tasks/assets.clj
clojure
(ns revolt.tasks.assets (:require [clojure.string :as str] [clojure.java.io :as io] [clojure.tools.logging :as log] [revolt.utils :as utils]) (:import (java.io File) (java.nio.file StandardCopyOption) (java.nio.file Files))) (def ^:const buffer-len 2048)...
84a220c77acd33cdd27e2373a147695c235e6d47880f78890b36dc29db1355b2
kiselgra/c-mera
reader.lisp
(in-package :cm-c) ;;; Used as a global pre-processor for all symbols in c-mera nodes (defun dissect (item &key (quoty nil)) "starts the appropriate preprocessing for the item" (cond ((symbolp item) (cond ((and (eql (first (coerce (symbol-name item) 'list)) #\") (eql (first (reverse (coerce (...
null
https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/src/c/reader.lisp
lisp
Used as a global pre-processor for all symbols in c-mera nodes check/(fix package hack function definition arrow, dont touch get position of matching '[ for last '] index not empty index empty stop at whitespace and comments ) stop at whitespace and comments ) Needs further analysis (defun comment-reader (str...
(in-package :cm-c) (defun dissect (item &key (quoty nil)) "starts the appropriate preprocessing for the item" (cond ((symbolp item) (cond ((and (eql (first (coerce (symbol-name item) 'list)) #\") (eql (first (reverse (coerce (symbol-name item) 'list))) #\")) item) ((and (eql (first (c...
c29967315383114b935cbbac01e2ffae213a5932dd73ec0c3dc2444b1ce39490
craigl64/clim-ccl
stream-trampolines.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- ;; See the file LICENSE for the full license governing this code. ;; (in-package :clim-internals) " Copyright ( c ) 1989 , 1990 International Lisp Associates . All rights reserved . " (generate-stream-p...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/clim/stream-trampolines.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- See the file LICENSE for the full license governing this code.
(in-package :clim-internals) " Copyright ( c ) 1989 , 1990 International Lisp Associates . All rights reserved . " (generate-stream-protocol-trampolines)
64bad29154026414314e5875218d9fbb8f76b4468bd116f3d70aabe6b5a0d905
hiroshi-unno/coar
NN.ml
open Core open Common.Ext open Ast open Ast.LogicOld open PCSatCommon let classify _dummy_param _params pos_examples neg_examples = if Set.Poly.is_empty pos_examples || Set.Poly.is_empty neg_examples then Set.Poly.empty else failwith "not implemented (should return set of qualifiers)" let nn_half_spaces_o...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/qualifier/NN.ml
ocaml
open Core open Common.Ext open Ast open Ast.LogicOld open PCSatCommon let classify _dummy_param _params pos_examples neg_examples = if Set.Poly.is_empty pos_examples || Set.Poly.is_empty neg_examples then Set.Poly.empty else failwith "not implemented (should return set of qualifiers)" let nn_half_spaces_o...
89ce1b70beb61aa168d1651d4911b6df4e1f8a6e760f1ebe43eb2e7508f77777
ndmitchell/supero
append.hs
#if MAIN main = print $ length $ root (replicate n 'x') (replicate n 'y') (replicate n 'z') where n = 10000000 #endif app xs ys = case xs of [] -> ys x:xs -> x : app xs ys root xs ys zs = app (app xs ys) zs
null
https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/supero3/samples/peter/append.hs
haskell
#if MAIN main = print $ length $ root (replicate n 'x') (replicate n 'y') (replicate n 'z') where n = 10000000 #endif app xs ys = case xs of [] -> ys x:xs -> x : app xs ys root xs ys zs = app (app xs ys) zs
d2f15528c59027fc0684b652105ee76a8b3468101acfe62f75904bf3c45cad4f
typeclasses/haskell-phrasebook
test-variables.hs
main = propertyMain $ withTests 1 $ property do x <- exeStdout $ phrasebook "variables" strLines x === [ "4", "one", "two", "True", "[1,2,3]" ]
null
https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/2b0aa44ef6f6e9745c51ed47b4e59ff704346c87/tests/test-variables.hs
haskell
main = propertyMain $ withTests 1 $ property do x <- exeStdout $ phrasebook "variables" strLines x === [ "4", "one", "two", "True", "[1,2,3]" ]
e1cb46e9f06ead508e2cd6b6c0e8e646464660496362eee34fc15c30f705ee69
metosin/metosin-common
loc_test.cljc
(ns metosin.loc-test)
null
https://raw.githubusercontent.com/metosin/metosin-common/94ae6ed819f1114e0cfd7d7fe7709b9480ad4b7c/test/cljc/metosin/loc_test.cljc
clojure
(ns metosin.loc-test)
23d64370ac4cc80ca45fae088cddc881c9249db8f03fb9bb237770b73844229a
coast-framework/db
pull_test.clj
(ns db.pull-test (:require [db.pull :as pull] [clojure.test :refer [deftest testing is]])) (deftest pull-test (let [associations '{:account/todos {:joins [{:table todo :left todo.account_id :right account.id}] :has-many :todo ...
null
https://raw.githubusercontent.com/coast-framework/db/e738cd6402a89c591363ac6f3e7a6e08bcc28a0e/test/db/pull_test.clj
clojure
(ns db.pull-test (:require [db.pull :as pull] [clojure.test :refer [deftest testing is]])) (deftest pull-test (let [associations '{:account/todos {:joins [{:table todo :left todo.account_id :right account.id}] :has-many :todo ...
05e4d328b2598f7bc8d0ad387c8de12091b62bd504aa11dad034f7db57b96eef
abtv/tech-radar
resources.clj
(ns tech-radar.utils.resources (:require [taoensso.timbre :as timbre] [liberator.core :refer [resource]] [cognitect.transit :as transit]) (:import (org.joda.time DateTime ReadableInstant) (java.io ByteArrayOutputStream ByteArrayInputStream))) (def joda-time-writer (transit/writ...
null
https://raw.githubusercontent.com/abtv/tech-radar/167c1c66ff2cf7140fe1de247d67a7134b0b1748/src/clj/tech_radar/utils/resources.clj
clojure
(ns tech-radar.utils.resources (:require [taoensso.timbre :as timbre] [liberator.core :refer [resource]] [cognitect.transit :as transit]) (:import (org.joda.time DateTime ReadableInstant) (java.io ByteArrayOutputStream ByteArrayInputStream))) (def joda-time-writer (transit/writ...