_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
03d2ee03cb9019629d7ab1e2a3f972f3fe5c335f5c1bc0669d35e23f4b8214db
tsloughter/kuberl
kuberl_v2beta1_metric_spec.erl
-module(kuberl_v2beta1_metric_spec). -export([encode/1]). -export_type([kuberl_v2beta1_metric_spec/0]). -type kuberl_v2beta1_metric_spec() :: #{ 'external' => kuberl_v2beta1_external_metric_source:kuberl_v2beta1_external_metric_source(), 'object' => kuberl_v2beta1_object_metric_source:kuberl_v2beta1_objec...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v2beta1_metric_spec.erl
erlang
-module(kuberl_v2beta1_metric_spec). -export([encode/1]). -export_type([kuberl_v2beta1_metric_spec/0]). -type kuberl_v2beta1_metric_spec() :: #{ 'external' => kuberl_v2beta1_external_metric_source:kuberl_v2beta1_external_metric_source(), 'object' => kuberl_v2beta1_object_metric_source:kuberl_v2beta1_objec...
5311fad6683953b69e19b0c1eb939ce4e473eef0a805e757e102c4df5944fb00
rescript-lang/rescript-compiler
belt_HashMap.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/45d8bbdb515ae6b3cfc35f8363b13635d66a4be6/jscomp/others/belt_HashMap.ml
ocaml
********************************************************************* OCaml ...
, 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 GNU Library General Public License , with Adapted by , Authors of 2017 ...
5d38c802b7a47e0961695efc32416b1119f29a63adc72d214d83a0227b40aba5
WorksHub/client
events.cljs
(ns wh.login.stackoverflow-callback.events (:require [re-frame.core :refer [reg-event-fx reg-event-db inject-cofx]] [wh.common.fx.persistent-state] [wh.db :as db] [wh.login.db :as login] [wh.login.shared :as login-shared] [wh.login.stackoverflow-callback.db :as stackoverflow-callback] [wh....
null
https://raw.githubusercontent.com/WorksHub/client/d5614971227b4068bdfae1de8a658e0c09f94e22/client/src/wh/login/stackoverflow_callback/events.cljs
clojure
(ns wh.login.stackoverflow-callback.events (:require [re-frame.core :refer [reg-event-fx reg-event-db inject-cofx]] [wh.common.fx.persistent-state] [wh.db :as db] [wh.login.db :as login] [wh.login.shared :as login-shared] [wh.login.stackoverflow-callback.db :as stackoverflow-callback] [wh....
b63d5cd59ce88dc5a4904407b1233512e61a64d26810afe905430e2bf111d5dd
kadena-io/chainweaver
main.hs
import qualified Linux main :: IO () main = Linux.main
null
https://raw.githubusercontent.com/kadena-io/chainweaver/3ea0bb317c07ddf954d4ebf24b33d1be7d5f9c45/linux/src-bin/main.hs
haskell
import qualified Linux main :: IO () main = Linux.main
0e1f49e80dd8d8dbfe82066f95840af1b234337f92f1ed489c1b6b4754a32759
essen/egs
egs_accounts.erl
@author < > 2010 - 2011 . %% @doc Accounts handling. %% This file is part of EGS . %% EGS is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the %% License, or (at your ...
null
https://raw.githubusercontent.com/essen/egs/ceea04c3b438cee9a8470f2abc6297429bf347c5/apps/egs/src/egs_accounts.erl
erlang
@doc Accounts handling. License, or (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. API. gen_server. @todo Make accounts permanent. API. @tod...
@author < > 2010 - 2011 . This file is part of EGS . EGS is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the EGS is distributed in the hope that it will be useful ,...
08b219989d93e4487bce7939ee57b7b3e86b9b42032e78f3fabb4d3c7883330c
cwmaguire/zombunity-mud
menu_test.cljs
(ns zombunity.menu-test (:require [goog.dom :as dom] [zombunity.menu :as menu])) (defn test-create_menu-item [] (dom/))
null
https://raw.githubusercontent.com/cwmaguire/zombunity-mud/ec14406f4addac9b9a0742d3043a6e7bccef1fa6/zombunity_web/test/menu_test.cljs
clojure
(ns zombunity.menu-test (:require [goog.dom :as dom] [zombunity.menu :as menu])) (defn test-create_menu-item [] (dom/))
be38b62ed123107c09611db752b68a955a7fc47a9cb5d4dd932905997eaf65f5
yurug/ocaml4.04.0-copatterns
parsetree_alpha.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/parsing/parsetree_alpha.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the module S = struct open Asttypes type constant = Parsetree.constant = Pconst_integer of strin...
ab66fcac54e230ae1685f7f9201623816ca2f94a435547fb751eda11feaf4c28
gfngfn/SATySFi
ir.cppo.ml
open MyUtil open LengthInterface open Types let report_bug_ir msg = Format.printf "[Bug]@ %s:" msg; failwith ("bug: " ^ msg) let report_bug_ir_ast msg ast = Format.printf "[Bug]@ %s:" msg; Format.printf "%a" pp_abstract_tree ast; failwith ("bug: " ^ msg) type frame = { global : environment; vars :...
null
https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/frontend/bytecomp/ir.cppo.ml
ocaml
-- lazy evaluation; evaluates embedded variables only -- -- lazy evaluation; evaluates embedded variables only -- -- fundamentals -- ---- record ---- ---- imperatives ---- ---- others ---- -- staging construct --
open MyUtil open LengthInterface open Types let report_bug_ir msg = Format.printf "[Bug]@ %s:" msg; failwith ("bug: " ^ msg) let report_bug_ir_ast msg ast = Format.printf "[Bug]@ %s:" msg; Format.printf "%a" pp_abstract_tree ast; failwith ("bug: " ^ msg) type frame = { global : environment; vars :...
d7b3d9493ba5c8323b2ff3d261dd87229125ea5e72c9a0012200a129b8c01287
mistupv/cauder
proxy_server.erl
-module(proxy_server). -export([main/0, server/0, proxy/1]). main() -> S = spawn(?MODULE, server, []), P = spawn(?MODULE, proxy, [S]), P ! {self(), req}, receive result -> ok end. proxy(SPid) -> receive {CPid, req} -> SPid ! {self(), req}, receive ...
null
https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/examples/proxy_server.erl
erlang
-module(proxy_server). -export([main/0, server/0, proxy/1]). main() -> S = spawn(?MODULE, server, []), P = spawn(?MODULE, proxy, [S]), P ! {self(), req}, receive result -> ok end. proxy(SPid) -> receive {CPid, req} -> SPid ! {self(), req}, receive ...
770fa62c531f8808f57f8f10905cc7d9d760bdb49d065f8fd31e138061c6ae02
arowM/haskell-google-server-api
Response.hs
# LANGUAGE TemplateHaskell # | Module : Google . Response Define data types to represent all of the responses that are received from the Google API . Module : Google.Response Define data types to represent all of the responses that are received from the Google API. -} module Google.Response (...
null
https://raw.githubusercontent.com/arowM/haskell-google-server-api/1a76a6ba4d4931128c2c58f43177f8a82a784e6f/src/Google/Response.hs
haskell
# LANGUAGE TemplateHaskell # | Module : Google . Response Define data types to represent all of the responses that are received from the Google API . Module : Google.Response Define data types to represent all of the responses that are received from the Google API. -} module Google.Response (...
d33e36b49d07824fd621dac22ec926db3c5d6461ea74b67eaad137f8e89a451b
oscoin/oscoin
Extended.hs
module Test.QuickCheck.Extended ( (===) ) where import Prelude import qualified Data.Text as T import GHC.Stack import Oscoin.Test.Util import Test.QuickCheck hiding ((===)) import qualified Test.QuickCheck as QC -- | Drop-in for QuickCheck '===' that relies on the '...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Test/QuickCheck/Extended.hs
haskell
| Drop-in for QuickCheck '===' that relies on the 'Condensed' instance to show the counterexample.
module Test.QuickCheck.Extended ( (===) ) where import Prelude import qualified Data.Text as T import GHC.Stack import Oscoin.Test.Util import Test.QuickCheck hiding ((===)) import qualified Test.QuickCheck as QC (===) :: forall b. (HasCallStack, Eq b, Show b, Conden...
a1bac686302f5f8ed205cb75af4a5cb50de6bbe0d1fabf194efee39120893e5e
2600hz-archive/whistle
rabbit_guid.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_guid.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved . -module(rabbi...
b45d78cf94ee2f103bae4fe3a689540922eef68a355b36ab9e9b0549ec4c74a9
tautologico/progfun
exercicio3.rkt
#lang racket (require rackunit rackunit/text-ui) ;; Tarefa 3 ;; Nesta tarefa faremos um pouco de revisão mas explorar algumas técnicas novas . ;; Vimos antes como escrever funções recursivas com listas , baseando a estrutura do código na estrutura recursiva das listas . : uma lista satisfaz um dos ...
null
https://raw.githubusercontent.com/tautologico/progfun/0e8b2985e48445d289fa96f27c2485710c356709/exercicios/exercicio3.rkt
racket
(remove-primeiro x lst) remove a primeira ocorrência do elemento x Veja os testes para exemplos. Escreva uma função remove-todos tal que funcionam ou não. na estrutura das listas: conjuntos. a um mas não a outro. em ambos c1 e c2 --- Executa todos os testes ---------
#lang racket (require rackunit rackunit/text-ui) Tarefa 3 Nesta tarefa faremos um pouco de revisão mas explorar algumas técnicas novas . Vimos antes como escrever funções recursivas com listas , baseando a estrutura do código na estrutura recursiva das listas . : uma lista satisfaz um dos seguintes...
8c082ffc37a34a19e168cf1bf9558facafeb51b73502b56fcae419188155d6a1
plumatic/hiphip
generators.clj
(ns hiphip.generators (:require [clojure.data.generators :as gen])) ;; # Generators ;; TODO: Add more varieties? Doubles (defn darray (^doubles [] (darray 10e3)) (^doubles [size] (gen/double-array gen/double size))) (defn drange (^doubles [] (double-array (range 10e3))) (^doubles [size] (double-array (...
null
https://raw.githubusercontent.com/plumatic/hiphip/d839359cc1e4c453cd6ffe0b5857de550b3d7489/test/hiphip/generators.clj
clojure
# Generators TODO: Add more varieties? Floats to avoid overflow when calculating the dot-product Longs
(ns hiphip.generators (:require [clojure.data.generators :as gen])) Doubles (defn darray (^doubles [] (darray 10e3)) (^doubles [size] (gen/double-array gen/double size))) (defn drange (^doubles [] (double-array (range 10e3))) (^doubles [size] (double-array (range size)))) (defn farray (^floats [] (...
bad55f68cc42b9ee37fc8329fa4b59653886595937b9171f0a3ce4e50905db12
TrustInSoft/tis-interpreter
abstract_value.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/values/abstract_value.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
0dd367c14adf6b5f3785d064499f106f61176365e092c96f540ddd64a8f85761
vicampo/riposte
whole.rkt
#lang racket/base (require (file "common.rkt")) (define (foo req) (response/jsexpr (hash 'foo "bar"))) (define (bar req) (response/jsexpr (hash 'bar "chocolate"))) (define-values (start url-generator) (dispatch-rules [("foo") #:method "get" foo] [("bar") #:method "get" bar])) (module+ main (run start...
null
https://raw.githubusercontent.com/vicampo/riposte/0a71e54539cb40b574f84674769792444691a8cf/examples/whole.rkt
racket
#lang racket/base (require (file "common.rkt")) (define (foo req) (response/jsexpr (hash 'foo "bar"))) (define (bar req) (response/jsexpr (hash 'bar "chocolate"))) (define-values (start url-generator) (dispatch-rules [("foo") #:method "get" foo] [("bar") #:method "get" bar])) (module+ main (run start...
dd51520bb187e6fce515aa3168f0a43caac3c8e167edd58adf626d9d59107851
mirage/alcotest
alcotest.ml
module Unix_platform (M : Alcotest_engine.Monad.S) = struct module M = Alcotest_engine.Monad.Extend (M) module Unix = struct open Astring include Unix let mkdir_p path mode = let is_win_drive_letter x = String.length x = 2 && x.[1] = ':' && Char.Ascii.is_letter x.[0] in let s...
null
https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/src/alcotest/alcotest.ml
ocaml
the directory exists
module Unix_platform (M : Alcotest_engine.Monad.S) = struct module M = Alcotest_engine.Monad.Extend (M) module Unix = struct open Astring include Unix let mkdir_p path mode = let is_win_drive_letter x = String.length x = 2 && x.[1] = ':' && Char.Ascii.is_letter x.[0] in let s...
4f8853812852ca991590a3a94bf035ed771f9e6ce94f9e7e38aa4d5f38adbfa7
inria-parkas/sundialsml
crunchperf.ml
(* Separated from perf.ml since updating the formatting shouldn't require re-running performance measurements. *) let synopsis = {|crunchperf -c <ocaml> <sundials> <name> Combine timing results from previous runs of perf. <ocaml> should list time for OCaml code, <sundials> the time for C code, and <na...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/examples/utils/crunchperf.ml
ocaml
Separated from perf.ml since updating the formatting shouldn't require re-running performance measurements. Helpers Function composition Includes trailing '\n'. Input/Output Formats Statistical Analysis (* FIXME: This is really slow because it re-launches octave over and over. pipe error FIXME:...
let synopsis = {|crunchperf -c <ocaml> <sundials> <name> Combine timing results from previous runs of perf. <ocaml> should list time for OCaml code, <sundials> the time for C code, and <name> should identify which example this is. crunchperf -m <file1> <file2> ... Merge multiple log files into...
7c027dad7970f08c33def153926c9b8be4026f6f65b04d1f275a1ea33db334d1
slagyr/speclj
clojure_test_spec.clj
(ns speclj.report.clojure-test-spec (:require ;cljs-macros [clojure.string :as str] [clojure.test] ;cljs-include [goog.string] ;cljs bug? [speclj.components :refer [new-characteristic new-description]] [speclj.core :refer [-new-exception -new-failure...
null
https://raw.githubusercontent.com/slagyr/speclj/45ef4f70852bc909eb852944cfedb453813d0b08/spec/speclj/report/clojure_test_spec.clj
clojure
cljs-macros cljs-include [goog.string] ;cljs bug?
(ns speclj.report.clojure-test-spec [clojure.string :as str] [clojure.test] [speclj.components :refer [new-characteristic new-description]] [speclj.core :refer [-new-exception -new-failure describe it should-contain should= with]] [speclj.report.clojure-test :refer [new-clojure-test-reporter]] [...
3141191636e4d657bb17a5aac540f19ecdffc998e60bea771635d6eb34582e76
mmontone/easy-routes
errors.lisp
(in-package :easy-routes) (defclass easy-routes-errors-acceptor (hunchentoot-errors:errors-acceptor) ()) (defmethod hunchentoot-errors::acceptor-log-error (stream (acceptor easy-routes-errors-acceptor) log-level format-string &rest format-arguments) (declare (ignore format-arguments)) (call-next-method) (...
null
https://raw.githubusercontent.com/mmontone/easy-routes/5eab00e8d47747e5df100961eebe7dedbe1a868e/errors.lisp
lisp
(in-package :easy-routes) (defclass easy-routes-errors-acceptor (hunchentoot-errors:errors-acceptor) ()) (defmethod hunchentoot-errors::acceptor-log-error (stream (acceptor easy-routes-errors-acceptor) log-level format-string &rest format-arguments) (declare (ignore format-arguments)) (call-next-method) (...
0c5642824ef4a1e057e12fade9ae1a1a5a917b6fa9536694171ae6fe2e0aa391
mhuebert/shadow-bootstrap-example
wrap_4.cljs
(ns bootstrap-test.wrap-4 (:require-macros bootstrap-test.wrap-4))
null
https://raw.githubusercontent.com/mhuebert/shadow-bootstrap-example/931f90a07381c0d2143fd2015325d9b71398ed83/src/bootstrap_test/wrap_4.cljs
clojure
(ns bootstrap-test.wrap-4 (:require-macros bootstrap-test.wrap-4))
f2adedbcbd4c883d65a6994ea548b9e1967bd85d403bf91a23d5c4a2c3a21f04
tsloughter/kuberl
kuberl_v1_ceph_fs_persistent_volume_source.erl
-module(kuberl_v1_ceph_fs_persistent_volume_source). -export([encode/1]). -export_type([kuberl_v1_ceph_fs_persistent_volume_source/0]). -type kuberl_v1_ceph_fs_persistent_volume_source() :: #{ 'monitors' := list(), 'path' => binary(), 'readOnly' => boolean(), 'secretFile' => binary(), ...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_ceph_fs_persistent_volume_source.erl
erlang
-module(kuberl_v1_ceph_fs_persistent_volume_source). -export([encode/1]). -export_type([kuberl_v1_ceph_fs_persistent_volume_source/0]). -type kuberl_v1_ceph_fs_persistent_volume_source() :: #{ 'monitors' := list(), 'path' => binary(), 'readOnly' => boolean(), 'secretFile' => binary(), ...
7035ccd3ed2c4b0fc0ba340c76cfa9c66ebbb6daea60da54050ce2003a9e34a2
nedap/formatting-stack
util.clj
(ns unit.formatting-stack.util (:require [clojure.string :as str] [clojure.test :refer :all] [formatting-stack.util :as sut] [formatting-stack.util.diff :as diff] [matcher-combinators.test :refer [match?]])) (deftest read-ns-decl (are [input expected] (= expected (sut/read...
null
https://raw.githubusercontent.com/nedap/formatting-stack/7824d61217a1f19be74fd46fc476262426fb83f6/test/unit/formatting_stack/util.clj
clojure
override user settings
(ns unit.formatting-stack.util (:require [clojure.string :as str] [clojure.test :refer :all] [formatting-stack.util :as sut] [formatting-stack.util.diff :as diff] [matcher-combinators.test :refer [match?]])) (deftest read-ns-decl (are [input expected] (= expected (sut/read...
d3f7a644308ac216b3437389731fa5484d5c4290c3c593074a99115feac84318
CarlosMChica/HaskellBook
MonadIOInstances.hs
# LANGUAGE DeriveFunctor # # LANGUAGE InstanceSigs # module MonadIOInstances where import Control.Applicative import Control.Monad.IO.Class 1 newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } deriving Functor instance (Applicative f) => Applicative (MaybeT f) where pure :: a -> Maybe...
null
https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter26/MonadIOInstances.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE InstanceSigs # module MonadIOInstances where import Control.Applicative import Control.Monad.IO.Class 1 newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } deriving Functor instance (Applicative f) => Applicative (MaybeT f) where pure :: a -> Maybe...
a47be513144508673655f2f41b6af47601f8ecbc798071f874ae7e657f62f8b6
KULeuven-CS/CPL
CHECKED.rkt
#lang eopl (require "syntax.rkt") (provide (all-defined-out)) Semantics ;;; an expressed value is either a number, or a boolean. ;; BEGIN NEW STUFF (define-datatype expval expval? (num-val (value number?)) (bool-val (boolean boolean?)) (proc-val (proc proc?)) [pair-val (left expval?) (right...
null
https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter7/CHECKED-PAIRS/CHECKED.rkt
racket
an expressed value is either a number, or a boolean. BEGIN NEW STUFF Get left exp-val of pair Get right exp-val of pair END NEW STUFF proc? : SchemeVal -> Bool procedure : Var * Exp * Env -> Proc expval->num : ExpVal -> Int expval->bool : ExpVal -> Bool expval->proc : ExpVal -> Proc Environments init-env : ...
#lang eopl (require "syntax.rkt") (provide (all-defined-out)) Semantics (define-datatype expval expval? (num-val (value number?)) (bool-val (boolean boolean?)) (proc-val (proc proc?)) [pair-val (left expval?) (right expval?)] ) (define pair->left (lambda (p) (cases expval p (...
fe5f5a8e750b0e2ffcc7c2436859aa8a90a7d086405794c88559ba2a61b712fe
softlab-ntua/bencherl
unittest_helper_SUITE.erl
2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distribut...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/test/unittest_helper_SUITE.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(unittest_helper_SUITE). -author(''). -vsn('$Id: unittest_helper_SUITE.erl 2059 2011-08-02 17:54:21Z $'). -compile(...
dac966f98ebb156eedc04f08b5e6ca0066912784b6eb7cca6410dcd1e3c00b82
mbenke/zpf2013
PlusMinus3a.hs
import MyParsec3a import Data.Char(digitToInt) import Criterion.Main gen 0 = "1" gen n = ('1':'+':'1':'-':gen (n-1)) pNum :: Parser Int pNum = fmap digitToInt digit pExp = pNum `chainl1` addop addop = do{ char '+'; return (+) } <|> do{ char '-'; return (-) } test n = parse pExp "gen" (gen n) main = ...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Parse1/PlusMinus3a.hs
haskell
import MyParsec3a import Data.Char(digitToInt) import Criterion.Main gen 0 = "1" gen n = ('1':'+':'1':'-':gen (n-1)) pNum :: Parser Int pNum = fmap digitToInt digit pExp = pNum `chainl1` addop addop = do{ char '+'; return (+) } <|> do{ char '-'; return (-) } test n = parse pExp "gen" (gen n) main = ...
b559f055e3af9b51b2faa85f5e240c11d19fe86114301f61361b7dcb63035277
clojure-interop/google-cloud-clients
core.clj
(ns com.google.cloud.spanner.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.spanner.AbortedException]) (require '[com.google.cloud.spanner.AbstractStructReader]) (require '[com.google.cloud.spanner.BatchClient]) (require '[com.google.cloud.spanner.BatchClientImpl]) (r...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/core.clj
clojure
(ns com.google.cloud.spanner.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.spanner.AbortedException]) (require '[com.google.cloud.spanner.AbstractStructReader]) (require '[com.google.cloud.spanner.BatchClient]) (require '[com.google.cloud.spanner.BatchClientImpl]) (r...
91898c9b052beba25a5f0c013b75c0909e29e8026fd3109f2340003c95de5597
priestjim/gen_rpc
integration_SUITE.erl
-*-mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et : %%% Copyright 2015 . All Rights Reserved . %%% -module(integration_SUITE). -author("Panagiotis Papadomitsos <>"). CT Macros -include_lib("test/include/ct.hrl"). %%% No need...
null
https://raw.githubusercontent.com/priestjim/gen_rpc/6e17cac4e886f36ecb35bbda91e6bb3293aaa723/test/ct/integration_SUITE.erl
erlang
No need to export anything, everything is automatically exported as part of the test profile =================================================== CT callback functions =================================================== Starting Distributed Erlang on local node Setup application logging Setup the simple TCP dr...
-*-mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et : Copyright 2015 . All Rights Reserved . -module(integration_SUITE). -author("Panagiotis Papadomitsos <>"). CT Macros -include_lib("test/include/ct.hrl"). all() -> gen_r...
648a6ce5313aeba49457cda8b65ae6bb19c15c047b389ff8d47cb979eaafb92f
bvaugon/ocapic
gc.mli
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/gc.mli
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . external run : unit -> unit = "caml_gc_run" external heap_size : unit -> int = "caml_heap_size" external stack_size : unit -> int = "caml_stack_size" external heap_occupation : uni...
333457b37327b4fd3871a74f62d05af6a4dae9e25389c855a03648623053adeb
xoken/xoken-node
AriviService.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MonoLocalBinds # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # -- module N...
null
https://raw.githubusercontent.com/xoken/xoken-node/99124fbe1b1cb9c2fc442c788c7c2bac06f5e900/node/src/Network/Xoken/Node/AriviService.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # globalHandlerRpc msg = do bp2pEnv <- getBitcoinP2P let net = bitcoinNetwork $ nodeConfig bp2pEnv liftIO $ printf "Decoded resp: %s\n" (show msg) st <- goGetResource msg net [] "" True globalHandlerPubSub tpc msg = undefined networkC...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MonoLocalBinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Network.Xoken.Node.AriviService where import Arivi.P2P.MessageHandler.H...
81a5c86ff0bb2e52371dfbffe6c5dda09cb13191d7925d471d07c2706c5a7c4f
w3ntao/sicp-solution
3-8.rkt
#lang racket (define (count time) (lambda (x) (begin (set! time (+ time 1)) (if (= x 1) (if (= time 1) 1 (begin (set! time 0) 0)) 0)))) (define f (count 0)) (+ (f 0) (f 1)) (+ (f 1) (f 0))
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-8.rkt
racket
#lang racket (define (count time) (lambda (x) (begin (set! time (+ time 1)) (if (= x 1) (if (= time 1) 1 (begin (set! time 0) 0)) 0)))) (define f (count 0)) (+ (f 0) (f 1)) (+ (f 1) (f 0))
2e451a952c4a1f3c29c03fc3836772b5f2810b0e575405580629caf2e20eb13a
braidchat/braid
uploads_page.cljs
(ns braid.page-uploads.views.uploads-page (:require [clojure.string :as string] [re-frame.core :refer [dispatch subscribe]] [reagent.core :as r] [braid.lib.date :as date] [braid.lib.upload :as upload] [braid.core.client.routes :as routes] [braid.core.client.ui.views.mentions :as mentions] [bra...
null
https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/page_uploads/views/uploads_page.cljs
clojure
(ns braid.page-uploads.views.uploads-page (:require [clojure.string :as string] [re-frame.core :refer [dispatch subscribe]] [reagent.core :as r] [braid.lib.date :as date] [braid.lib.upload :as upload] [braid.core.client.routes :as routes] [braid.core.client.ui.views.mentions :as mentions] [bra...
a3e04c8ce36b0d022faccd46c7d58b9e5ed6346051dc8f78eacd22824bfc4928
nomeata/kaleidogen
Lambda.hs
# LANGUAGE StandaloneDeriving # {-# LANGUAGE RankNTypes #-} # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -Wno - orphans # import qualified Data.ByteString.Lazy as ...
null
https://raw.githubusercontent.com/nomeata/kaleidogen/abd1de1f4d89a37e0404142d14d835d78baade55/src/Lambda.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE DeriveGeneric # # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings #
# LANGUAGE StandaloneDeriving # # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # OPTIONS_GHC -Wno - orphans # import qualified Data.ByteString.Lazy as LBS import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Text.Hex as T (decodeHex) import ...
98826e71562f51228f7d40142ec0fa543a94f6901dc01b28fa320ca9fc919a74
perkss/tinklj
daead.clj
(ns tinklj.encryption.daead) (defn encrypt [handle data salt] (.encryptDeterministically handle data salt)) (defn decrypt [handle encrypted-data salt] (.decryptDeterministically handle encrypted-data ...
null
https://raw.githubusercontent.com/perkss/tinklj/b695469ddb1e3a76dcae99ee62db0554edc38705/src/tinklj/encryption/daead.clj
clojure
(ns tinklj.encryption.daead) (defn encrypt [handle data salt] (.encryptDeterministically handle data salt)) (defn decrypt [handle encrypted-data salt] (.decryptDeterministically handle encrypted-data ...
f68c07676aaea2072e1303ed342122165fed1b9d40a4f486f17bfe2163dc9fea
scslab/hails
Tests.hs
module Main (main) where import Test.Framework import qualified AuthTests import qualified HsonTests import qualified DatabaseTests main :: IO () main = defaultMain tests tests :: [Test] tests = AuthTests.tests ++ HsonTests.tests ++ DatabaseTests.tests
null
https://raw.githubusercontent.com/scslab/hails/4d4dfe0cdfb7c8941a55ce882cba20d82c6d9cfd/tests/Tests.hs
haskell
module Main (main) where import Test.Framework import qualified AuthTests import qualified HsonTests import qualified DatabaseTests main :: IO () main = defaultMain tests tests :: [Test] tests = AuthTests.tests ++ HsonTests.tests ++ DatabaseTests.tests
95479b1414955642bf77737ed8f3ab9f6bb48f7ca272c60e7015e17765aa1872
Gandalf-/coreutils
Sponge.hs
module Coreutils.Sponge where import Control.Monad import qualified Data.ByteString as B import Coreutils.Util data Sponge = Sponge instance Util Sponge where run _ args = case args of [] -> sponge B.putStr ["-"] -> sponge B.putStr ["-h"] -> putStrLn...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/5bdb84d830993161b53f4afdba584cd99d16fd05/Coreutils/Sponge.hs
haskell
module Coreutils.Sponge where import Control.Monad import qualified Data.ByteString as B import Coreutils.Util data Sponge = Sponge instance Util Sponge where run _ args = case args of [] -> sponge B.putStr ["-"] -> sponge B.putStr ["-h"] -> putStrLn...
3d371207f6bc4b3fe0c363a0436d938e25cc723d7a7d073f6ec1202def2b0358
AndrasKovacs/ELTE-func-lang
Notes07.hs
# language InstanceSigs # # options_ghc -Wincomplete - patterns # import Control.Monad import Control.Applicative import Data.Char -- isDigit, isAlpha, digitToInt -- Parser (Monád) ------------------------------------------------------------ newtype Parser a = Parser {runParser :: String -> Maybe (a, String)} i...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/9d214d588363585a3bcd52f33443fe506ddc742c/2022-23-1/ea/Notes07.hs
haskell
isDigit, isAlpha, digitToInt Parser (Monád) ---------------------------------------------------------- String -> Maybe ( a , String) emlékezzünk: State üres inputra ileeszkedik standard: (<$) :: Functor f => a -> f b -> f a (<$) a fb = fmap (\_ -> a) fb class Monoid m where (<>) ...
# language InstanceSigs # # options_ghc -Wincomplete - patterns # import Control.Monad import Control.Applicative newtype Parser a = Parser {runParser :: String -> Maybe (a, String)} input visszatérési érték s - > ( a , s ) instance Functor Parser where fmap f (Parser g) = Par...
ef9b63177a7b53fe190886bf4307da034388f5015dda7c32d56644b2113d15b0
diagrams/diagrams-input
Text.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Diagrams.SVG.Fonts.Text ( -- * Setting text as a path using a font. TextOpts(..) , Mode(..) , Spacing(..) , textSVG , textSVG' , textSVG_ ) where import Data.D...
null
https://raw.githubusercontent.com/diagrams/diagrams-input/ce263b47886bb0cb411ef62b4d189818cbe176bd/src/Diagrams/SVG/Fonts/Text.hs
haskell
# LANGUAGE RankNTypes # * Setting text as a path using a font. | A short version of textSVG' with standard values. The Double value is the height. > <<diagrams/src_Graphics_SVGFonts_ReadFont_textSVGExample.svg#diagram=textSVGExample&width=300>> | Create a path from the given text and options. The origin is at...
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Diagrams.SVG.Fonts.Text TextOpts(..) , Mode(..) , Spacing(..) , textSVG , textSVG' , textSVG_ ) where import Data.Default.Class import Diagrams.Prelude hiding (font, text) import qualified Data....
d89c208f9b0d308ff7bef3f649b287a19a78135d9f9ccf2bc2b9834f1dbfb778
clojure-interop/java-jdk
SignedInfo.clj
(ns javax.xml.crypto.dsig.SignedInfo "An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as: <element name=\"SignedInfo\" type=\"ds:SignedInfoType\"/> <complexType name=\"SignedInfoType\"> <...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/crypto/dsig/SignedInfo.clj
clojure
(ns javax.xml.crypto.dsig.SignedInfo "An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as: <element name=\"SignedInfo\" type=\"ds:SignedInfoType\"/> <complexType name=\"SignedInfoType\"> <...
661f250bccfa7e6e8a1be2c9d61bf01820bcab8aad2a9962892f1a2ae7e01ef2
ashinn/chibi-scheme
rsa.scm
;; rsa.scm -- RSA public key cryptography library Copyright ( c ) 2014 . All rights reserved . ;; BSD-style license: The RSA key type . The public fields are always present , but the private key d may be # f. (define-record-type Rsa-Key (make-rsa-key bits n e d) rsa-key? (bits rsa-key-bits) public...
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/crypto/rsa.scm
scheme
rsa.scm -- RSA public key cryptography library BSD-style license: private exponent, the inverse of e mod (totient n) > Returns a copy of the given key with the private key, if any, > removed. From RFC-1423 Actual encryption and decryption are trivially defined as modular exponentiation. to and from integers. T...
Copyright ( c ) 2014 . All rights reserved . The RSA key type . The public fields are always present , but the private key d may be # f. (define-record-type Rsa-Key (make-rsa-key bits n e d) rsa-key? (bits rsa-key-bits) public modulus , the product of two primes public exponent , to ( totient n ...
42bcfb3432a316f1e80e0c240fe7f10ba0886506fbcf6ee55abb001632013600
digital-asset/ghc
Types.hs
# LANGUAGE DamlSyntax # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE KindSignatures # # LANGUAGE DataKinds # {-# LANGUAGE PackageImports #-} This file provides a definition required by a desugared DAML template . module GHC.Types (DamlInterface, DamlTemplate, Decimal, Opaque, primitive,...
null
https://raw.githubusercontent.com/digital-asset/ghc/18abaa00fc22f517bcc3633a93b15321079d0a3e/GHC/Types.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE PackageImports # deleted by the compiler
# LANGUAGE DamlSyntax # # LANGUAGE MultiParamTypeClasses # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # This file provides a definition required by a desugared DAML template . module GHC.Types (DamlInterface, DamlTemplate, Decimal, Opaque, primitive, primitiveInterface, magic) where import "ghc-prim" GHC.Typ...
3e392713d8c6f8f8f8d244b3772461c4f57c25d2b4f4ed21b0edd63ad2f7818a
tsdye/harris-matrix
hm-chronology.lisp
;;; hm-chronology.lisp Copyright ( C ) 2016 ;; Licensed under the Gnu Public License Version 3 or later (in-package #:hm) (defun chronology-graph-html-label (id size) "Convert the symbol ID into an html label for Graphviz dot. This function is designed specifically for use with chronology graphs." (let* ((...
null
https://raw.githubusercontent.com/tsdye/harris-matrix/9229fa7dfbfbfe23035ccfda8d89345d750e003f/src/chronology/hm-chronology.lisp
lisp
hm-chronology.lisp Licensed under the Gnu Public License Version 3 or later API If assume-correlations then adjust the event-table and event-order table accordingly
Copyright ( C ) 2016 (in-package #:hm) (defun chronology-graph-html-label (id size) "Convert the symbol ID into an html label for Graphviz dot. This function is designed specifically for use with chronology graphs." (let* ((s (string-downcase (string id)))) (format nil "<&~a;<FONT POINT-SIZE=\"~a\"><SU...
852485a1e010b6a2ae518099c14044ae349d2387b80b27dfb58d559afc8bfbbc
okuoku/nausicaa
compile-basic.mosh.sps
;;; Part of : / Scheme Contents : compile script for basic libraries with Mosh Date : Thu Apr 7 , 2011 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2011 < > ;;; ;;;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...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/libraries/compile-basic.mosh.sps
scheme
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 warra...
Part of : / Scheme Contents : compile script for basic libraries with Mosh Date : Thu Apr 7 , 2011 Copyright ( c ) 2011 < > 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 ...
3f54c88ca8a6d0e8d2c928d14af7ba09e616fb731898f121f605d91191ed8c78
melange-re/melange
main.ml
module FieldsRequestDescr = FieldsRequestDescr.Fields module Agg = FieldsRequestDescr.Aggregations let dr = Agg.any 2
null
https://raw.githubusercontent.com/melange-re/melange/1da4f469f278a21516ac39cbc721b5b491eccbf3/test/missing-namespace.t/main.ml
ocaml
module FieldsRequestDescr = FieldsRequestDescr.Fields module Agg = FieldsRequestDescr.Aggregations let dr = Agg.any 2
10edfbb51eedd60e498b5d13a3555bb627ffd2d3a03b425b8b1c9b24fa60cc3f
fendor/hsimport
ModuleTest9.hs
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import qualified Control.Monad import Control.Monad f :: Int -> Int f = (+ 3)
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/ModuleTest9.hs
haskell
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import qualified Control.Monad import Control.Monad f :: Int -> Int f = (+ 3)
1a97cfb9b5d63f5be8d983fee941602d50b662ccfdfbcd712e0785c19cabc2e8
janestreet/core
info_unit_tests.ml
open! Core let%test_unit "[create_s sexp] produces an info whose [sexp_of_t] is [sexp]" = let sexp = [%sexp "foo"] in assert (phys_equal [%sexp (Info.create_s sexp : Info.t)] sexp) ;; let%test_module "Info.Stable.V2" = (module Stable_unit_test.Make (struct include Info.Stable.V2 let equal t t' = ...
null
https://raw.githubusercontent.com/janestreet/core/d0d1b3915c9350d8e9f2b395a817659e539e6155/core/test/info_unit_tests.ml
ocaml
open! Core let%test_unit "[create_s sexp] produces an info whose [sexp_of_t] is [sexp]" = let sexp = [%sexp "foo"] in assert (phys_equal [%sexp (Info.create_s sexp : Info.t)] sexp) ;; let%test_module "Info.Stable.V2" = (module Stable_unit_test.Make (struct include Info.Stable.V2 let equal t t' = ...
426eeba1bd809f5490ecf7d63f46052cce176a6c58bb1ca7a938af11844428de
polyfy/polylith
core.clj
(ns polylith.clj.core.validator.core (:require [polylith.clj.core.util.interface :as util] [polylith.clj.core.validator.m101-illegal-namespace-deps :as m101] [polylith.clj.core.validator.m102-function-or-macro-is-defined-twice :as m102] [polylith.clj.core.validator.m103-missing-def...
null
https://raw.githubusercontent.com/polyfy/polylith/f51abaf45990eb08575317b970a388f5b6955015/components/validator/src/polylith/clj/core/validator/core.clj
clojure
(ns polylith.clj.core.validator.core (:require [polylith.clj.core.util.interface :as util] [polylith.clj.core.validator.m101-illegal-namespace-deps :as m101] [polylith.clj.core.validator.m102-function-or-macro-is-defined-twice :as m102] [polylith.clj.core.validator.m103-missing-def...
4c53b1c5185af3da52e68faa49c135163914d6a4d86f81489be853947c90750f
zotonic/zotonic
zotonic_listen_mqtt.erl
@author < > 2019 %% @doc Start the MQTT listener. Copyright 2019 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law...
null
https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_listen_mqtt/src/zotonic_listen_mqtt.erl
erlang
@doc Start the MQTT listener. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the s...
@author < > 2019 Copyright 2019 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(zotonic_listen_mqtt). -behaviour(gen_server). -export([start_link/0]). -export([ init/1, handle_call/3, ha...
760fdf372bc208fd8f7c1fc1d090f927c16e495f1a61c7966f11e57691f5c6f9
rmloveland/scheme48-0.53
comp.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; This is the main entry point to the compiler. It returns a template ; that will execute the forms (each of which is a node). ; ; This is written in a somewhat odd fashion to make sure that the forms are ; not retained once they have been compiled. ;(def...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/bcomp/comp.scm
scheme
This is the main entry point to the compiler. It returns a template that will execute the forms (each of which is a node). This is written in a somewhat odd fashion to make sure that the forms are not retained once they have been compiled. (define (compile-forms forms name) (if (null? forms) (segment->tem...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define (compile-forms forms name) (if (null? forms) (segment->template (sequentially (instruction (enum op protocol) 0) (deliver-value (instruction (enum op unspecific)) ...
017029a85ec13eacc32908b7c7d451d184338168c9e140c2ac6dc43b33a82142
nick8325/quickspec
Composition-bad.hs
# LANGUAGE TypeOperators , GeneralizedNewtypeDeriving , TypeApplications # import QuickSpec import Test.QuickCheck import Prelude hiding (fst) newtype Queue a = Queue [a] deriving (Eq, Ord, Arbitrary, CoArbitrary) nil = Queue [] enq x (Queue ys) = Queue (ys ++ [x]) deq (Queue (x:xs)) = Queue xs fst (Queue (x:xs)) = x...
null
https://raw.githubusercontent.com/nick8325/quickspec/cb61f719d3d667674431867037ff44dec22ca4f9/examples/tests/Composition-bad.hs
haskell
background con "id" (id @(Queue A)) ], "deq" `con` (deq :: Queue A -> Queue A), "fst" `con` (fst :: Queue A -> A), "nil" `con` (nil :: Queue A)
# LANGUAGE TypeOperators , GeneralizedNewtypeDeriving , TypeApplications # import QuickSpec import Test.QuickCheck import Prelude hiding (fst) newtype Queue a = Queue [a] deriving (Eq, Ord, Arbitrary, CoArbitrary) nil = Queue [] enq x (Queue ys) = Queue (ys ++ [x]) deq (Queue (x:xs)) = Queue xs fst (Queue (x:xs)) = x...
90927792107c6c7823d7be5be39a918c25c086fda11a5694cffac55d8dc91880
2600hz/kazoo
kz_services_items.erl
%%%----------------------------------------------------------------------------- ( C ) 2012 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_services/src/kz_services_items.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc @end ------------------------------------------------------------...
( C ) 2012 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kz_services_items). -export([empty/0]). -export([create/2]). -export([foldl/3]). -export([public_json/1]...
6d3a1a4a1b9a442cb0f405d77a7a18bf16d9a9df48fa44772f06f65470df3ec2
janestreet/universe
import.ml
module Ppx_sexp_conv_lib = struct module Conv_error = Sexplib0.Sexp_conv_error module Conv = Sexplib0.Sexp_conv module Sexp = Sexplib0.Sexp end module Sexp = Sexplib0.Sexp include Sexplib0.Sexp_conv module List = ListLabels
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/parsexp/src/import.ml
ocaml
module Ppx_sexp_conv_lib = struct module Conv_error = Sexplib0.Sexp_conv_error module Conv = Sexplib0.Sexp_conv module Sexp = Sexplib0.Sexp end module Sexp = Sexplib0.Sexp include Sexplib0.Sexp_conv module List = ListLabels
b9db911e5e18d35b2dea768960971e8381412e0ef4701244c5e8f68e15ba7ba6
ghosthamlet/algorithm-data-structure
set_bit.clj
(ns algorithm-data-structure.algorithms.math.bits.set-bit) (defn run [number bit-position] (bit-or number (bit-shift-left 1 bit-position)))
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/math/bits/set_bit.clj
clojure
(ns algorithm-data-structure.algorithms.math.bits.set-bit) (defn run [number bit-position] (bit-or number (bit-shift-left 1 bit-position)))
73132fbe57f35f7dd70ad1546d8114498a3229efc654ffa46998d220654f3dee
weavejester/fact
verbose.clj
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) which ;; can be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by the ;; ter...
null
https://raw.githubusercontent.com/weavejester/fact/0b413fbf06ce7f8a582d0217e5feff8c4288f03e/src/fact/output/verbose.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. fact.output.verbose:
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse Verbose output of fact results . (ns fact.output.verbose (:use fact.core)) (defn- format-params "Format a collection of parameters and values to a string." [params values] (apply str ...
5781379f2b30910c7e70138a550515ebaf13ce7d5d0e5e0c168357f0b56a2660
rizo/snowflake-os
audioMixer.ml
AudioMixer (* Provides an interface to a sound device *) open BlockIO type bit_rate = Bits8 | Bits16 type sample_rate = KHertz11 | KHertz22 | KHertz44 | KHertz48 type format = int * int * int module Wave = struct open IO type t = { channels: int; samples_per_sec: int; av...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/audioMixer.ml
ocaml
Provides an interface to a sound device resampling no conversion required; push data directly to the driver only sample rate conversion needed wave and device formats don't match
AudioMixer open BlockIO type bit_rate = Bits8 | Bits16 type sample_rate = KHertz11 | KHertz22 | KHertz44 | KHertz48 type format = int * int * int module Wave = struct open IO type t = { channels: int; samples_per_sec: int; avg_bytes_per_sec: int; block_align: int; b...
473bdbc6ba31288de1544716fc9f10d4620a892942c1034b43ef27d4ee397a0a
ivanperez-keera/SpaceInvaders
Colors.hs
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I N V A D E R S * * ...
null
https://raw.githubusercontent.com/ivanperez-keera/SpaceInvaders/4ae94c30b4b4022577a088e64fb909dc71803e57/src/Colors.hs
haskell
---------------------------------------------------------------------------- Color definitions ---------------------------------------------------------------------------- Pretty arbitrary selection of colours. Basic colours. Various greys. Various blues/cyan. Various greens/olive greens/khaki. Various oranges/b...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I N V A D E R S * * ...
5f66d48615cd7cfe6ff0c87c8637b0c56d235dcad4395900b07e6978e1f8c069
zwizwa/staapl
stitch.rkt
#lang racket/base State threading extensions based on prompt tags and reset / shift . ;; To be provided by client: ;; * prompt tag ;; * mix function (require "../tools.rkt" racket/control) (provide tag/pack/unpack->open/close make-stop make-stitch with-stitches) ;; Create a function that can be inserted...
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/scat/stitch.rkt
racket
To be provided by client: * prompt tag * mix function Create a function that can be inserted into composition of unary functions to peel off composition layers dynamically. Nesting these will return the layers inside-out. The function is wrapped by a 'stop' to provide an outer shift that terminates the loop. ...
#lang racket/base State threading extensions based on prompt tags and reset / shift . (require "../tools.rkt" racket/control) (provide tag/pack/unpack->open/close make-stop make-stitch with-stitches) (define (make-stitch tag [mix values] [more #t]) (lambda (val) (shift-at tag rest (...
1ab1e0978dadae2761945ae5885cc1397aee776511a4e585af5e59685b8d3d5d
k0001/network-simple-tls
https-client.hs
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as BL () import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) import Data.X509 (SignedCertificate) import Data.X509.Certificate...
null
https://raw.githubusercontent.com/k0001/network-simple-tls/97a07544c2a504ff9f0d38b4b4ddf26286949b71/examples/https-client.hs
haskell
# LANGUAGE OverloadedStrings # | Repeatedly receive data from the given 'T.Context' until exhausted, performing the given action on each received chunk. ------------------------------------------------------------------------------ The boring stuff below is related to command line parsing
module Main (main) where import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as BL () import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) import Data.X509 (SignedCertificate) import Data.X509.CertificateStore (makeCertificateStore, Certif...
cf17757ed529330898ea6b3805f0d9f98fd07e71c05d4cb2f9691275d6904502
wenkokke/MonoProc
TestVB.hs
module Main where import PROC import PROC.MF.Analysis.VB import PROC.Testing (testAnalysis) import PROC.Parsing (pAExprSet) import Data.Set (Set) import Text.ParserCombinators.UU.Utils (runParser) main :: IO () main = do testAnalysis mfp mfVB progVB reslVB testAnalysis mop mfVB progVB reslVB progVB ::...
null
https://raw.githubusercontent.com/wenkokke/MonoProc/c3d00bd55ee8a6f2c12ebf5abb226c731e856350/test/TestVB.hs
haskell
module Main where import PROC import PROC.MF.Analysis.VB import PROC.Testing (testAnalysis) import PROC.Parsing (pAExprSet) import Data.Set (Set) import Text.ParserCombinators.UU.Utils (runParser) main :: IO () main = do testAnalysis mfp mfVB progVB reslVB testAnalysis mop mfVB progVB reslVB progVB ::...
3c4a9ba79d983e09a33e4797540c281e10c89164b1c9d2ca038d164e74b857b6
AccelerateHS/accelerate-examples
Kmeans.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeOperators #-} -- | Module : Data . Array . Accelerate . Math . Copyright : [ 2014 .. 2020 ] -- License : BSD3 -- Maintainer : < > -- Stability : experimental ...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/kmeans/Kmeans.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # | License : BSD3 Stability : experimental algorithm. This heuristic technique finds a solution by iteratively improving an initial guess. The algorithm takes as input the number of clusters to find and makes...
# LANGUAGE ScopedTypeVariables # Module : Data . Array . Accelerate . Math . Copyright : [ 2014 .. 2020 ] Maintainer : < > Portability : non - portable ( GHC extensions ) An implementation of K - means clustering in Accelerate using Lloyd 's Adapted from K - Means sample from " Parallel a...
afe809e58a23a16470cf96f2b3d58e10382a9d504a6b3fac5199801290c60faf
slindley/effect-handlers
StateIteratees.hs
This example demonstrates that iteratees are -- algebraic computations and enumerators are effect handlers. It is a transcription of the code from Section 3 of 's FLOPS 2012 -- paper, Iteratees: -- -- # LANGUAGE GADTs , TypeFamilies , NoMonomorphismRestriction , RankNTypes , ImpredicativeTypes , Mult...
null
https://raw.githubusercontent.com/slindley/effect-handlers/39d0d09582d198dd6210177a0896db55d92529f4/Examples/StateIteratees.hs
haskell
algebraic computations and enumerators are effect handlers. It is a paper, Iteratees:
This example demonstrates that iteratees are transcription of the code from Section 3 of 's FLOPS 2012 # LANGUAGE GADTs , TypeFamilies , NoMonomorphismRestriction , RankNTypes , ImpredicativeTypes , MultiParamTypeClasses , FlexibleInstances , OverlappingInstances , FlexibleContexts , TypeOperators ...
6238bbfb08630a06f25c91894db80918a8cf050556c6be5b84477d88d150dd72
tategakibunko/jingoo
test_dead_code_elimination.ml
open OUnit2 open Jingoo open Jg_types let assert_eq expected source = let lexbuf = Lexing.from_string source in Jg_lexer.reset_context () ; Jg_lexer.init_lexer_pos None lexbuf ; let ast = try Jg_parser.input Jg_lexer.main lexbuf |> Jg_ast_optimize.dead_code_elimination with e -> failwith (J...
null
https://raw.githubusercontent.com/tategakibunko/jingoo/1ed8f036c8f37294f282fe147f767bbd11a5386d/tests/test_dead_code_elimination.ml
ocaml
open OUnit2 open Jingoo open Jg_types let assert_eq expected source = let lexbuf = Lexing.from_string source in Jg_lexer.reset_context () ; Jg_lexer.init_lexer_pos None lexbuf ; let ast = try Jg_parser.input Jg_lexer.main lexbuf |> Jg_ast_optimize.dead_code_elimination with e -> failwith (J...
6dca1d6ddfb0032d24df16d91d9a83906417e37b6a987102e55140677b451b63
facebookarchive/pfff
pleac.mli
e.g. " 10.1 " type section = string type code_excerpt = string list type comment_style = string (* comment_start *) * string (* comment_end *) type skeleton = section1 section2 title list type sections = (section, code_excerpt) Common.assoc val parse_data_file: Common.filename -> sections val p...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_program-lang/pleac.mli
ocaml
comment_start comment_end
e.g. " 10.1 " type section = string type code_excerpt = string list type comment_style = type skeleton = section1 section2 title list type sections = (section, code_excerpt) Common.assoc val parse_data_file: Common.filename -> sections val parse_skeleton_file: Common.filename -> skeleton val d...
138fc2dab5420b306acce1dabd65f7df855c81596e3479b2a25309f175097176
jellelicht/guix
pull.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 < > Copyright © 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU 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 Found...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/build/pull.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 < > Copyright © 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix build pull) #:use-module (guix build utils) #:use-mod...
89528e6d25ead4c8b6384d1cc0990b32a2502c730ad7ec9207f0b087f2534365
bluelisp/hemlock
debug.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; Slave debugging (in-package :hemlock) (defvar *slave-stack-frames* nil) (defvar *slave-stack-frames-end* nil) ;;; (defstruct (slave-stack-frame (:constructor make-slave-stack-frame (label remote-frame))) label remote-frame) ;;; This is the d...
null
https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/debug.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- Slave debugging This is the debug buffer if it exists. This is the cleanup method for deleting *debug-buffer*. Commands. fixme: show the slave name rather than just the impl type
(in-package :hemlock) (defvar *slave-stack-frames* nil) (defvar *slave-stack-frames-end* nil) (defstruct (slave-stack-frame (:constructor make-slave-stack-frame (label remote-frame))) label remote-frame) (defvar *debug-buffer* nil) (defun delete-debug-buffers (buffer) (when (eq buffer *debug-...
7a133408e6730127309cbdba4d63e4e7f336cacdeb61fd0278904bdb8d4554c0
rtoy/ansi-cl-tests
structures-04.lsp
;-*- Mode: Lisp -*- Author : Created : Mon May 19 20:07:40 2003 ;;;; Contains: More tests of structures (in-package :cl-test) ;;; I realized I had forgotten to test slot override in :include ;;; clauses in defstruct. (defstruct struct-include-01a a (b 0)) (defstruct (struct-include-01b (:include st...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/structures-04.lsp
lisp
-*- Mode: Lisp -*- Contains: More tests of structures I realized I had forgotten to test slot override in :include clauses in defstruct.
Author : Created : Mon May 19 20:07:40 2003 (in-package :cl-test) (defstruct struct-include-01a a (b 0)) (defstruct (struct-include-01b (:include struct-include-01a (a 100) (b 'x))) (c 200) d) (deftest struct-include.1 (let ((obj (make-struct-include-01b)))...
3c0de4875956a0b4f403f81247e3e5429991d3c72d2611b161dd46707430686e
deadpendency/deadpendency
RepoConfig.hs
# OPTIONS_GHC -fno - warn - overlapping - patterns -fno - warn - orphans # module RP.Effect.ReadConfig.Backend.RepoConfig () where import Common.Model.Dependency.Basic.BasicDependency import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Dependency.File....
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/run-preparer/src/RP/Effect/ReadConfig/Backend/RepoConfig.hs
haskell
# OVERLAPPING # # OVERLAPPING # # OVERLAPPING #
# OPTIONS_GHC -fno - warn - overlapping - patterns -fno - warn - orphans # module RP.Effect.ReadConfig.Backend.RepoConfig () where import Common.Model.Dependency.Basic.BasicDependency import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Dependency.File....
286458d3a3ea66ef8332fc67aae5de793b2d304b9371e7f5fb9cf11daf133a39
MastodonC/witan.ui
activities_test.cljs
(ns witan.ui.test.activities-test (:require [cljs.test :refer-macros [deftest is testing async]] [reagent.core :as r] [witan.ui.test.base :as b] [witan.ui.activities :as a])) (deftest extract-command-event-signal-test (is (= {:kixi.comms.command/key :foo} (a/extract-command-...
null
https://raw.githubusercontent.com/MastodonC/witan.ui/5ea6baaff52824ac61737911dd2c11b451157bad/test/cljs/witan/ui/test/activities_test.cljs
clojure
(ns witan.ui.test.activities-test (:require [cljs.test :refer-macros [deftest is testing async]] [reagent.core :as r] [witan.ui.test.base :as b] [witan.ui.activities :as a])) (deftest extract-command-event-signal-test (is (= {:kixi.comms.command/key :foo} (a/extract-command-...
eb396ef7a14928fb7cceb8e1f13c72535fdb2f240b89c794336fb846dddb2b91
lowasser/TrieMap
ReverseMap.hs
# LANGUAGE TypeFamilies , FlexibleContexts , , FlexibleInstances , NamedFieldPuns , RecordWildCards # # LANGUAGE MultiParamTypeClasses , CPP , UnboxedTuples , MagicHash # module Data.TrieMap.ReverseMap () where import Control.Monad.Ends import qualified Data.Monoid as M import Data.TrieMap.TrieKey import Data.TrieM...
null
https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/ReverseMap.hs
haskell
| @'TrieMap' ('Rev' k) a@ is a wrapper around a @'TrieMap' k a@ that reverses the order of the operations.
# LANGUAGE TypeFamilies , FlexibleContexts , , FlexibleInstances , NamedFieldPuns , RecordWildCards # # LANGUAGE MultiParamTypeClasses , CPP , UnboxedTuples , MagicHash # module Data.TrieMap.ReverseMap () where import Control.Monad.Ends import qualified Data.Monoid as M import Data.TrieMap.TrieKey import Data.TrieM...
59c9892295ac23383621f1fcc21ba453ec93a7dd128c368cea9df1d8fd6232e1
bradrn/Conkey
Print.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Intermediate.Print (Mode(..), renderIntermediate) where import Data.Char (toLower, toUpper) import Data.Maybe (mapMaybe) import Data.Text (Text) import qualified Data.Text as T import Convert.Intermediate (Intermediate) import qualified MS...
null
https://raw.githubusercontent.com/bradrn/Conkey/38f2882e020d18db3a96931d7888ebe0a8f3a51a/ms2mim/src/Intermediate/Print.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE ViewPatterns # | The mode in which to render an 'Intermediate' representation: | Given the 'Mode' to render in, takes a keyboard layout as represented by an 'Intermediate', and renders it to its textual representation. eliminate duplicate lines (e.g. a mapping from "a...
module Intermediate.Print (Mode(..), renderIntermediate) where import Data.Char (toLower, toUpper) import Data.Maybe (mapMaybe) import Data.Text (Text) import qualified Data.Text as T import Convert.Intermediate (Intermediate) import qualified MSKLC.Keyboard as MS either unmodified , or with alterations as requi...
6a1bbc9ff75485d2135f581792cec25cc38988ec7b808660ab66fe3447fcfcf5
webyrd/n-grams-for-synthesis
148.er-macro-transformer.scm
Copyright ( C ) ( 2016 ) . All Rights Reserved . ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, copy, ...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-150/srfi/148.er-macro-transformer.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Copyright ( C ) ( 2016 ) . All Rights Reserved . files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
f2f2cc50c5f9eb91653ef995e6429134532561b5941bbdb3c4ac6d20745f737d
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.lesson-builder.tools.script.dialog-item.character-animation.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.tools.script.dialog-item.character-animation.state :as state] [webchange.lesson-builder.tools.script.dialog-item.wrapper.views :refer [item-wrapper]] [webcha...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/1bcebce2d5a99b26cd559295d301d5255cca6a1a/src/cljs/webchange/lesson_builder/tools/script/dialog_item/character_animation/views.cljs
clojure
(ns webchange.lesson-builder.tools.script.dialog-item.character-animation.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.tools.script.dialog-item.character-animation.state :as state] [webchange.lesson-builder.tools.script.dialog-item.wrapper.views :refer [item-wrapper]] [webcha...
2638433cdd982e7f3ae59e4d4b72d1cb1df4194e292ca5c893ffbb49446f7a8a
ocamllabs/vscode-ocaml-platform
ocaml_windows.mli
Whether to use ocaml - env for opam on Windows val use_ocaml_env : unit -> bool Promise.t Spawn command from OCaml for Windows using ocaml - env val spawn_ocaml_env : string list -> Cmd.spawn Path to home directory from OCaml for Windows val cygwin_home : unit -> (string, string) result Promise.t
null
https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/e7838963a8c4ec292a2e509c4a884cd02e047b9f/src/ocaml_windows.mli
ocaml
Whether to use ocaml - env for opam on Windows val use_ocaml_env : unit -> bool Promise.t Spawn command from OCaml for Windows using ocaml - env val spawn_ocaml_env : string list -> Cmd.spawn Path to home directory from OCaml for Windows val cygwin_home : unit -> (string, string) result Promise.t
116cc97f709a2a1c867a0cee4e2a8d349ab3afa269c6a335df1578e75320531a
mnieper/unsyntax
read-syntax.scm
Copyright © ( 2020 ) . ;; This file is part of unsyntax. ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , ;; including without limitation the rights to use...
null
https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/unsyntax/read-syntax.scm
scheme
This file is part of unsyntax. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files including without limitation the rights to use, copy, modify, merge, subject to the following conditions: The above copyright notice and this permission n...
Copyright © ( 2020 ) . ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITH...
d86181dbcf55b43a957c40ccdc6d477e7f01c8cea5dc4199d782c15eea08d5a6
webmachine/webmachine
webmachine_mochiweb.erl
@author < > @author < > 2007 - 2014 Basho Technologies %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable ...
null
https://raw.githubusercontent.com/webmachine/webmachine/06459f438d6923aff09d4bb72d213e2228b8f7ab/src/webmachine_mochiweb.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. [any()...
@author < > @author < > 2007 - 2014 Basho Technologies Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and @doc Mochiweb interface for...
780c65be2b5dc90d7971654d073b222110b5c56f4e8f037be76e86044b1aaffa
YoshikuniJujo/test_haskell
Sampler.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE MonoLocalBinds # # OPTIONS_GHC -Wall -fno - warn - tabs # module Gpu.Vulkan.Sampler where import Foreign.Storable.PeekPoke import Control.Exception import qualified Gpu.Vulkan.AllocationCallbacks as AllocationCallbacks import qualified Gpu.Vulkan.Device.Type as Device import qu...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/3b4c8cf5109d9e8029c8f1fadeb5588d2248a577/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Sampler.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE MonoLocalBinds # # OPTIONS_GHC -Wall -fno - warn - tabs # module Gpu.Vulkan.Sampler where import Foreign.Storable.PeekPoke import Control.Exception import qualified Gpu.Vulkan.AllocationCallbacks as AllocationCallbacks import qualified Gpu.Vulkan.Device.Type as Device import qualified Gpu.Vulkan.Sampler.M...
dd432f4a697ab7f33e5625fff6f03c5e1bb836d7b92b717f8be851b8dbdac2a7
openmusic-project/openmusic
in-out-boxes.lisp
;========================================================================= OpenMusic : Visual Programming Language for Music Composition ; Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free software : yo...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/0bd8613a844a382e5db7185be1b5a5d026d66b20/OPENMUSIC/code/kernel/ommodele/omframes/simpleframes/boxes/in-out-boxes.lisp
lisp
========================================================================= (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ======...
OpenMusic : Visual Programming Language for Music Composition Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU General Publi...
120138e10daa6ad5ecfff0b6a4de5b3dcc2d7f923f99bf5c1a75be3c9a8d7bd2
ToTal/total
common.mli
type name = string type variable val none : unit -> variable val none_with : name -> variable val some : name -> variable val get_name : variable -> name option val eq : variable -> variable -> bool type position = Position of Lexing.position * Lexing.position | Nowhere val nowhere : 'a -> 'a * position
null
https://raw.githubusercontent.com/ToTal/total/fa9c677c9110afd5fb423a4fe24eafff2fd08507/common.mli
ocaml
type name = string type variable val none : unit -> variable val none_with : name -> variable val some : name -> variable val get_name : variable -> name option val eq : variable -> variable -> bool type position = Position of Lexing.position * Lexing.position | Nowhere val nowhere : 'a -> 'a * position
d8220081c3a98ac17f100b7d770940540405eb74009021bd602f54e1c9511669
vinted/kafka-elasticsearch-tool
impact.clj
(ns replay.impact (:require [clojure.tools.logging :as log] [core.async :as async] [core.json :as json] [core.deep-merge :as dp] [scroll.request :as r] [scroll.pit :as pit] [sink.elasticsearch.index :as es-sink] [source.elasticsearch ...
null
https://raw.githubusercontent.com/vinted/kafka-elasticsearch-tool/fc84164b8d9ee97da01aed4ab21a3cd1ae6b10ec/src/replay/impact.clj
clojure
-rank-eval.html Remove preference string Remove routing parameter Remove trailing question mark -rank-eval.html
(ns replay.impact (:require [clojure.tools.logging :as log] [core.async :as async] [core.json :as json] [core.deep-merge :as dp] [scroll.request :as r] [scroll.pit :as pit] [sink.elasticsearch.index :as es-sink] [source.elasticsearch ...
34a0ee04ecbe4f8db8f40417d22f20c3cabf5e9d0fcb0fd1754673deff30692b
pascal-knodel/haskell-craft
E'3''9.hs
-- -- -- ---------------- Exercise 3.9 . ---------------- -- -- -- module E'3''9 where threeDifferent :: Integer -> Integer -> Integer -> Bool threeDifferent a b c = a /= b && a /= c && b /= c -- Note: "threeDifferent" is not like "not threeEqual". GHCi > threeDifferent 3 4 3 -- False ...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'3''9.hs
haskell
-------------- -------------- Note: "threeDifferent" is not like "not threeEqual". False ~> 3 /= 4 && ... ~> True && 3 /= 3 && ... ~> True && False && ... ~> True && False ~> False
Exercise 3.9 . module E'3''9 where threeDifferent :: Integer -> Integer -> Integer -> Bool threeDifferent a b c = a /= b && a /= c && b /= c GHCi > threeDifferent 3 4 3 threeDifferent 3 4 3
9707061451078dc4407063f1dafb72ffb0c56fe806b25e2f3215b77ce4603987
genmeblog/techtest
dataset.clj
(ns techtest.api.dataset (:require [tech.ml.dataset :as ds] [tech.ml.dataset.column :as col] [tech.ml.protocols.dataset :as prot] [tech.ml.dataset.parse.name-values-seq :as nvs] [techtest.api.utils :refer [iterable-sequence?]])) ;;;;;;;;;;;;;;;;;;;;; DAT...
null
https://raw.githubusercontent.com/genmeblog/techtest/4b8111fde17fcffd7f7fb6fa9454d030f1847adc/src/techtest/api/dataset.clj
clojure
(ns techtest.api.dataset (:require [tech.ml.dataset :as ds] [tech.ml.dataset.column :as col] [tech.ml.protocols.dataset :as prot] [tech.ml.dataset.parse.name-values-seq :as nvs] [techtest.api.utils :refer [iterable-sequence?]])) DATASET CREATION (defn d...
26e3811e6131fa326a0e66ea28bad736bbc7ddab4ebf691c632c87ecad2d4a76
RedPRL/redtt
Tree.ml
type 'a tree = | Node of {label : 'a; children : 'a forest} and 'a forest = 'a tree list type 'a frame = {label : 'a; lefts : 'a forest; rights : 'a forest} type 'a dtree = {below : 'a forest; above : 'a frame list} type 'a zip = {label : 'a; ctx : 'a dtree} let init label = let ctx = {below = [];...
null
https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/basis/Tree.ml
ocaml
type 'a tree = | Node of {label : 'a; children : 'a forest} and 'a forest = 'a tree list type 'a frame = {label : 'a; lefts : 'a forest; rights : 'a forest} type 'a dtree = {below : 'a forest; above : 'a frame list} type 'a zip = {label : 'a; ctx : 'a dtree} let init label = let ctx = {below = [];...
db8506d692d7e69c413c1d3c0452f1487a5274d32cbac965679cf40280bc9863
amw-zero/sligh
env.ml
(* Various pieces of information about parsed source, such as data and type definitions *) open Core module SchemaEnv = Map.Make(String) type env = { schemas: typed_attr list SchemaEnv.t } let empty_env = { schemas=SchemaEnv.empty } let add_stmt_to_env stmt env = match stmt with | Entity(name, attrs) -> ...
null
https://raw.githubusercontent.com/amw-zero/sligh/bb979a0f7c0c57dfc9c2fd00ee02e490816ce786/lib/env.ml
ocaml
Various pieces of information about parsed source, such as data and type definitions
open Core module SchemaEnv = Map.Make(String) type env = { schemas: typed_attr list SchemaEnv.t } let empty_env = { schemas=SchemaEnv.empty } let add_stmt_to_env stmt env = match stmt with | Entity(name, attrs) -> { schemas=SchemaEnv.add name attrs env.schemas } | _ -> env
cfd2eb20f196cf308d3eee9d85424894e8fb1fe5eb9c0e45e6800a86fe276177
marcoheisig/adventofcode
day-11.lisp
(defpackage :adventofcode-2018-day-11 (:use :cl :petalisp)) For this task , I decided to use , the experimental parallel ;;; programming language that I'm working on. (in-package :adventofcode-2018-day-11) (defparameter *grid-serial-number* 9995) (defun nth-digit (n integer &optional (base 10)) (mod (floor i...
null
https://raw.githubusercontent.com/marcoheisig/adventofcode/e96a0da17cd79f424af984ed2648b49ffdacb893/2018/day-11/day-11.lisp
lisp
programming language that I'm working on.
(defpackage :adventofcode-2018-day-11 (:use :cl :petalisp)) For this task , I decided to use , the experimental parallel (in-package :adventofcode-2018-day-11) (defparameter *grid-serial-number* 9995) (defun nth-digit (n integer &optional (base 10)) (mod (floor integer (expt base n)) base)) (defun power-lev...
91d2ba4310f4b284f6e57fe9880e809674d5ca32ac29ca077330b504f75b49fe
ronxin/stolzen
lists.scm
#lang scheme (define (println x) (display x) (newline) ) (define one-four (list 1 2 3 4)) one-four (println "car and cdr on lists:") (car one-four) (cdr one-four) (car (cdr one-four)) (cons 10 one-four) (println "list-ref") ; available as primitive (define (list-ref items i) ...
null
https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.2/lists.scm
scheme
available as primitive avalilable as primitive 2.17
#lang scheme (define (println x) (display x) (newline) ) (define one-four (list 1 2 3 4)) one-four (println "car and cdr on lists:") (car one-four) (cdr one-four) (car (cdr one-four)) (cons 10 one-four) (println "list-ref") (define (list-ref items i) (if (= i 0) ...
e1c1e66b422b3a58ccb1e7dade7a65b0bcc0a42cdd7af882b32af75fed05a901
spawnfest/eneo4j
eneo4j_reposnse_test.erl
-module(eneo4j_reposnse_test). -include_lib("eunit/include/eunit.hrl"). -define(DUMMY_SUCCESS_RESPONSE, #{<<"errors">> => [], <<"results">> => []}). -define(ACTUALL_SUCCES_RESPONSE, #{ <<"errors">> => [], <<"results">> => [ #{ <<"columns">> => [<<"n">>], <<"data">> => [ ...
null
https://raw.githubusercontent.com/spawnfest/eneo4j/17f3a2b8b6a6b297259d170b3309d225a5d0eaf2/test/eneo4j_reposnse_test.erl
erlang
-module(eneo4j_reposnse_test). -include_lib("eunit/include/eunit.hrl"). -define(DUMMY_SUCCESS_RESPONSE, #{<<"errors">> => [], <<"results">> => []}). -define(ACTUALL_SUCCES_RESPONSE, #{ <<"errors">> => [], <<"results">> => [ #{ <<"columns">> => [<<"n">>], <<"data">> => [ ...
f6c37ff25aaeef63e7887759e916c39df769bf89fab31c490e4c4a8377399605
THISISDINOSAUR/Anatomy
bone.rkt
#lang racket ;TODO: should unit test this file (specifically the operations) (provide (all-defined-out)) (require "structs/point.rkt" "structs/rect.rkt" "structs/polygon.rkt" "structs/polygon-tree.rkt" "string.rkt" racket/gui/base) (define bone% (class object% (in...
null
https://raw.githubusercontent.com/THISISDINOSAUR/Anatomy/883aa140c41cd375575a2944bda79608c660935b/bone.rkt
racket
TODO: should unit test this file (specifically the operations) connections are only required for when the name of child bones is required (e.g. printing bones, converting to JSON). It is a list of child bones. TODO: we should rename to be more descriptive
#lang racket (provide (all-defined-out)) (require "structs/point.rkt" "structs/rect.rkt" "structs/polygon.rkt" "structs/polygon-tree.rkt" "string.rkt" racket/gui/base) (define bone% (class object% (init points) (init-field [name ""] [polygon-tree #f...
da365a32600ea829a316a143edcc0ba434f04cc5c0d3be4b9d64a2b0fd46b24a
li-clutter-org/http2-test
SynStream.hs
# LANGUAGE StandaloneDeriving , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , GADTs # module Rede.SpdyProtocol.Framing.SynStream( SynStreamValidFlags(..) ,SynStreamFrame(..) ) where import Data.Binary (Binary, Get, get, put) import ...
null
https://raw.githubusercontent.com/li-clutter-org/http2-test/38d6706511f93af875273f7702fa0ea8582d5d8e/hs-src/Rede/SpdyProtocol/Framing/SynStream.hs
haskell
To make sense of this, we need the state of the stream...
# LANGUAGE StandaloneDeriving , MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , GADTs # module Rede.SpdyProtocol.Framing.SynStream( SynStreamValidFlags(..) ,SynStreamFrame(..) ) where import Data.Binary (Binary, Get, get, put) import ...
a24dd3f41a634dfa2aa769a4fc956daba06f80206c0f670d96530bc750af5bc2
GlideAngle/flare-timing
Fsdb.hs
| Module : Flight . Fsdb Copyright : ( c ) Block Scope Limited 2017 License : MPL-2.0 Maintainer : Stability : experimental Provides parsing the fsdb format for competitors , tasks and results . Module : Flight.Fsdb Copyright : (c) Block Scope Limited 2017 License : MPL-2.0...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/fsdb/library/Flight/Fsdb.hs
haskell
| Module : Flight . Fsdb Copyright : ( c ) Block Scope Limited 2017 License : MPL-2.0 Maintainer : Stability : experimental Provides parsing the fsdb format for competitors , tasks and results . Module : Flight.Fsdb Copyright : (c) Block Scope Limited 2017 License : MPL-2.0...
0a80ab6baf850f62de5b9546115b8eb387820047dfb5eb34357ac67f9277abe4
ghcjs/ghcjs
Linker.hs
# LANGUAGE OverloadedStrings , TupleSections , DeriveGeneric # TupleSections, DeriveGeneric #-} | GHCJS linker , collects dependencies from the object files ( .js_o , js_p_o ) , which contain linkable units with dependency information ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/fe2db5d0f1dd8dbff3127611a86536e28e058abf/src/Gen2/Linker.hs
haskell
sourcePackageId, import Data.Monoid ^ module and the index of the block in the object file number of bytes linked per module | result of a link pass ^ statistics about generated code ^ size of packed metadata in generated code ^ library code to load with the RTS ^ library code to load after RTS ^ li...
# LANGUAGE OverloadedStrings , TupleSections , DeriveGeneric # TupleSections, DeriveGeneric #-} | GHCJS linker , collects dependencies from the object files ( .js_o , js_p_o ) , which contain linkable units with dependency information ...
2d1541d7c8028c799972a868f621e273baccdc93fd1ddafca8441611584c193b
ocaml-multicore/ocaml-tsan
main.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/driver/main.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 compiler 's main module
255e5be7e21ff8915ecbba2c28041c646011e1a3d14c487576edda95ae5f59cf
turquoise-hexagon/euler
solution.scm
(import (euler)) (define (solve n) (let ((l (expt 10 (- n 1))) (h (- (expt 10 n) 1))) (do ((a l (+ a 1)) (acc 0 (do ((b a (+ b 1)) (acc acc (let ((_ (* a b))) (if (palindrome? _) (max acc _) ...
null
https://raw.githubusercontent.com/turquoise-hexagon/euler/a5a8d06d9090754fdf5d9d52c7c87d4833fb2c38/src/004/solution.scm
scheme
(import (euler)) (define (solve n) (let ((l (expt 10 (- n 1))) (h (- (expt 10 n) 1))) (do ((a l (+ a 1)) (acc 0 (do ((b a (+ b 1)) (acc acc (let ((_ (* a b))) (if (palindrome? _) (max acc _) ...
e76bb7997596506ea5948ca95723061ca02a1f084d0057906932ea01d777c18c
MBcode/LispUtils
backprop.lisp
;;;; A basic neural-network backpropagation algorithm. Includes a momentum ;;;; term. Trains until all outputs within a specified epsilon of their ;;;; target values or a specified number of epochs are completed. Uses a fully connected network with one hidden layer . By default , the number of hidden units is 10 %...
null
https://raw.githubusercontent.com/MBcode/LispUtils/8c9d09aa732fca1c7c5b42b6c5067b89de98cb49/stat/ml-progs/ml/backprop.lisp
lisp
A basic neural-network backpropagation algorithm. Includes a momentum term. Trains until all outputs within a specified epsilon of their target values or a specified number of epochs are completed. category and classifies examples into the category with highest output. This program may be freely copied, use...
Uses a fully connected network with one hidden layer . By default , the number of hidden units is 10 % of the total number of binary inputs + outputs . Includes binary encoding for feature vectors and uses one output bit per See chapter 8 of PDP1 , especially pp . 322 - 335 . Copyright ( C ) 1988 by and ...
d90e639d0dd00d9aaaadbce1601169b1215019470d91bb80b19ac5df3d39d128
fission-codes/fission
Types.hs
module Fission.User.Username.Types ( Username , mkUsername ) where import Database.Persist.Class import Database.Persist.Sql import Data.Swagger import Servant.API import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Text as Text ...
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/User/Username/Types.hs
haskell
I'd rather fail fast so know about it so we can fix it ~expede
module Fission.User.Username.Types ( Username , mkUsername ) where import Database.Persist.Class import Database.Persist.Sql import Data.Swagger import Servant.API import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Text as Text ...
3077140065298f2fe6b699cc8e3b3cf5aa2c6f9920dc6cd08fc71f8e46275441
agda/agda
Parser.hs
, 2016 - 02 - 01 auxiliary module for stand - alone program Agda . TypeChecking . . Main | Parser combinator parser for constraints . # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - missing - signatures # module Parser where , 2016 - 02 - 01 because of depe...
null
https://raw.githubusercontent.com/agda/agda/b52a21df3816c2cbc1a36d4e849c68b7e53fffb0/src/size-solver/Parser.hs
haskell
KEEP commented out code to follow: {- } skip whitespace UNUSED * Testing -}
, 2016 - 02 - 01 auxiliary module for stand - alone program Agda . TypeChecking . . Main | Parser combinator parser for constraints . # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - missing - signatures # module Parser where , 2016 - 02 - 01 because of depe...
a3c83a2193df954389599192b983fa6f59dbd6b3a4ab280911f51597ab897537
psholtz/MIT-SICP
rsa.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Problem 2 : Raising a Number to a Power ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define slow-exptmod (lambda (a b n) (if (= b 0) 1 (*mod a (slow-exptmod a (- b 1) n) n)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Projects-S2007/Project1/rsa.scm
scheme
Converting message strings to and from integers. and returns the number n = i_0 + i_1*radix + i_2*radix2 + ... i_k*radix^k + radix^(k+1) test cases - > 148392003 - > 1915325 - > 1 Inverse of join-numbers. Takes a number n generated by that n = i_0 + i_1*radix + ...
Problem 2 : Raising a Number to a Power (define slow-exptmod (lambda (a b n) (if (= b 0) 1 (*mod a (slow-exptmod a (- b 1) n) n)))) Problem 4 : Prime Numbers (define test-factors (lambda (n k) (cond ((>= k n) #t) ((= (remainder n k) 0) #f) (else...
1a45edbc1d3aa6cf26c094a66100a4bc8a8e656cb57016291b95df531418dc6b
cuter-testing/cuter
example.erl
% Run, e.g., with: erl -noshell -pa $ PWD / ebin -eval " cuter : run(example , foo11 , [ [ 17 ] ] , 10 ) " -s init stop -module(example). -export([foo11/1, foo21/1, foo12/1, foo22/1, foo11s/1, foo21s/1, foo12s/1, foo22s/1, foo11i/1, foo21i/1, foo12i/1, foo22i/1]). foo11(L) -> lists:foreach(fun f...
null
https://raw.githubusercontent.com/cuter-testing/cuter/62a300d5cadf62ca9af5bc62ff0a0cb2d717dfcd/example.erl
erlang
Run, e.g., with:
erl -noshell -pa $ PWD / ebin -eval " cuter : run(example , foo11 , [ [ 17 ] ] , 10 ) " -s init stop -module(example). -export([foo11/1, foo21/1, foo12/1, foo22/1, foo11s/1, foo21s/1, foo12s/1, foo22s/1, foo11i/1, foo21i/1, foo12i/1, foo22i/1]). foo11(L) -> lists:foreach(fun fcmp1/1, L). foo21(...
7cf21294276e65b79f3961ab20bfc79051024e0c4cc78cfc9891a563eda17b5f
mbillingr/lisp-in-small-pieces
evaluator.scm
(include "system.scm") (define-class undefined-value Object ()) (define-class RunTime-Primitive Object (func comparator arity)) (define-class RunTime-Procedure Object (body variables environment)) (define objectify-error error) (define g.predef '()) (define sg.predef '()) (define (sr-extend sr variable value) ...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/09-macros/evaluator.scm
scheme
(car variables) is a regular variable
(include "system.scm") (define-class undefined-value Object ()) (define-class RunTime-Primitive Object (func comparator arity)) (define-class RunTime-Procedure Object (body variables environment)) (define objectify-error error) (define g.predef '()) (define sg.predef '()) (define (sr-extend sr variable value) ...
a3fc055ab6f132a2ad52fcff69ba219ee85784917c230773786fb553be03bee4
well-typed/json-sop
PartialResult.hs
-- | Monad for partial results module Generics.SOP.Util.PartialResult ( Partial(..) , runPartial , partialResult -- * Re-exports , lift ) where import Control.Applicative import Control.Monad import Control.Monad.Trans.Class | Repeat f zero or more times -- -- Note that this is a free monad construc...
null
https://raw.githubusercontent.com/well-typed/json-sop/f58f9d33106b6c837c8a0ad843032af2097662cb/src/Generics/SOP/Util/PartialResult.hs
haskell
| Monad for partial results * Re-exports Note that this is a free monad construction, but the difference is in the "more success". This is very useful in parser construction: if all parsers for all constructors fail immediately, we want to show an error message for all the top-level parsers ("expected T1 or T2 ....
module Generics.SOP.Util.PartialResult ( Partial(..) , runPartial , partialResult , lift ) where import Control.Applicative import Control.Monad import Control.Monad.Trans.Class | Repeat f zero or more times MonadPlus instead . We regard successive PSucc applications to indicate data Partial (f :: * -...