_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 |
|---|---|---|---|---|---|---|---|---|
97d9263ae31120170298be12842ef52424ef4286de8395961d505a87a288dae9 | matsen/pplacer | guppy_to_rdp.ml | open Ppatteries
open Subcommand
open Guppy_cmdobjs
let gap_regexp = Str.regexp "-"
let tax_name_regexp = Str.regexp "[ ;()]"
let get_mothur_name td tid =
let name = Tax_taxonomy.get_tax_name td tid in
Printf.sprintf
"%s_%s"
(Tax_id.to_string tid)
(Str.global_replace tax_name_regexp "_" name)
class cm... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/guppy_to_rdp.ml | ocaml | open Ppatteries
open Subcommand
open Guppy_cmdobjs
let gap_regexp = Str.regexp "-"
let tax_name_regexp = Str.regexp "[ ;()]"
let get_mothur_name td tid =
let name = Tax_taxonomy.get_tax_name td tid in
Printf.sprintf
"%s_%s"
(Tax_id.to_string tid)
(Str.global_replace tax_name_regexp "_" name)
class cm... | |
5806004bbf286d8f2a00ef426c9bebdda36e5c60cec512f74a09bb67ed2bb612 | nasser/magic | special.clj | (ns magic.test.special
(:require [clojure.test :refer [deftest]])
(:use magic.test.common))
(deftest if-expr
(cljclr=magic
(if true 2 3)
(if false 2 3)
(if 1 2 3)
(if "hello" 2 3)
(if true 1)
(if false 1)
(if (< 10 1) 2 (clojure.lang.RT/load "run"))))
(deftest let-expr
(cljclr=magic
(l... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/test/magic/test/special.clj | clojure | this just tests that the monitor forms compile
it does not test their semantics! | (ns magic.test.special
(:require [clojure.test :refer [deftest]])
(:use magic.test.common))
(deftest if-expr
(cljclr=magic
(if true 2 3)
(if false 2 3)
(if 1 2 3)
(if "hello" 2 3)
(if true 1)
(if false 1)
(if (< 10 1) 2 (clojure.lang.RT/load "run"))))
(deftest let-expr
(cljclr=magic
(l... |
748284a7b2f12047129b46d135de0663d7c691178c46512996863a1af0aa9ecc | conormcd/clj-honeycomb | ring_test.clj | (ns clj-honeycomb.middleware.ring-test
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.spec.test.alpha :refer (check)]
[clojure.test :refer (are deftest is testing)]
[clj-honeycomb.core :as honeycomb]
[clj-honeycomb.fields :as... | null | https://raw.githubusercontent.com/conormcd/clj-honeycomb/f309bf3b85af2239f4172189fcd934076306240b/test/clj_honeycomb/middleware/ring_test.clj | clojure | (ns clj-honeycomb.middleware.ring-test
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.spec.test.alpha :refer (check)]
[clojure.test :refer (are deftest is testing)]
[clj-honeycomb.core :as honeycomb]
[clj-honeycomb.fields :as... | |
bbdcd5cf52f4e9c001873374052841c4dc9c9ff38be139a71e9f2a4a6761f509 | tezos/tezos-mirror | injection.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/9cffd5ff04cf3a8fbc055ea4322a773fad184d22/src/proto_alpha/lib_client/injection.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2018 - 2022 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 " , WI... |
ff796bd9b0578aa585f7e16f61109d1033b5d53fec64ecfdcea72c1d98781afe | jacekschae/learn-datomic-course-files | middleware.clj | (ns cheffy.middleware
(:require [ring.middleware.jwt :as jwt]
[ring.util.response :as rr]
[datomic.client.api :as d]
[cheffy.recipe.db :as recipe-db])
(:import (java.util UUID)))
(def wrap-env
{:name ::env
:description "Middleware for injecting env into request"
:compile... | null | https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/8ef46c89e7ac2261496f85d28386c472cccdb7d6/increments/39-wrap-conversation-participant/src/main/cheffy/middleware.clj | clojure | FIXME: conversation | (ns cheffy.middleware
(:require [ring.middleware.jwt :as jwt]
[ring.util.response :as rr]
[datomic.client.api :as d]
[cheffy.recipe.db :as recipe-db])
(:import (java.util UUID)))
(def wrap-env
{:name ::env
:description "Middleware for injecting env into request"
:compile... |
c5e5e63a84ce6a89fc6683aee73b3083060739ccf8ef241a5db9bd321a115862 | ucsd-progsys/dsolve | arraymax.ml | let max x y =
if x > y then x else y
let rec sum k =
if k < 0 then 0 else
let s = sum (k-1) in
s + k
let foldn n b f =
let rec loop i c =
if i < n then loop (i+1) (f i c) else c in
loop 0 b
let arraymax a =
let am l m = max (Array.get a l) m in
foldn (Array.length a) 0 am
let arraytest... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/PLDI2008/arraymax.ml | ocaml | let max x y =
if x > y then x else y
let rec sum k =
if k < 0 then 0 else
let s = sum (k-1) in
s + k
let foldn n b f =
let rec loop i c =
if i < n then loop (i+1) (f i c) else c in
loop 0 b
let arraymax a =
let am l m = max (Array.get a l) m in
foldn (Array.length a) 0 am
let arraytest... | |
93a7286b4ba2ee890255f2b46fda045b677ac1fd0b5e9a1b0ad1af9514d55668 | LighghtEeloo/data-types-a-la-carte | Free.hs | # LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE DeriveFunctor #
module Free where
import Prelude hiding (Either, Left, Right)
data (a :+: b) e = Left (a e) | Right (b e) deriving (Functor)
class (Functor sub, Functor sup) => sub :<: sup where... | null | https://raw.githubusercontent.com/LighghtEeloo/data-types-a-la-carte/7f56995656aeebe3ad3e7e35cfdd4245cefefa18/app/Free.hs | haskell | # OVERLAPPABLE # | # LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE DeriveFunctor #
module Free where
import Prelude hiding (Either, Left, Right)
data (a :+: b) e = Left (a e) | Right (b e) deriving (Functor)
class (Functor sub, Functor sup) => sub :<: sup where... |
04cdcf21d3a688a8b9500679687ce937aa8601db36f22c1ab7fb5977f983164b | AccelerateHS/accelerate-llvm | Global.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE TypeSynonymInstances #-}
# OPTIONS_GHC -fno - warn - orphans #
{-# OPTIONS_HADDOCK hide #-}
-- |
Module : . Global
Copyright : [ 2015 .. 2020 ] Th... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/accelerate-llvm/src/LLVM/AST/Type/Global.hs | haskell | # LANGUAGE ParallelListComp #
# LANGUAGE TypeSynonymInstances #
# OPTIONS_HADDOCK hide #
|
License : BSD3
Stability : experimental
| A global function definition.
| # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
Module : . Global
Copyright : [ 2015 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module LLVM.AST.Ty... |
19d9ac3a745db7771c5bc99dcea37bb7bec5c04766b6e1a99a14047b09ebb663 | Olical/clojure-hey-example | core_test.clj | (ns hey.core-test
(:require [clojure.test :as t]
[hey.core :as sut]))
(t/deftest basic-tests
(t/testing "it says hello to everyone"
(t/is (= (with-out-str (sut/-main)) "Hello, World!\n"))))
| null | https://raw.githubusercontent.com/Olical/clojure-hey-example/7e192593c704ff1e53802f083a3345a8b053b490/test/hey/core_test.clj | clojure | (ns hey.core-test
(:require [clojure.test :as t]
[hey.core :as sut]))
(t/deftest basic-tests
(t/testing "it says hello to everyone"
(t/is (= (with-out-str (sut/-main)) "Hello, World!\n"))))
| |
93e28e75b3dfe05243819927e76fca72448b824d2859228fc11c73acd5bf86f6 | Tclv/HaskellBook | ArithmeticTests.hs | # LANGUAGE TemplateHaskell #
module Main where
import Data.List (sort)
import Test.QuickCheck
import Arithmetic
import Text.Show.Functions
prop_halfIdentity :: Property
prop_halfIdentity = forAll
(arbitrary :: Gen Double)
(\x -> halfIdentity x == x)
prop_listOrdered :: Property
prop_listOrdered = forAll
(a... | null | https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch14/ArithmeticTests/tests/ArithmeticTests.hs | haskell | Taken from QuickCheck Documentation
Analogous to quickCheck compose example
besides this, floating point is not an exact representation due to the shifting for addition of numbers with different exponents. Guard digits help, for small differences
once, twice, thrice, frice?? | # LANGUAGE TemplateHaskell #
module Main where
import Data.List (sort)
import Test.QuickCheck
import Arithmetic
import Text.Show.Functions
prop_halfIdentity :: Property
prop_halfIdentity = forAll
(arbitrary :: Gen Double)
(\x -> halfIdentity x == x)
prop_listOrdered :: Property
prop_listOrdered = forAll
(a... |
7a4865f61306a9db2b5f599782a0136d2c02ffca9d4db1280fb27c9b627ccc0b | diprism/perpl | Fresh.hs | module Scope.Fresh (newVar, newVars) where
import Util.Helpers
import qualified Data.Set as Set
import Data.Char (isDigit)
import Data.String (IsString(fromString))
import Data.List (mapAccumL)
data SplitVar = SplitVar String Int String
rejoin :: IsString var => SplitVar -> var
rejoin (SplitVar pre i suf) = fromStrin... | null | https://raw.githubusercontent.com/diprism/perpl/65a69a5cf2dc62d0f478a427314ed5b4e325e654/src/Scope/Fresh.hs | haskell | Given a predicate, set, and var,
try new var names until it no longer satisfies the predicate or appears in the set | module Scope.Fresh (newVar, newVars) where
import Util.Helpers
import qualified Data.Set as Set
import Data.Char (isDigit)
import Data.String (IsString(fromString))
import Data.List (mapAccumL)
data SplitVar = SplitVar String Int String
rejoin :: IsString var => SplitVar -> var
rejoin (SplitVar pre i suf) = fromStrin... |
b0ead9105952c2f608c56fa517dca886618a2b26d3c2183c7135bd0cb856f334 | inaka/sumo_db | sumo_meta_SUITE.erl | -module(sumo_meta_SUITE).
-include_lib("mixer/include/mixer.hrl").
-mixin([
{ktn_meta_SUITE, [
all/0,
xref/1,
dialyzer/1,
elvis/1
]}
]).
-export([init_per_suite/1, end_per_suite/1]).
-type config() :: [{atom(), term()}].
-spec init_per_suite(config()) -> config().
init_per_suite(Config) ->
[{a... | null | https://raw.githubusercontent.com/inaka/sumo_db/331ea718c13a01748a7739ad4078b0032f4d32e5/test/sumo_meta_SUITE.erl | erlang | -module(sumo_meta_SUITE).
-include_lib("mixer/include/mixer.hrl").
-mixin([
{ktn_meta_SUITE, [
all/0,
xref/1,
dialyzer/1,
elvis/1
]}
]).
-export([init_per_suite/1, end_per_suite/1]).
-type config() :: [{atom(), term()}].
-spec init_per_suite(config()) -> config().
init_per_suite(Config) ->
[{a... | |
9dfe2f7ebafa7f9d8c63b5fe86ea3a11947748eab2510687246f6f1f9deb94f8 | coccinelle/coccinelle | asttopopl.mli |
* This file is part of Coccinelle , lincensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, lincensed under the terms of the GPL v2.
* See copyright.txt in the Coc... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/popl09/asttopopl.mli | ocaml |
* This file is part of Coccinelle , lincensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, lincensed under the terms of the GPL v2.
* See copyright.txt in the Coc... | |
c0903bb8341f51c73d212cc2f8adaa416b1e668e9fa2ef287f3ef9ffaf3052df | janestreet/hardcaml | parameter_name.ml | open Base
type t = string [@@deriving compare, sexp]
let equal = [%compare.equal: t]
let of_string n = n
let to_string n = n
| null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/parameter_name.ml | ocaml | open Base
type t = string [@@deriving compare, sexp]
let equal = [%compare.equal: t]
let of_string n = n
let to_string n = n
| |
55bf52070cca3b5a836ee819b09a88c6b18575c9a94df28f667d3004a8ceb910 | runtimeverification/haskell-backend | Iff.hs | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Syntax.Iff (
Iff (..),
) where
import GHC.Generics qualified as GHC
import Generics.SOP qualified as SOP
import Kore.Attribute.... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/c4f375731a8786c48291958a4bc2484b51ce5d8c/kore/src/Kore/Syntax/Iff.hs | haskell | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Syntax.Iff (
Iff (..),
) where
import GHC.Generics qualified as GHC
import Generics.SOP qualified as SOP
import Kore.Attribute.... | |
eec5f9405f72fecbfad5742d6b4664f5137dd416712000bbb050e2df1aba7bc9 | metabase/metabase | execute.clj | (ns metabase.test.data.sql-jdbc.execute
(:require
[clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[metabase.driver :as driver]
[metabase.test.data.interface :as tx]
[metabase.test.data.sql-jdbc.spec :as spec]
[metabase.util.log :as log])
(:import
(java.sql SQLException)))
(set! *warn-on-... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/test/data/sql_jdbc/execute.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| Impl |
+--------------------------------------------------------------------------------------... | (ns metabase.test.data.sql-jdbc.execute
(:require
[clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[metabase.driver :as driver]
[metabase.test.data.interface :as tx]
[metabase.test.data.sql-jdbc.spec :as spec]
[metabase.util.log :as log])
(:import
(java.sql SQLException)))
(set! *warn-on-... |
a47c31bcb3de03914fc372d16a632aeca10008dc47e85542e638133b27465d20 | Clozure/ccl-tests | errors-data-and-control-flow-1.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon May 30 15:38:09 2005
Contains : Tests of non - ANSI exceptional situations from CLHS section 5 , part 1
(in-package :ba-test)
(compile-and-load "ba-aux.lsp")
;;; APPLY
(def-all-error-test apply.1 'function-designator-p '(apply x nil))
(def-all-error-test a... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/beyond-ansi/errors-data-and-control-flow-1.lsp | lisp | -*- Mode: Lisp -*-
APPLY
FIXME Add lambda list tests
FLET
FIXME Add tests for disallowed lambda list keywords
LABELS
FIXME Add tests for disallowed lambda list keywords
FIXME: add these | Author :
Created : Mon May 30 15:38:09 2005
Contains : Tests of non - ANSI exceptional situations from CLHS section 5 , part 1
(in-package :ba-test)
(compile-and-load "ba-aux.lsp")
(def-all-error-test apply.1 'function-designator-p '(apply x nil))
(def-all-error-test apply.2 'function-designator-p '(ap... |
8e330fcfedc8b1c07b13ac80289bf778d48e0c80f4ada33acbf70e617d051cf8 | awslabs/s2n-bignum | bignum_demont_p256_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_demont_p256_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/p256/bignum_demont_p256_alt.o";;
***
ADD (% r9) (% rax)
ADC (% r10) (% rdx)
ADD (% r10) (% rax)
ADC (% r11) (% rdx)
NEG (% rcx... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Mapping out of Montgomery representation modulo p_256 . ... |
1f921f897d65ffefa8033f83014c520b0c177e00584133ab3ca8a9c73c58fc22 | input-output-hk/ouroboros-network | Cardano.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
-- DUPLICATE -- adapted from: cardano-node... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-cardano-tools/src/Cardano/Node/Protocol/Cardano.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
DUPLICATE -- adapted from: cardano-node/src/Cardano/Node/Protocol/Cardano.hs
* Errors
----------------------------------------------------------------------------
| Make 'SomeConsensusProtocol' using the Cardano instance.
The Cardano protocol insta... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Cardano.Node.Protocol.Cardano (
mkSomeConsensusProtocolCardano
, CardanoProtocolInstantiationError (..... |
afa6046ddafb0bee469e8c08a7af659e8fc03b7556ad404146bc1eda5fd7bfba | haroldcarr/learn-haskell-coq-ml-etc | HW07_HC_JoinListEditor.hs |
Created : 2014 Jun 17 ( Tue ) 09:21:12 by .
Last Modified : 2014 Jun 17 ( Tue ) 09:33:31 by .
Created : 2014 Jun 17 (Tue) 09:21:12 by Harold Carr.
Last Modified : 2014 Jun 17 (Tue) 09:33:31 by Harold Carr.
-}
module Main where
import HW07_Buffer
import HW07_Editor
import ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2014-06-upenn/cis194/src/HW07_HC_JoinListEditor.hs | haskell |
Created : 2014 Jun 17 ( Tue ) 09:21:12 by .
Last Modified : 2014 Jun 17 ( Tue ) 09:33:31 by .
Created : 2014 Jun 17 (Tue) 09:21:12 by Harold Carr.
Last Modified : 2014 Jun 17 (Tue) 09:33:31 by Harold Carr.
-}
module Main where
import HW07_Buffer
import HW07_Editor
import ... | |
15ab1b817a2ac01f24242090a5412561d7313d2ab5d5a3a316356a5c9d35687f | zero-one-group/geni | core.clj | (ns zero-one.geni.core
(:refer-clojure :exclude [*
+
-
/
<
<=
=
>
>=
... | null | https://raw.githubusercontent.com/zero-one-group/geni/b616f0297caedc0c88cac51bd090f2539b535829/src/clojure/zero_one/geni/core.clj | clojure | bucket
days
months
years | (ns zero-one.geni.core
(:refer-clojure :exclude [*
+
-
/
<
<=
=
>
>=
... |
d0f922520c6c1840e5386903edfeb030ac6c84f3f89c9a1f620f52608e27da86 | weblocks-framework/weblocks | request-handler.lisp | (in-package :weblocks)
(eval-when (:compile-toplevel :load-toplevel :execute)
(when (find-symbol "*APPROVED-RETURN-CODES*" 'hunchentoot)
(pushnew 'hunchentoot-approved-return-codes *features*)))
(export '(handle-client-request
*before-ajax-complete-scripts*
*on-ajax-complete-scripts*
... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/request-handler.lisp | lisp | TODO: let the user customize this
save it for splitting this up
FIXME: what about the txn hook?
we need to render widgets before the boilerplate HTML
that wraps them in order to collect a list of script and
stylesheet dependencies.
set page title if it isn't already set
render page will wrap the HTML already ren... | (in-package :weblocks)
(eval-when (:compile-toplevel :load-toplevel :execute)
(when (find-symbol "*APPROVED-RETURN-CODES*" 'hunchentoot)
(pushnew 'hunchentoot-approved-return-codes *features*)))
(export '(handle-client-request
*before-ajax-complete-scripts*
*on-ajax-complete-scripts*
... |
1dce7eb3a723f5f2bf73d81d22dfa64bfa78ec1b6228811c02f9392bea2f9d13 | ddmcdonald/sparser | ns-unknown-rd-items-covid-2020-04-03-0403-com-pmc-1301-1400.lisp |
(IN-PACKAGE :SP)
(DEFPARAMETER |*NS-RD-covid-2020-04-03-0403-COM-PMC-1301-1400*|
'("!r" "<0" "<0.05" "<0.3" "<1" "<10" "<15" "<18" "<18-years-old" "<1∶10" "<1∶2560" "<1∶50" "<2"
"<2%" "<20%" "<200" "<25%" "<3" "<4%" "<5" "<6" "<70" "<98%" ">0" ">0.05" ">0.3" ">0.8" ">1"
">10" ">100" ">103" ">1∶10" ">1∶40" ">... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/tools/ns-stuff/ns-unknown-rd-items-covid-2020-04-03-0403-com-pmc-1301-1400.lisp | lisp |
(IN-PACKAGE :SP)
(DEFPARAMETER |*NS-RD-covid-2020-04-03-0403-COM-PMC-1301-1400*|
'("!r" "<0" "<0.05" "<0.3" "<1" "<10" "<15" "<18" "<18-years-old" "<1∶10" "<1∶2560" "<1∶50" "<2"
"<2%" "<20%" "<200" "<25%" "<3" "<4%" "<5" "<6" "<70" "<98%" ">0" ">0.05" ">0.3" ">0.8" ">1"
">10" ">100" ">103" ">1∶10" ">1∶40" ">... | |
bbf4cc5297bbc763e6caaf8cc3acbdc3ef57105c62db96555cc829fd930b8cf5 | toschoo/mom | client1.hs | module Main
where
import qualified Data.Conduit as C
import qualified Data.ByteString.Char8 as B
import Network.Mom.Patterns.Basic.Client
import Network.Mom.Patterns.Types
main :: IO ()
main = withContext 1 $ \ctx ->
withClient ctx "test" "tcp:5555" Connect $ \c -... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/patterns/test/smoke/client1.hs | haskell | module Main
where
import qualified Data.Conduit as C
import qualified Data.ByteString.Char8 as B
import Network.Mom.Patterns.Basic.Client
import Network.Mom.Patterns.Types
main :: IO ()
main = withContext 1 $ \ctx ->
withClient ctx "test" "tcp:5555" Connect $ \c -... | |
fe777bcd3c892f4ef523bc2e1e5d6e6e785740352e2278e4bfaf0498c96fff38 | show-matz/CL-STL | cl-stl-vector.lisp | (in-package :cl-stl)
(defconstant +VECTOR-MINIMUM-BUFSIZE+ 8)
;;--------------------------------------------------------------------
;;
;; class difinition
;;
;;--------------------------------------------------------------------
(defstruct (vector-core (:conc-name vec-core-))
(size 0 :type fixnum)
(capacit... | null | https://raw.githubusercontent.com/show-matz/CL-STL/c6ffeac2815fa933121bc4c8b331d9c3516dff88/src/cl-stl-vector.lisp | lisp | --------------------------------------------------------------------
class difinition
--------------------------------------------------------------------
(debug-key :type :symbol
(debug-key :type :symbol
--------------------------------------------------------------------
internal utilities
-------... | (in-package :cl-stl)
(defconstant +VECTOR-MINIMUM-BUFSIZE+ 8)
(defstruct (vector-core (:conc-name vec-core-))
(size 0 :type fixnum)
(capacity 0 :type fixnum)
# + cl - stl - debug
( dbgkey nil : type symbol )
(buffer nil :type simple-vector))
(defclass vector (randomaccess_container pushable_... |
63afd488674fff96b247ad1780324cf64e3f4b3eb9be9033a5bf478c99315b22 | imrehg/ypsilon | setting.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk setting)
(export gdk_setting_action_get_type
gdk_setting_get)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/setting.scm | scheme | GType gdk_setting_action_get_type (void)
gboolean gdk_setting_get (const gchar* name, GValue* value)
[end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk setting)
(export gdk_setting_action_get_type
gdk_setting_get)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond... |
7a3ea8f1d134b28404e00e249cf62028b255246658b1a35600f5a7b55c3f46f9 | metabase/metabase | util_test.clj | (ns metabase.driver.mongo.util-test
(:require
[clojure.test :refer :all]
[metabase.driver.mongo.util :as mongo.util]
[metabase.driver.util :as driver.u]
[metabase.test :as mt])
(:import
(com.mongodb MongoClient MongoClientOptions$Builder ReadPreference ServerAddress)))
(set! *warn-on-reflection* tru... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/modules/drivers/mongo/test/metabase/driver/mongo/util_test.clj | clojure | we want to use a bogus port here on purpose -
so that locally, it gets a ConnectionRefused, | (ns metabase.driver.mongo.util-test
(:require
[clojure.test :refer :all]
[metabase.driver.mongo.util :as mongo.util]
[metabase.driver.util :as driver.u]
[metabase.test :as mt])
(:import
(com.mongodb MongoClient MongoClientOptions$Builder ReadPreference ServerAddress)))
(set! *warn-on-reflection* tru... |
1da04856f367765f4b5bbd9ff8324e418e18fce459793349417cfbfa0bd23789 | ddmcdonald/sparser | debris-sweep.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 2021 -- all rights reserved
;;;
;;; File: "debris-sweep"
;;; Module: "drivers;forest:"
Version : May 2021
;; Initiated 1/15/20 to identify discourse relations and other
patterns in the debris left after pass one . Design ... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/33715946ffe3c45bc88b8b6e69fa4755fa4058e7/Sparser/code/s/drivers/forest/debris-sweep.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "debris-sweep"
Module: "drivers;forest:"
Initiated 1/15/20 to identify discourse relations and other
to sweep-sentence-treetops but maintains state across multiple
sentences.
(trace-debris-sweep)
formatting the repl
usually means something ... | copyright ( c ) 2021 -- all rights reserved
Version : May 2021
patterns in the debris left after pass one . Design is similar
(in-package :sparser)
(defun sweep-debris-in-sentence (sentence)
"Runs the debris sweeper over this sentence and integrates
it into the paragraph level state layout.
Ca... |
ceb7c874cf449b865fe8eea6ad727b623d839d02eec49c07f6dbd0f72c79a8ef | ghc/ghc | CodeOutput.hs |
( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998
\section{Code output phase }
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section{Code output phase}
-}
# LANGUAGE ScopedTypeVariables #
module GHC.Driver.CodeOutput
( codeOutput
, outputForeignStubs
, profilingInitCode
... | null | https://raw.githubusercontent.com/ghc/ghc/8a81d9d933089b6ed72478342a0070d7c8f82ff8/compiler/GHC/Driver/CodeOutput.hs | haskell |
************************************************************************
* *
\subsection{Steering}
* *
************************************************************************
^ a... |
( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998
\section{Code output phase }
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section{Code output phase}
-}
# LANGUAGE ScopedTypeVariables #
module GHC.Driver.CodeOutput
( codeOutput
, outputForeignStubs
, profilingInitCode
... |
6f051cdc1ad49f532e04ea3ff010fdb2ce835205789d2bda18952a9dee424187 | facebook/flow | renameMapper.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/b43df23064c535f0d30581d0ae635e5cf172ea75/src/services/references/renameMapper.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... | |
5f90205d89bd91ccc2490e4be861a9a264de4c8c2be321e7979aa121d4091ea5 | solita/mnt-teet | meta_query.clj | (ns teet.meta.meta-query
(:require [clojure.walk :as walk]
[datomic.client.api :as d]
[teet.util.datomic :as du]
[teet.user.user-model :as user-model]))
(defn gather-ids
"Recursively gather all `:db/id` values from entities"
([entities]
(gather-ids entities #{} (constantly ... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/src/clj/teet/meta/meta_query.clj | clojure | Walk result tree and gather all db/id values
Query database for db/id deletion status
Walk result tree removing all deleted entities | (ns teet.meta.meta-query
(:require [clojure.walk :as walk]
[datomic.client.api :as d]
[teet.util.datomic :as du]
[teet.user.user-model :as user-model]))
(defn gather-ids
"Recursively gather all `:db/id` values from entities"
([entities]
(gather-ids entities #{} (constantly ... |
bb9dd7d0a8b2c7c0f15c9c043d2fa99eac892805fd38badf6356232f428d36be | CodyReichert/qi | arrays.lisp | (in-package :alexandria)
(defun copy-array (array &key (element-type (array-element-type array))
(fill-pointer (and (array-has-fill-pointer-p array)
(fill-pointer array)))
(adjustable (adjustable-array-p array)... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/alexandria-latest/arrays.lisp | lisp | (in-package :alexandria)
(defun copy-array (array &key (element-type (array-element-type array))
(fill-pointer (and (array-has-fill-pointer-p array)
(fill-pointer array)))
(adjustable (adjustable-array-p array)... | |
771d08013e5de101a44cb27b7d83a8168e06e02b1559de792e5dae345e373e6c | avsm/platform | xml_stream.ml | TyXML
*
* Copyright ( C ) 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/lib/xml_stream.ml | ocaml | * Input
TODO: This is not very structured | TyXML
*
* Copyright ( C ) 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... |
dd51087ca4aa769fb742e84b2dbc9a53584716744e6864edadf9c817831ae2a2 | ringstellung/Enigma | Auxiliars.hs | module Auxiliars (module Auxiliars) where
import Data.List
import Data.Maybe
type Alph = String
alphabet :: Alph
alphabet = ['A'..'Z']
removeWhiteAux :: String -> String -> String
removeWhiteAux "" strng = strng
removeWhiteAux (c:cs) strng
| c == ' ' = removeWhiteAux cs strng
| otherwise = removeWhiteAux ... | null | https://raw.githubusercontent.com/ringstellung/Enigma/f21aa7617355b804f0e43ae76ae66a750fabc615/M4/Auxiliars.hs | haskell | module Auxiliars (module Auxiliars) where
import Data.List
import Data.Maybe
type Alph = String
alphabet :: Alph
alphabet = ['A'..'Z']
removeWhiteAux :: String -> String -> String
removeWhiteAux "" strng = strng
removeWhiteAux (c:cs) strng
| c == ' ' = removeWhiteAux cs strng
| otherwise = removeWhiteAux ... | |
40919132015d5faf99041d4bff99943f183144114ab3a5fd26c072c0b502b8f8 | rpgoldman/xmls | octets-xml.lisp | Octet stream support for XMLS with automatic encoding detection .
;;;;
FIXME : Could / should use parser rules native to XMLS to parse the XML
;;;; declaration.
(defpackage xmls/octets
(:use :cl
:flexi-streams
:cl-ppcre)
(:export :make-xml-stream))
(in-package :xmls/octets)
;;; XML defines he... | null | https://raw.githubusercontent.com/rpgoldman/xmls/18546f0850b1338e03997ffd1696add1cb1800d1/octets-xml.lisp | lisp |
declaration.
XML defines heuristics to determine the encoding of a document represented
by an octet stream: /#charencoding
extra gracious margin
[A-Za-z] ([A-Za-z0-9._] | '-')*
Test cases | Octet stream support for XMLS with automatic encoding detection .
FIXME : Could / should use parser rules native to XMLS to parse the XML
(defpackage xmls/octets
(:use :cl
:flexi-streams
:cl-ppcre)
(:export :make-xml-stream))
(in-package :xmls/octets)
(defparameter *pi-start* (string-to-octe... |
04755fa4a53138824e8c758581cfa216e293bde574a545e5f2cc5289d90434ce | input-output-hk/plutus-pioneer-program | FortyTwo.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE ImportQualifiedPost #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module FortyTwo where
import qualified Plutus.V2.Ledger.Api as PlutusV2
import PlutusTx (BuiltinData, compile)
import ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-pioneer-program/d49d2eca5ef5de08740d26a50da16b36ab2ea57a/code/Week02/lecture/FortyTwo.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
-------------------------------------------------------------------------------------------------
--------------------------------- ON-CHAIN / VALIDATOR ------------------------------------------
----------------------------------------------------------... | # LANGUAGE ImportQualifiedPost #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module FortyTwo where
import qualified Plutus.V2.Ledger.Api as PlutusV2
import PlutusTx (BuiltinData, compile)
import PlutusTx.Builtins as Builtins (mkI)
import PlutusTx.Pr... |
009a2e5e5f764e6120ed6ce6eb7073b5c79d5cb74f6b9db32e72c35cadf8e181 | replikativ/datahike-server | setup_test.clj | (ns ^:integration datahike-server.setup-test
(:require [clojure.test :refer [deftest testing is]]
[datahike-server.database :as db]
[datahike-server.config :as config]
[datahike-server.test-utils :refer [api-request]]
[mount.core :as mount]))
(deftest dev-mode-test
(... | null | https://raw.githubusercontent.com/replikativ/datahike-server/ec87469832e017bfaff98e86046de85f8e365817/test/datahike_server/setup_test.clj | clojure | (ns ^:integration datahike-server.setup-test
(:require [clojure.test :refer [deftest testing is]]
[datahike-server.database :as db]
[datahike-server.config :as config]
[datahike-server.test-utils :refer [api-request]]
[mount.core :as mount]))
(deftest dev-mode-test
(... | |
452bc10d041429e2ca94a537057ef75c77cd594038c3b0b0905bb33cfc60da9e | bobzhang/fan | parsetree_util.ml | open Parsetree
open Longident
open Location
type toplevel_phrase = Parsetree.toplevel_phrase
let print_interface = Printast.interface
let print_implementation = Printast.implementation
let mkloc txt loc = { txt ; loc }
let with_loc txt loc = mkloc txt loc
let ( + > ) txt loc =
let lident s = Lident s... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/common/parsetree_util.ml | ocaml | {pcty_desc = d; pcty_loc = loc}
{ppat_desc = d; ppat_loc =mkghloc loc}
{pmty_desc = d; pmty_loc = loc}
* FIXME what's the semantics of [varify_constructors]
, lbl_list
, lbl_list
Parsetree.row_field -> Parsetree.row_field FIXME | open Parsetree
open Longident
open Location
type toplevel_phrase = Parsetree.toplevel_phrase
let print_interface = Printast.interface
let print_implementation = Printast.implementation
let mkloc txt loc = { txt ; loc }
let with_loc txt loc = mkloc txt loc
let ( + > ) txt loc =
let lident s = Lident s... |
83dad60e46c56200c7cd88e31b2cd048ccac095d76a16c0fadbf5d53f9fbabc1 | garrigue/labltk | viewer.ml | (*************************************************************************)
(* *)
(* OCaml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/garrigue/labltk/0e52cb81271236d904eaf18d26821d5df5e4234a/browser/viewer.ml | ocaml | ***********************************************************************
OCaml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open StdLabels
open Tk
open J... |
e8a79b43f9264cab44c572ed81aab4a232743ed8ae423d361ac7186e292e2d42 | VMatthijs/CHAD | ToConcrete.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
-- | Interpret a target-language program in a concrete language as defined in
" Concrete " . This ... | null | https://raw.githubusercontent.com/VMatthijs/CHAD/755fc47e1f8d1c3d91455f123338f44a353fc265/src/ToConcrete.hs | haskell | | Interpret a target-language program in a concrete language as defined in
operations and forgets linearity of arrows. The transformation on types is | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
" Concrete " . This chooses an interpretation of the abstract
given by ' UnLin ' .
module ToCon... |
23c05df3bdf2457405ebb3cc8e89a9eb0860f79711723c96829b5f9ecb54caab | Shirakumo/speechless | printer.lisp | (in-package #:org.shirakumo.fraf.speechless)
(defun maybe-unwrap (thing)
(if (and (listp thing) (eql 'progn (first thing)) (null (cddr thing)))
(second thing)
thing))
(defmacro %op (s thing &rest args)
`(markless::output-operator (format NIL ,thing ,@args) ,s markless::_))
(defmacro %form (s thing)
... | null | https://raw.githubusercontent.com/Shirakumo/speechless/2b9eb1d95f667180d683648a936d3b9ce71b0ffb/printer.lisp | lisp | }
}
font-size: 1.2em;}
}
}
} | (in-package #:org.shirakumo.fraf.speechless)
(defun maybe-unwrap (thing)
(if (and (listp thing) (eql 'progn (first thing)) (null (cddr thing)))
(second thing)
thing))
(defmacro %op (s thing &rest args)
`(markless::output-operator (format NIL ,thing ,@args) ,s markless::_))
(defmacro %form (s thing)
... |
9499368684c2650bbbf0edee748a11418bbca8503a2d3b670663dda1dc9e0394 | oisdk/monus-weighted-search | TestHelpers.hs | -- |
Module : MonusWeightedSearch . Internal . TestHelpers
Copyright : ( c ) Kidney 2021
-- Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- Some utility functions for implementing 'Arbitrary' etc.
module MonusWeightedSearch.Internal.TestHelpers where
import Test.QuickCh... | null | https://raw.githubusercontent.com/oisdk/monus-weighted-search/898deac1f9d11e602e17ce852ae8bfa74d7d3c78/src/MonusWeightedSearch/Internal/TestHelpers.hs | haskell | |
Maintainer :
Stability : experimental
Portability : non-portable
Some utility functions for implementing 'Arbitrary' etc.
$setup
>>> import Test.QuickCheck
| @'sumsTo' n@ generates a list that sums to @n@.
prop> n >= 0 ==> forAll (sumsTo n) (\xs -> sum xs === n)
| @'percentageChance' n@ is 'True' @n@%... | Module : MonusWeightedSearch . Internal . TestHelpers
Copyright : ( c ) Kidney 2021
module MonusWeightedSearch.Internal.TestHelpers where
import Test.QuickCheck
import System.Random
sumsTo :: Int -> Gen [Int]
sumsTo n = go [] n >>= shuffle
where
go ks n
| n <= 0 = pure ks
| otherwis... |
2e9bd9106811b293fab93f2c940f030f6c7893cdb2a1c0e5bf1999e1dd0abe08 | grin-compiler/ghc-wpc-sample-programs | Info.hs | -- -----------------------------------------------------------------------------
--
Info.hs , part of
--
( c ) 2003
--
-- Generate a human-readable rendition of the state machine.
--
-- ----------------------------------------------------------------------------}
module Info (infoDFA) where
import AbsSyn
impo... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/alex-3.2.5/src/Info.hs | haskell | -----------------------------------------------------------------------------
Generate a human-readable rendition of the state machine.
----------------------------------------------------------------------------}
-----------------------------------------------------------------------------
Generate a human r... | Info.hs , part of
( c ) 2003
module Info (infoDFA) where
import AbsSyn
import qualified Map
import qualified Data.IntMap as IntMap
import Util
infoDFA :: Int -> String -> DFA SNum Code -> ShowS
infoDFA _ func_nm dfa
= str "Scanner : " . str func_nm . nl
. str "States : " . shows (length dfa_list) . nl
... |
e935e8265eef41d20c3476f16795da2751c1d67b1889115670836e244449039a | ndmitchell/catch | Kind.hs |
module Hite.Kind(kind) where
import Hite.Type
import Hite.Show
import Maybe
kind :: Hite -> Hite
kind (Hite datas funcs) = Hite datas (minKindFix $ map initial funcs)
where
initial (Func name args body _) =
Func name args body (Arrow (replicate (1+length args) Star))
minKindFix :: [Func] -... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Hite/Kind.hs | haskell | find the minimum kind of each variable |
module Hite.Kind(kind) where
import Hite.Type
import Hite.Show
import Maybe
kind :: Hite -> Hite
kind (Hite datas funcs) = Hite datas (minKindFix $ map initial funcs)
where
initial (Func name args body _) =
Func name args body (Arrow (replicate (1+length args) Star))
minKindFix :: [Func] -... |
cc67705fa86ba8ae6a3710e2a230a937d52822508847baa46a3b749e0946837b | benknoble/frosthaven-manager | manager.rkt | #lang racket
(module+ main
;; (require racket/gui/easy/debugger)
;; (start-debugger)
(define s (make-state))
(command-line
#:args ([save #f])
(when (and save (file-exists? save))
((load-game s) save))
(void (render/eventspace
;; no separate eventspace: block main until this window... | null | https://raw.githubusercontent.com/benknoble/frosthaven-manager/5e034a8fc92ff738af5cc9c85688ca6e4420c554/gui/manager.rkt | racket | (require racket/gui/easy/debugger)
(start-debugger)
no separate eventspace: block main until this window closed
GUI
left
main
right
bottom
button is available
Transition functions
HACK: trigger updates in (state-@creatures s) to re-render list-view (?)
note parens around switch to invoke selected transition... | #lang racket
(module+ main
(define s (make-state))
(command-line
#:args ([save #f])
(when (and save (file-exists? save))
((load-game s) save))
(void (render/eventspace
(manager s)))))
(provide manager)
(require racket/gui/easy
(only-in racket/gui
get-file
... |
73e732c6090a6c24e2f17a7eb1bf2c762cb6bd96b1351bf6c06fbfb9d501722d | jgm/pandoc-citeproc | Setup.hs | # LANGUAGE CPP #
import Distribution.Simple
import Distribution.PackageDescription (PackageDescription(..))
import Distribution.Simple.Utils (notice, installOrdinaryFiles)
import Distribution.Simple.Setup
import Distribution.Simple.LocalBuildInfo
main :: IO ()
main =
defaultMainWithHooks $ simpleUserHooks {
... | null | https://raw.githubusercontent.com/jgm/pandoc-citeproc/473378e588c40a6c3cb3b24330431b89cf4f81b4/Setup.hs | haskell | # LANGUAGE CPP #
import Distribution.Simple
import Distribution.PackageDescription (PackageDescription(..))
import Distribution.Simple.Utils (notice, installOrdinaryFiles)
import Distribution.Simple.Setup
import Distribution.Simple.LocalBuildInfo
main :: IO ()
main =
defaultMainWithHooks $ simpleUserHooks {
... | |
78125d7f6740b1a6b06742a36c41e75bf2c792c12b34f451d9ec7cd2c299bda2 | vasilisp/inez | box_intf.mli | module type T1 = sig
type _ b
type t = Box : _ b -> t
end
module type T1_arrow = sig
type _ b
type t = Box : (_ -> _) b -> t
end
module type T2 = sig
type (_, _) b
type 'c t = Box : ('c, _) b -> 'c t
end
module type T2_arrow2 = sig
type (_, _) b
type 'c t = Box : ('c, _ -> _) b -> 'c t
end
module ty... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/box_intf.mli | ocaml | module type T1 = sig
type _ b
type t = Box : _ b -> t
end
module type T1_arrow = sig
type _ b
type t = Box : (_ -> _) b -> t
end
module type T2 = sig
type (_, _) b
type 'c t = Box : ('c, _) b -> 'c t
end
module type T2_arrow2 = sig
type (_, _) b
type 'c t = Box : ('c, _ -> _) b -> 'c t
end
module ty... | |
21eb68369b6c3b7575907799faaeff6a7c9546e8813efb7ca03fce298742ee79 | commercialhaskell/rio | ListSpec.hs | # LANGUAGE NoImplicitPrelude #
module RIO.ListSpec where
import Test.Hspec
import RIO
import qualified RIO.List as List
data TestType = TestType { testTypeContents :: Int }
deriving (Eq, Show)
testTypeList :: [TestType]
testTypeList = [TestType { testTypeContents = 1 }, TestType { testTypeContents = 0 }]
spec :: ... | null | https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/test/RIO/ListSpec.hs | haskell | # LANGUAGE NoImplicitPrelude #
module RIO.ListSpec where
import Test.Hspec
import RIO
import qualified RIO.List as List
data TestType = TestType { testTypeContents :: Int }
deriving (Eq, Show)
testTypeList :: [TestType]
testTypeList = [TestType { testTypeContents = 1 }, TestType { testTypeContents = 0 }]
spec :: ... | |
c4856e6bfbb0375f6b5d5ff10183a55f88f83347753e593c899f188d7bcdac2f | couchbase/chronicle | chronicle_logger_filter.erl | @author Couchbase < >
2020 Couchbase , Inc.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, sof... | null | https://raw.githubusercontent.com/couchbase/chronicle/2e5b51f0e718ce52dc7bededb26ce9931e145051/src/chronicle_logger_filter.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | @author Couchbase < >
2020 Couchbase , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(chronicle_logger_filter).
-export([filter/2]).
filter(Event, Modules) ->
case maps:find(msg, Event) of
{o... |
8218ca7f61f52f7dcab8a177a9d31b15c0d47e482f46e468cf8cf833f219035e | cs136/seashell | client.rkt | #lang typed/racket
Seashell 's websocket library .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
;;
;; 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... | null | https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/collects/seashell/websocket/client.rkt | racket |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
See also 'ADDITIONAL TERMS' at the end of the included LICENSE file.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | #lang typed/racket
Seashell 's websocket library .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
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
... |
849ad22ff0d802897191c3b3a85bc81b6217e1f753b15af452cfba6fbbce37bd | gmartinezramirez/USACH-Paradigmas-Programacion | PEP_01_2020_P2.rkt | #lang racket
selectores X dom : entero ej : ( X pixel ) ( Y pixel ) ( R pixel ) ( G pixel ) ( B pixel )
(define X (lambda (pixel) (car pixel)))
(define Y (lambda (pixel) (car (cdr pixel))))
(define R (lambda (pixel) (car (cdr (cdr pixel)))))
(define G (lambda (pixel) (car (cdr (cdr (cdr pixel))))))
(define B (la... | null | https://raw.githubusercontent.com/gmartinezramirez/USACH-Paradigmas-Programacion/cf19c7564af36fcf249a1e30d9d6fcc0095ff42c/2021-01/01-FP/PEP_01_2020_P2.rkt | racket | : natural
: natural
Pregunta 1
Pregunta 2
Pregunta 3 | #lang racket
selectores X dom : entero ej : ( X pixel ) ( Y pixel ) ( R pixel ) ( G pixel ) ( B pixel )
(define X (lambda (pixel) (car pixel)))
(define Y (lambda (pixel) (car (cdr pixel))))
(define R (lambda (pixel) (car (cdr (cdr pixel)))))
(define G (lambda (pixel) (car (cdr (cdr (cdr pixel))))))
(define B (la... |
f4b0683bb50c5eefa41b4c4efa36938ed3735a072e8c8f19c81d825bdeccb5c4 | DSiSc/why3 | sysutil.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/util/sysutil.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
let backup_file f =
if Sys.file_exists f then begin
let fb = f ^ ".bak" in
if Sys.file_exists fb... |
9681fd1656b56ae22a38b82aff13dbc6bba63aa25755901ba358c1d04ef3f4db | codedownio/sandwich | Main.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent
import Control.Monad.IO.Class
import Data.Time.Clock
import Test.Sandwich
import Test.Sandwich.WebDriver
import Test.Sandwich.WebDriver.Windows
import Test.WebDriver.Commands
positioning :: TopSpec
positioning = in... | null | https://raw.githubusercontent.com/codedownio/sandwich/950991e34f15f5bee5b258bb828b0cce4eb2b4ab/demos/demo-webdriver-positioning/app/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Main where
import Control.Concurrent
import Control.Monad.IO.Class
import Data.Time.Clock
import Test.Sandwich
import Test.Sandwich.WebDriver
import Test.Sandwich.WebDriver.Windows
import Test.WebDriver.Commands
positioning :: TopSpec
positioning = introduceWebDriver (defaultWdOptions ... |
bfb45badf646c2c618a8bec3d7600d885ef2481de028f6aa14306f6905342e92 | postgres-haskell/postgres-wire | test.hs |
Tests for connection establishment and athorization . It is assumed
than these tests being executed with different settings in pg_hba.conf
Tests for connection establishment and athorization. It is assumed
than these tests being executed with different settings in pg_hba.conf
-}
import Control.Excepti... | null | https://raw.githubusercontent.com/postgres-haskell/postgres-wire/fda5e3b70c3cc0bab8365b4b872991d50da0348c/tests_connection/test.hs | haskell |
Tests for connection establishment and athorization . It is assumed
than these tests being executed with different settings in pg_hba.conf
Tests for connection establishment and athorization. It is assumed
than these tests being executed with different settings in pg_hba.conf
-}
import Control.Excepti... | |
d2c131a6855c7cc39bc28b30f06c55d2abce500f1683e16de10407a7564829a8 | GrammaticalFramework/gf-core | CanonicalJSON.hs | module GF.Grammar.CanonicalJSON (
encodeJSON
) where
import Text.JSON
import Control.Applicative ((<|>))
import Data.Ratio (denominator, numerator)
import GF.Grammar.Canonical
import Control.Monad (guard)
import GF.Infra.Ident (RawIdent,showRawIdent,rawIdentS)
encodeJSON :: FilePath -> Grammar -> IO ()
encodeJSO... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/4e8859aa752c65e8445cd54cb6ca80089492fd31/src/compiler/GF/Grammar/CanonicalJSON.hs | haskell | in general we encode grammars using JSON objects/records,
except for newtypes/coercions/direct values
the top-level definitions use normal record labels,
but recursive types/values/ids use labels staring with a "."
------------------------------------------------------------------------------
** Abstract Syntax
n... | module GF.Grammar.CanonicalJSON (
encodeJSON
) where
import Text.JSON
import Control.Applicative ((<|>))
import Data.Ratio (denominator, numerator)
import GF.Grammar.Canonical
import Control.Monad (guard)
import GF.Infra.Ident (RawIdent,showRawIdent,rawIdentS)
encodeJSON :: FilePath -> Grammar -> IO ()
encodeJSO... |
0a5d96e3903212b9bfa8eb9ceb5c9840dbf00ff45603de493a07a3147db49d08 | atgreen/lisp-openshift | rc6.lisp | ;;;; rc6.lisp -- implementation of the RC6 block cipher
(in-package :ironclad)
(defconstant +rc6/32-p+ #xb7e15163)
(defconstant +rc6/32-q+ #x9e3779b9)
(deftype rc6-n-rounds () '(mod 256))
(defclass rc6 (cipher 16-byte-block-mixin)
((n-rounds :reader n-rounds :initarg :n-rounds :type rc6-n-rounds)
(round-keys :... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/ironclad_0.30/src/ciphers/rc6.lisp | lisp | rc6.lisp -- implementation of the RC6 block cipher
The code generated by these functions produces lots of compiler
I don't know where the notes originate from...
is somewhat slow and consy, but it's easily shown to be correct.
initialize the round keys
mix in the user's key |
(in-package :ironclad)
(defconstant +rc6/32-p+ #xb7e15163)
(defconstant +rc6/32-q+ #x9e3779b9)
(deftype rc6-n-rounds () '(mod 256))
(defclass rc6 (cipher 16-byte-block-mixin)
((n-rounds :reader n-rounds :initarg :n-rounds :type rc6-n-rounds)
(round-keys :accessor round-keys
:type (simple-array (... |
692f87279f42800fbd778c08df0cd416ca8046540713f1a9557c3916aee5eed3 | technomancy/leiningen | templates.clj | (ns leiningen.test.new.templates
(:use clojure.test
leiningen.new.templates)
(:require [leiningen.test.helper :refer [abort-msg] :as lthelper]
[leiningen.core.user :as user]
[clojure.java.io :as io])
(:import [java.io File]))
(defn- getenv [s]
(System/getenv s))
(deftest line-s... | null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test/leiningen/test/new/templates.clj | clojure | (ns leiningen.test.new.templates
(:use clojure.test
leiningen.new.templates)
(:require [leiningen.test.helper :refer [abort-msg] :as lthelper]
[leiningen.core.user :as user]
[clojure.java.io :as io])
(:import [java.io File]))
(defn- getenv [s]
(System/getenv s))
(deftest line-s... | |
64d52e12578544d066562ab308f66ef8aeba30de5d56d2faa2b650ba8e2253b8 | hcarty/ocaml-gdal | band.ml | open Ctypes
type c = T.t
type ('v, 'e) t = c * ('v, 'e) Bigarray.kind
let t = T.t
module Data = struct
type (_, _) t =
| Byte : (int, Bigarray.int8_unsigned_elt) t
| UInt16 : (int, Bigarray.int16_unsigned_elt) t
| Int16 : (int, Bigarray.int16_signed_elt) t
| UInt32 : (int32, Bigarray.int32_elt) t
... | null | https://raw.githubusercontent.com/hcarty/ocaml-gdal/9c225c1e3f8002ec7614b3c1657e5f05e4e0e821/src/band.ml | ocaml | Only pass valid data to f
If we created a fresh bigarray copy the values back to data for
writing. Physical equality is intentional here.
[check src dst] returns [true] if the dimensions and block dimensions of
each band in [src] matches those in [dst]. | open Ctypes
type c = T.t
type ('v, 'e) t = c * ('v, 'e) Bigarray.kind
let t = T.t
module Data = struct
type (_, _) t =
| Byte : (int, Bigarray.int8_unsigned_elt) t
| UInt16 : (int, Bigarray.int16_unsigned_elt) t
| Int16 : (int, Bigarray.int16_signed_elt) t
| UInt32 : (int32, Bigarray.int32_elt) t
... |
5d7fe3513f6357834313e28edbe22ba40720b6ab20b80888c02191d664c439f5 | KULeuven-CS/CPL | syntax.rkt | #lang eopl
(provide (all-defined-out))
;;; Syntax
(define-datatype program program?
(a-program
(m-defs (list-of module-definition?))
(body expression?)))
(define-datatype module-definition module-definition?
(a-module-definition
(m-name symbol?)
(expected-iface interface?)
(m-body module-body?))... | null | https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter8/SIMPLEMODULES/syntax.rkt | racket | Syntax
(named-type (name symbol?))
(qualified-type
(m-name symbol?)
(t-name symbol?))
(named-type (name) (symbol->string name))
(qualified-type (m-name t-name) (string-append
"from "
(symbol->string m-name)
" take "
... | #lang eopl
(provide (all-defined-out))
(define-datatype program program?
(a-program
(m-defs (list-of module-definition?))
(body expression?)))
(define-datatype module-definition module-definition?
(a-module-definition
(m-name symbol?)
(expected-iface interface?)
(m-body module-body?)))
(define-... |
9308b8205bf2a7323575afc03e02c865849e02a3d5c7f66472432f37d1885476 | amnh/PCG | Memoized.hs | -----------------------------------------------------------------------------
-- |
-- Module : Bio.TCM.Memoized
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
------------------------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/tcm/src/Data/TCM/Memoized.hs | haskell | ---------------------------------------------------------------------------
|
Module : Bio.TCM.Memoized
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
|
generating function for unamb... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
module Data.TCM.Memoized
( FFI.CBufferUnit
, FFI.CDynamicChar
, FFI.ForeignVoid
, FFI.MemoizedCostMatrix
, generateMemoizedTransitionCostMatrix
, FFI.getMedianAndCost2D
, FFI.getMedianAndCost3D
) where
import qualified Data.TCM.Memoized.FFI as FFI
... |
087295e4729850645449f42532daad905de39db60559c6cbfb676bed36140afd | commonqt/commonqt | classes.lisp | ;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
Copyright ( c ) 2009 . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must ret... | null | https://raw.githubusercontent.com/commonqt/commonqt/dffff3ee3dbd0686c85c323f579b8bbf4881e60e/classes.lisp | lisp | -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the ... |
Copyright ( c ) 2009 . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :qt)
(defclass abstract-qobject ()
((class :initarg :class
:accessor qobject-class)))
(defclass null-qo... |
978be6b2dd3fafee8a5885602a7bb959001bed1fdc88b677071594a8efbf527e | johnelse/ocaml-irc-client | irc_client_tls.ml | module Io_tls = struct
type 'a t = 'a Lwt.t
let (>>=) = Lwt.bind
let (>|=) = Lwt.(>|=)
let return = Lwt.return
type file_descr = {
ic: Tls_lwt.ic;
oc: Tls_lwt.oc;
}
type inet_addr = string
type config = Tls.Config.client
let default_config : Tls.Config.client =
Tls.Config.client ~authe... | null | https://raw.githubusercontent.com/johnelse/ocaml-irc-client/d3a4b6ccd47708ce633bbede3099718f84227723/src/tls/irc_client_tls.ml | ocaml | module Io_tls = struct
type 'a t = 'a Lwt.t
let (>>=) = Lwt.bind
let (>|=) = Lwt.(>|=)
let return = Lwt.return
type file_descr = {
ic: Tls_lwt.ic;
oc: Tls_lwt.oc;
}
type inet_addr = string
type config = Tls.Config.client
let default_config : Tls.Config.client =
Tls.Config.client ~authe... | |
8b73235aba2b8ecc4b9ac1a26c24c3ad7ec70439bb153098fc9d3be1aa817e62 | opencog/pln | preproof-expander-is-preproof.scm | 3 . If and - BIT A expands into and - BIT B that is a preproof of target T ,
;; then A is a preproof of T as well.
;;
ImplicationScope < 1 1 >
VariableList
;; TypedVariable
;; Variable "$A"
Type " BindLink "
;; TypedVariable
;; Variable "$B"
Type " BindLink "
;; TypedV... | null | https://raw.githubusercontent.com/opencog/pln/ea6c9bbe47cb315aded20db0fa765c3a9de82461/examples/pln/inference-control-meta-learning/preproof-expander-is-preproof.scm | scheme | then A is a preproof of T as well.
TypedVariable
Variable "$A"
TypedVariable
Variable "$B"
TypedVariable
Variable "$R"
Variable "$L"
Variable "$T"
And
Execution
List
Variable "$A"
Variable "$L"
Variable "$R"
Variable "$B... | 3 . If and - BIT A expands into and - BIT B that is a preproof of target T ,
ImplicationScope < 1 1 >
VariableList
Type " BindLink "
Type " BindLink "
Type " BindLink "
Schema " URE : BC : expand - and - BIT "
Predicate " URE : BC : preproof "
Predicate " URE : BC :... |
17a7132fcd00cfb60ccbb93b939938c5da9cb31ea70974aea4cabd5da6455116 | FestCat/festival-ca | upc_ca_generic_duration.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/FestCat/festival-ca/f6b2d9bf4fc4f77b80890ebb95770075ad36ccaf/festival/lib/upc_catalan/upc_ca_generic_duration.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
(define (upc_ca_generic::select_duration)
"(upc_ca_generic::select_duration)
Set up duration model."
(upc_ca_generic::select_duration_dialect "central")
)
(define (upc_ca_generic::select_duration_dialect dialect)
"(upc_ca_generic::select_duration_dialect)
Set up duration model."
(cond
( (string-equal d... |
c64edb4688f919e525f5dfe39fb36458fc47eb560c6b2d3e591a430240de7bef | janestreet/sexp_pretty | test_comments.ml | * We have two kinds of tests :
1 . Handwritten tests showing the pretty strings for some known examples .
2 . Quickcheck tests which round - trip a sexp through pretty - printing and assert that
the comments are preserved up to some post - processing of whitespace .
The post - processing is a... | null | https://raw.githubusercontent.com/janestreet/sexp_pretty/a05205a42874cc0e86009f764b531dd533f7ad7b/test/test_comments.ml | ocaml | multiple internal whitespace
multiple lines
really long comment
comments nested in sexp comment
quoted newline
Doesn't strip sexp comments. Our comparison is on the [Plain_comment _] values,
including those nested inside sexp comments.
[Pretty_print] preserves non-whitespace characters
[Conservative_p... | * We have two kinds of tests :
1 . Handwritten tests showing the pretty strings for some known examples .
2 . Quickcheck tests which round - trip a sexp through pretty - printing and assert that
the comments are preserved up to some post - processing of whitespace .
The post - processing is a... |
3b10c0109663536c43b4df58d3028b5345f48fc8ce6068a08c2833564dc7651f | atgreen/lisp-openshift | compat.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistrib... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/hunchentoot-1.2.3/compat.lisp | lisp | Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... |
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :hunchentoot)
(defmacro when-let ((var form) &body body)
"Evaluates FORM and binds VAR to the resu... |
8c74cf6333ac9417a84b4fb8a22e233a457977d9dee64755cb9c3b562b03e20f | hopv/MoCHi | color.mli |
type color =
| Default
| Bright
| Dim
| Underscore
| Blink
| Reverse
| Hidden
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
| BG_Black
| BG_Red
| BG_Green
| BG_Yellow
| BG_Blue
| BG_Magenta
| BG_Cyan
| BG_White
val init : unit -> unit
val set : Format.for... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/color.mli | ocaml | * Partial application does not work correctly
* Partial application does not work correctly |
type color =
| Default
| Bright
| Dim
| Underscore
| Blink
| Reverse
| Hidden
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
| BG_Black
| BG_Red
| BG_Green
| BG_Yellow
| BG_Blue
| BG_Magenta
| BG_Cyan
| BG_White
val init : unit -> unit
val set : Format.for... |
0da9b113555f72c7b31235603b224ec60fa9ff8c605dbd686bd6bc3cd2a3b54a | nasa/Common-Metadata-Repository | request.clj | (ns cmr.ous.util.http.request
(:require
[cmr.http.kit.request :as request]
[cmr.ous.components.config :as config]
[cmr.ous.const :as const]
[taoensso.timbre :as log])
(:refer-clojure :exclude [get]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Header Support ;;... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/3215ee6945cb1fa82499c3c3d74841c3284eec6e/other/cmr-exchange/ous-plugin/src/cmr/ous/util/http/request.clj | clojure |
Header Support ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Accept Header/Version Support ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| (ns cmr.ous.util.http.request
(:require
[cmr.http.kit.request :as request]
[cmr.ous.components.config :as config]
[cmr.ous.const :as const]
[taoensso.timbre :as log])
(:refer-clojure :exclude [get]))
(def version-format "application/vnd.%s%s+%s")
(defn add-user-agent
([]
(add-user-agent {}))
(... |
1a3fe81bd7b8a03d9277c2c01d19440afbed9aa27657704f6a41015eb5945cc8 | cryptosense/pkcs11 | p11_gcm_params.ml | type t =
{ iv : P11_hex_data.t
; aad : P11_hex_data.t
; tag_bits : P11_ulong.t }
[@@deriving eq, ord, make, show, yojson]
let iv x = x.iv
let aad x = x.aad
let tag_bits x = x.tag_bits
| null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_gcm_params.ml | ocaml | type t =
{ iv : P11_hex_data.t
; aad : P11_hex_data.t
; tag_bits : P11_ulong.t }
[@@deriving eq, ord, make, show, yojson]
let iv x = x.iv
let aad x = x.aad
let tag_bits x = x.tag_bits
| |
202942d328cfac8c9717f87c6973ac6c005b4aa1a203fbe8e0f59c296ee39638 | mzp/coq-ide-for-ios | indrec.ml | (************************************************************************)
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/pretyping/indrec.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file builds various inductive ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : indrec.ml 13323 201... |
4493d2b6fb60a9e4717bbb5757eb6095c529f74467b1df0d238329b6eae8f67c | zotonic/cowmachine | erlmarkdown.erl | -*- mode : Erlang ; fill - column : 80 ; comment - column : 75 ; -*-
Copyright , LLC . All Rights Reserved .
%%%
This file is provided to you under the Apache License ,
%%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%%% a copy of the License... | null | https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/markdown_middleware/src/erlmarkdown.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-------------------------------... | -*- mode : Erlang ; fill - column : 80 ; comment - column : 75 ; -*-
Copyright , LLC . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOU... |
e33a93786558b1a35d842b87fd48ba3d2b9bbfaa7f7618fb380f9afa6421dc9c | modular-macros/ocaml-macros | tast_iter.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/tools/tast_iter.ml | ocaml | *********************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Typedtree
let opt f = function Non... |
0201e22689c45d3e434e8d897ffb72fbb3bc9f8b84ebff8973284d1721b52c82 | nikodemus/SBCL | sysmacs.lisp | ;;;; miscellaneous system hacking macros
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain ... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/sysmacs.lisp | lisp | miscellaneous system hacking macros
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
these are initialized in cold init
When the dynamic usage increases beyond this amount, the system
notes... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
(defvar *in-without-gcing*)
(defvar *gc-inhibit*)
(defvar *gc-pending*)
#!+sb-thread
(defvar *stop... |
42daa635dd354fa6cfb47ba21bd5674775825bdbd9af2e3a462ce03f84756e34 | nasa/Common-Metadata-Repository | config.clj | (ns cmr.opendap.components.config
(:require
[cmr.authz.components.config :as authz-config]
[cmr.exchange.common.components.config :as config]
[cmr.http.kit.components.config :as httpd-config]
[cmr.metadata.proxy.components.config :as metadata-config]
[cmr.opendap.config :as config-lib]
[cmr.ous.comp... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/service-bridge/src/cmr/opendap/components/config.clj | clojure |
Utility Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Config Component API ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From the common config component
From the authz config component
From the metadata proxy config component
Component Lifecycle Implementation ;;;;;;;;;;;;;;;;... | (ns cmr.opendap.components.config
(:require
[cmr.authz.components.config :as authz-config]
[cmr.exchange.common.components.config :as config]
[cmr.http.kit.components.config :as httpd-config]
[cmr.metadata.proxy.components.config :as metadata-config]
[cmr.opendap.config :as config-lib]
[cmr.ous.comp... |
0b86f9dfad13880eb8b99ec0183b12598fc9581d108d3701f37b329f8e336503 | fendor/hsimport | ModuleTest36.hs | {-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
f :: Int -> Int
^ Some doc
One line more
f = (+ 3)
g :: Int -> Int
g =
where
| null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/inputFiles/ModuleTest36.hs | haskell | # Language PatternGuards # | module Blub
( blub
, foo
, bar
) where
f :: Int -> Int
^ Some doc
One line more
f = (+ 3)
g :: Int -> Int
g =
where
|
f51b6b65a323e2f982adff6fbbf1ccccd426bb35d3f41afa748f2c375b3e9aae | binsec/haunted | libcall_stubs.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/libcall_stubs/libcall_stubs.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
813a99d16b7ac694d196b17e8d8521d4a0c5d60ef24bd38ec3479bd15ec93f29 | c089/haskell-craft3e | Index.hs | -----------------------------------------------------------------------
--
Haskell : The Craft of Functional Programming , 3e
( c ) Addison - Wesley , 1996 - 2011 .
--
-- Index
--
-----------------------------------------------------------------------
module Index where
import Chapter11 ((>.>))
import ... | null | https://raw.githubusercontent.com/c089/haskell-craft3e/869e382601cab50559c4473dfa9c7480f1acba58/Index.hs | haskell | ---------------------------------------------------------------------
Index
---------------------------------------------------------------------
Example: creating an index
^^^^^^^^^^^^^^^^^^^^^^^^^^
The basic type symonyms
The type of the top-level function
The top-level definition
Doc -> [Lin... | Haskell : The Craft of Functional Programming , 3e
( c ) Addison - Wesley , 1996 - 2011 .
module Index where
import Chapter11 ((>.>))
import qualified Chapter7
type Doc = String
type Line = String
type Word = String
makeIndex :: Doc -> [ ([Int],Word) ]
makeIndex
numLines :: [Line] -> [ ( In... |
e5e0e6f073f6a04e7067597f996680660144ed836d774dd4f18cfcd6be7fbebf | ragkousism/Guix-on-Hurd | vpn.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2017 < >
Copyright © 2017 Clément < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundati... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/services/vpn.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2017 < >
Copyright © 2017 Clément < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu services vpn)
#:use-module (gnu services)
#:use-module (g... |
7d9b38cbf509c327cbeaf12a9159bc0d6992d0cfb80225a8d6d9af83b8e436ed | bobzhang/fan | gram_def.ml | open Astf
type name = {
id: vid;
tvar: string;
loc: loc;}
type styp =
[ vid' | `App of (loc* styp* styp)
| `Quote of (loc* position_flag* alident) | `Self of loc
| `Type of ctyp ]
type entry = {
name: name;
pos: exp option;
local: bool;
level: level;}
and level = {
assoc: exp option;
rules: r... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/gram_def.ml | ocaml | open Astf
type name = {
id: vid;
tvar: string;
loc: loc;}
type styp =
[ vid' | `App of (loc* styp* styp)
| `Quote of (loc* position_flag* alident) | `Self of loc
| `Type of ctyp ]
type entry = {
name: name;
pos: exp option;
local: bool;
level: level;}
and level = {
assoc: exp option;
rules: r... | |
54117d0962e8d81a4f424866e039d8fa9afa0aefd90f26df3145c200ccb37f86 | cedlemo/OCaml-GI-ctypes-bindings-generator | Scanner_config.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Scanner_config"
let f_cset_skip_characters = field t_typ "cset_skip_characters" (string)
let f_cset_identifier_first = field t_typ "cset_identifier_first" (string)
let f_cset_identifier_nth = field t_typ "cset_identifier_nth" (string)
let f_cpai... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/GLib/Scanner_config.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Scanner_config"
let f_cset_skip_characters = field t_typ "cset_skip_characters" (string)
let f_cset_identifier_first = field t_typ "cset_identifier_first" (string)
let f_cset_identifier_nth = field t_typ "cset_identifier_nth" (string)
let f_cpai... | |
98033959cb8460556066c0a792511f9d26e9d1ce7c2994db15734fc62cc0469d | awslabs/s2n-bignum | edwards25519_epdouble_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/6c0e0852ab8c6577a92377d6836f8bfcb41f300d/arm/proofs/edwards25519_epdouble_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/curve25519/edwards25519_epdouble_alt.o";;
***
arm_MOV X19 X1
arm_ADDS X0 X0 X4
arm_ADDS X9 X9 X9
arm_ADCS X11 X11 X11
arm_ADCS... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Extended projective doubling for .
n... |
a14cce217ee59b07815da322e7b016c069d0aba82bf5318cb3bc9166d458ed27 | graninas/The-Amoeba-World | WorldArfData.hs | module Test.Utils.WorldArfData where
import GameLogic.Language.RawToken
import qualified GameLogic.Language.Scheme as S
-- 'ARF' stands for 'Amoeba Raw File' or 'Amoeba Raw Format' if you wish.
items1 = ("Items1", "./Data/Raws/Items.arf",
Right [ CommentToken " General items", EmptyToken
, It... | null | https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/Test/Utils/WorldArfData.hs | haskell | 'ARF' stands for 'Amoeba Raw File' or 'Amoeba Raw Format' if you wish. | module Test.Utils.WorldArfData where
import GameLogic.Language.RawToken
import qualified GameLogic.Language.Scheme as S
items1 = ("Items1", "./Data/Raws/Items.arf",
Right [ CommentToken " General items", EmptyToken
, ItemToken S.karyon [ IntResourceProperty S.lifebound (0,5000)
... |
03d418e3397e0ccfc1c7283a7ab6ab2d782c73168f56682fc4e0cadec931c9e3 | fulcrologic/semantic-ui-wrapper | icon.cljs | (ns fulcrologic.semantic-ui.workspaces.icon
(:require [com.fulcrologic.fulcro.components :as fp]
[com.fulcrologic.fulcro.dom :as dom]
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[com.fulcrologic.semantic-ui.elements.icon.ui-icon ... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/workspaces/fulcrologic/semantic_ui/workspaces/icon.cljs | clojure | (ns fulcrologic.semantic-ui.workspaces.icon
(:require [com.fulcrologic.fulcro.components :as fp]
[com.fulcrologic.fulcro.dom :as dom]
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[com.fulcrologic.semantic-ui.elements.icon.ui-icon ... | |
2ad3fc155ca7b3a9656ca6c9478f3f3e07f8c83831c4c7ab52a320458bc5847d | alexandroid000/improv | SetCameraInfoResponse.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Sensor_msgs.SetCameraInfoResponse where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Interna... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Sensor_msgs/Ros/Sensor_msgs/SetCameraInfoResponse.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Sensor_msgs.SetCameraInfoResponse where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generi... |
8e3de4fce41ecef277b85b7dbef8d959ad2459298c178f11d242369657260680 | Octachron/codept | NAME__b.ml | open Main
module C = C
module M = struct end
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/namespaced/NAME__b.ml | ocaml | open Main
module C = C
module M = struct end
| |
40eb861c69e1cb0f950b31a273d8ac8dbbcde853416707c7bf3bc5b7f5ee0394 | sanette/oplot | points.ml | module Point2 = struct
type t = { x : float; y : float }
end
module Point3 = struct
type t = { x : float; y : float; z : float }
end
type point = Point2.t
type point3 = Point3.t
| null | https://raw.githubusercontent.com/sanette/oplot/5473fd2683109acd6e80c51aa966677db4d13379/lib/points.ml | ocaml | module Point2 = struct
type t = { x : float; y : float }
end
module Point3 = struct
type t = { x : float; y : float; z : float }
end
type point = Point2.t
type point3 = Point3.t
| |
c00f698ec06bd4c4778144aeefdf4f8449ae883a399ff192800f9f91d6933238 | Mattiemus/LaneWars | Towers.hs | {-# LANGUAGE Arrows #-}
module Game.Server.Objects.Towers where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Safe
import IdentityList
import Network.Socket
import Data.Maybe
import Numeric.IEEE
import Game.Shared.Types
import Game.Shared.Networking
import Game.Shared.Arrows
import Gam... | null | https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Game/Server/Objects/Towers.hs | haskell | # LANGUAGE Arrows #
|Game object for a turret. Fires projectiles and enemy minions and players
^Position of the turret
^Lane the turret belongs to
^Team the turret belongs too
Components
Object representation
Components
Return object state
|Projectile fired from a turret
^Initial position of the projectile
^... |
module Game.Server.Objects.Towers where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Safe
import IdentityList
import Network.Socket
import Data.Maybe
import Numeric.IEEE
import Game.Shared.Types
import Game.Shared.Networking
import Game.Shared.Arrows
import Game.Shared.Object
import G... |
0abdfb812e06c106b3afb59d1e403fedab86950cf59f434ad1b4c25d78150554 | let-def/menhir | IO.mli | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/IO.mli | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
8e62c23b98cf09c7b93fb2c002f4204aef83654e5c41610609bc7f2ed7b884cf | lexi-lambda/megaparsack | info.rkt | #lang info
(define scribblings
'(["megaparsack.scrbl" (multi-page) (parsing-library)]))
| null | https://raw.githubusercontent.com/lexi-lambda/megaparsack/45168f1833ff9002016c3a3234e90315015c0cee/megaparsack-doc/scribblings/info.rkt | racket | #lang info
(define scribblings
'(["megaparsack.scrbl" (multi-page) (parsing-library)]))
| |
b1fcd05e8f768f1660d823bde58eb1925be22ef0cddb8006ea0285f9c465a0de | bravit/hid-examples | filecount.hs | import Data.Foldable (traverse_)
import System.Environment (getArgs)
import System.Directory.Extra (doesDirectoryExist, listContents)
import Control.Monad.Extra (whenM, ifM, zipWithM_)
import Data.IORef (newIORef, modifyIORef', readIORef)
fileCount :: FilePath -> IO Int
fileCount fpath = do
counter <- newIORef 0
... | null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch05/filecount.hs | haskell | fileCount' :: FilePath -> IO Int
fileCount' fp = length <$> listFilesRecursive fp | import Data.Foldable (traverse_)
import System.Environment (getArgs)
import System.Directory.Extra (doesDirectoryExist, listContents)
import Control.Monad.Extra (whenM, ifM, zipWithM_)
import Data.IORef (newIORef, modifyIORef', readIORef)
fileCount :: FilePath -> IO Int
fileCount fpath = do
counter <- newIORef 0
... |
11cd6b3c24032691d5e42cda1ef7102367445d2c642a3caab503e5b7dd9bff19 | DestyNova/advent_of_code_2021 | Part1.hs | module Main where
import Data.List (transpose)
main = do
txt <- readFile "input.txt"
let gamma = calc $ lines txt
print gamma
calc xs = gamma * epsilon
where counts = map calcColumn (transpose xs)
gamma = fromBinary maxes
epsilon = fromBinary mins
maxes = map (\(o,z) -> if o > z then ... | null | https://raw.githubusercontent.com/DestyNova/advent_of_code_2021/db924bcf3af2c5027b20be525099247cdbbd0e3b/day3/Part1.hs | haskell | module Main where
import Data.List (transpose)
main = do
txt <- readFile "input.txt"
let gamma = calc $ lines txt
print gamma
calc xs = gamma * epsilon
where counts = map calcColumn (transpose xs)
gamma = fromBinary maxes
epsilon = fromBinary mins
maxes = map (\(o,z) -> if o > z then ... | |
686f43cbc8cf030c2a70603a61fe39b97082502d696a253526ee9daa40683edd | google/codeworld | source.hs |
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/missingBracketLastLine/source.hs | haskell |
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to ... | |
7d53f1d5819c564bfb57c6835daaeb1ece64bebbd67eb787547810eb736a6658 | imrehg/ypsilon | enums.scm | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core enums)
(export make-enumeration
enum-set?
enum-set-universe
enum-set-indexer
enum-set-constructor
... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/stdlib/core/enums.scm | scheme | [end] | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core enums)
(export make-enumeration
enum-set?
enum-set-universe
enum-set-indexer
enum-set-constructor
... |
1c611d1e1b03c1385716c5822f9c468cac004ffcab13ba9747cd468539c9510f | kevinchevalier/kemulator | NES.hs | module NES
where
import DataTypes
import Memory
import Control.Monad.State
import PPU
import CPU6502
import Controller
initNES :: Cartridge -> NESStatus
initNES cart = NESStatus { cartridge = cart, cpu=startCPU, memoryManager=startMemory, ppu=startPPU, controller=startController }
startNES :: Operation ()
startNES... | null | https://raw.githubusercontent.com/kevinchevalier/kemulator/f8bbaad5105f89006fbed8fe58a193fb5bfced8d/NES.hs | haskell | module NES
where
import DataTypes
import Memory
import Control.Monad.State
import PPU
import CPU6502
import Controller
initNES :: Cartridge -> NESStatus
initNES cart = NESStatus { cartridge = cart, cpu=startCPU, memoryManager=startMemory, ppu=startPPU, controller=startController }
startNES :: Operation ()
startNES... | |
7c435388fa27b7f8ba6cdb573713fe64291073ce0eb3443620a25585ebfb1a11 | AndrasKovacs/sett | Values.hs |
module Values where
import Common
import GHC.Exts
--------------------------------------------------------------------------------
-- | Annotation on bound variables which is only used during partial
-- substitution. If a variable is in the domain of a partial substitution,
-- that means that it has been alread... | null | https://raw.githubusercontent.com/AndrasKovacs/sett/1458b1e44307d89c91c13426f9f565479c7041e3/src/Values.hs | haskell | ------------------------------------------------------------------------------
| Annotation on bound variables which is only used during partial
substitution. If a variable is in the domain of a partial substitution,
that means that it has been already substituted.
axioms
blocking on meta
coe rigidly blocked ... |
module Values where
import Common
import GHC.Exts
type InPSubDomain = Bool
data RigidHead
= RHLocalVar Lvl InPSubDomain
| RHPostulate Lvl
| RHExfalso Val Val
rigid neutral coe
| RHRefl Val Val
| RHSym Val Val Val Val
| RHTrans Val Val Val Val Val Val
| RHAp Val Val Val Val Val Val
deriving Show
... |
f443bcbd7bf04312581a2fb506c0489405c58dc589539451342df241e43021f1 | sveri/closp-crud | project.clj | (defproject de.sveri/closp-crud "0.4.0-Snapshot"
:description "CRUD plugin for closp"
:url "-crud"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha3"]
[clj-liquibase "0.6.0"]
[clj-jdbcutil "0.1.0"]
... | null | https://raw.githubusercontent.com/sveri/closp-crud/92890f778f22005a8e5cee1b966bc157ed8b396c/project.clj | clojure | MySQL
PostgreSQL
H2 | (defproject de.sveri/closp-crud "0.4.0-Snapshot"
:description "CRUD plugin for closp"
:url "-crud"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha3"]
[clj-liquibase "0.6.0"]
[clj-jdbcutil "0.1.0"]
... |
65e2eb6769319546a89eb457ad4100031c89127a815a98a2c0b52cd40b7cc436 | nunchaku-inria/nunchaku | ElimCopy.mli |
(* This file is free software, part of nunchaku. See file "license" for more details. *)
(** {1 Eliminate Copy Types} *)
open Nunchaku_core
val name : string
type term = Term.t
type ty = term
type decode_state
val elim :
(term, term) Problem.t ->
(term, term) Problem.t * decode_state
val pipe :
print:bool... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/transformations/ElimCopy.mli | ocaml | This file is free software, part of nunchaku. See file "license" for more details.
* {1 Eliminate Copy Types} |
open Nunchaku_core
val name : string
type term = Term.t
type ty = term
type decode_state
val elim :
(term, term) Problem.t ->
(term, term) Problem.t * decode_state
val pipe :
print:bool ->
check:bool ->
((term, ty) Problem.t,
(term, ty) Problem.t,
(term, ty) Problem.Res.t,
(term, ty) Problem.... |
6b9f10cbbe733bff9323d6ced52f718f7853490a0941f1610e3328f03217152c | PacktWorkshops/The-Clojure-Workshop | exercise_4_12.clj | (ns packt-clj.chapter-4-tests.exercise-4-12
(:require
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[semantic-csv.core :as sc]))
(defn first-match [csv]
(with-open [r (io/reader csv)]
(->> (csv/read-csv r)
sc/mappify
first)))
(defn five-matches [csv]
(with-open [r (io/reader... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter04/tests/packt-clj.chapter-4-tests/src/packt_clj/chapter_4_tests/exercise_4_12.clj | clojure | (ns packt-clj.chapter-4-tests.exercise-4-12
(:require
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[semantic-csv.core :as sc]))
(defn first-match [csv]
(with-open [r (io/reader csv)]
(->> (csv/read-csv r)
sc/mappify
first)))
(defn five-matches [csv]
(with-open [r (io/reader... | |
95884137a955e7e678be65ba8fe739db8949d648a060ec12188a121acaa1a9b4 | qkrgud55/ocamlmulti | queue.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cris... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib/queue.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : queue.ml 12163 2012 - 02 - 18 09:... |
5c538d390023af02ef9cc7acb24ec4e4e16b66f33aeb1ce0e84593d0f8a9a1f2 | rlepigre/pml | eq.ml | type ('a, 'b) t =
| Eq : ('a, 'a) t
| NEq : ('a, 'b) t
type ('a, 'b) eq = ('a, 'b) t
let (&&&) : type a b c d. (a, b) eq -> (c, d) eq -> (a -> c, b -> d) eq =
fun x y -> match (x, y) with (Eq, Eq) -> Eq | _ -> NEq
| null | https://raw.githubusercontent.com/rlepigre/pml/cdfdea0eecc6767b16edc6a7bef917bc9dd746ed/src/util/eq.ml | ocaml | type ('a, 'b) t =
| Eq : ('a, 'a) t
| NEq : ('a, 'b) t
type ('a, 'b) eq = ('a, 'b) t
let (&&&) : type a b c d. (a, b) eq -> (c, d) eq -> (a -> c, b -> d) eq =
fun x y -> match (x, y) with (Eq, Eq) -> Eq | _ -> NEq
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.