_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
21a4922b0a470cb63a9b649994953f66a3eca883952e225b35078c4d47f0bbf1
manuel-serrano/hop
_stream_wrap.scm
;*=====================================================================*/ * serrano / prgm / project / hop / hop / nodejs/_stream_wrap.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/d39336c2ca1f2f6939be8a24f99feeb9a70cc008/nodejs/_stream_wrap.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Common stream functions */ *===========================...
* serrano / prgm / project / hop / hop / nodejs/_stream_wrap.scm * / * Author : * / * Creation : Mon Oct 20 12:31:24 2014 * / * Last change : Sat Aug 28 06:29:52 2021 ( serrano ) * / * Copyri...
18855deab4d67b5ae692d46a6be0d15317eefc5e269f9646657f484a8ac0d6a0
capnproto/capnp-ocaml
example1.ml
Instantiate a module for the type module Foo = Foo.Make(Capnp.BytesMessage) (* This is a very simple example where we create a message - encode it then decode it *) let encode n = let open Foo in Constructing the message . First we instantiate and initialize the builder giving us a handle on a read / write o...
null
https://raw.githubusercontent.com/capnproto/capnp-ocaml/6787c5ac8458cdd15752c8aa7fc098c510381b11/src/examples/1/example1.ml
ocaml
This is a very simple example where we create a message - encode it then decode it Using the readwrite handle we set [num] to the provided value Then encode it into a message constructing a string with the contents Get a stream of the bytes to deserialize Attempt to get the next frame from the stream in the fo...
Instantiate a module for the type module Foo = Foo.Make(Capnp.BytesMessage) let encode n = let open Foo in Constructing the message . First we instantiate and initialize the builder giving us a handle on a read / write object . let rw = Builder.Foo.init_root () in Builder.Foo.num_set rw n; let message ...
e6fece3888d887761b4323f4da0b4d928aebf1ee720d2a2bd93cbdea6773b24a
axellang/axel
GhciMock.hs
# LANGUAGE TemplateHaskell # module Axel.Test.Eff.GhciMock where import Axel.Prelude import Axel.Eff.Ghci as Effs import Control.Lens import Effectful import Effectful.Dispatch.Dynamic import Effectful.Error.Static import Effectful.State.Static.Local import TestUtils data GhciState = GhciState { _ghciExecu...
null
https://raw.githubusercontent.com/axellang/axel/8da784ae24406d4328e111b3db13f64dc943f738/test/Axel/Test/Eff/GhciMock.hs
haskell
# LANGUAGE TemplateHaskell # module Axel.Test.Eff.GhciMock where import Axel.Prelude import Axel.Eff.Ghci as Effs import Control.Lens import Effectful import Effectful.Dispatch.Dynamic import Effectful.Error.Static import Effectful.State.Static.Local import TestUtils data GhciState = GhciState { _ghciExecu...
bbe711dfad2da729d6b594a6cd15d1e667252b03e860037ddfff2b4906fb7e4d
YouyouCong/ppl-summer-school-2022
either.ml
ある計算を a と b let either a b = shift (fun k -> k a; k b) ;; (* 動作例 *) reset (fun () -> let x = either 1 2 in if x mod 2 = 0 then print_int x) ;;
null
https://raw.githubusercontent.com/YouyouCong/ppl-summer-school-2022/876e70d40a1cb7f8b16fb4985fd6dccb50f48601/cong/example/either.ml
ocaml
動作例
ある計算を a と b let either a b = shift (fun k -> k a; k b) ;; reset (fun () -> let x = either 1 2 in if x mod 2 = 0 then print_int x) ;;
e74d51065ec29c0dc4b59c5d8a8e82bdffa0bdb4237d6d0cd8a8b3e29e5129c6
qiao/sicp-solutions
2.36.scm
(define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define nil '()) (define (accumulate-n op init seqs) (if (null? (car seqs)) nil (cons (accumulate op init (map car seqs)) (accumulate-n o...
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.36.scm
scheme
(define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define nil '()) (define (accumulate-n op init seqs) (if (null? (car seqs)) nil (cons (accumulate op init (map car seqs)) (accumulate-n o...
d26f1a1ca7626fd7119e49a539082b15cd5451d88c425d0a8033f5bc0d6cce25
MercuryTechnologies/moat
SumOfProductDocSpec.hs
module SumOfProductDocSpec where import Common import Control.Monad (when) import Moat import Test.Hspec import Test.Hspec.Golden import Prelude hiding (Enum) -- | Documentation for 'Record0'. data Record0 = Record0 { record0Field0 :: Int, ^ The zeroth field of record 0 record0Field1 :: Int ^ The first fiel...
null
https://raw.githubusercontent.com/MercuryTechnologies/moat/6fc4d51ed976265c55be6bef17486f09044093b5/test/SumOfProductDocSpec.hs
haskell
| Documentation for 'Record0'. | Documentation for 'Record1'. | A constructor. | Another constructor.
module SumOfProductDocSpec where import Common import Control.Monad (when) import Moat import Test.Hspec import Test.Hspec.Golden import Prelude hiding (Enum) data Record0 = Record0 { record0Field0 :: Int, ^ The zeroth field of record 0 record0Field1 :: Int ^ The first field of record 0 } mobileGenWith ...
1c337871950760448732471704a930d3536fc931ec5966cd2dd2ae6205318704
georepl/georepl
draw_framework_test.clj
(ns georepl.draw-framework-test (:require [clojure.test :refer :all] [georepl.shapes :as shapes] [georepl.elements :as elements] [georepl.draw-framework :as fw])) (deftest setup-test (#'fw/init-renderer :test) (testing "setup-gui" (let [state (#'fw/setup-gui)] (is (...
null
https://raw.githubusercontent.com/georepl/georepl/1502ae04bbc3cab757000714008ccecc4e9e571b/test/georepl/draw_framework_test.clj
clojure
(ns georepl.draw-framework-test (:require [clojure.test :refer :all] [georepl.shapes :as shapes] [georepl.elements :as elements] [georepl.draw-framework :as fw])) (deftest setup-test (#'fw/init-renderer :test) (testing "setup-gui" (let [state (#'fw/setup-gui)] (is (...
af3ba7f53707c12faa4e1af950412f3a0ed2dcbf8a6850f0fd48d4b6789e0827
kanaka/bartender
render.cljc
(ns vend.render (:require [clojure.math.combinatorics :refer [combinations]] [clojure.pprint :refer [pprint]] [clojure.string :as S] [clojure.set :as set] [cemerick.url :refer [url]] #?(:cljs [reagent.core :as r]) [send.core :as core] ...
null
https://raw.githubusercontent.com/kanaka/bartender/4357fde74adb228a3cd3fcc12cae4926da899b4e/src/vend/render.cljc
clojure
(def FAIL "#f09090") general elements TODO: Workaround weird initial state tapv specific elements flat specific elements top-level start elements The modal dialog that will contain the table for the cell that was clicked.
(ns vend.render (:require [clojure.math.combinatorics :refer [combinations]] [clojure.pprint :refer [pprint]] [clojure.string :as S] [clojure.set :as set] [cemerick.url :refer [url]] #?(:cljs [reagent.core :as r]) [send.core :as core] ...
3bb04ba7adcf2844e62ed234eda2e8da7270d0c8b1a7ad0406cf7601b56705a7
Dasudian/DSDIN
dsdns_update_tx.erl
-module(dsdns_update_tx). -include("ns_txs.hrl"). -behavior(dsdtx). %% Behavior API -export([new/1, type/0, fee/1, ttl/1, nonce/1, origin/1, check/5, process/5, accounts/1, signers/2, serialization_template/1, serial...
null
https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdns/src/dsdns_update_tx.erl
erlang
Behavior API Getters =================================================================== Types =================================================================== =================================================================== Behaviour API =================================================================== TO...
-module(dsdns_update_tx). -include("ns_txs.hrl"). -behavior(dsdtx). -export([new/1, type/0, fee/1, ttl/1, nonce/1, origin/1, check/5, process/5, accounts/1, signers/2, serialization_template/1, serialize/1, ...
e176d07eb93cef59f83fbed4ca36ef9ead60c19ea0009cdd0812163a3eac4095
erlang/rebar3
rebar_xref_SUITE.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et -module(rebar_xref_SUITE). -export([suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0, xref_test/1, xref_ignore_test/1, x...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_xref_SUITE.erl
erlang
ex: ts=4 sw=4 et =================================================================== common_test callbacks =================================================================== =================================================================== Test cases ===========================================================...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(rebar_xref_SUITE). -export([suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0, xref_test/1, xref_ignore_test/1, xref_dep_hook/1, ...
5f640662fd325cd1b645484cb85667ac5efbdcc50dc5fc345dbf956cb2e0326b
clash-lang/clash-compiler
Naturals.hs
# LANGUAGE ViewPatterns # module Naturals where import Clash.Prelude import Clash.Explicit.Testbench import GHC.Natural to prevent GHC constant folding plusNatural' :: Natural -> Natural -> Natural plusNatural' = (+) # NOINLINE plusNatural ' # timesNatural' :: Natural -> Natural -> Natural timesNatural' = (*) #...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Numbers/Naturals.hs
haskell
TODO: Should get constant folded. Test using blackbox forcing an 1045, SHOULD show after transformations TODO: NOT constant fold. Instead, it should get compiled to undefined. TODO: the result of the code below is outside the range of an unsigned. ( -2 ) 998 , should NOT show after transformations
# LANGUAGE ViewPatterns # module Naturals where import Clash.Prelude import Clash.Explicit.Testbench import GHC.Natural to prevent GHC constant folding plusNatural' :: Natural -> Natural -> Natural plusNatural' = (+) # NOINLINE plusNatural ' # timesNatural' :: Natural -> Natural -> Natural timesNatural' = (*) #...
17716f56cf33c19f4f5455788624b43e88aec97377503354b3c03d5794a245f2
zlatozar/study-paip
gps1.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CH4 - FIRST ; Base : 10 -*- ;;; Code from Paradigms of Artificial Intelligence Programming Copyright ( c ) 1991 File gps1.lisp : First version of GPS ( General Problem Solver ) (in-package #:ch4-first) (defvar *state* nil "The current state: a list of con...
null
https://raw.githubusercontent.com/zlatozar/study-paip/dfa1ca6118f718f5d47d8c63cbb7b4cad23671e1/ch04/gps1.lisp
lisp
Syntax : COMMON - LISP ; Package : CH4 - FIRST ; Base : 10 -*- Code from Paradigms of Artificial Intelligence Programming After applying operation it adds in 'add-list' what is achieved and remove from 'del-list' what is loosed. ____________________________________________________________________________ ...
Copyright ( c ) 1991 File gps1.lisp : First version of GPS ( General Problem Solver ) (in-package #:ch4-first) (defvar *state* nil "The current state: a list of conditions.") (defvar *ops* nil "A list of available operators.") (defstruct op "An operation" (action nil) (preconds nil) (add-list nil...
b9c65300f5c2efca57c1de1eb8d28470e33652830d11c7cee9d6a2de69e3df68
ghc/testsuite
T8392.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables , TypeFamilies , UndecidableInstances , AllowAmbiguousTypes # module T8392 where class Fun f a b where fun :: f -> a -> b instance (b ~ Int, a ~ Int) => Fun F a b where fun _ = (+1) data F = F data Compose a b = Compose a b -- ghc-...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/T8392.hs
haskell
ghc-7.6 version
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables , TypeFamilies , UndecidableInstances , AllowAmbiguousTypes # module T8392 where class Fun f a b where fun :: f -> a -> b instance (b ~ Int, a ~ Int) => Fun F a b where fun _ = (+1) data F = F data Compose a b = Compose a b instanc...
6c1a4bbb7f5436178714103bc6be6279ccf905554c03d5cbc696cb08a67bdd03
arttuka/reagent-material-ui
create_filter_options.cljs
(ns reagent-mui.material.create-filter-options "Imports @mui/material/Autocomplete/createFilterOptions as a Reagent component. Original documentation is at -ui/react-autocomplete/#createfilteroptions-config-filteroptions ." (:require [reagent-mui.util :refer [clj->js']] ["@mui/material/Autocomplete" ...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/create_filter_options.cljs
clojure
(ns reagent-mui.material.create-filter-options "Imports @mui/material/Autocomplete/createFilterOptions as a Reagent component. Original documentation is at -ui/react-autocomplete/#createfilteroptions-config-filteroptions ." (:require [reagent-mui.util :refer [clj->js']] ["@mui/material/Autocomplete" ...
d724a4f8b27e40ca6acbefd7eac63389c89fad0d54a3ddc276c48a0839638091
ocaml-multicore/tezos
slot_repr.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/slot_repr.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
2ef095aad3b8ae233822ef42426dcbf841d2108290af36d96c284296b20609d9
rabbitmq/khepri
machine_code_called_from_ra.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved . %% -module(machine_code_called_from_ra). -include_lib("...
null
https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/machine_code_called_from_ra.erl
erlang
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved . -module(machine_code_called_from_ra). -include_lib("eunit/...
e2a2b0a61c7ef40905e896aa3a2f7301dbfd4dbf4f81dbe906a0b27defd881b8
bakul/s9fes
scm2html.scm
Scheme 9 from Empty Space , Function Library By , 2010 - 2018 ; In the public domain ; ; (scm2html <option> ...) ==> string | unspecific ; ; Render Scheme code in HTML with syntax highlighting and optional ; CSS-based paren-matching. Input is read from (current-input-stream) ; and output is written to (current...
null
https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/contrib/scm2html.scm
scheme
In the public domain (scm2html <option> ...) ==> string | unspecific Render Scheme code in HTML with syntax highlighting and optional CSS-based paren-matching. Input is read from (current-input-stream) and output is written to (current-output-stream) unless the 'INPUT-STRING: option is specified (see below). ...
Scheme 9 from Empty Space , Function Library By , 2010 - 2018 r R4RS procedure specified in LIST ( see INPUT - STRING :) . = = > ( ( " c " # f quote 0 ( ) ) " < SPAN class = y><B>'</B></SPAN><SPAN class = c > ( ) " ) (load-from-library "keyword-value.scm") ...
b30c01ad42d3dd9f907fb41d6525f20429d530911d3d1dcc28179d3f962e4bd0
hunt-framework/hunt
Instances.hs
{-# OPTIONS -fno-warn-orphans #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # -- ---------------------------------------------------------------------------- {- | Default 'Bijection' instances. -} -- ---------------------------------------------------------------------------- module D...
null
https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/src/Data/Bijection/Instances.hs
haskell
# OPTIONS -fno-warn-orphans # ---------------------------------------------------------------------------- | Default 'Bijection' instances. ---------------------------------------------------------------------------- ------------------------------------------------------------ | 'Text' to 'String'. | 'Stri...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Data.Bijection.Instances where import Data.Bijection import Data.Text instance Bijection Text String where to = unpack from = pack instance Bijection String Text where to = pack from = unpack
709e61f66e115ffcf807ad5d0afcd67321e43212423d7b7a9411c697d05ca312
jtdaugherty/dbmigrations
CommandHandlers.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} module Moo.CommandHandlers where import Data.String.Conversions (cs, (<>)) import Moo.Core import Moo.CommandUtils import Control.Monad ( when, forM_ ) import Data.Maybe ( isJust ) import Control.Monad.Reader ( ask...
null
https://raw.githubusercontent.com/jtdaugherty/dbmigrations/80336a736ac394a2d38c65661b249b2fae142b64/src/Moo/CommandHandlers.hs
haskell
# LANGUAGE OverloadedStrings # Default behavior: ask for dependencies if linear mode is disabled If the migration is already installed, remove it as part of the test
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # module Moo.CommandHandlers where import Data.String.Conversions (cs, (<>)) import Moo.Core import Moo.CommandUtils import Control.Monad ( when, forM_ ) import Data.Maybe ( isJust ) import Control.Monad.Reader ( asks ) import System.Exit ( exitWith, ...
a9a9c4fc344b7c70c00c5f70998a1561c9781727de216bd583bd1a7bc24fecd8
Xandaros/MinecraftCLI
Encoding.hs
# LANGUAGE RecordWildCards , , StandaloneDeriving , DeriveGeneric # module Network.Protocol.Minecraft.Encoding ( generateSharedKey , encryptionResponse , setCompressionThreshold , enableEncr...
null
https://raw.githubusercontent.com/Xandaros/MinecraftCLI/f1cc7f83ede1575cb7244e154a5161d31ca0d5e2/src/Network/Protocol/Minecraft/Encoding.hs
haskell
Function taken from #L154-L165 Encrypt a bytestring using the cfb8 aes128 cipher, and the provided shift register add the cipher text to the output, and return the updated shift register shift the new ciphertext into the shift register
# LANGUAGE RecordWildCards , , StandaloneDeriving , DeriveGeneric # module Network.Protocol.Minecraft.Encoding ( generateSharedKey , encryptionResponse , setCompressionThreshold , enableEncr...
e4f4bff8733403d20f9550437ac770b1b0c4bc5b61602ef9c7039132106300fd
p2k/ecoinpool
couchdb_sharelogger.erl
%% Copyright ( C ) 2011 Patrick " p2k " < > %% %% This file is part of ecoinpool. %% %% ecoinpool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option...
null
https://raw.githubusercontent.com/p2k/ecoinpool/01ba76a7ab4b17b60cb0c525786fddef43ea80e1/apps/ecoinpool/src/couchdb_sharelogger.erl
erlang
This file is part of ecoinpool. ecoinpool is free software: you can redistribute it and/or modify (at your option) any later version. ecoinpool 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....
Copyright ( C ) 2011 Patrick " p2k " < > 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(couchdb_sharelogger). -behaviour(gen_sharelogger). -be...
520b01ed7faf44bf20b4e3104ee4e42e7e2ea247309c05aa14a75e3ef91836bd
eproxus/meck
meck_history_tests.erl
%%%============================================================================ Copyright 2013 %%% 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 requ...
null
https://raw.githubusercontent.com/eproxus/meck/3efce27e01fcb442f0ec7dc3af587745510fdc19/test/meck_history_tests.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 expr...
Copyright 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(meck_history_tests). -include_lib("eunit/include/eunit.hrl"). history_test_() -> {foreach, fun setup/0, fun teardown/1, [ fun num_calls...
1612ba1f08271963ade7c9e749cace8793d26653b8277253b913cce61444404b
unisonweb/unison
UriParser.hs
module Unison.Codebase.Editor.UriParser ( repoPath, writeGitRepo, deprecatedWriteGitRemotePath, writeRemotePath, parseReadRemoteNamespace, parseReadShareRemoteNamespace, ) where import Data.Bifunctor (first) import Data.Char (isAlphaNum, isDigit, isSpace) import Data.Sequence as Seq import qual...
null
https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/unison-cli/src/Unison/Codebase/Editor/UriParser.hs
haskell
Here are the git protocols that we know how to parse Local Protocol File Protocol $ git clone [:treeish][:[#hash][.path]] $ git clone ssh://[user@]server/project.git[:treeish][:[#hash][.path]] $ git clone [user@]server:project.git[:treeish][:[#hash][.path]] >>> P.parseMaybe writeRemotePath "unisonweb.base._relea...
module Unison.Codebase.Editor.UriParser ( repoPath, writeGitRepo, deprecatedWriteGitRemotePath, writeRemotePath, parseReadRemoteNamespace, parseReadShareRemoteNamespace, ) where import Data.Bifunctor (first) import Data.Char (isAlphaNum, isDigit, isSpace) import Data.Sequence as Seq import qual...
106d53c3e4dfa5cf2701c62951d141165b7dc73b626ae7a4ed827a594b7ac78e
skynet-gh/skylobby
server.clj
(ns skylobby.fx.server (:require [cljfx.api :as fx] [clojure.string :as string] [skylobby.fs :as fs] skylobby.fx [skylobby.fx.ext :refer [ext-recreate-on-key-changed]] [skylobby.fx.font-icon :as font-icon] [skylobby.util :as u] [taoensso.tufte :as tufte])) (set! *warn-on-reflection* ...
null
https://raw.githubusercontent.com/skynet-gh/skylobby/b08404c63b033e8bb3fa1ee9d7510a9c11e2f095/src/clj/skylobby/fx/server.clj
clojure
reversed
(ns skylobby.fx.server (:require [cljfx.api :as fx] [clojure.string :as string] [skylobby.fs :as fs] skylobby.fx [skylobby.fx.ext :refer [ext-recreate-on-key-changed]] [skylobby.fx.font-icon :as font-icon] [skylobby.util :as u] [taoensso.tufte :as tufte])) (set! *warn-on-reflection* ...
edd6d5700755c1a68d9c035fd483f76e43aadfc381bfdb5111974d450741eed9
cj1128/sicp-review
higher-order-procedure.scm
(define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (inc n) (+ n 1)) (define (cube n) (* n n n)) (define (identity n) n) (define (sum-cubes a b) (sum cube a inc b)) (define (ordinary-sum a b) (sum identity a inc b)) (define (pi-sum a b) (define (p...
null
https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-1/1.3/higher-order-procedure.scm
scheme
(define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (inc n) (+ n 1)) (define (cube n) (* n n n)) (define (identity n) n) (define (sum-cubes a b) (sum cube a inc b)) (define (ordinary-sum a b) (sum identity a inc b)) (define (pi-sum a b) (define (p...
027c1b06642cf8e08ea0f911bc45841daebd73697c054c8082c7b2a761e45d6a
dancrumb/clojure-brave-and-true
chapter7.clj
(ns clojure-brave-and-true.chapter7 (:gen-class)) (use 'clojure.pprint) (defn exercise-1 [] (eval (list (read-string "print") "Dan Rumney:" "Shaun of the Dead"))) (def operators {'+ 1, '- 1, '* 2, '/ 2}) (defn operator-precedence [op] (get operators op)) (defn operator? [op] (or (= op '+) (= op '-) (= op '*) (= op...
null
https://raw.githubusercontent.com/dancrumb/clojure-brave-and-true/6ae47dcfc3274b6751156f54c486b0732d0e5edc/src/clojure_brave_and_true/chapter7.clj
clojure
(ns clojure-brave-and-true.chapter7 (:gen-class)) (use 'clojure.pprint) (defn exercise-1 [] (eval (list (read-string "print") "Dan Rumney:" "Shaun of the Dead"))) (def operators {'+ 1, '- 1, '* 2, '/ 2}) (defn operator-precedence [op] (get operators op)) (defn operator? [op] (or (= op '+) (= op '-) (= op '*) (= op...
79e0c9284e48d938d7e3924747096cc686b96d630d1cc8005d1fed98e9c63ef2
stuartsierra/component
component_test.clj
(ns com.stuartsierra.component-test (:require [clojure.test :refer (deftest is are)] [clojure.set :refer (map-invert)] [com.stuartsierra.component :as component])) (def ^:dynamic *log* nil) (defn- log [& args] (when (thread-bound? #'*log*) (set! *log* (conj *log* args)))) (defn- order...
null
https://raw.githubusercontent.com/stuartsierra/component/34f6ebb3b0e0346c7072756a7318d840f7ba5a7b/test/com/stuartsierra/component_test.clj
clojure
deliberately scrambled order
(ns com.stuartsierra.component-test (:require [clojure.test :refer (deftest is are)] [clojure.set :refer (map-invert)] [com.stuartsierra.component :as component])) (def ^:dynamic *log* nil) (defn- log [& args] (when (thread-bound? #'*log*) (set! *log* (conj *log* args)))) (defn- order...
8ad9706646b839bcec6da85019b416f064774ab1217c5f6b85cf2484ba729d60
dradtke/Lisp-Text-Editor
trivial-garbage.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; trivial-garbage.lisp --- Trivial Garbage! ;;; This software is placed in the public domain by ;;; <> and is provided with absolutely no ;;; warranty. (defpackage #:trivial-garbage (:use #:cl) (:shadow #:make-hash-table) (:nicknames #:tg) (:export #:gc ...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/trivial-garbage-20120107-git/trivial-garbage.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- trivial-garbage.lisp --- Trivial Garbage! <> and is provided with absolutely no warranty. Weak Pointers Weak Hash-tables and weak values but it's not obvious whether it's an OR or an AND relation. TODO: figure that out. it's necessary to shadow-import it. For example...
This software is placed in the public domain by (defpackage #:trivial-garbage (:use #:cl) (:shadow #:make-hash-table) (:nicknames #:tg) (:export #:gc #:make-weak-pointer #:weak-pointer-value #:weak-pointer-p #:make-weak-hash-table #:hash-table-weakness...
196ed10c370e1e42209d35c91e6c98f5f26594aa59a77bb77348918325686c12
narimiran/AdventOfCode2022
day12.clj
(ns day12 (:require aoc [clojure.data.int-map :refer [int-map]])) (def ^:const N 100) (defn neighbours ^longs [^long pt] (for [^long delta [-1 1 (- N) N]] (+ delta pt))) (defn find-val [grid height] (some #(when (= height (val %)) (key %)) grid)) (defn travel [grid part] (let [start (find-...
null
https://raw.githubusercontent.com/narimiran/AdventOfCode2022/65242db17ced8ba9629446979d9abf1de142781a/clojure/day12.clj
clojure
(ns day12 (:require aoc [clojure.data.int-map :refer [int-map]])) (def ^:const N 100) (defn neighbours ^longs [^long pt] (for [^long delta [-1 1 (- N) N]] (+ delta pt))) (defn find-val [grid height] (some #(when (= height (val %)) (key %)) grid)) (defn travel [grid part] (let [start (find-...
2225960cc4098e14b0245bd9ef25db8b531f0964584ca9db43116472ef30084b
zeniuseducation/poly-euler
tutorial.clj
(ns euler.tutorial (:require [clojure.set :refer :all])) (defn sqr [x] (* x x)) (defn cube [x] (* x x x)) (defn mapsqr [ls] (keep #(if (even? %) (sqr %)) ls)) (defn filters [ls] (remove #(zero? (rem % 5)) ls)) (defn removes [elmt ls] (remove #(= % elmt) ls)) (comment - take-while - filter - rem...
null
https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/practice/tutorial.clj
clojure
(ns euler.tutorial (:require [clojure.set :refer :all])) (defn sqr [x] (* x x)) (defn cube [x] (* x x x)) (defn mapsqr [ls] (keep #(if (even? %) (sqr %)) ls)) (defn filters [ls] (remove #(zero? (rem % 5)) ls)) (defn removes [elmt ls] (remove #(= % elmt) ls)) (comment - take-while - filter - rem...
724cc882bae2e564441de9e545589c0695ce1660e372346a4c23b6bd6339e7ea
miraj-project/miraj
component.clj
(ns foo.component (:require [clojure.java.io :as io] [clojure.pprint :as pp] [miraj.core :as miraj] [miraj.compiler :as wc] [miraj.co-dom :as x] [miraj.html :as h] [miraj.polymer.Protocols :as protocols] [miraj.polymer.paper :as paper...
null
https://raw.githubusercontent.com/miraj-project/miraj/bf6f7d4d1c383ac9294dcdef2ad48b3863b6d84f/src/test/foo/component.clj
clojure
[miraj.polymer.paper.behavior :as behaviors] (println "loading org.example.greetings.arrival") (ns-unalias *ns* 'paper) (:require [miraj.polymer.paper :as paper :refer [button]]) (:style '(styles.shared shared-styles)) (x/element :content)) Listens for "input" event and sets greeting to <input>.value (pp/pprint ...
(ns foo.component (:require [clojure.java.io :as io] [clojure.pprint :as pp] [miraj.core :as miraj] [miraj.compiler :as wc] [miraj.co-dom :as x] [miraj.html :as h] [miraj.polymer.Protocols :as protocols] [miraj.polymer.paper :as paper...
ae2f5d90a5e87ceb37f3c5a4f966f3ad86b579eb0976d6d5353145adab30dbe4
poor-a/erlang-ffi
Mnesia.hs
-- | Module : Foreign . Erlang . OTP Copyright : ( c ) , 2008 ( c ) , 2015 -- License : GPL3 -- -- Maintainer : -- Stability : experimental -- Portability : portable -- module Foreign.Erlang.OTP.Mnesia ( -- * Mnesia database methods backup , dirtyAllKeys , dirtyFirst...
null
https://raw.githubusercontent.com/poor-a/erlang-ffi/9d03d5a0f2000ad3e3f12c721c8b597ba42185b6/src/Foreign/Erlang/OTP/Mnesia.hs
haskell
| License : GPL3 Maintainer : Stability : experimental Portability : portable * Mnesia database methods
Module : Foreign . Erlang . OTP Copyright : ( c ) , 2008 ( c ) , 2015 module Foreign.Erlang.OTP.Mnesia ( backup , dirtyAllKeys , dirtyFirst , dirtyNext , dirtyLast , dirtyPrev , dirtyMatchObject , dirtyRead , dirtySelect ) where import Foreign.Erlang.OTP.GenServe...
3e8b0bf940679992ec8573caa0ec6c205b991b156538ef9274431aaf490c6675
expipiplus1/vulkan
SessionCreateFlagBits.hs
{-# language CPP #-} -- No documentation found for Chapter "SessionCreateFlagBits" module OpenXR.Core10.Enums.SessionCreateFlagBits ( SessionCreateFlags , SessionCreateFlagBits(..) ) where import Data.Bits (Bits) impor...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/openxr/src/OpenXR/Core10/Enums/SessionCreateFlagBits.hs
haskell
# language CPP # No documentation found for Chapter "SessionCreateFlagBits"
module OpenXR.Core10.Enums.SessionCreateFlagBits ( SessionCreateFlags , SessionCreateFlagBits(..) ) where import Data.Bits (Bits) import Data.Bits (FiniteBits) import OpenXR.Internal.Utils (enumReadPrec) import OpenXR....
647fd3c14d9aa2340ce3ae26f61ba5e7563d9cc4faf4849fec0c44337f3debfd
simmone/racket-simple-xlsx
string-cell-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../../xlsx/xlsx.rkt") (require "../../../../../style/style.rkt") (require "../../../../../style/sort-styles.rkt") (require "../../../../../style/set-styles.rkt") (require "../../../../../sheet/sheet.rkt") (require "../../../../....
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/worksheets/worksheet/cell/string-cell-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../../xlsx/xlsx.rkt") (require "../../../../../style/style.rkt") (require "../../../../../style/sort-styles.rkt") (require "../../../../../style/set-styles.rkt") (require "../../../../../sheet/sheet.rkt") (require "../../../../....
8a9a719c135635f86204141b95423f71abdff3092f9e46c2b9a3204ffc8703b3
penpot/penpot
drawarea.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.workspace.viewport.drawarea "Drawing components." (:require [app.common.math :as mth] ...
null
https://raw.githubusercontent.com/penpot/penpot/3de217a52efd12759b2c0e821f190bf805db41e1/frontend/src/app/main/ui/workspace/viewport/drawarea.cljs
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.workspace.viewport.drawarea "Drawing components." (:require [app.common.math :as mth] [app.main.ui.shapes.path :refer...
5d38e52f430a107e8a578f13f5de2b238841d8a1a78c4ae1950e102fc61b6988
cardmagic/lucash
srfi-1.scm
;;; SRFI-1 list-processing library -*- Scheme -*- ;;; Reference implementation ;;; Copyright ( c ) 1998 , 1999 by . You may do as you please with ;;; this code as long as you do not remove this copyright notice or ;;; hold me liable for its use. Please send bug reports to . ;;; -Olin Changes made for Sche...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/srfi/srfi-1.scm
scheme
SRFI-1 list-processing library -*- Scheme -*- Reference implementation this code as long as you do not remove this copyright notice or hold me liable for its use. Please send bug reports to . -Olin - CHECK-ARG is defined as a macro that does nothing. - replaced the one use of LET-OPTIONAL - added defin...
Copyright ( c ) 1998 , 1999 by . You may do as you please with Changes made for Scheme 48 (define-syntax check-arg (syntax-rules () ((check-arg stuff ...) #f))) (define (:optional maybe-value default) (cond ((null? maybe-value) default) ((null? (cdr maybe-value)) (car maybe-value)) (else (error...
92ba6dbf5b7f567b57f3bcc8ff3fce46c42019e5af5392b668c972d6bcb9748c
mzp/coq-ide-for-ios
cpretty.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/tools/coqdoc/cpretty.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : cpretty.mli 13323 2...
f92b5466ba5eaf7e82bbd0c0fae90ee0d1ea8425dfd727fdff7af01db403bc9e
alexandergunnarson/quantum
schema.cljc
(ns quantum.db.datomic.schema "Schema syncing and schema alteration functions. Like the forthcoming `posh.lib.schemas`." (:require [datascript.core :as ds] #?(:clj [datomic.api :as dat]) [quantum.core.fn :refer [fn-> fn']] [quantum.core.collec...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/db/datomic/schema.cljc
clojure
Ensure that no datoms are affected by deleted schemas Ensure changed and added schemas are valid TODO 1 Doesn't validate other schema changes they cannot be transacted. frustratingly, doesn't even work with un-`inc`ed txn-id
(ns quantum.db.datomic.schema "Schema syncing and schema alteration functions. Like the forthcoming `posh.lib.schemas`." (:require [datascript.core :as ds] #?(:clj [datomic.api :as dat]) [quantum.core.fn :refer [fn-> fn']] [quantum.core.collec...
6a93a87215c17db5dad7be124db44b6dc7eab5ff8dd09621337781310e3de31f
modular-macros/ocaml-macros
bdd.ml
Translated to OCaml by Original code written in SML by ... type bdd = One | Zero | Node of bdd * int * int * bdd let rec eval bdd vars = match bdd with Zero -> false | One -> true | Node(l, v, _, h) -> if vars.(v) then eval h vars else eval l vars let getId bdd = match bdd with Node(_,_,i...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/misc/bdd.ml
ocaml
Testing
Translated to OCaml by Original code written in SML by ... type bdd = One | Zero | Node of bdd * int * int * bdd let rec eval bdd vars = match bdd with Zero -> false | One -> true | Node(l, v, _, h) -> if vars.(v) then eval h vars else eval l vars let getId bdd = match bdd with Node(_,_,i...
be33fd9cf22c208667d476f5fe06fd9c79e1787efb2a0b80a455c5eee1c95524
mokus0/junkbox
StackTrace.hs
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Monads.StackTrace where import Control.Applicative import Control.Monad.Reader import Control.Monad.Identity import Control.Monad.Trans import Data.Sequence as Seq import Data.Foldable (toList) newtype StackTraceT f m a = StackTraceT (ReaderT (Seq f) m a) ...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Monads/StackTrace.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # ReaderT has a pretty stupid Functor instance, so rolling my own:
module Monads.StackTrace where import Control.Applicative import Control.Monad.Reader import Control.Monad.Identity import Control.Monad.Trans import Data.Sequence as Seq import Data.Foldable (toList) newtype StackTraceT f m a = StackTraceT (ReaderT (Seq f) m a) deriving (Monad) runStackTraceT :: StackTraceT f m...
ec716728fbe7da2d409fe44511f4c1f12442393d0383bf7fb16043983f79ffa9
mejgun/haskell-tdlib
AnswerCallbackQuery.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.AnswerCallbackQuery where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | -- Sets the result of a callback query; for bots only data AnswerCallbackQuery = AnswerCallbackQuery | Time during which the res...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Query/AnswerCallbackQuery.hs
haskell
# LANGUAGE OverloadedStrings # | | Sets the result of a callback query; for bots only | URL to be opened | Pass true to show an alert to the user instead of a toast notification | Text of the answer | Identifier of the callback query
module TD.Query.AnswerCallbackQuery where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U data AnswerCallbackQuery = AnswerCallbackQuery | Time during which the result of the query can be cached , in seconds cache_time :: Maybe Int, url :: Maybe String, ...
af23bf339d5ec340665b99ccaac39810337323b08206919c462417130b0d276a
nasa/Common-Metadata-Repository
core.clj
(ns cmr-edsc-stubs.core (:require [cmr-edsc-stubs.data.cmrapis] [cmr-edsc-stubs.data.fake-response] [cmr-edsc-stubs.data.jdbc] [cmr-edsc-stubs.data.metadatadb] [cmr.sample-data.const] [potemkin :refer [import-vars]])) (import-vars [cmr-edsc-stubs.data.cmrapis ingest-ges-disc-airx3std-collecti...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/edsc-stubs/src/cmr_edsc_stubs/core.clj
clojure
(ns cmr-edsc-stubs.core (:require [cmr-edsc-stubs.data.cmrapis] [cmr-edsc-stubs.data.fake-response] [cmr-edsc-stubs.data.jdbc] [cmr-edsc-stubs.data.metadatadb] [cmr.sample-data.const] [potemkin :refer [import-vars]])) (import-vars [cmr-edsc-stubs.data.cmrapis ingest-ges-disc-airx3std-collecti...
317e822a1614230596d167ae90b35af9451f95a4b34cf9a9847cd8bbf5cb87c6
exercism/haskell
Tests.hs
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Base (Error(..), rebase) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = de...
null
https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/all-your-base/test/Tests.hs
haskell
debatable: This could be Left InvalidOutputBase as well.
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Base (Error(..), rebase) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = de...
1aa26d81573d0660d0227b751dc5cdd79969b84724cc879d770a53f741908acc
IndianRoboticsOrganization/ArimaTTS
INST_LANG_VOX_tokenizer.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Carnegie Mellon University ; ; ; and and ; ; ; Copyright ( c ) 1998 - 2000 ...
null
https://raw.githubusercontent.com/IndianRoboticsOrganization/ArimaTTS/7377dca466306e2e6b90a063427273142cd50616/festvox/src/vox_files/indic/INST_LANG_VOX_tokenizer.scm
scheme
;;; ; ; ; ; ; ; ; ; ;;; Permission is hereby granted, free of charge, to use and distribute ;;; this software and its documentation without restriction, including ;;; withou...
to say festival / lib / so others can use it . (set! INST_LANG_VOX::token.whitespace " \t\n\r") (set! INST_LANG_VOX::token.singlecharsymbols "") (define (unicode_class c) (cond ((member_string c )) 'punc) ((member_string c '("_" "+" "=" "~" "/" "|" "\\" "<" ">" "@" "#" "$" "%" "^" "&" "*"))...
0701b11c795540c5bfd391a6ff6ac6a5e683f425ed9df1bbb1c3ea5996dae252
LeventErkok/sbv
FreshVars.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Queries.FreshVars Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Testing fresh-vars in query mode ---------------------------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Queries/FreshVars.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Queries.FreshVars License : BSD3 Maintainer: Stability : experimental Testing fresh-vars in query mode --------------------------------------------------------------------------- # LANGUAGE DeriveAnyClass ...
Copyright : ( c ) # LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module TestSuite.Queries.FreshVars (tests) where import Data.SBV.Control import Utils.SBVTestFramework data BinOp = Plus | Minus | Times mkSymbolicEnumeration ''BinOp _unused :: a _unused ...
b2a3efcd1ccd8ed596b564badab7b5bf49d1e4ad7b2256f3244a622e02f17d5b
footprintanalytics/footprint-web
category_test.clj
(ns metabase.sync.analyze.classifiers.category-test "Tests for the category classifier." (:require [clojure.test :refer :all] [metabase.sync.analyze.classifiers.category :as classifiers.category])) (defn- field-with-distinct-count [distinct-count] {:database_type "VARCHAR" :semantic_type ...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/sync/analyze/classifiers/category_test.clj
clojure
(ns metabase.sync.analyze.classifiers.category-test "Tests for the category classifier." (:require [clojure.test :refer :all] [metabase.sync.analyze.classifiers.category :as classifiers.category])) (defn- field-with-distinct-count [distinct-count] {:database_type "VARCHAR" :semantic_type ...
88ec057cb1488610670b413a63696c4015862f3c5dc6b1bcde24d5a9c05211cf
jrm-code-project/LISP-Machine
calls.lisp
-*- Mode : LISP ; Package : KERMIT ; Base:8 ; : ZL -*- Copyright LISP Machine , Inc. 1984 , 1985 , 1986 See filename " Copyright.text " for ;; licensing and release information. ;;; this code is designed to unify the protocol and perform the basic protol in which globals are safely ;;; bound to thei...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/network/kermit/calls.lisp
lisp
Package : KERMIT ; Base:8 ; : ZL -*- licensing and release information. this code is designed to unify the protocol and bound to their proper values. This also makes "cold boots" of the system easier. all these instance variables are declared special in elsewhere in the sources (mostly in the kermit-protocol f...
Copyright LISP Machine , Inc. 1984 , 1985 , 1986 See filename " Copyright.text " for perform the basic protol in which globals are safely (defvar kstate) (defflavor kstate ( (*soh* 1) (*mytime* #o12) (*myquote* #\#) (*myeol* #o15) ...
c7469b142507165bb68e53e1e38e51dc9cd0bf3fc415c8dad19bd83173e8afa8
jarohen/advent-of-code
day7.clj
(ns advent-of-code.day7 (:require [clojure.string :as s] [clojure.java.io :as io] [clojure.set :as set])) (defn parse-input [s] (-> s (s/split-lines) (->> (map (comp #(re-matches #"(\w+) \((\d+)\)( -> (.+))?" %) s/trim)) (into {} (map (fn [[_ id weight-str _ above-str...
null
https://raw.githubusercontent.com/jarohen/advent-of-code/3fa1d87a539fb9163b05b732973bbd415dd21312/2017/src/advent_of_code/day7.clj
clojure
this allows us to write tree-recursive algos in a tail-call-optimised way, and still allows us to make calculations 'after' the tail calls
(ns advent-of-code.day7 (:require [clojure.string :as s] [clojure.java.io :as io] [clojure.set :as set])) (defn parse-input [s] (-> s (s/split-lines) (->> (map (comp #(re-matches #"(\w+) \((\d+)\)( -> (.+))?" %) s/trim)) (into {} (map (fn [[_ id weight-str _ above-str...
26b134e07bf406ea46160b8549da547120843f81e614baf973ab71e22680cb21
SamB/coq
merge.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/funind/merge.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Merging of induction principles. i...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Libnames open Tactics...
837bbacc5f819a690e5109eacce3e5bcf537b181ff3f42a3db306f25b1ed2cca
exercism/ocaml
all_your_base.mli
type base = int val convert_bases : from: base -> digits: int list -> target: base -> (int list) option
null
https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/all-your-base/all_your_base.mli
ocaml
type base = int val convert_bases : from: base -> digits: int list -> target: base -> (int list) option
df114302e3e11ac32245d7dea94811e83fd46714bbd723aaf660e6901ad3ef1f
MyDataFlow/ttalk-server
http_handler.erl
%% Feel free to use, reuse and abuse the code in this file. -module(http_handler). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/3]). -record(state, {headers, body}). init({_Transport, http}, Req, Opts) -> Headers = proplists:get_value(headers, Opts, []), Body = proplists:get_value(body, Op...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/test/http_SUITE_data/http_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(http_handler). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/3]). -record(state, {headers, body}). init({_Transport, http}, Req, Opts) -> Headers = proplists:get_value(headers, Opts, []), Body = proplists:get_value(body, Opts, "http_handler"), {ok, Req, #state{headers=Headers, body...
e03b5a94d3f8777fa4367dd75a0dbd624448a47790e87e9c6c884cafdecf9308
fyquah/hardcaml_zprize
approx_msb_multiplier_model.ml
open Base open Core let p = Modulus.m let k = 2 * 377 let m = Z.((one lsl k) / p) let sel_bottom x bits = Z.(x land ((one lsl bits) - one)) let%expect_test "print constants" = Stdio.printf "m = 0x%s\n" (Z.format "x" m); [%expect {| m = 0x261508d0cc4060e976c3ca0582ef4f73bbad0de6776b1a06af2d488d85a6d02d0ed68778...
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/7eb1bd214908fa801781db33287eaf12691715f8/libs/field_ops/model/approx_msb_multiplier_model.ml
ocaml
our number has a prefix of [idx], so we want to subtract off the largest multiple of * [p] with a prefix of [idx-1] start from the top, and add the highest multiple of p that we can subtract without going * negative
open Base open Core let p = Modulus.m let k = 2 * 377 let m = Z.((one lsl k) / p) let sel_bottom x bits = Z.(x land ((one lsl bits) - one)) let%expect_test "print constants" = Stdio.printf "m = 0x%s\n" (Z.format "x" m); [%expect {| m = 0x261508d0cc4060e976c3ca0582ef4f73bbad0de6776b1a06af2d488d85a6d02d0ed68778...
21f16779c2d94c01c4457f158f74c2cf5fe33338da22f407ed8206f6034876e8
SumitPadhiyar/confuzz
lwt.ml
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) Reading guide Welcome to the implementation of the Lwt core ! This is a big file , but we hope that reading it ( parts at a time ! ) will not be scary :) Here is why : ...
null
https://raw.githubusercontent.com/SumitPadhiyar/confuzz/7d6b2af51d7135025f9ed1e013a9ae0940f3663e/src/core/lwt.ml
ocaml
Promises proper. Note: A promise whose state is [Proxy _] is a "proxy" promise. A promise whose state is *not* [Proxy _] is an "underlying" promise. The "underlying promise of [p]" is: - [p], if [p] is itself underlying. - Otherwise, [p] is a proxy and has state [Proxy p']. The underlying...
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) Reading guide Welcome to the implementation of the Lwt core ! This is a big file , but we hope that reading it ( parts at a time ! ) will not be scary :) Here is why : ...
c15479ee58e445c3d50632b61b51db1005a9cf55cb9bdddce3fec1c39b79c511
mpenet/casyn
pool.clj
(ns qbits.casyn.pool "Protocols defining what is expected from different pool/client implementations") (defprotocol PPool (borrow [pool node-host] "Get a valid/idle client from the pool, return a result-channel") (return [pool node-host client] "Get a healthy client to the pool, return a result-channel") (i...
null
https://raw.githubusercontent.com/mpenet/casyn/43633acc20e730352ab5b04e90cf68c8d10813ce/src/qbits/casyn/pool.clj
clojure
(ns qbits.casyn.pool "Protocols defining what is expected from different pool/client implementations") (defprotocol PPool (borrow [pool node-host] "Get a valid/idle client from the pool, return a result-channel") (return [pool node-host client] "Get a healthy client to the pool, return a result-channel") (i...
77bfc32296987f722ff2ff7ead09e0edc05ecd4b7f76bbd6012deac5ae0a5975
elnewfie/lslforge
Util.hs
# OPTIONS_GHC -fwarn - unused - binds -XNoMonomorphismRestriction -XFlexibleContexts # module Language.Lsl.Internal.Util ( LSLInteger, mlookup, ilookup, safeIndex, elemAt, ctx, readM, filtMap, filtMapM, lookupByIndex, lookupM, removeLookup, findM, elemAtM, -- get ...
null
https://raw.githubusercontent.com/elnewfie/lslforge/27eb84231c53fffba6bdb0db67bde81c1c12dbb9/lslforge/haskell/src/Language/Lsl/Internal/Util.hs
haskell
get rid of this import Debug.Trace some random operators monadified lookup monadified find filter a list while mapping interactively process lines, stopping when a terminator value is read some string handling function (String -> String). The result is reencoded and output. TODO: fix this definition! genera...
# OPTIONS_GHC -fwarn - unused - binds -XNoMonomorphismRestriction -XFlexibleContexts # module Language.Lsl.Internal.Util ( LSLInteger, mlookup, ilookup, safeIndex, elemAt, ctx, readM, filtMap, filtMapM, lookupByIndex, lookupM, removeLookup, findM, indexOf, fro...
ab25115a9a79e70fcee57c7a9dd6abef98e4f13150afdc340516181d74ce3732
sbcl/sbcl
low.lisp
;;;; This file contains portable versions of low-level functions and macros ;;;; which are ripe for implementation specific customization. None of the code in this file * has * to be customized for a particular Common Lisp ;;;; implementation. Moreover, in some implementations it may not make any ;;;; sense to custom...
null
https://raw.githubusercontent.com/sbcl/sbcl/5e4213f7e12ec25856b7c399e89833f49ca97d2e/src/pcl/low.lisp
lisp
This file contains portable versions of low-level functions and macros which are ripe for implementation specific customization. None of the code implementation. Moreover, in some implementations it may not make any sense to customize some of this code. The original version was intended to support portable custom...
in this file * has * to be customized for a particular Common Lisp current version , and it now runs only under SBCL . ( Now that ANSI Common Lisp has mixed CLOS into the insides of the system ( e.g. error handling Lisp without CLOS , the old functionality is of dubious use . -- WHN 19981108 ) This softwar...
19f9adc0e20187d3a238a42efe3cf8b72c914d274a49f3f76c32355ac67c31cc
athos/parabola
reactor.clj
(ns parabola.reactor (:require [clojure.core.async :as a] [com.stuartsierra.component :as comp] [taoensso.timbre :as timbre] [parabola.robot :as robot])) (defn wrap [robot name proc] (fn [msg] (when-not (= (:type msg) ::stop) (when-let [res (proc msg)] (timbre/...
null
https://raw.githubusercontent.com/athos/parabola/b6ea2d9108a97f9470f2f107c1f5fc71ea23f7e3/src/parabola/reactor.clj
clojure
(ns parabola.reactor (:require [clojure.core.async :as a] [com.stuartsierra.component :as comp] [taoensso.timbre :as timbre] [parabola.robot :as robot])) (defn wrap [robot name proc] (fn [msg] (when-not (= (:type msg) ::stop) (when-let [res (proc msg)] (timbre/...
ffedf26866f06d282105ad2654027c4f4338dfe11f695857b3de6b2f775f0b45
zippy/anansi
http.clj
(ns anansi.test.receptor.host-interface.http (:use [anansi.receptor.host-interface.http] :reload) (:use [anansi.ceptr] [anansi.receptor.host]) (:use [midje.sweet]) (:use [clojure.test] [clojure.contrib.io :only [writer]] [aleph.http] [aleph.formats] [lamina.core])) (defn...
null
https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/receptor/host_interface/http.clj
clojure
:probes {:errors nil-channel}
(ns anansi.test.receptor.host-interface.http (:use [anansi.receptor.host-interface.http] :reload) (:use [anansi.ceptr] [anansi.receptor.host]) (:use [midje.sweet]) (:use [clojure.test] [clojure.contrib.io :only [writer]] [aleph.http] [aleph.formats] [lamina.core])) (defn...
eafc187ba04a0ebc9c72c56d9c603de7449675f2c2f00eafb3985d2dc17c2faf
corecursive/sicp-study-group
polar.scm
(load "type.scm") (load "table.scm") Representing complex numbers as pairs MAGNITUDE , ANGLE (define (install-polar-package) ;; internal procedures ;; these definitions are now internal, so there is no name conflict (define (make-from-mag-ang r a) (cons r a)) (define (make-from-real-imag x y) (cons...
null
https://raw.githubusercontent.com/corecursive/sicp-study-group/82b92a9759ed6c72d15cf955c806ce2a94336f83/wulab/lecture-4b/generic-operation/complex-package/polar.scm
scheme
internal procedures these definitions are now internal, so there is no name conflict
(load "type.scm") (load "table.scm") Representing complex numbers as pairs MAGNITUDE , ANGLE (define (install-polar-package) (define (make-from-mag-ang r a) (cons r a)) (define (make-from-real-imag x y) (cons (sqrt (+ (square x) (square y))) (atan y x))) (define (magnitu...
a91098dce53575818614273e3e64873f763b7927d971ad6bdcadb2d51d26a801
programaker-project/Programaker-Core
automate_service_registry_configuration.erl
%%%------------------------------------------------------------------- %% @doc automate service registry configuration and versioning %% @end %%%------------------------------------------------------------------- -module(automate_service_registry_configuration). -export([ get_versioning/1 ]). -include("databa...
null
https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_service_registry/src/automate_service_registry_configuration.erl
erlang
------------------------------------------------------------------- @doc automate service registry configuration and versioning @end ------------------------------------------------------------------- Fix old registry record name If record name was set incorrectly, fix it Introduce user groups
-module(automate_service_registry_configuration). -export([ get_versioning/1 ]). -include("databases.hrl"). -include("../../automate_storage/src/versioning.hrl"). -spec get_versioning([node()]) -> #database_version_progression{}. get_versioning(_Nodes) -> Version_1 = [ #database_version_data{ database_na...
cce81bdefe5e6afc1a3b8b6bbba1015ec403520046c2aa1422c5898e72aecfb5
elastic/eui-cljs
icon_sort_down.cljs
(ns eui.icon-sort-down (:require ["@elastic/eui/lib/components/icon/assets/sort_down.js" :as eui])) (def sortDown eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_sort_down.cljs
clojure
(ns eui.icon-sort-down (:require ["@elastic/eui/lib/components/icon/assets/sort_down.js" :as eui])) (def sortDown eui/icon)
1acea5e15406f6e4e5098a05f70fb2a57a902f062720a26d27163714cef303be
den1k/vimsical
settings.cljc
(ns vimsical.user.settings (:require [clojure.spec.alpha :as s] [vimsical.user.settings.playback :as playback])) (s/def ::uid uuid?) (s/def :db/uid ::uid) (s/def ::settings (s/keys :req [:db/uid ::playback/speed])) (def pull-query [:db/uid ::playback/speed])
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/common/vimsical/user/settings.cljc
clojure
(ns vimsical.user.settings (:require [clojure.spec.alpha :as s] [vimsical.user.settings.playback :as playback])) (s/def ::uid uuid?) (s/def :db/uid ::uid) (s/def ::settings (s/keys :req [:db/uid ::playback/speed])) (def pull-query [:db/uid ::playback/speed])
028ea648248699d232219d0d6ba56e2085e1c09f60cc7b6142516086bf7c41f1
xandkar/tiger.ml
tigerc.ml
let lexbuf_set_filename lb filename : unit = let Lexing.({lex_start_p; lex_curr_p; _}) = lb in lb.Lexing.lex_start_p <- {lex_start_p with Lexing.pos_fname = filename}; lb.Lexing.lex_curr_p <- {lex_curr_p with Lexing.pos_fname = filename} let () = let path_to_program_file = Sys.argv.(1) in let ic = open_in ...
null
https://raw.githubusercontent.com/xandkar/tiger.ml/cc540a7e2dfcee4411953075210a64de874b91e5/compiler/src/exe/tigerc.ml
ocaml
let lexbuf_set_filename lb filename : unit = let Lexing.({lex_start_p; lex_curr_p; _}) = lb in lb.Lexing.lex_start_p <- {lex_start_p with Lexing.pos_fname = filename}; lb.Lexing.lex_curr_p <- {lex_curr_p with Lexing.pos_fname = filename} let () = let path_to_program_file = Sys.argv.(1) in let ic = open_in ...
1b5e723f74f4cd687daf338dddc9105e2a187d3857d08f4888e29bb8b15e7e4a
eyedouble/couchdb
couchdb_mango_tests.erl
-module(couchdb_mango_tests). -include_lib("eunit/include/eunit.hrl"). -include ( "../src/dev.hrl" ). -include("../../test_helper.hrl"). % % HELPER % init() -> {ok, _} = application:ensure_all_started(couchdb), {ok, Server} = couchdb:server_record(<<":5984">>), [ catch couchdb_databases:delete(Server,...
null
https://raw.githubusercontent.com/eyedouble/couchdb/39830e536e803dfb492bfdb8b3644839cdd7e356/test/sections/couchdb_databases/couchdb_mango_tests.erl
erlang
HELPER TESTS
-module(couchdb_mango_tests). -include_lib("eunit/include/eunit.hrl"). -include ( "../src/dev.hrl" ). -include("../../test_helper.hrl"). init() -> {ok, _} = application:ensure_all_started(couchdb), {ok, Server} = couchdb:server_record(<<":5984">>), [ catch couchdb_databases:delete(Server, MockDb) || Moc...
68118b930101afbd16e977fd52006307a35a3b9f5f6184a16a932aef46ca425c
orbitz/oort
mdb_bhv_think.erl
%%% File : mdb_bhv_think.erl Author : < > %%% Purpose : Answer the given data, but waiting for random time Created : 12 Aug 2003 by < > %%%---------------------------------------------------------------------- %%% This file is part of Manderlbot . %%% Manderlbot is free software ; you can redistribut...
null
https://raw.githubusercontent.com/orbitz/oort/a61ec85508917ae9a3f6672a0b708d47c23bb260/manderlbot-0.9.2/src/mdb_bhv_think.erl
erlang
File : mdb_bhv_think.erl Purpose : Answer the given data, but waiting for random time ---------------------------------------------------------------------- (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ...
Author : < > Created : 12 Aug 2003 by < > This file is part of Manderlbot . Manderlbot is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or Manderlbot is dis...
1dc4186d1c2c5d0d4452537f3618dee902b90ac63369d8da45a7f78301296ee3
pirapira/coq2rust
pretype_errors.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/pretyping/pretype_errors.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Old Case * Type inference unifica...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Env...
31cef5849e984989fc93764e5451d15b4158d76c57b9ad051a92d24e88b55cfa
haskell-tools/haskell-tools
Show.hs
| Show instance for Haskell AST representation ignoring source and semantic information # LANGUAGE StandaloneDeriving # module Language.Haskell.Tools.Debug.Show () where import Language.Haskell.Tools.AST -- Annotations instance (Show (e dom stage)) => Show (Ann e dom stage) where show (Ann _ e) = show e instanc...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/debug/Language/Haskell/Tools/Debug/Show.hs
haskell
Annotations Modules Declarations Base
| Show instance for Haskell AST representation ignoring source and semantic information # LANGUAGE StandaloneDeriving # module Language.Haskell.Tools.Debug.Show () where import Language.Haskell.Tools.AST instance (Show (e dom stage)) => Show (Ann e dom stage) where show (Ann _ e) = show e instance (Show (e dom ...
525df62e8c50442ca09f2ec43a5ef1b8ded710a93aa1f165a0e15599cfc5713f
metaocaml/ber-metaocaml
wellfounded.ml
(* TEST * expect *) PR#6768 type _ prod = Prod : ('a * 'y) prod;; let f : type t. t prod -> _ = function Prod -> let module M = struct type d = d * d end in () ;; [%%expect{| type _ prod = Prod : ('a * 'y) prod Line 6, characters 6-20: 6 | type d = d * d ^^^^^^^^^^^^^^ Error: T...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-misc/wellfounded.ml
ocaml
TEST * expect
PR#6768 type _ prod = Prod : ('a * 'y) prod;; let f : type t. t prod -> _ = function Prod -> let module M = struct type d = d * d end in () ;; [%%expect{| type _ prod = Prod : ('a * 'y) prod Line 6, characters 6-20: 6 | type d = d * d ^^^^^^^^^^^^^^ Error: The type abbreviation d ...
8e7effdd76cd367f97ed926dfbb8661e0f210ad21abcc1d6c9f32be8f38d3372
jrm-code-project/LISP-Machine
mdiag.lisp
-*- Mode : LISP ; Package : LAMBDA ; Base:16 -*- (defconst mode-reg-offset #xfff7fc) (defconst config-prom-offset #xfff800) (defconst 4meg-slot #xfa) (defconst 4meg-addr (ash 4meg-slot 24.)) (defconst mem-size #x1000) (defconst mem-error-count 0) (defconst mem-start 0) (defconst 4meg-v2 nil) ;************************...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjcx/mdiag.lisp
lisp
Package : LAMBDA ; Base:16 -*- *********************************************************************************************** this routine will run diagnostics on the specified memory board - be sure it is disabled!! ***********************************************************************************************
(defconst mode-reg-offset #xfff7fc) (defconst config-prom-offset #xfff800) (defconst 4meg-slot #xfa) (defconst 4meg-addr (ash 4meg-slot 24.)) (defconst mem-size #x1000) (defconst mem-error-count 0) (defconst mem-start 0) (defconst 4meg-v2 nil) (defun test-memory-board (slot) (setq 4meg-slot (logior #xf0 (logand #x...
e447b5edc298e4d7a51a403e1160a4e7c1beacba734b92b9d70ca9ad1155f288
mirage/ocaml-git
test.ml
let reporter ppf = let report src level ~over k msgf = let k _ = over (); k () in let with_metadata header _tags k ppf fmt = Format.kfprintf k ppf ("%a[%a]: " ^^ fmt ^^ "\n%!") Logs_fmt.pp_header (level, header) Fmt.(styled `Magenta string) (Logs.Src.name ...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/test/unix/test.ml
ocaml
let reporter ppf = let report src level ~over k msgf = let k _ = over (); k () in let with_metadata header _tags k ppf fmt = Format.kfprintf k ppf ("%a[%a]: " ^^ fmt ^^ "\n%!") Logs_fmt.pp_header (level, header) Fmt.(styled `Magenta string) (Logs.Src.name ...
2700136d0c1c3ce61d2fec4a81dadd82d3d468aa2af6eb4e630401e9950853a7
dvcrn/proton
core.cljs
(ns proton.layers.lang.slim.core (:require [proton.lib.mode :as mode] [proton.lib.helpers :refer [console!]]) (:use [proton.layers.base :only [init-layer! get-packages init-package register-layer-dependencies describe-mode]])) (defmethod get-packages :lang/slim [] [:language-slim]) (defmethod init-l...
null
https://raw.githubusercontent.com/dvcrn/proton/427d83ffdb61d84a04e3d30032b792a9cfbfc53f/src/cljs/proton/layers/lang/slim/core.cljs
clojure
(ns proton.layers.lang.slim.core (:require [proton.lib.mode :as mode] [proton.lib.helpers :refer [console!]]) (:use [proton.layers.base :only [init-layer! get-packages init-package register-layer-dependencies describe-mode]])) (defmethod get-packages :lang/slim [] [:language-slim]) (defmethod init-l...
ad57b91444d346ba357ad55c11efc2defb80e60833030ce9b8b500c0827b2d8e
ktakashi/sagittarius-scheme
basic-hash-tables.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; SRFI-69 Basic hash tables ;;; Copyright ( c ) 2010 - 2015 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistribu...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3971b131d463696297c320dbe595dffd08867dac/sitelib/srfi/%253a69/basic-hash-tables.scm
scheme
coding : utf-8 ; -*- SRFI-69 Basic hash tables Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions ...
Copyright ( c ) 2010 - 2015 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!nounbound (library (srfi :69 basic-hash-ta...
7353ba68651f793e9c9dd8d985e6f2f1b54b33c7c7831536e25fa62250adcedb
denisshevchenko/ohaskell.guide
CreateHtmlTemplates.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module CreateHtmlTemplates ( createHtmlTemplates ) where import qualified Data.Text as T import Prelude hiding (div, span) import Text.Blaze.Html.Renderer.Pretty (renderHtml) imp...
null
https://raw.githubusercontent.com/denisshevchenko/ohaskell.guide/fa901e4c34ba367d97a593e0532f6508b87a44bc/src/CreateHtmlTemplates.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # Строим левое боковое оглавление.
module CreateHtmlTemplates ( createHtmlTemplates ) where import qualified Data.Text as T import Prelude hiding (div, span) import Text.Blaze.Html.Renderer.Pretty (renderHtml) import Text.Blaze.Html5 as H import Te...
5db70fa093afa388572a789d0e78596cec820a1c2016ecba2cbd76b5e7b9778e
Frama-C/Frama-C-snapshot
wprop.mli
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/wprop.mli
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
31afc7147289913583b5d4436c022f8239249bf10d9829b2c958b74c1e47d52d
clojure-interop/aws-api
AmazonWorkDocsClient.clj
(ns com.amazonaws.services.workdocs.AmazonWorkDocsClient "Client for accessing Amazon WorkDocs. All service calls made using this client are blocking, and will not return until the service call completes. The WorkDocs API is designed for the following use cases: File Migration: File migration applications...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workdocs/src/com/amazonaws/services/workdocs/AmazonWorkDocsClient.clj
clojure
(ns com.amazonaws.services.workdocs.AmazonWorkDocsClient "Client for accessing Amazon WorkDocs. All service calls made using this client are blocking, and will not return until the service call completes. The WorkDocs API is designed for the following use cases: File Migration: File migration applications...
e5797ea01689e9f3b7e4f4f7a46262260fea129c2592a0781ea28b40dc1dea19
ocramz/petsc-hs
Sparse.hs
# LANGUAGE FlexibleContexts , RankNTypes , TypeFamilies , MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Numerical.PETSc.Internal.Sparse Copyright : ( c ) 2015 -- License :...
null
https://raw.githubusercontent.com/ocramz/petsc-hs/d74a468da0dbc867d2ea25f280c7892cc54add48/src/Numerical/PETSc/Internal/Sparse.hs
haskell
# LANGUAGE TypeSynonymInstances, FlexibleInstances # --------------------------------------------------------------------------- | Module : Numerical.PETSc.Internal.Sparse License : LGPL3 Stability : experimental | Sparse vector and matrix indexing --------------------------------------------------...
# LANGUAGE FlexibleContexts , RankNTypes , TypeFamilies , MultiParamTypeClasses # Copyright : ( c ) 2015 Maintainer : zocca . . gmail . com module Numerical.PETSc.Internal.Sparse where import Numerical.PETSc.Internal.Types import Data.Monoid import Data.Functor import Control.Applicative import Contro...
85d555ff7b712b92ba2b9fc2b5259379961d5f746d4b65c653198c6ba1b2c3f8
facebook/flow
autofix_ts_syntax.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/2c68d24995d6511d4d1d66fa85b8476b7aa94ca2/src/services/code_action/autofix_ts_syntax.ml
ocaml
* 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...
5b39b8c8aad8b10d3ec0dafdafea62b8e8813c6cdd685c6f6d9d0aba4a60c6b3
sfrank/minheap
rank-pairing-heap.lisp
MINHEAP is by < > , 2007 - 2012 . ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;;;; without limitation the rights to use, copy, modify, ...
null
https://raw.githubusercontent.com/sfrank/minheap/51cc9edcbbe13d9132fe12b0b197848f31513232/rank-pairing-heap.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be included EXPRESS OR ...
MINHEAP is by < > , 2007 - 2012 . " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to in all copies or substantial portions of the Software . T...
eec70b866aae83b82283b35b3762dbf9c1c5d359afea406d56bca1284f686572
ice1000/learn
range-extraction.hs
module RangeExtractor.JorgeVS.Kata where reduce :: [Int] -> [Int] -> [[Int]] reduce old [] = [old] reduce old new |a == z + 1 = reduce (old ++ [a]) b |otherwise = old : reduce [a] b where z = last old (a:b) = new -- toString :: [Int] -> String toString [a] = ',' : show a toString [a,b] = ',' : sh...
null
https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/range-extraction.hs
haskell
module RangeExtractor.JorgeVS.Kata where reduce :: [Int] -> [Int] -> [[Int]] reduce old [] = [old] reduce old new |a == z + 1 = reduce (old ++ [a]) b |otherwise = old : reduce [a] b where z = last old (a:b) = new toString :: [Int] -> String toString [a] = ',' : show a toString [a,b] = ',' : show ...
83e5ff54360eba8a1bd38564a24edcd048bfc3a6351233972c877b6761d6ada2
mattaudesse/haskell-99-problems
H14.hs
module Problems.H14 where -- | -- Duplicate the elements of a list. -- > > > dupli [ 1 , 2 , 3 ] [ 1,1,2,2,3,3 ] -- prop > ( length $ dupli [ as ] ) = = length [ as ] * 2 dupli :: [a] -> [a] dupli = foldr (\a -> (++) [a, a]) []
null
https://raw.githubusercontent.com/mattaudesse/haskell-99-problems/f7d57c0bd45c245f10073cf708fbc5e2107e0e23/Problems/H14.hs
haskell
| Duplicate the elements of a list.
module Problems.H14 where > > > dupli [ 1 , 2 , 3 ] [ 1,1,2,2,3,3 ] prop > ( length $ dupli [ as ] ) = = length [ as ] * 2 dupli :: [a] -> [a] dupli = foldr (\a -> (++) [a, a]) []
ab8e705d02486e41ae1748957a87de229063693353843e5a70da5215b5e1b194
whamtet/ctmx
core_test.clj
(ns ctmx.core-test (:require [clojure.test :refer :all] [ctmx.core :as ctmx :refer [defcomponent]] reitit.ring [ring.mock.request :as mock])) ;; helper functions (defn- test-req [raw-handler req] ((-> raw-handler reitit.ring/router reitit.ring/ring-handler) req)) (defn- redire...
null
https://raw.githubusercontent.com/whamtet/ctmx/a2e406b0172f78e25687c85946f69727ee4e8c7f/test/ctmx/core_test.clj
clojure
helper functions end helper functions
(ns ctmx.core-test (:require [clojure.test :refer :all] [ctmx.core :as ctmx :refer [defcomponent]] reitit.ring [ring.mock.request :as mock])) (defn- test-req [raw-handler req] ((-> raw-handler reitit.ring/router reitit.ring/ring-handler) req)) (defn- redirect? [^String redirec...
48544e41c55948bcddac2a1f0cb815317a29e5761c9ca9eba27f514c654250ba
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.lesson-builder.widgets.form-actions.views (:require [webchange.ui.index :as ui])) (defn form-actions [{:keys [class-name on-cancel on-save save-props] :or {save-props {}}}] [:div {:class-name (ui/get-class-name {"widget--form-actions" true class-na...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/0df52dd08d54f14d4ec5d2717f48031849a7ee16/src/cljs/webchange/lesson_builder/widgets/form_actions/views.cljs
clojure
(ns webchange.lesson-builder.widgets.form-actions.views (:require [webchange.ui.index :as ui])) (defn form-actions [{:keys [class-name on-cancel on-save save-props] :or {save-props {}}}] [:div {:class-name (ui/get-class-name {"widget--form-actions" true class-na...
79cbfe96fe18d95eba08f4b549a10ab52c7deb98f8676d6578d8b5c8908cce78
janestreet/bin_prot
shape.mli
include module type of struct include Bin_shape end val bin_shape_unit : t val bin_shape_bool : t val bin_shape_string : t val bin_shape_bytes : t val bin_shape_char : t val bin_shape_float : t val bin_shape_int : t val bin_shape_int32 : t val bin_shape_int63 : t val bin_shape_int64 : t val bin_shape_nativeint : t v...
null
https://raw.githubusercontent.com/janestreet/bin_prot/157805a66330c392b68feebda5033381d2a14459/src/shape.mli
ocaml
include module type of struct include Bin_shape end val bin_shape_unit : t val bin_shape_bool : t val bin_shape_string : t val bin_shape_bytes : t val bin_shape_char : t val bin_shape_float : t val bin_shape_int : t val bin_shape_int32 : t val bin_shape_int63 : t val bin_shape_int64 : t val bin_shape_nativeint : t v...
825595cd89fa080d2f4f922cff8eeb8760d28880c6982761a9e8807b6c7ef61a
janestreet/base
test_type_equal.ml
open! Import open! Type_equal let%expect_test "[Id.sexp_of_t]" = let id = Id.create ~name:"some-type-id" [%sexp_of: unit] in print_s [%sexp (id : _ Id.t)]; [%expect {| some-type-id |}] ;; let%test_module "Type_equal.Id" = (module struct open Type_equal.Id let t1 = create ~name:"t1" [%sexp_of: _] ...
null
https://raw.githubusercontent.com/janestreet/base/5c5bd644d5efdd5002f21008811ec8f09017ee12/test/test_type_equal.ml
ocaml
This test shows that we need [conv] even though [Type_equal.T] is exposed. the following is rejected by the compiler let _a_to_b (a : A.t) = * let T = Id.same_witness_exn A.id B.id in * (a : B.t)
open! Import open! Type_equal let%expect_test "[Id.sexp_of_t]" = let id = Id.create ~name:"some-type-id" [%sexp_of: unit] in print_s [%sexp (id : _ Id.t)]; [%expect {| some-type-id |}] ;; let%test_module "Type_equal.Id" = (module struct open Type_equal.Id let t1 = create ~name:"t1" [%sexp_of: _] ...
eb9a158de2c909bf1fd5d2f5a4494e8043b6b5ba274bfad47e8ccaf07c57cbf4
Seggan/Fig
core.clj
(ns fig.core (:gen-class) (:require [clojure.string :as str] [fig.impl :as interp] [fig.parsing :as parsing]) (:use [fig.compression :only [codepage]] [fig.helpers :only [evalString]]) (:import (ch.obermuhlner.math.big BigDecimalMath) (java.awt Toolkit) (jav...
null
https://raw.githubusercontent.com/Seggan/Fig/dec666e6c16eedf36d083d0061f3343507fb0204/src/fig/core.clj
clojure
(ns fig.core (:gen-class) (:require [clojure.string :as str] [fig.impl :as interp] [fig.parsing :as parsing]) (:use [fig.compression :only [codepage]] [fig.helpers :only [evalString]]) (:import (ch.obermuhlner.math.big BigDecimalMath) (java.awt Toolkit) (jav...
26eaf128fcc291cef336c443310017a249e2ecd0668800a6283eedf83db9823d
ujamjar/ctypes_of_clang
ncurses.ml
(* types *) [%ccode {| #include <ncurses.h> |} [@clangargs ["-I/usr/lib/clang/3.8/include"]] [@viewint][@viewstring] [@onlytypes]] (* variables and functions *) module Bindings(F : Cstubs.FOREIGN) = struct [%ccode {| #include <ncurses.h> |} [@clangargs ["-I/usr/lib/clang/3.8/include"]] [...
null
https://raw.githubusercontent.com/ujamjar/ctypes_of_clang/08d5179be6f3f5ef07ceae6565301f12192ab4b7/examples/ncurses/api/ncurses.ml
ocaml
types variables and functions
[%ccode {| #include <ncurses.h> |} [@clangargs ["-I/usr/lib/clang/3.8/include"]] [@viewint][@viewstring] [@onlytypes]] module Bindings(F : Cstubs.FOREIGN) = struct [%ccode {| #include <ncurses.h> |} [@clangargs ["-I/usr/lib/clang/3.8/include"]] [@foreignmodule "F"] [@foreignfnmodule...
5870596704797d414640afe772b32063f0cbe1e38972d147e59c3241250ebed2
haskell-suite/haskell-src-exts
TypeFunctions.hs
{-# LANGUAGE TypeFamilies, KindSignatures #-} data Id = Id type family Rep (f :: * -> *) x :: * type instance Rep Id x = x
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/TypeFunctions.hs
haskell
# LANGUAGE TypeFamilies, KindSignatures #
data Id = Id type family Rep (f :: * -> *) x :: * type instance Rep Id x = x
8838a8bd5f293976a56944757bf04a4e8da4fb0b88a74230fbd43d4111cd49d4
ygmpkk/house
PS2.hs
module Kernel.Driver.PS2 ( launchKeyboardDriver , resetProcessor , launchMouseDriver ) where P : import Prelude hiding ( putStr , putStrLn ) import Prelude hiding (putStr,putStrLn) -} import Control . Concurrent ( yield ) import Control . Concurrent . import Data.Bits import Data.Word import Contro...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Kernel/Driver/PS2.hs
haskell
XXX: What to do ?? Read mode bits Write mode bits Get controller version Disable mouse interface Enable mouse interface Mouse interface test Controller self test Keyboard interface test Keyboard interface disable Keyboard interface enable Read from output port Write to output port Write to output buffer ...
module Kernel.Driver.PS2 ( launchKeyboardDriver , resetProcessor , launchMouseDriver ) where P : import Prelude hiding ( putStr , putStrLn ) import Prelude hiding (putStr,putStrLn) -} import Control . Concurrent ( yield ) import Control . Concurrent . import Data.Bits import Data.Word import Contro...
197de058cb79a825f7e9bc7a6b116bcb50c6925e8b20d17da383eb87d51e4f87
vans163/stargate
stargate_vessel.erl
-module(stargate_vessel). -behaviour(gen_statem). -compile(export_all). -import(stargate_transport, [setopts/2, send/2, close/1]). -import(stargate_proto_http, [path_and_query/1, recv/1, response/3]). -import(stargate_proto_ws, [decode_frame/1, encode_frame/1, encode_frame/2, deflate/2]). -define(TIMEOUT_BASIC, 2 * 6...
null
https://raw.githubusercontent.com/vans163/stargate/ca0515411f0e0484e222f05065e4c7de9195579b/src/stargate_vessel.erl
erlang
callback_mode() -> state_functions. private funcs waiting_socket - SSL waiting_socket - Regular exit handling Maybe in the future we restart We got an error parsing the request line, netscanner or malformed We dont support this, netscanners make this request? Never a browser? Streaming and chunking http_request http,...
-module(stargate_vessel). -behaviour(gen_statem). -compile(export_all). -import(stargate_transport, [setopts/2, send/2, close/1]). -import(stargate_proto_http, [path_and_query/1, recv/1, response/3]). -import(stargate_proto_ws, [decode_frame/1, encode_frame/1, encode_frame/2, deflate/2]). -define(TIMEOUT_BASIC, 2 * 6...
ecbf10f04ca3ef966be000222b1418d9c20adf0c2f95e58af9a2d968bbe820a8
expipiplus1/vulkan
BlendOp.hs
{-# language CPP #-} No documentation found for Chapter " BlendOp " module Vulkan.Core10.Enums.BlendOp (BlendOp( BLEND_OP_ADD , BLEND_OP_SUBTRACT , BLEND_OP_REVERSE_SUBTRACT , BLEND_OP_...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/a46784a1079839381e18cfe37a8c0d6ce29a0c90/src/Vulkan/Core10/Enums/BlendOp.hs
haskell
# language CPP # | VkBlendOp - Framebuffer blending operations = Description The semantics of the basic blend operations are described in the table below: +-------------------------------+--------------------+-----------------+ | 'BlendOp' | RGB Components | Alpha Component | +========...
No documentation found for Chapter " BlendOp " module Vulkan.Core10.Enums.BlendOp (BlendOp( BLEND_OP_ADD , BLEND_OP_SUBTRACT , BLEND_OP_REVERSE_SUBTRACT , BLEND_OP_MIN ...
abfd3d51633ec83a40f60300dd36ca58648a38d54df305af96bdfe8a97290442
raymoo/NEET
Neet.hs
Copyright ( C ) 2015 This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . This program is distributed in the ho...
null
https://raw.githubusercontent.com/raymoo/NEET/4e1986a31f6e269bd94dc0e73939d455ce876a9b/src/Neet.hs
haskell
Copyright ( C ) 2015 This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . This program is distributed in the ho...
44a73f09110afb580e035b30fc96400d36eefcbad1734a76ba65ea4057aaecb8
janestreet/universe
ppx_module_timer_runtime.mli
open! Base (** If true, ppx_module_timer records module startup times and reports them on stdout at process exit. Controlled by [am_recording_environment_variable]. *) val am_recording : bool (** If this environment variable is set (to anything) when this module starts up, [am_recording] is set to true. ...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_module_timer/runtime/ppx_module_timer_runtime.mli
ocaml
* If true, ppx_module_timer records module startup times and reports them on stdout at process exit. Controlled by [am_recording_environment_variable]. * If this environment variable is set (to anything) when this module starts up, [am_recording] is set to true. Equal to "PPX_MODULE_TIMER". If this i...
open! Base val am_recording : bool val am_recording_environment_variable : string module Duration : sig type t val to_nanoseconds : t -> Int63.t val of_nanoseconds : Int63.t -> t module type Format = sig val of_string : string -> t val to_string_with_same_unit : t list -> string list end * Deter...
210733e63fd617d831fc867957fc53f2f0db9eb38f86ecb543b9b66adb50adac
mbenke/zpf2013
IORef0.hs
import Data.IORef main = do px <- newIORef undefined writeIORef px 42 readIORef px >>= print
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Concur/IORef0.hs
haskell
import Data.IORef main = do px <- newIORef undefined writeIORef px 42 readIORef px >>= print
42e889eb4e2e9905e2897e2aadb3ce94c323fdf981bc41b9ce86705565e49f81
returntocorp/ocaml-tree-sitter-core
test.ml
(* All the unit tests for this library. *) let test_suites : unit Alcotest.test list = [ Factorize.test; Fresh.test; Protect_ident.test; Rectypes.test; ]
null
https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/28f750bb894ea4c0a7f6b911e568ab9d731cc0b5/src/gen/test/test.ml
ocaml
All the unit tests for this library.
let test_suites : unit Alcotest.test list = [ Factorize.test; Fresh.test; Protect_ident.test; Rectypes.test; ]
57ab831fe21d201a19e6d80cae33c050e4f3d733e81d6af7aacc185ed638cee0
ralsei/bingus
main.rkt
#lang racket (require "parser/parse.rkt" "parser/from-checkers/datadef.rkt" "synth.rkt") (provide synthesize) (define (fresh-eval x) (eval x (make-base-namespace))) (define debug-mode (make-parameter #f)) (define (parse-command-line-args) (command-line #:program "bingus" #:once-each [("-...
null
https://raw.githubusercontent.com/ralsei/bingus/4b3bc55b065e16097967b40caed6edd849e0c0bf/bingus-lib/main.rkt
racket
Port Symbol -> Program the signature and the checks let 'er rip
#lang racket (require "parser/parse.rkt" "parser/from-checkers/datadef.rkt" "synth.rkt") (provide synthesize) (define (fresh-eval x) (eval x (make-base-namespace))) (define debug-mode (make-parameter #f)) (define (parse-command-line-args) (command-line #:program "bingus" #:once-each [("-...
9f4981ddc97cfee49cf598fba9c6f6a5b0bf3862602d148c3bec3478dfb1fa44
nyinyithann/favemarks
Delete_bookmark.ml
open Core open Common open UI_display open UI_prompt let confirm () = let msg = "Are you sure to delete (yes or n)? " in let retry_msg = "Please enter \'yes\' or \'n\': " in let validate input = let si = strip_and_lowercase input in String.(si = "yes" || si = "n") in match ask_again_if_invalid ~valid...
null
https://raw.githubusercontent.com/nyinyithann/favemarks/55fb52d4f3efeae8ef478f1fe098456196e80dea/src/actions/Delete_bookmark.ml
ocaml
open Core open Common open UI_display open UI_prompt let confirm () = let msg = "Are you sure to delete (yes or n)? " in let retry_msg = "Please enter \'yes\' or \'n\': " in let validate input = let si = strip_and_lowercase input in String.(si = "yes" || si = "n") in match ask_again_if_invalid ~valid...
3f24f1450f5858f2fed4b61885e12ba52df5fd2b4561bb6b2630fb9021c53428
lukstafi/invargent
InvariantsTest.ml
* Solving second - order i.e. formula variables tests for InvarGenT. Released under the GNU General Public Licence ( version 2 or higher ) , NO WARRANTY of correctness etc . ( C ) 2013 @author ( AT ) gmail.com @since Mar 2013 Released under the GNU General Public Licence (version 2 ...
null
https://raw.githubusercontent.com/lukstafi/invargent/e25d8b12d9f9a8e2d5269001dd14cf93abcb7549/src/InvariantsTest.ml
ocaml
[* true *] possible type if abduction gets "too good": "δ = (Erk (List a, List (List String), a) → List (List String))" TODO: mutual recursion where the nested function has nontrivial postcondition, which needs to be bootstrapped from its non-recursive part. More non-recursive [let] tests are per...
* Solving second - order i.e. formula variables tests for InvarGenT. Released under the GNU General Public Licence ( version 2 or higher ) , NO WARRANTY of correctness etc . ( C ) 2013 @author ( AT ) gmail.com @since Mar 2013 Released under the GNU General Public Licence (version 2 ...
fa4e499dbd793d7a59fed8892890809057ec0042ed825810b9316e6f5f836921
daypack-dev/daypack-lib
user_id_map.ml
include Map.Make (struct type t = Task.user_id let compare = compare end)
null
https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/user_id_map.ml
ocaml
include Map.Make (struct type t = Task.user_id let compare = compare end)
579a803b99c459218470a37871334a6e0a00773aaca8dffc85fdcefcb0df8fe9
conscell/hugs-android
Parsec.hs
module Parsec # DEPRECATED " This module has moved to Text . ParserCombinators . Parsec " # (module Text.ParserCombinators.Parsec) where import Text.ParserCombinators.Parsec
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/Parsec.hs
haskell
module Parsec # DEPRECATED " This module has moved to Text . ParserCombinators . Parsec " # (module Text.ParserCombinators.Parsec) where import Text.ParserCombinators.Parsec
7b500990d8f53ec6819fe584c4e27e679b065c458303b7a93156596759e66aa4
sellout/LOOM
sequences.lisp
(loom.internals:defpackage sequences (:use #:cl.evaluation-and-compilation #:cl.data-and-control-flow #:cl.objects #:loom.internals) (:export #:sequence #:copy-seq #:elt #:fill #:make-sequence #:subseq #:map #:map-into #...
null
https://raw.githubusercontent.com/sellout/LOOM/b34b0590e82a8ba41ca1e58a8a825dd889285c1d/src/sequences.lisp
lisp
FIXME: include documentation
(loom.internals:defpackage sequences (:use #:cl.evaluation-and-compilation #:cl.data-and-control-flow #:cl.objects #:loom.internals) (:export #:sequence #:copy-seq #:elt #:fill #:make-sequence #:subseq #:map #:map-into #...