_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
0a76a6662161e9517d36d2dabc048268f3d59bb1c524477fea0ebdc87bbb9cef
lhope/cl-bayesnet
clique-tree.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; clique-tree - tools for clique-trees, which are intermediate ;; structures for building join-trees. ;; Copyright ( c ) 2007 - 2013 , < > . Copyright other contributors as noted in the file . ;; ;; This file is part of cl-bayesnet - a Co...
null
https://raw.githubusercontent.com/lhope/cl-bayesnet/3834f6ec27a297054e9b2f67220161682d63109d/src/clique-tree.lisp
lisp
clique-tree - tools for clique-trees, which are intermediate structures for building join-trees. This file is part of cl-bayesnet - a Common Lisp Bayesian Network This file is licensed under the terms of the LLGPL. This library is free software; you can redistribute it and/or modify This library is distribu...
Copyright ( c ) 2007 - 2013 , < > . Copyright other contributors as noted in the file . Inference Engine . it under the terms of the Lisp Lesser General Public License version 3 , which consists of the GNU Lesser General Public License , either version 3 or ( at your option ) any later version , as publ...
e832291b5492b8c6747253edfb088d3bf87f31534ba4d899c875d83d8301a044
smucclaw/dsl
Classy.hs
# LANGUAGE TemplateHaskell # { - # OPTIONS_GHC -ddump - splices -dsuppress - uniques # - } module Classy where import Control.Lens -- we use a little lens magic data Point = Point { _x :: Int , _y :: Int , _label :: String } makeClassy ''Point data MyNatural = MyNatural { _myint :: Int } deriving (S...
null
https://raw.githubusercontent.com/smucclaw/dsl/8653b2ed501168bf4d7fc1fee3bddd8bf787a516/lib/haskell/natural4/src/Classy.hs
haskell
we use a little lens magic
# LANGUAGE TemplateHaskell # { - # OPTIONS_GHC -ddump - splices -dsuppress - uniques # - } module Classy where import Control.Lens data Point = Point { _x :: Int , _y :: Int , _label :: String } makeClassy ''Point data MyNatural = MyNatural { _myint :: Int } deriving (Show, Eq, Ord) makeClassy ''MyNa...
7dc97ccf2e6ad368f7d2fc52ede5881f422d0ba3ca728d81d94128c301f3e092
tisnik/clojure-examples
core.clj
(ns sqltest4.core (:gen-class)) (require '[clojure.pprint :as pprint]) (require '[clojure.java.jdbc :as jdbc]) reprezentujici zpusob do vybrane databaze (def test-db {:classname "org.sqlite.JDBC" :subprotocol "sqlite" :subname "test.db" }) (def table-name "obsazeni") (defn read-whol...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/sqltest4/src/sqltest4/core.clj
clojure
(ns sqltest4.core (:gen-class)) (require '[clojure.pprint :as pprint]) (require '[clojure.java.jdbc :as jdbc]) reprezentujici zpusob do vybrane databaze (def test-db {:classname "org.sqlite.JDBC" :subprotocol "sqlite" :subname "test.db" }) (def table-name "obsazeni") (defn read-whol...
0a7f5e4cbd741530e10dafdc05f3d1e8e8306edbda6d8bf269392a28c55cf7cd
degree9/material-hl
switch.cljs
(ns material-hl.switch (:require [hoplon.core :as hl] [material-hl.core :as core] [material-hl.button :as btn] [cljsjs.material-components])) (def ^:dynamic *disabled* nil) (defelem switch [attr kids] (let [disabled (:disabled attr *disabled*)] (hl/div (core/assoc-cla...
null
https://raw.githubusercontent.com/degree9/material-hl/01d50358293679c1ee9f65d2aa4f0b91863ea278/src/material_hl/switch.cljs
clojure
(ns material-hl.switch (:require [hoplon.core :as hl] [material-hl.core :as core] [material-hl.button :as btn] [cljsjs.material-components])) (def ^:dynamic *disabled* nil) (defelem switch [attr kids] (let [disabled (:disabled attr *disabled*)] (hl/div (core/assoc-cla...
6270fb1b01c02ad5a42d8f6c7cb4ecf92e797a90b099d99ea7b56be554ad910e
alex-gutev/generic-cl
expanders.lisp
;;;; expanders.lisp ;;;; Copyright 2021 ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;;; restriction, including without limitation the rights to use, ;;;; copy...
null
https://raw.githubusercontent.com/alex-gutev/generic-cl/9d0c89d4115bb18c18de65564a0565df73f2dfbe/src/map/expanders.lisp
lisp
expanders.lisp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the ...
Copyright 2021 files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , DOSEQ Expanders for hash - tables and...
ae0e188fc9f76e28b66e966105a01e6ec5cc8b2968db66f7a8a982510eac0a04
hidaris/thinking-dumps
stack.rkt
#lang typed/racket (define-type (Stack a) (Listof a)) (define empty '()) (: isEmpty : (∀ (a) (Stack a) -> Boolean)) (define (isEmpty s) (null? s)) (: Cons : (∀ (a) a (Stack a) -> (Stack a))) (define (Cons x s) (cons x s)) (: head : (∀ (a) (Stack a) -> a)) (define (head s) (car s)) (: tail : (∀ (a) (Stack a) -> ...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/pfds/chap2/stack.rkt
racket
rewrite this function using pattern matching:
#lang typed/racket (define-type (Stack a) (Listof a)) (define empty '()) (: isEmpty : (∀ (a) (Stack a) -> Boolean)) (define (isEmpty s) (null? s)) (: Cons : (∀ (a) a (Stack a) -> (Stack a))) (define (Cons x s) (cons x s)) (: head : (∀ (a) (Stack a) -> a)) (define (head s) (car s)) (: tail : (∀ (a) (Stack a) -> ...
3ec24fc1dcf54a93ae12d923e9a26f42cd97e2ccdd1964b1cfafc25bef59a90c
cleary/livecode
parameter_helpers.hs
let -- superfm -- basic functions notation -- modulators mod11 = pF "mod11" mod12 = pF "mod12" mod13 = pF "mod13" mod14 = pF "mod14" mod15 = pF "mod15" mod16 = pF "mod16" mod21 = pF "mod21" mod22 = pF "mod22" mod23 = pF "mod23" mod24 = pF "mod24" mod25 = pF "mod25" mod26...
null
https://raw.githubusercontent.com/cleary/livecode/abb16d3d3a70fd189851268ad246bef7bcb30c90/global/parameter_helpers.hs
haskell
superfm basic functions notation modulators operator envelope generator levels operator envelope generator rates operator output levels operator frequency ratios operator frequency detuners other superfm alternate notation, see let fmamp :: Int -> Pattern Double -> ControlPattern fmamp op = pF ("amp" ++ ...
let mod11 = pF "mod11" mod12 = pF "mod12" mod13 = pF "mod13" mod14 = pF "mod14" mod15 = pF "mod15" mod16 = pF "mod16" mod21 = pF "mod21" mod22 = pF "mod22" mod23 = pF "mod23" mod24 = pF "mod24" mod25 = pF "mod25" mod26 = pF "mod26" mod31 = pF "mod31" mod32 = pF "...
4722a89364594275488108b88307413305b93a005d89ee1b07ed6872945786ce
clj-easy/graalvm-clojure
main.clj
(ns simple.main (:require [simple.components :refer [prod-system]] [system.repl :as sr]) (:gen-class)) (defn -main [] (sr/set-init! #'prod-system) (println "Hello GraalVM."))
null
https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/system/src/simple/main.clj
clojure
(ns simple.main (:require [simple.components :refer [prod-system]] [system.repl :as sr]) (:gen-class)) (defn -main [] (sr/set-init! #'prod-system) (println "Hello GraalVM."))
59d47c1ce8a09370671dde492c1bef4943f1b213acacb5be3d6b4c3d1f33a670
smucclaw/dsl
Main.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} One more extension . # LANGUAGE StandaloneDeriving # module Main where import AnyAll import qualified Data.Map.Strict as Map import qualified Data.Text as T imp...
null
https://raw.githubusercontent.com/smucclaw/dsl/6a715833178282afd4e3b1ce2a10b9213646a0b4/lib/haskell/anyall/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # the wrapping 'w' here is needed for <!> defaults and <?> documentation consume JSON containing - an AnyAll Item - a Marking showing user input to date and defaults
# LANGUAGE DeriveGeneric # One more extension . # LANGUAGE StandaloneDeriving # module Main where import AnyAll import qualified Data.Map.Strict as Map import qualified Data.Text as T import qualified Data.ByteString.Lazy as B import Data.ByteString.Lazy.UTF8 (toString) import Control...
0350a490604bebacd244a3590145fb005c06a41c840ce88a341e77c4ff4c5387
smart-chain-fr/tokenomia
CLI.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # {-# OPTIONS_GHC -Wno-redundant-constraints #-} # LANGUAGE TypeApplications # module Tokenomia.Wallet.CLI ( askToChooseAmongGivenWallets ...
null
https://raw.githubusercontent.com/smart-chain-fr/tokenomia/7e63e157226d9a5d2710855494c339c05af7c91f/src/Tokenomia/Wallet/CLI.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_GHC -Wno-redundant-constraints #
# LANGUAGE RecordWildCards # # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Tokenomia.Wallet.CLI ( askToChooseAmongGivenWallets , askAmongAllWallets , askUTxO , askUTxOFilterBy , fetchUTxOFilterBy , ask...
9e935c051acba348fc719c2f8b7bf0ffdbe10fb7256a54eded7e6f5c31fa0705
atgreen/lisp-openshift
des.lisp
;;;; des.lisp -- implementation of DES ;;; converted from the C code appearing in _Applied Cryptography_ by to . Unfortunately , a lot of C - isms ;;; remain, so this is not the prettiest Common Lisp code ever. (in-package :crypto) ;;; the sboxes of DES (declaim (type (simple-array (unsigned-byte 32) (64)...
null
https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/ironclad_0.30/src/ciphers/des.lisp
lisp
des.lisp -- implementation of DES converted from the C code appearing in _Applied Cryptography_ by remain, so this is not the prettiest Common Lisp code ever. the sboxes of DES permutations and rotations for the key schedule actual encryption and decryption guts now the real work begins now the real work begins...
to . Unfortunately , a lot of C - isms (in-package :crypto) (declaim (type (simple-array (unsigned-byte 32) (64)) des-sbox0 des-sbox1 des-sbox2 des-sbox3 des-sbox4 des-sbox5 des-sbox6 des-sbox7)) (defconst des-sbox0 #32@( #x01010400 #x00000000 #x00010000 #x01010404 #x...
49ade9f7f4b228eaac85f585e8a0f6498e7db278324a443c73236499cb56e063
314eter/ocaml-xxhash
XXHash.mli
(** xxHash - Extremely fast hash algorithm *) exception XXH_error module type XXHASH = sig type hash type state * { 2 Short input } (** [hash ~seed input] returns the hash of [input]. This is equivalent to {[let state = create () in reset ~seed state; update state input; let hash = digest state in free ...
null
https://raw.githubusercontent.com/314eter/ocaml-xxhash/28858dc709276fd9c715e24a81610680cec0bd3c/lib/XXHash.mli
ocaml
* xxHash - Extremely fast hash algorithm * [hash ~seed input] returns the hash of [input]. This is equivalent to {[let state = create () in reset ~seed state; update state input; let hash = digest state in free state; hash]} * {2 Streaming} * [create ()] returns an uninitialized state. * [reset ~seed state]...
exception XXH_error module type XXHASH = sig type hash type state * { 2 Short input } val hash : ?seed:hash -> string -> hash val create : unit -> state val reset : ?seed:hash -> state -> unit val update : state -> string -> unit val digest : state -> hash val free : state -> unit val with_...
5ca9210f460f2817c8de4eaac5475aa2d2fd8afa5090b993b8bbf4de5353809c
avsm/eeww
discover.ml
module C = Configurator.V1 (* Borrowed from liburing *) let () = C.main ~name:"discover" (fun c -> let defs = C.C_define.import c ~includes:["fcntl.h"] C.C_define.Type.[ "O_RDONLY", Int; "O_WRONLY", Int; "O_RDWR", Int; "O_CREAT", Int; ...
null
https://raw.githubusercontent.com/avsm/eeww/ab64c5391b67fb3f5b1d3de5e0a5a5cb4c80207b/lib/eio/lib_eio_gcd/include/discover.ml
ocaml
Borrowed from liburing
module C = Configurator.V1 let () = C.main ~name:"discover" (fun c -> let defs = C.C_define.import c ~includes:["fcntl.h"] C.C_define.Type.[ "O_RDONLY", Int; "O_WRONLY", Int; "O_RDWR", Int; "O_CREAT", Int; "O_EXCL", Int; ...
526e1129754878dc67726ab5647bf46d805b4d6893407e133e53119dfc2e7bbb
BillHallahan/G2
MaybeTest.hs
module MaybeTest where import Data.List import Data.Maybe -- averageF :: [Float] -> Float -- averageF xs = sumN xs / lengthF xs head :: [a] -> a head (x:xs) = x head _ = error "head" headMaybeInt :: [Int] -> Maybe Int headMaybeInt = headMaybe headMaybe :: [a] -> Maybe a headMaybe (x:_) = Just x headMaybe [] = Noth...
null
https://raw.githubusercontent.com/BillHallahan/G2/4d287df8ed7ba13c06d96d4911b9eedf870e80a1/tests/BaseTests/MaybeTest.hs
haskell
averageF :: [Float] -> Float averageF xs = sumN xs / lengthF xs
module MaybeTest where import Data.List import Data.Maybe head :: [a] -> a head (x:xs) = x head _ = error "head" headMaybeInt :: [Int] -> Maybe Int headMaybeInt = headMaybe headMaybe :: [a] -> Maybe a headMaybe (x:_) = Just x headMaybe [] = Nothing sumN :: Num a => [a] -> a sumN (x:xs) = x + sumN xs sumN _ = 0 l...
3a3ebe163b020c1f937be0c76dc13c8dd42112c4886cd457f7f15b343ab53f10
huangz1990/SICP-answers
test-75-make-from-mag-ang.scm
(load "test-manager/load.scm") (load "75-make-from-mag-ang.scm") (define c (make-from-mag-ang 3 5)) (define-each-check (= (c 'magnitude) 3) (= (c 'angle) 5) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-75-make-from-mag-ang.scm
scheme
(load "test-manager/load.scm") (load "75-make-from-mag-ang.scm") (define c (make-from-mag-ang 3 5)) (define-each-check (= (c 'magnitude) 3) (= (c 'angle) 5) ) (run-registered-tests)
f341815f1552a1b1187ae86bc865464b69144376b90d3609cf2c308c5fb4e3f2
ejgallego/coq-serapi
ser_inv.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_inv.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 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2016 - 2018 MINES...
87f5d7f3ebe950c9e763a282b96526fb969edec1ce895a8970801e2bf037b748
williamleferrand/accretio
ys_persistency.ml
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
null
https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/server/ys_persistency.ml
ocaml
right now, this module is a thin lwt layer on top of LevelDB I'm thinking about removing this module ocsipersist storage LevelDB.destroy name ;
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
04a60bcd2ba00033bc0020091b2a320c74f2b14041169a836ce34987a5df4b40
mindylou/legend-of-zolda
types.mli
the i d ( name ) of a sprite type id = int (* the type of enemy *) type enemy_type = Random | Blind | Coop | Boss (* cardinal direction a sprite can face *) type direction = North | South | East | West (* actions player can take *) type player_action = | Stand | Step | Attack (* sprite type *) type sprite_t...
null
https://raw.githubusercontent.com/mindylou/legend-of-zolda/1c0e7a4535c2c2361943a464b49963d6703a172a/types.mli
ocaml
the type of enemy cardinal direction a sprite can face actions player can take sprite type move is move that has fields: id: string unlocked: bool frame: int location is an (x, y) coordinate represented on our grid frame parameters for drawing the sprite on the GUI total health the sprite has a...
the i d ( name ) of a sprite type id = int type enemy_type = Random | Blind | Coop | Boss type direction = North | South | East | West type player_action = | Stand | Step | Attack type sprite_type = Enemy of enemy_type | Player type move = { id: string; unlocked: bool; frame: int; } type l...
db93af2471fcf6494b5cb32b1fa5513ddc5b6f6f724467a66f30812f0701e5dd
mbenke/zpf2013
LazyTest.hs
import Debug.Trace f = \s -> let (x, s') = doSomething s (y, s'') = doSomethingElse s' in (3, s'') doSomething s = trace "doSomething" $ (0, s) doSomethingElse s = trace "doSomethingElse" $ (3, s) main = print (f 2)
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Slides/05Monad/LazyTest.hs
haskell
import Debug.Trace f = \s -> let (x, s') = doSomething s (y, s'') = doSomethingElse s' in (3, s'') doSomething s = trace "doSomething" $ (0, s) doSomethingElse s = trace "doSomethingElse" $ (3, s) main = print (f 2)
bcf464e63e3dcb5944f375eda1c28f0a24a63ea9db494971c765c8119b5e83ba
leviroth/ocaml-reddit-api
uri_with_string_sexp.ml
open! Core include Uri_sexp let sexp_of_t t : Sexp.t = Atom (Uri.to_string t) let t_of_sexp sexp = Uri.of_string ([%of_sexp: string] sexp)
null
https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/972e6a03e2fe59d8e3f469a643eef41e44a4fc97/reddit_api_kernel/uri_with_string_sexp.ml
ocaml
open! Core include Uri_sexp let sexp_of_t t : Sexp.t = Atom (Uri.to_string t) let t_of_sexp sexp = Uri.of_string ([%of_sexp: string] sexp)
4b0aa7e1dc8ee95962ac9f5350231591d64c26a583e0342e8507d9bad29f758c
ocaml/ocamlbuild
vivi2.ml
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/test/test2/vivi2.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with let rec p i = [< '1; '2; p (i + 1) >] let vivi = [|3|]...
dbc4694cdcf9c704f09c6e916c76613fef0b66ddd2de639fe086b3177b498473
bloomberg/ppx_string_interpolation
ppx_string_interpolation_test.ml
open OUnit2 (* Examples from README.md *) let readme_test1 _ = let name = "world" in assert_equal [%string "Hello $name!"] "Hello world!" let readme_test2 _ = let hello = "Hello" and world = "world" in assert_equal [%string "$(hello ^ \" \" ^ world)!"] "Hello world!" let readme_test3 _ = assert_equal [%str...
null
https://raw.githubusercontent.com/bloomberg/ppx_string_interpolation/8040004ad3437cfe6c533e474a2cd9d5bb5421f8/test/ppx_string_interpolation_test.ml
ocaml
Examples from README.md Other tests HI
open OUnit2 let readme_test1 _ = let name = "world" in assert_equal [%string "Hello $name!"] "Hello world!" let readme_test2 _ = let hello = "Hello" and world = "world" in assert_equal [%string "$(hello ^ \" \" ^ world)!"] "Hello world!" let readme_test3 _ = assert_equal [%string "This is $$ and %%!"] "Thi...
5655e2533561ae379362f7c4243a3050c1dd6f28daba7e560f9bb3f5db131671
SnootyMonkey/Falkland-CMS
taxonomy_delete.clj
(ns fcms.unit.resources.taxonomy.taxonomy-delete)
null
https://raw.githubusercontent.com/SnootyMonkey/Falkland-CMS/bd653c23dd458609b652dfac3f0f2f11526f00d1/test/fcms/unit/resources/taxonomy/taxonomy_delete.clj
clojure
(ns fcms.unit.resources.taxonomy.taxonomy-delete)
bd79b4315aab57594545cd92f0922c9fb40dcda4a1189d2e29a9954399d49094
binsec/binsec
ida_utils.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/ida/ida_utils.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
db8e34cf7535007f4a4642d0d2ab474354df3583794d1efedd671acbcf4848a3
district0x/cljs-web3-next
bzz.cljs
(ns cljs-web3-next.bzz "Interface to the web3-bzz that allows you to interact with swarm decentralized file store" (:refer-clojure :exclude [get]) (:require [cljs-web3-next.helpers :as web3-helpers] [oops.core :refer [ocall oget oset! oapply+]])) (defn get-bzz [provider] (oget provider "bzz")) T...
null
https://raw.githubusercontent.com/district0x/cljs-web3-next/a473ac9c21d994ecb6abfb4899ef5474d5dfc669/src/cljs_web3_next/bzz.cljs
clojure
DEPRECATED DEPRECATED
(ns cljs-web3-next.bzz "Interface to the web3-bzz that allows you to interact with swarm decentralized file store" (:refer-clojure :exclude [get]) (:require [cljs-web3-next.helpers :as web3-helpers] [oops.core :refer [ocall oget oset! oapply+]])) (defn get-bzz [provider] (oget provider "bzz")) T...
94f19acbc3d54a26583879ffd1333826a6d0d2e3c240ea80aa94e71514caaced
penpot/penpot
thumbnails.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.thumbnails (:require [app.common.data.macros :as dm] [app.common.pages.hel...
null
https://raw.githubusercontent.com/penpot/penpot/2ea81c0114fb13ece945b7082aff0bcd7383e563/frontend/src/app/main/data/workspace/thumbnails.cljs
clojure
Copyright (c) KALEIDOS INC Look for the thumbnail canvas to send the data to the backend Not found, we retry after delay Remove the thumbnail temporary. If the user changes pages the thumbnail is regenerated Send the update to the back-end Update the local copy of the thumbnails so we don't need to request it ag...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.data.workspace.thumbnails (:require [app.common.data.macros :as dm] [app.common.pages.helpers :as cph] [app.common.uuid...
3803e0875490ecff0f6f44211c546433fd8425336aa0f804d98d2d91432b4cba
PagingMatt/osilo
Peer_access_log.mli
(** Encapsulates the log of other peers reading this peer's data. *) type t (** Internal type for peer access log. *) val empty : t (** [empty] value gives an empty peer access log. *) val log : t -> host:Peer.t -> peer:Peer.t -> service:string -> path:string -> t (** [log l ~host ~pe...
null
https://raw.githubusercontent.com/PagingMatt/osilo/3ef63a3c0970444c19bd5abf52ad9db154829904/src/Peer_access_log.mli
ocaml
* Encapsulates the log of other peers reading this peer's data. * Internal type for peer access log. * [empty] value gives an empty peer access log. * [log l ~host ~peer ~service ~path] takes the current peer access log and gives back another where it has been recorded that [peer] requested [path] from [host...
type t val empty : t val log : t -> host:Peer.t -> peer:Peer.t -> service:string -> path:string -> t val delog : t -> host:Peer.t -> service:string -> path:string -> (Peer.t list * t)
bdc9a35158717f9721ad220fc1b1ccb1aab9bcfba101e5f329438241848ff259
nilenso/goose
api_test.clj
(ns goose.brokers.rmq.api-test (:require [goose.api.dead-jobs :as dead-jobs] [goose.api.enqueued-jobs :as enqueued-jobs] [goose.client :as c] [goose.retry :as retry] [goose.test-utils :as tu] [goose.worker :as w] [clojure.test :refer [deftest is testing use-fixtures]]) (:import [jav...
null
https://raw.githubusercontent.com/nilenso/goose/d180dcaebcfec64637a43d3523c6b3dd4628d911/test/goose/brokers/rmq/api_test.clj
clojure
======= Setup & Teardown ========== Prevent jobs from dying at the same time
(ns goose.brokers.rmq.api-test (:require [goose.api.dead-jobs :as dead-jobs] [goose.api.enqueued-jobs :as enqueued-jobs] [goose.client :as c] [goose.retry :as retry] [goose.test-utils :as tu] [goose.worker :as w] [clojure.test :refer [deftest is testing use-fixtures]]) (:import [jav...
ab25a62750a0ca65a5bac588b84c81caaf5aebb17f9201834880216e147b005a
ocaml-community/obus
oBus_auth.ml
* oBus_auth.ml * ------------ * Copyright : ( c ) 2008 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * oBus_auth.ml * ------------ * Copyright : (c) 2008, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of obus, an ocaml imple...
null
https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/src/protocol/oBus_auth.ml
ocaml
Maximum line length, if line greated are received, authentication will fail Maximum number of reject, if a client is rejected more than that, authentication will fail +-----------------------------------------------------------------+ | Keyring for the SHA-1 method | ...
* oBus_auth.ml * ------------ * Copyright : ( c ) 2008 , < > * Licence : BSD3 * * This file is a part of obus , an ocaml implementation of D - Bus . * oBus_auth.ml * ------------ * Copyright : (c) 2008, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of obus, an ocaml imple...
e3ce9d07e595fc79909c4f3e4a3d203159d9a30572a3415979be7c3a1832293d
skanev/playground
62-tests.scm
(require rackunit rackunit/text-ui) (load "helpers/query.scm") (load "../62.scm") (define sicp-4.62-tests (test-suite "Tests for SICP exercise 4.62" (check-equal? (matches-of '(last-pair (3) ?x)) '((last-pair (3) (3)))) (check-equal? (matches-of '(last-pair (1 2 3) ?x)) ...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/tests/62-tests.scm
scheme
(require rackunit rackunit/text-ui) (load "helpers/query.scm") (load "../62.scm") (define sicp-4.62-tests (test-suite "Tests for SICP exercise 4.62" (check-equal? (matches-of '(last-pair (3) ?x)) '((last-pair (3) (3)))) (check-equal? (matches-of '(last-pair (1 2 3) ?x)) ...
e8280c28486a5b62044bee2b6504fd5e34b4bd8c8d536ade1ab71feef4dfdc72
stolen/autohelp
autohelp.erl
Copyright ( c ) 2012 - 2013 See MIT - LICENSE for licensing information . %% @doc autohelp: parse_transform to automatically add self - description functions to your Erlang modules . %% %% Just compile your code with `{parse_transform, autohelp}` option to make its EDoc notations available through help/{1,2,...
null
https://raw.githubusercontent.com/stolen/autohelp/94e3835c87b166ebdea099cbc3ecf7c191d8f90d/src/autohelp.erl
erlang
@doc autohelp: parse_transform to automatically Just compile your code with `{parse_transform, autohelp}` option Get module name. We will need it for printing warnings Find conflicting exports Find conflicting function definitions Continue to transform if no conflicts. Print warning and no-op otherwise Helpers ...
Copyright ( c ) 2012 - 2013 See MIT - LICENSE for licensing information . add self - description functions to your Erlang modules . to make its EDoc notations available through help/{1,2,3 } exports . -module(autohelp). -author({"Danil Zagoskin", ''}). -export([parse_transform/2]). -include_lib("xmerl/incl...
334b77b7f07266c7a40701194b9f16a8f08d4a5c787aac718f79f7b4d70be78d
grin-compiler/ghc-wpc-sample-programs
Figure.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} | Module : Tests . Readers . Org . Block . Figure Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha Portability : portable Test parsing of org figure...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Readers/Org/Block/Figure.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # | Module : Tests . Readers . Org . Block . Figure Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha Portability : portable Test parsing of org figures . Module : Tests.Reader...
46144eefc0c2a1856c8bc5f51ad6c6c186c417234eeebcb39ed4fe695832d9ad
district0x/district-designer
syncer.cljs
(ns tcr.server.syncer) (defn add-tcr-factory [] ) (defn update-tcr [] ) (defn add-district-tcr [] ) (defn remove-district-tcr [] ) (defn tcr-created [] ) (defn registry-entry-created [] ) (defn param-change-entry-created [] ) (defn challenge-created [] ) (defn registry-entry-token-minte...
null
https://raw.githubusercontent.com/district0x/district-designer/3f2a585b866b6e173f2cb7b32ecadcffa33e2804/src/tcr/server/syncer.cljs
clojure
(ns tcr.server.syncer) (defn add-tcr-factory [] ) (defn update-tcr [] ) (defn add-district-tcr [] ) (defn remove-district-tcr [] ) (defn tcr-created [] ) (defn registry-entry-created [] ) (defn param-change-entry-created [] ) (defn challenge-created [] ) (defn registry-entry-token-minte...
a2964277eefb27da36efc43499af29e07736205b4f2053fd9e0a63e92ff64c0a
roburio/openvpn
openvpn_client_lwt.ml
open Lwt.Infix let open_tun config { Openvpn.cidr ; gateway } : (Openvpn.Config.t * Lwt_unix.file_descr, [> `Msg of string]) Lwt_result.t = This returns a Config with updated MTU , and a file descriptor for the TUN interface the TUN interface *) let open Lwt_result.Infix in begin match Openvpn.Conf...
null
https://raw.githubusercontent.com/roburio/openvpn/5041b2837fe299138fae95649cb812a3930be163/app/openvpn_client_lwt.ml
ocaml
not using write_to_fd here because partial writes to a tun interface are semantically different from single write()s: handle initial action <- Lwt_main.run
open Lwt.Infix let open_tun config { Openvpn.cidr ; gateway } : (Openvpn.Config.t * Lwt_unix.file_descr, [> `Msg of string]) Lwt_result.t = This returns a Config with updated MTU , and a file descriptor for the TUN interface the TUN interface *) let open Lwt_result.Infix in begin match Openvpn.Conf...
4102c39b4a49854acecd0a9d4913cc6900cc64d8692ae52dd21b0a8079990ecd
michaelballantyne/syntax-spec
building-up-to-qi.rkt
#lang racket ;; (-> (U string? symbol?) string? (U string? symbol?)) (define (add-prefix name prefix) (cond [(string? name) (string-append prefix name)] [(symbol? name) (string->symbol (string-append prefix (symbol->string name)))])) (add-prefix 'x "...
null
https://raw.githubusercontent.com/michaelballantyne/syntax-spec/0a9d7599afb2f90a6dcfd45e625d117191a85b3d/demos/strumienta-talk/building-up-to-qi.rkt
racket
(-> (U string? symbol?) string? (U string? symbol?)) Pattern: cond with predicates on same argument. Pattern: apply a sequence of transformations to a value Notice common concept of a "flow"
#lang racket (define (add-prefix name prefix) (cond [(string? name) (string-append prefix name)] [(symbol? name) (string->symbol (string-append prefix (symbol->string name)))])) (add-prefix 'x "1-") (define-syntax-rule (switch (e) [p b] ...) (l...
fc9b114093268b1db4c499377f7615b5344e6acfefb2d5b2267a48c86f0c0b1c
muesli4/table-layout
Basic.hs
| This module contains primitive modifiers for lists and ' 's to be -- filled or fitted to a specific length. module Text.Layout.Table.Primitives.Basic ( -- * String-related tools spaces -- ** Filling , fillLeft' , fillLeft , fillRight , fillCenter' , fillCenter -- ** Fitti...
null
https://raw.githubusercontent.com/muesli4/table-layout/f566b5db2e2aff64d6faf1e88bdbaffa2a9c312b/src/Text/Layout/Table/Primitives/Basic.hs
haskell
filled or fitted to a specific length. * String-related tools ** Filling ** Fitting ** Applying cut marks * List-related tools ** Filling Puts more on the beginning if odd. | Fill on the left until the 'String' has the desired length. | Fill on the right until the 'String' has the desired length. | Fill on b...
| This module contains primitive modifiers for lists and ' 's to be module Text.Layout.Table.Primitives.Basic spaces , fillLeft' , fillLeft , fillRight , fillCenter' , fillCenter , fitRightWith , fitLeftWith , fitCenterWith , applyMarkLeftWith , applyMarkRightWith ...
fd5cf5ffdcd9391093406c3b4f9af3f664afda73a68b58f3bee0a027ba450c6c
mrphlip/aoc
09.hs
# OPTIONS_GHC -Wno - tabs # import Data.List import qualified Data.Set as S import qualified Data.Map.Strict as M import Control.Exception import Utils getInput :: IO [Integer] getInput = do dat <- readFile "09.txt" return $ map read $ lines dat withHistory :: Integer -> [a] -> [([a], a)] withHistory n xs = let (fr...
null
https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/2020/09.hs
haskell
# OPTIONS_GHC -Wno - tabs # import Data.List import qualified Data.Set as S import qualified Data.Map.Strict as M import Control.Exception import Utils getInput :: IO [Integer] getInput = do dat <- readFile "09.txt" return $ map read $ lines dat withHistory :: Integer -> [a] -> [([a], a)] withHistory n xs = let (fr...
cae5bc341e5b852e7ef5f4d136744d0d509649635dbb434844c9a71b845fe762
ocaml-multicore/tezos
qcheck_rpc.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/long_tests/qcheck_rpc.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
bd401396a25392374303da30f64808b34fc4de723feb330b348ec8335e66a4e3
facebookarchive/pfff
gMain.ml
(**************************************************************************) (* Lablgtk *) (* *) (* This program is free software; you can redistribute it *) and/or ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlgtk/src/gMain.ml
ocaml
************************************************************************ Lablgtk This program is free software; you can redistribute it comes with the library. ...
and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation version 2 , with the exception described in file COPYING which GNU Library General Public License for more details . You should have r...
e91514f9f76434df8a6b0df909bf1da047d7def15f3dc8b01740a9ae648a537f
scheme-live/live
output.scm
#(1 null null null 2)
null
https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/y-array-with-several-null/output.scm
scheme
#(1 null null null 2)
68206c4dcf46335b545e36412513c15e86271ad04e577f85f2db34dbeeb907e2
webyrd/mediKanren
neo-biolink-reasoning-low-level.rkt
#lang racket/base (provide ;; get-biolink-version ;; predicate-deprecated? class-deprecated? predicate-mixin? class-mixin? predicate-symmetric? ;; all-predicates all-classes ;; get-inverse-predicate ;; get-predicate-children get-class-children ;; get-predicate-descendents get-class-descendents ;; ...
null
https://raw.githubusercontent.com/webyrd/mediKanren/044d954484f73e1e5190796b907124185a4b014c/medikanren2/neo/neo-reasoning/neo-biolink-reasoning-low-level.rkt
racket
(define BIOLINK_YAML_FILE "../neo-biolink/biolink_2_4_8/biolink-model.yaml") (define BIOLINK_YAML_FILE "../neo-biolink/biolink_3_0_3/biolink-model.yaml") (define BIOLINK_YAML_FILE "../neo-biolink/biolink_3_1_1/biolink-model.yaml") list of predicates list of classes Return descendent predicates and mix...
#lang racket/base (provide get-biolink-version predicate-deprecated? class-deprecated? predicate-mixin? class-mixin? predicate-symmetric? all-predicates all-classes get-inverse-predicate get-predicate-children get-class-children get-predicate-descendents get-class-descendents get-predicate-descendents* ...
aac83bf5936a8ccca86d9e31d64c98acdabd38556f03ed0169cec8dbda98dc75
smallhadroncollider/taskell-2.0
Parser.hs
module Taskell.UI.Text.Parser where import RIO import qualified RIO.Char as C import qualified RIO.Text as T import qualified Taskell.Utility.Parser as P import qualified Taskell.Error as Error data Part = Word Text | Whitespace Text | LineBreak deriving (Show, Eq) type Parts = [Part] notSpace :: ...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell-2.0/c32b2f48d9c44544f43be49c2b100b414a8d3376/src/Taskell/UI/Text/Parser.hs
haskell
module Taskell.UI.Text.Parser where import RIO import qualified RIO.Char as C import qualified RIO.Text as T import qualified Taskell.Utility.Parser as P import qualified Taskell.Error as Error data Part = Word Text | Whitespace Text | LineBreak deriving (Show, Eq) type Parts = [Part] notSpace :: ...
09d5bb04cdd36b39e65e92e5f5584f9a9faff3f058c568d6779854c01ef50b05
slipstream/SlipStreamServer
notification_test.clj
(ns com.sixsq.slipstream.ssclj.resources.notification-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstream.ssclj.resources.comm...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/notification_test.clj
clojure
first one should be not impacted by pagination (so we expect nb-notifications) second is the count after pagination (0 in that case with a bogus pagination)
(ns com.sixsq.slipstream.ssclj.resources.notification-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstream.ssclj.resources.comm...
2bc366eef13fa44ab405f63035b363ef1c36cffe969388d3219efa8cf631457c
dreyk/zraft_lib
zraft_backend.erl
%% ------------------------------------------------------------------- @author < > Copyright ( c ) 2015 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% ...
null
https://raw.githubusercontent.com/dreyk/zraft_lib/ead65c45df576be3758639e3fe3a46edefdeae1d/src/zraft_backend.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permission...
@author < > Copyright ( c ) 2015 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(zraft...
9289b340dc8c47debee4ad4714087ebfea68032705548cd8a677b2116a80f846
mtolly/onyxite-customs
FiveFret.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Onyx.MIDI.Track.FiveFret where import Control.Monad ...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/MIDI/Track/FiveFret.hs
haskell
# LANGUAGE OverloadedStrings # ^ the nut | Controls the fretting hand animation of a guitarist/bassist. ^ Normal fingering. Single gems = single fingers, gems with duration = vibrato, chord gems = chords. ^ All single fingers/vibrato. ^ All chords. ^ D major shape for all chords, vibrato for all chord sustains....
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Onyx.MIDI.Track.FiveFret where import Control.Monad (void) import Control.Mo...
31d04673956141e59f2e5be6be6f1bef14f7948a239aed5be48fe3d358c43f09
donaldsonjw/bigloo
globalize.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Globalize / globalize.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Globalize/globalize.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The `globalization' process */ *===========================...
* serrano / prgm / project / bigloo / comptime / Globalize / globalize.scm * / * Author : * / * Creation : Thu Jan 26 14:45:58 1995 * / * Last change : We d Jan 29 09:44:28 2014 ( serrano ) * / * Cop...
f74b83d76b740b66e81f1d61fdf60e360202f6801f41cacfea7a2f20a7614877
fdopen/uwt
copy.ml
open Lwt.Infix module UF = Uwt.Fs open Uwt_base.Fs_types let with_file ~mode fln f = UF.openfile ~mode fln >>= fun fd -> Lwt.finalize ( fun () -> f fd ) ( fun () -> UF.close fd) let copy ~src ~dst = with_file ~mode:[ O_RDONLY ] src @@ fun fd_read -> with_file ~mode:[ O_WRONLY ; O_CREAT ; O_TRUNC ] dst @@ fun ...
null
https://raw.githubusercontent.com/fdopen/uwt/44276aa6755b92eddc9ad58662a968afad243e8b/examples/copy.ml
ocaml
open Lwt.Infix module UF = Uwt.Fs open Uwt_base.Fs_types let with_file ~mode fln f = UF.openfile ~mode fln >>= fun fd -> Lwt.finalize ( fun () -> f fd ) ( fun () -> UF.close fd) let copy ~src ~dst = with_file ~mode:[ O_RDONLY ] src @@ fun fd_read -> with_file ~mode:[ O_WRONLY ; O_CREAT ; O_TRUNC ] dst @@ fun ...
eda6dda81316d7471c745017e79c0c8e355cd4490fe80b33e6f35fcd3eec1c16
lambdam/mook
react.clj
(ns mook.react (:require [clojure.spec.alpha :as s])) (defmacro def-elems [names] (s/assert (s/map-of symbol? any?) names) `(do ~@(for [[sym# component#] names] `(def ~sym# (partial mook.react/create-element ~component#))))) (defmacro def-html-elems! [] ;; `(def-elems {~'a "a" ...
null
https://raw.githubusercontent.com/lambdam/mook/273318c38b28fe894c16365973032a52e472eb86/src/mook/react.clj
clojure
svg
(ns mook.react (:require [clojure.spec.alpha :as s])) (defmacro def-elems [names] (s/assert (s/map-of symbol? any?) names) `(do ~@(for [[sym# component#] names] `(def ~sym# (partial mook.react/create-element ~component#))))) (defmacro def-html-elems! [] `(def-elems {~'a "a" ...
2e928e6f770c73db553c591c46a01db690d2a3447bfe74398b4faff2b42546e9
tweag/gazelle_cabal
Main.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Main where import CabalScan.Rules (RuleInfo) import CabalScan.RuleGenerator (generateRulesForCabalFile) import qualified CabalScan.Options as Options import qualified Text.JSON as Json main :: IO () main = do cabalFiles <- Options.parseCommandLine ...
null
https://raw.githubusercontent.com/tweag/gazelle_cabal/10fed9170241f984e7b0d68bf95692c271e3a9e0/cabalscan/exe/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # module Main where import CabalScan.Rules (RuleInfo) import CabalScan.RuleGenerator (generateRulesForCabalFile) import qualified CabalScan.Options as Options import qualified Text.JSON as Json main :: IO () main = do cabalFiles <- Options.parseCommandLine mapM generateRulesForCabalFile caba...
0370882da1bda92fe6b3273d4366732ac4e10dec96b471dcfb9b5ed65506bfd1
bhaskara/programmable-reinforcement-learning
learning-algorithm.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rl/learn/learning-algorithm.lisp - Defines the <learning-algorithm> subclass ;; of <rl-observer>, and various subclasses of it ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package rl) ;;;...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/rl/learn/learning-algorithm.lisp
lisp
rl/learn/learning-algorithm.lisp - Defines the <learning-algorithm> subclass of <rl-observer>, and various subclasses of it class def implemented methods to be implemented by children if history is stored in files if history is stored in memory on-policy learning policy learni...
(in-package rl) (defclass <learning-algorithm> (<rl-observer>) ((history :reader hist :accessor alg-hist :initform (make-array 0 :adjustable t :fill-pointer 0)) (hist-out-dir :reader hist-out-dir :initarg :hist-out-dir :initform nil) (hist-collect-pred :reader hist-collect-pred :writer set-hist-co...
5e01528419bc5db74bed8c67d7ef79c35d5c66ca1952b2c77a9272f57073107e
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.ui.components.form.views (:require [clojure.spec.alpha :as s] [re-frame.core :as re-frame] [reagent.core :as r] [webchange.ui.components.button.views :refer [button]] [webchange.ui.components.copy-link.views :refer [copy-link]] [webchange.ui.components.date.views :refer [date]] ...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/7eb09b19832693c4c1f3ee6efbaf587474bf9af8/src/cljs/webchange/ui/components/form/views.cljs
clojure
(ns webchange.ui.components.form.views (:require [clojure.spec.alpha :as s] [re-frame.core :as re-frame] [reagent.core :as r] [webchange.ui.components.button.views :refer [button]] [webchange.ui.components.copy-link.views :refer [copy-link]] [webchange.ui.components.date.views :refer [date]] ...
07dea85e5e1ee90b444779023c7c89fa8d240afeddfdf3b7d6d90dbd76ae4cdc
NorfairKing/smos
DBSpec.hs
module Smos.Server.DBSpec (spec) where import Smos.Server.DB import Test.Syd import Test.Syd.Persistent.Sqlite spec :: Spec spec = do sqliteMigrationSucceedsSpec "test_resources/migration.sql" serverAutoMigration
null
https://raw.githubusercontent.com/NorfairKing/smos/fa3b373e772778b4ed05666e0c2df0c9af309e19/smos-server-gen/test/Smos/Server/DBSpec.hs
haskell
module Smos.Server.DBSpec (spec) where import Smos.Server.DB import Test.Syd import Test.Syd.Persistent.Sqlite spec :: Spec spec = do sqliteMigrationSucceedsSpec "test_resources/migration.sql" serverAutoMigration
b3d3d6b91c56ce266a654de0aee30d3042af8b5c07a01398aec67b4322970564
racket/redex
ex.rkt
#lang racket/base (require scribble/manual scribble/core scribble/decode (only-in pict colorize filled-rectangle) "counter.rkt") (provide exercise Exref exref eop) (define eop (colorize (filled-rectangle 3 10) "black")) (define (exercise tag . content) (nested-flow (make-st...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-doc/redex/scribblings/long-tut/exercise/ex.rkt
racket
#f ==> blockquote?
#lang racket/base (require scribble/manual scribble/core scribble/decode (only-in pict colorize filled-rectangle) "counter.rkt") (provide exercise Exref exref eop) (define eop (colorize (filled-rectangle 3 10) "black")) (define (exercise tag . content) (nested-flow (decode-...
c9a5916a11b79a722469245f45d9a3e4d7326f248f059be89b728863f03597b6
RyanHope/ACT-R
fan.lisp
(defvar *person-location-data* '(1.11 1.17 1.22 1.17 1.20 1.22 1.15 1.23 1.36 1.20 1.22 1.26 1.25 1.36 1.29 1.26 1.47 1.47)) (defvar *response*) (defvar *...
null
https://raw.githubusercontent.com/RyanHope/ACT-R/c65f3fe7057da0476281ad869c7963c84c0ad735/tutorial/unit5/fan.lisp
lisp
This version of the task works like other models seen in the tutorial by reading the information from a window and pressing a key to respond. This version of the fan-sentence-model function runs the model without using the visual interface. It is provided as an example of showing how one could bypass the interfa...
(defvar *person-location-data* '(1.11 1.17 1.22 1.17 1.20 1.22 1.15 1.23 1.36 1.20 1.22 1.26 1.25 1.36 1.29 1.26 1.47 1.47)) (defvar *response*) (defvar *...
e842216e22a737711277dad7a7bb1f0f3deab6160fcf62df3c8b74b151cc33eb
azimut/shiny
nudruz.lisp
(in-package :shiny) (fluidsynth:program-change *synth* 1 33) (fluidsynth:program-change *synth* 1 40) (fluidsynth:program-change *synth* 1 74) (all-piano 1) ;; expwarp test ;; Try: - Modify the dur and aat ;; - Reduce the notes on make-chord ;; - Change the pc scale (defun ew (time &optional chords) (let ((x (ma...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/drafts/nudruz.lisp
lisp
expwarp test Try: - Reduce the notes on make-chord - Change the pc scale
(in-package :shiny) (fluidsynth:program-change *synth* 1 33) (fluidsynth:program-change *synth* 1 40) (fluidsynth:program-change *synth* 1 74) (all-piano 1) - Modify the dur and aat (defun ew (time &optional chords) (let ((x (make-chord 35 64 2 (scale 0 'ryukyu)))) (setp chords (loop :for n :from 1 :to 2 :by...
da87e2cea31182be045ac585c356fbb6a03e5029ce61902454922858f643bfd9
basho/yokozuna
yz_solr.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may ob...
null
https://raw.githubusercontent.com/basho/yokozuna/e15fe64f9ef9318c0cc21754f3dfdd073d2dc77d/src/yz_solr.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @doc ...
8915a2ca88c0b680cbecc44a93e34c303d782958a6ab8ef9c628d12e981bbf81
haskell/haskell-language-server
GotoHover.hs
# LANGUAGE OverloadedStrings , TemplateHaskell # HLINT ignore module GotoHover ( module GotoHover) where import Data.Text (Text, pack) import Foo (Bar, foo) data TypeConstructor = DataConstructor { fff :: Text , ggg :: Int } aaa :: TypeConstructor aaa = DataConstructor { fff = "dfgy" , ggg = 832 } bbb :: ...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/059237be0ab20375c50855b9181d38dfdc654457/ghcide/test/data/hover/GotoHover.hs
haskell
| Recognizable docs: kpqz A comment above a type defnition with a deriving clause
# LANGUAGE OverloadedStrings , TemplateHaskell # HLINT ignore module GotoHover ( module GotoHover) where import Data.Text (Text, pack) import Foo (Bar, foo) data TypeConstructor = DataConstructor { fff :: Text , ggg :: Int } aaa :: TypeConstructor aaa = DataConstructor { fff = "dfgy" , ggg = 832 } bbb :: ...
a9352c87a8622c820931d69f4c8699ab6d64c476fe756b66ee5ef10b91451545
scarvalhojr/haskellbook
section28.10-1.hs
import Criterion.Main newtype DList a = DL { unDL :: [a] -> [a] } 1 . empty :: DList a empty = DL id {-# INLINE empty #-} 2 . singleton :: a -> DList a singleton = DL . (:) # INLINE singleton # 3 . toList :: DList a -> [a] toList = ($[]) . unDL # INLINE toList # 4 . Prepend a single element to a dlist...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter28/section28.10-1.hs
haskell
# INLINE empty # -
import Criterion.Main newtype DList a = DL { unDL :: [a] -> [a] } 1 . empty :: DList a empty = DL id 2 . singleton :: a -> DList a singleton = DL . (:) # INLINE singleton # 3 . toList :: DList a -> [a] toList = ($[]) . unDL # INLINE toList # 4 . Prepend a single element to a dlist . infixr `cons` con...
4d0c0a2561ec2e7b231cb61a3dce77280e0887776a0462afd8a60e29016dd1e7
avsm/mirage-duniverse
fragments.ml
* Copyright ( c ) 2018 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/src/ipv4/fragments.ml
ocaml
insert_sorted inserts a fragment in a list, sort is by frag_start, descending input: list of (offset, fragment) with decreasing offset output: maybe a cstruct.t if there are no gaps List.hd is safe here, since we are never called with an empty list ignore reserved and don't fragment
* Copyright ( c ) 2018 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
d5c6be348d1079989d4884d97e5b37ee26155dda01293e11cd80fda7c62b7241
thesis/shale
utils.clj
(ns shale.utils (:require [clojure.walk] [clojure.string :as string] [clojure.pprint :refer [pprint]] [clj-dns.core :refer [dns-lookup]] [org.bovinegenius [exploding-fish :as uri]] [schema.core :as s] [slingshot.slingshot :refer [throw+]] ...
null
https://raw.githubusercontent.com/thesis/shale/84180532e46ee5d9ee0218138da04ea035bcf7d2/src/clj/shale/utils.clj
clojure
schema utils
(ns shale.utils (:require [clojure.walk] [clojure.string :as string] [clojure.pprint :refer [pprint]] [clj-dns.core :refer [dns-lookup]] [org.bovinegenius [exploding-fish :as uri]] [schema.core :as s] [slingshot.slingshot :refer [throw+]] ...
d5edeaaa7eda36ff9aa34e745a01ea097b5f3248cc7ac7ea23aaadbc7ed4acb6
ztellman/penumbra
clock1.clj
(ns example.wiki.clock1 (:use [penumbra.opengl]) (:require [penumbra.app :as app])) (defn draw-clock [hour minute second] (push-matrix (scale 0.5 0.5 1) (rotate 180 0 0 1) (push-matrix (rotate (* -30 (rem hour 24)) 0 0 1) (color 1 1 1) (line-width 5) (draw-lines (vertex 0 0) (vertex 0 -0...
null
https://raw.githubusercontent.com/ztellman/penumbra/db43d01c280305beab26d1004ae78b1777ab3fc7/test/example/wiki/clock1.clj
clojure
(ns example.wiki.clock1 (:use [penumbra.opengl]) (:require [penumbra.app :as app])) (defn draw-clock [hour minute second] (push-matrix (scale 0.5 0.5 1) (rotate 180 0 0 1) (push-matrix (rotate (* -30 (rem hour 24)) 0 0 1) (color 1 1 1) (line-width 5) (draw-lines (vertex 0 0) (vertex 0 -0...
e2dad2f3718c704a1ce8a6b2ee03da942797fe9662ad491ed680d0e3ea73f203
timbertson/vdoml
main.ml
module Message = struct type t = | Top of Counter.message | Bottom of Counter.message | Name of Name_field.message end open Vdoml module PairOfCounters = struct open Message type model = { top: Counter.model; bottom: Counter.model; name: Name_field.model; } let update = fun current -> function | T...
null
https://raw.githubusercontent.com/timbertson/vdoml/fcbf81e89df989206bdad4a92327e593078525b2/examples/component/main.ml
ocaml
module Message = struct type t = | Top of Counter.message | Bottom of Counter.message | Name of Name_field.message end open Vdoml module PairOfCounters = struct open Message type model = { top: Counter.model; bottom: Counter.model; name: Name_field.model; } let update = fun current -> function | T...
fd2e03226c75acb345d0398f6467e7c71318170d18b2c07b2007c7d21052c3eb
klarna-incubator/bec
bitbucket_api_SUITE.erl
-module(bitbucket_api_SUITE). -export([ all/0 , init_per_suite/1 , init_per_testcase/2 , end_per_testcase/2 , end_per_suite/1 ]). -export([ get_default_branch/1 , get_permissions_users/1 , set_default_branch/1 , get_wz_branch_reviewers/1 , get_wz...
null
https://raw.githubusercontent.com/klarna-incubator/bec/b090bfbeeff298b4fc40e16a9da217f2ce404844/test/bitbucket_api_SUITE.erl
erlang
-module(bitbucket_api_SUITE). -export([ all/0 , init_per_suite/1 , init_per_testcase/2 , end_per_testcase/2 , end_per_suite/1 ]). -export([ get_default_branch/1 , get_permissions_users/1 , set_default_branch/1 , get_wz_branch_reviewers/1 , get_wz...
3be0df8ec270e692866720cf8933d8a72a0e93293327bb24ec18a259e1c99478
g-andrade/aequitas
aequitas.erl
Copyright ( c ) 2018 - 2022 %% %% Permission is hereby granted, free of charge, to any person obtaining a %% copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation %% the rights to use, copy, modify, merge, publish, di...
null
https://raw.githubusercontent.com/g-andrade/aequitas/35c446847e2827a478844231c671e0a52bbed2c5/src/aequitas.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright not...
Copyright ( c ) 2018 - 2022 to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR ...
46440ba9069c40f7b849d4116b7b4d7cf9a9f9dc22eb864efcaf4ac3c87146a6
juspay/euler-hs
Language.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TemplateHaskell # module EulerHS.Core.Logger.Language ( Logger , LoggerMethod(..) , logMessage' ) where import EulerHS.Prelude import qualified EulerHS.Core.Types.Logger as T -- | Language for logging. data LoggerMethod next where -- | Log message ...
null
https://raw.githubusercontent.com/juspay/euler-hs/eb0be916f0ff3ca5c1deb55b3c3b325c8c927e30/src/EulerHS/Core/Logger/Language.hs
haskell
# LANGUAGE GADTs # | Language for logging. | Log message with a predefined level. "Specialise Text Tag logMessage'" forall (tag :: Text) (lvl :: T.LogLevel) (msg :: T.Message) .
# LANGUAGE TemplateHaskell # module EulerHS.Core.Logger.Language ( Logger , LoggerMethod(..) , logMessage' ) where import EulerHS.Prelude import qualified EulerHS.Core.Types.Logger as T data LoggerMethod next where LogMessage :: T.LogLevel -> !T.Tag -> !T.Message -> (() -> next) -> LoggerMet...
d26df682f2b583009fb54a6c4e5c69e2619a39312b62a80ec1df3befb3f2b2e0
imrehg/ypsilon
units.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon pango units) (export pango_units_from_double pango_units_to_double) (import (rnrs) (ypsilon ffi)) (define lib-name (co...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/pango/units.scm
scheme
int pango_units_from_double (double d) double pango_units_to_double (int i) [end]
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon pango units) (export pango_units_from_double pango_units_to_double) (import (rnrs) (ypsilon ffi)) (define lib-name (co...
1822a6ed7abf41fc8f7cc721811ae6b4543c47dcec9ae76c2b1af79e323ec420
joearms/paradis
f6.erl
-module(f6). -compile(export_all). time(N) -> {Time, _} = timer:tc(f6, time_test, [N]), Tsec = Time / 1000000, {spawned, trunc(N / Tsec), 'processes/sec'}. time_test(0) -> true; time_test(N) -> spawn(fun() -> true end), time_test(N-1). start1() -> Pid = spawn(f6, loop1, []). loop1() -> ...
null
https://raw.githubusercontent.com/joearms/paradis/62055b8db643926fd86c8b79f038beb9ac50916f/f6.erl
erlang
-module(f6). -compile(export_all). time(N) -> {Time, _} = timer:tc(f6, time_test, [N]), Tsec = Time / 1000000, {spawned, trunc(N / Tsec), 'processes/sec'}. time_test(0) -> true; time_test(N) -> spawn(fun() -> true end), time_test(N-1). start1() -> Pid = spawn(f6, loop1, []). loop1() -> ...
53b359805e13adfa0f4f2c24c7d32d008a5c67245c63bdba38d6d0d2792389c0
haskell/ghc-events
Capability.hs
module GHC.RTS.Events.Analysis.Capability ( capabilityThreadPoolMachine , capabilityThreadRunMachine , capabilityThreadIndexer , capabilityTaskPoolMachine , capabilityTaskOSMachine ) where import GHC.RTS.Events import GHC.RTS.Events.Analysis import Data.Map (Map) import qualified Data.Map as M -- | This...
null
https://raw.githubusercontent.com/haskell/ghc-events/7fdb6989e894a69d1685a71526346fd7a28d8040/src/GHC/RTS/Events/Analysis/Capability.hs
haskell
| This state machine tracks threads residing on capabilities. them. The thread already exists The thread doesn't exist may run on a capability at a time. TODO: can threads be migrated while they are running? TODO: take into account paused threads The indexer fails if a thread is inserted where one already exist...
module GHC.RTS.Events.Analysis.Capability ( capabilityThreadPoolMachine , capabilityThreadRunMachine , capabilityThreadIndexer , capabilityTaskPoolMachine , capabilityTaskOSMachine ) where import GHC.RTS.Events import GHC.RTS.Events.Analysis import Data.Map (Map) import qualified Data.Map as M Each th...
4c75c1b2a670a81d9ccee7cfdeded8de5afe25ea483e61a455433fbdcc29af73
parof/wstat
ReducedProductDomain.hs
# LANGUAGE FlexibleInstances , FlexibleContexts , MultiParamTypeClasses # module Interfaces.ReducedProductDomain where -- import Interfaces.AbstractStateDomain import Interfaces.AbstractValueDomain import Interfaces.AbstractDomain import Semantic.Atomic import SyntacticStructure.WhileGrammar import Interfaces.State a...
null
https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/src/Interfaces/ReducedProductDomain.hs
haskell
smashed bottom smashed bottom smashed bottom smashed bottom given a product state (a, b) and the constraint that a and b are state update each tuple in the product domain with the reduction of the corresponding value in a and b
# LANGUAGE FlexibleInstances , FlexibleContexts , MultiParamTypeClasses # module Interfaces.ReducedProductDomain where import Interfaces.AbstractStateDomain import Interfaces.AbstractValueDomain import Interfaces.AbstractDomain import Semantic.Atomic import SyntacticStructure.WhileGrammar import Interfaces.State as S...
b9d9de6d6776c2fbf65c1c56028d152560e3a54c76f7a64996b3719892c47764
mirage/ocaml-git
carton_git_unix.ml
open Lwt.Infix module Store = struct type 'a rd = < rd : unit ; .. > as 'a type 'a wr = < wr : unit ; .. > as 'a type 'a mode = | Rd : < rd : unit > mode | Wr : < wr : unit > mode | RdWr : < rd : unit ; wr : unit > mode type t = Fpath.t type uid = Fpath.t type 'a fd = Lwt_unix.file_descr ty...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/carton-git/carton_git_unix.ml
ocaml
ignore
open Lwt.Infix module Store = struct type 'a rd = < rd : unit ; .. > as 'a type 'a wr = < wr : unit ; .. > as 'a type 'a mode = | Rd : < rd : unit > mode | Wr : < wr : unit > mode | RdWr : < rd : unit ; wr : unit > mode type t = Fpath.t type uid = Fpath.t type 'a fd = Lwt_unix.file_descr ty...
b9708f52599559c13ce2cf22e40b40e1a3f899f71156b9317f5cd9a430636f8d
conscell/hugs-android
IOExts.hs
----------------------------------------------------------------------------- IO monad extensions : -- Suitable for use with Hugs 98 . ----------------------------------------------------------------------------- module Hugs.IOExts ( unsafePerformIO -- :: IO a -> a , unsafeInterleaveIO -- :: IO a -> IO a , per...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/hugsbase/Hugs/IOExts.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- :: IO a -> a :: IO a -> IO a instance (Eq, Read, Show) :: FilePath -> IOModeEx -> IO Handle :: FilePath -> IO String :: FilePath -> String -> IO () :: FilePath ...
IO monad extensions : Suitable for use with Hugs 98 . module Hugs.IOExts , performGC , unsafePtrEq , unsafePtrToInt , unsafeCoerce backward compatibility with IOExtensions Terminal operations ) where import Hugs.Prelude import Hugs.IO import Hugs.System ( getArgs ) import Hugs.Ptr ( Ptr ) primi...
1a9210925b7c1b439a32f3feebb1104b4dca9e8ee38436b3bd9f114d86952621
iamaleksey/oserl
test_mc.erl
Copyright ( C ) 2009 , %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% %%% o Redistributions of source code must retain the above copyright notice, %%% this list of conditions ...
null
https://raw.githubusercontent.com/iamaleksey/oserl/b254c68225b98384738c7a7ff9ddb53caa35c075/test/test_mc.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions ...
Copyright ( C ) 2009 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,...
a0711ace3cfcee35dde1e359d219453aef25a79035cc398232b1fbbd13417d7c
solita/mnt-teet
population_registry.clj
(ns teet.integration.x-road.population-registry "Population registry. See also -tee.ee/catalogue-data/ee-dev/ee-dev/GOV/70008440/rr/155.wsdl" (:require [teet.integration.x-road.core :as x-road] [clojure.data.zip.xml :as z] [teet.log :as log])) (defn rr442-request-hiccup [{:keys [instance-...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/src/clj/teet/integration/x_road/population_registry.clj
clojure
(ns teet.integration.x-road.population-registry "Population registry. See also -tee.ee/catalogue-data/ee-dev/ee-dev/GOV/70008440/rr/155.wsdl" (:require [teet.integration.x-road.core :as x-road] [clojure.data.zip.xml :as z] [teet.log :as log])) (defn rr442-request-hiccup [{:keys [instance-...
671e1305265c95bc8a0ad21c751cd1d81d24c5c30bb68713d3706afea6aa589a
bazqux/bazqux-urweb
Escape.hs
# LANGUAGE FlexibleInstances , OverloadedStrings # -- | -- Module: Network.Riak.Connection Copyright : ( c ) 2011 MailRank , Inc. License : Apache Maintainer : < > , < > -- Stability: experimental -- Portability: portable -- -- Support for REST-safe name handling. -- 's protocol buffer ...
null
https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Lib/riak-0.7.2.0/src/Network/Riak/Escape.hs
haskell
| Module: Network.Riak.Connection Stability: experimental Portability: portable Support for REST-safe name handling. link, and key names. Its REST API does not unescape names, so it accessed via the REST API (e.g. containing an embedded slash or other URL-unsafe octet). | The class of string-like typ...
# LANGUAGE FlexibleInstances , OverloadedStrings # Copyright : ( c ) 2011 MailRank , Inc. License : Apache Maintainer : < > , < > 's protocol buffer ( PBC ) API will accept , is possible to use the PBC API to construct names that can not be module Network.Riak.Escape ( Escape(.....
ddd9ac611d7ced8df22dfcc14850f8640dab658c884d518ff21d181ce67e0140
ocaml/odoc
shadowed_through_open.mli
module T : sig type t end module type T' = sig type t end type t module Through_open : sig (** . *) (** {{!t} Before-open} *) open T (** {{!t} After-open} *) end module Through_include : sig (** . *) (** {{!t} Before-include} *) include T' (** {{!t} After-include} *) end
null
https://raw.githubusercontent.com/ocaml/odoc/92b3f1dcc136bceb0a53f8baff5e462800b18b17/test/xref2/references_scope.t/shadowed_through_open.mli
ocaml
* . * {{!t} Before-open} * {{!t} After-open} * . * {{!t} Before-include} * {{!t} After-include}
module T : sig type t end module type T' = sig type t end type t module Through_open : sig open T end module Through_include : sig include T' end
d626befa3543364dddf4bdf095fc0c85d0d71003a92b55631487e4e00abc48b2
NinjaTrappeur/KeyWar
Consts.hs
# LANGUAGE TemplateHaskell # module Consts where import Codec.BMP (parseBMP) import Data.ByteString (ByteString) import Data.ByteString.Lazy (fromStrict) import Data.FileEmbed (embedDir) import Data.Either.Extra (fromR...
null
https://raw.githubusercontent.com/NinjaTrappeur/KeyWar/967db7880d715605bf9ab0de43e39f85153b9318/src/Consts.hs
haskell
# LANGUAGE TemplateHaskell # module Consts where import Codec.BMP (parseBMP) import Data.ByteString (ByteString) import Data.ByteString.Lazy (fromStrict) import Data.FileEmbed (embedDir) import Data.Either.Extra (fromR...
046d4ea6a61228fa71a61c312d1639e692a7e7b471782149c7188db566b60262
choener/BiobaseXNA
Constraint.hs
-- | Simple oldstyle RNAfold constraints. A constraint yields a bonus or -- malus to energy. module Biobase.Secondary.Constraint where import Data.Char (toLower) import Data.Primitive.Types import Prelude as P import qualified Data.Vector.Generic as VG import qualified Data.Vector.Gener...
null
https://raw.githubusercontent.com/choener/BiobaseXNA/ebec70a3906106a50c29cdbbce9a3247d6ebb15f/Biobase/Secondary/Constraint.hs
haskell
| Simple oldstyle RNAfold constraints. A constraint yields a bonus or malus to energy. | We can create a constraint from different sources. | A constraint is nothing more than a vector of constraint characters together with a possible pairing for each character. energies can be included in all pair-creating funct...
module Biobase.Secondary.Constraint where import Data.Char (toLower) import Data.Primitive.Types import Prelude as P import qualified Data.Vector.Generic as VG import qualified Data.Vector.Generic.Mutable as VGM import qualified Data.Vector.Unboxed as VU import Data.Primitive...
a5d64296b376f4dbbcca6b6675ea1eaa99e000f953089e2b47f5ccad633d4dfe
co-log/co-log
Contra.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE CPP # | Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > This module contains ' LogAction ' orphan instances of @contravariant@ classes . Copyright: (c) 2018-2022 Kowainik SPDX-License-Identifier: MPL-2.0 M...
null
https://raw.githubusercontent.com/co-log/co-log/ba32023230ce8d54641a412754d7df475bb4cd4b/src/Colog/Contra.hs
haskell
# INLINE (>$) # # INLINE divide # # INLINE choose #
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE CPP # | Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > This module contains ' LogAction ' orphan instances of @contravariant@ classes . Copyright: (c) 2018-2022 Kowainik SPDX-License-Identifier: MPL-2.0 M...
c079d8d2e8354c2029b7f51297385d9bc5c06887423a8bc90c4960f9e6cf3bc6
serokell/ariadne
Vty.hs
module Ariadne.UI.Vty ( UiFace(..) , createAriadneUI ) where import qualified Brick as B import Brick.BChan import Control.Monad.Component (ComponentM, buildComponent_) import qualified Graphics.Vty as V import Ariadne.Logging (Logging, logDebug) import Ariadne.UI.Vty.App import Ariadne.UI.Vty.Fa...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ui/vty-lib/src/Ariadne/UI/Vty.hs
haskell
* a record of methods for interacting with the UI from other threads Run the Ariadne UI. This action should be run in its own thread to provide a responsive interface, and the application should exit when this action completes. 1. Draw the widgets. 2. Wait for user input. 3. Update the app state (handle t...
module Ariadne.UI.Vty ( UiFace(..) , createAriadneUI ) where import qualified Brick as B import Brick.BChan import Control.Monad.Component (ComponentM, buildComponent_) import qualified Graphics.Vty as V import Ariadne.Logging (Logging, logDebug) import Ariadne.UI.Vty.App import Ariadne.UI.Vty.Fa...
a5b825b1afbcd9d03aca54f2e060b16f004411fb0e9747472ccc489b4dd5cc43
oscoin/oscoin
CLI.hs
# OPTIONS_GHC -fno - warn - orphans # module Oscoin.Test.CLI ( tests ) where import Oscoin.Prelude import Database.SQLite.Simple.Orphans () import Oscoin.CLI.KeyStore import qualified Oscoin.Crypto.PubKey as Crypto import Oscoin.Test.CLI.Helpers import Oscoin....
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Oscoin/Test/CLI.hs
haskell
For the CLI, at the moment, we can test only against the Crypto.
# OPTIONS_GHC -fno - warn - orphans # module Oscoin.Test.CLI ( tests ) where import Oscoin.Prelude import Database.SQLite.Simple.Orphans () import Oscoin.CLI.KeyStore import qualified Oscoin.Crypto.PubKey as Crypto import Oscoin.Test.CLI.Helpers import Oscoin....
a5a1ba0d8dddceafea7feba7264c8c053849e8a8533d3f0fe9f384a278995948
marcelog/erlami
erlami_app.erl
Application descriptor for the application . %%% Copyright 2012 < > %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may obtain a copy of the License at %%% %%% -2.0 %%% %%% Unless required by applicable ...
null
https://raw.githubusercontent.com/marcelog/erlami/c2d9c46c9de987431b382a19ad883d597a2abf26/src/erlami_app.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Application descriptor for the application . Copyright 2012 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erlami_app). -author("Marcelo Gornstein <>"). -github(""). -homepage("/"). -license("Apache Licen...
c1a02f584eb52386c2b57784447ab7a6e43cc9e36aebdc2997f4ef27a7b24b27
markcox80/specialization-store
standard-store-glue-layer.lisp
;; Not the best check. Some would say that the wine has increased my ;; apathy. (unless (eql *package* (find-package "SPECIALIZATION-STORE.TESTS.SYNTAX-LAYER")) (error "This file can only be processed using SPECIALIZATION-STORE.TESTS::PROCESS-SYNTAX-LAYER-TESTS")) (glue-layer-test ensure-store/initial (test ensure...
null
https://raw.githubusercontent.com/markcox80/specialization-store/8d39a866a6f24986aad3cc52349e9cb2653496f3/tests/standard-store-glue-layer.lisp
lisp
Not the best check. Some would say that the wine has increased my apathy.
(unless (eql *package* (find-package "SPECIALIZATION-STORE.TESTS.SYNTAX-LAYER")) (error "This file can only be processed using SPECIALIZATION-STORE.TESTS::PROCESS-SYNTAX-LAYER-TESTS")) (glue-layer-test ensure-store/initial (test ensure-store (is-false (fboundp 'my-function)) (is-false (find-store 'my-funct...
f14cd132ceb9563d0602ade1bbf0e2dbe9364a057d357748474130f27a44247f
thvnx/mlmpfr
rndo_add.ml
This file is part of mlmpfr . mlmpfr 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 3 of the License , or ( at your option ) any later version . mlmpfr is distribut...
null
https://raw.githubusercontent.com/thvnx/mlmpfr/3311b0d3bfda2c9b6b9812f85fbc7c734e02a19a/examples/rndo_add.ml
ocaml
Direct translation of mpfr's examples/rndo-add.c, local build with: ocamlc -I ../_build/src -custom -o rndo-add \ ../_build/src/mpfr.cmo rndo-add.ml ../_build/src/mlmpfr_stubs.o \ -ccopt -L/usr/local/lib -cclib -lmpfr -w -24
This file is part of mlmpfr . mlmpfr 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 3 of the License , or ( at your option ) any later version . mlmpfr is distribut...
955c66120cdbd7fe3dfc2bcd71bfc105f4211218657079b0051452ffbbdcdb1a
exercism/babashka
lucians_luscious_lasagna_test.clj
(ns lucians-luscious-lasagna-test (:require [clojure.test :refer [deftest testing is]] lucians-luscious-lasagna)) (deftest expected-time-test (is (= 40 lucians-luscious-lasagna/expected-time))) (deftest remaining-time-test (is (= 15 (lucians-luscious-lasagna/remaining-time 25)))) (deftest prep-time...
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/lucians-luscious-lasagna/test/lucians_luscious_lasagna_test.clj
clojure
(ns lucians-luscious-lasagna-test (:require [clojure.test :refer [deftest testing is]] lucians-luscious-lasagna)) (deftest expected-time-test (is (= 40 lucians-luscious-lasagna/expected-time))) (deftest remaining-time-test (is (= 15 (lucians-luscious-lasagna/remaining-time 25)))) (deftest prep-time...
a5b54fd805b88a70ca8b33fc1e0bd137b9f8b3c6b5f7eec87f6db392f880e894
VisionsGlobalEmpowerment/webchange
utils.cljs
(ns webchange.utils.audio-analyzer.utils (:require [clojure.edn :as edn] [clojure.string :as s] [webchange.utils.forty-two :as forty-two])) (defn- next-row [previous current other-seq] (reduce (fn [row [diagonal above other]] (let [update-val (if (= other current) d...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/bceda8ea1c42425fdba88b8eb171ba8f4a5a55ea/src/cljs/webchange/utils/audio_analyzer/utils.cljs
clojure
(ns webchange.utils.audio-analyzer.utils (:require [clojure.edn :as edn] [clojure.string :as s] [webchange.utils.forty-two :as forty-two])) (defn- next-row [previous current other-seq] (reduce (fn [row [diagonal above other]] (let [update-val (if (= other current) d...
cb5357a6c9762c790c28ac3b78d90607390d63b8ee924b9dcdca7558dfb819c4
aigarashi/copl-tools
keywords.ml
open Parser let v = [ (* game-specific keywords *) (":", COLON); (* ML1 expressions *) ("true", TRUE); ("false", FALSE); ("if", IF); ("then", THEN); ("else", ELSE); ("*", AST); ("+", CROSS); ("-", HYPHEN); ("<", LT); ML2 judgments and expressions ("|-", VDASH); (",", COMMA); ("let...
null
https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/PolyTypingML3/keywords.ml
ocaml
game-specific keywords ML1 expressions TypingML2 types ML3 expressions ML4 expressions
open Parser let v = [ (":", COLON); ("true", TRUE); ("false", FALSE); ("if", IF); ("then", THEN); ("else", ELSE); ("*", AST); ("+", CROSS); ("-", HYPHEN); ("<", LT); ML2 judgments and expressions ("|-", VDASH); (",", COMMA); ("let", LET); ("in", IN); ("=", EQ); ("int", INT); ...
2ec9f94876383594547a2e73d2c951fe663b5730af373929aa36953cf807a966
bdeket/rktsicm
ghelper.rkt
#lang racket/base (provide (all-defined-out)) (require (only-in "../../rkt/glue.rkt" if rktsicm-logger default-object default-object?) "arity.rkt") (define-logger generics #:parent rktsicm-logger) ;*************************************************************************************************** ;* ...
null
https://raw.githubusercontent.com/bdeket/rktsicm/6ca85270646e41577db7f2fb5e8b1775ea0cc5dc/rktsicm/sicm/kernel/cstm/ghelper.rkt
racket
*************************************************************************************************** * * *************************************************************************************************** at the end of the br...
#lang racket/base (provide (all-defined-out)) (require (only-in "../../rkt/glue.rkt" if rktsicm-logger default-object default-object?) "arity.rkt") (define-logger generics #:parent rktsicm-logger) branch needs to keep order . Newest checks are added to the front . When adding branches , the widest ( any ? ...
c8fb12259d65fdf81a2c158d2ad955937e3b80635359003d77583c9ec8819d76
rururu/rete4frames
grid5x5-p1.clj
((size value 5) (possible row 1 column 1 value 13 group 1 id 1) (possible row 1 column 2 value any group 1 id 2) (possible row 1 column 3 value 4 group 1 id 3) (possible row 1 column 4 value 14 group 1 id 4) (possible row 1 column 5 value any group 1 id 5) (possible row 2 column 1 value 21 group 1 id 6) (possible row...
null
https://raw.githubusercontent.com/rururu/rete4frames/b4c19af125db0918c1cf57240b1dafd768ffc52a/examples/sudoku/grid5x5-p1.clj
clojure
((size value 5) (possible row 1 column 1 value 13 group 1 id 1) (possible row 1 column 2 value any group 1 id 2) (possible row 1 column 3 value 4 group 1 id 3) (possible row 1 column 4 value 14 group 1 id 4) (possible row 1 column 5 value any group 1 id 5) (possible row 2 column 1 value 21 group 1 id 6) (possible row...
2c000431ac4cbb8027e88df63c98e86c946c5fcbdcc60d1a38734187a18cc8f6
adam-james-v/scripts
clj-to-svg.clj
#!/usr/bin/env bb (babashka.deps/add-deps '{:deps {borkdude/spartan.spec {:git/url "" :sha "e5c9f40ebcc64b27b3e3e83ad2a285ccc0997097"} svg-clj/svg-clj {:local/root "/Users/adam/dev/svg-clj"}} :classpath-overrides {org.clojure/clojure nil org.clojure/sp...
null
https://raw.githubusercontent.com/adam-james-v/scripts/d91dc28b6e4946233fe675cc306af3343cc11204/build/clj-to-svg.clj
clojure
#!/usr/bin/env bb (babashka.deps/add-deps '{:deps {borkdude/spartan.spec {:git/url "" :sha "e5c9f40ebcc64b27b3e3e83ad2a285ccc0997097"} svg-clj/svg-clj {:local/root "/Users/adam/dev/svg-clj"}} :classpath-overrides {org.clojure/clojure nil org.clojure/sp...
4ae275d924db684c840d32c2c55c65b2da83042fb84e67c779452883c5571add
travelping/gen_netlink
gen_netlink_app.erl
Copyright 2010 - 2012 , Travelping GmbH < > %% Permission is hereby granted, free of charge, to any person obtaining a %% copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation %% the rights to use, copy, modify, merge,...
null
https://raw.githubusercontent.com/travelping/gen_netlink/90247a76c39884061e87bb65a7d54a9856132b69/src/gen_netlink_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"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright notice...
Copyright 2010 - 2012 , Travelping GmbH < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI...
068e9ca0d07ceecd1a4c2caa7099fe74a5532cb29cc45684fbca841eaabd03ee
objecthub/swift-lispkit
Topological.scm
;;; Topological sort ;;; ;;; Function `topological-sort` returns a topologically sorted list of vertices for a given directed acyclic graph . The algortihm is inspired by " Introduction to Algorithms " , chapter 22.4 , by Cormen , Leiserson , Rivest , and ( 2009 ) . ;;; A graph is represented by a list of subli...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Sources/LispKit/Resources/Examples/Topological.scm
scheme
Topological sort Function `topological-sort` returns a topologically sorted list of vertices for vertex. The remaining elements of the sublist define all vertices that are adjacent i.e. for these vertices , there exists an edge to the first vertex . `topological-sort` sorts an acyclic directed graph such that f...
a given directed acyclic graph . The algortihm is inspired by " Introduction to Algorithms " , chapter 22.4 , by Cormen , Leiserson , Rivest , and ( 2009 ) . A graph is represented by a list of sublists . The first element of each sublist is a This is the example from Cormen , Leiserson , Rivest , and : P...
4a69abafbd391dc45f3efaed0acd2b0bacd9d7f362f3a46ef28ff0584e361b63
igorhvr/bedlam
formatst.scm
" formatst.scm " SLIB FORMAT Version 3.0 conformance test Written by ( ) ; ; This code is in the public domain. ;; Test run: (slib:load "formatst") ; Failure reports for various scheme interpreters: ; ; SCM4d ; None. Elk 2.2 : ; None. MIT C - Scheme 7.1 : ; The empty list is always evaluated as a boo...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/formatst.scm
scheme
This code is in the public domain. Test run: (slib:load "formatst") Failure reports for various scheme interpreters: SCM4d None. None. The empty list is always evaluated as a boolean and consequently represented as `#f'. Scheme->C 01nov91: None, if format:symbol-case-conv and format:iobj-case-conv...
" formatst.scm " SLIB FORMAT Version 3.0 conformance test Written by ( ) Elk 2.2 : MIT C - Scheme 7.1 : (require 'format) (if (not (string=? format:version "3.1")) (begin (display "You have format version ") (display format:version) (display ". This test is for format version 3.0!")...
263f8977d26df635794f58728986a7f31f0b356a1dcfac75994e8e980d48daa3
casperschipper/ocaml-cisp
cisp1.ml
open Cisp open Midi control < pre><code > ----------begin_max5_patcher---------- 593.3ocuWtsiaBCDF9Z3ovhqSW4CbHouJUUqLAqTuELQFy1TsZe2q8XftsgP HD1bCVdvw+9yy3eSdKLHJu9jnIB8Uz2PAAuEFD.gbAB55GDUwOsuj2.CKRI9 Uc9KQa7uxHNY7gqMh5VCJGQ6e2QtY+OjpCOqE6MdIXwrmvaPzcacMo6fNzmv nu28aTsURUov . Zw5BJK.Irx9ExvraGoUu9ghc...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/arpegAugust/cisp1.ml
ocaml
open Cisp open Midi control < pre><code > ----------begin_max5_patcher---------- 593.3ocuWtsiaBCDF9Z3ovhqSW4CbHouJUUqLAqTuELQFy1TsZe2q8XftsgP HD1bCVdvw+9yy3eSdKLHJu9jnIB8Uz2PAAuEFD.gbAB55GDUwOsuj2.CKRI9 Uc9KQa7uxHNY7gqMh5VCJGQ6e2QtY+OjpCOqE6MdIXwrmvaPzcacMo6fNzmv nu28aTsURUov . Zw5BJK.Irx9ExvraGoUu9ghc...
586b53a216b1b946e858e05af7895e964e631344dad6534bea8cd00c06f01aa0
RaphaelJ/friday
Specialize.hs
# OPTIONS_GHC -fno - warn - orphans # | @SPECIALIZE@ pragma declarations for HSV images . module Vision.Image.HSV.Specialize () where import Data.Int import Vision.Histogram (Histogram, histogram, histogram2D) import Vision.Image.HSV.Type (HSV) import Vision.Image.Transform ( InterpolMethod, crop, resize, ho...
null
https://raw.githubusercontent.com/RaphaelJ/friday/13c6bb16bb04856e0cb226726017e7a7ad502cb5/src/Vision/Image/HSV/Specialize.hs
haskell
# SPECIALIZE histogram2D :: DIM5 -> HSV -> Histogram DIM5 Int32 , DIM5 -> HSV -> Histogram DIM5 Double , DIM5 -> HSV -> Histogram DIM5 Float # # SPECIALIZE crop :: Rect -> HSV -> HSV # # SPECIALIZE resize :: InterpolMethod -> Size -> HSV -> H...
# OPTIONS_GHC -fno - warn - orphans # | @SPECIALIZE@ pragma declarations for HSV images . module Vision.Image.HSV.Specialize () where import Data.Int import Vision.Histogram (Histogram, histogram, histogram2D) import Vision.Image.HSV.Type (HSV) import Vision.Image.Transform ( InterpolMethod, crop, resize, ho...
0f4ebd432822b7b2239372c2bc9b176f192f52568bab4c1208e7cda71bfe6970
icicle-lang/zebra-ambiata
test.hs
import Disorder.Core.Main import qualified Test.Zebra.Factset.Block import qualified Test.Zebra.Factset.Data import qualified Test.Zebra.Foreign.Block import qualified Test.Zebra.Foreign.Entity import qualified Test.Zebra.Foreign.Merge import qualified Test.Zebra.Foreign.Table import qualified Test.Zebra.Mer...
null
https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/test/test.hs
haskell
import Disorder.Core.Main import qualified Test.Zebra.Factset.Block import qualified Test.Zebra.Factset.Data import qualified Test.Zebra.Foreign.Block import qualified Test.Zebra.Foreign.Entity import qualified Test.Zebra.Foreign.Merge import qualified Test.Zebra.Foreign.Table import qualified Test.Zebra.Mer...
b0edd7f2729a96a125e7dfc6d9ff1ff64a9401cf9a801fa160f93edec045eaa1
martinsumner/leveled
leveled_rand.erl
%% Generalized random module that offers a backwards compatible API %% around some of the changes in rand, crypto and for time units. -module(leveled_rand). %% API -export([ uniform/0, uniform/1, seed/0, rand_bytes/1 ]). %%%=================================================...
null
https://raw.githubusercontent.com/martinsumner/leveled/a033e280e67931582cc9625993268db126abb4ff/src/leveled_rand.erl
erlang
Generalized random module that offers a backwards compatible API around some of the changes in rand, crypto and for time units. API =================================================================== New (r19+) rand style functions ===================================================================
-module(leveled_rand). -export([ uniform/0, uniform/1, seed/0, rand_bytes/1 ]). uniform() -> rand:uniform(). uniform(N) -> rand:uniform(N). seed() -> ok. rand_bytes(Size) -> crypto:strong_rand_bytes(Size).
3bfcd2907dd45cbaef2c927956234b23aee52cef8acd68ec380459981bddf8ba
yansh/MoanaML
rete_irmin.ml
* Copyright ( c ) 2015 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS...
null
https://raw.githubusercontent.com/yansh/MoanaML/c9843c10a0624e1c06e185e3dd1e7d877270d0d7/Rete/rete_irmin.ml
ocaml
Values are Strings * module Store = create list of tuples from view create view from list of tuples let p=print_endline (Yojson.Basic.to_string (to_json () tpl)) in print_tuples (Lwt_unix.run (t_of_view v)); Store.View.of_path...
* Copyright ( c ) 2015 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS...
c3e2a9d27cf054c3c1cafaff568477b0a9e3dfa5d680309c4c97ddc3b5ac851c
manavpatnaik/haskell
13_square_even_nums.hs
squareEvenNumsOnly :: [Int] -> [Int] squareEvenNumsOnly [] = [] squareEvenNumsOnly (x:xs) | even x = x*x : squareEvenNumsOnly xs | otherwise = squareEvenNumsOnly xs sqEvenNums1 :: [Int] -> [Int] sqEvenNums1 [] = [] sqEvenNums1 (x:xs) | even x = x*x : sqEvenNums1 xs | otherwise = x : sqEvenNums1 xs sq...
null
https://raw.githubusercontent.com/manavpatnaik/haskell/85be0b7130619c6e5e815a69e66cd366c3e6cb21/higher_order_functions/13_square_even_nums.hs
haskell
squareEvenNumsOnly :: [Int] -> [Int] squareEvenNumsOnly [] = [] squareEvenNumsOnly (x:xs) | even x = x*x : squareEvenNumsOnly xs | otherwise = squareEvenNumsOnly xs sqEvenNums1 :: [Int] -> [Int] sqEvenNums1 [] = [] sqEvenNums1 (x:xs) | even x = x*x : sqEvenNums1 xs | otherwise = x : sqEvenNums1 xs sq...
802626ad07da77dff0429526e1c2a5d98c6b23800625a7dd7093ac7af9232ccc
Feuerlabs/kvdb
kvdb_diff.erl
%%%---- BEGIN COPYRIGHT ------------------------------------------------------- %%% Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one ...
null
https://raw.githubusercontent.com/Feuerlabs/kvdb/c8c71bf5422a8fa2e58c608c65629be7a58e27f3/src/kvdb_diff.erl
erlang
---- BEGIN COPYRIGHT ------------------------------------------------------- ---- END COPYRIGHT --------------------------------------------------------- @hidden @doc Simple diff algorithm @end diff to parts of a config tree like: A = <<"/devices/123/config/candidate">> B = <<"/devices/123/config/running...
Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. @author @author < > -module(kvdb_diff). -compile(export_all). [ {...
36efc04c7b442ea967dec40fc50910033f5b05bcbed41b1b4d14468dca4826ba
ScrambledEggsOnToast/Kachushi
Decision.hs
# LANGUAGE TupleSections , FlexibleContexts # module Kachushi.Decision ( chooseFirstFive , chooseOne ) where import Grabble.Grabble import Kachushi.Cards (Card (..)) import Kachushi.OFCP (Board (..), FilledBoard (..), Row (..), Slot (..), toBoard, scoreGame) import Kachushi.KState (KState (..), boards, deck, ...
null
https://raw.githubusercontent.com/ScrambledEggsOnToast/Kachushi/9894aca20d3c9d8545eb8542586126d4e05bcc6b/Kachushi/Decision.hs
haskell
------------------------- Instances ------------------------- ------------------------- Constructors ------------------------- ------------------------- -------------------------
# LANGUAGE TupleSections , FlexibleContexts # module Kachushi.Decision ( chooseFirstFive , chooseOne ) where import Grabble.Grabble import Kachushi.Cards (Card (..)) import Kachushi.OFCP (Board (..), FilledBoard (..), Row (..), Slot (..), toBoard, scoreGame) import Kachushi.KState (KState (..), boards, deck, ...