_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
8d5cab301caec8ed0522bf839818cb9b6e85ffaad0928a581f6a286baa2385b6
adomokos/haskell-katas
Ex60_MonadsIntroToWriteMonadSpec.hs
module Ex60_MonadsIntroToWriteMonadSpec (spec) where import Test.Hspec import Control.Monad import Data.Monoid import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 main :: IO () main = hspec spec isBigGang : : Int - > ( , String ) applyLog : : ( a , String ) - > ( a - > ( b , ) )...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex60_MonadsIntroToWriteMonadSpec.hs
haskell
applyLog' :: (a,[c]) -> (a -> (b,[c])) -> (b,[c]) applyLog'' :: (Monoid m) => (a,m) -> (a -> (b,m)) -> (b,m) same logic as applyLog' addDrink :: Food -> (Food,Price) Create the isBigGang function Create the applyLog function, that appends log messages Use a lambda to apply more messages (("Bathcat", "Got out...
module Ex60_MonadsIntroToWriteMonadSpec (spec) where import Test.Hspec import Control.Monad import Data.Monoid import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 main :: IO () main = hspec spec isBigGang : : Int - > ( , String ) applyLog : : ( a , String ) - > ( a - > ( b , ) )...
a3ce37ecc2510eae49da02e3ba1262a81df5a920e3f3eb2eb1a8d83aa71404cc
scicloj/tablecloth
unique_by.clj
(ns tablecloth.api.unique-by (:require [tech.v3.dataset :as ds] [tech.v3.datatype.protocols :as dtype-proto] [tech.v3.dataset.column :as col] [tech.v3.datatype :as dtype] [tech.v3.datatype.bitmap :as bitmap] [tablecloth.api.utils :refer [iterabl...
null
https://raw.githubusercontent.com/scicloj/tablecloth/517c75e1dced1f27a81e237721ebe809870e1b04/src/tablecloth/api/unique_by.clj
clojure
(ns tablecloth.api.unique-by (:require [tech.v3.dataset :as ds] [tech.v3.datatype.protocols :as dtype-proto] [tech.v3.dataset.column :as col] [tech.v3.datatype :as dtype] [tech.v3.datatype.bitmap :as bitmap] [tablecloth.api.utils :refer [iterabl...
9ee8f0516fe152c8692b408f17af140ff6809e622d2fa4196831fa9857a6affa
tezos/tezos-mirror
RPC_client_unix.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/360e20ac4d2f54364cd56f715a0b148b2ee90663/src/lib_rpc_http/RPC_client_unix.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > 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 , WHETH...
f9fe5fef493f223077f3b6022a7ab04eb98e02c0f2f323e52a01eaa565c1e8ea
WhatsApp/eqwalizer
tries.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(tries). -compile([export_all, nowarn_export_all]). -spec foo() -> {atom(), term()}. foo() -> ...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/eqwalizer/test_projects/check/src/tries.erl
erlang
the LICENSE file in the root directory of this source tree.
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(tries). -compile([export_all, nowarn_export_all]). -spec foo() -> {atom(), term()}. foo() -> {foo, bar}. -spec ok() -> ok. ok() -> ok. -spec only_atom(atom()) ...
5a8d49290c4ed42b715d27e7526abc418625adf027b12e71e33e50dae8117345
amccausl/Swish
GraphMem.hs
{-# OPTIONS -XFlexibleInstances #-} {-# OPTIONS -XMultiParamTypeClasses #-} -------------------------------------------------------------------------------- $ I d : GraphMem.hs , v 1.16 2004/02/09 22:22:44 graham Exp $ -- Copyright ( c ) 2003 , . All rights reserved . -- See end of this file for licen...
null
https://raw.githubusercontent.com/amccausl/Swish/9a7356300960c62e3f0468067bda0c34ee3606bd/Swish/HaskellRDF/GraphMem.hs
haskell
# OPTIONS -XFlexibleInstances # # OPTIONS -XMultiParamTypeClasses # ------------------------------------------------------------------------------ See end of this file for licence information. ------------------------------------------------------------------------------ | Module : GraphMem Stabil...
$ I d : GraphMem.hs , v 1.16 2004/02/09 22:22:44 graham Exp $ Copyright ( c ) 2003 , . All rights reserved . Copyright : ( c ) 2003 , License : GPL V2 Maintainer : module Swish.HaskellRDF.GraphMem ( GraphMem(..) , setArcs, getArcs, add, delete, extract, la...
4eef4c3833e8b8e09e8c9652a0c9f13267da55dee9738ff3eb1fd0bbdb4727cd
8c6794b6/guile-tjit
r5rs.scm
;;; r5rs.scm --- The R6RS / R5RS compatibility library Copyright ( C ) 2010 Free Software Foundation , Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/rnrs/r5rs.scm
scheme
r5rs.scm --- The R6RS / R5RS compatibility library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERC...
Copyright ( C ) 2010 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (library (rnrs r5rs (6)) (export exact->in...
12c65a04352e9874e74229d95cae8359e169207949c001f9c19b21663fe8c507
HuwCampbell/grenade
Dropout.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} # LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # module Grenade.Layers.Dropout ( Dropout (..) , randomDropout ) where import Control.Monad.Random hiding (fromList) import GHC.TypeLits import...
null
https://raw.githubusercontent.com/HuwCampbell/grenade/5206c95c423d9755e620f41576470a281ba59c89/src/Grenade/Layers/Dropout.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # Dropout layer help to reduce overfitting. After backpropogation, we return a new matrix/vector, with different bits dropped out. reasonable).
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # module Grenade.Layers.Dropout ( Dropout (..) , randomDropout ) where import Control.Monad.Random hiding (fromList) import GHC.TypeLits import Grenade.Core Idea here is that the vector is a shape of 1s and 0...
275b994cb2744684f195b6c7087c7c43b11e8ec2aa1e415011cf3fb7d918c4de
tsloughter/kuberl
kuberl_v1_custom_resource_definition_spec.erl
-module(kuberl_v1_custom_resource_definition_spec). -export([encode/1]). -export_type([kuberl_v1_custom_resource_definition_spec/0]). -type kuberl_v1_custom_resource_definition_spec() :: #{ 'conversion' => kuberl_v1_custom_resource_conversion:kuberl_v1_custom_resource_conversion(), 'group' := binary(), ...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_custom_resource_definition_spec.erl
erlang
-module(kuberl_v1_custom_resource_definition_spec). -export([encode/1]). -export_type([kuberl_v1_custom_resource_definition_spec/0]). -type kuberl_v1_custom_resource_definition_spec() :: #{ 'conversion' => kuberl_v1_custom_resource_conversion:kuberl_v1_custom_resource_conversion(), 'group' := binary(), ...
30e80c1193668645344dc3e0f38f40dd594c60e1fef26c42641a8d6b57d9bcf1
mbutterick/brag
0n1.rkt
#lang brag rule: "0"* "1"
null
https://raw.githubusercontent.com/mbutterick/brag/6c161ae31df9b4ae7f55a14f754c0b216b60c9a6/brag-lib/brag/examples/0n1.rkt
racket
#lang brag rule: "0"* "1"
9354f26df7af6e006bf51d94dd13ad0362f21dcbce5fc5d474de610d4add8589
caiorss/Functional-Programming
ch04.exercises.hs
safeHead :: [a] -> Maybe a safeHead (head:rest) = Just head safeHead [] = Nothing safeTail :: [a] -> Maybe [a] safeTail (head:rest) = Just rest safeTail [] = Nothing safeLast :: [a] -> Maybe a safeLast [x] = Just x safeLast (hd:tl) = safeLast tl safeLast [] = Nothing safeInit :: [a] -> Maybe [a] saf...
null
https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch04/ch04.exercises.hs
haskell
safeHead :: [a] -> Maybe a safeHead (head:rest) = Just head safeHead [] = Nothing safeTail :: [a] -> Maybe [a] safeTail (head:rest) = Just rest safeTail [] = Nothing safeLast :: [a] -> Maybe a safeLast [x] = Just x safeLast (hd:tl) = safeLast tl safeLast [] = Nothing safeInit :: [a] -> Maybe [a] saf...
eb1570c699ec3d33b285e29c812f6574e574e342b88119f43aad7371855bc6ea
polysemy-research/loopbreaker
PragmaDetectionSpec.hs
{-# OPTIONS_GHC -O2 #-} # LANGUAGE TemplateHaskell # module PragmaDetectionSpec (spec) where import TestUtils ------------------------------------------------------------------------------ spec :: Spec spec = describe "plugin" $ do it "should respect INLINE pragma" $ do shouldFail $(inspectTest $ 'recursi...
null
https://raw.githubusercontent.com/polysemy-research/loopbreaker/04e3b2ef918a0f7ee0de8f1748400f185328db4d/test/PragmaDetectionSpec.hs
haskell
# OPTIONS_GHC -O2 # ---------------------------------------------------------------------------- ----------------------------------------------------------------------------
# LANGUAGE TemplateHaskell # module PragmaDetectionSpec (spec) where import TestUtils spec :: Spec spec = describe "plugin" $ do it "should respect INLINE pragma" $ do shouldFail $(inspectTest $ 'recursiveDefault === 'mutual) shouldSucceed $(inspectTest $ 'recursiveOn === 'mutual) recursiveDefau...
add3d30376313662b4f4c564ff9fa9f68ccae144485b9d0d319376f733e84591
noinia/hgeometry
LineSegmentSpec.hs
# LANGUAGE ScopedTypeVariables # module Geometry.LineSegmentSpec where import Data.Bifunctor import Control.Lens import Data.Ext import Geometry.Line import Geometry.LineSegment import Geometry.LineSegment.Internal (onSegment, onSegment2) import Geometry.Point import Geometry.Vector import Geometry.Boundary import Geo...
null
https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-test/src/Geometry/LineSegmentSpec.hs
haskell
------------------------------------------------------------------------------ | interpret an andpoint that has an arrow as an open endpoint.
# LANGUAGE ScopedTypeVariables # module Geometry.LineSegmentSpec where import Data.Bifunctor import Control.Lens import Data.Ext import Geometry.Line import Geometry.LineSegment import Geometry.LineSegment.Internal (onSegment, onSegment2) import Geometry.Point import Geometry.Vector import Geometry.Boundary import Geo...
b4467766f2932fd016f99936de34ae12c700cd162453361f1c5e0a78d853af5d
ammarhakim/gkylcas
basisSer2x2v.lisp
;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- (in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X $Y)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $VX $VY)) (ADD2LNC '|$varsP| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (10. "/Users/JunoRavi...
null
https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g2/basis-precalc/basisSer2x2v.lisp
lisp
-*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X $Y)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $VX $VY)) (ADD2LNC '|$varsP| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (10. "/Users/JunoRavin/gkyl/cas-scripts/basis-precalc/basis-pre-calc.mac" ...
c1e5f61f5bf271d8a5cadeba336c89f95e18b6292797d0d2b774aee15a9c4f41
digitallyinduced/ihp
FrameworkConfig.hs
{-# LANGUAGE ConstraintKinds #-} module IHP.FrameworkConfig where import IHP.Prelude import System.Directory (getCurrentDirectory) import IHP.Environment import qualified Data.Text as Text import qualified Network.Wai.Middleware.RequestLogger as RequestLogger import qualified Web.Cookie as Cookie import IHP.Mail.Types...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/d6c6e81acc1ffadc412813fd4817bdc674e0b6bc/IHP/FrameworkConfig.hs
haskell
# LANGUAGE ConstraintKinds # | Provides IHP with a middleware to log requests and responses. documentation when you want to customize the request logging. | Provides the default settings for the session cookie. - Same Site Policy: Lax - secure, when baseUrl is a https url Override this to set e.g. a custom ...
module IHP.FrameworkConfig where import IHP.Prelude import System.Directory (getCurrentDirectory) import IHP.Environment import qualified Data.Text as Text import qualified Network.Wai.Middleware.RequestLogger as RequestLogger import qualified Web.Cookie as Cookie import IHP.Mail.Types import qualified Control.Monad.T...
f9287ad0861f0c1c978ba8f06d6db0a1b7d5c002845430f719f8405df41963b5
danilkolikov/dfl
AstWithKinds.hs
| Module : Compiler . Prettify . AstWithKinds Description : Pretty - printing of AST with kinds Copyright : ( c ) , 2019 License : MIT Functions for pretty - printing of AST with kinds Module : Compiler.Prettify.AstWithKinds Description : Pretty-printing of AST with kinds C...
null
https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Compiler/Prettify/AstWithKinds.hs
haskell
| Module : Compiler . Prettify . AstWithKinds Description : Pretty - printing of AST with kinds Copyright : ( c ) , 2019 License : MIT Functions for pretty - printing of AST with kinds Module : Compiler.Prettify.AstWithKinds Description : Pretty-printing of AST with kinds C...
467a0cea3ee90a06f579388dd2bc725c4d208852ae1164fa1a3451db14d20204
OCamlPro/typerex-lint
list_function_on_singleton.ml
(**************************************************************************) (* *) (* OCamlPro Typerex *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-parsetree/list_function_on_singleton.ml
ocaml
************************************************************************ OCamlPro Typerex This file is distributed ...
Copyright OCamlPro 2011 - 2016 . All rights reserved . ( GNU General Public Licence version 3.0 ) . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE...
66f0968076362326db014f36fdcf8584feea461536455af835a46636cc69f8b2
maybevoid/casimir
Ops.hs
module Casimir.Test.Ops where import Test.Tasty import Casimir.Test.Ops.Env import Casimir.Test.Ops.State import Casimir.Test.Ops.Pipe import Casimir.Test.Ops.Exception import Casimir.Test.Ops.Ambivalent opsTests :: TestTree opsTests = testGroup "Ops Tests" [ envTests , stateTests , pipeTests , exceptionTest...
null
https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/test/Casimir/Test/Ops.hs
haskell
module Casimir.Test.Ops where import Test.Tasty import Casimir.Test.Ops.Env import Casimir.Test.Ops.State import Casimir.Test.Ops.Pipe import Casimir.Test.Ops.Exception import Casimir.Test.Ops.Ambivalent opsTests :: TestTree opsTests = testGroup "Ops Tests" [ envTests , stateTests , pipeTests , exceptionTest...
6b8a80d07c6fa6c1404ab7605c78e2f176af531e858cf0aa749c64f833ae9cb6
yesodweb/yesod
CssQuery.hs
{-# LANGUAGE OverloadedStrings #-} -- | Parsing CSS selectors into queries. module Yesod.Test.CssQuery ( SelectorGroup (..) , Selector (..) , parseQuery ) where import Prelude hiding (takeWhile) import Data.Text (Text) import Data.Attoparsec.Text import Control.Applicative import Data.Char import qual...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-test/Yesod/Test/CssQuery.hs
haskell
# LANGUAGE OverloadedStrings # | Parsing CSS selectors into queries. but that spec is tricky to fully support. Instead we do the minimal and we can extend it as needed. * The top-level lists represent the top level comma separated queries. the selectors in the group are: /table/, /.main/ and /.odd/ part of t...
module Yesod.Test.CssQuery ( SelectorGroup (..) , Selector (..) , parseQuery ) where import Prelude hiding (takeWhile) import Data.Text (Text) import Data.Attoparsec.Text import Control.Applicative import Data.Char import qualified Data.Text as T data SelectorGroup = DirectChildren [Selector] | D...
5b238ed2259d346d54c63ce57826c6438565f3f18b2be8aba1a6847a02d1ce5e
quil-lang/magicl
allocation-allegro.lisp
allocation-allegro.lisp ;;;; special implementation of `lisp-allocator' function for allegro ;;;; it is loaded AFTER `allocation.lisp' file ;;;; Author : (in-package #:magicl) (defun lisp-allocator (size element-type initial-element) (let ((storage (let ((init-element (if initial-element (coerce initial-eleme...
null
https://raw.githubusercontent.com/quil-lang/magicl/0203b7f797de5d221865908f80ccf958c48a2710/src/high-level/allocation-allegro.lisp
lisp
special implementation of `lisp-allocator' function for allegro it is loaded AFTER `allocation.lisp' file
allocation-allegro.lisp Author : (in-package #:magicl) (defun lisp-allocator (size element-type initial-element) (let ((storage (let ((init-element (if initial-element (coerce initial-element element-type)))) (cond ((eq element-type 'single-float) (excl::.primcall ...
2d75aa5445d233da312b797bf4c73f0d8a046dc99a3455c2aaa911b87134599f
colis-anr/morbig
hereDocument.ml
(**************************************************************************) (* -*- tuareg -*- *) (* *) Copyright ( C ) 2017 - 2021 , , . ...
null
https://raw.githubusercontent.com/colis-anr/morbig/77c2ca402785979c4af351b412fe7be2d521838f/src/hereDocument.ml
ocaml
************************************************************************ -*- tuareg -*- This is free software: you...
Copyright ( C ) 2017 - 2021 , , . under the terms of the GNU General Public License , version 3 . open CST open PrelexerState module Lexer (U : sig end) : sig val push_here_document_delimiter : string -> word_cst -> unit v...
bb14e8dd16d25d4be22d66eaf83d87c59bcb11f75268b098d9cb72130f43020c
emaphis/HtDP2e-solutions
ex007.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex007) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/01-Arithmetic/ex007.rkt
racket
about the language level of this file in a form that our tools can easily process. (define sunny #true) So in this particular case, the answer is #false. (Why?) #false logical implication! #true #false #true #true
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex007) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Ex . 7 Add these two lines to the definitions area of : ( d...
9196588fa1df2f0dc97b6b3cd4018129a0959fd9794bc2fc6743965a9932df49
iamFIREcracker/adventofcode
day09.lisp
(defpackage :aoc/2016/09 #.cl-user::*aoc-use*) (in-package :aoc/2016/09) (defparameter *version* 1) (defun message-length (string) (or (message-compressed-length string) (message-uncompressed-length string) 0)) (defun message-compressed-length (string) (cl-ppcre:register-groups-bind ((#'parse-integer...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2016/day09.lisp
lisp
(defpackage :aoc/2016/09 #.cl-user::*aoc-use*) (in-package :aoc/2016/09) (defparameter *version* 1) (defun message-length (string) (or (message-compressed-length string) (message-uncompressed-length string) 0)) (defun message-compressed-length (string) (cl-ppcre:register-groups-bind ((#'parse-integer...
84e6e008de659e71498b02ea67acb1c611cff9d99e5e0dc180c2da04b97b2a66
SNePS/SNePS2
nodeset2.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of ;; State University of New York Version : $ I d : nodeset2.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE$ ...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps/ds/nodeset2.lisp
lisp
Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*- State University of New York This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for t...
Copyright ( C ) 1984 - -2013 Research Foundation of Version : $ I d : nodeset2.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY...
8b1d4117c8d1e445940a1d9bdca4cada13f2e9ba2b2dfdfb63f1e777434edd5d
ocaml-community/obus
test_gc.ml
* test_gc.ml * ---------- * Copyright : ( c ) 2010 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * test_gc.ml * ---------- * Copyright : (c) 2010, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of obus, an ocaml implementatio...
null
https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/tests/test_gc.ml
ocaml
* test_gc.ml * ---------- * Copyright : ( c ) 2010 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * test_gc.ml * ---------- * Copyright : (c) 2010, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of obus, an ocaml implementatio...
f3d1c4d597ab916561ba17a8403b30d6c1bb390ab6c1e2b1d1069318e55c84c2
urs-of-the-backwoods/fresco
Entity.hs
-- Fresco Framework for Multi - Language Programming Copyright 2015 - 2017 -- Distributed under the Apache License , Version 2.0 -- (See attached file LICENSE or copy at -- http:--www.apache.org/licenses/LICENSE-2.0) -- file : haskell / Fresco / Entity.hs -- # Language OverloadedStrings , Existen...
null
https://raw.githubusercontent.com/urs-of-the-backwoods/fresco/9914df6d534f591448ed1501965f1bd03f3724de/haskell-binding/Fresco/Entity.hs
haskell
(See attached file LICENSE or copy at http:--www.apache.org/licenses/LICENSE-2.0) * EntityData Type (#!), (#), * Entity Type an IORef and serves as mutable data structure. readE, _setC', | pair builder for nice construction syntax, allows [ ct #: val, ...] syntax | Builder for entities, allow...
Fresco Framework for Multi - Language Programming Copyright 2015 - 2017 Distributed under the Apache License , Version 2.0 file : haskell / Fresco / Entity.hs # Language OverloadedStrings , ExistentialQuantification , FlexibleInstances # | Entity of the Entity ComponentType System for Fresco Haskell B...
c8eec5131b5d65f4f04e9fc46cf5c45cfe084f2d1164959ef1db35d46fd59ea6
reiddraper/simple-check
core.clj
(ns simple-check.core (:require [simple-check.generators :as gen] [simple-check.clojure-test :as ct])) (declare shrink-loop failure) (defn make-rng [seed] (if seed [seed (gen/random seed)] (let [non-nil-seed (System/currentTimeMillis)] [non-nil-seed (gen/random non-nil-seed)]))) (defn...
null
https://raw.githubusercontent.com/reiddraper/simple-check/c0ada3ba4290c999d9047d8083fa4038d9762f23/src/simple_check/core.clj
clojure
this node passed the test, so now try testing it's right-siblings this node failed the test, so check if it has children, if so, traverse down them. If not, save this as the best example seen now and then look at the right-siblings children
(ns simple-check.core (:require [simple-check.generators :as gen] [simple-check.clojure-test :as ct])) (declare shrink-loop failure) (defn make-rng [seed] (if seed [seed (gen/random seed)] (let [non-nil-seed (System/currentTimeMillis)] [non-nil-seed (gen/random non-nil-seed)]))) (defn...
70b40722e93f1bd088d1d0647421a2a3080b9539d43dab1192bf54582465c45b
stepcut/plugins
API.hs
module API where import Data.Typeable data TestIO = TestIO { field :: IO String #if __GLASGOW_HASKELL__ >= 800 } deriving Typeable #else } instance Typeable TestIO where #if __GLASGOW_HASKELL__ >= 603 typeOf i = mkTyConApp (mkTyCon "API.TestIO") [] #else typeOf i = mkAppTy (m...
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/dynload/io/api/API.hs
haskell
module API where import Data.Typeable data TestIO = TestIO { field :: IO String #if __GLASGOW_HASKELL__ >= 800 } deriving Typeable #else } instance Typeable TestIO where #if __GLASGOW_HASKELL__ >= 603 typeOf i = mkTyConApp (mkTyCon "API.TestIO") [] #else typeOf i = mkAppTy (m...
ec9e48a1badf20236f385d9365e20a8363b700f7de15fbbe98d82febc2793a2d
overtone/overtone
core_test.clj
(ns overtone.sc.core-test (:use clojure.test overtone.live ;; TODO: this is not importable until the server is booted? overtone.inst.synth) (:require [overtone.sc.machinery.server.connection :refer [connection-info*]] [overtone.config.log :as log])) (def ditty-notes [50 50 57 50 48 62 62 50]) (de...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/test/overtone/sc/core_test.clj
clojure
TODO: this is not importable until the server is booted? TODO: hit is not defined (play-seqs "sin" ditty-notes ditty-durs) We should get the old ID again with the bitset allocator (reset) (boot-test) (boot-server) (node-tree-test) (reset)
(ns overtone.sc.core-test (:use clojure.test overtone.live overtone.inst.synth) (:require [overtone.sc.machinery.server.connection :refer [connection-info*]] [overtone.config.log :as log])) (def ditty-notes [50 50 57 50 48 62 62 50]) (def ditty-durs [250 250 500 125 125 250 250 500]) (defn play-se...
1a5e04dae60db81b2cadfc3c9bf499e005b48ea12cbb6bd3bf53923afc18ebcb
pedestal/pedestal
ring_middlewares_test.clj
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; 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 ...
null
https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/tests/test/io/pedestal/http/ring_middlewares_test.clj
clojure
The use and distribution terms for this software are covered by the 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. e...
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. Eclipse Public License 1.0 ( ) (ns io.pedestal.http.ring-middlewares-test (:use io.pedestal.http.ring-middlewares clojure.test ring.middleware.session.store)) (defn valid-interceptor? [interceptor] (and (every? fn? (rem...
43695156f5d7ba969a56f524546cbc593f5817ffc0f8e05a5823f9feec0172b8
babashka/babashka
core_test.cljc
(ns com.rpl.specter.core-test #?(:cljs (:require-macros [cljs.test :refer [is deftest]] [clojure.test.check.clojure-test :refer [defspec]] [com.rpl.specter.cljs-test-helpers :refer [for-all+]] [com.rpl.specter.test-helpers :refer [ic-test]] [com.rpl.specter ...
null
https://raw.githubusercontent.com/babashka/babashka/7bfab370771869ef9ddd23405a29618b7c306786/test-resources/lib_tests/com/rpl/specter/core_test.cljc
clojure
TODO: test walk, codewalk max sizes prevent too much data from being generated and keeps test from taking forever only key k was touched in any of the maps TODO: there's a bug in clojurescript that won't allow Transformed lists are only guaranteed to impelment ISeq caching rebinds to the correct namespace since th...
(ns com.rpl.specter.core-test #?(:cljs (:require-macros [cljs.test :refer [is deftest]] [clojure.test.check.clojure-test :refer [defspec]] [com.rpl.specter.cljs-test-helpers :refer [for-all+]] [com.rpl.specter.test-helpers :refer [ic-test]] [com.rpl.specter ...
17e65f12eeb156b471ad4de116629ab5b859b72fcec0cffac4e51f4e7a84fd89
ardumont/haskell-lab
Parsers.hs
module Parsers where import Control.Monad import Data.Char(isDigit, isUpper, isLower, isAlpha, isAlphaNum, isSpace) newtype Parser a = P (String -> [(a,String)]) parse :: Parser a -> String -> [(a,String)] parse (P p) inp = p inp instance Monad Parser where -- ...
null
https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/Parsers.hs
haskell
return parser: always succeeds by returning the result value v without consuming the input bind fail choice basic parsers return [(1,"input-string-without-consuming")] fail failure parser: always fails whatever the input *Parsers> Parsers.fail "input" [] parser char: fails if the input is empty, otherwise,...
module Parsers where import Control.Monad import Data.Char(isDigit, isUpper, isLower, isAlpha, isAlphaNum, isSpace) newtype Parser a = P (String -> [(a,String)]) parse :: Parser a -> String -> [(a,String)] parse (P p) inp = p inp instance Monad Parser where r...
fef3c38e0e4239f3987d78772a0c293a7ca815be319ee85f886948f4407a05d7
Voronar/jsoo-async-await
browser.ml
open Js_of_ocaml module Global = struct let console_log arg: unit = Js.Unsafe.fun_call ( Js.Unsafe.js_expr "console.log") [|Js.Unsafe.inject arg|] let setInterval fn d = Dom_html.window##setInterval (Js.Unsafe.callback fn) d let setTimeout fn d = Dom_html.window##setTimeout (Js.Unsafe.callback fn) d end
null
https://raw.githubusercontent.com/Voronar/jsoo-async-await/20aa4a9fd97514c37873c8066840715ad1a60103/browser.ml
ocaml
open Js_of_ocaml module Global = struct let console_log arg: unit = Js.Unsafe.fun_call ( Js.Unsafe.js_expr "console.log") [|Js.Unsafe.inject arg|] let setInterval fn d = Dom_html.window##setInterval (Js.Unsafe.callback fn) d let setTimeout fn d = Dom_html.window##setTimeout (Js.Unsafe.callback fn) d end
63b6e18d976ab2adb0aa69d23685825884aceb23e379767c4094fc49399b13da
coccinelle/coccinelle
option.mli
type 'a t = 'a option = | None | Some of 'a val none : 'a option val some : 'a -> 'a option val value : 'a option -> default:'a -> 'a val get : 'a option -> 'a val bind : 'a option -> ('a -> 'b option) -> 'b option val join : 'a option option -> 'a option val map : ('a -> 'b) -> 'a option -> 'b option val fold : ...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.11/option.mli
ocaml
type 'a t = 'a option = | None | Some of 'a val none : 'a option val some : 'a -> 'a option val value : 'a option -> default:'a -> 'a val get : 'a option -> 'a val bind : 'a option -> ('a -> 'b option) -> 'b option val join : 'a option option -> 'a option val map : ('a -> 'b) -> 'a option -> 'b option val fold : ...
3629fb9927c5848d3bb8fce8ed1e59f3d86a045d03c1deecbf73d0dd55c82126
sthilaid/space-invaders
font.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; filename: font.scm ;; ;; description: Runtime libraries for fonts. Contains functions ;; related either to the font loading/generation or usage. Some ;; function are thus generated by the macros in font-macro.scm and ;; should not be ...
null
https://raw.githubusercontent.com/sthilaid/space-invaders/42baab45e3f477c630f782cd93d2d1f0b3f00bf6/font.scm
scheme
filename: font.scm description: Runtime libraries for fonts. Contains functions related either to the font loading/generation or usage. Some function are thus generated by the macros in font-macro.scm and should not be used by a user. The "exported" functions are marked in the last section of this file Fo...
author : (include "scm-lib-macro.scm") (define (test char w h) (for y 0 (< y h) (for x 0 (< x w) (let ((p (list-ref char (+ (* y w) x)))) (if (> (apply + p) 0) (display "x") (display "_")) (if (= x (- w 1)) (newline)))))) (define (get-char pixels-vector x y...
0e9ef534afcdb1d246811602617381354b49084f0fec74d8f36f4498c4d591f4
clash-lang/clash-compiler
PortNamesWithSingletonVector.hs
module PortNamesWithSingletonVector where import qualified Prelude as P import Data.List (isInfixOf) import System.Environment (getArgs) import System.FilePath ((</>), takeDirectory) import Clash.Prelude import Clash.Explicit.Testbench # ANN topEntity ( Synthesize { t_name = " PortNamesWithSingletonVe...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/5968d8d414330652b2a54529fd68b3effa05324d/tests/shouldwork/TopEntity/PortNamesWithSingletonVector.hs
haskell
File content test
module PortNamesWithSingletonVector where import qualified Prelude as P import Data.List (isInfixOf) import System.Environment (getArgs) import System.FilePath ((</>), takeDirectory) import Clash.Prelude import Clash.Explicit.Testbench # ANN topEntity ( Synthesize { t_name = " PortNamesWithSingletonVe...
53db31f5b0e6f0d0b81ed3d39afda4d4d63a8f0ceb311393b6a80e5bec4cd9b2
SOwens/example-compiler
blockStructure.mli
* Example compiler * Copyright ( C ) 2015 - 2017 * * 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 option ) any ...
null
https://raw.githubusercontent.com/SOwens/example-compiler/b155e89c7d9d0ae6ec671ae9cb4356c78dda7ab7/src/blockStructure.mli
ocaml
* Example compiler * Copyright ( C ) 2015 - 2017 * * 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 option ) any ...
8d9e5af254fd3a3709ad893110bf90060adc7827c6da9c0445ef3034bca1c26a
ghc/packages-Cabal
setup.test.hs
import Test.Cabal.Prelude -- Test that setup can choose flags to disable building a component when that -- component's dependencies are unavailable. The build should succeed without -- requiring the component's dependencies or imports. main = setupAndCabalTest $ do r <- setup' "configure" ["-v"] assertOutputCon...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/BuildableField/setup.test.hs
haskell
Test that setup can choose flags to disable building a component when that component's dependencies are unavailable. The build should succeed without requiring the component's dependencies or imports.
import Test.Cabal.Prelude main = setupAndCabalTest $ do r <- setup' "configure" ["-v"] assertOutputContains "Flags chosen: build-exe=False" r setup "build" []
70cc096f5272fe152f99b53bf0c0733b31fcaf7867eec5d2e30c024c9617c91c
braveclojure/babooka
hello.clj
(require '[clojure.string :as str]) (str/join " " ["Hello" "inner" "world!"])
null
https://raw.githubusercontent.com/braveclojure/babooka/d0755a23a744ed148b4a56259e07c4ae7f36da2b/src/hello.clj
clojure
(require '[clojure.string :as str]) (str/join " " ["Hello" "inner" "world!"])
8b52d9265292cc30470126b2adcc2e9963908dadd4e5c8d0cfc97bbafc51ce09
garycrawford/lein-life
core.clj
(ns {{ns-name}}.integration.controllers.home.core (:require [midje.sweet :refer [fact facts anything => against-background]] [com.stuartsierra.component :as component] [kerodon.core :refer :all] [kerodon.test :refer :all] [{{ns-name}}.components.jetty.lifecycle :refer [...
null
https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/site/mongodb/test/integration/controllers/home/core.clj
clojure
(ns {{ns-name}}.integration.controllers.home.core (:require [midje.sweet :refer [fact facts anything => against-background]] [com.stuartsierra.component :as component] [kerodon.core :refer :all] [kerodon.test :refer :all] [{{ns-name}}.components.jetty.lifecycle :refer [...
c50f878072c8b3868c7a6b021fc383294ecc4157fd95f32fa5c30b612a139d50
wdebeaum/DeepSemLex
teaseed.lisp
;;;; ;;;; (define-words :pos W::n :words ( (W::TEASEED (senses ((LF-PARENT ONT::NUTS-SEEDS) (TEMPL MASS-PRED-TEMPL) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/teaseed.lisp
lisp
(define-words :pos W::n :words ( (W::TEASEED (senses ((LF-PARENT ONT::NUTS-SEEDS) (TEMPL MASS-PRED-TEMPL) ) ) ) ))
0e8b3c562798c3f5119e9873cc040012d560ca8f5b288b8b1299964f1f8dae80
careercup/CtCI-6th-Edition-Clojure
persistent_stack_test.clj
(ns ^{:author "Leeor Engel"} data-structures.persistent-stack-test (:require [clojure.test :refer :all] [data-structures.stack :refer :all] [data-structures.persistent-stack :refer :all])) (deftest stacks-test (testing "1-2 nodes" (is (not (stack-empty? (create-stack 5)))) (let [...
null
https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/data_structures/persistent_stack_test.clj
clojure
(ns ^{:author "Leeor Engel"} data-structures.persistent-stack-test (:require [clojure.test :refer :all] [data-structures.stack :refer :all] [data-structures.persistent-stack :refer :all])) (deftest stacks-test (testing "1-2 nodes" (is (not (stack-empty? (create-stack 5)))) (let [...
9edcd21c91ff9940f076eb94a64332ce1fa9620505d57b2a43bb1fe4a2c67cb4
msdevanms/emqttd_plugin_kafka_bridge
emqttd_plugin_kafka_bridge_app.erl
%%%----------------------------------------------------------------------------- Copyright ( c ) 2016 Rui< > , 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...
null
https://raw.githubusercontent.com/msdevanms/emqttd_plugin_kafka_bridge/f5805d565c2c9624134178959f02f35d46d6da37/src/emqttd_plugin_kafka_bridge_app.erl
erlang
----------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnishe...
Copyright ( c ) 2016 Rui< > , All Rights Reserved . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF AN...
b18cda06ae553414d656fb4e51b1299aae3c3a72f2605473f6d068b47405ef7b
fetburner/Coq2SML
printer.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/parsing/printer.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Names ...
05a2864bed9fc1a92e816bde3351380ea2a0ad297382a93fd90a56826d2342fc
zellige/zellige
Geography.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} # OPTIONS_GHC -fno - warn - orphans # module Data.Geometry.Types.Geography where import qualified...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/src/Data/Geometry/Types/Geography.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # module Data.Geometry.Types.Geography where import qualified Data.Aeson as Aeson import qualified Data.Aeson.Type...
1d6e3c9ebb8a4e2ebc037344d20b86610bb74e7fedb7bcbe99c900b5e2b715bc
wargrey/w3s
xml.rkt
#lang typed/racket/base (require sgml/xml) (require racket/pretty) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (module+ main (pretty-print-columns 160) (global-port-print-handler pretty-print) (for/list : (Listof Any) ([file.xml (in-vector (current-comma...
null
https://raw.githubusercontent.com/wargrey/w3s/a4de493e362b622a5060a791b128f114762d2c57/sgml/tamer/xml.rkt
racket
#lang typed/racket/base (require sgml/xml) (require racket/pretty) (module+ main (pretty-print-columns 160) (global-port-print-handler pretty-print) (for/list : (Listof Any) ([file.xml (in-vector (current-command-line-arguments))]) (xml-document-normalize (read-xml-document file.xml))))
6730b47da64cf1bde4352f8795678fa515c39188faa245d5fdf532f922cedd38
TorXakis/TorXakis
LPEDeterminism.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and University of Twente See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and University of Twente See LICENSE at root directory of this repository. -} -----------------------------------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/lpeops/src/core/LPEDeterminism.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental --------------------------------------------------------------------------- getDeterminizableSummandPair, areSummandsDeterminizable import qualified Data.List as List im...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and University of Twente See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and University of Twente See LICENSE at root directory of this repository. -} Module : Copyright ...
37a1e7e9ba0829289c392a0e7e3e8446ae70ea7e687d155b00f92b81a9a6f8b1
GaloisInc/parameterized-utils
SymbolRepr.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # module Test.SymbolRepr ( symbolTests ) where import Test.Tasty import Test.Tasty.HUnit ( (@=?), testCase ) import Data.Parameterized.SymbolRepr import GHC.TypeLits data Bird (name :: Symbol) wh...
null
https://raw.githubusercontent.com/GaloisInc/parameterized-utils/b2e9cc34a58e5931cf14beca2c5bc28f343cf966/test/Test/SymbolRepr.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # module Test.SymbolRepr ( symbolTests ) where import Test.Tasty import Test.Tasty.HUnit ( (@=?), testCase ) import Data.Parameterized.SymbolRepr import GHC.TypeLits data Bird (name :: Symbol) where Jay :: String -> ...
bedcca51780982eeaf77f264f71193be392720ec331d0c6a077561db2ae858c4
gas2serra/cldk
demodemo.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLIM-DEMO; -*- ;;; -------------------------------------------------------------------------------------- ;;; Title: The demo demo Created : 2002 - 02 - 11 Author : < > ;;; License: LGPL (See file COPYING for details). ;;; -----------------------------...
null
https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/Examples/demodemo.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: CLIM-DEMO; -*- -------------------------------------------------------------------------------------- Title: The demo demo License: LGPL (See file COPYING for details). -------------------------------------------------------------------------------------- This l...
Created : 2002 - 02 - 11 Author : < > ( c ) copyright 2002 by modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library Ge...
6e87d2a4b85c2f9d2e8f801035f2a3503768ee7e48620935f207885db5dbad3f
wilkerlucio/pathom
github_demo.cljs
(ns com.wsscode.pathom.workspaces.graphql.github-demo (:require [com.wsscode.common.async-cljs :refer [go-promise let-chan <!p go-catch <? <?maybe]] [com.wsscode.pathom.book.util.local-storage :as ls] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom.connect.graphql2 :as pcg] [com.wsscode.pa...
null
https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/docs-src/modules/ROOT/examples/com/wsscode/pathom/workspaces/graphql/github_demo.cljs
clojure
setup the fulcro card to use in workspaces creates a parser view using pathom viz to explore the graph in workspaces after github schema is ready we request the editor to update the index so the UI make it available right away
(ns com.wsscode.pathom.workspaces.graphql.github-demo (:require [com.wsscode.common.async-cljs :refer [go-promise let-chan <!p go-catch <? <?maybe]] [com.wsscode.pathom.book.util.local-storage :as ls] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom.connect.graphql2 :as pcg] [com.wsscode.pa...
f7dbc3fe009c787e9597aa35549eb0db9222842e7456a94c6680dc1daab4d037
macourtney/Conjure
plugin.clj
(ns conjure.script.plugin (:require [conjure.server.server :as server] [conjure.plugin.util :as plugin-util])) (defn print-usage [] (println "Usage: lein conjure plugin <install|uninstall> <plugin name> <arguments>")) (defn print-unknown-plugin [plugin-name] (println (str "Could not find plugin wit...
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_core/src/conjure/script/plugin.clj
clojure
(ns conjure.script.plugin (:require [conjure.server.server :as server] [conjure.plugin.util :as plugin-util])) (defn print-usage [] (println "Usage: lein conjure plugin <install|uninstall> <plugin name> <arguments>")) (defn print-unknown-plugin [plugin-name] (println (str "Could not find plugin wit...
06d2c2fa62e6e9401917e29be7c048f68cae9de8de1f8b4fff5df55abab62e53
delph-in/jacy
globals.lsp
Copyright ( c ) 1991 - -2004 , , , ; ;;; see `license' for conditions. ;;; ;;; Grammar specific globals file ;;; parameters only - grammar specific functions should go in user-fns.lsp (grammar-encoding 'utf-8) ;;; Types (in-package :lkb) (defparameter *toptype* '*top*) (defparameter *string-typ...
null
https://raw.githubusercontent.com/delph-in/jacy/87e7c05619c0df5fc2e71de478132d5698175137/lkb/globals.lsp
lisp
see `license' for conditions. Grammar specific globals file parameters only - grammar specific functions Types Lexical files (defparameter *orth-path* '(orth list)) (def-lkb-parameter *empty-list-type* 'null) (def-lkb-parameter *list-type* 'list) (def-lkb-parameter *diff-list-type* 'diff-list) (def-lkb-parame...
Copyright ( c ) 1991 - -2004 should go in user-fns.lsp (grammar-encoding 'utf-8) (in-package :lkb) (defparameter *toptype* '*top*) (defparameter *string-type* 'string "a special type name - any lisp strings are subtypes of it") Chart reduction code from Oe , 2002/20/25 (defparameter *chart-dependencies* ...
a4acaf3c5006e9ed53243bdc2c1d2eb9536aa8804f733bc0872fac7b764d0719
ArulselvanMadhavan/diffusers-ocaml
embeddings.ml
open Torch module TimestepEmbedding = struct type t = { linear_1 : Nn.t ; linear_2 : Nn.t } let make vs channel time_embed_dim = let linear_1 = Layer.linear Var_store.(vs / "linear_1") ~input_dim:channel time_embed_dim in let linear_2 = Layer.linear Var_store.(vs / "linear_2") ...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/diffusers-ocaml/01ca1689fb1cb4df14cfc5e3bf03b3ec833296db/lib/models/embeddings.ml
ocaml
open Torch module TimestepEmbedding = struct type t = { linear_1 : Nn.t ; linear_2 : Nn.t } let make vs channel time_embed_dim = let linear_1 = Layer.linear Var_store.(vs / "linear_1") ~input_dim:channel time_embed_dim in let linear_2 = Layer.linear Var_store.(vs / "linear_2") ...
7c16c0a1c7c57569c65ef6d7a5452ca0d4e665174e8df86dd0fba39473751a2f
synduce/Synduce
most_frequent_partial.ml
(* Non-empty lists type. *) type list = | Elt of int | Cons of int * list (* Inductive type for positive integers. *) type pos = | One | S of pos (* A binary search tree with integer keys and positive natural numbers as values. *) type bst_map = | KeyValue of int * pos | Node of int * bst_map * bst_map l...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/unrealizable/most_frequent_partial.ml
ocaml
Non-empty lists type. Inductive type for positive integers. A binary search tree with integer keys and positive natural numbers as values. Return most frequent element with its count.
type list = | Elt of int | Cons of int * list type pos = | One | S of pos type bst_map = | KeyValue of int * pos | Node of int * bst_map * bst_map let rec min_key = function | KeyValue (k, v) -> k | Node (a, l, r) -> min (min_key l) (min_key r) ;; let rec max_key = function | KeyValue (k, v) -> k ...
d3896d94e5ffd5f18232c34e63424938081c98b42e24e3a65100ee998b72e347
DataHaskell/dh-core
Instances.hs
{-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wno - orphans # module Streaming.Instances () where import Streaming (Stream, lift) import Data.Attoparsec.ByteString.Streaming (Errors) import Control.Monad.Catch (MonadThrow(throwM), Exception) instance (Functor f, MonadThrow m) => ...
null
https://raw.githubusercontent.com/DataHaskell/dh-core/2beb8740f27fa9683db70eb8d8424ee6c75d3e91/datasets/src/Streaming/Instances.hs
haskell
# LANGUAGE TypeSynonymInstances #
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wno - orphans # module Streaming.Instances () where import Streaming (Stream, lift) import Data.Attoparsec.ByteString.Streaming (Errors) import Control.Monad.Catch (MonadThrow(throwM), Exception) instance (Functor f, MonadThrow m) => MonadThrow (Stream f m) where throwM...
50fa000d00a7feddc19d5c62ecb5948e5334894bef35503b19cc9a683a78d4e0
ocaml-multicore/tezos
tx_rollup_inbox_repr.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Marigold < > Copyright ( c ) 2...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Marigold < > Copyright ( c ) 2022 Nomadic Labs < > Copyright ( c ) 2022 Oxhead Alpha < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to w...
87907df7ec1cca1e4c16f350ac8e9bb1a9c9cbfafbd02ffc59520ed9ed9a9c15
hidaris/thinking-dumps
chap6.rkt
#lang racket (require "mk.rkt") The Fun Never Ends ... ;;; Here is an unusual definition. (define anyo (lambda (g) (conde (g succeed) (else (anyo g))))) ;;; Here is another definition. (define nevero (anyo fail)) ( run 1 ( q ) ;; nevero ;; (== #t q)) ;; has no value (run 1 (q) fail n...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/the-little-series/the-reasoned-schemer/chap6.rkt
racket
Here is an unusual definition. Here is another definition. nevero (== #t q)) has no value => '() => '(#t) (run* (q) alwayso (== #t q)) has no value. => '(#t #t #t #t #t) => '(#t #t #t #t #t) succeeds at least once. => '(#t) => '(#t) (run* (q) (salo nevero) (== #t q)) It has no value. ...
#lang racket (require "mk.rkt") The Fun Never Ends ... (define anyo (lambda (g) (conde (g succeed) (else (anyo g))))) (define nevero (anyo fail)) ( run 1 ( q ) (run 1 (q) fail nevero) (define alwayso (anyo succeed)) (run 1 (q) alwayso (== #t q)) (run 5 (q) alwayso (== #t q)...
5e777dd8daf4521641e6f23582d84c0f87785a947135cbcf8578ed2a61bc069b
expipiplus1/vulkan
VK_EXT_image_drm_format_modifier.hs
{-# language CPP #-} -- | = Name -- -- VK_EXT_image_drm_format_modifier - device extension -- -- == VK_EXT_image_drm_format_modifier -- -- [__Name String__] -- @VK_EXT_image_drm_format_modifier@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 159 -- -- [__Revision__]...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_EXT_image_drm_format_modifier.hs
haskell
# language CPP # | = Name VK_EXT_image_drm_format_modifier - device extension == VK_EXT_image_drm_format_modifier [__Name String__] @VK_EXT_image_drm_format_modifier@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] ...
159 2 - Requires support for Vulkan 1.0 - 2021 - 09 - 30 - , Google - , Google - , Google - , NVIDIA - , Intel - , ARM - , Google - , ARM images , enabling Vulkan to better integrate with the...
fca339f05d0e371bf520a2deeaca251d5e6b889107a42ee1f0603133d8b90107
mpacula/Scheme-Power-Tools
scheme-tools.scm
Copyright ( c ) 2010 - 2011 , Maciej Pacula & contributors ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; * Redistributions of source code must retain the above copyright ;; no...
null
https://raw.githubusercontent.com/mpacula/Scheme-Power-Tools/e2d27fb03d9aa4f47173bd5abcc83fa27c7cb3ee/scheme-tools.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redist...
Copyright ( c ) 2010 - 2011 , Maciej Pacula & contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ON ANY THEORY OF L...
ba9b980eb980263ad2541807ca7c78876a7c3e658519cbb3a52c7ebc3c49e271
binsec/haunted
kernel_functions.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/kernel/kernel_functions.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
36a559ecccfaf14753b0f1497638a75efb89c765ef2fda20de670bcdc1444657
racket/gui
showkey.rkt
#lang racket/base (require racket/gui/base racket/class racket/cmdline) (command-line #:once-each [("--option") "set special Option key" (special-option-key #t)] [("--control") "set special Control key" (special-control-key #t)] [("--altgr") "set any Control+Alt as AltGr" (any-control+alt-i...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/tests/gracket/showkey.rkt
racket
#lang racket/base (require racket/gui/base racket/class racket/cmdline) (command-line #:once-each [("--option") "set special Option key" (special-option-key #t)] [("--control") "set special Control key" (special-control-key #t)] [("--altgr") "set any Control+Alt as AltGr" (any-control+alt-i...
96ec8097d9b093875be7c93337380877e91898486fc6d1b4e48762a90393a1dd
timbertson/vdoml
test_util.ml
open Js_of_ocaml include Sexplib.Conv module Init = struct let init () = () end open Vdoml Ui_.make provides access to internals compared to Vdoml . Ui module Ui = Ui_.Make(Diff_.No_hooks) module Diff = Diff_.Make(Diff_.No_hooks) let force_opt = Diff.force_opt let run_component component fn = let container = Dom_h...
null
https://raw.githubusercontent.com/timbertson/vdoml/fcbf81e89df989206bdad4a92327e593078525b2/test/test_util.ml
ocaml
XXX sholdn't this be provided by ppx_compare???
open Js_of_ocaml include Sexplib.Conv module Init = struct let init () = () end open Vdoml Ui_.make provides access to internals compared to Vdoml . Ui module Ui = Ui_.Make(Diff_.No_hooks) module Diff = Diff_.Make(Diff_.No_hooks) let force_opt = Diff.force_opt let run_component component fn = let container = Dom_h...
a2a21f2e68b693ffb4f77cfba0027c81bd62eb6449d66a4b8b40af07cc69d4b1
jacekschae/learn-reitit-course-files
handlers.clj
(ns cheffy.account.handlers (:require [ring.util.response :as rr] [cheffy.account.db :as account-db] [clj-http.client :as http] [cheffy.auth0 :as auth0] [muuntaja.core :as m])) (defn create-account! [db] (fn [request] (let [{:keys [sub name picture]} (-> reques...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/46-account-tests/src/cheffy/account/handlers.clj
clojure
(ns cheffy.account.handlers (:require [ring.util.response :as rr] [cheffy.account.db :as account-db] [clj-http.client :as http] [cheffy.auth0 :as auth0] [muuntaja.core :as m])) (defn create-account! [db] (fn [request] (let [{:keys [sub name picture]} (-> reques...
e6b012311720cb39d9eb2262920f9ee9ef3728a3f5ef5270125e7cd94a1ebd81
pallet/pallet
execute.clj
(ns pallet.echo.execute "Action execution that just echos the action script" (:require [clojure.tools.logging :as logging])) (defn echo-bash "Echo a bash action. Do not execute." [session script] (logging/tracef "echo-bash %s" script) [script session]) (defn echo-clojure "Echo a clojure action (which...
null
https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/echo/execute.clj
clojure
(ns pallet.echo.execute "Action execution that just echos the action script" (:require [clojure.tools.logging :as logging])) (defn echo-bash "Echo a bash action. Do not execute." [session script] (logging/tracef "echo-bash %s" script) [script session]) (defn echo-clojure "Echo a clojure action (which...
73289fc739b96d0a3cc5f85fc3c722911cdce304b9dbc787454d62e49e6f8b91
janestreet/hardcaml_circuits
bench_rac.ml
open! Import let%bench_fun "rac 4 coefs" = let module Config = struct let mode = Rac.Mode.Fixed let accumulator_bits = 20 let data_bits = 8 let num_coefs = 4 let rom_shift = 6 end in let module Rac = Hardcaml_circuits_test.Test_integer_rac.Make(Config) in let open Rac in let simulator = ...
null
https://raw.githubusercontent.com/janestreet/hardcaml_circuits/a2c2d1ea3e6957c3cda4767d519e94c20f1172b2/bench/bench_rac.ml
ocaml
open! Import let%bench_fun "rac 4 coefs" = let module Config = struct let mode = Rac.Mode.Fixed let accumulator_bits = 20 let data_bits = 8 let num_coefs = 4 let rom_shift = 6 end in let module Rac = Hardcaml_circuits_test.Test_integer_rac.Make(Config) in let open Rac in let simulator = ...
f7a0f6a142efca455b0cb131e6b525bff7e9526fb91d8996276245e20eb7e618
typeable/generic-arbitrary
ParametersTest.hs
{-# OPTIONS_GHC -fdefer-type-errors #-} {-# OPTIONS_GHC -Wno-deferred-type-errors #-} module ParametersTest where import Auxiliary import Control.DeepSeq import GHC.Generics (Generic) import Test.QuickCheck import Test.QuickCheck.Arbitrary.Generic...
null
https://raw.githubusercontent.com/typeable/generic-arbitrary/107426a603375b9326ce1f3d312afe6f4d9c5f2f/test/ParametersTest.hs
haskell
# OPTIONS_GHC -fdefer-type-errors # # OPTIONS_GHC -Wno-deferred-type-errors #
module ParametersTest where import Auxiliary import Control.DeepSeq import GHC.Generics (Generic) import Test.QuickCheck import Test.QuickCheck.Arbitrary.Generic data A a = A a deriving (Eq, Ord, Show) deriving anyclass NFData deriving (Gen...
66d73e29c1793a81cdd05669881fa61dda74ae6e0cf059d7f4bda318cb8a2a44
boomerang-lang/boomerang
rx.mli
Unison file synchronizer : src / ubase / rx.mli Copyright 1999 - 2007 ( see COPYING for details ) type t regular expression val rx : string -> t (* File globbing *) val glob : string -> t val glob' : bool -> string -> t (* Same, but allows to choose whether dots at the beginning of a file name need t...
null
https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/ubase/rx.mli
ocaml
File globbing Same, but allows to choose whether dots at the beginning of a file name need to be explicitly matched (true) or not (false) String expression (literal match) Alternative Sequence Match nothing Empty word Repeated matches 0 or more matches Beginning of line End of line Any char...
Unison file synchronizer : src / ubase / rx.mli Copyright 1999 - 2007 ( see COPYING for details ) type t regular expression val rx : string -> t val glob : string -> t val glob' : bool -> string -> t val globx : string -> t val globx' : bool -> string -> t These two functions also recognize the pattern { .....
833b8ebd0b110200326cad023ff96d8179721bac548c7afac1ff2f690a18e23d
sicmutils/sicmutils
rigid_rotation_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.examples.rigid-rotation-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [deftest is use-fixtures]] [sicmutils.env :as e :refer [up]] [sicmutils.examples.rigid-rotation :as rigid-rotation] [sicmutils.mecha...
null
https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/test/sicmutils/examples/rigid_rotation_test.cljc
clojure
this test is :long because of the simplification. Remove this tag when we fix that. Admittedly, I haven't checked this yet.
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.examples.rigid-rotation-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [deftest is use-fixtures]] [sicmutils.env :as e :refer [up]] [sicmutils.examples.rigid-rotation :as rigid-rotation] [sicmutils.mecha...
1b20957031568d0745d15f2358b390366f18470362dddf42192a41a53c100f10
minio/minio-hs
Errors.hs
-- MinIO Haskell SDK , ( C ) 2017 - 2019 MinIO , Inc. -- 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/minio/minio-hs/bdac380c77a699e640c411dd04d99acff5bdd646/src/Network/Minio/Errors.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
MinIO Haskell SDK , ( C ) 2017 - 2019 MinIO , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Network.Minio.Errors ( MErrV (..), ServiceErr (..), MinioErr (..), toServiceErr, ) where import Con...
932b9d20c12118767fa417660df49e9b905433d75e843733ed73dc844c7877e6
agajews/soup-lang
Parse.hs
# LANGUAGE FlexibleContexts # module Soup.Parse ( parse, ) where import Soup.Debugger import Soup.Env import Soup.Eval import Soup.Value import Control.Monad.Except extractParsing :: Value -> [Value] -> Value -> Eval [Value] extractParsing _ _ (ListVal l) = return l extractParsing r args _ = throwError $...
null
https://raw.githubusercontent.com/agajews/soup-lang/1c926f5853fe18244e33f0f90830db49f7fb827e/Soup/Parse.hs
haskell
# LANGUAGE FlexibleContexts # module Soup.Parse ( parse, ) where import Soup.Debugger import Soup.Env import Soup.Eval import Soup.Value import Control.Monad.Except extractParsing :: Value -> [Value] -> Value -> Eval [Value] extractParsing _ _ (ListVal l) = return l extractParsing r args _ = throwError $...
420e1b48caadc73e2486e3aef301322f1dcb0976fbf6341630e5c19c0d69bf47
tek/ribosome
Reports.hs
-- |Interpreters for 'Reports'. module Ribosome.Host.Interpreter.Reports where import Conc (interpretAtomic) import qualified Data.Map.Strict as Map import Polysemy.Chronos (ChronosTime) import Ribosome.Host.Data.Report (ReportContext) import qualified Ribosome.Host.Data.StoredReport as StoredReport import Ribosome.H...
null
https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/host/lib/Ribosome/Host/Interpreter/Reports.hs
haskell
|Interpreters for 'Reports'.
module Ribosome.Host.Interpreter.Reports where import Conc (interpretAtomic) import qualified Data.Map.Strict as Map import Polysemy.Chronos (ChronosTime) import Ribosome.Host.Data.Report (ReportContext) import qualified Ribosome.Host.Data.StoredReport as StoredReport import Ribosome.Host.Data.StoredReport (StoredRep...
20107a28fbd78eaed62e5d4e124c90601401679f7791de8c9bbbb7cb6bc67367
rjnw/sham
sequence.rkt
#lang sham/cryptol #:compile-with sham (test str2 (== "ab" [#x61 #x62])) (test str11 (== ["a"] ["a"])) (test str3 (== "abc" [#x61 #x62 #x63])) (test ss1 (== [["a"] ["b"] ["c"]] [["a"] ["b"] ["c"]])) (def [const1 : {a} a -> [1 a]] [const1 v = [v]]) (test c1-bit (== (const1 (: 42 [64])) [42])) (test c1-bit-fail (...
null
https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-examples/sham/cryptol/tests/sequence.rkt
racket
#lang sham/cryptol #:compile-with sham (test str2 (== "ab" [#x61 #x62])) (test str11 (== ["a"] ["a"])) (test str3 (== "abc" [#x61 #x62 #x63])) (test ss1 (== [["a"] ["b"] ["c"]] [["a"] ["b"] ["c"]])) (def [const1 : {a} a -> [1 a]] [const1 v = [v]]) (test c1-bit (== (const1 (: 42 [64])) [42])) (test c1-bit-fail (...
4cb0285730e2ac96f0e6e236b3fde69b847f6d9e08e534e5631b96e381193c76
racket/data
heap.rkt
#lang racket (require rackunit data/heap (submod data/heap test-util)) ;; Check growth rate of the vectors (for ([n (in-range 10000)]) (check <= n (fittest-block-size n)) (check <= (fittest-block-size n) (max MIN-SIZE (* 2 n)))) (define (mkheap) (vector->heap <= (vector 6 2 4 10 8))) (test-equa...
null
https://raw.githubusercontent.com/racket/data/1fe6cb389ad9a817c6abaff2d8f5ef407b5a16a2/data-test/tests/data/heap.rkt
racket
Check growth rate of the vectors does not exist remove once remove twice mutated check equal (non-destructive) test case from PR14651 -1612 out of position simpler test case from PR14651
#lang racket (require rackunit data/heap (submod data/heap test-util)) (for ([n (in-range 10000)]) (check <= n (fittest-block-size n)) (check <= (fittest-block-size n) (max MIN-SIZE (* 2 n)))) (define (mkheap) (vector->heap <= (vector 6 2 4 10 8))) (test-equal? "heap->vector" (heap->vector (m...
726afa3c8f50125ed4ba277662300d55d1ef31d4a71067b8f920f6094ad1bf59
GaloisInc/grift
Coverage.hs
This file is part of GRIFT ( ) . GRIFT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . GRIFT is distributed in the ...
null
https://raw.githubusercontent.com/GaloisInc/grift/5c2750d699ac873d130cc96f8e9ca1c0196d99ea/grift/src/GRIFT/Coverage.hs
haskell
# LANGUAGE TypeOperators # With each opcode , we associate a collection of " test expressions , " With each opcode, we associate a collection of "test expressions," R type I type S type B type U type J type P type X type
This file is part of GRIFT ( ) . GRIFT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . GRIFT is distributed in the ...
6d9cfcd0635fed2cb523f18a8eef0518083fe25f1f0b3679ab0f8e34b7515a5d
agentm/project-m36
StaticOptimizer.hs
import ProjectM36.Base import ProjectM36.Relation import ProjectM36.TransactionGraph import ProjectM36.DateExamples import ProjectM36.TupleSet import ProjectM36.StaticOptimizer import ProjectM36.DatabaseContext as DBC import System.Exit import Control.Monad.State import Test.HUnit import qualified Data.Set as S main :...
null
https://raw.githubusercontent.com/agentm/project-m36/0fa5b3755663feb904eba782c84f95ce5a9d21d7/test/Relation/StaticOptimizer.hs
haskell
(s join sp){s#,qty,p#} == sp (sp join s){s#,qty,p#} == sp --flip relvar names (sp join s){s#,qty,sname} != sp - attribute from s included (sp join s){qty} != sp --projection does not include foreign key attribute (sp join s){s#,qty} == sp - a subset of attributes in the projection are in the foreign key (s join p...
import ProjectM36.Base import ProjectM36.Relation import ProjectM36.TransactionGraph import ProjectM36.DateExamples import ProjectM36.TupleSet import ProjectM36.StaticOptimizer import ProjectM36.DatabaseContext as DBC import System.Exit import Control.Monad.State import Test.HUnit import qualified Data.Set as S main :...
807ec4b9ad12c8c9ffb65970706096d859743b445237bb4eceb08a22fbcefc08
llvm-hs/llvm-hs-typed
Example2.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE RecursiveDo # # LANGUAGE TypeOperators # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Example2 where import GHC.TypeLits import LLVM.Prelude import LLVM.AST.Constant import LLVM.AST.Tagged.Global import LLVM....
null
https://raw.githubusercontent.com/llvm-hs/llvm-hs-typed/efe052cf2a7ac8e6fb8dba1879d75d036f6fcc80/Example2.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE RecursiveDo # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Example2 where import GHC.TypeLits import LLVM.Prelude import LLVM.AST.Constant import LLVM.AST.Tagged.Global import LLVM.AST.Tagged.Tag import LLVM.AST.Type...
8f517d0e5634b7c25b23dc69ba8ab536854871ae49d96425df5546de84fbfa00
heroku/cowboyku
cowboyku_static.erl
Copyright ( c ) 2013 , < > Copyright ( c ) 2011 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS...
null
https://raw.githubusercontent.com/heroku/cowboyku/ba7120bdb119ac676909e51f0738bde1d4fdd4ee/src/cowboyku_static.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2013 , < > Copyright ( c ) 2011 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cowboyku_static). -...
4769a5f9488dcfe39280e5a090a6afd85f8d8aa35c6428f0be74c5123074a1af
fission-codes/fission
Whoami.hs
| command module Fission.CLI.Handler.User.Whoami (whoami) where import qualified Data.Yaml as YAML import qualified RIO.Text as Text import qualified Crypto.PubKey.Ed25519 as Ed25519 import Network.HTTP.Types.Status imp...
null
https://raw.githubusercontent.com/fission-codes/fission/7e69c0da210a77412c96631f5ff7ef1b38240d37/fission-cli/library/Fission/CLI/Handler/User/Whoami.hs
haskell
| The command to attach to the CLI tree
| command module Fission.CLI.Handler.User.Whoami (whoami) where import qualified Data.Yaml as YAML import qualified RIO.Text as Text import qualified Crypto.PubKey.Ed25519 as Ed25519 import Network.HTTP.Types.Status imp...
058990e63ab15328e9006e8aee88c27de4932c0bd1a698e7bb9e28b49e743f30
reactiveml/rml
rml_machine.ml
(**********************************************************************) (* *) (* ReactiveML *) (* *) (* ...
null
https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/interpreter/rml_machine.ml
ocaml
******************************************************************** ReactiveML ...
Copyright 2002 , 2007 . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with the special exception on linking - theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 ) - Verimag , CNRS Grenoble ( 2005 - 200...
652db17769e59251c7e340386ba2638ae34405320a2d4e255a8f99200dac3b92
yetibot/yetibot
classnamer.clj
(ns yetibot.commands.classnamer (:require [clojure.string :as s] [yetibot.core.hooks :refer [cmd-hook]] [yetibot.core.util.http :refer [fetch]])) (def endpoint "") (defn classnamer-cmd "classnamer # retrieves a legit OO class name" [_] (s/trim (fetch endpoint))) (cmd-hook #"classnamer" _ ...
null
https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/classnamer.clj
clojure
(ns yetibot.commands.classnamer (:require [clojure.string :as s] [yetibot.core.hooks :refer [cmd-hook]] [yetibot.core.util.http :refer [fetch]])) (def endpoint "") (defn classnamer-cmd "classnamer # retrieves a legit OO class name" [_] (s/trim (fetch endpoint))) (cmd-hook #"classnamer" _ ...
38e676500a812706b68adc92fc63cb9c64ff3f11ec2bc10d7f2e76b18c2fe98b
basho/riak_cs
riak_kv_fs2_backend.erl
%% ------------------------------------------------------------------- %% %% riak_fs2_backend: storage engine based on basic filesystem access %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); y...
null
https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_kv_fs2_backend.erl
erlang
------------------------------------------------------------------- riak_fs2_backend: storage engine based on basic filesystem access 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 impl...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
645237d97a67e99ea9e0b2e4b0ad04d621a86d66325a43a849b513e360fd2147
evaporei/hisp
Env.hs
module Env ( Env(..) , defaultEnv , addKeyToEnv , getExprOfEnv ) where import Data.Map (Map, fromList, lookup, insert) import qualified Control.Exception as Exc import System.IO.Unsafe (unsafePerformIO) import Expr (Expr(..)) import Err (Err(..)) data Env = Env { data' :: Map String Expr, out...
null
https://raw.githubusercontent.com/evaporei/hisp/7020720f9ff78cb84822649babcb6c21a64c2cea/src/Env.hs
haskell
adapted from: -checking-that-all-the-elements-of-a-big-list-are-the-same # ANN unsafeBoolCleanup "HLint: ignore Evaluate" # adapted from: -to-catch-and-ignore-a-call-to-the-error-function
module Env ( Env(..) , defaultEnv , addKeyToEnv , getExprOfEnv ) where import Data.Map (Map, fromList, lookup, insert) import qualified Control.Exception as Exc import System.IO.Unsafe (unsafePerformIO) import Expr (Expr(..)) import Err (Err(..)) data Env = Env { data' :: Map String Expr, out...
7db05d1f3e14155dc1988785e453e4b8e9ce45edbc374234d89fc1b67f73ac99
zed-throben/erlangeos
io_account.erl
- module('io_account'). - compile(export_all). start() -> Account = eos:new(eos@obj,[],[{balance , 0.0 },{deposit , fun (This,Arguments) ->[V|RestArguments] = Arguments, eos:set_slot(This,balance , eos:get_slot(This,balance) + V ) end },{show , fun (This,Arguments) -> eosstd:fmt("Account balance: ...
null
https://raw.githubusercontent.com/zed-throben/erlangeos/44e50e442f5d396c69ae90db530b0b60b01d692a/sample/io_account.erl
erlang
- module('io_account'). - compile(export_all). start() -> Account = eos:new(eos@obj,[],[{balance , 0.0 },{deposit , fun (This,Arguments) ->[V|RestArguments] = Arguments, eos:set_slot(This,balance , eos:get_slot(This,balance) + V ) end },{show , fun (This,Arguments) -> eosstd:fmt("Account balance: ...
220cb7c8612dbb928236afec8b7f0f59bf4c9f9583ab4ce42fc029da6ab1fc15
bitnomial/bitcoind-rpc
Framework.hs
# LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE NumericUnderscores # {-# LANGUAGE OverloadedStrings #-} module Bitcoin.Core.Regtest.Framework ( -- * Run an ephemeral regtest node Version, NodeHandle (..), portsInUse, runBitcoind, withBitcoind, peerWith, -- * Funding ...
null
https://raw.githubusercontent.com/bitnomial/bitcoind-rpc/c9c95b08c4adc479fba94e4e8a5bc5518dfb6a0f/bitcoind-regtest/src/Bitcoin/Core/Regtest/Framework.hs
haskell
# LANGUAGE OverloadedStrings # * Run an ephemeral regtest node * Funding * Internal wallet In the following lists, entries correspond to each other e.g. the p2pkh * Versions | Data needed to connect to a @bitcoind-regtest@ ephemeral node | Run an RPC computation with a node launched in this testing framework |...
# LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE NumericUnderscores # module Bitcoin.Core.Regtest.Framework ( Version, NodeHandle (..), portsInUse, runBitcoind, withBitcoind, peerWith, oneBitcoin, createOutput, generate, spendPackageOutputs, address for @keys ...
210f49a7a2839484f0d7b566bd206c0167fee2ce94f542fbfb708e7b776360d5
disteph/cdsat
tools.ml
open Interfaces_basic open Specs module FVSubst = struct open Variables type t = FreeVar.t DSubst.t [@@deriving eq,show,hash] let get_arity = DSubst.get_arity let get = DSubst.get FreeVar.pp end let fail_state = let add _ = failwith "Are you dumb? I already told you it was provable...
null
https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/top.mld/tools.ml
ocaml
open Interfaces_basic open Specs module FVSubst = struct open Variables type t = FreeVar.t DSubst.t [@@deriving eq,show,hash] let get_arity = DSubst.get_arity let get = DSubst.get FreeVar.pp end let fail_state = let add _ = failwith "Are you dumb? I already told you it was provable...
5d07d4f359f4a159c84694312e93204ba85fee757c8fd6b8fff383704dafebd6
mzp/coq-ruby
modops.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/kernel/modops.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i Various operations on modules a...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : modops.mli 10664 ...
d5a45074c107caa380b7368b06807f7834d5cd2e1bbb0e41fd5c1a21a444c5cf
mzp/coq-ide-for-ios
extraction.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/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/plugins/extraction/extraction.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : extraction.mli 1332...
10053f773634e31e88fe9c4f255b77955ffc792e99fcbe93f84c67c4181ec5bb
input-output-hk/ouroboros-network
Model.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} # LANGUAGE UndecidableInstances # -- | Model for the 'Immutabl...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/8ccbc43654479e9ba3d59676aeb96da533482266/ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ImmutableDB/Model.hs
haskell
# LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # | Model for the 'ImmutableDB'. * ImmutableDB implementation | This slot contains only a regular block | This slot contains only an EBB | This slot contains an EBB /and/ a regular ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE UndecidableInstances # module Test.Ouroboros.Storage.ImmutableDB.Model ( DBModel (..) , InSlot (..) , IteratorId , IteratorModel , closeAllIterators , dbmBlocks , dbmCurrentChunk , dbmT...
556f4e77e0998da4f7ade2167a4ae11a708909d0ffbfeb7e2a4d7cf662e8ef57
GaloisInc/saw-script
RME.hs
| Module : Data . RME Copyright : Galois , Inc. 2016 License : : Stability : experimental Portability : portable Reed - Muller Expansion normal form for Boolean Formulas . Module : Data.RME Copyright : Galois, Inc. 2016 License : BSD3 Maintainer : Stability : exper...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/fdb8987f09999439833d5cb573f69197bdf2cb7f/rme/src/Data/RME.hs
haskell
| Module : Data . RME Copyright : Galois , Inc. 2016 License : : Stability : experimental Portability : portable Reed - Muller Expansion normal form for Boolean Formulas . Module : Data.RME Copyright : Galois, Inc. 2016 License : BSD3 Maintainer : Stability : exper...
4cfe35e444d1c9de01c7551d4f7b26b6f786ce2aed65b0e5a032579bbdec1365
joyofclojure/book-source
a.clj
(ns joy.a "Source for the A* implementation in section 7.4") (def world [[ 1 1 1 1 1] [999 999 999 999 1] [ 1 1 1 1 1] [ 1 999 999 999 999] [ 1 1 1 1 1]]) (defn neighbors ([size yx] (neighbors [[-1 0] [1 0] [0 -1] [0 1]] size yx))...
null
https://raw.githubusercontent.com/joyofclojure/book-source/a2a0ba264c286639a510caf4909c81f40341eac2/src/clj/joy/a.clj
clojure
#: Check done #: Get next work item #: Clear from todo #: Get neighbors #: Calc least-cost #: Calc path so-far #: Check if new is worse #: Place new path in the routes #: Add the estimated path to the todo and recur
(ns joy.a "Source for the A* implementation in section 7.4") (def world [[ 1 1 1 1 1] [999 999 999 999 1] [ 1 1 1 1 1] [ 1 999 999 999 999] [ 1 1 1 1 1]]) (defn neighbors ([size yx] (neighbors [[-1 0] [1 0] [0 -1] [0 1]] size yx))...
57207364e6aa0f465064e59e53f34a430b4414719954495b48066c3778ea8bce
DaveWM/lobster-writer
interceptors.cljs
(ns lobster-writer.interceptors (:require [lobster-writer.constants :as constants])) (def persist-app-db (re-frame.core/->interceptor :id :persist-app-db :after (fn [context] (when-let [db (get-in context [:effects :db])] (js/localStorage.setItem constants/local-storage-app-...
null
https://raw.githubusercontent.com/DaveWM/lobster-writer/98eef942cc61725f0a2e00c34e6952c1e262f1ad/src/cljs/lobster_writer/interceptors.cljs
clojure
(ns lobster-writer.interceptors (:require [lobster-writer.constants :as constants])) (def persist-app-db (re-frame.core/->interceptor :id :persist-app-db :after (fn [context] (when-let [db (get-in context [:effects :db])] (js/localStorage.setItem constants/local-storage-app-...
6c6c2553e6060a3cc20361d999692208508067dce38e9ae5926c019a0b65f047
shriram/mystery-languages
semantics.rkt
#lang racket (require [for-syntax syntax/parse] mystery-languages/utils mystery-languages/common) (require [for-syntax racket]) (require [prefix-in lazy: lazy]) (provide [rename-out (lazy:#%module-begin #%module-begin) (lazy:#%top-interaction #%top-interaction) (lazy:#%datum #%datum) (lazy:#%top...
null
https://raw.githubusercontent.com/shriram/mystery-languages/fa9119af80c28dd4fd52f34633d8d987e873deff/eval-order/L2/semantics.rkt
racket
#lang racket (require [for-syntax syntax/parse] mystery-languages/utils mystery-languages/common) (require [for-syntax racket]) (require [prefix-in lazy: lazy]) (provide [rename-out (lazy:#%module-begin #%module-begin) (lazy:#%top-interaction #%top-interaction) (lazy:#%datum #%datum) (lazy:#%top...
2708f009c5b1e9d7076d1c0a5a004a378088742b388e63a14ea78211d9e892ab
finkel-lang/finkel
fnk01.hs
;;; -*- mode: finkel -*- (module Main) (:: main (IO ())) (= main (putStrLn "preprocess/fnk01.hs"))
null
https://raw.githubusercontent.com/finkel-lang/finkel/74ce4bb779805ad2b141098e29c633523318fa3e/finkel-kernel/test/data/preprocess/fnk01.hs
haskell
;;; -*- mode: finkel -*- (module Main) (:: main (IO ())) (= main (putStrLn "preprocess/fnk01.hs"))
8ba7d335899a48e51246fa7184a4a502eb8cb94d5da71e51451dc1ce2e0f9ac6
patricoferris/ocaml-multicore-monorepo
test_symmetric_runner.ml
open OUnit2 (* Gather quantum uncertainty. *) (* let () = *) let t = Unix.gettimeofday ( ) in let cs = Cstruct.create 8 in Cstruct . BE.set_uint64 cs 0 Int64.(of_float ( t * . 1000 . ) ) ; (* Mirage_crypto_rng.reseed cs *) let () = Format.printf "accel: %a\n%!" (fun ppf -> List.iter @@ fun x -> ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/tests/test_symmetric_runner.ml
ocaml
Gather quantum uncertainty. let () = Mirage_crypto_rng.reseed cs
open OUnit2 let t = Unix.gettimeofday ( ) in let cs = Cstruct.create 8 in Cstruct . BE.set_uint64 cs 0 Int64.(of_float ( t * . 1000 . ) ) ; let () = Format.printf "accel: %a\n%!" (fun ppf -> List.iter @@ fun x -> Format.fprintf ppf "%s " @@ match x with `XOR -> "XOR" | `AES -> "AES" ...
0110b99ea617ff33059a0daa99189a578c9c96fb2396b02ac003e6bd3dd9ced0
bollu/koans
lesson-2.hs
-- -the-ultimate.org/node/2229 -- -- / -- Free monads , Foldable Tardis / reverse state -- Operational monads Optics -- Witherable -- Comonads -- Comonads for coeffects? -- Bound monad for binding variables Omega for diagonalization -- Zippers -- Ornaments -- parsing using seminirs (conor's papers) -- Essence...
null
https://raw.githubusercontent.com/bollu/koans/0204e9bb5ef9c541fe161523acac3cacae5d07fe/intro-haskell/lesson-2.hs
haskell
-the-ultimate.org/node/2229 / Free monads Operational monads Witherable Comonads Comonads for coeffects? Bound monad for binding variables Zippers Ornaments parsing using seminirs (conor's papers) Essence of the iterator pattern Doc / a prettier printer Finger trees? QuickCheck | programming in hask...
, Foldable Tardis / reverse state Optics Omega for diagonalization Presburger arithmetic using automata rank / select / coselect adjunction MCMC ? Probabilistic
97896cd65b33586e93524bf3469a1ccd8ad6646186dcbde0d309dabc8b10b507
nvim-treesitter/nvim-treesitter
folds.scm
[ (if_condition) (foreach_loop) (while_loop) (function_def) (macro_def) (block_def) ] @fold
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/69388e84c34d40c3d5c7d2f310db13276f2179e1/queries/cmake/folds.scm
scheme
[ (if_condition) (foreach_loop) (while_loop) (function_def) (macro_def) (block_def) ] @fold
2a8ac2f35409a88d98213b34921b49565c727e593761dcd6eaf861aa80aacd20
quoll/asami
seqgraph_test.cljc
(ns asami.seqgraph-test (:require [asami.graph :refer [graph-add resolve-pattern count-pattern]] [asami.seqgraph :refer [empty-graph new-graph]] [schema.test :as st :refer [deftest] :refer-macros [deftest]] [clojure.test :as t :refer [testing is run-tests] :refer-macros [testing is run-tests]])) (t/us...
null
https://raw.githubusercontent.com/quoll/asami/15b1aa3112751c008ecc07cdce94874cd78f82d3/test/asami/seqgraph_test.cljc
clojure
(ns asami.seqgraph-test (:require [asami.graph :refer [graph-add resolve-pattern count-pattern]] [asami.seqgraph :refer [empty-graph new-graph]] [schema.test :as st :refer [deftest] :refer-macros [deftest]] [clojure.test :as t :refer [testing is run-tests] :refer-macros [testing is run-tests]])) (t/us...
d3b2620731a8bf5cf78ea48f0c3a6e65b24d5d39946880d8de88057f48182b5f
talex5/ocaml-wayland
unix_transport.mli
type t = < S.transport; close : unit Lwt.t; socket : Lwt_unix.file_descr > val of_socket : Lwt_unix.file_descr -> t val socket_path : ?wayland_display:string -> unit -> string * [ socket_path ( ) ] returns the path to the wayland socket to use . { ol { - If $ WAYLAND_DISPLAY is set then it returns t...
null
https://raw.githubusercontent.com/talex5/ocaml-wayland/f556831be56121ad05d5315dbcad757486d361f1/lib/unix_transport.mli
ocaml
type t = < S.transport; close : unit Lwt.t; socket : Lwt_unix.file_descr > val of_socket : Lwt_unix.file_descr -> t val socket_path : ?wayland_display:string -> unit -> string * [ socket_path ( ) ] returns the path to the wayland socket to use . { ol { - If $ WAYLAND_DISPLAY is set then it returns t...
e302012c33caa2afdb83f4acd456d9848eb1654f3e88f790c3c9a973f613d22e
danfran/cabal-macosx
Tests.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE CPP # module Distribution.MacOSX.Internal.Tests where import Prelude hiding (catch) import Test.HUnit (Assertion, assertEqual) import Test.Framework (Test, mutuallyExclusive, testGroup) import Test.Framework.Providers.HUnit (testCase) #if MIN_VERSION_Cabal(2,0,0) import D...
null
https://raw.githubusercontent.com/danfran/cabal-macosx/6714a7018ddcd71efd96044bd55c0e19fb690939/tests/Distribution/MacOSX/Internal/Tests.hs
haskell
# LANGUAGE OverloadedStrings # I should consider to use QuickCheck maybe... :)
# LANGUAGE CPP # module Distribution.MacOSX.Internal.Tests where import Prelude hiding (catch) import Test.HUnit (Assertion, assertEqual) import Test.Framework (Test, mutuallyExclusive, testGroup) import Test.Framework.Providers.HUnit (testCase) #if MIN_VERSION_Cabal(2,0,0) import Distribution.Types.ExecutableScope #...
d120311829072fb3ba067b3c6f7ee0a79fa31fc6906864543e5fbce243186f8d
ocurrent/solver-service
solver_worker.ml
(* Workers that can also solve opam jobs *) open Lwt.Syntax module Log_data = Log_data module Context = Context module Log = Log module Process = Process let solve_to_custom req = let open Cluster_api.Raw in let params = Yojson.Safe.to_string @@ Solver_service_api.Worker.Solve_request.to_yojson req in ...
null
https://raw.githubusercontent.com/ocurrent/solver-service/78623143537016ddf140e8557b88981556200d04/worker/solver_worker.ml
ocaml
Workers that can also solve opam jobs
open Lwt.Syntax module Log_data = Log_data module Context = Context module Log = Log module Process = Process let solve_to_custom req = let open Cluster_api.Raw in let params = Yojson.Safe.to_string @@ Solver_service_api.Worker.Solve_request.to_yojson req in let custom = Builder.Custom.init_root () in...
180cf7eb3d88b8df0b6a38fc616804bccc70aeca6aec398f409c9795e4a7e9d8
CarlosMChica/HaskellBook
CoreDump.hs
module Coredump where data Test = A Test2 | B Test2 deriving (Show) data Test2 = C Int | D Int deriving (Show) forceNothing :: Test -> Int forceNothing _ = 0 forceTest :: Test -> Int forceTest (A _) = 1 forceTest (B _) = 2 forceTest2 :: Test -> Int forceTest2 (A (C x)) = x forceTest2 (A (D x)) = x forc...
null
https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter27/CoreDump.hs
haskell
Run with :set -ddump-simpl and :set -dsuppress-all A good example of "Outside-In evaluation" forceTest2 = \ ds_d2j0 -> A ds1_d2je -> case ds1_d2je of _ { C x_a1ay -> x_a1ay; --x_a1ay is not evaluated, just returned x_a1az is not evaluated , just returned }; ...
module Coredump where data Test = A Test2 | B Test2 deriving (Show) data Test2 = C Int | D Int deriving (Show) forceNothing :: Test -> Int forceNothing _ = 0 forceTest :: Test -> Int forceTest (A _) = 1 forceTest (B _) = 2 forceTest2 :: Test -> Int forceTest2 (A (C x)) = x forceTest2 (A (D x)) = x forc...