_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 |
|---|---|---|---|---|---|---|---|---|
ed8a31562d731659837c44600dc4fa83937473a2d4553e156b7ac599d6d943b7 | dyne/FXC | random.clj | Freecoin - digital social currency toolkit
part of Decentralized Citizen Engagement Technologies ( D - CENT )
R&D funded by the European Commission ( FP7 / CAPS 610349 )
Copyright ( C ) 2015 Dyne.org foundation
Copyright ( C ) 2015 Thoughtworks , Inc.
designed , written and maintained by
< >
< ... | null | https://raw.githubusercontent.com/dyne/FXC/b8483f1c833fb0fd779882b821699246e2289e66/src/fxc/random.clj | clojure | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General P... | Freecoin - digital social currency toolkit
part of Decentralized Citizen Engagement Technologies ( D - CENT )
R&D funded by the European Commission ( FP7 / CAPS 610349 )
Copyright ( C ) 2015 Dyne.org foundation
Copyright ( C ) 2015 Thoughtworks , Inc.
designed , written and maintained by
< >
< ... |
5104add0f7bc05fec74efeff589994d17827ddb2ee7dc58aa92bcb47ac246287 | utdemir/distributed-dataset | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StaticPointers #
# LANGUAGE TupleSections #
This application will process every public GitHub event occured in 2019 to get
the top 20 users who used the word " cabal " in their commit messages the most .
This will download and process around 126 GB of compressed , 9... | null | https://raw.githubusercontent.com/utdemir/distributed-dataset/a582a96e541884580e66bc5d87b4d498c8d58182/examples/gh/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Extract every commit
Filter commits containing the word 'cabal'
Count the authors
Print them | # LANGUAGE StaticPointers #
# LANGUAGE TupleSections #
This application will process every public GitHub event occured in 2019 to get
the top 20 users who used the word " cabal " in their commit messages the most .
This will download and process around 126 GB of compressed , 909 GB uncompressed
data ; and it ... |
d41a692a38d55218e0840141542ce7c9977a1112e2bdc35b3f7d4b5aa935ff7f | sonowz/advent-of-code-haskell | Graph.hs | -- This code is from the fork of 'algebraic-graphs':
--
module Lib.Graph where
import Relude hiding (one)
import Algebra.Graph.Label
import Data.Map.Strict (Map, (!))
import Algebra.Graph.Labelled.AdjacencyMap
import qualified Data.Set as Set
import qualified Data.Map.Strict as Map
-- TODO: Improve documentation fo... | null | https://raw.githubusercontent.com/sonowz/advent-of-code-haskell/2fd0bb8a5c094a8ad41b8d2aa49fdf6e8fd12551/src/Lib/Graph.hs | haskell | This code is from the fork of 'algebraic-graphs':
TODO: Improve documentation for 'dijkstra'.
based on the 'Dioid'.
If '<+>' acts like a 'min' then we use a Min Heap else we use a
The algorithm is best suited to work with the 'Optimum' data type.
If the edge type is 'Distance' 'Int':
@
'<+>' == 'mi... | module Lib.Graph where
import Relude hiding (one)
import Algebra.Graph.Label
import Data.Map.Strict (Map, (!))
import Algebra.Graph.Labelled.AdjacencyMap
import qualified Data.Set as Set
import qualified Data.Map.Strict as Map
| A generic Dijkstra algorithm that relaxes the list of edges
The heap ( min vs ) for... |
4c049e56e9a873cab26bf9b58ae6b24ab38295f6ff636284b1006df0980b782f | jiangpengnju/htdp2e | ex72.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex72) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/adding-structure/ex72.rkt | racket | about the language level of this file in a form that our tools can easily process.
that accommodates the given examples.
A:
A Phone is a structure: (make-phone Number Number)
interpretation: a phone's area code, and its number
definition:
represent the phone with respect to the neighborhood.
A Phone# is a str... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex72) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Formulates a data definition for the above phone structure type d... |
991ac7a93cf34204987894bafb9af11d9303b9e57672ffd6634cc6a9dc7be83f | ArulselvanMadhavan/haskell-first-principles | ListyInstances.hs | module ListyInstances where
import Data.Monoid
import Listy
instance Monoid (Listy a) where
mempty = Listy []
mappend (Listy l) (Listy l') =
Listy $ mappend l l'
| null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/orphan-instance/ListyInstances.hs | haskell | module ListyInstances where
import Data.Monoid
import Listy
instance Monoid (Listy a) where
mempty = Listy []
mappend (Listy l) (Listy l') =
Listy $ mappend l l'
| |
b48d15032079287a8216bb7aac74a9f6c41e64525fa41a7b140c0c70e92b8d4f | theodormoroianu/SecondYearCourses | HaskellChurchMonad_20210415122853.hs | module HaskellChurchMonad where
A boolean is any way to choose between two alternatives
newtype CBool t = CBool {cIf :: t -> t -> t}
An instance to show as regular Booleans
instance Show (CBool Bool) where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurchMonad_20210415122853.hs | haskell | The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply it on them.
A natural nu... | module HaskellChurchMonad where
A boolean is any way to choose between two alternatives
newtype CBool t = CBool {cIf :: t -> t -> t}
An instance to show as regular Booleans
instance Show (CBool Bool) where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue ... |
204cc5d84c6eeea403d04ec3ade5645c52c8c90f4830319152a164b20b9731c7 | nyu-acsys/drift | up_down02.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c5_COEFFICIENT_1082 = 0
let rec c4_COEFFICIENT_1081 = 0
let rec c3_COEFFICIENT_1080 = 0
let rec c2_COEFFICIENT_1078 = 0
let rec c1_COEFFICIENT_1077 = 0
let rec c0_COEFFICIENT_1076 = 0
let rec app_1030 x_DO_NOT_CARE_1212 x_DO_NOT_CARE_1213 ... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/up_down02.ml | ocaml | -:{v:Int | true}
-:{v:Int | true} |
let rec bot _ = bot ()
let fail _ = assert false
let rec c5_COEFFICIENT_1082 = 0
let rec c4_COEFFICIENT_1081 = 0
let rec c3_COEFFICIENT_1080 = 0
let rec c2_COEFFICIENT_1078 = 0
let rec c1_COEFFICIENT_1077 = 0
let rec c0_COEFFICIENT_1076 = 0
let rec app_1030 x_DO_NOT_CARE_1212 x_DO_NOT_CARE_1213 ... |
5b109bf6094f090914aff53bc9695a4fe3599064d49c7a1c4bfb144145503554 | janestreet/bignum | test_sexp_grammar.ml | open! Core
module type For_quickcheck = sig
type t [@@deriving quickcheck]
end
module type For_sexp = sig
type t [@@deriving sexp, sexp_grammar]
end
let runtest
(type t)
(module Q : For_quickcheck with type t = t)
(module S : For_sexp with type t = t)
=
let module M = struct
include Q
... | null | https://raw.githubusercontent.com/janestreet/bignum/c4153f59d011a1cde0010b749a92c7d22a72cdb6/test/src/test_sexp_grammar.ml | ocaml | open! Core
module type For_quickcheck = sig
type t [@@deriving quickcheck]
end
module type For_sexp = sig
type t [@@deriving sexp, sexp_grammar]
end
let runtest
(type t)
(module Q : For_quickcheck with type t = t)
(module S : For_sexp with type t = t)
=
let module M = struct
include Q
... | |
014ff7c7e7f25b5cf0dc19b0a2f3a5f7329003e571dd1a4f0d90afc5c8112ced | iconnect/regex | Sequence.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - duplicate - exports #
# LANGUAGE CPP ... | null | https://raw.githubusercontent.com/iconnect/regex/68752790a8f75986b917b71cf0e8e22cd3a28a3d/Text/RE/PCRE/Sequence.hs | haskell | * Tutorial
$tutorial
* The 'Matches' and 'Match' Operators
* The 'SearchReplace' Operators
* The 'Matches' Type
* The 'Match' Type
$macros
* The 'RE' Type
* Options
$options
* Compiling and Escaping REs
* The re Quasi Quoters
$re
$ed
* IsRegex
| find all the matches in the argument text; e.g., to count ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - duplicate - exports #
# LANGUAGE CPP ... |
53becf58cd9a8ebb04df792b9b5bcf649a678bde777d0437aa21a916b406dcef | exercism/haskell | Strain.hs | module Strain (keep, discard) where
keep, discard :: (a -> Bool) -> [a] -> [a]
keep p = keep' []
where keep' acc [] = reverse acc
keep' acc (x:xs) = keep' (if p x then x:acc else acc) xs
discard = keep . (not .)
| null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/strain/.meta/examples/fail-reverse/src/Strain.hs | haskell | module Strain (keep, discard) where
keep, discard :: (a -> Bool) -> [a] -> [a]
keep p = keep' []
where keep' acc [] = reverse acc
keep' acc (x:xs) = keep' (if p x then x:acc else acc) xs
discard = keep . (not .)
| |
2fb8242b062b18f7f826ec8ad91b7d952c50ec21bd90c510e1a8811f856a7346 | markcox80/lisp-executable | creation-ecl.lisp | Copyright ( c ) 2011 ,
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;; - Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the fo... | null | https://raw.githubusercontent.com/markcox80/lisp-executable/989b68ed946e1d99e6e65b7383a64ff035e833c7/src/creation-ecl.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in... | Copyright ( c ) 2011 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
#-:ecl (error "S... |
64c39b2b2a4f7c08d08a2467800a6e6eb398cc1793a8005c75c375b36608a5c7 | 2600hz/kazoo | pqc_cb_accounts.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
%%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_accounts.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
was needed to stop overwhelming the socket, at least locally
Make sure everything is clean for the test. | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(pqc_cb_accounts).
-export([create_account/2, create_account/3
,update_account/3
... |
7a6fac8a6baddb24694c850f545b0302a8ac0b903badef4563a0e44aae6a1e07 | igarnier/ocaml-geth | erc20.ml | open Lwt.Infix
open Geth
open Geth_lwt
open Contract
open Compile
(* --------------------------------------------------------------------- *)
(* Some helpful functions *)
(* --------------------------------------------------------------------- *)
Read password from stdin in a stealthy manner
let read_secret () =
... | null | https://raw.githubusercontent.com/igarnier/ocaml-geth/e87ca9f86f79190aff108a14aaae6e925aed5641/examples/solidity/erc20.ml | ocaml | ---------------------------------------------------------------------
Some helpful functions
---------------------------------------------------------------------
Get the contract address on chain
*
* Transfer tokens
*
* Send `value` tokens to `dst` from your account
*
* @param _to The address of... | open Lwt.Infix
open Geth
open Geth_lwt
open Contract
open Compile
Read password from stdin in a stealthy manner
let read_secret () =
let open Unix in
let term_init = tcgetattr stdin in
let term_no_echo = {term_init with c_echo= false} in
tcsetattr stdin TCSADRAIN term_no_echo ;
let password =
try read... |
137396d22207b214aecd2f54a3bc2ec34d9e3d7568fd35d6bf1acdc590763d6d | footprintanalytics/footprint-web | constraints.clj | (ns metabase.query-processor.middleware.constraints
"Middleware that adds default constraints to limit the maximum number of rows returned to queries that specify the
`:add-default-userland-constraints?` `:middleware` option."
(:require [metabase.models.setting :as setting]
[metabase.util.i18n :refer ... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/constraints.clj | clojure | to reference the former constant value have to expect it could return nil instead | (ns metabase.query-processor.middleware.constraints
"Middleware that adds default constraints to limit the maximum number of rows returned to queries that specify the
`:add-default-userland-constraints?` `:middleware` option."
(:require [metabase.models.setting :as setting]
[metabase.util.i18n :refer ... |
fca8e0a21fbce1b0fb50c5b796a731feedc1d7d67d41d36bfb077b5b12ecb71c | LexiFi/dead_code_analyzer | functor.mli | module M: sig
val f: int -> bool
val none: unit -> unit
end
module F(M: sig val f: int -> bool end):sig
val g: int -> bool
end
module N: sig
val g: int -> bool
end
module Unused: Set.S
| null | https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/functor.mli | ocaml | module M: sig
val f: int -> bool
val none: unit -> unit
end
module F(M: sig val f: int -> bool end):sig
val g: int -> bool
end
module N: sig
val g: int -> bool
end
module Unused: Set.S
| |
508af89c5b3a7b759bb16de04e7d0cf6e94901a23530d2120d2d4f1456a92166 | andrewthad/country | Main.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
import Streaming (Stream,Of(..))
import Siphon (Siphon)
import Colonnade (Headed)
import Data.ByteString (ByteString)
import Data.Text (Text)
import System.IO
import Data.Text.Encoding (encodeUtf8,decodeUtf8')
import Data.Char (isAlpha,toLower)
import Data... | null | https://raw.githubusercontent.com/andrewthad/country/19ae5259d2dde5193e09fa4e0a196931ba37ffdd/country-code-generation/app/Main.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
WARNING I'm making this one up
WARNING I'm making this one up
WARNING I'm making this one up
WARNING I'm making this one up
WARNING I'm making this one up
WARNING I'm making this one up
WARNING I'm making this one up
WARNING I'm making this one up
^ file n... |
import Streaming (Stream,Of(..))
import Siphon (Siphon)
import Colonnade (Headed)
import Data.ByteString (ByteString)
import Data.Text (Text)
import System.IO
import Data.Text.Encoding (encodeUtf8,decodeUtf8')
import Data.Char (isAlpha,toLower)
import Data.DisjointSet (DisjointSet)
import Control.Monad.Trans.Class
imp... |
7e92a4367014199d7fe2b0337357953e54683924fa30e01a454d1aa86f6e76f1 | ryanpbrewster/haskell | largest_sub_matrix.hs | -- largest_sub_matrix.hs
- You have a matrix of positive and negative integers . Find a sub - matrix with
- the largest sum of it 's elements . There is no limitation for sub - matrix
- dimensions . It only has to be rectangular .
-
- * Each element in the matrix is in range [ -100 , 100 ] .
-... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/largest_sub_matrix.hs | haskell | largest_sub_matrix.hs |
- You have a matrix of positive and negative integers . Find a sub - matrix with
- the largest sum of it 's elements . There is no limitation for sub - matrix
- dimensions . It only has to be rectangular .
-
- * Each element in the matrix is in range [ -100 , 100 ] .
- * Input matrix has an ... |
33ba03c8117b399ab6a883eac19a30f41922a25ed90e2b6a1a2316d68235e52f | sighingnow/mxnet-haskell | Symbol.hs | -----------------------------------------------------------
-- |
-- module: MXNet.Core.Base.Symbol
copyright : ( c ) 2016 - 2017 He
license : MIT
-- maintainer:
--
-- Symbol module.
--
# OPTIONS_GHC -Wno - missing - methods #
{-# OPTION... | null | https://raw.githubusercontent.com/sighingnow/mxnet-haskell/b8e8c6834519df512533094122ee223fd9fb91d8/mxnet/src/MXNet/Core/Base/Symbol.hs | haskell | ---------------------------------------------------------
|
module: MXNet.Core.Base.Symbol
maintainer:
Symbol module.
# OPTIONS_GHC -Wno-redundant-constraints #
| Type alias for variable.
| Make a new symbolic variable with given name.
^ Name.
^ Result variable.
| Get t... | copyright : ( c ) 2016 - 2017 He
license : MIT
# OPTIONS_GHC -Wno - missing - methods #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE DeriveGeneric #
module MXNet.Core.Base.Symbol where
import Control.Exception (asse... |
b883ef26291523246461758aad520f51194f73e2482c13961e2334caf4fae437 | picty/parsifal | struct-0e.ml | struct s = {
x : uint8;
dump_checkpoint y : debug_dump;
}
| null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/syntax/unit/struct-0e.ml | ocaml | struct s = {
x : uint8;
dump_checkpoint y : debug_dump;
}
| |
5ec100f438bb4f67d097bddbac26862d8e61dddb87f3be34c67aad51b1141e37 | qfpl/reflex-tutorial | Run.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecursiveDo #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
module Ex13.Run (
host
) where
import Reflex.Dom.Core
import qualified Util.Bootstrap as B
import Ex13.Common
host ::
MonadWidget t m =>
Ex13FnGrid m ->
Ex13FnStockWidget t m ->
Ex13FnMkStock... | null | https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex13/Run.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE GADTs # | # LANGUAGE RecursiveDo #
module Ex13.Run (
host
) where
import Reflex.Dom.Core
import qualified Util.Bootstrap as B
import Ex13.Common
host ::
MonadWidget t m =>
Ex13FnGrid m ->
Ex13FnStockWidget t m ->
Ex13FnMkStock t m ->
Ex13FnMain t m ->
m ()
host grid stockWidget mkStock fn = B.panel . divCla... |
a2afc9f9743a7dca41c931f5411f6995c3569d1b66e3dcb4d1e02d9f8d55b813 | diku-dk/futhark | MulticoreISPC.hs | # LANGUAGE QuasiQuotes #
-- | C code generator. This module can convert a correct ImpCode
program to an equivalent ISPC program .
module Futhark.CodeGen.Backends.MulticoreISPC
( compileProg,
GC.CParts (..),
GC.asLibrary,
GC.asExecutable,
GC.asServer,
operations,
ISPCState,
)
where
impor... | null | https://raw.githubusercontent.com/diku-dk/futhark/1fe93634d63df6005116f55f18e8a35b1a11987a/src/Futhark/CodeGen/Backends/MulticoreISPC.hs | haskell | | C code generator. This module can convert a correct ImpCode
external function, returning the name.
| Given a ImpCode function, generate all the required machinery for calling
Get format sting
Get args types and names for shim
Make shim
Call the shim
| Given the name and type of a parameter, return the C type... | # LANGUAGE QuasiQuotes #
program to an equivalent ISPC program .
module Futhark.CodeGen.Backends.MulticoreISPC
( compileProg,
GC.CParts (..),
GC.asLibrary,
GC.asExecutable,
GC.asServer,
operations,
ISPCState,
)
where
import Control.Lens (each, over)
import Control.Monad
import Control.Mo... |
14612e091c2db84b5bc0a79fd8237c6d7a3f287397358a31ceff379b72babb33 | alexandergunnarson/quantum | imputation.cljc | (ns quantum.ai.ml.imputation
"Missing value imputation.
- Missing Completely at Random (MCAR)
- Random (MAR)
- Covariate Dependent (CD)
- Non-Ignorable (NI)
If it is known that the data analysis technique which is to be used isn't
content robust, it is good to consider imputation.
Imputation is ... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/ai/ml/imputation.cljc | clojure | (ns quantum.ai.ml.imputation
"Missing value imputation.
- Missing Completely at Random (MCAR)
- Random (MAR)
- Covariate Dependent (CD)
- Non-Ignorable (NI)
If it is known that the data analysis technique which is to be used isn't
content robust, it is good to consider imputation.
Imputation is ... | |
d13926a2ef8d967eeaed4561d1f2b245534c16056b8f5a60ec9c3d75736c3d8b | nibbula/yew | filter-stream-test.lisp | ;;;
;;; filter-stream-test.lisp - Test filter streams.
;;;
(defpackage :filter-stream-test
(:documentation "Test filter streams.")
(:use :cl :filter-stream)
(:export
#:test
))
(in-package :filter-stream-test)
(declaim (optimize (speed 0) (safety 3) (debug 3) (space 0)
(compilation-speed 0)))
;; (def... | null | https://raw.githubusercontent.com/nibbula/yew/e4172647e7f8df116f12009de6f6b5cf53ba7cf8/iof/filter-stream-test.lisp | lisp |
filter-stream-test.lisp - Test filter streams.
(defparameter *whitespace* #(#\space #\newline #\tab #\return))
(defun complex-fnorder (stream thing)
(when (integerp thing)
(etypecase thing
(character
(cond
((eql thing #\.)
((and (eql (filter-stream-state stream) :got-dot)
(... |
(defpackage :filter-stream-test
(:documentation "Test filter streams.")
(:use :cl :filter-stream)
(:export
#:test
))
(in-package :filter-stream-test)
(declaim (optimize (speed 0) (safety 3) (debug 3) (space 0)
(compilation-speed 0)))
( setf thing ( code - char thing ) ) )
( setf ( filter - ... |
4ca93d3aea8dab461f81873418ad0ab1bfa78ecab0f6d247c7593c6de07bd56e | i-am-tom/holmes | Mapping.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FunctionalDependencies #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE UndecidableInstances #
|
Module : Data . JoinSemilattice . Class . Mapping
Description : Lift " regular functions " over parameter types .
Copyright : ( c ) , 2020 ... | null | https://raw.githubusercontent.com/i-am-tom/holmes/ecbb6da0c7a73f839ea2c4d00cdb902fe7080981/src/Data/JoinSemilattice/Class/Mapping.hs | haskell | # LANGUAGE ConstraintKinds #
Typically, this type constructor will be the parameter type. | # LANGUAGE FunctionalDependencies #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE UndecidableInstances #
|
Module : Data . JoinSemilattice . Class . Mapping
Description : Lift " regular functions " over parameter types .
Copyright : ( c ) , 2020
License : MIT
Module ... |
540e184f6b82517cd608326a1a48fd8cc5f248821e1505073c120772c700367f | zxymike93/SICP | lazy.rkt | #lang sicp
EVAL ; ; ;
(define (lazy-eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-assignment exp env))
((definition? exp) (eval-definition exp env))
((if? ... | null | https://raw.githubusercontent.com/zxymike93/SICP/ad483cc6fd81e85d48ae23c08d570ee58aa57aae/samples/interpreter/lazy.rkt | racket | ; ;
clause from book
APPLY ;;;
changed
changed
REPL ;;;
; ;
; ;
replace exp with its value
forget unneeded env
non-memoized force-it
(define (force-it obj)
(if (thunk? obj)
(actual-value (thunk-exp obj) (thunk-env obj))
obj))
Expressions ;;;
no else clause
Environment ;;;
Primitive Procedur... | #lang sicp
(define (lazy-eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-assignment exp env))
((definition? exp) (eval-definition exp env))
((if? exp) (eval-if... |
55cf8e219b78e9e7545ba4318bb34e655066c240f07a490814590115031aa4e5 | mejgun/haskell-tdlib | SearchStickers.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.SearchStickers where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.StickerType as StickerType
import qualified Utils as U
-- |
-- Searches for stickers from public sticker sets that correspond to any of the giv... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/b088f5062023fa201a68ebda128ab2fc489329ab/src/TD/Query/SearchStickers.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
Searches for stickers from public sticker sets that correspond to any of the given emoji
| Space-separated list of emoji to search for; must be non-empty
| Type of the stickers to return |
module TD.Query.SearchStickers where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.StickerType as StickerType
import qualified Utils as U
data SearchStickers = SearchStickers
| The maximum number of stickers to be returned ; 0 - 100
limit :: Maybe Int,
emo... |
150d9e1e6361091b3fe500216761be8d6ab99d85763202b8eb6064d80a40d85f | mbj/stratosphere | PropertiesProperty.hs | module Stratosphere.ServiceDiscovery.PublicDnsNamespace.PropertiesProperty (
module Exports, PropertiesProperty(..), mkPropertiesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ServiceDiscov... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/servicediscovery/gen/Stratosphere/ServiceDiscovery/PublicDnsNamespace/PropertiesProperty.hs | haskell | # SOURCE # | module Stratosphere.ServiceDiscovery.PublicDnsNamespace.PropertiesProperty (
module Exports, PropertiesProperty(..), mkPropertiesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
data Prop... |
514cb3612ff57e3da12747749ef14a81aa9aa50119e4705ede99200edfb17293 | skanev/playground | 96-tests.scm | (require rackunit rackunit/text-ui)
(load "../96.scm")
(define (poly var . coeffs)
(define (to-term-list coeffs)
(cond ((null? coeffs) '())
((=zero? (car coeffs)) (to-term-list (cdr coeffs)))
(else (cons (list (- (length coeffs) 1) (car coeffs))
(to-term-list (cdr coeffs... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/tests/96-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../96.scm")
(define (poly var . coeffs)
(define (to-term-list coeffs)
(cond ((null? coeffs) '())
((=zero? (car coeffs)) (to-term-list (cdr coeffs)))
(else (cons (list (- (length coeffs) 1) (car coeffs))
(to-term-list (cdr coeffs... | |
17ae5ce1cf9500dd0c91e5d57b3e0b72669f00fac65aa542335fa36ebc5b576c | samrocketman/home | cozens-match-colours.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Match colors script for GIMP 2.4
Copyright ( C ) 2007
;
; Tags: colors
;
; Author statement:
;
This script matches the colours in one single layer image to the colours in
another image . It is an implementation of the method describ... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/cozens-match-colours.scm | scheme |
The GIMP -- an image manipulation program
Tags: colors
Author statement:
/
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
--------------------------------------------------------------------
T... | Copyright ( C ) 1995 and
Match colors script for GIMP 2.4
Copyright ( C ) 2007
This script matches the colours in one single layer image to the colours in
another image . It is an implementation of the method described by at :
Distributed by Gimp FX Foundry project
it under the terms of the GNU Ge... |
da517b53c42abab543b765db5185457051b8f559cfa16c2856ba1a96f957d444 | apache/couchdb-couch | couch_db_epi.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " AS ... | null | https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/src/couch_db_epi.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations u... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_db_epi).
-behaviour(couch_epi_plugin).
-export([
app/0,
providers/0,
services/0,
data_subscriptions/0,
data_providers/0,... |
a3fbde6cf10c2536dfedbc4c71db1ddae96108a75aac69889e2d1a8442ef8659 | kiselgra/c-mera | c.switch.00.lisp | (include <stdio.h>)
(function test ((int x)) -> int
(decl ((int i = 0))
(switch x
((1 2 3)
(set i 1)
(break))
(4 (set i 4))
(5
(set i 5)
(break))
((6 7 8)
(set i 6)
(break))
(t (set i -1)))
(return i)))
(function main () -> int
(printf "%i\\n"... | null | https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/c.switch.00.lisp | lisp | (include <stdio.h>)
(function test ((int x)) -> int
(decl ((int i = 0))
(switch x
((1 2 3)
(set i 1)
(break))
(4 (set i 4))
(5
(set i 5)
(break))
((6 7 8)
(set i 6)
(break))
(t (set i -1)))
(return i)))
(function main () -> int
(printf "%i\\n"... | |
9a2bc9ea8ecd25c09e66ddfffc9cc69940be0683b9d12e316c35a4acc4566a05 | nikivazou/presentations | Light.hs | module Light where
1 . Let 's test the build - in ( ! ! ) indexing
{-@ test :: [{v:Int | v /= 0 }] -> Int -> Maybe Int @-}
test :: [Int] -> Int -> Maybe Int
test xs i =
if 0 <= i && i < length xs
then Just (42 `div` (xs !! i))
else Nothing
2 . Try other build - in primitives , e.g. , d... | null | https://raw.githubusercontent.com/nikivazou/presentations/815a31b98186053010d3f1cc442ce7a077566e92/mid-tenure/Light.hs | haskell | @ test :: [{v:Int | v /= 0 }] -> Int -> Maybe Int @ | module Light where
1 . Let 's test the build - in ( ! ! ) indexing
test :: [Int] -> Int -> Maybe Int
test xs i =
if 0 <= i && i < length xs
then Just (42 `div` (xs !! i))
else Nothing
2 . Try other build - in primitives , e.g. , division !
3 . Remove runtime check
|
b478e6adfade77d08cedc18c86e0eb00aad3b52c0821b9784cb07d18fb6b7c71 | jsa-aerial/saite | savrest.cljs | (ns aerial.saite.savrest
(:require
[clojure.string :as cljstr]
[clojure.set :refer [map-invert]]
[aerial.hanasu.common
:refer [update-db get-db]]
[aerial.hanami.core
:as hmi
:refer [printchan]]
[reagent.core :as rgt]
[com.rpl.specter :as sp]
[cljsjs.jszip :as jsz]
[cljsjs.files... | null | https://raw.githubusercontent.com/jsa-aerial/saite/c947ea4bc2c9d51236530157cf8335b2ad102b27/src/cljs/aerial/saite/savrest.cljs | clojure | Data DB =============================================================== ;;;
; ;
Document Save and Restore ============================================= ;;;
editor object instances can't be saved!! | (ns aerial.saite.savrest
(:require
[clojure.string :as cljstr]
[clojure.set :refer [map-invert]]
[aerial.hanasu.common
:refer [update-db get-db]]
[aerial.hanami.core
:as hmi
:refer [printchan]]
[reagent.core :as rgt]
[com.rpl.specter :as sp]
[cljsjs.jszip :as jsz]
[cljsjs.files... |
de72369e60995a52ceda9fee834deb77a9691565c546d3c74f8bbc8020501e93 | aadafinance/aada-finance | Interest.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE DeriveGene... | null | https://raw.githubusercontent.com/aadafinance/aada-finance/32891cfe5a76c785a577c0a486e5f2b8e037c778/src/Interest.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
# OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Use foldr" #
# HLINT ignore "Use newtype instead of data" # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
... |
24bcebd8bcf175307651c9673c17ed6416dca0634db15734487df5950221a2ee | camllight/camllight | text1.ml | #open "tk";;
let main () =
let top = OpenTk() in
let t = text__create top [TextWidth 20; TextHeight 10; Wrap WrapWord] in
let print_contents () =
print_string (text__get t (TextIndex(TI_LineChar(1,0),[]))
(TextIndex(TI_End,[])));
flush std_out in
let b = button__create top ... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk/test/text1.ml | ocaml | #open "tk";;
let main () =
let top = OpenTk() in
let t = text__create top [TextWidth 20; TextHeight 10; Wrap WrapWord] in
let print_contents () =
print_string (text__get t (TextIndex(TI_LineChar(1,0),[]))
(TextIndex(TI_End,[])));
flush std_out in
let b = button__create top ... | |
4e8fd423e2740553e69b3e0fd2cc5ceec0d1f27e8eacae7499d34f9863fd0c37 | racket/games | gl-board-game.rkt | #lang racket/base
(require "gl-board-game/gl-board.rkt")
(provide (all-from-out "gl-board-game/gl-board.rkt"))
| null | https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/gl-board-game.rkt | racket | #lang racket/base
(require "gl-board-game/gl-board.rkt")
(provide (all-from-out "gl-board-game/gl-board.rkt"))
| |
88472cb1a40990a36dc1f3e878eb20f58d00319c31a2f95a12d3a25432b046d6 | haskell-works/hw-simd | Marshal.hs | # LANGUAGE FlexibleInstances #
module HaskellWorks.Data.Simd.Internal.Marshal where
import Data.Word
import qualified Data.Vector.Storable as DVS
import qualified Foreign.ForeignPtr as F
HLINT ignore " Redundant do "
unsafeToElemSizedForeignPtr :: Int -> DVS.Vector Word64 -> (F.ForeignPtr Word8, Int, I... | null | https://raw.githubusercontent.com/haskell-works/hw-simd/469883548ca4c3114079b670ea7be99d65728a46/src/HaskellWorks/Data/Simd/Internal/Marshal.hs | haskell | # LANGUAGE FlexibleInstances #
module HaskellWorks.Data.Simd.Internal.Marshal where
import Data.Word
import qualified Data.Vector.Storable as DVS
import qualified Foreign.ForeignPtr as F
HLINT ignore " Redundant do "
unsafeToElemSizedForeignPtr :: Int -> DVS.Vector Word64 -> (F.ForeignPtr Word8, Int, I... | |
303db051ccc82795097e12c6893dfaa5fa0fb38e52409cae3d5f033b9b7067b6 | dinosaure/ocaml-maildir | maildir_mem.ml | module IO : Maildir.IO with type +'a t = 'a = struct
type +'a t = 'a
let bind v f = f v
let map f v = f v
let return v = v
let (>>=) = bind
let (>>|) v f = map f v
end
module FS = struct
type key = Fpath.t
type elt = { mutable mtime : int64; contents : [ `Directory | `Contents of string ]; }
type t... | null | https://raw.githubusercontent.com/dinosaure/ocaml-maildir/f16313cbe9ea2c44463cd7238dda5b6c73a72280/lib-mem/maildir_mem.ml | ocaml | module IO : Maildir.IO with type +'a t = 'a = struct
type +'a t = 'a
let bind v f = f v
let map f v = f v
let return v = v
let (>>=) = bind
let (>>|) v f = map f v
end
module FS = struct
type key = Fpath.t
type elt = { mutable mtime : int64; contents : [ `Directory | `Contents of string ]; }
type t... | |
f0e274eb979ce1d229eb8c65d3c5c733c7a6abb1b41c25ed8fe021fcf50cd241 | DHSProgram/DHS-Indicators-SPSS | HV_backgroundvars.sps | * Encoding: windows-1252.
*****************************************************************************************************
Program: HV_backgroundvars.sps
Purpose: compute the background variables needed for the HV_tables
Author: Shireen Assaf and translated to SPSS by Ivana Bjelic
Date last modified: Jan... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/5de4f2b032646a99fe144a1adeaf09a82d8026a6/Chap14_HV/HV_backgroundvars.sps | scheme | * Encoding: windows-1252.
*****************************************************************************************************
Program: HV_backgroundvars.sps
Purpose: compute the background variables needed for the HV_tables
Author: Shireen Assaf and translated to SPSS by Ivana Bjelic
Date last modified: Jan... | |
969a0793da3e52ebcf6b22b6f46363fdc07d475c4688a44843fe4de6d52305b4 | ocaml-multicore/tezos | client_proto_context.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_client/client_proto_context.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
ce6eda3191a1300fc0a0b86aa007ddcd039710ffa5bc5793388891dfbcd68f12 | backtracking/ocamlgraph | demo_prim.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/examples/demo_prim.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
Demo of... |
4f7563a47394b74f942d5de9cc2a4fa6fd9e7673525247a0bb5466232fd803b9 | avsm/mirage-duniverse | conv.mli | (** Utility Module for S-expression Conversions *)
open Bigarray
include module type of Sexplib0.Sexp_conv
* { 6 Type aliases }
type bigstring = (char, int8_unsigned_elt, c_layout) Array1.t
type float32_vec = (float, float32_elt, fortran_layout) Array1.t
type float64_vec = (float, float64_elt, fortran_layout) Array1... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/sexplib/src/conv.mli | ocaml | * Utility Module for S-expression Conversions
* [sexp_of_mat mat] same as {!Conv.sexp_of_float64_mat}.
* [string_of__of__sexp_of conv x] converts the OCaml-value [x] to
an S-expression represented as a string by using conversion function
[conv].
* [bigstring_of_sexp sexp] converts S-expression [sexp] to a
... |
open Bigarray
include module type of Sexplib0.Sexp_conv
* { 6 Type aliases }
type bigstring = (char, int8_unsigned_elt, c_layout) Array1.t
type float32_vec = (float, float32_elt, fortran_layout) Array1.t
type float64_vec = (float, float64_elt, fortran_layout) Array1.t
type vec = float64_vec
type float32_mat = (float... |
8010318ebe189891b52ded3eff0c44a6beb340457ad23e3706542d3bbb8d59ec | gator1/jepsen | transfer.clj | (ns jepsen.mongodb-smartos.transfer
"Simulates bank account transfers between N accounts, as per
From -two-phase-commits/"
(:refer-clojure :exclude [read])
(:require [clojure [pprint :refer :all]
[string :as str]]
[clojure.java.io :as io]
[clojure.tools.logging :refe... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/mongodb-smartos/src/jepsen/mongodb_smartos/transfer.clj | clojure | jfc mongo error handling is incomprehensibly inconsistent
- What does insert-and-return return for failure?
- Why doesn't insert-and-return return something that responds to
result/ok? for the successful case?
Create accounts
Generators
Tests | (ns jepsen.mongodb-smartos.transfer
"Simulates bank account transfers between N accounts, as per
From -two-phase-commits/"
(:refer-clojure :exclude [read])
(:require [clojure [pprint :refer :all]
[string :as str]]
[clojure.java.io :as io]
[clojure.tools.logging :refe... |
e094e0626eb52950c8e099c8f749438a73880b8411af389192e84189b9fd4f85 | mbj/stratosphere | SelfManagedEventSourceProperty.hs | module Stratosphere.Lambda.EventSourceMapping.SelfManagedEventSourceProperty (
module Exports, SelfManagedEventSourceProperty(..),
mkSelfManagedEventSourceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOU... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/lambda/gen/Stratosphere/Lambda/EventSourceMapping/SelfManagedEventSourceProperty.hs | haskell | # SOURCE # | module Stratosphere.Lambda.EventSourceMapping.SelfManagedEventSourceProperty (
module Exports, SelfManagedEventSourceProperty(..),
mkSelfManagedEventSourceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratos... |
b131a2ba174fe10ea3c20dc50cb7670405276ab3f10c4338f86b0331c98bfc79 | kyleburton/sandbox | user.clj | (ns user
(:require
[mount.core :as mount]
[text-adventure-engine.figwheel :refer [start-fw stop-fw cljs]]
text-adventure-engine.core))
(defn start []
(mount/start-without #'text-adventure-engine.core/repl-server))
(defn stop []
(mount/stop-except #'text-adventure-engine.core... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/common-lisp/land-of-lisp/text-adventure-engine/env/dev/clj/user.clj | clojure | (ns user
(:require
[mount.core :as mount]
[text-adventure-engine.figwheel :refer [start-fw stop-fw cljs]]
text-adventure-engine.core))
(defn start []
(mount/start-without #'text-adventure-engine.core/repl-server))
(defn stop []
(mount/stop-except #'text-adventure-engine.core... | |
c71ea87beb62f8b8500f0ff2dbf5ddab3a9a0928b390c30b131032cf01f34c0d | narimiran/AdventOfCode2017 | day16.ml | let instructions =
CCIO.(with_in "inputs/16.txt" read_all) |> String.split_on_char ','
type spin = { n : int }
type exchange = { a : int; b : int }
type partner = { a : char; b : char }
type dance_move = Spin of spin | Exchange of exchange | Partner of partner
let parse instr =
let l = String.length instr in
l... | null | https://raw.githubusercontent.com/narimiran/AdventOfCode2017/41d7bb5d8b6373aa309c1b300ad317a8f9a5c71b/ocaml/day16.ml | ocaml | let instructions =
CCIO.(with_in "inputs/16.txt" read_all) |> String.split_on_char ','
type spin = { n : int }
type exchange = { a : int; b : int }
type partner = { a : char; b : char }
type dance_move = Spin of spin | Exchange of exchange | Partner of partner
let parse instr =
let l = String.length instr in
l... | |
23c635282fb4e358c4f46834026d1cc899c1dd6775b3f347792f5601287ba68e | hidaris/thinking-dumps | printer.rkt | #lang racket
(require "compile.rkt")
(provide (all-defined-out))
convert back to the concrete NASM syntax
;; Asm -> String
(define (asm->string a)
(foldr (λ (i s) (string-append (instr->string i) s)) "" a))
;; Instruction -> String
(define (instr->string i)
(match i
[`(mov ,a1 ,a2)
(string-append "\t... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/compiler/abscond/printer.rkt | racket | Asm -> String
Instruction -> String
Arg -> String
Label -> String
Asm -> Void | #lang racket
(require "compile.rkt")
(provide (all-defined-out))
convert back to the concrete NASM syntax
(define (asm->string a)
(foldr (λ (i s) (string-append (instr->string i) s)) "" a))
(define (instr->string i)
(match i
[`(mov ,a1 ,a2)
(string-append "\tmov " (arg->string a1) ", " (arg->string a... |
5240adf56ce3f459ccbd7351a65e39622dcffec1ed886c8e0173aaa13eed3170 | technomancy/leiningen | foo.clj | (def {{name}} :foo)
| null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/resources/leiningen/new/template/foo.clj | clojure | (def {{name}} :foo)
| |
3ca1174d11ac58c2df8bd52149889578730852e34b1767e9b684ca75aba77e1f | phoe/list-named-class | swank.lisp | ;;;; swank.lisp
#+swank
(in-package #:swank)
#+swank
(defun class-from-class-name-form* (class-name-form)
(when (and (listp class-name-form)
(every #'symbolp class-name-form))
(let* ((class-name class-name-form)
(class (list-named-class:find-class class-name nil)))
(when (and class... | null | https://raw.githubusercontent.com/phoe/list-named-class/2955791a7469131bcab42d800883f27993ee1d62/swank.lisp | lisp | swank.lisp
Try to finalize the class, which can fail if
superclasses are not defined yet
FIXME: much as it would be nice to include the
applicable keywords from
UPDATE-INSTANCE-FOR-DIFFERENT-CLASS, I don't really see
how to do it: so we punt, always declaring
&ALLOW-OTHER-KEYS. |
#+swank
(in-package #:swank)
#+swank
(defun class-from-class-name-form* (class-name-form)
(when (and (listp class-name-form)
(every #'symbolp class-name-form))
(let* ((class-name class-name-form)
(class (list-named-class:find-class class-name nil)))
(when (and class
... |
433bc412a4e629582ea044e99cf24c6eaa0df2770848de7cdef98b321483f6a6 | OCamlPro/SecurOCaml | types.ml | open Listx
exception Undefined
let todo () = raise Undefined
module Int = struct type t = int let compare = Pervasives.compare end
module Subst = Map.Make (Int)
type num_constant = int (* number of constant constructor *)
type tag = int (* block tags *)
and ty
=
| Empty (* signals an error in type checking *)
... | null | https://raw.githubusercontent.com/OCamlPro/SecurOCaml/1d89e065884a935cd8e38b9670522dda6383f77c/Livrables/WorkPackage5/bytecheck/types.ml | ocaml | number of constant constructor
block tags
signals an error in type checking
| Ref of ty
constant variable
virtual machine type
is the term [t] constant? i.e. doesn't contain variables
does variable [n] occur in term [t] ?
true if t = Var n
applies a substitution [s] to a type [t]
only functions o... | open Listx
exception Undefined
let todo () = raise Undefined
module Int = struct type t = int let compare = Pervasives.compare end
module Subst = Map.Make (Int)
and ty
=
| Unit
| Bool
| Int
| Variant of num_constant * ty list list
| Block of tag * ty list
| String
| Char
| Float
| Array of ty
|... |
449f05ab80e19393447c6bdeb53a85169e09b5084f2ef33c646e12fab432ac3b | lspitzner/multistate | Class.hs | | The multi - valued version of mtl 's MonadWriter
module Control.Monad.Trans.MultiWriter.Class
(
-- * MonadMultiWriter class
MonadMultiWriter(..)
)
where
import Control.Monad.Trans.Class ( MonadTrans
, lift )
import Data.Monoid
-- TODO: some haddock
class (Monad m,... | null | https://raw.githubusercontent.com/lspitzner/multistate/32019fe38cab05c119d05d1e5c76841e570ef2d4/src/Control/Monad/Trans/MultiWriter/Class.hs | haskell | * MonadMultiWriter class
TODO: some haddock | | The multi - valued version of mtl 's MonadWriter
module Control.Monad.Trans.MultiWriter.Class
(
MonadMultiWriter(..)
)
where
import Control.Monad.Trans.Class ( MonadTrans
, lift )
import Data.Monoid
class (Monad m, Monoid a) => MonadMultiWriter a m where
mTell :: ... |
0fab1791840857f4d01ba8127ff24b6c9a5d8efa187947709b147c2ca1cefb71 | andrewmcveigh/cljs-time | predicates.cljs | (ns cljs-time.predicates
"### Predicate functions to ask basic questions about a date.
Was it Monday?
```clojure
(monday? (clj-time.core/date-time 1999 9 9))
```
Is it January?
```clojure
(january? (clj-time.core/date-time 2011 1 1))
```"
(:require [cljs-time.core :as time]
[cljs-time.coerce :as c... | null | https://raw.githubusercontent.com/andrewmcveigh/cljs-time/7f86226ef2bc5e1c8e00ab9c36096e76f84a73e1/src/cljs_time/predicates.cljs | clojure | days of the week | (ns cljs-time.predicates
"### Predicate functions to ask basic questions about a date.
Was it Monday?
```clojure
(monday? (clj-time.core/date-time 1999 9 9))
```
Is it January?
```clojure
(january? (clj-time.core/date-time 2011 1 1))
```"
(:require [cljs-time.core :as time]
[cljs-time.coerce :as c... |
a2d8c464ca2c0c24c842f49c47cb85e0ce59e7942465d00e57cbca101ea2e625 | realworldocaml/book | fields_test.ml | module Simple : sig
type t =
{ x : int
; w : int
}
[@@deriving fields]
end = struct
type t =
{ x : int
; w : int
}
[@@deriving fields ~fold_right]
let%test _ = Fields.create ~x:2 ~w:4 = { x = 2; w = 4 }
let all_even = { x = 2; w = 4 }
let some_even = { x = 1; w = 4 }
let none_e... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_fields_conv/test/fields_test.ml | ocaml | let _ = Fieldslib.Field.setter Fields.a
let _ = Fieldslib.Field.setter Private.Fields.a
could generate an unused warning but for crazy reasons, only
when the type is private
Sometimes it's convenient for the type of the accumulator to change as you handle
the individual fields.
We expect no unused valu... | module Simple : sig
type t =
{ x : int
; w : int
}
[@@deriving fields]
end = struct
type t =
{ x : int
; w : int
}
[@@deriving fields ~fold_right]
let%test _ = Fields.create ~x:2 ~w:4 = { x = 2; w = 4 }
let all_even = { x = 2; w = 4 }
let some_even = { x = 1; w = 4 }
let none_e... |
0ef17c579d363d6d1cb2d6309e2276f5c0a3bc0b30ef74a39fcd2552cb6a232a | etnt/xmlrpc | date_server.erl | -module(date_server).
-export([handler/2]).
%%
%% A server which calculates date value(s) such as:
%%
* Calculates the number of days since year 0 for a given date .
* Calculates if a given date is a leap year .
* Calculates the day of the week for a given day .
%%
%% In order to perform the calculation a client... | null | https://raw.githubusercontent.com/etnt/xmlrpc/fb46463b2acadf164ec534d9e2033e194341c507/examples/date_server.erl | erlang |
A server which calculates date value(s) such as:
In order to perform the calculation a client must login with
keepalive timeout is set to infinity. The server returns a session
counter for each call using the state variable.
| -module(date_server).
-export([handler/2]).
* Calculates the number of days since year 0 for a given date .
* Calculates if a given date is a leap year .
* Calculates the day of the week for a given day .
username " " and password " Bartfast " . After login the HTTP/1.1
handler({false, N}, {call, login, ["Sl... |
ea398d16ab43dc7b7f522dbba253a5f2ff8a85a7052b2ae5ac1216a133db1322 | overminder/ssh-socks5-pipe | RemoteHandler.hs | {-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
module Main where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Control.Monad.Trans
import qualified Data.ByteString as B
import Network.Socket
import Network.BSD
import System.IO
import System.Exit
import Control.Exception
impo... | null | https://raw.githubusercontent.com/overminder/ssh-socks5-pipe/80f7724505321c1d31d93aff2cc1c431f56ef4d3/RemoteHandler.hs | haskell | # LANGUAGE RecordWildCards, ScopedTypeVariables # |
module Main where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Control.Monad.Trans
import qualified Data.ByteString as B
import Network.Socket
import Network.BSD
import System.IO
import System.Exit
import Control.Exception
import Dispatch
import Message
import Compat
import Protoc... |
158b7a8d6eebe9f7e8ac51f40bc2b4884026f8b4fe1eea2c919907cff2368046 | clojure/core.typed.analyzer.jvm | fix_case_test.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed.analyzer.jvm/7246adac3bb5565ae0a785f430a2121226e7d1cb/src/main/clojure/clojure/core/typed/analyzer/passes/jvm/fix_case_test.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.analyzer.passes.jvm.fix-case-test
(:require [clojure.core.typed.analyzer.passes.add-binding-atom :as add-binding-atom]
[clojure.tools.analyzer.passes.jvm.fix-case-test :as fix-case-test]))
(defn fix-case-test
"If the node is a :case-te... |
6797888b790c24a37c1bdec60b8f99b1cc135ae4ef6689b950f55f5db8921e5a | flopezluis/kvstore | config.clj | (ns kvstore.config
(:require [clojure.tools.logging :as log]))
(def conf
(read-string (slurp (clojure.java.io/resource "config.edn"))))
| null | https://raw.githubusercontent.com/flopezluis/kvstore/2a10b6a9cc2f2a3c30b2aad23e431a9238620fbd/src/kvstore/config.clj | clojure | (ns kvstore.config
(:require [clojure.tools.logging :as log]))
(def conf
(read-string (slurp (clojure.java.io/resource "config.edn"))))
| |
c83b4a63fb3f8253b3d2101e9371b0e1dc8a9f4b74076be01be67ad8596a6615 | Gandalf-/coreutils | CmpSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module CmpSpec (spec) where
import Coreutils.Cmp
import Control.Monad
import qualified Data.ByteString as B
import Data.Either
import Numeric
import System.Directory
import System.IO
import Test.Hspec
spec :: Sp... | null | https://raw.githubusercontent.com/Gandalf-/coreutils/d76bd5a2698e9dc8f548698cded1a873a196a4dc/test/CmpSpec.hs | haskell | # LANGUAGE OverloadedStrings # | module CmpSpec (spec) where
import Coreutils.Cmp
import Control.Monad
import qualified Data.ByteString as B
import Data.Either
import Numeric
import System.Directory
import System.IO
import Test.Hspec
spec :: Spec
spec = parallel $ do
describ... |
4c8477360607ea3827d641072587fbfeba1b5d1d384a896c1b8d77be5db93e26 | splittist/docxplora | opc-namespaces.lisp | (cl:in-package #:opc)
(defparameter *namespaces*
'(("CONTENT_TYPES" "-types")
("CORE_PROPERTIES" "-properties")
("DIGITAL_SIGNATURES" "-signature")
("RELATIONSHIPS" "")
("MARKUP_COMPATIBILITY" "-compatibility/2006")))
(defun ns (name)
(cadr (find name *namespaces* :key #'car :test #'string-equal))... | null | https://raw.githubusercontent.com/splittist/docxplora/1c843677f243ae9d2e4a71cac27859dcc1381075/opc/opc-namespaces.lisp | lisp | (cl:in-package #:opc)
(defparameter *namespaces*
'(("CONTENT_TYPES" "-types")
("CORE_PROPERTIES" "-properties")
("DIGITAL_SIGNATURES" "-signature")
("RELATIONSHIPS" "")
("MARKUP_COMPATIBILITY" "-compatibility/2006")))
(defun ns (name)
(cadr (find name *namespaces* :key #'car :test #'string-equal))... | |
667a5f2e3704326650e4dde9386913cdc8cc96e97fb375155bdcb0fb0a4af4a8 | avsm/mirage-duniverse | symbol.mli |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/xenstore/server/symbol.mli | ocaml |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | |
2c597e3373bddd63dc26d7c166f703e1c5947f58671af1b9b9d3685e9c38f091 | danielsz/system | redis_queue.clj | (ns system.components.redis-queue
(:require [com.stuartsierra.component :as component]
[taoensso.carmine.message-queue :as car-mq]))
(defrecord RedisQueue [pool spec xs]
component/Lifecycle
(start [component]
(let [conn {:pool pool :spec spec}
workers (doall (for [x xs]
... | null | https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/src/system/components/redis_queue.clj | clojure | (ns system.components.redis-queue
(:require [com.stuartsierra.component :as component]
[taoensso.carmine.message-queue :as car-mq]))
(defrecord RedisQueue [pool spec xs]
component/Lifecycle
(start [component]
(let [conn {:pool pool :spec spec}
workers (doall (for [x xs]
... | |
1dbb0a232bcbed8c230573378e29d44ea3fab72a4a1c1c8835edb9ba1792d91e | input-output-hk/plutus | EvaluationContext.hs | {-# LANGUAGE DerivingVia #-}
# LANGUAGE TypeApplications #
module PlutusLedgerApi.V2.EvaluationContext
( EvaluationContext
, mkEvaluationContext
, CostModelParams
, assertWellFormedCostModelParams
, toMachineParameters
, CostModelApplyError (..)
) where
import PlutusLedgerApi.Common
im... | null | https://raw.githubusercontent.com/input-output-hk/plutus/8ffec08d835f5c6647ed3eda8aa4b8e4cd828ddb/plutus-ledger-api/src/PlutusLedgerApi/V2/EvaluationContext.hs | haskell | # LANGUAGE DerivingVia #
^ the (updated) cost model parameters of the protocol | # LANGUAGE TypeApplications #
module PlutusLedgerApi.V2.EvaluationContext
( EvaluationContext
, mkEvaluationContext
, CostModelParams
, assertWellFormedCostModelParams
, toMachineParameters
, CostModelApplyError (..)
) where
import PlutusLedgerApi.Common
import PlutusLedgerApi.V2.ParamName ... |
d367314ebb638f643e186f028b2f1ec766ba0224534a56bee23dc13dfb6b8e17 | ocaml-ppx/ppx | unversioned.mli | module Types : sig
type _ node
(*$ Ppx_ast_cinaps.print_unversioned_types () *)
type arg_label_
type attribute_
type attributes_
type case_
type class_declaration_
type class_description_
type class_expr_
type class_expr_desc_
type class_field_
type class_field_desc_
type class_field_kind_
... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/unversioned.mli | ocaml | $ Ppx_ast_cinaps.print_unversioned_types ()
$ | module Types : sig
type _ node
type arg_label_
type attribute_
type attributes_
type case_
type class_declaration_
type class_description_
type class_expr_
type class_expr_desc_
type class_field_
type class_field_desc_
type class_field_kind_
type 'a class_infos_
type class_signature_
type... |
3b6ca130cb50b68cdc5fb9d94bd14c9d581646e00cff0545b9d4c73afbbc5bf5 | tschady/advent-of-code | d14_test.clj | (ns aoc.2021.d14-test
(:require [aoc.2021.d14 :as sut]
[clojure.test :refer :all]))
(deftest challenges
(is (= 3697 (sut/part-1 sut/input)))
(is (= 4371307836157 (sut/part-2 sut/input))))
| null | https://raw.githubusercontent.com/tschady/advent-of-code/a7512e837550d2fd85121a613c61e5b3885b9b42/test/aoc/2021/d14_test.clj | clojure | (ns aoc.2021.d14-test
(:require [aoc.2021.d14 :as sut]
[clojure.test :refer :all]))
(deftest challenges
(is (= 3697 (sut/part-1 sut/input)))
(is (= 4371307836157 (sut/part-2 sut/input))))
| |
0620c571dda4ad68339026397438c589a7245035862f2ca640459069eb6823ce | nuvla/ui | views_license.cljs | (ns sixsq.nuvla.ui.deployment-dialog.views-license
(:require [clojure.string :as str]
[re-frame.core :refer [dispatch subscribe]]
[sixsq.nuvla.ui.deployment-dialog.events :as events]
[sixsq.nuvla.ui.deployment-dialog.subs :as subs]
[sixsq.nuvla.ui.deployment-dialog.util... | null | https://raw.githubusercontent.com/nuvla/ui/c10704eabd339489722fa53bc99f11f21103c070/code/src/cljs/sixsq/nuvla/ui/deployment_dialog/views_license.cljs | clojure | (ns sixsq.nuvla.ui.deployment-dialog.views-license
(:require [clojure.string :as str]
[re-frame.core :refer [dispatch subscribe]]
[sixsq.nuvla.ui.deployment-dialog.events :as events]
[sixsq.nuvla.ui.deployment-dialog.subs :as subs]
[sixsq.nuvla.ui.deployment-dialog.util... | |
0dab3ff46d5468afe5a271f1c9255ff735093ea258db3e69a640a8c731ae90b4 | penpot/penpot | node_store.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.shapes.frame.node-store
(:require
[app.util.dom :as dom]
[app.util.globals :... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/shapes/frame/node_store.cljs | clojure |
Copyright (c) KALEIDOS INC
when `true` the node is in memory | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.workspace.shapes.frame.node-store
(:require
[app.util.dom :as dom]
[app.util.globals :as globals]
[rumext.v2 :as mf]... |
15f6d6349d8d4e7866bfca0eb5e0daf44d02999b4a1971a832f8724b4adb6369 | cljdoc/cljdoc-analyzer | no-doc-wont-load2.cljc | (ns metagetta-test.test-ns1.no-doc-wont-load2 "Should not be analyzed" {:no-doc true})
;; When excluding namespaces with no-doc metadata,
;; this namespace should not load and therefore not cause analysis failure
(this-unresolved-var-would-cause-load-to-fail)
(also-no-closing-paren-here
| null | https://raw.githubusercontent.com/cljdoc/cljdoc-analyzer/01bb0fa09d4b62ff038341334f4f61964cb9caf0/modules/metagetta/test-sources-bad-code/metagetta_test_bad_code/no-doc-wont-load2.cljc | clojure | When excluding namespaces with no-doc metadata,
this namespace should not load and therefore not cause analysis failure | (ns metagetta-test.test-ns1.no-doc-wont-load2 "Should not be analyzed" {:no-doc true})
(this-unresolved-var-would-cause-load-to-fail)
(also-no-closing-paren-here
|
6e719dfd9fbe576878ce78b5051b9d7dcbdaf28af52e13c356e4f83b63a96ff6 | ghc/ghc | Arity06.hs | module F6 where
f6f = \h -> \x -> h x 0
f6t = \y -> \z -> y + z
f6 = f6f f6t 3
| null | https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/testsuite/tests/arityanal/should_compile/Arity06.hs | haskell | module F6 where
f6f = \h -> \x -> h x 0
f6t = \y -> \z -> y + z
f6 = f6f f6t 3
| |
2e5e769fa07df02cec15f646f184abd74d3bd5517b1d12e6dbc54611b1747036 | WeiDUorg/weidu | mymarshal.ml | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
open BatteriesInit
open Hashtblinit
open Util
open Tlk
let read_unsetstr filename : Load.str_set_record list =
try
let inchan = Case_ins.perv_open_in_bin fi... | null | https://raw.githubusercontent.com/WeiDUorg/weidu/a4048b11e6904f39ea1f956a36018e5d9a6e8e5c/src/mymarshal.ml | ocaml | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
open BatteriesInit
open Hashtblinit
open Util
open Tlk
let read_unsetstr filename : Load.str_set_record list =
try
let inchan = Case_ins.perv_open_in_bin fi... | |
d9dad4ae640642a427e6952e16350221b2146d12ea0ae5c6ce957086c21052ba | dparis/gen-phzr | camera.cljs | (ns phzr.impl.accessors.camera)
(def camera-constants
{:follow-lockon "FOLLOW_LOCKON"
:follow-platformer "FOLLOW_PLATFORMER"
:follow-topdown "FOLLOW_TOPDOWN"
:follow-topdown-tight "FOLLOW_TOPDOWN_TIGHT"})
(def camera-get-properties
{:at-limit "atLimit"
:bounds "bounds"
:deadzone "deadzone"
:disp... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/camera.cljs | clojure | (ns phzr.impl.accessors.camera)
(def camera-constants
{:follow-lockon "FOLLOW_LOCKON"
:follow-platformer "FOLLOW_PLATFORMER"
:follow-topdown "FOLLOW_TOPDOWN"
:follow-topdown-tight "FOLLOW_TOPDOWN_TIGHT"})
(def camera-get-properties
{:at-limit "atLimit"
:bounds "bounds"
:deadzone "deadzone"
:disp... | |
b75da432a5ec4f5fb7c81d0798d7fb876ab8bf1a2622c6fc5aca321c7e23dda7 | kitlang/kit | Operator.hs | # LANGUAGE DeriveGeneric #
module Kit.Ast.Operator where
import Data.Hashable
import GHC.Generics
import Kit.Str
data Operator
= Inc
| Dec
| Add
| Sub
| Mul
| Div
| Mod
| Eq
| Neq
| Gte
| Lte
| LeftShift
| RightShift
| Gt
| Lt
| And
| Or
| BitAnd
| BitOr
| BitXor
| Invert
... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Ast/Operator.hs | haskell | # LANGUAGE DeriveGeneric #
module Kit.Ast.Operator where
import Data.Hashable
import GHC.Generics
import Kit.Str
data Operator
= Inc
| Dec
| Add
| Sub
| Mul
| Div
| Mod
| Eq
| Neq
| Gte
| Lte
| LeftShift
| RightShift
| Gt
| Lt
| And
| Or
| BitAnd
| BitOr
| BitXor
| Invert
... | |
101578d9b56752ff68af1fe9606bd2d4c050555abd91a63eef31671096fd5ad3 | zinid/delimcc | sieve.ml | Eratosthenes sieve : an example of a concurrent program
where the concurrency primitives are implemented with delimcc .
The example is an elaboration of the code kindly sent by
, July 18 , 2012 .
where the concurrency primitives are implemented with delimcc.
The example is an elaboration of... | null | https://raw.githubusercontent.com/zinid/delimcc/93ffd621051858e9fefdbeffd86a6112063a436a/sieve.ml | ocaml | Send a stream of integers [m..n] on the channel out
It is a task and hence creates a thunk
A task to print the values read from the stream
The main sieving task: move prime numbers from inp to out
by composing filters
Start up the task of the sieving job, with n being the upper limit
Print the statistics... | Eratosthenes sieve : an example of a concurrent program
where the concurrency primitives are implemented with delimcc .
The example is an elaboration of the code kindly sent by
, July 18 , 2012 .
where the concurrency primitives are implemented with delimcc.
The example is an elaboration of... |
dd9ed5894c75a0473d7fb38a6055624d3933f3fcdf80c7dcabc2d29baaaadc94 | jacquev6/General | Displayable.ml | module type S0 = sig
type t
val to_string: t -> string
end
module Tests_ = struct
module Examples = struct
module type S0 = sig
type t
val displays: (t * string) list
end
end
module Testable = struct
module type S0 = sig
include S0
end
end
module MakeMakers(MakeExample... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Generated/Traits/Displayable.ml | ocaml | module type S0 = sig
type t
val to_string: t -> string
end
module Tests_ = struct
module Examples = struct
module type S0 = sig
type t
val displays: (t * string) list
end
end
module Testable = struct
module type S0 = sig
include S0
end
end
module MakeMakers(MakeExample... | |
8c5cb682b82d086aae39873b0f84210c174ce3aeb266cbb9320ab1ea8650c612 | 223kazuki/clj-graphql-server | datomic.clj | (ns graphql-server.datomic
(:require [integrant.core :as ig]
[hodur-datomic-schema.core :as hodur-datomic]))
(defmethod ig/init-key ::schema [_ {:keys [meta-db]}]
(hodur-datomic/schema meta-db))
| null | https://raw.githubusercontent.com/223kazuki/clj-graphql-server/0994d2bb98cd483dcb1c02a8175766e4fd35c861/src/graphql_server/datomic.clj | clojure | (ns graphql-server.datomic
(:require [integrant.core :as ig]
[hodur-datomic-schema.core :as hodur-datomic]))
(defmethod ig/init-key ::schema [_ {:keys [meta-db]}]
(hodur-datomic/schema meta-db))
| |
dfc1219cbe285fdf52c061dffac552b6481e0bbb6d324f32d5687273aa320673 | omcljs/om | checksums.clj | (ns om.checksums
(:require [clojure.string :as str]))
;; ===================================================================
Checksums ( data - react - checksum )
(def MOD 65521)
;; Adapted from
(defn adler32 [^StringBuilder sb]
(let [l (.length sb)
m (bit-and l -4)]
(loop [a (int 1)
b ... | null | https://raw.githubusercontent.com/omcljs/om/3a1fbe9c0e282646fc58550139b491ff9869f96d/src/main/om/checksums.clj | clojure | ===================================================================
Adapted from | (ns om.checksums
(:require [clojure.string :as str]))
Checksums ( data - react - checksum )
(def MOD 65521)
(defn adler32 [^StringBuilder sb]
(let [l (.length sb)
m (bit-and l -4)]
(loop [a (int 1)
b (int 0)
i 0
n (min (+ i 4096) m)]
(cond
(< i n)
... |
a1ba409ef8224431796ed628c86efe373358504ffe5b963b0c84eb553768024d | fetburner/Coq2SML | heap.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/heap.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Heaps
Type of functional heaps
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
module type Ordered = sig
... |
a8bd9d84e1db260e7b63ccb0c9a10dbdd8acbc67ea7f453cc9281097596a8307 | wdhowe/clojure-snippets | variables.clj | (ns clojure.examples.myvars (:gen-class))
; symbols bound via def are global.
(def earth "round")
; symbols bound via let are local to that function.
(defn main
[]
(let [myname "Robert"
myrate 50.32
myvar 100]
(println "My name is:" myname)
(println "My hourly rate is:" myrate)
(printl... | null | https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/basic_syntax/variables.clj | clojure | symbols bound via def are global.
symbols bound via let are local to that function. | (ns clojure.examples.myvars (:gen-class))
(def earth "round")
(defn main
[]
(let [myname "Robert"
myrate 50.32
myvar 100]
(println "My name is:" myname)
(println "My hourly rate is:" myrate)
(println "My var is:" myvar)
(println "Earth is:" earth)))
(main)
(println "Earth is still... |
b10e7ed012420a7c56f87a0fdc6c51c3d0b4b743e46d31be769265ca05efb9b1 | WhatsApp/eqwalizer | trace_tests_runner.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(trace_tests_runner).
-export([base_trace_tests/0, type_trace_tests/0]).
base_trace_tests() ->... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/98437925c95e092eb6bc4522153f46582cad5ef0/eqwalizer/test_projects/dbg_trace/src/trace_tests_runner.erl | erlang |
the LICENSE file in the root directory of this source tree. | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(trace_tests_runner).
-export([base_trace_tests/0, type_trace_tests/0]).
base_trace_tests() ->
TracerFile = "traces/base.dbg_trace",
ok = filelib:ensure_dir(T... |
fe23a039d0b3ad3509cbf24b061067c748874633faea7a0fd9386872aef0698f | mnieper/unsyntax | syntax-object.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the rights to use... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/unsyntax/syntax-object.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
3bc2d04387f73ddea320b36b7a7c57ee0f725ded39aa9a47eeaaf2348e766008 | spawnfest/eep49ers | wxScreenDC.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . 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 applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxScreenDC.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxScreenDC).
-include("wxe.hrl").
-export([destroy/1,new/0]).
-export([blit/5,blit/6,calcBoundingBox/3,clea... |
2dc781fbabbb74aa21a9f3dfe7d078cf5a7f84f1ee764af9b42daffbcff8d316 | kahua/Kahua | persistence.scm | -*- coding : utf-8 ; mode : scheme -*-
;; test kahua.persistence
;; Kahua.persistenceモジュールのテスト
(use gauche.test)
(use gauche.collection)
(use file.util)
(use util.list)
;; A hook to use this file for both stand-alone test and
DBI - backed - up test .
(cond ((global-variable-bound? (current-module) '*dbname*)
... | null | https://raw.githubusercontent.com/kahua/Kahua/41fa415511c54beab4922820989faf7ea71d2818/test/persistence.scm | scheme | mode : scheme -*-
test kahua.persistence
Kahua.persistenceモジュールのテスト
A hook to use this file for both stand-alone test and
ロードテスト:
kahua.persistentceがロードでき、またそのインタフェースに
----------------------------------------------------------
基本的なテスト
存在しないデータベース名を与えてデータベースをオープンし、
データベースが正しく作成されることを確認する。
データベースがwith-dbの動... |
(use gauche.test)
(use gauche.collection)
(use file.util)
(use util.list)
DBI - backed - up test .
(cond ((global-variable-bound? (current-module) '*dbname*)
(rxmatch-if (#/^(\w+):/ *dbname*) (#f driver)
(test-start #`"persistence/,|driver| (,|*dbname*|)")
(test-start #`"persistence/efs (,|... |
163772cca6131ff757954f26e39afc7c559377dee8e317b5d917536a280c36ed | helpshift/hydrox | scheduler.clj | (ns documentation.example.scheduler
(:use midje.sweet))
| null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/example/test/documentation/example/scheduler.clj | clojure | (ns documentation.example.scheduler
(:use midje.sweet))
| |
59a7a724f6afb217aba80d42bb5612681920579925614f796a473bd7b45649d1 | danieljharvey/mimsa | LookupExpression.hs | module Language.Mimsa.Actions.Helpers.LookupExpression
( lookupModule,
lookupModuleByName,
)
where
import Control.Monad.Except
import qualified Data.Map.Strict as M
import qualified Language.Mimsa.Actions.Monad as Actions
import Language.Mimsa.Core
import Language.Mimsa.Project.Helpers
import Language.Mimsa.Ty... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Actions/Helpers/LookupExpression.hs | haskell | module Language.Mimsa.Actions.Helpers.LookupExpression
( lookupModule,
lookupModuleByName,
)
where
import Control.Monad.Except
import qualified Data.Map.Strict as M
import qualified Language.Mimsa.Actions.Monad as Actions
import Language.Mimsa.Core
import Language.Mimsa.Project.Helpers
import Language.Mimsa.Ty... | |
52402d3651e842fd71cea8f4877b7056aa698f10912983e58960579689690c02 | tormaroe/ropy | ropy-operation.lisp | (in-package :cl-user)
(defpackage ropy-operation
(:documentation "Implements the user operations of Ropy.")
(:use cl ropy-util ropy-state)
(:export #:push-value
#:operationp))
(in-package :ropy-operation)
(defparameter *operations* ()
"Will become an association list mapping characters (program toke... | null | https://raw.githubusercontent.com/tormaroe/ropy/95a27abd4838687d9e11418a16cfcaa19b34f4e8/common_lisp/ropy-operation.lisp | lisp |
This is mostly masturbatory I guess - I just wanted to see how it would turn out.
Exported API
The operations
| (in-package :cl-user)
(defpackage ropy-operation
(:documentation "Implements the user operations of Ropy.")
(:use cl ropy-util ropy-state)
(:export #:push-value
#:operationp))
(in-package :ropy-operation)
(defparameter *operations* ()
"Will become an association list mapping characters (program toke... |
a8ac8496458bc747e833fdc869d4d497717906455e5e4613b4c2230979fbd54a | BekaValentine/SimpleFP-v2 | Parser.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeSynonymInstances #-}
module Require.Core.Parser where
import Control.Applicative ((<$>),(<*>),(*>),(<*))
import Control.Monad.Reader
import Data.List (foldl')
import Text.Parsec
import qualified Text.Parsec.Token as Token
import Utils... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Require/Core/Parser.hs | haskell | # LANGUAGE TypeSynonymInstances #
Language Definition
names
term parsers
statement parsers
open settings
modules
programs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Require.Core.Parser where
import Control.Applicative ((<$>),(<*>),(*>),(<*))
import Control.Monad.Reader
import Data.List (foldl')
import Text.Parsec
import qualified Text.Parsec.Token as Token
import Utils.ABT hiding (shift)
import Utils.Names... |
58fe29b2c432646c2cfcf24ace576c769b3c528c052bb07ff70e20e06102247d | jgoerzen/ftphs | ftptest.hs | -- arch-tag: FTP test
import MissingH.Network.FTP.Server
import MissingH.Network.SocketServer
import MissingH.Logging.Logger
import MissingH.IO.HVFS
import MissingH.IO.HVFS.Combinators
main = do
updateGlobalLogger "" (setLevel DEBUG)
updateGlobalLogger "MissingH.Network.FTP.Server" (setLevel DEBUG)
... | null | https://raw.githubusercontent.com/jgoerzen/ftphs/b20bfa0d94cc195d94224b4bcd17482b33b6f913/examples/ftptest.hs | haskell | arch-tag: FTP test | import MissingH.Network.FTP.Server
import MissingH.Network.SocketServer
import MissingH.Logging.Logger
import MissingH.IO.HVFS
import MissingH.IO.HVFS.Combinators
main = do
updateGlobalLogger "" (setLevel DEBUG)
updateGlobalLogger "MissingH.Network.FTP.Server" (setLevel DEBUG)
let opts = (simpleTC... |
e852223729241834c01b1ab310571a59e37988a80e75ad6a05234d2809aec3a3 | brianhempel/maniposynth | camlinternalFormat.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/brianhempel/maniposynth/8c8e72f2459f1ec05fefcb994253f99620e377f3/ocaml-4.07.1/stdlib/camlinternalFormat.ml | ocaml | ************************************************************************
OCaml
... | , ENSTA
Copyright 2014 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open CamlinternalFormatBasics
type mutable_char_set = bytes
let create_char_set () = Bytes.make 32 '\000... |
2784cb059c2e51556ca1c4c74266f7fe42d834652bf563f8e56b8d0bebaa4de7 | janestreet/ocaml_plugin | shell.mli | open! Core
open! Async
* Global properties regarding bash sys calls . Echo would print the command before
running them , and verbose would print the full output of the command .
running them, and verbose would print the full output of the command. *)
val set_defaults : ?verbose:bool -> ?echo:bool -> unit ->... | null | https://raw.githubusercontent.com/janestreet/ocaml_plugin/7edff57f62e1d0039719f8f29c3e9d0aa85568a2/src/shell.mli | ocaml | * Offers a command line param to set verbose and echo directly.
* When this function succeed, it returns a absolute pathname.
default: "ocaml_plugin_"
default: ".build" | open! Core
open! Async
* Global properties regarding bash sys calls . Echo would print the command before
running them , and verbose would print the full output of the command .
running them, and verbose would print the full output of the command. *)
val set_defaults : ?verbose:bool -> ?echo:bool -> unit ->... |
360a0b47968c1e6cb00233c8945f714ac03d4e8373335bffb062cd30920f7e81 | RolfRolles/PandemicML | IDAColor.mli | * Module for coloring strings for displaying them elsewhere in IDA .
(** {6 Types} *)
* The color pallette that IDA supports as literals .
type idacolor =
COLOR_DEFAULT
| COLOR_REGCMT
| COLOR_RPTCMT
| COLOR_AUTOCMT
| COLOR_INSN
| COLOR_DATNAME
| COLOR_DNAME
| COLOR_DEMNAME
| COLOR_SYMBOL
| COLOR... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/IDA/IDAColor.mli | ocaml | * {6 Types}
* Make a string of the given color
* Shortcut for COLOR_INSN
* Shortcut for COLOR_SYMBOL
* Shortcut for COLOR_REG
* Shortcut for COLOR_VOIDOP
* Shortcut for COLOR_NUMBER | * Module for coloring strings for displaying them elsewhere in IDA .
* The color pallette that IDA supports as literals .
type idacolor =
COLOR_DEFAULT
| COLOR_REGCMT
| COLOR_RPTCMT
| COLOR_AUTOCMT
| COLOR_INSN
| COLOR_DATNAME
| COLOR_DNAME
| COLOR_DEMNAME
| COLOR_SYMBOL
| COLOR_CHAR
| COLOR_S... |
dd75286d3afb16cae00420d9d9cfd46bd7dfe7b0430720fceff9c71e06735e76 | bdeket/rktsicm | flovec.rkt | #lang racket/base
(require rackunit
"../../../../numerics/signals/cph-dsp/flovec.rkt"
racket/flonum
)
(define F (flo:make-initialized-vector 5 values))
(define G (flo:make-vector 8 3))
(define the-tests
(test-suite
"numerics/signals/cph-dsp/flovec"
(check-equal? (flonum-vect... | null | https://raw.githubusercontent.com/bdeket/rktsicm/9a6177d98040f058214add392bd791f5259b83b5/rktsicm/sicm/tests/numerics/signals/cph-dsp/flovec.rkt | racket | #lang racket/base
(require rackunit
"../../../../numerics/signals/cph-dsp/flovec.rkt"
racket/flonum
)
(define F (flo:make-initialized-vector 5 values))
(define G (flo:make-vector 8 3))
(define the-tests
(test-suite
"numerics/signals/cph-dsp/flovec"
(check-equal? (flonum-vect... | |
b7992456707f91ed7b44c3f9b197ba17b27f5af9fc35757804c9ef065ee53a1e | dbuenzli/webs | env.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2012 The webs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/webs/48873ce894f99d6e4b8ef5b55bdf551019ba9e59/attic/env.mli | ocaml | * Service environments {b TODO} try to do without.
Environments are heterogenous key-value maps attached to requests and
responses. They can be used by services and layers to store and share
data.
* The type for keys for whose lookup value is of type ['a].
* [key ()] is a new key.
* The type for environ... | ---------------------------------------------------------------------------
Copyright ( c ) 2012 The webs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... |
f1906ee657e744ff4576de2ce9be360c4927bf118f0a64423be852c74626d8b3 | joaotavora/sly | corman.lisp | ;;;
slynk-corman.lisp --- specific code for SLY .
;;;
Copyright ( C ) 2004 , 2005 ( )
;;;
;;; License
;;; =======
;;; This software is provided 'as-is', without any express or implied
;;; warranty. In no event will the author be held liable for any damages
;;; arising from the use of this software.
;;;
;;; Per... | null | https://raw.githubusercontent.com/joaotavora/sly/5966d68727898fa6130fb6bb02208f70aa8d5ce3/slynk/backend/corman.lisp | lisp |
License
=======
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter i... | slynk-corman.lisp --- specific code for SLY .
Copyright ( C ) 2004 , 2005 ( )
2 . Altered source versions must be plainly marked as such , and must
3 . This notice may not be removed or altered from any source
Notes
You will need CCL 2.51 , and you will * definitely * need to patch
CCL with the patch... |
e76d669f25323fcc2e8483f302444f415661c96eb272ae7cb2edd8df8854fb28 | juji-io/datalevin | remote_kv_test.clj | (ns datalevin.remote-kv-test
(:require [datalevin.remote :as sut]
[datalevin.lmdb :as l]
[datalevin.util :as u]
[datalevin.datom :as d]
[datalevin.core :as dc]
[datalevin.interpret :as i]
[datalevin.test.core :refer [server-fixture]]
... | null | https://raw.githubusercontent.com/juji-io/datalevin/3d52d7cb0d29b84cabfebee7c5c3e9319116cc61/test/datalevin/remote_kv_test.clj | clojure | (ns datalevin.remote-kv-test
(:require [datalevin.remote :as sut]
[datalevin.lmdb :as l]
[datalevin.util :as u]
[datalevin.datom :as d]
[datalevin.core :as dc]
[datalevin.interpret :as i]
[datalevin.test.core :refer [server-fixture]]
... | |
37758f79d44cf023ffab049a1b4f44c31857802dadf2ff95233293aea6744aad | liqula/react-hs | State.hs | module State (State(State)) where
import State.Left
data State = State LeftState Int
deriving Eq
| null | https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs-examples/redux/src/State.hs | haskell | module State (State(State)) where
import State.Left
data State = State LeftState Int
deriving Eq
| |
dd5edb96f5c570a3920c4110873814a22749e7924b00454563fd494ec1ac719c | andrewMacmurray/haskell-book-solutions | Exercises.hs | module Ch18.Exercises where
import Control.Monad
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Ch17.List
data Nope a =
NopeDotJpg
deriving (Eq, Show)
instance Functor Nope where
fmap _ NopeDotJpg = NopeDotJpg
instance Applicative Nope where
pure _ = NopeDotJpg
... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch18/Exercises.hs | haskell | building from List instances in previous chapter | module Ch18.Exercises where
import Control.Monad
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Ch17.List
data Nope a =
NopeDotJpg
deriving (Eq, Show)
instance Functor Nope where
fmap _ NopeDotJpg = NopeDotJpg
instance Applicative Nope where
pure _ = NopeDotJpg
... |
45e7dc4f81344b61ef2d1da5052e06618ca418c35726d9c563a965207f3c4977 | ygmpkk/house | GraphicsEvent.hs | module GraphicsEvent
( Event(..)
) where
import GraphicsTypes( Point )
import GraphicsKey (Key)
-- We probably need a lot more info about the event
-- but this will do for now.
----------------------------------------------------------------
Interface
------------------------------------------------------------... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/hslibs/graphics/lib/win32/GraphicsEvent.hs | haskell | We probably need a lot more info about the event
but this will do for now.
--------------------------------------------------------------
--------------------------------------------------------------
after a key*press*. At least under X, a single key press might yield
The Key event is intended for reporting key u... | module GraphicsEvent
( Event(..)
) where
import GraphicsTypes( Point )
import GraphicsKey (Key)
Interface
Note : The event is for delivering properly translated characters
0 , 1 or more characters after translation ( see ) .
* abstract * keys , i.e. rather than KeyCodes in X terms .
keys and the like... |
9d05db6ffd27527f0f4d6d24205a67875ec7064058be2aaff2d01f6e5885fd07 | Clozure/ccl-tests | subtypep-cons.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Feb 15 11:57:03 2003
;;;; Contains: Tests for subtype relationships on cons types
(in-package :cl-test)
(compile-and-load "types-aux.lsp")
SUBTYPEP on CONS types
(defvar *cons-types*
'(cons (cons) (cons *) (cons * *) (cons t) (cons t t)
(cons t *) (con... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/subtypep-cons.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for subtype relationships on cons types
Test suggested by C.R.
a -> b, a ==> b
a -> b, not b ==> not a
(and (or a b) (or (not b) c)) ==> (or a c) | Author :
Created : Sat Feb 15 11:57:03 2003
(in-package :cl-test)
(compile-and-load "types-aux.lsp")
SUBTYPEP on CONS types
(defvar *cons-types*
'(cons (cons) (cons *) (cons * *) (cons t) (cons t t)
(cons t *) (cons * t)))
(deftest subtypep.cons.1
(loop for t1 in *cons-types*
append (loop for t... |
673ea1d7338fe1fbef7cdb4621bfb222699422b7a8b01bf0c2e576738d0fd70e | chef/chef-server | chef_db_darklaunch.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
Copyright Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%%... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_db/src/chef_db_darklaunch.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.
define. The default included ... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
Copyright Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
... |
3d86874fdbeef1d66525474774efc314a2daa5f04bad279d0544caed9e45e4e1 | thriqon/pandoc-plantuml-diagrams | FormatsSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.Pandoc.PlantUML.Filter.FormatsSpec where
import Test.Hspec
import Text.Pandoc.Definition
import Text.Pandoc.PlantUML.Filter.Formats
import Data.Text
formatFor :: Text -> Text
formatFor = imageFormatTypeFor . Format
shouldBeFormattedAs :: Text -> Text -> Expectation
sho... | null | https://raw.githubusercontent.com/thriqon/pandoc-plantuml-diagrams/a3f4e30fb14a38ba53b6937db869a7cbf2f6cabf/test/Text/Pandoc/PlantUML/Filter/FormatsSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Text.Pandoc.PlantUML.Filter.FormatsSpec where
import Test.Hspec
import Text.Pandoc.Definition
import Text.Pandoc.PlantUML.Filter.Formats
import Data.Text
formatFor :: Text -> Text
formatFor = imageFormatTypeFor . Format
shouldBeFormattedAs :: Text -> Text -> Expectation
shouldBeFormattedAs docFormat imageFor... |
e8468ab38d2839d638c306daa217d0d70147eb92349c98e6378e5f1989ba6747 | haskell/haskell-language-server | InlineRecord.hs | module Record2 where
-- | A record
data Record = A { a :: Int , b :: String } | B { bb :: Double }
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/217573f4a13e0a222739d4e2c3adccf2eaa0aab8/plugins/hls-haddock-comments-plugin/test/testdata/InlineRecord.hs | haskell | | A record | module Record2 where
data Record = A { a :: Int , b :: String } | B { bb :: Double }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.