_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
ed41687371e45d929b3e9be8cc8c09eef9815620fb77fe47444161d18e539b00
mflatt/shrubbery-rhombus-0
syntax-color.rkt
#lang racket/base (require "lex.rkt" "lex-comment.rkt" syntax-color/racket-lexer syntax-color/lexer-contract racket/symbol) (provide shrubbery-lexer shrubbery-text-mode-lexer) (define (shrubbery-lexer in pos status) (let-values ([(tok type paren start end backup status) ...
null
https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/053aad1079ccfdb383180e4ed8e6204bc1e10095/shrubbery/syntax-color.rkt
racket
#lang racket/base (require "lex.rkt" "lex-comment.rkt" syntax-color/racket-lexer syntax-color/lexer-contract racket/symbol) (provide shrubbery-lexer shrubbery-text-mode-lexer) (define (shrubbery-lexer in pos status) (let-values ([(tok type paren start end backup status) ...
7258675b9dfdbcb492a6ce7c5966f80dc5dadb6b941657d3aa8841330d601e76
fortytools/holumbus
Worker.hs
module Main ( main ) where import Holumbus.MapReduce.Examples.SimpleDMapReduceIO import Holumbus.MapReduce.Examples.Pi import System.Log main :: IO () main = worker piMap piReduce [("Holumbus.MapReduce.Types",INFO),("measure",ERROR)]
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Pi/Pi_2/Worker.hs
haskell
module Main ( main ) where import Holumbus.MapReduce.Examples.SimpleDMapReduceIO import Holumbus.MapReduce.Examples.Pi import System.Log main :: IO () main = worker piMap piReduce [("Holumbus.MapReduce.Types",INFO),("measure",ERROR)]
98cb963bc6d4ee13edd7b035ae67d8431d85e245d570bd9eab5709efd3a69d99
bobzhang/ocaml-book
basic.ml
let _ = print_endline "basic" * assert_failure , assert_equal , @ ? , assert_raises , skip_if , todo , cmp_float bracket assert_failure, assert_equal, @?, assert_raises, skip_if, todo, cmp_float bracket *) let test_result = OUnit.( run_test_tt ("test-suite" >::: [...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/_build/basic.ml
ocaml
*Remark
let _ = print_endline "basic" * assert_failure , assert_equal , @ ? , assert_raises , skip_if , todo , cmp_float bracket assert_failure, assert_equal, @?, assert_raises, skip_if, todo, cmp_float bracket *) let test_result = OUnit.( run_test_tt ("test-suite" >::: [...
33cea330df86faad161b7071ab4a5087c1adb503f8233714bfe15e7c8d075cee
stuarthalloway/programming-clojure
sequences.clj
(ns examples.sequences (:use examples.utils clojure.set clojure.xml)) START : song (def song {:name "Agnus Dei" :artist "Krzysztof Penderecki" :album "Polish Requiem" :genre "Classical"}) ; END:song START : compositions (def compositions #{{:name "The Art of the Fugue" :composer "J. S. Bach"} ...
null
https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/src/examples/sequences.clj
clojure
END:song END:compositions TODO: add pretty-print that works with book margins. END: sets don't do this! END:mutable-re END:filter END:clojure-loc END:xml-seq
(ns examples.sequences (:use examples.utils clojure.set clojure.xml)) START : song (def song {:name "Agnus Dei" :artist "Krzysztof Penderecki" :album "Polish Requiem" :genre "Classical"}) START : compositions (def compositions #{{:name "The Art of the Fugue" :composer "J. S. Bach"} {:name "...
db3024caf55fbb7eac622f7630a7c9125fb4e57dd413344ad9bde0002bc17660
strint/sicpAns
1006_sqrt_b_test_recursion_depth.scm
(define (xysqrt in count) (sqrt-iter 1.0 in count)) (define (sqrt-iter guess x count) (begin (display count) (newline) (new-if (good-enough? guess x) guess (sqrt-iter (improve guess x) x (+ count 1))))) (define (new-if pred if-then if-else) (cond (pred if-then) ...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/1.1.7-8_SquareRoot/1006_sqrt_b_test_recursion_depth.scm
scheme
(define (xysqrt in count) (sqrt-iter 1.0 in count)) (define (sqrt-iter guess x count) (begin (display count) (newline) (new-if (good-enough? guess x) guess (sqrt-iter (improve guess x) x (+ count 1))))) (define (new-if pred if-then if-else) (cond (pred if-then) ...
f964d5fe262bb54c4b21b0be388fed7ab599079e3b3d30d3182e8f43678409c2
mhkoji/Senn
server.lisp
(defpackage :senn.fcitx.server (:use :cl) (:export :handle-request)) (in-package :senn.fcitx.server) (defun format-resp (resp) (destructuring-bind (consumed-p view) resp (format nil "~A ~A" (if consumed-p 1 0) (if (and consumed-p view) view "NONE")))) (defun handle-request (stateful-...
null
https://raw.githubusercontent.com/mhkoji/Senn/062de8d0b71619a154c7c217e8e22dff88093511/senn/src/fcitx/server.lisp
lisp
(defpackage :senn.fcitx.server (:use :cl) (:export :handle-request)) (in-package :senn.fcitx.server) (defun format-resp (resp) (destructuring-bind (consumed-p view) resp (format nil "~A ~A" (if consumed-p 1 0) (if (and consumed-p view) view "NONE")))) (defun handle-request (stateful-...
0407bd22c63f5b1daa43ff668888b9a5c9d77702533b84b505a4f2d07ca28714
AndrasKovacs/ELTE-func-lang
Ora9_Pre.hs
{-# OPTIONS_GHC -Wincomplete-patterns -Wmissing-methods #-} # LANGUAGE DeriveFunctor , , DeriveTraversable , InstanceSigs # module Ora9 where import Control.Applicative import Control.Monad import Data.Functor import Data.Char import Data.Foldable import Data.List newtype Parser a = Parser { runParser :: String -> M...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/4d620afa4acfdbeed068e2b63b2a338e8d3c0219/2022-23-1/gyak2/Ora9_Pre.hs
haskell
# OPTIONS_GHC -Wincomplete-patterns -Wmissing-methods # nem üres teljes kifejezés parseolása teljes kifejezés parseolása Segédfüggvények: Ugyanaz mint a rightAssoc csak balra A chain függvények ezt megoldják Több kifejezés ugyanazon a szinten:
# LANGUAGE DeriveFunctor , , DeriveTraversable , InstanceSigs # module Ora9 where import Control.Applicative import Control.Monad import Data.Functor import Data.Char import Data.Foldable import Data.List newtype Parser a = Parser { runParser :: String -> Maybe (String, a) } deriving Functor instance Applicative Pa...
cc38c1e2f1a9888598a4b9ab81fb58a42a1561fb4c20dfb268237312c52ea2c6
circleci/stefon
stefon.clj
(ns stefon.test.asset.stefon (:require [stefon.test.helpers :as h] [clojure.java.io :as io] [stefon.settings :as settings] [stefon.asset :as asset] [stefon.path :as path] [stefon.asset.stefon :as stefon] [stefon.util :refer (dump)]) (:use [cloj...
null
https://raw.githubusercontent.com/circleci/stefon/7c36114923ef7ec41316e22354d2e31217a1a416/stefon-core/test/stefon/test/asset/stefon.clj
clojure
To ensure this test is actually effective, we added enough files to have a high degree of certainty that its sorted on Linux. We also chose files is case-insensitive, so below E.js will be in the middle of the list on relative file path non-specific file paths trailing slash requires all files under that director...
(ns stefon.test.asset.stefon (:require [stefon.test.helpers :as h] [clojure.java.io :as io] [stefon.settings :as settings] [stefon.asset :as asset] [stefon.path :as path] [stefon.asset.stefon :as stefon] [stefon.util :refer (dump)]) (:use [cloj...
e83f49677eb0a4fa52e1150c80c29231432309ce3c7698acce021111ba9df0a1
cvogt/2020-07-01-haskell-game-demo
Main.hs
module Main where import qualified LiveCodingDemo.Main import My.IO main :: IO () main = do LiveCodingDemo.Main.main
null
https://raw.githubusercontent.com/cvogt/2020-07-01-haskell-game-demo/f90fcd19ea79802774dcfafe8505415d6f8c8a8b/live-coding-demo/Main.hs
haskell
module Main where import qualified LiveCodingDemo.Main import My.IO main :: IO () main = do LiveCodingDemo.Main.main
146099b2434762034d2a1b3f6ab8dcbd9adcae84770a0a7f93f9c70566c74ec3
dong50252409/behavior3erl
behavior_tree.erl
-module(behavior_tree). -compile([inline]). %%-------------------------------------------------------------------- %% include %%-------------------------------------------------------------------- -include("behavior3.hrl"). %%-------------------------------------------------------------------- %% export API %%-------...
null
https://raw.githubusercontent.com/dong50252409/behavior3erl/b4f1f040656f97519c89ea35109f37406e8c7d12/src/core/behavior_tree.erl
erlang
-------------------------------------------------------------------- include -------------------------------------------------------------------- -------------------------------------------------------------------- export API -------------------------------------------------------------------- 指定生成行为树模块名。默认自动生成,但可能存...
-module(behavior_tree). -compile([inline]). -include("behavior3.hrl"). -export([load_tree_file/1, load_tree_file/2, execute/2, execute_child/3, unload_tree_mod/1]). -type option() :: tree_mod()|dump()|compile:option(). 载入行为树 -spec load_tree_file(JSONConfig :: file:name_all()) -> {ok, TreeMod :: module()} | {...
efec81134449f2d5d76bdbac899e4b0dbed581e770084c308faaf2e7abddddb6
danprince/wireworld
settings.cljs
(ns wireworld.settings) (def size 20) (def colors {:empty "#333333" :wire "#efb949" :tail "#ef4949" :head "#49d0ef" :selection "rgba(255, 255, 255, 0.3)"})
null
https://raw.githubusercontent.com/danprince/wireworld/3bca90781fb958121208a0f70a7ff3e9154694d8/src/wireworld/settings.cljs
clojure
(ns wireworld.settings) (def size 20) (def colors {:empty "#333333" :wire "#efb949" :tail "#ef4949" :head "#49d0ef" :selection "rgba(255, 255, 255, 0.3)"})
2e665fec09b450441596e0c15e9b9630e2c5b4d4f9dacb52d66ba95492169186
naoiwata/sicp
4.1.3.scm
;; ;; @author naoiwata SICP Chapter4 ;; 4.1.3 Evaluator Data Structures ;; (define (true? x) (not (eq? x #f))) (define (false? x) (eq? (x #f))) (define (make-procedure parameters body env) (list 'procedure parameters body env)) (define (compound-procedure? p) (tagged-list? p 'procedure)) (define (proced...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter4/pages/4.1.3.scm
scheme
@author naoiwata 4.1.3 Evaluator Data Structures
SICP Chapter4 (define (true? x) (not (eq? x #f))) (define (false? x) (eq? (x #f))) (define (make-procedure parameters body env) (list 'procedure parameters body env)) (define (compound-procedure? p) (tagged-list? p 'procedure)) (define (procedure-parameters p) (cadr p)) (define (procedure-body p) (c...
e9d571d587ad77daaa99a4e8eac127d122391b307a8d53e75d05ab753a8f9405
unclebob/ubc-website
product_page.clj
(ns ubc-website.presenters.product-page (:require [ubc-website.presenters.util :refer [markdown]])) (defn present-product [product] (update product :product-description markdown))
null
https://raw.githubusercontent.com/unclebob/ubc-website/c1298df6db0759d77cc8bd4a1bad2de62de1cfcd/src/ubc_website/presenters/product_page.clj
clojure
(ns ubc-website.presenters.product-page (:require [ubc-website.presenters.util :refer [markdown]])) (defn present-product [product] (update product :product-description markdown))
d9c4232f9cb1f2605df4d23051f4f2ee8a9ec5f32f06baafea2361c6ba419dfa
purescript/purescript
Label.hs
module Language.PureScript.Label (Label(..)) where import Prelude import GHC.Generics (Generic) import Codec.Serialise (Serialise) import Control.DeepSeq (NFData) import Data.Monoid () import Data.String (IsString(..)) import qualified Data.Aeson as A import Language.PureScript.PSString (PSString) -- | -- Labels are...
null
https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Label.hs
haskell
| Labels are used as record keys and row entry names. Labels newtype PSString
module Language.PureScript.Label (Label(..)) where import Prelude import GHC.Generics (Generic) import Codec.Serialise (Serialise) import Control.DeepSeq (NFData) import Data.Monoid () import Data.String (IsString(..)) import qualified Data.Aeson as A import Language.PureScript.PSString (PSString) because records ...
96941a804aebc515e536b5ee63fc78782025dec5f9b1dd5d13c9c6623808865b
rsnikhil/Forvis_RISCV-ISA-Spec
Read_Hex_File.hs
Copyright ( c ) 2018 -- See LICENSE for license details module Read_Hex_File where -- ================================================================ This code is adapted from MIT 's riscv - semantics repo -- This module implements a function that reads a hex-memory file -- and returns a memory (i.e., list o...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/ZZ_OLD/v2/Read_Hex_File.hs
haskell
See LICENSE for license details ================================================================ This module implements a function that reads a hex-memory file and returns a memory (i.e., list of (addr, byte)). ================================================================ Project imports None ===============...
Copyright ( c ) 2018 module Read_Hex_File where This code is adapted from MIT 's riscv - semantics repo Standard Haskell imports import System.IO import Data.Char import Data.Word import Data.Bits import Numeric (showHex, readHex) Read a Mem - Hex file ( each datum should represent one byte ) read_h...
5ac9d393784693a06e3514f99be11d0a6e049169e3ce929ad87314c873ba140b
caisah/sicp-exercises-and-examples
ex_2.37.scm
;; Suppose we represent vectors v = (vi) as sequences of numbers, and matrices m = (mij) ;; as sequences of vectors (the rows of the matrix). For example, the matrix 1 2 3 4 4 5 6 6 6 7 8 9 is represented as the sequence ( ( 1 2 3 4 ) ( 4 5 6 6 ) ( 6 7 8 9 ) ) . With this repres...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.2.3-sequences_as_conventional_interfaces/ex_2.37.scm
scheme
Suppose we represent vectors v = (vi) as sequences of numbers, and matrices m = (mij) as sequences of vectors (the rows of the matrix). For example, the matrix we can use sequence operations to concisely express the basic matrix and vector operations. These operations (which are described in any book on matrix alge...
1 2 3 4 4 5 6 6 6 7 8 9 is represented as the sequence ( ( 1 2 3 4 ) ( 4 5 6 6 ) ( 6 7 8 9 ) ) . With this representation ( matrix-*-matrix m n ) returns the matrix p , where pij = sum mik nkj matrix operations . ( The procedure accumulate - n is defined in Ex 2.36 ) ...
f7291b350f8758cce7da2133441ac3d99a240898462f1ffaa964afee9c1c5b0c
codedownio/sandwich
Bar.hs
module UnitTests.Bar where import Test.Sandwich tests :: TopSpec tests = it "tests bar" $ do 2 `shouldBe` 2
null
https://raw.githubusercontent.com/codedownio/sandwich/950991e34f15f5bee5b258bb828b0cce4eb2b4ab/demos/demo-discover/app/UnitTests/Bar.hs
haskell
module UnitTests.Bar where import Test.Sandwich tests :: TopSpec tests = it "tests bar" $ do 2 `shouldBe` 2
27de23ba00663aeb3335b559155608a0465b1bc9d218d4f2a3e2a4104f6ad5b3
cnuernber/dtype-next
binary_pred.clj
(ns tech.v3.datatype.binary-pred) (defmacro make-boolean-predicate [opname op] `(let [~'x 1 ~'y 2] ~op)) (defmacro make-numeric-binary-predicate [opname scalar-op object-op] `(let [~'x 1 ~'y 2] ~scalar-op ~object-op))
null
https://raw.githubusercontent.com/cnuernber/dtype-next/4e43212942aafa0145640cf6b655bb83855f567d/resources/clj-kondo.exports/cnuernber/dtype-next/tech/v3/datatype/binary_pred.clj
clojure
(ns tech.v3.datatype.binary-pred) (defmacro make-boolean-predicate [opname op] `(let [~'x 1 ~'y 2] ~op)) (defmacro make-numeric-binary-predicate [opname scalar-op object-op] `(let [~'x 1 ~'y 2] ~scalar-op ~object-op))
d3f4187a9b69fef0a96db0e0a9f71f6bd23c6487c1c68317183d0b61ee0b018f
Clojure2D/clojure2d-examples
hittable.clj
(ns rt4.in-one-weekend.ch09a.hittable (:require [fastmath.core :as m] [fastmath.vector :as v] [rt4.in-one-weekend.ch09a.interval :as interval])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol HittableProto (hit [object r ray...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch09a/hittable.clj
clojure
(ns rt4.in-one-weekend.ch09a.hittable (:require [fastmath.core :as m] [fastmath.vector :as v] [rt4.in-one-weekend.ch09a.interval :as interval])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol HittableProto (hit [object r ray...
db9822ac59e1623e5dc8bc506ce0d859c44c4b66533650256b64a3a06cd903a6
basho/riaknostic
riaknostic_check_monitors.erl
%% ------------------------------------------------------------------- %% riaknostic - automated diagnostic tools for Riak %% Copyright ( c ) 2011 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 ...
null
https://raw.githubusercontent.com/basho/riaknostic/dad8939d0ef32fbf435d13697720223293195282/src/riaknostic_check_monitors.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 permissi...
riaknostic - automated diagnostic tools for Riak Copyright ( c ) 2011 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...
d126d578f70721d346d1948066acf651df17aca220d2301e5f1d1c107e412632
kelamg/HtDP2e-workthrough
ex66.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex66) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex66.rkt
racket
about the language level of this file in a form that our tools can easily process. structures
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex66) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct movie (title producer year)) (define avengers (make...
fe37872ad478e312a536943a64733b999b50b2a60cd784445f6d2fda736687d6
objecthub/swift-lispkit
Vectors.scm
;;; Vectors.scm ;;; Regression test data ;;; Author : Copyright © 2019 ObjectHub . All rights reserved . ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; -2.0 ;;...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Tests/LispKitTests/Code/Vectors.scm
scheme
Vectors.scm Regression test data 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 fo...
Author : Copyright © 2019 ObjectHub . All rights reserved . distributed under the License is distributed on an " AS IS " BASIS , ( "Basic vectors" (3 3 3 0 1 2 3 #(1 2 3) #(1 2 3) #(1 2 3) #() #(1) #t #t #t #f #f #f #t) (define v0 #(1 2 3)) (define v1 (vector 1 2 3)) (define v2 (make-vector 3)) (ve...
0d4cf325410f2a75c02e69f68d769f782eb8b22e5cab6fa86f8b09c0aa5c5126
BranchTaken/Hemlock
test_empty.ml
open! Basis.Rudiments open! Basis open Deq let test () = let t = empty in File.Fmt.stdout |> Fmt.fmt "empty = " |> (pp Uns.pp) t |> Fmt.fmt "\n" |> ignore let _ = test ()
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/deq/test_empty.ml
ocaml
open! Basis.Rudiments open! Basis open Deq let test () = let t = empty in File.Fmt.stdout |> Fmt.fmt "empty = " |> (pp Uns.pp) t |> Fmt.fmt "\n" |> ignore let _ = test ()
2a2f5ac0182a06815eeb4bce7743540c65d4aa2bef9c86e0917cf7f780a7ea4a
karen/haskell-book
Intermission.hs
# LANGUAGE InstanceSigs # import Control.Applicative(liftA2) newtype Compose f g a = Compose { getCompose :: f (g a) } deriving (Eq, Show) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose fga) = Compose $ (fmap . fmap) f fga instance (Applicative f, Applicative g) => ...
null
https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch25/Intermission.hs
haskell
# LANGUAGE InstanceSigs # import Control.Applicative(liftA2) newtype Compose f g a = Compose { getCompose :: f (g a) } deriving (Eq, Show) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose fga) = Compose $ (fmap . fmap) f fga instance (Applicative f, Applicative g) => ...
f247be6588ac75628571db3cefb3d399c73b425f3446bbf2990e5f8a31dd9fdf
ghc/nofib
Main.hs
import Control.Parallel import Control.Parallel.Strategies import System.Environment -- version of N-queens originally from nofib/imaginary/queens, parallelised by . main = do [n] <- fmap (fmap read) getArgs print (nqueens n) nqueens :: Int -> Int nqueens nq = length (pargen 0 []) where safe :: Int -> ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/queens/Main.hs
haskell
version of N-queens originally from nofib/imaginary/queens, parallelised
import Control.Parallel import Control.Parallel.Strategies import System.Environment by . main = do [n] <- fmap (fmap read) getArgs print (nqueens n) nqueens :: Int -> Int nqueens nq = length (pargen 0 []) where safe :: Int -> Int -> [Int] -> Bool safe x d [] = True safe x d (q:l) = x /= q &...
9500b819f5d9dc50c569a72e08a1759e36c6b615d75edac1fd11eb0486400f3a
reasonml/reason
ge_50.ml
let error_of_exn exn = match Location.error_of_exn exn with | Some (`Ok exn) -> Some exn | Some `Already_displayed -> None | None -> None let get_load_paths () = Load_path.get_paths () let load_path_init l = let auto_include find_in_dir fn = if !Clflags.no_std_include then raise Not_found el...
null
https://raw.githubusercontent.com/reasonml/reason/3f433821d93bdc8f85677d4ee5d276ff6551c777/src/vendored-omp/src/compiler-functions/ge_50.ml
ocaml
let error_of_exn exn = match Location.error_of_exn exn with | Some (`Ok exn) -> Some exn | Some `Already_displayed -> None | None -> None let get_load_paths () = Load_path.get_paths () let load_path_init l = let auto_include find_in_dir fn = if !Clflags.no_std_include then raise Not_found el...
69028cf378a9cb056c6f052b6744644fdf0adf4061b7b5304b1e447928fff79d
s-cerevisiae/leetcode-racket
208-implement-trie.rkt
#lang racket (struct node (end? children) #:transparent #:mutable) (define (make-leaf) (node #f (make-hash))) (define trie% (class object% (super-new) (define root (make-leaf)) (define/public (insert word) (define last-node (for/fold ([node root]) ([c (in-string word)])...
null
https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/a81da53755debd5efec2d95f7c311d230ac5b3f4/208-implement-trie.rkt
racket
#lang racket (struct node (end? children) #:transparent #:mutable) (define (make-leaf) (node #f (make-hash))) (define trie% (class object% (super-new) (define root (make-leaf)) (define/public (insert word) (define last-node (for/fold ([node root]) ([c (in-string word)])...
3db6d0601a0ac641aa433fd87e315d71f45627da4c961a93db568aa795addc23
lowasser/TrieMap
Tests.hs
module Data.TrieMap.Representation.Instances.ByteString.Tests where import Data.TrieMap.Representation.Instances.ByteString () import Data.TrieMap.Representation.Class import Data.TrieMap.Representation.Tests import Data.TrieMap.Arbitrary () import Data.ByteString import Test.QuickCheck tests :: Property tests = pri...
null
https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/Representation/Instances/ByteString/Tests.hs
haskell
module Data.TrieMap.Representation.Instances.ByteString.Tests where import Data.TrieMap.Representation.Instances.ByteString () import Data.TrieMap.Representation.Class import Data.TrieMap.Representation.Tests import Data.TrieMap.Arbitrary () import Data.ByteString import Test.QuickCheck tests :: Property tests = pri...
d64c31eb183b98b0b466806be0c11a4f4124b95b1d991792d3931f5bcb51c3b6
mhayashi1120/Gauche-net-twitter
core.scm
(define-module net.twitter.core (use gauche.parameter) (use net.oauth) (export <twitter-cred> <twitter-api-error> <twitter-timeout-error> twitter-use-https )) (select-module net.twitter.core) (define twitter-use-https (make-parameter #t)) ;; Credential ;; (define-class <twitter-cred> (<oauth-cred>...
null
https://raw.githubusercontent.com/mhayashi1120/Gauche-net-twitter/b9f4be3ca8459fc662f9c79481411aac03b51133/src/net/twitter/core.scm
scheme
Condition for error response
(define-module net.twitter.core (use gauche.parameter) (use net.oauth) (export <twitter-cred> <twitter-api-error> <twitter-timeout-error> twitter-use-https )) (select-module net.twitter.core) (define twitter-use-https (make-parameter #t)) Credential (define-class <twitter-cred> (<oauth-cred>) ()...
2a8167408767bad58ba4bc48724b8ba168dcb318c6c3ed7e2b146db0e93dbfa6
bondy-io/bondy
bondy_event_handler_watcher.erl
%% ============================================================================= %% bondy_promethues_event_handler.erl - %% Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance wit...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_event_handler_watcher.erl
erlang
============================================================================= bondy_promethues_event_handler.erl - 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...
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(bondy_event_handler_watcher). -behaviour(gen_server). -include_lib("kernel/include/logger.hrl"). -in...
430af24993096ce2cdb9dcdca6588e043a98f8ad9458a4d1b69b9664544a9cc6
ncalca/principles-of-programming-languages
es2.rkt
#lang racket < > - 22/03/2013 ; Map on a vector (define (my-map-vector v f) (let loop ([pos 0]) (if (< pos (vector-length v)) (cons (f (vector-ref v pos)) (loop (+ pos 1))) '()))) Initialize a matrix with with the given number of rows and colums and element ; as the default element (defi...
null
https://raw.githubusercontent.com/ncalca/principles-of-programming-languages/34d0aa2d62af9faaefae8761deab503cc532cf6f/es2/es2.rkt
racket
Map on a vector as the default element Counts the number of elements within an arbitrarily nested list Computes the powerset of a given list xs recomputation of the powerset twice) Define a struct for an event with x,y space coordinates a name and the number of participants Procedure that raises an error if the...
#lang racket < > - 22/03/2013 (define (my-map-vector v f) (let loop ([pos 0]) (if (< pos (vector-length v)) (cons (f (vector-ref v pos)) (loop (+ pos 1))) '()))) Initialize a matrix with with the given number of rows and colums and element (define (make-matrix rows cols fill) (let ([ve...
7dc53437fa15fe404e28a01893c8907c69512d1e7f4f136e3a6725e3a3558099
jgoerzen/missingpy
AnyDBM.hs
{-# OPTIONS -fallow-overlapping-instances #-} arch - tag : Interface to anydbm.py Copyright ( C ) 2005 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the Lice...
null
https://raw.githubusercontent.com/jgoerzen/missingpy/ab857768341f172c2b2e2bd496a97290c9fa3d46/MissingPy/AnyDBM.hs
haskell
# OPTIONS -fallow-overlapping-instances # ^ Open an /existing/ database for read only ^ Open an /existing/ database for reading and writing ^ Open a database for reading and writing, creating if it doesn't exist ^ Open a database, creating it anew each time (deleting any existing data) ^ Python module name to use ...
arch - tag : Interface to anydbm.py Copyright ( C ) 2005 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later versio...
97e965144ba62612ea09daa9f82d08f70aa4b37818b470e3647db43c9ada4f4f
reactiveml/rml
form.ml
Js_of_ocaml library * / * Copyright ( C ) 2011 * Laboratoire PPS - CNRS Université Paris Diderot * * This program 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 , with linking ...
null
https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/lib/form.ml
ocaml
shouldn't happen
Js_of_ocaml library * / * Copyright ( C ) 2011 * Laboratoire PPS - CNRS Université Paris Diderot * * This program 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 , with linking ...
4ab07483cd4aaaec5e496ed734e1d15f9526c99fb3f691fdb66c4a98c31c104d
portkey-cloud/aws-clj-sdk
_2016-09-07.clj
(ns portkey.aws.cloudfront.-2016-09-07 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "cloudfront", :region "us-east-1"}, :ssl-common-name "cloudfront.amazonaws.com", :endpoint "", :signature-version :v4}, "eu-west-1" {:credential-scope {:service "cloudf...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/cloudfront/_2016-09-07.clj
clojure
(ns portkey.aws.cloudfront.-2016-09-07 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "cloudfront", :region "us-east-1"}, :ssl-common-name "cloudfront.amazonaws.com", :endpoint "", :signature-version :v4}, "eu-west-1" {:credential-scope {:service "cloudf...
ecf1bf4bff8d6863b5a851be0a527eba4d9131b23d49e61518df76895953a4bf
avsm/platform
bench.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and (* ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/ocamlgraph.1.8.8%2Bdune/tests/bench.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and modify it under the terms of the GNU Library General Public License version 2 , with the special exception on linking open Form...
a26eabbf22f28ba238e7eb8e0d3c4d651e7c235b7fe62b07ca15bb1f55f5c952
rizo/snowflake-os
translmod.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/bytecomp/translmod.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Misc open Asttypes open ...
34095d8420041749147c99adbee51ca1134e55e8f4498b19b3675d3f58b9514b
erlyaws/yaws
yapp_handler.erl
%%%------------------------------------------------------------------- %%% File : yapp_handler.erl @author < > @since 1 Jun 2006 by < > %%% @see yapp %%% @see yapp_registry %%% @see yapp_server %%% @doc Yaws applications handler. < p > An easy way to deploy Yaws applications ( Yapps ) independently of ...
null
https://raw.githubusercontent.com/erlyaws/yaws/d54b360aebe1130c8ecb39cd54acd7487be7ef24/applications/yapp/src/yapp_handler.erl
erlang
------------------------------------------------------------------- File : yapp_handler.erl @see yapp @see yapp_registry @see yapp_server @doc Yaws applications handler. instance erlmerge. </p> <p> yapp_handler:add(yapp_handler, "myvirtserverid","/myYappPath", my_app_name) </code> <p>where "myvirtserverid...
@author < > @since 1 Jun 2006 by < > < p > An easy way to deploy Yaws applications ( Yapps ) independently of each other . A Yapp is an Erlang application already installed , by for To register a Yapp on the virtual server uses the command ( > < code > yapp_server_id = < p > If Yaws...
f79b6429d0e0cc2701ab824e1bbe1f6dcbb17887ca11d8c574e58eca45522079
fdopen/uwt
uwt_log.mli
Lightweight thread library for OCaml * * Interface Lwt_log * Copyright ( C ) 2002 < > * 2009 < > * * This program 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 Fou...
null
https://raw.githubusercontent.com/fdopen/uwt/44276aa6755b92eddc9ad58662a968afad243e8b/src-log/uwt_log.mli
ocaml
* Logging facility * This module provides functions to deal with logging. It extends {!Lwt_log_core} with Unix features. It adds: - logging to the syslog daemon - logging to a channel (stderr, stdout, ...) - logging to a file * Same as {!Lwt_log_core.render}, except that the template may also con...
Lightweight thread library for OCaml * * Interface Lwt_log * Copyright ( C ) 2002 < > * 2009 < > * * This program 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 Fou...
8b2034c89c234aa00b216dbfd8020c11fbd905c02f6c378a26abc37a28a6c5ba
kpblc2000/KpblcLispLib
_kpblc-dcl-create-file.lsp
(defun _kpblc-dcl-create-file () ;| * Получение полного имени файла для dcl-диалога |; (strcat (_kpblc-get-path-temp) "\\dlg.dcl") ) ;_ end of defun
null
https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/49d1d9d29078b4167cc65dc881bea61b706c620d/lsp/dcl/_kpblc-dcl-create-file.lsp
lisp
| _ end of defun
(defun _kpblc-dcl-create-file () * Получение полного имени файла для dcl-диалога (strcat (_kpblc-get-path-temp) "\\dlg.dcl")
230133732b56b6fdbd35abe0db10b7c32349d2a86ec3484216ed2a9bac8212b2
8c6794b6/guile-tjit
t-nest-31.scm
;;; Loop containing string related procedures, from `string' benchmark. ;;; Iteration count is made enough big to trigger a garbage collection. (define s "abcdef") (define (grow) (set! s (string-append "123" s "456" s "789")) (set! s (string-append (substring s (quotient (string-length s) 2) (string-le...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-nest-31.scm
scheme
Loop containing string related procedures, from `string' benchmark. Iteration count is made enough big to trigger a garbage collection.
(define s "abcdef") (define (grow) (set! s (string-append "123" s "456" s "789")) (set! s (string-append (substring s (quotient (string-length s) 2) (string-length s)) (substring s 0 (+ 1 (quotient (string-length s) 2))))) s) (define (trial n) (do ((i 0 (+ i 1))) ((> (string-lengt...
de6b0620926fd6153200dca6fd06f51214c5cd83eb55cc404096c9d4a840ad07
discus-lang/salt
DeclTest.hs
module Salt.Core.Check.Module.DeclTest where import Salt.Core.Check.Module.Base import Salt.Core.Check.Term.Base import Salt.Core.Check.Type.Base import qualified Salt.Data.List as List import qualified Data.Set as Set --------------------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Check/Module/DeclTest.hs
haskell
------------------------------------------------------------------------------------------------- | Check test declarations. (t-decl-kind) ------------------------------------------ (t-decl-type) ------------------------------------------ (t-decl-eval-type) ------------------------------------- (t-decl-eval-term) ...
module Salt.Core.Check.Module.DeclTest where import Salt.Core.Check.Module.Base import Salt.Core.Check.Term.Base import Salt.Core.Check.Type.Base import qualified Salt.Data.List as List import qualified Data.Set as Set checkDeclTest :: CheckDecl a checkDeclTest _a ctx (DTest (DeclTestKind a' bWatch n t)) = d...
cc5e18d453984b5938656afca4725fbea1d6b0acaa0ee80a5a65f7a489c95eca
clojure/core.typed
util_aliases.clj
(ns clojure.core.typed.test.util-aliases (:require [clojure.core.typed :as t])) (t/defalias MyName (t/HMap :mandatory {:a (t/Value 1)})) (t/defalias MapName (t/HMap :mandatory {:a MyName})) (t/defalias MapStruct1 (t/HMap :mandatory {:type (t/Value :MapStruct1) :a MyName}))...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/util_aliases.clj
clojure
(ns clojure.core.typed.test.util-aliases (:require [clojure.core.typed :as t])) (t/defalias MyName (t/HMap :mandatory {:a (t/Value 1)})) (t/defalias MapName (t/HMap :mandatory {:a MyName})) (t/defalias MapStruct1 (t/HMap :mandatory {:type (t/Value :MapStruct1) :a MyName}))...
9011112ce681adc010875264b1743107b68539cf321a1857faf371e0683eac4f
microsoft/SLAyer
SymbolicHeap.ml
Copyright ( c ) Microsoft Corporation . All rights reserved . (** Symbolic Heap formulas *) open Library open Type open Variable open Expression module E = Exp module O = Off module HC = HashCons module S = Substitution open SYMBOLIC_HEAP module L = (val Log.std Config.vSH : Log.LOG) (* Timing ==============...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/SymbolicHeap.ml
ocaml
* Symbolic Heap formulas Timing =================================================================== Params====================================================================== Formal Parameters of List Segment Patterns ============================================================================ ...
Copyright ( c ) Microsoft Corporation . All rights reserved . open Library open Type open Variable open Expression module E = Exp module O = Off module HC = HashCons module S = Substitution open SYMBOLIC_HEAP module L = (val Log.std Config.vSH : Log.LOG) let normalize_tmr = Timer.create "SH.normalize" let n...
8f43ca69b8cc44cca9573cde4a65012ef846293030a8464e47de23f9a53246a3
databrary/databrary
Boot.hs
# LANGUAGE TemplateHaskell , QuasiQuotes , DataKinds # module Model.Notification.Boot ( makeNotice ) where import Data.Int (Int16) import Data.Ix (Ix) import Data.Typeable (Typeable) import Database.PostgreSQL.Typed.Query (pgSQL) import qualified Language.Haskell.TH as TH import Service.DB useTDB makeNotice :: ...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Notification/Boot.hs
haskell
# LANGUAGE TemplateHaskell , QuasiQuotes , DataKinds # module Model.Notification.Boot ( makeNotice ) where import Data.Int (Int16) import Data.Ix (Ix) import Data.Typeable (Typeable) import Database.PostgreSQL.Typed.Query (pgSQL) import qualified Language.Haskell.TH as TH import Service.DB useTDB makeNotice :: ...
efd9d6088e2c1e2ebfc6ebf63ce767877891b7e3147ad6389f5dcb22c59494b8
gerritjvv/fileape
io_util.clj
(ns ^{:doc "Random io util functions for the io and io-plugin namespaces"} fileape.util.io-util (:require [fileape.parquet.writer :as parquet-writer] [clojure.string :as string] [clojure.java.io :as io]) (:import (java.io DataOutputStream FileOutputStream BufferedOutputStream File) ...
null
https://raw.githubusercontent.com/gerritjvv/fileape/be8859fea1745e572463b658f8eb057aa46fe46d/src/fileape/util/io_util.clj
clojure
delete the file because the parquet open file will create it and fail if the file exists
(ns ^{:doc "Random io util functions for the io and io-plugin namespaces"} fileape.util.io-util (:require [fileape.parquet.writer :as parquet-writer] [clojure.string :as string] [clojure.java.io :as io]) (:import (java.io DataOutputStream FileOutputStream BufferedOutputStream File) ...
8be062004763e720a8675427f6ddae7f3301717424dc91aebad130a87affd37e
alexandergunnarson/quantum
generative.cljc
(ns ^{:doc "Various collections functions. Includes better versions of the following than clojure.core: for, doseq, repeat, repeatedly, range, merge, count, vec, reduce, into, first, second, rest, last, butlast, get, pop, peek ... and more. Many of them are aliased ...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/collections/generative.cljc
clojure
TODO technically you can define `repeat` in terms of `repeatedly`; how to optimize though? ===== REPEAT ===== ; ===== REPEATEDLY ===== ; ===== RANGE ===== ;
(ns ^{:doc "Various collections functions. Includes better versions of the following than clojure.core: for, doseq, repeat, repeatedly, range, merge, count, vec, reduce, into, first, second, rest, last, butlast, get, pop, peek ... and more. Many of them are aliased ...
da00998cc3ccfbef11800336365edd3f6320ef73ef89d873ad2690558f28e206
NecklaceTeam/necklace
ContextAnalyzerSpec.hs
module ContextAnalyzerSpec (spec) where import SpecHelper ( hspec, describe, it, shouldBe, Spec ) import qualified ContextAnalysis.Analyzer as ANZ import qualified ContextAnalysis.AnalyzerTypes as ANT import qualified Necklace.AST as AST import ContextAnalysis.Analyzer (analyzeFunction, emptyContext, validateFunction)...
null
https://raw.githubusercontent.com/NecklaceTeam/necklace/d2d633310603846816e194c4dfb493df666bb7e2/test/ContextAnalyzerSpec.hs
haskell
module ContextAnalyzerSpec (spec) where import SpecHelper ( hspec, describe, it, shouldBe, Spec ) import qualified ContextAnalysis.Analyzer as ANZ import qualified ContextAnalysis.AnalyzerTypes as ANT import qualified Necklace.AST as AST import ContextAnalysis.Analyzer (analyzeFunction, emptyContext, validateFunction)...
57fcbf6647905398a7ed18e73e29c85c92834478cfafd3032faa61c87d1179ed
emilypi/nonempty-vector
NonEmpty.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE Rank2Types #-} # LANGUAGE Trustworthy # -- | Module : Data . Vector . NonEmpty Copyright : ( c ) 2019 - 2020 -- License : BSD-style -- Maintainer : < > -- Stability : Experimental Portability : , CPP -- -- A library for non-empty boxed vectors (that...
null
https://raw.githubusercontent.com/emilypi/nonempty-vector/3ae9eb60877d36614ad48ae7c8ac8a9b3eff3e5a/src/Data/Vector/NonEmpty.hs
haskell
# LANGUAGE Rank2Types # | License : BSD-style Stability : Experimental A library for non-empty boxed vectors (that is, polymorphic arrays capable of * mutable * immutable This library attempts to provide support for all standard 'Vector' operations in the API, with some slight variation in types and impl...
# LANGUAGE NoImplicitPrelude # # LANGUAGE Trustworthy # Module : Data . Vector . NonEmpty Copyright : ( c ) 2019 - 2020 Maintainer : < > Portability : , CPP holding any value ) . Non - empty vectors come in two flavors : of ' NonEmptyVector ' . Credit to Roman Leshchinskiy for the orig...
beb805c2e8477be521d65da55842abc09312c536c25e926136f2ce4fead68d33
phaul/chess
Evaluation.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE MultiWayIf #-} -- | Chess evalution module Chess.Evaluation ( evaluate -- * Evaluation configuration , EvaluationConfig , kingSafetyAttackingKnights , kingSafetyRayAttacks , castlePawnValue , rookOnSeventh ...
null
https://raw.githubusercontent.com/phaul/chess/b9c71a0389ed44360caed4b830208ce346211cb8/Chess/Evaluation.hs
haskell
# LANGUAGE MultiWayIf # | Chess evalution * Evaluation configuration ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------------------...
# LANGUAGE TemplateHaskell # module Chess.Evaluation ( evaluate , EvaluationConfig , kingSafetyAttackingKnights , kingSafetyRayAttacks , castlePawnValue , rookOnSeventh , rookOnOpen , rookOnSemiOpen ...
134d293fcdf18f7a031b876f038f9b8c2aa44395ab34b70cc68b4905c3f2eddd
herd/herdtools7
RISCVParseTest.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/fe441a353ded7436e771043d5a5cd17730548da3/herd/RISCVParseTest.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2023 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
cdf358220090c26f30a1938aa57c9e42ead7d84fb22702692835918b6d5011c8
ghcjs/ghcjs-dom
SVGFitToViewBox.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.SVGFitToViewBox (js_getViewBox, getViewBox, js_getPreserveAspectRatio, getPrese...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGFitToViewBox.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.SVGFitToViewBox (js_getViewBox, getViewBox, js_getPreserveAspectRatio, getPreserveAspectRatio, SVGFitToViewBox(..), gTypeSVGFitToViewBox, IsSVGFitToViewBox, toSVGFitToVie...
81858da331ffd8e9f9b06e81db589df64fc87166d0eddab04eb5d255d0421569
ocamllabs/ocaml-effects
warnings.ml
(***********************************************************************) (* *) (* OCaml *) (* *) Pierre Weis...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/utils/warnings.ml
ocaml
********************************************************************* OCaml ...
Pierre Weis & & Damien Doligez , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . When you change this , you...
aa9c68682d86bc1b5218e26e3a2e30b812238e4fef7305dcabd83e62c0639b7c
tlaplus/tlapm
alexer.mli
Lexer interface . Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) open Pars open Tla_parser (** Lex a channel *) val lex_channel: string -> Stdlib.in_channel -> Token.token LazyList.t * Loc.locus (** Main lexing function *)...
null
https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/alexer.mli
ocaml
* Lex a channel * Main lexing function * For debugging: lexing function that takes a string as input. NOTE: does not handle the beginning-of-file stuff.
Lexer interface . Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) open Pars open Tla_parser val lex_channel: string -> Stdlib.in_channel -> Token.token LazyList.t * Loc.locus val lex: string -> Token.token LazyList.t * ...
e155bba425ac78442367ff668b7bb4b15bcb7e992658cd784a0519c7d552d6e9
Ericson2314/lighthouse
Fix.hs
----------------------------------------------------------------------------- -- | Module : Control . . Fix Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- Maintainer : -- Stabilit...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/base/Control/Monad/Fix.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable --------------------------------------------------------------------------- :: (a -> m a) -> m a :: (...
Module : Control . . Fix Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2002 Monadic fixpoints . For a detailed discussion , see thesis , /Value Recursion in Monadic Computations/ , Oregon Graduate Institute , 2002 . module Control.Monad.Fix ( M...
74db00cc2128a4183b0e0d3022ba2ee3c38bc792b6511d5c44f3d2c4603cce0b
helium/ebus
ebus.erl
-module(ebus). -behavior(gen_server). %% gen_server -export([start_link/1, init/1, stop/2, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). %% API -export([system/0, session/0, starter/0, unique_name/1, request_name/2, request_name/3, release_name/2, rule_to_string/1, a...
null
https://raw.githubusercontent.com/helium/ebus/e10cee3aa66705d05c38412245c5c78c956e8fd2/src/ebus.erl
erlang
gen_server API Allow another service to become the primary owner if requested. Request to replace the current primary owner. If we can not become the primary owner do not place us in the queue. Service has become the primary owner of the requested name. Service could not become the primary owner and has been pla...
-module(ebus). -behavior(gen_server). -export([start_link/1, init/1, stop/2, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). -export([system/0, session/0, starter/0, unique_name/1, request_name/2, request_name/3, release_name/2, rule_to_string/1, add_match/2, remove_ma...
dc544ddd59d98faf2aea04291bd3173cec8151d3a118a271a0b177b13b56fef0
fsestini/zsyntax
Command.hs
module Zsyntax.CLI.Command where import Data.Foldable import Text.Parsec.Char import Text.Parsec.Prim (unexpected) import Text.Parsec hiding (State, token) import Text.Parsec.String import Text . Parsec import Text . ParserCombinators . Parsec import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinator...
null
https://raw.githubusercontent.com/fsestini/zsyntax/761a4e42b05cd77bfcd6160165562baf20ca4697/zsyntax-cli/src/Zsyntax/CLI/Command.hs
haskell
------------------------------------------------------------------------------ Command parsing ^ Loading a file executes all commands in it, so that their effects act on the state of the system at the moment the file is loaded. ^ Opening a file executes all commands in it, after having reset the system to an initi...
module Zsyntax.CLI.Command where import Data.Foldable import Text.Parsec.Char import Text.Parsec.Prim (unexpected) import Text.Parsec hiding (State, token) import Text.Parsec.String import Text . Parsec import Text . ParserCombinators . Parsec import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinator...
05da29e083e84dfd31e73896f17df095db8b62e43f90308a19bd76bc566df0e6
Spivoxity/obc-3
gObj.ml
(**************************************************************************) (* Lablgtk *) (* *) (* This program is free software; you can redistribute it *) and/or ...
null
https://raw.githubusercontent.com/Spivoxity/obc-3/49e37c4f391cd1aa16ef4d4d89c342b6c49b7d61/lablgtk3/gObj.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...
e894364018d681e397c3d6dd2e9c8acd9313e8956da6b11e08a890f417ff55d5
kqr/gists
simple-syntax-of-haskell.hs
While syntax might look complicated , it is really a lot simpler than it looks at first glance . Excerpt from A History of : -- | Haskell has 21 reserved keywords that can not be used as names | for values or types . This is a relatively low number ( Erlang | has 28 , OCaml has 48 , Java has 50 , C++ has ...
null
https://raw.githubusercontent.com/kqr/gists/b0b5ab2a6af0f939a9e24165959bb362281ce897/articles/simple-syntax-of-haskell.hs
haskell
and Miranda has have defined (or used other peoples definitions of) many very, very clever functions which do amazing things with minimal code. Defining such functions is not possible in all languages, so people coming from less powerful languages are used to functions doing pretty ordinary stuff, and leaving t...
While syntax might look complicated , it is really a lot simpler than it looks at first glance . Excerpt from A History of : | Haskell has 21 reserved keywords that can not be used as names | for values or types . This is a relatively low number ( Erlang | only 10 ) This is an indication of the syntax ...
20e02be3296e04f3cb1d3198da979a977e474994873bd88c0b010164bfe3f773
vagarenko/static-tensor
Static.hs
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE DataKinds #-} # LANGUAGE KindSignatures # {-# LANGUAGE TypeOperators #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE FlexibleContexts #-} ...
null
https://raw.githubusercontent.com/vagarenko/static-tensor/39afd42ad6a9986eae9cac865607464aa36b3936/src/Data/Matrix/Static.hs
haskell
# LANGUAGE TypeSynonymInstances # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE DeriveGeneric # # LANGUAGE DeriveAnyClass # # LANGUAGE TemplateHaskell # # LANGUAGE StandaloneDeriving # # LAN...
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE KindSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE GADTs # See Copyright : (...
3e4e14be1f604dd160969d05f950ef23cb2e3b51582484a5450048d7174a4fd5
lambdabot/lambdabot
Poll.hs
# LANGUAGE TypeFamilies # -- | Module: Poll -- | Support for voting -- | -- | License: lGPL -- | | added by ( boegel ) , 22/11/2005 -- | inspiration: Where plugin (thanks shapr,dons) module Lambdabot.Plugin.Social.Poll (pollPlugin) where import Lambdabot.Plugin import qualified Data.ByteString.Char8 as P import D...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-social-plugins/src/Lambdabot/Plugin/Social/Poll.hs
haskell
| Module: Poll | Support for voting | | License: lGPL | | inspiration: Where plugin (thanks shapr,dons) ---------------------------------------------------------------------- ---------------------------------------------------------------------- -------------------------------------------------------------------...
# LANGUAGE TypeFamilies # | added by ( boegel ) , 22/11/2005 module Lambdabot.Plugin.Social.Poll (pollPlugin) where import Lambdabot.Plugin import qualified Data.ByteString.Char8 as P import Data.List import qualified Data.Map as M newPoll :: Poll newPoll = (True,[]) appendPoll :: Choice -> Poll -> (Maybe Poll) ...
ca9db71a8ffe4ff0fe7bfda0af2ff4a109ed492013b27e34a674ef03d28e7982
ckirkendall/enfocus-charts
utils.cljs
(ns enfocus.charts.utils (:require [enfocus.core :as ef] [goog.dom :as dom] [goog.style :as style] [goog.graphics :as gg] [goog.userAgent :as ua])) (def hide-style (.-strobj {"style" "visibility: hidden; position: absolute; top: -100px; left: 0px;"})) (defn get-radiu...
null
https://raw.githubusercontent.com/ckirkendall/enfocus-charts/902becf3465d8328ff76e60b037f05bb8365aa1e/cljs-src/enfocus/charts/utils.cljs
clojure
(ns enfocus.charts.utils (:require [enfocus.core :as ef] [goog.dom :as dom] [goog.style :as style] [goog.graphics :as gg] [goog.userAgent :as ua])) (def hide-style (.-strobj {"style" "visibility: hidden; position: absolute; top: -100px; left: 0px;"})) (defn get-radiu...
ec9e6fbee44732446b19f313da3be0c9d36aa303c52b4f373cb9c63263f5c0f8
CRogers/obc
error.mli
* error.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 . Redistributions ...
null
https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/compiler/error.mli
ocaml
no_loc -- unidentified location here -- location of current lookahead token syn_error -- report syntax error at specified location syn_error2 -- syntax error with extra location sem_error -- report semantic error sem_context -- give corroborative detail sem_warn -- report semantic warning sem_extend -- w...
* error.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 . Redistributions ...
453fad72115858df064941e60652b4bfbcd545d309c391ba3e9a7e049843ef44
nklein/FFT
regression.lisp
(require :asdf) #+sbcl (require :sb-aclrepl) (pushnew #P"/usr/local/asdf-install/site-systems/" asdf:*central-registry*) (defmacro load-package (package &optional verbosity) (declare (ignorable verbosity)) #+(or :abcl) `(asdf:operate 'asdf:load-op ,package) #-(or :abcl) `(asdf:operate 'asdf:load-op ,package :v...
null
https://raw.githubusercontent.com/nklein/FFT/5cf6132c49f3868cac4ce20284fbb6c1b4a62ba0/regression.lisp
lisp
(require :asdf) #+sbcl (require :sb-aclrepl) (pushnew #P"/usr/local/asdf-install/site-systems/" asdf:*central-registry*) (defmacro load-package (package &optional verbosity) (declare (ignorable verbosity)) #+(or :abcl) `(asdf:operate 'asdf:load-op ,package) #-(or :abcl) `(asdf:operate 'asdf:load-op ,package :v...
0d9d4875273b455341a94197f7a82cd2156a41617cfba5fc4d84f9d81fdc04d2
hspec/hspec-expectations
Contrib.hs
# LANGUAGE CPP # -- | -- Experimental combinators, that may become part of the main distribution, if -- they turn out to be useful for a wider audience. module Test.Hspec.Expectations.Contrib ( -- * Predicates -- | (useful in combination with `shouldSatisfy`) isLeft , isRight ) where #if MIN_VERSION_base(4,7,0) imp...
null
https://raw.githubusercontent.com/hspec/hspec-expectations/55f00d0fd98421cf67c4726e8272ec1d33f2c6f2/src/Test/Hspec/Expectations/Contrib.hs
haskell
| Experimental combinators, that may become part of the main distribution, if they turn out to be useful for a wider audience. * Predicates | (useful in combination with `shouldSatisfy`)
# LANGUAGE CPP # module Test.Hspec.Expectations.Contrib ( isLeft , isRight ) where #if MIN_VERSION_base(4,7,0) import Data.Either #else isLeft :: Either a b -> Bool # DEPRECATED isLeft " use Data . Either . Compat.isLeft from package base - compat instead " # isLeft (Left _) = True isLeft (Right _) = False isRig...
f6fce10d3cddc60c3e4b6bfdf850d941d1bbc38f5bbc320728b9060ca2a3a91b
opencog/agi-bio
implication-conversion-rule.scm
; ============================================================================= ; ImplicationConversionRule ; ; IntensionalImplication ; A ; B ; |- ; Implication ; A ; B ; ; will need to add for extensional mixed implication conversion also ; use same rule for inheritance conversion? note: this is an in...
null
https://raw.githubusercontent.com/opencog/agi-bio/9c03d9b0e81cb8a8b3a58179f3134f336e5dbdb6/reasoning/simple-by-hand/local-rules/implication-conversion-rule.scm
scheme
============================================================================= ImplicationConversionRule IntensionalImplication A B |- Implication A B will need to add for extensional mixed implication conversion also use same rule for inheritance conversion? note: this is an inheritance rul...
(define pln-rule-intensional-implication-conversion (BindLink (VariableList (VariableNode "$A") (VariableNode "$B")) (IntensionalImplicationLink (VariableNode "$A") (VariableNode "$B")) (ExecutionOutputLink (GroundedSchemaNode "scm...
0887bb03743c0a34cbfa2d5032e274c709661b8ef13644ce9190547c8e5aa15d
janestreet/sexp
parse_everything.ml
open Core (* Given a function to get the next char of the input, returns a function to get the next block of transformed input. Strings returned via `Ok always have nonzero length. *) let read_of_next_char : next_char:(unit -> char option) -> (unit -> [ `Ok of string | `Eof ]) Staged.t = fun ~next_char -> (...
null
https://raw.githubusercontent.com/janestreet/sexp/522c2bdaa6e99d7fe72ce2d1df79a200932a85b7/sexp_app/src/parse_everything.ml
ocaml
Given a function to get the next char of the input, returns a function to get the next block of transformed input. Strings returned via `Ok always have nonzero length. These are string that could trigger comment-mode in the sexp lexer OR lead to parse errors - we make sure they get quoted so that they get in...
open Core let read_of_next_char : next_char:(unit -> char option) -> (unit -> [ `Ok of string | `Eof ]) Staged.t = fun ~next_char -> let should_be_quoted c = match c with | ';' | '|' | '#' | ')' -> true | _ -> false in let escape = unstage (String.Escaping.escape ~escapeworthy:[ '"' ] ~escape_c...
fade48d0e2596fe737bff9b8ca848cc0c35f535e853bc72cf043e291e61c514e
mtolly/onyxite-customs
FSB.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Onyx.Audio.FSB where import Control.Concurrent.Async (forConcurrently) import Control.E...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Audio/FSB.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # rest is less certain, see 00 00 80 3F (big endian?) in WT think this is number of seek entries + 1? LE (they are BE in .xma files) no idea what these are 00 00 00 00 mode is 0x20400040 but fsb.h defines don't make sense...
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Onyx.Audio.FSB where import Control.Concurrent.Async (forConcurrently) import Control.Exception (evaluate) import Control.Monad import Control.Monad.IO.Class ...
ee8774cf669722b58474e5c9725a54d86598217f570c94b513cb26324da8d19c
alex-gutev/tridash
module-table.lisp
module-table.lisp ;;;; ;;;; Tridash Programming Language. Copyright ( C ) 2018 - 2019 ;;;; ;;;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;;; (...
null
https://raw.githubusercontent.com/alex-gutev/tridash/1d6163f8bda3908e8a2f197245b07511efa68e78/src/module-table.lisp
lisp
Tridash Programming Language. This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPO...
module-table.lisp Copyright ( C ) 2018 - 2019 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package :tridash.frontend) (defclass module-table ...
d9478df3f984a3734f0d6c7a02b4c177d253283097e794e4f67e944ba7fceb33
links-lang/links
statistics.mli
(** This module is used for benchmarking relational lenses. It keeps track of time spent querying database servers. *) (** Increment the query counte and add the time it took to execute the argument function to the query time counter. *) val time_query : (unit -> 'a) -> 'a * Reset all counters and timers to zero ...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/statistics.mli
ocaml
* This module is used for benchmarking relational lenses. It keeps track of time spent querying database servers. * Increment the query counte and add the time it took to execute the argument function to the query time counter.
val time_query : (unit -> 'a) -> 'a * Reset all counters and timers to zero . val reset : unit -> unit val get_query_time : unit -> int val get_query_count : unit -> int val debug_time_out : (unit -> 'a) -> (int -> unit) -> 'a
c987571156bd3527e5104837284c9ca7aae9d2cf1250d044160288b2908a1386
eschulte/elf
arm.lisp
;;; arm.lisp --- Support for reading and writing ARM instructions ;;; Commentary. ;; This file provides methods for reading / writing ARM instructions ;; from/to streams of bits. It is implemented largely from the ARM7-TDMI-manual-pt2.pdf and page numbers in comments below refer ;; to said. ;; ;; TODO: ;; - nice...
null
https://raw.githubusercontent.com/eschulte/elf/795ca3352ad981e6773fac89b3884d0eda701cee/arm.lisp
lisp
arm.lisp --- Support for reading and writing ARM instructions Commentary. from/to streams of bits. It is implemented largely from the to said. TODO: - nice print methods so that these instructions are easily readable at the REPL - instruction disambiguation (see `arm-decode' below) Code. Constituents C...
This file provides methods for reading / writing ARM instructions ARM7-TDMI-manual-pt2.pdf and page numbers in comments below refer (in-package :elf) (defclass arm-data () ()) (defclass arm-instruction (arm-data) ()) (defmethod initialize-instance :after ((obj arm-instruction) &key) (setf (ignored obj) nil)) ...
7b22b76e528445601910c9c5f08b4e96180c74785b356838f75eaa3b0656d177
startalkIM/ejabberd
oauth2.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( c ) 2012 - 2014 Kivra %%% %%% Permission to use, copy, modify, and/or distribute this software for any %%% purpose with or without fee is hereby granted, provided that the above %%% copyright notice and this permission notice ...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/p1_oauth2/src/oauth2.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EV...
Copyright ( c ) 2012 - 2014 Kivra THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN @doc Erlang OAuth 2.0 implementation -module(oauth2). ...
c7dfe3f8c42618db95c5c9517a56e70d7094f89f867b13d1ca7317314b183400
phronmophobic/treemap-clj
project.clj
(defproject com.phronemophobic/treemap-clj "0.2.6" :description "An alternative to pprint for generically visualizing heterogeneous, hierarchical data" :url "-clj" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.3"] ...
null
https://raw.githubusercontent.com/phronmophobic/treemap-clj/f567d610058f6c2908e193809704b9d4d5c809a1/project.clj
clojure
(defproject com.phronemophobic/treemap-clj "0.2.6" :description "An alternative to pprint for generically visualizing heterogeneous, hierarchical data" :url "-clj" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.3"] ...
4494808ec2c666d3d951d0a035d01fe81b281b1b77526f33522f0c9a9832dc32
ocurrent/opam-health-check
server.ml
module Make (Backend : Backend_intf.S) = struct let serv_text ~content_type body = let headers = Cohttp.Header.init_with "Content-Type" content_type in Cohttp_lwt_unix.Server.respond_string ~headers ~status:`OK ~body () let option_to_string = function | None -> "" | Some s -> s let get_query_par...
null
https://raw.githubusercontent.com/ocurrent/opam-health-check/cb82eb0ece5ddd6861bee9db2bcddef011e36998/server/lib/server.ml
ocaml
TODO: Try to understand why it wouldn't do anything before when this was ~on_exn
module Make (Backend : Backend_intf.S) = struct let serv_text ~content_type body = let headers = Cohttp.Header.init_with "Content-Type" content_type in Cohttp_lwt_unix.Server.respond_string ~headers ~status:`OK ~body () let option_to_string = function | None -> "" | Some s -> s let get_query_par...
abe2bae8a05964d401853994055ef93e5ea44eb57b88acaea2b8fb94f95065ba
KavrakiLab/tmkit
smtlib.lisp
(in-package :tmsmt) (let ((keyword-package (find-package :keyword)) (hash (alist-hash-table '((or . |or|) (xor . |xor|) (let . |let|) (not . |not|) (ite . |ite|) (true . |true|) (assert . |ass...
null
https://raw.githubusercontent.com/KavrakiLab/tmkit/4fb6fc0fa02c5b242dfcbe0013d3c1178e9d9224/lisp/smtlib.lisp
lisp
| x)) `(|declare-datatypes| ((,typename ,@(loop for v in values collect (list v)))))) (smt-declare-datatype typename values)) mangled identifier split into tokens parse atomic element append elements from rest onto cons parse sublist check we got right parent parse remainder result write statements check-sat ...
(in-package :tmsmt) (let ((keyword-package (find-package :keyword)) (hash (alist-hash-table '((or . |or|) (xor . |xor|) (let . |let|) (not . |not|) (ite . |ite|) (true . |true|) (assert . |ass...
30ddddd1769e350f2ea7729a5e9a6ceb7ec7eb26aed4fa1b4c750544ce9f4e96
comby-tools/comby
test_bash_alpha.ml
open Core open Rewriter open Test_helpers open Test_alpha let run_bash source match_template rewrite_template = Bash.first ~configuration match_template source |> function | Ok result -> Rewrite.all ~source ~rewrite_template [result] |> (fun x -> Option.value_exn x) |> (fun { rewritten_source; _ }...
null
https://raw.githubusercontent.com/comby-tools/comby/7b401063024da9ddc94446ade27a24806398d838/test/common/test_bash_alpha.ml
ocaml
open Core open Rewriter open Test_helpers open Test_alpha let run_bash source match_template rewrite_template = Bash.first ~configuration match_template source |> function | Ok result -> Rewrite.all ~source ~rewrite_template [result] |> (fun x -> Option.value_exn x) |> (fun { rewritten_source; _ }...
8df795ee4da1db5ab3b5b941475b990211e31c7a524604775b77a16a6e761090
ijvcms/chuanqi_dev
uid_lib.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 16 . 七月 2015 下午5:44 %%%------------------------------------------------------------------- -module(uid_lib). -define(SERVER, uid_mod). %% API -export([ get_uid/1 ...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/uid/uid_lib.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== ==========...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 16 . 七月 2015 下午5:44 -module(uid_lib). -define(SERVER, uid_mod). -export([ get_uid/1 ]). get_uid(Type) -> gen_server2:call(?SERVER, {get_uid, Type}). Internal functions
fe2e0b419fd24d8a662055fce554c7ca5e3b6dced46c28736cdc3475e3b48143
mdedwards/slippery-chicken
cm.lisp
;;; ********************************************************************** (in-package :cl-user) (load (merge-pathnames "make.lisp" *load-pathname*) :verbose nil) (make-cm)
null
https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/src/cm-2.6.0/src/cm.lisp
lisp
**********************************************************************
(in-package :cl-user) (load (merge-pathnames "make.lisp" *load-pathname*) :verbose nil) (make-cm)
f0ceb63005ea5be7d41264b9331d096d913baf420670c2b33c6e1c1c32ee31d0
tilk/yieldfsm
unittests.hs
{-# LANGUAGE RankNTypes #-} module Main where import Prelude import qualified Clash.Prelude as CP import Test.Tasty import qualified Hedgehog as H import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import qualified Test.Tasty.Hedgehog as TH import qualified Test.Tasty.HUnit as TU import FSM...
null
https://raw.githubusercontent.com/tilk/yieldfsm/6d261c1fcba9301be127b992225a6c026883430f/tests/unittests.hs
haskell
# LANGUAGE RankNTypes #
module Main where import Prelude import qualified Clash.Prelude as CP import Test.Tasty import qualified Hedgehog as H import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import qualified Test.Tasty.Hedgehog as TH import qualified Test.Tasty.HUnit as TU import FSM import IntersectionTest d...
993905bbaaf49e0bfeb3548e99f430b861f7c062876153b929d6a3533b9b569d
draperlaboratory/cbat_tools
bil_to_bir.ml
(***************************************************************************) (* *) Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/cbat_tools/78c665c96b343991cb44bebb8658df6750fb59bd/wp/lib/bap_wp/src/bil_to_bir.ml
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its content does not necessarily reflect the position or policy of the US * This module allows creating simple subroutines based on the BIL quasi - quo...
8d605120a80f80e8e41b526dc2b05bc8d0b1b8d4b1b2fdca09e39182fbbd3b7e
phadej/range-set-list
IntMap.hs
module IntMap (intMapProps) where import Test.Tasty import Test.Tasty.QuickCheck as QC import qualified Data.Set as Set import Data.RangeSet.IntMap (RIntSet) import qualified Data.RangeSet.IntMap as RSet import Control.Applicative import Data.Semigroup import SetAction toRSet :: SetAction Int -> RIntSe...
null
https://raw.githubusercontent.com/phadej/range-set-list/313e4724550f3a7598ba964794ddd16062592db4/tests/IntMap.hs
haskell
Complement laws Monoid laws All QuickCheck properties
module IntMap (intMapProps) where import Test.Tasty import Test.Tasty.QuickCheck as QC import qualified Data.Set as Set import Data.RangeSet.IntMap (RIntSet) import qualified Data.RangeSet.IntMap as RSet import Control.Applicative import Data.Semigroup import SetAction toRSet :: SetAction Int -> RIntSe...
16b8c0d79bf60ef5c9c7942b70b69802992e0d717630ba012f2b06d362a2b86a
input-output-hk/cardano-explorer
Validate.hs
{-# LANGUAGE OverloadedStrings #-} module Explorer.Web.Validate ( runValidation ) where import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger (runNoLoggingT) import Data.Text.ANSI (yellow) import qualified Data.Text.IO as Text import Database.Persist.Postgres...
null
https://raw.githubusercontent.com/input-output-hk/cardano-explorer/3abcb32339edac7c2397114a1d170cc76b82e9b6/cardano-explorer-webapi/app/Explorer/Web/Validate.hs
haskell
# LANGUAGE OverloadedStrings #
module Explorer.Web.Validate ( runValidation ) where import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger (runNoLoggingT) import Data.Text.ANSI (yellow) import qualified Data.Text.IO as Text import Database.Persist.Postgresql (withPostgresqlConn) import ...
1c64736fd3fd09a72fb46b34e60fb201a0315122b6f142cd9772a30adccf38d1
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
PaymentMethodOptionsGiropay.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema PaymentMethodOptionsGiropay module StripeAPI.Types.PaymentMethodOptionsGiro...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentMethodOptionsGiropay.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema PaymentMethodOptionsGiropay | Defines the object schema located at @components.schemas.payment_method_options_giropay@ in the specification. | setup_future_usage: Indicates that you intend to make future payments wi...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.PaymentMethodOptionsGiropay where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import...
651fe868d51386039f16065120beedecb4d28cc93ae31281b6e562037b333328
clj-kondo/clj-kondo
profile.clj
(ns clj-kondo.profile (:require [clj-async-profiler.core :as prof] [clj-kondo.main :as main])) (defn -main [& options] prevent loading async profiler when test scans test files (prof/profile (apply main/main options)) (shutdown-agents))
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/src-profile/clj_kondo/profile.clj
clojure
(ns clj-kondo.profile (:require [clj-async-profiler.core :as prof] [clj-kondo.main :as main])) (defn -main [& options] prevent loading async profiler when test scans test files (prof/profile (apply main/main options)) (shutdown-agents))
8684a69df30f21d5cf909802cf860b2e80da8935ef69120d15c1ef57908e834c
atolab/apero-core
identifiers.ml
open Ordered module Id = struct module type S = sig type t include Stringable.S with type t := t include Comparable with type t := t end module Make(T: S) = struct include T end end module NumId = struct module type NumType = sig type t include Id.S with type t := t val zero ...
null
https://raw.githubusercontent.com/atolab/apero-core/6e8b9bb8383de641396463fb4e5685b7f135755c/lib/identifiers.ml
ocaml
open Ordered module Id = struct module type S = sig type t include Stringable.S with type t := t include Comparable with type t := t end module Make(T: S) = struct include T end end module NumId = struct module type NumType = sig type t include Id.S with type t := t val zero ...
87b90cf1b66d4c3e8c3aecd06193dccbd79599d4e551ad6af7722b758678f467
dinakajoy/simple_mini_github
app.mli
module Store: Irmin_git.S val repo : unit -> Store.repo Lwt.t * Initialise the repository for storing the Github repo val sync : Store.repo -> string -> string Lwt.t (** [sync repo url] syncs the repository at [url] with the local store. *) val schema : Store.repo -> unit Graphql_lwt.Schema.schema Lwt.t (** This sch...
null
https://raw.githubusercontent.com/dinakajoy/simple_mini_github/feef70907b7aa555668e0dd78308b0921630ca10/api/app.mli
ocaml
* [sync repo url] syncs the repository at [url] with the local store. * This schema allows to query and modify a git repository.
module Store: Irmin_git.S val repo : unit -> Store.repo Lwt.t * Initialise the repository for storing the Github repo val sync : Store.repo -> string -> string Lwt.t val schema : Store.repo -> unit Graphql_lwt.Schema.schema Lwt.t
6ef497db81872bcabee85752d523b5d38f443aaeac65a4b65fd472f1f9ff9ff7
flosell/lambdacd
async.clj
(ns lambdacd.util.internal.async (:require [clojure.core.async :as async])) (defn buffered [ch] (let [result-ch (async/chan 100)] (async/pipe ch result-ch)))
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/src/clj/lambdacd/util/internal/async.clj
clojure
(ns lambdacd.util.internal.async (:require [clojure.core.async :as async])) (defn buffered [ch] (let [result-ch (async/chan 100)] (async/pipe ch result-ch)))
a2d3c0794b165e9b3bf44a36f1c5d185b0746b6d70a21b2037eb4afe73750802
jeapostrophe/srpnt
h.rkt
#lang racket/base (require racket/match racket/flonum racket/fixnum racket/contract/base racket/performance-hint) (define channels 2) (define sample-rate 44100) (define sample-rate.0 (fx->fl sample-rate)) (define samples-per-buffer (fxquotient sample-rate 60)) (define (make-buffer ...
null
https://raw.githubusercontent.com/jeapostrophe/srpnt/c26e74ce524bb988d6643273c96f4e94406b1746/srpnt/speaker/h.rkt
racket
#lang racket/base (require racket/match racket/flonum racket/fixnum racket/contract/base racket/performance-hint) (define channels 2) (define sample-rate 44100) (define sample-rate.0 (fx->fl sample-rate)) (define samples-per-buffer (fxquotient sample-rate 60)) (define (make-buffer ...
007714de6e9743169b43a5852d57031dbb55b1e0a2a2f00ebe49b8f604fd5023
nunchaku-inria/nunchaku
Precedence.ml
(* This file is free software, part of nunchaku. See file "license" for more details. *) (** {1 Printing Precedence} Order matters, as it defines priorities *) type t = | Bot | App | Arrow | Eq | Not | Guard | Ite | Bind | And | Or | Top (* toplevel precedence *)
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/Precedence.ml
ocaml
This file is free software, part of nunchaku. See file "license" for more details. * {1 Printing Precedence} Order matters, as it defines priorities toplevel precedence
type t = | Bot | App | Arrow | Eq | Not | Guard | Ite | Bind | And | Or
d6c276c4e75a18faf797bf0b065810ad92418310f76127467eec1633484ef2ba
pixlsus/registry.gimp.org_static
v--ActivePathStrokeDelete.scm
; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; ; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ; (at your option) any later v...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/v--ActivePathStrokeDelete.scm
scheme
The GIMP -- an image manipulation program This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 675 Mass Ave , Cambridge , , USA . ActivePathStrokeDelete.scm version 0.1 16/04/2011 Copyright ( C ) 2011 vanca (def...
65145c0f3d6f4e172a9c4b9a39992b0d7f22cede7a43ddadafddd97687d2dc57
yogthos/json-to-pdf
core_test.clj
(ns json-to-pdf.core-test (:require [clojure.test :refer :all] [json-to-pdf.core :refer :all] [cheshire.core :refer [generate-string]]) (:import com.lowagie.text.pdf.PdfPageEventHelper)) (comment (-writeToFile (generate-string [{} [:paragraph "Hello"]]) "test.pdf" (proxy ...
null
https://raw.githubusercontent.com/yogthos/json-to-pdf/8e2cc7edc04c27b80f2087679551f00290c32ee9/test/json_to_pdf/core_test.clj
clojure
(ns json-to-pdf.core-test (:require [clojure.test :refer :all] [json-to-pdf.core :refer :all] [cheshire.core :refer [generate-string]]) (:import com.lowagie.text.pdf.PdfPageEventHelper)) (comment (-writeToFile (generate-string [{} [:paragraph "Hello"]]) "test.pdf" (proxy ...
570e93a8396fc1307978473dadedcfc6412ba27b79af939a79e0229266355d5d
logicmoo/logicmoo_nlu
unify.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*- ;;; Code from Paradigms of Artificial Intelligence Programming Copyright ( c ) 1991 ;;;; File unify.lisp: Unification functions (requires "patmatch") (defparameter *occurs-check* t "Should we do the occurs check?") (defun unify (x y &optional (bindings no-bindings)) ...
null
https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/e2c/paip/unify.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; -*- Code from Paradigms of Artificial Intelligence Programming File unify.lisp: Unification functions ============================== ==============================
Copyright ( c ) 1991 (requires "patmatch") (defparameter *occurs-check* t "Should we do the occurs check?") (defun unify (x y &optional (bindings no-bindings)) "See if x and y match with given bindings." (cond ((eq bindings fail) fail) ((eql x y) bindings) ((variable-p x) (unify-variable x y...
0297479aec83f8c9553c06dc786fe0381716503763bf7974ec33244badb3bf2f
pmonks/spinner
indeterminate_test.clj
; Copyright © 2022 ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; -2.0 ; ; Unless required by applicable law or agreed to in writing, software distributed under the Licen...
null
https://raw.githubusercontent.com/pmonks/spinner/bc29faefad8caf4bfa3ab2ef1785de04ed514fed/test/progress/indeterminate_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing pe...
Copyright © 2022 distributed under the License is distributed on an " AS IS " BASIS , SPDX - License - Identifier : Apache-2.0 (ns progress.indeterminate-test (:require [clojure.test :refer [deftest testing is]] [jansi-clj.core :as jansi] [progress.indeterminate :as ...
a7ab19f4d3e929362c6e3d6ed984b3329889e571658721286b25463cbde7458a
postspectacular/devart-codefactory
request.clj
(ns codefactory.request (:require [codefactory.config :as config] [thi.ng.gae.util :as util] [ring.util.codec :as codec])) (defn request-signature [uri params] (->> config/api-sign-key (str uri ";" (codec/form-encode params) ";" ) (util/sha-256)))
null
https://raw.githubusercontent.com/postspectacular/devart-codefactory/9bccdc10e58fa4861a69767e9ae4be0bb8d7f650/src-gae/codefactory/request.clj
clojure
(ns codefactory.request (:require [codefactory.config :as config] [thi.ng.gae.util :as util] [ring.util.codec :as codec])) (defn request-signature [uri params] (->> config/api-sign-key (str uri ";" (codec/form-encode params) ";" ) (util/sha-256)))
e8a789a6fe7803bb2cf3ea6034fd29a23706dba47974e92d8a5728ccdcd88e89
ceramic/ceramic
driver.lisp
(in-package :cl-user) (defpackage ceramic-test.driver (:use :cl :fiveam) (:import-from :ceramic.driver :*driver*) (:export :driver)) (in-package :ceramic-test.driver) (def-suite driver :description "Driver tests.") (in-suite driver) (test lifecycle (finishes (ceramic.driver:start *driver...
null
https://raw.githubusercontent.com/ceramic/ceramic/5d81e2bd954440a6adebde31fac9c730a698c74b/t/driver.lisp
lisp
(in-package :cl-user) (defpackage ceramic-test.driver (:use :cl :fiveam) (:import-from :ceramic.driver :*driver*) (:export :driver)) (in-package :ceramic-test.driver) (def-suite driver :description "Driver tests.") (in-suite driver) (test lifecycle (finishes (ceramic.driver:start *driver...
a9726f9f512f6347f6db635b203ba26fe684a6356419958979a74f9aaf73dec7
tommaisey/aeon
lag3.help.scm
;; (lag3 in lagTime) ;; lag3 is the same as (lag (Lag (Lag in time) time) time). (let* ((x (mouse-x kr 220 440 0 0.1)) (f (mce2 x (lag3 x 1)))) (audition (out 0 (mul (sin-osc ar f 0) 0.1))))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/filters/lag3.help.scm
scheme
(lag3 in lagTime) lag3 is the same as (lag (Lag (Lag in time) time) time).
(let* ((x (mouse-x kr 220 440 0 0.1)) (f (mce2 x (lag3 x 1)))) (audition (out 0 (mul (sin-osc ar f 0) 0.1))))
25087aca02460e227346b25a54fbe2c28edd887c6e65b079b48da566310d2d62
metosin/kekkonen
middleware_test.clj
(ns kekkonen.middleware-test (:require [kekkonen.core :as k] [kekkonen.ring :as r] [kekkonen.middleware :as mw] [kekkonen.midje :refer :all] [midje.sweet :refer :all] [schema.core :as s] [ring.util.http-response :refer [ok]] [ring.uti...
null
https://raw.githubusercontent.com/metosin/kekkonen/5a38c52af34a0eb0f19d87e9f549e93e6d87885f/test/kekkonen/middleware_test.clj
clojure
(ns kekkonen.middleware-test (:require [kekkonen.core :as k] [kekkonen.ring :as r] [kekkonen.middleware :as mw] [kekkonen.midje :refer :all] [midje.sweet :refer :all] [schema.core :as s] [ring.util.http-response :refer [ok]] [ring.uti...
48fe18ea29f5f1235ef96889febf4eac2e375cd45ddca2c3bca3d7b4647d83e5
ocaml-sf/learn-ocaml-corpus
template.ml
(* -- Part A -------------------------------------------------------------- *) let words str = "Replace this string with your implementation." ;; let build_ltable words = "Replace this string with your implementation." ;; let next_in_ltable table word = "Replace this string with your implementation." ;; let w...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/projects/markov/template.ml
ocaml
-- Part A -------------------------------------------------------------- -- Part B -------------------------------------------------------------- -- Part C --------------------------------------------------------------
let words str = "Replace this string with your implementation." ;; let build_ltable words = "Replace this string with your implementation." ;; let next_in_ltable table word = "Replace this string with your implementation." ;; let walk_ltable table = "Replace this string with your implementation." ;; let c...
9002260870b6b73cede51aafece92c69bc74266aedada67732c908ed4d56ea44
reynir/ocaml-digitalocean
util.ml
let load_api_from_file f = let ic = open_in f in let n = in_channel_length ic in let s = String.create n in really_input ic s 0 n; close_in ic; ApiKey_j.api_of_string s let pretty json = print_endline (Yojson.Safe.pretty_to_string json)
null
https://raw.githubusercontent.com/reynir/ocaml-digitalocean/5d389bd02dbc256aa6aa001e88ce58ed8d02bf75/src/util.ml
ocaml
let load_api_from_file f = let ic = open_in f in let n = in_channel_length ic in let s = String.create n in really_input ic s 0 n; close_in ic; ApiKey_j.api_of_string s let pretty json = print_endline (Yojson.Safe.pretty_to_string json)
f8fec9b7bde4e473ca449dae400e124cd405aefb6b3fab8da8ce49c584c943e0
keigoi/caramel-mpst
caramel_runtime.erl
-module(caramel_runtime). -export([ binary_concat/2, recv/0, recv/1 ]). %% @doc this function is used in `Caramel_runtime` to expose both an indefinite %% wait and a bounded wait. recv() -> recv(infinity). recv(Timeout) -> receive Msg -> {some, Msg} after Timeout -> none end. ...
null
https://raw.githubusercontent.com/keigoi/caramel-mpst/20551cdcc20c9a64e42bb5bd8ba313bd5952b6b7/stdlib/caramel_runtime.erl
erlang
@doc this function is used in `Caramel_runtime` to expose both an indefinite wait and a bounded wait.
-module(caramel_runtime). -export([ binary_concat/2, recv/0, recv/1 ]). recv() -> recv(infinity). recv(Timeout) -> receive Msg -> {some, Msg} after Timeout -> none end. binary_concat(A, B) when is_binary(A) and is_binary(B) -> << (A)/binary, (B)/binary >>.
315827b2ceea77a9e5e02bdab68ec6232fd879df57312fca8b9884d4f387f6ae
input-output-hk/cardano-ledger-byron
Voting.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} -- | Validation rules for registering votes and confirming proposals -- This is an implementation of the rules ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Update/Validation/Voting.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DerivingVia # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # | Validation rules for registering votes and confirming proposals specification | Environment used to register votes and confirm proposals | Environment required to validate and register a ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # This is an implementation of the rules defined in the ledger module Cardano.Chain.Update.Validation.Voting ( Environment(..) , RegistrationEnvironment(..) , State(..) , Error(..) , registerVoteWithConfirmation ) where import Cardano.Prel...