_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
a215792d6af0d03710909e18cb6b4d00dd63c14878c3420469db72e4d4ede7f9
axelarge/advent-of-code
day07_test.clj
(ns advent-of-code.y2020.day07-test (:require [clojure.test :refer :all] [advent-of-code.y2020.day07 :refer :all])) (def test-input1 "light red bags contain 1 bright white bag, 2 muted yellow bags.\ndark orange bags contain 3 bright white bags, 4 muted yellow bags.\nbright white bags contain 1 shiny gold...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2020/day07_test.clj
clojure
(ns advent-of-code.y2020.day07-test (:require [clojure.test :refer :all] [advent-of-code.y2020.day07 :refer :all])) (def test-input1 "light red bags contain 1 bright white bag, 2 muted yellow bags.\ndark orange bags contain 3 bright white bags, 4 muted yellow bags.\nbright white bags contain 1 shiny gold...
282631da881cf5800fd5e4640978c3d7bbf511a5e49ae0de319b91b79dc42a78
johnwhitington/camlpdf
pdfpage.ml
open Pdfutil The type of the four rotations of pages . This defines how a viewing application ( e.g Acrobat ) displays the page . application (e.g Acrobat) displays the page. *) type rotation = | Rotate0 | Rotate90 | Rotate180 | Rotate270 A type representing a page . content is the list of objects con...
null
https://raw.githubusercontent.com/johnwhitington/camlpdf/2aeeb275038b68c2d82a6a79405cc178ede11a77/pdfpage.ml
ocaml
A dictionary of the other entries in the page dictionary. Make a PDF rectangle from a Paper.papersize. Utility function to convert from rotation to integers. Extracting the page tree malformed but we allow A single content stream, or indirect to array An array of indirects. Just return it Given a pdf, re...
open Pdfutil The type of the four rotations of pages . This defines how a viewing application ( e.g Acrobat ) displays the page . application (e.g Acrobat) displays the page. *) type rotation = | Rotate0 | Rotate90 | Rotate180 | Rotate270 A type representing a page . content is the list of objects con...
4caa34b9ea861a1ea22adf53a375f793426a54396e3211f316fc3e41946bbccb
monadbobo/ocaml-core
interruptor.mli
(* An interruptor provides a file descriptor that can be used to cause functions like [select] to return due the file descriptor being ready for reading. *) open Core.Std open Import type t with sexp_of val invariant : t -> unit val create : create_fd:(Raw_fd.Kind.t -> Unix.File_descr.t -> name:string -> Raw_...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/unix/lib/interruptor.mli
ocaml
An interruptor provides a file descriptor that can be used to cause functions like [select] to return due the file descriptor being ready for reading. * [thread_safe_interrupt t] causes [read_fd t] to become ready for reading. * [clear t] causes [read_fd t] to become not ready for reading. It is guaranteed that ...
open Core.Std open Import type t with sexp_of val invariant : t -> unit val create : create_fd:(Raw_fd.Kind.t -> Unix.File_descr.t -> name:string -> Raw_fd.t) -> t val read_fd : t -> Raw_fd.t val thread_safe_interrupt : t -> unit val clear : t -> unit
c39d5b7e2724aad484befef378b69c97ce4c623f19a4204f37159b74b0a9e31c
forked-from-1kasper/anders
anders.ml
open Error type cmdline = | Check of string | Prim of string * string | Repl | Help | Trace | Receive | Indices | Girard | Silent | Irrelevance let help = "\n-from-1kasper/anders invocation = anders | anders list list = [] | command list primitive = zero | one | interval command = check <...
null
https://raw.githubusercontent.com/forked-from-1kasper/anders/233098bf3ecf2f4900d44216af534044c4c8544e/src/frontend/anders.ml
ocaml
open Error type cmdline = | Check of string | Prim of string * string | Repl | Help | Trace | Receive | Indices | Girard | Silent | Irrelevance let help = "\n-from-1kasper/anders invocation = anders | anders list list = [] | command list primitive = zero | one | interval command = check <...
af20e929efabbbe999c6ac44c02f0ee85f1d08e468763867791d98f129e3ca4c
lispnik/cl-http
minilock.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : MINP ; Base : 10 -*- Copyright ( C ) 1994 , 1995 ( OBC ) all rights reserved . See copyright notice in MINIPROC file . (in-package "MINP") #+ignore (defpackage "MINP" (:use) (:export "MAKE-LOCK" "MAKE-RECURSIVE-LOCK" "WITH-LOCK-HELD" "WITH-...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/clim/clim-sys/minilock.lisp
lisp
Syntax : ansi - common - lisp ; Package : MINP ; Base : 10 -*- WITH-LOCK-HELD and friends is actually important to provide constructs for lengthy computations that don't overlap with others over limited resources. Note that LEVEL (a number) is provided as an extension kinds of dead-locks. Not sure what recursi...
Copyright ( C ) 1994 , 1995 ( OBC ) all rights reserved . See copyright notice in MINIPROC file . (in-package "MINP") #+ignore (defpackage "MINP" (:use) (:export "MAKE-LOCK" "MAKE-RECURSIVE-LOCK" "WITH-LOCK-HELD" "WITH-RECURSIVE-LOCK-HELD")) even with MINIPROC because it underlines the need (defcl...
7509dd3ccbe4c8f507e5cf4fd8046675eff8a9b90afe5e7fa186a123185b50d9
witan-org/witan
context.ml
(*************************************************************************) This file is part of Witan . (* *) Copyright ( C ) 2017 CEA ( Commi...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/stdlib/context.ml
ocaml
*********************************************************************** alternatives) Automatique) ...
This file is part of Witan . Copyright ( C ) 2017 CEA ( Commissariat à l'énergie atomique et aux énergies ( Institut National de Recherche en Informatique et en CNRS ( Centre nation...
f58ef50378c8a0c181bc3082640067c04c71b7c3c12275c55612ac03be56a9d2
ocaml/ocaml
std_exit.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/97bfe6dbad118c57bbd791230fc61e599aa4f746/stdlib/std_exit.mli
ocaml
************************************************************************ OCaml ...
, projet Cambium , INRIA Paris Copyright 2022 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Interface to the std_exit module
e164116ebf2e68ccb7451a571257c23e458cdb9ca11cc4252e2107e04d0b269b
facebook/infer
FbGKInteraction.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/d376a8d9bca7fb10183761e3b7a7b25153ac2bbc/infer/src/opensource/FbGKInteraction.ml
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
ba6f2c77b78e44c5a21c08f10695a4106e76daaf9f710f2351b019f6a4d6177d
pzque/realword-haskell
Curry.hs
module Curry where import Data.Char 在 dropSpace = dropWhile isSpace r0 = map dropSpace [" a", "f", " e"] -- section -- Haskell 提供了一种方便的符号快捷方式,用于对中序函数进行部分应用: -- 使用括号包围一个操作符,通过在括号里面提供左操作对象或者右操作对象, -- 可以产生一个部分应用函数。这种类型的部分函数应用称之为节(section)。 3 [ 3,6 ] r3 = map (2 ^) [1, 2] -- [2,4] -- 如果向节提供左操作对...
null
https://raw.githubusercontent.com/pzque/realword-haskell/1da0188a3293fd417740fe12167eebccef4ba626/contents/Curry.hs
haskell
section Haskell 提供了一种方便的符号快捷方式,用于对中序函数进行部分应用: 使用括号包围一个操作符,通过在括号里面提供左操作对象或者右操作对象, 可以产生一个部分应用函数。这种类型的部分函数应用称之为节(section)。 [2,4] 如果向节提供左操作对象,那么得出的部分函数就会将接收到的参数应用为右操作对对象,反之亦然。 之前提到过,通过使用反括号来包围一个函数,可以将这个函数用作中序操作符。 True True
module Curry where import Data.Char 在 dropSpace = dropWhile isSpace r0 = map dropSpace [" a", "f", " e"] 3 [ 3,6 ] r4 = (2 ^) 3 r5 = (^ 3) 2 :
526eca2e60a180081b0ad1b37e0474589dc2ec1ec03cf59d20dc2e9384807608
Ptival/language-ocaml
Internal.hs
module Language.OCaml.PrettyPrinter.Internal ( structureItemPP, ) where import Language.OCaml.PrettyPrinter.Payload () import Language.OCaml.PrettyPrinter.StructureItem ( structureItemPP, )
null
https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/Internal.hs
haskell
module Language.OCaml.PrettyPrinter.Internal ( structureItemPP, ) where import Language.OCaml.PrettyPrinter.Payload () import Language.OCaml.PrettyPrinter.StructureItem ( structureItemPP, )
60d72c6e4b1cf7d9c59f83a98c806df4578c03ba83b10812c7cb4045a06e2d80
kupl/FixML
sub28.ml
type formula = True | False | Neg of formula | Or of formula * formula | And of formula * formula | Imply of formula * formula | Equiv of formula * formula;; let eval : formula -> bool = fun f -> true;; let eval f = match f with True -> true | False -> false | Neg a -> if a = True then false else true | Or (a,b) ->...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula2/submissions/sub28.ml
ocaml
type formula = True | False | Neg of formula | Or of formula * formula | And of formula * formula | Imply of formula * formula | Equiv of formula * formula;; let eval : formula -> bool = fun f -> true;; let eval f = match f with True -> true | False -> false | Neg a -> if a = True then false else true | Or (a,b) ->...
9c3339e23a7be029c046a8b3cabb53a1b632e33156f3bd75f4be74217f04f76e
clojure-garden/clojure-garden
pagination.clj
(ns platform.api.v1.pagination (:require [clojure.string :as str])) (defn build-pagination-meta [host urn query-string current-page per-page total] (let [uri (str "https://" host urn "?" (when query-string (str/replace query-string #"&page=.*" "")) "&page=") page-count (-> (/ total per-page) ...
null
https://raw.githubusercontent.com/clojure-garden/clojure-garden/3417549cc825b8a9bd54e5d79087e46c878da2b6/modules/backend/src/platform/api/v1/pagination.clj
clojure
(ns platform.api.v1.pagination (:require [clojure.string :as str])) (defn build-pagination-meta [host urn query-string current-page per-page total] (let [uri (str "https://" host urn "?" (when query-string (str/replace query-string #"&page=.*" "")) "&page=") page-count (-> (/ total per-page) ...
82b502d68e2f2547bd444479a61cc98eca9a136749353cda02b6808a64ee7858
Noeda/dfterm3
RealMain.hs
# LANGUAGE DeriveDataTypeable , CPP , ForeignFunctionInterface # module Main ( main ) where import ConfiguredDefaults import Dfterm3.Game.DwarfFortress import Dfterm3.Logging import Dfterm3.Dfterm3State import Dfterm3.Playing.WebInterface import Dfterm3.Util import Dfterm3.AdminPanel import qualified Dfterm3.Admin ...
null
https://raw.githubusercontent.com/Noeda/dfterm3/6b33c9b4712da486bb84356f6c9f48abb8074faf/main/RealMain.hs
haskell
Make sure we get to use all the cores. The unfortunate side effect is that the rtsopt -N is ignored. Open up storage Print out instructions for dummies. Just don't tell them they are dummies. The server is service oriented and the main function has nothing to do. Let us loop forever.
# LANGUAGE DeriveDataTypeable , CPP , ForeignFunctionInterface # module Main ( main ) where import ConfiguredDefaults import Dfterm3.Game.DwarfFortress import Dfterm3.Logging import Dfterm3.Dfterm3State import Dfterm3.Playing.WebInterface import Dfterm3.Util import Dfterm3.AdminPanel import qualified Dfterm3.Admin ...
bc08501ff04d63487316a5b168eaa95791ded6ec361e39643731b63bbae26fa1
david-christiansen/pudding-old
monad-notation-parameters.rkt
#lang racket ;;; Due to a present limitation in Typed Racket, syntax parameters ;;; defined in a TR module cannot be used in another TR module. So we ;;; define them in an untyped module, then re-export them from the ;;; typed module. (require racket/stxparam) (provide current-monad current-pure <-) (define-syntax-...
null
https://raw.githubusercontent.com/david-christiansen/pudding-old/6b9ee633b551226df61d40191bafa14386fc86ad/monad-notation-parameters.rkt
racket
Due to a present limitation in Typed Racket, syntax parameters defined in a TR module cannot be used in another TR module. So we define them in an untyped module, then re-export them from the typed module. Similarly, it seems that literals to be matched across modules in a syntax-parse rule must also be defined i...
#lang racket (require racket/stxparam) (provide current-monad current-pure <-) (define-syntax-parameter current-monad (lambda (stx) (raise-syntax-error 'current-monad "no current monad" stx))) (define-syntax-parameter current-pure (lambda (stx) (raise-syntax-error 'pure "no current pure op" stx))) (d...
48c9d883c6a692fa6a9ddaa6c05c0b3f8bab58013ca4c623403c1872f0056610
ashinn/chibi-scheme
158.scm
;; Chibi Scheme version of any (define (any pred ls) (if (null? (cdr ls)) (pred (car ls)) ((lambda (x) (if x x (any pred (cdr ls)))) (pred (car ls))))) ;; list->bytevector (define (list->bytevector list) (let ((vec (make-bytevector (length list) 0))) (let loop ((i 0) (list list)) (if (null? list...
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/158.scm
scheme
Chibi Scheme version of any list->bytevector generator circular-generator make-iota-generator make-iota make-range-generator make-coroutine-generator void? or yield again? list->generator vector->generator reverse-vector->generator string->generator bytevector->generator make-for-each-generator FIXME: se...
(define (any pred ls) (if (null? (cdr ls)) (pred (car ls)) ((lambda (x) (if x x (any pred (cdr ls)))) (pred (car ls))))) (define (list->bytevector list) (let ((vec (make-bytevector (length list) 0))) (let loop ((i 0) (list list)) (if (null? list) vec (begin (bytevector-...
6d4a044baaab408672113b6cdbe0afcdbc023780188a73b3f004cb4d5c060d17
electricimp/vsn_transform
rebar_example.erl
-module(rebar_example). -export([]).
null
https://raw.githubusercontent.com/electricimp/vsn_transform/9e3103b232f176312bdcb88aaf38fbe8ce27c3ce/examples/rebar_example/src/rebar_example.erl
erlang
-module(rebar_example). -export([]).
f9dee7e56f66115c21e5ab7d278b2c6407de482e503fe56a66174121ec1b82c2
psilord/option-9
assets.lisp
(in-package :option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) ;; If any random entity sets a ttl-max and nothing more specific changes this method , then assign a random based upon the ttl - max . (defmethod initialize-instance :after ((s temporal) &key) (when (not (null (...
null
https://raw.githubusercontent.com/psilord/option-9/b4312e0f41167429408da0921bb687c4c854faf0/assets.lisp
lisp
If any random entity sets a ttl-max and nothing more specific changes this initialize the rate at which this brain can have ideas. read into *assets*. Each entity also knows the game context in which it will be placed. This allows the generic methods of entities to inspect the game universe or insert effects into ...
(in-package :option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) method , then assign a random based upon the ttl - max . (defmethod initialize-instance :after ((s temporal) &key) (when (not (null (ttl-max s))) (setf (ttl s) (+ (ttl-min s) (random (- (ttl-max s) (ttl-min ...
2958e168462cfb74c233ac24053ab8948006f13eb91ad21ebe418bdf8381812c
tweag/linear-base
Process.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # {-# LANGUAGE LinearTypes #-} # LANGUAGE QualifiedDo # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # {-# OPTIONS_GHC -Wno-name-shadowing #-} {-# OPTIONS_HADDOCK hide #-} | This module provides functions that take one inp...
null
https://raw.githubusercontent.com/tweag/linear-base/90dcbf0bbeabea9ef2c9d08bdb4f734935ecbdac/src/Streaming/Linear/Internal/Process.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE LinearTypes # # LANGUAGE RankNTypes # # OPTIONS_GHC -Wno-name-shadowing # # OPTIONS_HADDOCK hide # process a single stream. * Stream processors ** Splitting and inspecting streams of elements ** Sum and compose manipulation ** Partitions ** Maybes ** Direct Transformations *...
# LANGUAGE LambdaCase # # LANGUAGE QualifiedDo # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # | This module provides functions that take one input stream and produce one output stream . These are functions that module Streaming.Linear.Internal.Process next, uncons, splitAt, split,...
af8bc804b1ec71a2d48b7c7e6935b0dabbda2b4cc48882f262a40425bbffc4f0
semperos/webdriver-logic
state.clj
(ns ^{:doc "Namespace for managing state required by multiple namespaces."} webdriver-logic.state) ;; See -transitional.xsd for tags and attributes (def ^{:dynamic true :doc "List of legal HTML tag names that should be part of the search space."} *html-tags* #{"a" "abbr" "acronym" "address" "applet" "area" ...
null
https://raw.githubusercontent.com/semperos/webdriver-logic/d6fa8795ebf9e023d3f6baffbdba27cdf784368f/src/webdriver_logic/state.clj
clojure
See -transitional.xsd for tags and attributes
(ns ^{:doc "Namespace for managing state required by multiple namespaces."} webdriver-logic.state) (def ^{:dynamic true :doc "List of legal HTML tag names that should be part of the search space."} *html-tags* #{"a" "abbr" "acronym" "address" "applet" "area" "b" "base" "basefont" "bdo" "big"...
caf1eba4a93897c999a3424b465768a9ed53a7c32a179a8d05f2c38d5fac5608
jordanthayer/ocaml-search
ann.ml
* @author jtd7 @since 2010 - 10 - 13 Artificial Neural networks @author jtd7 @since 2010-10-13 Artificial Neural networks *) type neuron = { input_weights : float array; activation_function : (float -> float); activation_deriv : (float -> float); } type one_layer = neuron type ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/learning/ann.ml
ocaml
***** Some sample activation functions ************* computes the output of single neuron * Does output on a single layer (perceptron) network Back prop going forward to get estimates at each layer output layer hidden layer *********************** Constructing Networks ****************************** ********...
* @author jtd7 @since 2010 - 10 - 13 Artificial Neural networks @author jtd7 @since 2010-10-13 Artificial Neural networks *) type neuron = { input_weights : float array; activation_function : (float -> float); activation_deriv : (float -> float); } type one_layer = neuron type ...
d68fd3c7c8ff214b41f7050b3a95a59bcb4b8c1141569d7e629793443ed20902
nuprl/gradual-typing-performance
main.rkt
#lang racket/base (require benchmark-util "data-world.rkt") (require "aux-tetras.rkt") (require "aux-list-pick-random.rkt") (require "main-replay.rkt") ;; ============================================================================= (define (main) (define w0 (world (list-pick-random tetras) '())) (define ...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/tetris/untyped/main.rkt
racket
=============================================================================
#lang racket/base (require benchmark-util "data-world.rkt") (require "aux-tetras.rkt") (require "aux-list-pick-random.rkt") (require "main-replay.rkt") (define (main) (define w0 (world (list-pick-random tetras) '())) (define raw (with-input-from-file "../base/tetris-hist-3.txt" read)) (unless (list? raw)...
348bdbf455816384538d090db930e717e15e9ea3ae3301985102172ef326edd9
basho/riak_shell
riak_shell_util.erl
%% ------------------------------------------------------------------- %% %% utility functions for riak_shell %% Copyright ( c ) 2007 - 2016 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except...
null
https://raw.githubusercontent.com/basho/riak_shell/afc4b7c04925f8accaa5b32ee0253d8c0ddc5000/src/riak_shell_util.erl
erlang
------------------------------------------------------------------- utility functions for riak_shell 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 sp...
Copyright ( c ) 2007 - 2016 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -...
d0546e30c85c6cb27cedffc95541f23768581df6d595eecb6edaf4bc358b406d
ananthakumaran/eopl
30.clj
( sort / predicate pred ) returns a list of elements sorted by the predicate (ns eopl.chap-1.30 (:use clojure.test)) (defn sort-predicate [pred loi] (if (or (empty? loi) (empty? (rest loi))) loi (let [pivot (first loi) left (filter #(pred % pivot) (rest loi)) right (filter #((comple...
null
https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_1/30.clj
clojure
( sort / predicate pred ) returns a list of elements sorted by the predicate (ns eopl.chap-1.30 (:use clojure.test)) (defn sort-predicate [pred loi] (if (or (empty? loi) (empty? (rest loi))) loi (let [pivot (first loi) left (filter #(pred % pivot) (rest loi)) right (filter #((comple...
2f6d9a7117857f75cffc25582c1a335dfae155d0587d631197706d506b9881e2
bhuztez/russell
russell.erl
-module(russell). -export([main/1, run/1, file_error/2]). main(Args) -> case catch run(Args) of ok -> halt(0); {error, _} -> halt(1) end. run(["prim"|Args]) -> russell_prim:run(Args); run(["dem"|Args]) -> russell_dem:run(Args). file_error(Filename, {error, [_|...
null
https://raw.githubusercontent.com/bhuztez/russell/eaafa8207f2da3e2544a567edf10e6d33120c4ce/src/russell.erl
erlang
-module(russell). -export([main/1, run/1, file_error/2]). main(Args) -> case catch run(Args) of ok -> halt(0); {error, _} -> halt(1) end. run(["prim"|Args]) -> russell_prim:run(Args); run(["dem"|Args]) -> russell_dem:run(Args). file_error(Filename, {error, [_|...
d501e52bc8fb4144bf3b386854161f6a5781a11e8710147348189130dbe9d34a
xvw/muhokama
global_services.ml
open Lib_service open Util let root = Service.straight ~:Endpoints.Global.root [] (fun request -> Flash_info.fallback request; Util.redirect_to ~:Endpoints.Topic.root request) ;; let error = Service.straight ~:Endpoints.Global.error [] (fun request -> let flash_info = Flash_info.fetch request in l...
null
https://raw.githubusercontent.com/xvw/muhokama/dcfa488169677ff7f1a3ed71182524aeb0b13c53/app/services/global_services.ml
ocaml
open Lib_service open Util let root = Service.straight ~:Endpoints.Global.root [] (fun request -> Flash_info.fallback request; Util.redirect_to ~:Endpoints.Topic.root request) ;; let error = Service.straight ~:Endpoints.Global.error [] (fun request -> let flash_info = Flash_info.fetch request in l...
bc977c32c818a1119a1db70b50c3a1fa474a21e6a710d479ee260631059a2df6
aaronlevin/haskell-shopify
Product.hs
{-# LANGUAGE OverloadedStrings #-} module Network.API.Shopify.Types.Product ( Product( .. ) , ProductId( .. ) ) where import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero) import Data.Aeson ((.:), (.:?), (.=), FromJSON(parseJSON), object, ToJSON(toJSON), Value(Ob...
null
https://raw.githubusercontent.com/aaronlevin/haskell-shopify/79be152dd7ba3a4d0561711ed9ccc4fd996a42ee/src/Network/API/Shopify/Types/Product.hs
haskell
# LANGUAGE OverloadedStrings #
module Network.API.Shopify.Types.Product ( Product( .. ) , ProductId( .. ) ) where import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero) import Data.Aeson ((.:), (.:?), (.=), FromJSON(parseJSON), object, ToJSON(toJSON), Value(Object)) import qualified Data.Aeson ...
349a4a0174deab3b0e61fd0b81ff7352e44de26e94ded61ba7a17d812cd29d40
tnelson/Forge
sudoku.rkt
#lang forge option run_sterling off option verbose 0 -- VERSION FOR AUTOMATED TESTING -- SUDOKU -- Find me boards with 10 squares populated (initial puzzle) -- such that there is a valid completed extension (i.e., the initial is solvable) -- Ideally we'd like to find UNIQUE-SOLUTION boards (up to isomorphism) bu...
null
https://raw.githubusercontent.com/tnelson/Forge/a7187ef110f46493c1d45011035b05646b9ccd22/forge/tests/forge/examples/sudoku.rkt
racket
#lang forge option run_sterling off option verbose 0 -- VERSION FOR AUTOMATED TESTING -- SUDOKU -- Find me boards with 10 squares populated (initial puzzle) -- such that there is a valid completed extension (i.e., the initial is solvable) -- Ideally we'd like to find UNIQUE-SOLUTION boards (up to isomorphism) bu...
9a89bcca2dbc73c911eaabed239028d590a11d70659e0bba61f86488789ef20f
ucsd-progsys/liquidhaskell
TerminationExprNum.hs
{-@ LIQUID "--expect-error-containing=Illegal termination specification for `TerminationExprNum.showSep`" @-} module TerminationExprNum where {-@ showSep :: _ -> xs:_ -> _ / [xs] @-} -- use xs as reducing param showSep :: String -> [String] -> String showSep sep [] = "" showSep sep [x] = x showSep sep (x:xs) = ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/TerminationExprNum.hs
haskell
@ LIQUID "--expect-error-containing=Illegal termination specification for `TerminationExprNum.showSep`" @ @ showSep :: _ -> xs:_ -> _ / [xs] @ use xs as reducing param
module TerminationExprNum where showSep :: String -> [String] -> String showSep sep [] = "" showSep sep [x] = x showSep sep (x:xs) = x ++ sep ++ showSep sep xs
692aa03bb087f061390be8d8fcfb04173fa2051c0870830699696a09490e7851
okuoku/nausicaa
compile-all.ypsilon.sps
;;; Part of : Nausicaa / Template Contents : compile script for Ypsilon Scheme ;;;Date: ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2010 < > ;;; ;;;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 Foundati...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/template/src/libraries/compile-all.ypsilon.sps
scheme
Date: Abstract 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 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 ...
Part of : Nausicaa / Template Contents : compile script for Ypsilon Scheme Copyright ( c ) 2010 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (only (foreign ...
f12a1e33b4cb07d269a454b28678bbad7c60db81a18869629e411afd7cbedc25
alsonkemp/turbinado-website
ErrorHandler.hs
module Turbinado.Server.ErrorHandler where import System.IO import Prelude hiding (catch) import Data.Dynamic ( fromDynamic ) import Network.Socket import Turbinado.Controller.Monad import Turbinado.Environment.Types import Turbinado.Environment.Response import Turbinado.Server.Exception import Turbinado.Server.Netwo...
null
https://raw.githubusercontent.com/alsonkemp/turbinado-website/310f38dd7d13cdb838e2ea6181c61521021c32b5/Turbinado/Server/ErrorHandler.hs
haskell
module Turbinado.Server.ErrorHandler where import System.IO import Prelude hiding (catch) import Data.Dynamic ( fromDynamic ) import Network.Socket import Turbinado.Controller.Monad import Turbinado.Environment.Types import Turbinado.Environment.Response import Turbinado.Server.Exception import Turbinado.Server.Netwo...
91f76f14810d0f3abf60db972e617bc4bb0112221246f1a98c448c800109a1ff
spechub/Hets
DFOL.hs
| Description : first - order logic with dependent types Copyright : ( c ) of Magdeburg License : GPLv2 or higher , see LICENSE.txt The " DFOL " folder contains the skeleton of an instance of " Logic . Logic " for DFOL , which is first - order logic with dependent types . Description...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/DFOL.hs
haskell
| Description : first - order logic with dependent types Copyright : ( c ) of Magdeburg License : GPLv2 or higher , see LICENSE.txt The " DFOL " folder contains the skeleton of an instance of " Logic . Logic " for DFOL , which is first - order logic with dependent types . Description...
7bf15e146cbb37a3f87f49a9fc804b1e5693cbd714e52457ebc78e2354b300ee
msakai/toysolver
Knapsack.hs
# OPTIONS_GHC -Wall # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Test.Knapsack (knapsackTestGroup) where import Control.Monad import Test.Tasty import Test.Tasty.QuickCheck hiding ((.&&.), (.||.)) import Test.Tasty.HUnit import Test.Tasty.TH import qualified ToySolver.Combinatorial.Knapsack.B...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/Test/Knapsack.hs
haskell
--------------------------------------------------------------------- Knapsack problems ---------------------------------------------------------------------- Test harness
# OPTIONS_GHC -Wall # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Test.Knapsack (knapsackTestGroup) where import Control.Monad import Test.Tasty import Test.Tasty.QuickCheck hiding ((.&&.), (.||.)) import Test.Tasty.HUnit import Test.Tasty.TH import qualified ToySolver.Combinatorial.Knapsack.B...
5889af1bdd64807658950626c6d15d5af497afe0782430ed653acf0481373ba7
clojure-interop/aws-api
AWSSimpleSystemsManagementClient.clj
(ns com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClient "Client for accessing Amazon SSM. All service calls made using this client are blocking, and will not return until the service call completes. AWS Systems Manager AWS Systems Manager is a collection of capabilities that helps ...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simplesystemsmanagement/src/com/amazonaws/services/simplesystemsmanagement/AWSSimpleSystemsManagementClient.clj
clojure
(ns com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClient "Client for accessing Amazon SSM. All service calls made using this client are blocking, and will not return until the service call completes. AWS Systems Manager AWS Systems Manager is a collection of capabilities that helps ...
f821202ed62fc7e35ed45f0a030f771edd4c164c5011dfa58eb66590c82d8d0b
clojure-interop/aws-api
DataPipelineAsyncClient.clj
(ns com.amazonaws.services.datapipeline.DataPipelineAsyncClient "Client for accessing AWS Data Pipeline asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. AWS Data Pipeli...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.datapipeline/src/com/amazonaws/services/datapipeline/DataPipelineAsyncClient.clj
clojure
(ns com.amazonaws.services.datapipeline.DataPipelineAsyncClient "Client for accessing AWS Data Pipeline asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. AWS Data Pipeli...
5b2aec115af0dd6142d7bc7ed7f5e7862934f10f9437bc270ddef1fabf587580
ucsd-progsys/liquidhaskell
ListRange_LType.hs
module ListRange_LType () where import Language.Haskell.Liquid.Prelude {-@ LIQUID "--no-termination" @-} @ data List a < p : : : a - > x1 : a - > Bool > = Nil | Cons { lHd : : a , lTl : : List < p > ( a < p lHd > ) } @ data List a <p :: x0:a -> x1:a -> Bool> = Nil | Cons { lHd :: a, lTl :: List <p> ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/ListRange_LType.hs
haskell
@ LIQUID "--no-termination" @ @ measure llen @ @ invariant {v:(List a) | ((llen v) >= 0)} @
module ListRange_LType () where import Language.Haskell.Liquid.Prelude @ data List a < p : : : a - > x1 : a - > Bool > = Nil | Cons { lHd : : a , lTl : : List < p > ( a < p lHd > ) } @ data List a <p :: x0:a -> x1:a -> Bool> = Nil | Cons { lHd :: a, lTl :: List <p> (a <p lHd>) } @-} llen :: List a...
d5d469e40feda8e9287a2efee20ff39bbe84d406f84d5e95f0b3e0e4e3c256f5
hannesm/telnet
unikernel.ml
open Lwt.Infix let red fmt = Printf.sprintf ("\027[31m"^^fmt^^"\027[m") let green fmt = Printf.sprintf ("\027[32m"^^fmt^^"\027[m") let yellow fmt = Printf.sprintf ("\027[33m"^^fmt^^"\027[m") let blue fmt = Printf.sprintf ("\027[36m"^^fmt^^"\027[m") let (>>==) a fb = a >>= function | `Ok x -> fb x | _ -> Lwt...
null
https://raw.githubusercontent.com/hannesm/telnet/ff11a380d06161a9300aa212e6c0595026ad9920/example/keys/unikernel.ml
ocaml
open Lwt.Infix let red fmt = Printf.sprintf ("\027[31m"^^fmt^^"\027[m") let green fmt = Printf.sprintf ("\027[32m"^^fmt^^"\027[m") let yellow fmt = Printf.sprintf ("\027[33m"^^fmt^^"\027[m") let blue fmt = Printf.sprintf ("\027[36m"^^fmt^^"\027[m") let (>>==) a fb = a >>= function | `Ok x -> fb x | _ -> Lwt...
99495cea270f6fc6a3e3e9940c7fe4c70573bccf9df840ae471543d71e2a3277
vouillon/osm
system.ml
OSM tools * Copyright ( C ) 2013 * * 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 exception ; * either version 2.1 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/not_used/system.ml
ocaml
madvise information regarding available memory, cache size
OSM tools * Copyright ( C ) 2013 * * 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 exception ; * either version 2.1 of the License , or ( at your opti...
84944aeae1b846c64932e7ddba5ac76d3844d5408b3a8aec13b4631ba57db9fa
tcsprojects/mlsolver
mucalcsudoku.ml
let bits n = let rec blog i = function 1 -> i | n -> blog (i+1) (n/2) in blog 1 n let rec range i j = if j < i then [] else i::(range (i+1) j) let rec repeat s = function 0 -> [] | n -> s::(repeat s (n-1)) let rec power_of_two n = if n==0 then 1 else if...
null
https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/generators/mucalcsudoku.ml
ocaml
"[h|v]ff"
let bits n = let rec blog i = function 1 -> i | n -> blog (i+1) (n/2) in blog 1 n let rec range i j = if j < i then [] else i::(range (i+1) j) let rec repeat s = function 0 -> [] | n -> s::(repeat s (n-1)) let rec power_of_two n = if n==0 then 1 else if...
d95695605acc4cf8d0c59d76179a361e4761640dc92edcb12a836f3f701fb7d9
markcox80/lisp-executable
test-argument-value-manager.lisp
Copyright ( c ) 2011 , ;; All rights reserved. ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are ;; met: ;; - Redistributions of source code must retain the above copyright ;; notice, this list of conditions and the fo...
null
https://raw.githubusercontent.com/markcox80/lisp-executable/989b68ed946e1d99e6e65b7383a64ff035e833c7/tests/test-argument-value-manager.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in...
Copyright ( c ) 2011 , " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT (in-package "LIS...
7592352fc85c53100a20538f09b010ffe68513e3b27cc4e0a05045b198cf5ec1
simmone/racket-simple-qr
exclude-timing-pattern.rkt
#lang racket (require "../../../../share/func.rkt") (require "../../../../share/draw/draw.rkt") (provide (contract-out [write-report-exclude-timing-pattern (-> natural? hash? hash? path-string? void?)] )) (define (write-report-exclude-timing-pattern modules points_map exclude_map express_path) ...
null
https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/read/lib/express/exclude-timing-pattern/exclude-timing-pattern.rkt
racket
#lang racket (require "../../../../share/func.rkt") (require "../../../../share/draw/draw.rkt") (provide (contract-out [write-report-exclude-timing-pattern (-> natural? hash? hash? path-string? void?)] )) (define (write-report-exclude-timing-pattern modules points_map exclude_map express_path) ...
0e666c2cd5a610208df4d4a63d2c89bacf384322a670489ff3ad849b67bb9712
karamellpelle/grid
Konami.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Run/Iteration/Konami.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 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 module Game.Run.Iteration.Konami ( iterationD...
ab2ca7e3a1ab57175f1d1930b88d1203252caaf4ff10f9c473c6664ff8b2c6cd
bmourad01/ocamlchess
test_see.ml
open Core_kernel [@@warning "-D"] open OUnit2 open Chess let p = Piece.Kind.value Pawn let n = Piece.Kind.value Knight let b = Piece.Kind.value Bishop let r = Piece.Kind.value Rook let q = Piece.Kind.value Queen let test fen move expected = let pos = Position.Fen.of_string_exn fen in let move = Move.of_string_exn...
null
https://raw.githubusercontent.com/bmourad01/ocamlchess/c2913181f6aed4f4315b1b49b10075f3654384a2/chess/test/test_see.ml
ocaml
open Core_kernel [@@warning "-D"] open OUnit2 open Chess let p = Piece.Kind.value Pawn let n = Piece.Kind.value Knight let b = Piece.Kind.value Bishop let r = Piece.Kind.value Rook let q = Piece.Kind.value Queen let test fen move expected = let pos = Position.Fen.of_string_exn fen in let move = Move.of_string_exn...
809c9f72c87254350fef1854f72d5b0162554f6176904b63d59b038328858b71
fiddlerwoaroof/objc-lisp-bridge
stack-view.lisp
(defpackage :fwoar.stack-view (:use :cl ) (:export )) (in-package :fwoar.stack-view) (named-readtables:in-readtable :objc-readtable) (cffi:defcstruct ns-edge-insets (top :double) (left :double) (bottom :double) (right :double)) (cffi:defcfun (make-edge-insets "NSEdgeInsetsMake") (:struct ns-edge-inse...
null
https://raw.githubusercontent.com/fiddlerwoaroof/objc-lisp-bridge/412089a6642ef886d41634cacfb50fc4ddd7d372/stack-view.lisp
lisp
(defpackage :fwoar.stack-view (:use :cl ) (:export )) (in-package :fwoar.stack-view) (named-readtables:in-readtable :objc-readtable) (cffi:defcstruct ns-edge-insets (top :double) (left :double) (bottom :double) (right :double)) (cffi:defcfun (make-edge-insets "NSEdgeInsetsMake") (:struct ns-edge-inse...
665dbe95e14ba34d71869a16f18a8aee48d9f34b93a96d4687f13e42bfa1b660
metaocaml/ber-metaocaml
sigsubst.ml
(* TEST * expect *) module type Printable = sig type t val print : t -> unit end [%%expect {| module type Printable = sig type t val print : t -> unit end |}] module type Comparable = sig type t val compare : t -> t -> int end [%%expect {| module type Comparable = sig type t val compare : t -> t -> int end ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-sigsubst/sigsubst.ml
ocaml
TEST * expect We allow type constraints when replacing a path by a path. but not when replacing a path by a type expression Checking that the uses of M.t are rewritten regardless of how they are named, but we don't rewrite other types by the same name. Regression test: at some point, expanding S1 twice i...
module type Printable = sig type t val print : t -> unit end [%%expect {| module type Printable = sig type t val print : t -> unit end |}] module type Comparable = sig type t val compare : t -> t -> int end [%%expect {| module type Comparable = sig type t val compare : t -> t -> int end |}] module type Printab...
32051932e3ab27f2f5e32804d42a6fbbc88f7f972f88cd2d1a39a262bb3bf6fe
jesperes/aoc_erlang
aoc2018_day15.erl
-module(aoc2018_day15). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2018, day = 15, name = "Beverage Bandits", expe...
null
https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2018/aoc2018_day15.erl
erlang
io:format("Round: ~w~n", [N]), Execute move/combat actions for each unit. No more units to move in this round. attacks by other units. There are no enemies left. Attacking team wins. There is no path from this unit to any enemy. The unit cannot move, and ends it's turn. Unit was killed before its turn. At...
-module(aoc2018_day15). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2018, day = 15, name = "Beverage Bandits", expe...
ef901935bc14a3f9e8e57b0d24c815f577bfa0df06b23c6ce1215e9ddbe1bbe6
logseq/logseq
transaction.cljc
(ns frontend.modules.outliner.transaction #?(:cljs (:require-macros [frontend.modules.outliner.transaction]))) (defmacro transact! "Batch all the transactions in `body` to a single transaction, Support nested transact! calls. Currently there are no options, it'll execute body and collect all transaction data gen...
null
https://raw.githubusercontent.com/logseq/logseq/990a21ff66fceff03d9ed4c8b44ba8546dc00d49/src/main/frontend/modules/outliner/transaction.cljc
clojure
do something If it's empty, do nothing transact only for the whole transaction
(ns frontend.modules.outliner.transaction #?(:cljs (:require-macros [frontend.modules.outliner.transaction]))) (defmacro transact! "Batch all the transactions in `body` to a single transaction, Support nested transact! calls. Currently there are no options, it'll execute body and collect all transaction data gen...
5ab7fb2ef9298f650bd4f81b2447187ad864e60befb4f663387ec744e0d0cc65
2600hz-archive/whistle
openid_srv.erl
%%%------------------------------------------------------------------- %%% File : openid_srv.erl Author : < > %%% Description : Manage OpenID associations %%% Created : 21 Sep 2009 by < > %%%------------------------------------------------------------------- -module(openid_srv). -behaviour(gen_server). ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/erl_openid/src/openid_srv.erl
erlang
------------------------------------------------------------------- File : openid_srv.erl Description : Manage OpenID associations ------------------------------------------------------------------- API gen_server callbacks ==================================================================== API ==============...
Author : < > Created : 21 Sep 2009 by < > -module(openid_srv). -behaviour(gen_server). -include("openid.hrl"). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { authReqs, assocs, pending, nonces }). Ten ...
3438042f059d2fbef6a3fc8e702d1c9a3bc7e79f11000a395fc7be9973292e2c
clojure-interop/java-jdk
Validator.clj
(ns javax.xml.bind.Validator "Deprecated. since JAXB 2.0" (:refer-clojure :only [require comment defn ->]) (:import [javax.xml.bind Validator])) (defn set-event-handler "Deprecated. since JAXB2.0 handler - the validation event handler - `javax.xml.bind.ValidationEventHandler` throws: javax.xml.bind.JAXB...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/bind/Validator.clj
clojure
(ns javax.xml.bind.Validator "Deprecated. since JAXB 2.0" (:refer-clojure :only [require comment defn ->]) (:import [javax.xml.bind Validator])) (defn set-event-handler "Deprecated. since JAXB2.0 handler - the validation event handler - `javax.xml.bind.ValidationEventHandler` throws: javax.xml.bind.JAXB...
5ab2a77eecf2cb4c8a43031322586b12755c47f1908f84df31f64c2a3c001733
engagor/clj-vw
core.clj
Copyright ( c ) 2014 Engagor ;; ;; The use and distribution terms for this software are covered by the ;; BSD License (-2-Clause) ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; the terms of this license. ;; You m...
null
https://raw.githubusercontent.com/engagor/clj-vw/ff03de8005495349652cd5f0f2f3f3e0f08a6964/src/clj_vw/core.clj
clojure
The use and distribution terms for this software are covered by the BSD License (-2-Clause) which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, fro...
Copyright ( c ) 2014 Engagor (ns ^{:doc "Core functionality for interacting with vowpal wabbit in a generic way (input example formatting, writing data files, passing options and calling vw, ...)."} clj-vw.core (:require [clojure.java [shell :refer [sh]] [io :refer :all]] [clojure.pprint :refer (prin...
4d87108ce8fa1c34ca661260692749e2641bc684ca9552fe755e12dea8e24219
jabber-at/ejabberd
mod_ping.erl
%%%---------------------------------------------------------------------- %%% File : mod_ping.erl Author : < > Purpose : Support XEP-0199 XMPP Ping and periodic keepalives Created : 11 Jul 2009 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This program is free software; ...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_ping.erl
erlang
---------------------------------------------------------------------- File : mod_ping.erl This program is free software; you can redistribute it and/or 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 ...
Author : < > Purpose : Support XEP-0199 XMPP Ping and periodic keepalives Created : 11 Jul 2009 by < > ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should ...
d28a0e900361d5be27d50fcadc73903a74e90f4c56532309a1d37cd9af145835
BU-CS320/Fall-2018
WarmUpTest.hs
module WarmUpTest where import Test.Tasty (testGroup) import Test.Tasty.HUnit (assertEqual, assertBool, testCase) import Test.Tasty.QuickCheck (testProperty ) import WarmUp(biggerNumber) -- make pull requests for what we cover in lab! unitTests = testGroup "WarmUpTest" [biggerNumberTest1, bi...
null
https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week5/hw/tests/WarmUpTest.hs
haskell
make pull requests for what we cover in lab! put tests in this list, so [testName, testName2] write a nice comment here testName = Can we do better? testName2 = testProperty "put a nice description here" $ undefined
module WarmUpTest where import Test.Tasty (testGroup) import Test.Tasty.HUnit (assertEqual, assertBool, testCase) import Test.Tasty.QuickCheck (testProperty ) import WarmUp(biggerNumber) unitTests = testGroup "WarmUpTest" " put a nice description here " $ assertBool [ ] $ undefined as...
12f956d467a49048e9b66fa75d7051530d72b0f17b454d902400d257a55268ac
retro/keechma-next-realworld-app
main.cljs
(ns app.ui.main (:require [keechma.next.helix.core :refer [with-keechma use-sub]] [keechma.next.helix.lib :refer [defnc]] [helix.core :as hx :refer [$ <>]] ["react" :as react] ["react-dom" :as rdom] [helix.dom :as d] [app.ui.components.header :re...
null
https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/app/ui/main.cljs
clojure
(ns app.ui.main (:require [keechma.next.helix.core :refer [with-keechma use-sub]] [keechma.next.helix.lib :refer [defnc]] [helix.core :as hx :refer [$ <>]] ["react" :as react] ["react-dom" :as rdom] [helix.dom :as d] [app.ui.components.header :re...
cb1086fa4534666e837906309c5c70b0336062d785d3c4603f4dc06907fd701f
input-output-hk/cardano-ledger
InstallerHash.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE OverloadedStrings #-} module Cardano.Chain.Update.InstallerHash ( InstallerHash (..), ) where import Cardano.Crypto (Hash, hashRaw) import Cardano.Crypto.Raw (Raw) import Cardano.Ledger.Binary ( DecCBOR (..), ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/Update/InstallerHash.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # | The hash of the installer of the new application Used for debugging purposes only
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # module Cardano.Chain.Update.InstallerHash ( InstallerHash (..), ) where import Cardano.Crypto (Hash, hashRaw) import Cardano.Crypto.Raw (Raw) import Cardano.Ledger.Binary ( DecCBOR (..), EncCBOR (..), FromCBOR (..), ToCBOR (..), dropBytes, encod...
11ad2aa1aa3b9a45b2d023cf6c0c6896ed52e5b699307372b6798d3857d88195
licht1stein/clj-telegram-bot
core.clj
(ns telegram.api.core (:require [clojure.string :as str] [clojure.java.io :as io] [org.httpkit.client :as http] [cheshire.core :as json] [camel-snake-kebab.core :as csk])) (defn filter-params "Filter out nil values from a map." [params] (persistent! (reduce-kv...
null
https://raw.githubusercontent.com/licht1stein/clj-telegram-bot/428f0bfda4d26c87e7a9c4109037f76069f370e9/src/telegram/api/core.clj
clojure
for GET, complex values must be JSON-encoded parse JSON manually as Http Kit cannot
(ns telegram.api.core (:require [clojure.string :as str] [clojure.java.io :as io] [org.httpkit.client :as http] [cheshire.core :as json] [camel-snake-kebab.core :as csk])) (defn filter-params "Filter out nil values from a map." [params] (persistent! (reduce-kv...
bb8344ca3569081747f072d19cba60e6eb7318834563dc91e032aa1d564f4ad4
srid/emanote
Renderer.hs
# LANGUAGE RecordWildCards # | Types for custom render extensions to Pandoc AST nodes . Note that unlike Pandoc * filters * ( which operate on entire document ) , these are modeled based on Text . Pandoc . Walk , ie . fine - grained on individual inline and block processing . We do this only so as to rende...
null
https://raw.githubusercontent.com/srid/emanote/66dad06ca8fff73e30c52aee28f6458c73c900e3/src/Emanote/Pandoc/Renderer.hs
haskell
^ Like `blockRenderers` but for use in inline contexts. care about block elements. ^ Like `inlineRenderers` but suitable for use inside links (<a> tags).
# LANGUAGE RecordWildCards # | Types for custom render extensions to Pandoc AST nodes . Note that unlike Pandoc * filters * ( which operate on entire document ) , these are modeled based on Text . Pandoc . Walk , ie . fine - grained on individual inline and block processing . We do this only so as to rende...
adff4ce0a61b98c57c9ca94f725423c5b124a892ddb832aa7b347fa3f22fd50b
spell-music/csound-expression
Effect.hs
-- | A gallery of sound processors (effects). module Csound.Catalog.Effect( nightChorus, nightReverb, vibroDelay, delayLine, bassEnhancment, declick, sweepFilter, loopSweepFilter, -- * Presets bayAtNight, vestigeOfTime ) where import Control.Monad import Csound.Base hiding (dur, filt, del) -- | A...
null
https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-catalog/src/Csound/Catalog/Effect.hs
haskell
| A gallery of sound processors (effects). * Presets | A signal goes throgh the chain of varible delays. Delay time is affected by vibrato. > aout = vibroDelay n delayBufferSize vibDepth vibRate asig * @n@ -- number of delay lines * @delayBufSize@ -- buffer size for the delay lines (it should be greater than...
module Csound.Catalog.Effect( nightChorus, nightReverb, vibroDelay, delayLine, bassEnhancment, declick, sweepFilter, loopSweepFilter, bayAtNight, vestigeOfTime ) where import Control.Monad import Csound.Base hiding (dur, filt, del) vibroDelay :: Int -> D -> Sig -> Sig -> Sig -> Sig vibroDelay order d...
4167114e7085f6fd26ea33f59c68cb0c914715f9c90dfe17d1946a93a7e641dd
adobe/Chronikis
AST.hs
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , sof...
null
https://raw.githubusercontent.com/adobe/Chronikis/b83b9e38341cdc1539fc7625c6355c6fd176d8a3/compiler/src/AST.hs
haskell
-- Basic ---- -- Type ---- Originally "real@@@" was "real[3]" (and so on), but this did not play well with Text.Pretty.Simple, which is very useful for printing -- ExprT ---- -- Bounds ----
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , sof...
cc4077af8e9ed60071c3aa05bcc51020b1b160a1030395dd35f165b737a1c8b2
sirherrbatka/statistical-learning
methods.lisp
(cl:in-package #:statistical-learning.tree-protocol) (defmethod print-object ((object split-result) stream) (print-unreadable-object (object stream) (format stream "~a" (split-point object)))) (defmethod (setf training-parameters) :before (new-value state) (check-type new-value fundamental-tree-training-par...
null
https://raw.githubusercontent.com/sirherrbatka/statistical-learning/40b529beff5820c08cb92b1fa92c4f688a1989bb/source/tree-protocol/methods.lisp
lisp
here just to check if slot is bound this code is micro-optimized
(cl:in-package #:statistical-learning.tree-protocol) (defmethod print-object ((object split-result) stream) (print-unreadable-object (object stream) (format stream "~a" (split-point object)))) (defmethod (setf training-parameters) :before (new-value state) (check-type new-value fundamental-tree-training-par...
98dec3ad07ea5fb58620319f914b7a39d9fc0d14a0152cd840c9883b3d8b1aa5
broadinstitute/firecloud-ui
utils.cljs
(ns broadfcui.page.workspace.notebooks.utils (:require [dmohs.react :as react] [broadfcui.config :as config] [broadfcui.utils :as utils] [broadfcui.utils.ajax :as ajax] )) (defn create-inline-form-label [text] [:span {:style {:marginBottom "0.16667em" :fontSize "88%"}} text]) (defn contains-statuse...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/workspace/notebooks/utils.cljs
clojure
(ns broadfcui.page.workspace.notebooks.utils (:require [dmohs.react :as react] [broadfcui.config :as config] [broadfcui.utils :as utils] [broadfcui.utils.ajax :as ajax] )) (defn create-inline-form-label [text] [:span {:style {:marginBottom "0.16667em" :fontSize "88%"}} text]) (defn contains-statuse...
f7a565ce509acfa8e282926f236934fa2f21214da455cb087f5a841afd2814c0
WhatsApp/eqwalizer
dyn_calls.erl
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . %%% This source code is licensed under the Apache 2.0 license found in %%% the LICENSE file in the root directory of this source tree. -module(dyn_calls). -compile([export_all, nowarn_export_all]). -spec dyn_call_check0 (atom(), atom())...
null
https://raw.githubusercontent.com/WhatsApp/eqwalizer/9935940d71ef65c7bf7a9dfad77d89c0006c288e/eqwalizer/test_projects/check_gradual/src/dyn_calls.erl
erlang
the LICENSE file in the root directory of this source tree.
Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved . This source code is licensed under the Apache 2.0 license found in -module(dyn_calls). -compile([export_all, nowarn_export_all]). -spec dyn_call_check0 (atom(), atom()) -> integer(). dyn_call_check0(M, F) -> M:F(). -spec dyn_call_che...
14c526311755edeaff640edbf65e83f979a38690d7deb2d0b849128237618f9b
gren-lang/compiler
Directories.hs
# OPTIONS_GHC -Wall # module Directories ( details, interfaces, objects, greni, greno, findRoot, withRootLock, withRegistryLock, PackageCache, getPackageCache, package, getReplCache, getGrenHome, ) where import Gren.ModuleName qualified as ModuleName import Gren.Pac...
null
https://raw.githubusercontent.com/gren-lang/compiler/05366ca456a2376fe8fdd23e88c7e637760ebbd1/builder/src/Directories.hs
haskell
PATHS GRENI and GRENO ROOT LOCKS PACKAGE CACHES CACHE
# OPTIONS_GHC -Wall # module Directories ( details, interfaces, objects, greni, greno, findRoot, withRootLock, withRegistryLock, PackageCache, getPackageCache, package, getReplCache, getGrenHome, ) where import Gren.ModuleName qualified as ModuleName import Gren.Pac...
cd81b85ae34fa54b50b95bc4ea452aede1391eea6dacee102f0732d359eedd86
fisxoj/sanity-clause
json.lisp
(defpackage sanity-clause.serde.json (:use #:cl #:alexandria #:sanity-clause.field) (:export #:lisp-name-to-json-name #:json-name-to-lisp-name)) (in-package #:sanity-clause.serde.json) (defun lisp-name-to-json-name (name) "Converts a kebab style name to a pascal case name. eg. ``some-field => someField``...
null
https://raw.githubusercontent.com/fisxoj/sanity-clause/04ca76048ebe9f177a1c78922952afe457bf3549/src/serde/json.lisp
lisp
(defpackage sanity-clause.serde.json (:use #:cl #:alexandria #:sanity-clause.field) (:export #:lisp-name-to-json-name #:json-name-to-lisp-name)) (in-package #:sanity-clause.serde.json) (defun lisp-name-to-json-name (name) "Converts a kebab style name to a pascal case name. eg. ``some-field => someField``...
8954b4f0b5a7cb10c9fff4305d6ea75960c5f8df56afb1520d0b9f7e702e4455
snmsts/cl-langserver
channels.lisp
(in-package :ls-base) ;;; Channels (defmacro channels () `(connection-channels *emacs-connection*)) (defmacro channel-counter () `(connection-channel-counter *emacs-connection*)) (defclass channel () ((id :initform (incf (channel-counter)) :reader channel-id) (thread :initarg :thread :initform ...
null
https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/channels.lisp
lisp
Channels FIXME: slightly fugly, but I need this to be able to name the thread according to the channel's id. FIXME: perhaps this should incorporate most behaviour from it's :after spec currently in slynk-mrepl.lisp) eventually calls CLOSE-CHANNEL
(in-package :ls-base) (defmacro channels () `(connection-channels *emacs-connection*)) (defmacro channel-counter () `(connection-channel-counter *emacs-connection*)) (defclass channel () ((id :initform (incf (channel-counter)) :reader channel-id) (thread :initarg :thread :initform (current-thre...
3c290bae45c9d1ae9fff3b084e5856d351db6b0eca5edc2463e2c3e1aa3b13bd
huangz1990/SICP-answers
test-46-add-vect.scm
(load "test-manager/load.scm") (load "46-add-vect.scm") (define sum (add-vect (make-vect 0.5 0.5) (make-vect 0.2 0.2))) (define-each-check (= (xcor-vect sum) 0.7) (= (ycor-vect sum) 0.7) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-46-add-vect.scm
scheme
(load "test-manager/load.scm") (load "46-add-vect.scm") (define sum (add-vect (make-vect 0.5 0.5) (make-vect 0.2 0.2))) (define-each-check (= (xcor-vect sum) 0.7) (= (ycor-vect sum) 0.7) ) (run-registered-tests)
fe8b5c9edd0e702ea517aa03c5fb2f3ea1271353f022f538eb1da2414fcb7dfc
jordanthayer/ocaml-search
csp.ml
$ I d : csp.ml , v 1.1 2004/01/13 23:45:32 ruml Exp ruml $ data structures for CSPs data structures for CSPs *) var , type nogood = (int * int) list type problem = { domains : (int list) array; nogoods : nogood list; } (*************** basic utilities ***************) let num_v...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/wrutils/time_benchmark/csp.ml
ocaml
************** basic utilities ************** * returns a copy to prevent anyone from modifying the problem, so same input can be reused * returns true iff assignment [a] satisfies problem [p] - all vars given legal values and no nogoods violated
$ I d : csp.ml , v 1.1 2004/01/13 23:45:32 ruml Exp ruml $ data structures for CSPs data structures for CSPs *) var , type nogood = (int * int) list type problem = { domains : (int list) array; nogoods : nogood list; } let num_vars p = Array.length p.domains let max_domain_...
cee9726917af1e110c6eab44a7763f1bdccb13f5db076e5b2ca294a63bb8d421
haskell-mafia/mafia
trivial.hs
-- Trivial program that will not compile unless the `async` package is installed. ` async ` was chosen because its not installed as part of GHC * and * because -- it has very few dependencies other than base packages. import Control.Concurrent.Async main :: IO () main = print =<< wait =<< async (return (3 :: Int))
null
https://raw.githubusercontent.com/haskell-mafia/mafia/529440246ee571bf1473615e6218f52cd1e990ae/test/cli/exec/trivial/trivial.hs
haskell
Trivial program that will not compile unless the `async` package is installed. it has very few dependencies other than base packages.
` async ` was chosen because its not installed as part of GHC * and * because import Control.Concurrent.Async main :: IO () main = print =<< wait =<< async (return (3 :: Int))
37d46090048a38a9fe823fd378358b1e9c1ac8f1efed5ced5a87cfe95aea4d8b
ocaml-ppx/ocamlformat
module_item_spacing.mli
[@@@ocamlformat "module-item-spacing=compact"] val z : this one is pretty looooooooooooooooooooooooooooooooooong val z : so is this oooooooooooooooooooooooooooooooooooooooooooone val f : k -> k -> k -> k -> k k -> k k -> k k (** [f o o o o o o] is a great function. *) val z : this one is pretty looooooooooooooooooooo...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/module_item_spacing.mli
ocaml
* [f o o o o o o] is a great function. * [x] is a great value. * [y] is a great value.
[@@@ocamlformat "module-item-spacing=compact"] val z : this one is pretty looooooooooooooooooooooooooooooooooong val z : so is this oooooooooooooooooooooooooooooooooooooooooooone val f : k -> k -> k -> k -> k k -> k k -> k k val z : this one is pretty looooooooooooooooooooooooooooooooooong val z : so is this oooooooo...
64264cf22ed3c05048f4cf8f067d83341f7a829459fb742b3d024b40c4a941af
facebook/flow
avar.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/45226d7b733b5f7252eee4f7ae0bebb98aa376d9/src/typing/avar.ml
ocaml
API for annotation type variables
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
9d818f815c2b7f714b9d2e914a0d43fbbfbf920d4ed2186cc50714e39b6a4dae
shenxs/about-scheme
18.7-练习和项目.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-advanced-reader.ss" "lang")((modname 18.7-练习和项目) (read-case-sensitive #t) (teachpacks ((lib "abstraction.rkt" "teachpack" "2htdp") (lib "i...
null
https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/18.7-%E7%BB%83%E4%B9%A0%E5%92%8C%E9%A1%B9%E7%9B%AE.rkt
racket
about the language level of this file in a form that our tools can easily process. [list of Number]->[list of Number] 美元到欧元 Number->Number list-of Posn-> [list-of [list Number Number ]] sorts a list of inventory records by the difference between [a list of IR]-> a sorted [list of IR] IR->boolean string->boolean dete...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-advanced-reader.ss" "lang")((modname 18.7-练习和项目) (read-case-sensitive #t) (teachpacks ((lib "abstraction.rkt" "teachpack" "2htdp") (lib "image.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "universe...
ef3f1ba5acbd367dee48909db6c854cac71876151c339c36bfcc66b85c5ffc4c
yellowbean/Hastructure
AccountTest.hs
module UT.AccountTest(intTests,reserveAccTest,investTests) where import Test.Tasty import Test.Tasty.HUnit import Accounts import Lib import Stmt import Util import Types import Deal import qualified Cashflow as CF import qualified Data.Time as T import qualified Data.Map as Map import UT.DealTest (td2) intTests = ...
null
https://raw.githubusercontent.com/yellowbean/Hastructure/6b279561f4f0c52c7185f9de6048b7d5b570ae10/test/UT/AccountTest.hs
haskell
module UT.AccountTest(intTests,reserveAccTest,investTests) where import Test.Tasty import Test.Tasty.HUnit import Accounts import Lib import Stmt import Util import Types import Deal import qualified Cashflow as CF import qualified Data.Time as T import qualified Data.Map as Map import UT.DealTest (td2) intTests = ...
f48e07020dd87bba4c896e6d54e62cd0f133da45cf9339f0940f1d7f7d3ff754
Clozure/ccl-tests
hash-table-test.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Nov 28 05:56:22 2003 ;;;; Contains: Tests for HASH-TABLE-TEST (in-package :cl-test) (deftest hash-table-test.1 (hash-table-test (make-hash-table)) eql) (deftest hash-table-test.2 (loop for test in '(eq eql equal equalp) unless (eq (hash-table-test (mak...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/hash-table-test.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for HASH-TABLE-TEST Error cases
Author : Created : Fri Nov 28 05:56:22 2003 (in-package :cl-test) (deftest hash-table-test.1 (hash-table-test (make-hash-table)) eql) (deftest hash-table-test.2 (loop for test in '(eq eql equal equalp) unless (eq (hash-table-test (make-hash-table :test test)) test) collect test) nil) (deftest h...
a0512402a10eb9e1537d9f6817ccf04b14806da9b93561be9bf030f698cf4a61
tonyrog/bt
bt_uuid16.erl
@author < > ( C ) 2022 , %%% @doc Blueooth 16 bit uuid assigned numbers %%% @end Created : 18 Jan 2022 by < > -module(bt_uuid16). -export([to_string/1]). -export([from_string/1]). to_string(ID) when ID band (bnot 16#ffff) =:= 0 -> maps:get(ID, uuid_map(), undefined). from_string(String) when ...
null
https://raw.githubusercontent.com/tonyrog/bt/66198811aa37b4e60c334c9dff65a186b405d681/src/bt_uuid16.erl
erlang
@doc @end "current time" => 16#1805, "device time" => 16#1847,
@author < > ( C ) 2022 , Blueooth 16 bit uuid assigned numbers Created : 18 Jan 2022 by < > -module(bt_uuid16). -export([to_string/1]). -export([from_string/1]). to_string(ID) when ID band (bnot 16#ffff) =:= 0 -> maps:get(ID, uuid_map(), undefined). from_string(String) when is_list(String) ->...
7d759a9a8a4d61b78f13e979f4b5065e4dcabf40068a84d455375da8b29ae2f8
jiangpengnju/htdp2e
ex161.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 ex161) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/more-on-lists/ex161.rkt
racket
about the language level of this file in a form that our tools can easily process. Translate the examples into tests and make sure they all succeed. revise the entire program and not several. Number -> Number due to each of them. List-of-number -> List-of-numbers
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex161) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Then change the function so that everyone gets $ 14 per hour . N...
cb5994d1035132158d990aa42a9ee12b1c2b2145a76bb809f5d9c77abac4e72e
SonyCSLParis/BENG
onceuponatime.lisp
Copyright ( C ) 2019 Sony Computer Science Laboratories Paris ( www.remivantrijp.eu ) ;;; ;;; 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 , version 3 o...
null
https://raw.githubusercontent.com/SonyCSLParis/BENG/1eb525e132d2b1f74ae18532657561725f6fbb78/idioms/onceuponatime.lisp
lisp
This program is free software: you can redistribute it and/or modify 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 PURPOSE. See the GNU General Public License for mo...
Copyright ( C ) 2019 Sony Computer Science Laboratories Paris ( www.remivantrijp.eu ) it under the terms of the GNU General Public License as published by the Free Software Foundation , version 3 of the License . You should have received a copy of the GNU General Public Li...
79ce1aac9b539bce055dd768953acd8e1b0696f6f969ac51ac28986942299f8e
abyala/advent-2022-clojure
day20.clj
(ns advent-2022-clojure.day20 (:require [clojure.string :as str] [advent-2022-clojure.utils :refer [index-of-first]])) (defn parse-input [input] (vec (map-indexed #(vector %1 (parse-long %2)) (str/split-lines input)))) (defn index-of-original-index [idx nums] (index-of-first #(= (first %) idx) nums)...
null
https://raw.githubusercontent.com/abyala/advent-2022-clojure/ec8e06a80aa875400f87530d5205976c053ac1f6/src/advent_2022_clojure/day20.clj
clojure
(ns advent-2022-clojure.day20 (:require [clojure.string :as str] [advent-2022-clojure.utils :refer [index-of-first]])) (defn parse-input [input] (vec (map-indexed #(vector %1 (parse-long %2)) (str/split-lines input)))) (defn index-of-original-index [idx nums] (index-of-first #(= (first %) idx) nums)...
df09da7f9e6cb5c0ce30e7b788b196f3e33459be876ca99d6b31bbdba79a449b
OCamlPro/OCamlPro-OCaml-Branch
fftba.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/testsuite/tests/lib-bigarray/fftba.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 . $ I d : fftba.ml 2938 2000 - 03 - 10 ...
eddc4173624cb38c4d073a97b159618712853b46583b82505f49bcc3ae05bcf9
laser/cis-194-winter-2016
Week10Spec.hs
module Homework.Week10Spec ( main, spec ) where import Test.Hspec import Homework.Week10.Assignment main :: IO () main = hspec spec spec :: Spec spec = do describe "week 10" $ do it "needs some tests!" $ do pending
null
https://raw.githubusercontent.com/laser/cis-194-winter-2016/6a9b7c958c896cd9f31a5d1dffb3f03145efb597/test/Homework/Week10Spec.hs
haskell
module Homework.Week10Spec ( main, spec ) where import Test.Hspec import Homework.Week10.Assignment main :: IO () main = hspec spec spec :: Spec spec = do describe "week 10" $ do it "needs some tests!" $ do pending
56337e8daa18dd2d3eb998147090236f67ca317363ff56537b17a4a121c6232c
mihaimaruseac/hindent
Combinators.hs
-- | A module to import all @HIndent.Pretty.Combinators.*@s. module HIndent.Pretty.Combinators ( module HIndent.Pretty.Combinators.Comment , module HIndent.Pretty.Combinators.Getter , module HIndent.Pretty.Combinators.Indent , module HIndent.Pretty.Combinators.Lineup , module HIndent.Pretty.Combinators.Op ,...
null
https://raw.githubusercontent.com/mihaimaruseac/hindent/06f0a0226dd81b55e596f92365260944b11a3ba7/src/HIndent/Pretty/Combinators.hs
haskell
| A module to import all @HIndent.Pretty.Combinators.*@s.
module HIndent.Pretty.Combinators ( module HIndent.Pretty.Combinators.Comment , module HIndent.Pretty.Combinators.Getter , module HIndent.Pretty.Combinators.Indent , module HIndent.Pretty.Combinators.Lineup , module HIndent.Pretty.Combinators.Op , module HIndent.Pretty.Combinators.Outputable , module HInd...
b08f54702a74a9a133241c87d8c04bab07fab80ee191c6ace5219565da8e64c7
haskell-distributed/network-transport-tests
Multicast.hs
module Network.Transport.Tests.Multicast where import Network.Transport import Control.Monad (replicateM, replicateM_, forM_, when) import Control.Concurrent (forkIO) import Control.Concurrent.MVar (MVar, newEmptyMVar, takeMVar, putMVar, readMVar) import Data.ByteString (ByteString) import Data.List (elemIndex) import...
null
https://raw.githubusercontent.com/haskell-distributed/network-transport-tests/f01678a5800f1a095b3346b8aa18ddb927760c0d/src/Network/Transport/Tests/Multicast.hs
haskell
| Node for the "No confusion" test ^ Transport ^ my group : groups to subscribe to ^ I'm ready : others ready ^ number of pings ^ my message : messages from subscribed groups (same order as 'groups to subscribe to') ^ I'm done Create a new endpoint Create a new multicast group and broadcast its address Subscr...
module Network.Transport.Tests.Multicast where import Network.Transport import Control.Monad (replicateM, replicateM_, forM_, when) import Control.Concurrent (forkIO) import Control.Concurrent.MVar (MVar, newEmptyMVar, takeMVar, putMVar, readMVar) import Data.ByteString (ByteString) import Data.List (elemIndex) import...
5bd548f99101c21bec80aa7a7db136884d057efb320ffb9f9b8662ed718c6791
ptressel/LISPSearch
dt.lsp
DT - LEARN , DT - PERFORM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ; DT - LEARN implements a decision tree learner based on with a few ; extensions from those parts of C4.5 relevant to categorical data. ; It generates code for a function that r...
null
https://raw.githubusercontent.com/ptressel/LISPSearch/791c0eb65d6be9d232143795adba2e5b8057f61d/dt.lsp
lisp
extensions from those parts of C4.5 relevant to categorical data. It generates code for a function that runs the tree, and writes it to a file. User can then load the file and use the tree by calling the (dt-perform vector) Call to dt-learn is: of files containing the dataset to be used. Examples are ...
DT - LEARN , DT - PERFORM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DT - LEARN implements a decision tree learner based on with a few function DT - PERFORM with one feature vector : ( dt - learn ( list " file1 " " " ... ) excluded - words...
8fe33cf2148a87a68364006556d2260471ab8bc457eb4bc91ca21829484f23ce
dmitryvk/cl-gtk2
gobject.object.high.lisp
(in-package :gobject) (defclass g-object () ((pointer :type (or null cffi:foreign-pointer) :initarg :pointer :accessor pointer :initform nil) (has-reference :type boolean :accessor g-object-has-reference :initform nil) (signal-handlers :type (array t *) :initform (make-array...
null
https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/glib/gobject.object.high.lisp
lisp
pointers to objects to be freed If object was not created from lisp-side, we should ref it If an object is regular g-object, we should not ref-sink it not new objects should be ref_sunk but GInitiallyUnowned objects should be ref_sunk
(in-package :gobject) (defclass g-object () ((pointer :type (or null cffi:foreign-pointer) :initarg :pointer :accessor pointer :initform nil) (has-reference :type boolean :accessor g-object-has-reference :initform nil) (signal-handlers :type (array t *) :initform (make-array...
d8261bbb77ab6006ae9ff8526d995624749497c1a267ede6ff0149fdb9954a86
CIFASIS/QuickFuzz
Gen.hs
module Run.Gen (runGen) where import Prelude hiding (writeFile) import Data.ByteString.Lazy import Control.Monad import System.FilePath import System.Directory import Test.QuickCheck (generate, resize) import Test.QuickFuzz.Gen.FormatInfo import Args import Debug import Exception import Utils -- |Run gen subcomm...
null
https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/app/Run/Gen.hs
haskell
|Run gen subcommand
module Run.Gen (runGen) where import Prelude hiding (writeFile) import Data.ByteString.Lazy import Control.Monad import System.FilePath import System.Directory import Test.QuickCheck (generate, resize) import Test.QuickFuzz.Gen.FormatInfo import Args import Debug import Exception import Utils runGen :: (Show act...
614c6523f71e16a9b028cdf7d3091ad1ee943a2cc2e7703f9fed9d2319d94f20
benedekfazekas/trin
trin_test.clj
(ns thomasa.trin-test (:require [clojure.test :as t] [rewrite-clj.zip :as zip] [thomasa.trin :as trin])) (def embedded-let "(do (println \"foobar\" ) (let [a 1 b a c 3] (println a) [b c]) (println \"baz\"))") (def let-in-let "(do (println \"foobar\" ) (l...
null
https://raw.githubusercontent.com/benedekfazekas/trin/95c8ac36226c4aea0e7f5abb238b9c7b149e1f29/trin/test/thomasa/trin_test.clj
clojure
(ns thomasa.trin-test (:require [clojure.test :as t] [rewrite-clj.zip :as zip] [thomasa.trin :as trin])) (def embedded-let "(do (println \"foobar\" ) (let [a 1 b a c 3] (println a) [b c]) (println \"baz\"))") (def let-in-let "(do (println \"foobar\" ) (l...
89ab2ac490850598b6eaa04c00f25ff42fd47e4702049f8ea1b886ad3d2bb096
ghcjs/jsaddle-dom
BarProp.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.BarProp (getVisible, BarProp(..), gTypeBarProp) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Dou...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/BarProp.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.BarProp (getVisible, BarProp(..), gTypeBarProp) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))...
a3c40b1147f0fa1fdf860faa4871c57eb5cd899dbf9490ea6d7c6b2238d0a273
zotonic/zotonic
mod_mailinglist.erl
@author < > 2009 - 2023 %% @doc Mailinglist implementation. Enables to send pages to a list of recipients. Copyright 2009 - 2023 %% 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 L...
null
https://raw.githubusercontent.com/zotonic/zotonic/7555d4734a3658c0c1231b45290fd99f5c21d0c0/apps/zotonic_mod_mailinglist/src/mod_mailinglist.erl
erlang
@doc Mailinglist implementation. Enables to send pages to a list of recipients. 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, eit...
@author < > 2009 - 2023 Copyright 2009 - 2023 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_mailinglist). -author("Marc Worrell <>"). -behaviour(gen_server). -mod_title("Mailing list"). -mod_des...
3d3741a44b79ec42ae3cd541ef98b4aeb1bdcdd823327b95ce219b009b9564c9
Andromedans/andromeda
position.ml
* Position in source code . For each type in the input syntax we define two versions [ t ] and [ t ' ] . The former is the latter with a position tag . For example , [ term = term ' * position ] and [ term ' ] is the type of terms without positions . [t] and [t']. The former is the latter with a positio...
null
https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/archive/old-andromeda/position.ml
ocaml
* delimited position * unknown position
* Position in source code . For each type in the input syntax we define two versions [ t ] and [ t ' ] . The former is the latter with a position tag . For example , [ term = term ' * position ] and [ term ' ] is the type of terms without positions . [t] and [t']. The former is the latter with a positio...
affae1192eb5aaa49aad25f269fc27b6f7fb112cc3c927676b5700ced9e26dfd
lnostdal/SymbolicWeb
history.clj
(ns symbolicweb.core) (defn url-alter-query-params "Directly alters query-params of URL for Viewport. REPLACE?: If True, a history entry will not be added at the client end." [^Ref viewport ^Boolean replace? ^Fn f & args] (apply vm-alter (:query-params @viewport) f args) ;; The strange WHEN here is here to ...
null
https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/history.clj
clojure
The strange WHEN here is here to handle cases where we'll be passed both True and False for REPLACE? when this function case to always win regardless of order. via CONTEXT - WIDGET . Initial sync; add entry to URL if not already present. Continuous sync. Remove URL entry when Lifetime of CONTEXT-WIDGET ends. obs...
(ns symbolicweb.core) (defn url-alter-query-params "Directly alters query-params of URL for Viewport. REPLACE?: If True, a history entry will not be added at the client end." [^Ref viewport ^Boolean replace? ^Fn f & args] (apply vm-alter (:query-params @viewport) f args) is called many times within a SWSYNC...
d07b91c21145c325539f5e1832c051dd511e0af5a93030a3ee072e0ca58a39cb
chrisroman/coc
main.ml
open Core open Lexer open Lexing open Ast open Common let print_position outx lexbuf = let pos = lexbuf.lex_curr_p in fprintf outx "%s:%d:%d" pos.pos_fname pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1) let parse_with_error lexbuf = try Parser.start Lexer.read lexbuf with | SyntaxError msg -> fprintf s...
null
https://raw.githubusercontent.com/chrisroman/coc/95e8c344c0694b4293aad04098c046652bf42652/main.ml
ocaml
printf "%s\n" "Found a value!";
open Core open Lexer open Lexing open Ast open Common let print_position outx lexbuf = let pos = lexbuf.lex_curr_p in fprintf outx "%s:%d:%d" pos.pos_fname pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1) let parse_with_error lexbuf = try Parser.start Lexer.read lexbuf with | SyntaxError msg -> fprintf s...
1639ae85ee69d3d68d1eb5bcffa878807e3cd8e196d0733de61e0e767ea71a5e
openmusic-project/openmusic
parse.lisp
This file is part of yason , a Common Lisp JSON parser / encoder ;; Copyright ( c ) 2008 - 2012 and contributors ;; All rights reserved. ;; ;; Please see the file LICENSE in the distribution. (in-package :yason) (defconstant +default-string-length+ 20 "Default length of strings that are created while reading ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/Yason/parse.lisp
lisp
All rights reserved. Please see the file LICENSE in the distribution. would be (cl-ppcre:scan-to-strings "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+|)(?:[eE][-+]?[0-9]+|)" buffer) but we want to operate on streams backward compatibility code end of backward compatibility code
This file is part of yason , a Common Lisp JSON parser / encoder Copyright ( c ) 2008 - 2012 and contributors (in-package :yason) (defconstant +default-string-length+ 20 "Default length of strings that are created while reading json input.") (defvar *parse-object-key-fn* #'identity "Function to call to con...
14d91990d0e2a80ec48a7389fc22cef61a8fc954c55f78b7195a5b943cdb4154
discus-lang/ddc
Request.hs
module DDC.Driver.LSP.Protocol.Data.Request where import DDC.Driver.LSP.Protocol.Pack import qualified Text.JSON as J --------------------------------------------------------------------------------------------------- -- | A request message to describe a request between the client and the -- server. Every pro...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-driver/DDC/Driver/LSP/Protocol/Data/Request.hs
haskell
------------------------------------------------------------------------------------------------- | A request message to describe a request between the client and the server. Every processed request must send a response back to the sender of the request -----------------------------------------------------------...
module DDC.Driver.LSP.Protocol.Data.Request where import DDC.Driver.LSP.Protocol.Pack import qualified Text.JSON as J data Request params = Request { requestId :: RequestId , requestMethod :: String , requestParams :: Maybe params } deriving Show instance Pack param...
2797e0233f44380b9f11b91ec6af77adfa9370275c7f57fdb28786df7d2f753e
ghcjs/ghcjs
dsrun011.hs
-- Test desugaring of mutual recursion of many functions which generated a big - tuple link error in GHC 6.0 module Main where a1 :: (Num a, Eq a) => a -> a a1 x | x==0 = x a1 x = 1 + k8 (x-1) a2 x = 1 + a1 x a3 x = 1 + a2 x a4 x = 1 + a3 x a5 x = 1 + a4 x a6 x = 1 + a5 x a7 x = 1 + a6 x a8 x = 1 + a7 x b1 x = ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/deSugar/dsrun011.hs
haskell
Test desugaring of mutual recursion of many functions
which generated a big - tuple link error in GHC 6.0 module Main where a1 :: (Num a, Eq a) => a -> a a1 x | x==0 = x a1 x = 1 + k8 (x-1) a2 x = 1 + a1 x a3 x = 1 + a2 x a4 x = 1 + a3 x a5 x = 1 + a4 x a6 x = 1 + a5 x a7 x = 1 + a6 x a8 x = 1 + a7 x b1 x = 1 + a8 x b2 x = 1 + b1 x b3 x = 1 + b2 x b4 x = 1 + b3 x ...
05194e012fc26677c4216eaa0f0d5435a2607b7a50458f5a250b9313d4d62bb5
geophf/1HaskellADay
Solution.hs
module Y2016.M06.D15.Solution where - I 'm sure there are many elegant ways to define the identity matrix . I 'll use Rule 16 from the rules of 2 - dimensional cellular automata . - I'm sure there are many elegant ways to define the identity matrix. I'll use Rule 16 from the rules of 2-dimensional cellular aut...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2016/M06/D15/Solution.hs
haskell
} } }
module Y2016.M06.D15.Solution where - I 'm sure there are many elegant ways to define the identity matrix . I 'll use Rule 16 from the rules of 2 - dimensional cellular automata . - I'm sure there are many elegant ways to define the identity matrix. I'll use Rule 16 from the rules of 2-dimensional cellular aut...
2d88d6892394c0627a855e5d70adc2f6a80dc35c563c9774da378b3055ba33fe
reborg/clojure-essential-reference
3.clj
< 1 > ( ( 0 ) ( 1 1 ) ( 2 2 2 2 2 2 ) )
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialProcessing/keepandkeep-indexed/3.clj
clojure
< 1 > ( ( 0 ) ( 1 1 ) ( 2 2 2 2 2 2 ) )
6a2759a1a982c814a309b853b49c3f2d8006f944c86ef1d2407828acaa60d78f
ocaml/ood
page_handler_test.ml
* Test suite for the Utils module . let test_case n = Alcotest.test_case n `Quick let () = Alcotest.run "ood-preview" [ ( "GET /" , [ test_case "returns successfully" (fun () -> let req = Dream.request ~method_:`GET "/" in let res = Dream.test Ood_preview.Handlers.Page.inde...
null
https://raw.githubusercontent.com/ocaml/ood/5c2b39232dc5b96ff956a43d81ef8bc51eacac3b/src/ood-preview/test/page_handler_test.ml
ocaml
* Test suite for the Utils module . let test_case n = Alcotest.test_case n `Quick let () = Alcotest.run "ood-preview" [ ( "GET /" , [ test_case "returns successfully" (fun () -> let req = Dream.request ~method_:`GET "/" in let res = Dream.test Ood_preview.Handlers.Page.inde...
ba691dcdba9bbb295b8efa1a6825f28690216e1d89588ac1716772321e0c4cec
ThoughtWorksInc/stonecutter
common.cljs
(ns stonecutter.js.dom.common (:require [dommy.core :as d]) (:require-macros [dommy.core :as dm] [stonecutter.translation :as t])) (def translations (t/load-client-translations)) (defn get-lang [] (keyword (.getAttribute (dm/sel1 :html) "lang"))) (defn add-class! [selector css-class] (d/ad...
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src-cljs/stonecutter/js/dom/common.cljs
clojure
(ns stonecutter.js.dom.common (:require [dommy.core :as d]) (:require-macros [dommy.core :as dm] [stonecutter.translation :as t])) (def translations (t/load-client-translations)) (defn get-lang [] (keyword (.getAttribute (dm/sel1 :html) "lang"))) (defn add-class! [selector css-class] (d/ad...
78f6ee7276034374920d83bd4d9a007932e51a665017798144da139aa42f3690
mstksg/tensor-ops
Types.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ConstrainedClassMethods # # LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE InstanceSigs # {-# LANGUAGE K...
null
https://raw.githubusercontent.com/mstksg/tensor-ops/1958642d60d879e311da14469c3dd09c186b5fda/src/TensorOps/Types.hs
haskell
# LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE TypeFamilyDependencies # # LANGUAGE TypeInType # # LANGUAGE TypeOperators...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ConstrainedClassMethods # # LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE MultiP...
9e8098e82ff881f0494563bfae3db6822efa0d589301bcd34dce4a43860aa370
tov/shcaml
fitting.ml
vim : set open Util open Channel open Channel.Dup module Make(Shtream : AnyShtream.S) = struct type initial = Shtream.initial type 'a elem = 'a Shtream.elem type 'a shtream = 'a Shtream.t type 'a coshtream = 'a Shtream.co_t type text = initial elem type procref = Proc.t option ref (*...
null
https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/fitting.ml
ocaml
* Representation of Fittings Ground constructors Combinations * Helpers This isn't reentrant. * Interpretation of Fittings Apply a shtream transducer to a shtream, so that when the result of * the transducer is closed, so is the input shtream. OCaml allows polymorphic recursion if yo...
vim : set open Util open Channel open Channel.Dup module Make(Shtream : AnyShtream.S) = struct type initial = Shtream.initial type 'a elem = 'a Shtream.elem type 'a shtream = 'a Shtream.t type 'a coshtream = 'a Shtream.co_t type text = initial elem type procref = Proc.t option ref t...
ce57b32ec6a36770471e58e0f457cd9d1756e62318ee56c582c5298943cd380d
parsonsmatt/kale
PosTask.hs
module Lib.PosTask where data Args = Args Int String task :: Args -> IO () task (Args i s) = do print i putStrLn s
null
https://raw.githubusercontent.com/parsonsmatt/kale/fe187ac5face4eb98925d0f36ad9698329837e1d/example/src/Lib/PosTask.hs
haskell
module Lib.PosTask where data Args = Args Int String task :: Args -> IO () task (Args i s) = do print i putStrLn s
bcd947ee803e0f5c8e72c3b0f3834f3447adbc90ab4fa0ec22619a5ae5b7647a
moonlightdrive/ocaml-ec2
eC2_x.ml
* Copyright ( c ) 2014 , < > * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provinded that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/moonlightdrive/ocaml-ec2/06df35a4a29f1b51416013ddf126eeb43587dc11/lib/eC2_x.ml
ocaml
string -> time? product_codes = member "productCodes" item |> members "item" |> smth_of_string Regions
* Copyright ( c ) 2014 , < > * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provinded that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
97d9ecb9fb56adcff487e19842965a86aa2387b235cc9f142c0b4dd30750ad51
ocaml-community/lambda-term
repl.ml
* repl.ml * -------- * Copyright : ( c ) 2015 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * repl.ml * -------- * Copyright : (c) 2015, Martin DeMello <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) (* Add a REPL to an existing interpreter *) ope...
null
https://raw.githubusercontent.com/ocaml-community/lambda-term/bcb949e420d97c1aac67f93a95d25aca5ac2cb8d/examples/repl.ml
ocaml
Add a REPL to an existing interpreter +-----------------------------------------------------------------+ | Interpreter | +-----------------------------------------------------------------+ A simple model of an interpreter. It maintains some state, and expo...
* repl.ml * -------- * Copyright : ( c ) 2015 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * repl.ml * -------- * Copyright : (c) 2015, Martin DeMello <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) open React open Lwt open LTerm_text module In...