_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 |
|---|---|---|---|---|---|---|---|---|
85c32bfb002b6050199f54b2aa8310855bfd75a32e0294abc352f3bd26a8b38c | vaibhavsagar/experiments | TypeCode.hs | module Dotnet.System.TypeCode where
import Dotnet
import qualified Dotnet.System.Enum
data TypeCode_ a
type TypeCode a = Dotnet.System.Enum.Enum (TypeCode_ a)
| null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/lib/Dotnet/System/TypeCode.hs | haskell | module Dotnet.System.TypeCode where
import Dotnet
import qualified Dotnet.System.Enum
data TypeCode_ a
type TypeCode a = Dotnet.System.Enum.Enum (TypeCode_ a)
| |
b84abe3718205fea4cd96abc8a70541c85095c49ebe986843898e745c1c338a9 | nathanmarz/storm-deploy | storm.clj | (ns backtype.storm.crate.storm
(:use [clojure.contrib.def :only [defnk]]
[pallet.compute :only [running? primary-ip private-ip]]
[pallet.compute.jclouds]
[org.jclouds.compute2 :only [nodes-in-group]]
[pallet.configure :only [compute-service-properties pallet-config]]
[backtype.... | null | https://raw.githubusercontent.com/nathanmarz/storm-deploy/b97265bb8b79f84f5907deb826c702e9c4947305/src/clj/backtype/storm/crate/storm.clj | clojure | empty string for pallet
TODO: need to replace $HOME with the hardcoded absolute path
TODO: need to replace $HOME with the hardcoded absolute path | (ns backtype.storm.crate.storm
(:use [clojure.contrib.def :only [defnk]]
[pallet.compute :only [running? primary-ip private-ip]]
[pallet.compute.jclouds]
[org.jclouds.compute2 :only [nodes-in-group]]
[pallet.configure :only [compute-service-properties pallet-config]]
[backtype.... |
60a8897103eee58b3b89a03bb3350814e9c8ae5a834d62eabfe8b044d3062eed | arttuka/reagent-material-ui | static_time_picker.cljs | (ns reagent-mui.x.static-time-picker
"Imports @mui/x-date-pickers/StaticTimePicker as a Reagent component.
Original documentation is at -pickers/static-time-picker/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/StaticTimePicker" :as MuiStaticTimePicker]))
(def static-time-picker (r/adapt-r... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/x/reagent_mui/x/static_time_picker.cljs | clojure | (ns reagent-mui.x.static-time-picker
"Imports @mui/x-date-pickers/StaticTimePicker as a Reagent component.
Original documentation is at -pickers/static-time-picker/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/StaticTimePicker" :as MuiStaticTimePicker]))
(def static-time-picker (r/adapt-r... | |
6ce2eb62c0954d204205770b17570d3545586a010639c723de87418b27cc775d | AmpersandTarski/Ampersand | HasClasses.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Ampersand.Misc.HasClasses where
import Ampersand.Basics
import Ampersand.Misc.Defaults (defaultDirPrototype)
import RIO.FilePath
import qualified RIO.List as L
import qualified RIO.Text as T
class HasOptions a where
showOptions :: HasLogFunc e... | null | https://raw.githubusercontent.com/AmpersandTarski/Ampersand/1ce12e089d25977b27d934f07be4ed2be64a71a1/src/Ampersand/Misc/HasClasses.hs | haskell | A tuple containing the 'key' and the value of the options.
# MINIMAL optsList #
instance (HasOptions a, Foldable f, Functor f) => HasOptions (f a) where
prefix database identifiers with this namespace, to isolate namespaces within the same database.
Default values for CRUD functionality in interfaces
| Normally th... | # LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Ampersand.Misc.HasClasses where
import Ampersand.Basics
import Ampersand.Misc.Defaults (defaultDirPrototype)
import RIO.FilePath
import qualified RIO.List as L
import qualified RIO.Text as T
class HasOptions a where
showOptions :: HasLogFunc e... |
d1cbf906550039511af1467cfef73b7fac1f1920a193c1c36907fd439e6d3fff | haskell-gi/haskell-gi | CodeGen.hs | module Data.GI.CodeGen.CodeGen
( genConstant
, genFunction
, genModule
) where
import Control.Monad (forM, forM_, when, unless, filterM)
import Data.List (nub)
import Data.Maybe (fromJust, fromMaybe, catMaybes, mapMaybe)
#if !MIN_VERSION_base(4,13,0)
import Data.Monoid ((<>))
#endif
import qualified Da... | null | https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/lib/Data/GI/CodeGen/CodeGen.hs | haskell | Only generate the function if it has not been moved.
| Create the newtype wrapping the ManagedPtr for the given type.
| Generate wrapper for structures.
Generate a builder for a structure filled with zeroes.
Generate code for fields.
Methods
Overloaded methods
| Generated wrapper for unions.
Generate a builder... | module Data.GI.CodeGen.CodeGen
( genConstant
, genFunction
, genModule
) where
import Control.Monad (forM, forM_, when, unless, filterM)
import Data.List (nub)
import Data.Maybe (fromJust, fromMaybe, catMaybes, mapMaybe)
#if !MIN_VERSION_base(4,13,0)
import Data.Monoid ((<>))
#endif
import qualified Da... |
dd4cf9cd18382c8232b93492d95a2bc8b1c3a1bdfc57bb6a1979de7dfa00bda6 | input-output-hk/cardano-wallet | EraFun.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
--... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/97e183d3a1999f8e5658a3883785a293b3beda21/lib/wallet/src/Cardano/Wallet/Read/Eras/EraFun.hs | haskell | # LANGUAGE RankNTypes #
|
License: Apache-2.0
A datatype that represents a vector of functions covering all known eras
The functions are supposed to map values from and to the same era.
We removed the cached encoding at the price of 'toEraFun' and 'fromEraFun'
If the computed functions after record compositions... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
Copyright : © 2020 - 2022 IO... |
ac6d18692f46177ae83c4247d7ed092c5aa25e1e8b4cd1dcfc0bc821aa4c9ef9 | MLstate/opalang | jsonLex.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/jsonLex.ml | ocaml | Types
End of stream / file
An ident without quotes
Spaces
Strings
* Print token contained on given string. Used for debug.
convert the JSON AST to an OPA type
-archives/caml-list/2005/01/52cbc2cd2be4fc7ea0f00c39a760bf59.en.html
conv |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
a8ad667d7bf30c0bad55a8ed96c047cec322025022d68c347282e9a4856ff2bc | eudoxia0/cmacro | printer.lisp | (in-package :cl-user)
(defpackage :cmacro.printer
(:use :cl :anaphora)
(:import-from :cmacro.token
:<text-token>
:token-text
:<void-token>
:<operator>
:<variable>
:<preproc>
:var-name
:var... | null | https://raw.githubusercontent.com/eudoxia0/cmacro/c1f419564a21c878ab62a54c2c45ee07d2968242/src/printer.lisp | lisp | (in-package :cl-user)
(defpackage :cmacro.printer
(:use :cl :anaphora)
(:import-from :cmacro.token
:<text-token>
:token-text
:<void-token>
:<operator>
:<variable>
:<preproc>
:var-name
:var... | |
c3f51a685ea1d790d6faa1796e2734ed444c5a793fe167dc1627c5a49a65a596 | ds-wizard/engine-backend | Migration.hs | module Wizard.Database.Migration.Production.Migration_0026_locale_3.Migration (
definition,
) where
import Control.Monad.Logger
import Control.Monad.Reader (liftIO)
import Data.Pool (Pool, withResource)
import Database.PostgreSQL.Migration.Entity
import Database.PostgreSQL.Simple
definition = (meta, migrate)
meta ... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/77e174a49e972baf6fcb22ef967efebc21d72fe9/engine-wizard/src/Wizard/Database/Migration/Production/Migration_0026_locale_3/Migration.hs | haskell | module Wizard.Database.Migration.Production.Migration_0026_locale_3.Migration (
definition,
) where
import Control.Monad.Logger
import Control.Monad.Reader (liftIO)
import Data.Pool (Pool, withResource)
import Database.PostgreSQL.Migration.Entity
import Database.PostgreSQL.Simple
definition = (meta, migrate)
meta ... | |
cc39a30a9b8239e70cb447135ad223f0f682a7c05a7984618d4f9606e55b1df8 | ghilesZ/picasso | picasso.mli | * is an Abstract element drawing library . It handles most of the
boilerplate you usually write to draw abstract elements and allows you to
view those .
boilerplate you usually write to draw abstract elements and allows you to
view those. *)
open Apron
(** Colors handling *)
module Colors : sig
*... | null | https://raw.githubusercontent.com/ghilesZ/picasso/3b0e7369a6184b21f9ae53d525542b20878e1ac3/src/picasso.mli | ocaml | * Colors handling
* Constructor
* Module of drawable abstractions
* {1 Types}
* The type of drawable abstractions
* Drawing dimensions are given string identifiers
* Multi-dimensional points
* Float ranges
* {1 Constructors}
* Drawable from an element of the Boxes abstract domain
* Builds the drawable space c... | * is an Abstract element drawing library . It handles most of the
boilerplate you usually write to draw abstract elements and allows you to
view those .
boilerplate you usually write to draw abstract elements and allows you to
view those. *)
open Apron
module Colors : sig
* Type of colors , using... |
05d9abaaca569a91d01d8de3943fe1b7394ee25d2031f6a8d69dcb376b3f57af | bgusach/exercises-htdp2e | ex-241.rkt | #lang htdp/isl
# # # Data Definitions
A [ NEList - of TYPE ] is one of :
; - (cons TYPE '())
- ( cons TYPE [ NEList - of TYPE ] )
| null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-241.rkt | racket | - (cons TYPE '()) | #lang htdp/isl
# # # Data Definitions
A [ NEList - of TYPE ] is one of :
- ( cons TYPE [ NEList - of TYPE ] )
|
ec36c56fa4f9723d8bf46e979a04cd487c24f41df64b81e7683b78581452bc09 | ocaml-flambda/ocaml-jst | seq.mli | # 1 "seq.mli"
(**************************************************************************)
(* *)
(* OCaml *)
(* *... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/stdlib/seq.mli | ocaml | ************************************************************************
OCaml
... | # 1 "seq.mli"
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open! Stdlib
* Sequences .
A sequence of type [ ' a Seq.t ] can be thought of as a { b ... |
df56d31123ed7466a616c5b35b3c96aee3dfdfc2d7da98cff67b9a868007a03c | hyperfiddle/electric | electric_compiler_internals.cljc | (ns user.electric.electric-compiler-internals
(:require [hyperfiddle.electric :as e]
#?(:clj [hyperfiddle.electric.impl.compiler :refer [analyze]])
#?(:clj [hyperfiddle.electric.impl.runtime :as r :refer [emit]])
[hyperfiddle.electric.impl.ir :as ir]
[hyperfiddle.electr... | null | https://raw.githubusercontent.com/hyperfiddle/electric/2446937b21440bf4faed8123e2ee544110203cee/src-docs/user/electric/electric_compiler_internals.cljc | clojure | client only first example
Intermediate Language for DAGs. | (ns user.electric.electric-compiler-internals
(:require [hyperfiddle.electric :as e]
#?(:clj [hyperfiddle.electric.impl.compiler :refer [analyze]])
#?(:clj [hyperfiddle.electric.impl.runtime :as r :refer [emit]])
[hyperfiddle.electric.impl.ir :as ir]
[hyperfiddle.electr... |
4197e19488e41a2a14fb4bafbf9bbc7d7393d2f0bf9a82390b98da9f18da3a0e | philnguyen/soft-contract | r-lock.rkt | #lang racket
(provide/contract
[main (integer? . -> . (one-of/c 0))])
(define (lock st) 1)
(define (unlock st) 0)
(define (f n st) (if (> n 0) (lock st) st))
(define (g n st) (if (> n 0) (unlock st) st))
(define (main n) (g n (f n 0)))
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/mochi/r-lock.rkt | racket | #lang racket
(provide/contract
[main (integer? . -> . (one-of/c 0))])
(define (lock st) 1)
(define (unlock st) 0)
(define (f n st) (if (> n 0) (lock st) st))
(define (g n st) (if (> n 0) (unlock st) st))
(define (main n) (g n (f n 0)))
| |
5c223edf8bc9ee5b245054d144975dd1e2616192fcb6aaf58332229b4514be37 | liquidz/antq | shadow.clj | (ns antq.upgrade.shadow
(:require
[antq.constant :as const]
[antq.upgrade :as upgrade]
[antq.util.dep :as u.dep]
[antq.util.zip :as u.zip]
[rewrite-clj.zip :as z]))
(defn- in-dependencies?
[loc]
(loop [loc (-> loc z/up z/up)]
(case (z/tag loc)
:meta (recur (z/up loc))
:vector (= :d... | null | https://raw.githubusercontent.com/liquidz/antq/4b7eba8128f421d1741c7f266cf6154272e17df1/src/antq/upgrade/shadow.clj | clojure | (ns antq.upgrade.shadow
(:require
[antq.constant :as const]
[antq.upgrade :as upgrade]
[antq.util.dep :as u.dep]
[antq.util.zip :as u.zip]
[rewrite-clj.zip :as z]))
(defn- in-dependencies?
[loc]
(loop [loc (-> loc z/up z/up)]
(case (z/tag loc)
:meta (recur (z/up loc))
:vector (= :d... | |
627219896c9bfbce02cb00f1054c983a555b6a64ade643d21b9b97edaee6197b | bitblaze-fuzzball/fuzzball | fragment_machine.mli |
Copyright ( C ) BitBlaze , 2009 - 2013 , and copyright ( C ) 2010 Ensighta
Security Inc. All rights reserved .
Copyright (C) BitBlaze, 2009-2013, and copyright (C) 2010 Ensighta
Security Inc. All rights reserved.
*)
class virtual special_handler : object
method virtual handle_special : string -> Vin... | null | https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/fragment_machine.mli | ocaml | Common to x86, x64, and ARM:
Common to x86 and x64:
x86
x64
This virtual class is the outside interface to a fragment machine,
hiding internal methods. It's also convenient that it hides the domain
functors. |
Copyright ( C ) BitBlaze , 2009 - 2013 , and copyright ( C ) 2010 Ensighta
Security Inc. All rights reserved .
Copyright (C) BitBlaze, 2009-2013, and copyright (C) 2010 Ensighta
Security Inc. All rights reserved.
*)
class virtual special_handler : object
method virtual handle_special : string -> Vin... |
0f676f354467b356206509d900e4ec129cc9ec65daa5fbb9d7e39d5b3a00c45d | rabbitmq/rabbitmq-peer-discovery-k8s | config_schema_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(config_schema_SUITE).
-compile(export_al... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-peer-discovery-k8s/f36efe7d24a80e17e3a6d14a80caafc47c618dc9/test/config_schema_SUITE.erl | erlang |
-------------------------------------------------------------------
Testsuite setup/teardown.
-------------------------------------------------------------------
-------------------------------------------------------------------
Testcases.
------------------------------------------------------------------- | 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 ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(config_schema_SUITE).
-compile(export_all).
a... |
537912008598c402034c9148e94419398b8499b265931932e90f14d25e375881 | onedata/op-worker | transfer_stats_callback_behaviour.erl | %%%--------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% It is the behaviour of replica_s... | null | https://raw.githubusercontent.com/onedata/op-worker/f557082905a14080e7a9b83e125c0a7c4d45f5fc/src/modules/fslogic/replication/transfer_stats_callback_behaviour.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
It is the behaviour of replica_synchronizer stats callback module.
It defines ways of handling files synchronization transfer statistics
by replica_synchronizer depen... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(transfer_stats_callback_behaviour).
-author("Michal Stanisz").
-callback flush_stats(od_space:id(), transfer:id(), #{od_provider:id() => integer()}) ->
ok | {error, term()}.
|
9555614561471faf2981a802b1e85f4fa4cfb8c4fc5e80429defd2c6b95ecead | NetComposer/nklib | nklib_parse_csv.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nklib/1f29f8f566586618651e4680dcc488f2dc11ff5c/src/nklib_parse_csv.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 permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@private Fast CSV Parser
-... |
64f57b14bb7b6a774e88a268851b9124e2e8615931c72d83984680838053ee95 | tensorflow/haskell | ControlFlow.hs | Copyright 2016 TensorFlow authors .
--
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
distr... | null | https://raw.githubusercontent.com/tensorflow/haskell/d088e30b80f1508281e400975bec9d14b431a22c/tensorflow/src/TensorFlow/ControlFlow.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2016 TensorFlow authors .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE ScopedTypeVariables #
module TensorFlow.ControlFlow
withControlDependencies
, group
, noOp
) where
import T... |
f996fec522b37541db537b6beacb9fe8f9ba736d54371b23ef2dd0935258d487 | mirage/digestif | baijiu_sha3.ml | module By = Digestif_by
module Bi = Digestif_bi
let nist_padding = 0x06L
let keccak_padding = 0x01L
module Int64 = struct
include Int64
let ( lsl ) = Int64.shift_left
let ( lsr ) = Int64.shift_right_logical
let ( asr ) = Int64.shift_right
let ( lor ) = Int64.logor
let ( land ) = Int64.logand
let ( lxor... | null | https://raw.githubusercontent.com/mirage/digestif/a94075cfec70fbcb31e15f94e28cb715c9e4d9dd/src-ocaml/baijiu_sha3.ml | ocaml | block size
output size
Theta
Rho Pi
Chi
Get hash | module By = Digestif_by
module Bi = Digestif_bi
let nist_padding = 0x06L
let keccak_padding = 0x01L
module Int64 = struct
include Int64
let ( lsl ) = Int64.shift_left
let ( lsr ) = Int64.shift_right_logical
let ( asr ) = Int64.shift_right
let ( lor ) = Int64.logor
let ( land ) = Int64.logand
let ( lxor... |
45fc8b78e6a84c9f2345968db08434e736d00c87376d7ac02406708800499c1b | uhc/uhc | OnlyResultHeuristics.hs | | Module : OnlyResultHeuristics
License : GPL
Maintainer :
Stability : experimental
Portability : portable
Two ( filter ) heuristics that prevent an application or a negation to be
reported as incorrect if only the result type is reponsible for non - un... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/helium/StaticAnalysis/Heuristics/OnlyResultHeuristics.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
| | Module : OnlyResultHeuristics
License : GPL
Maintainer :
Stability : experimental
Portability : portable
Two ( filter ) heuristics that prevent an application or a negation to be
reported as incorrect if only the result type is reponsible for non - un... |
0cf4c6650bec7826394bda195d6041607e26d0c1a25b090f73a0f36717b6bc45 | agda/agda | Functions.hs |
module Agda.TypeChecking.Functions
( etaExpandClause
, getDef
) where
import Control.Arrow ( first )
import Agda.Syntax.Common
import Agda.Syntax.Internal
import Agda.TypeChecking.Monad.Base
import Agda.TypeChecking.Monad.Context
import Agda.TypeChecking.Monad.Debug
import Agda.TypeChecking.Level
import Agda.... | null | https://raw.githubusercontent.com/agda/agda/9c6b0520529b8aabada5af7e0e1510fee3f2c44d/src/full/Agda/TypeChecking/Functions.hs | haskell | | Expand a clause to the maximal arity, by inserting variable
patterns and applying the body to variables.
Replaces 'introHiddenLambdas'.
See, e.g., test/Succeed/SizedTypesExtendedLambda.agda.
This is used instead of special treatment of lambdas
Get the telescope to expand the clause with.
If the rhs has la... |
module Agda.TypeChecking.Functions
( etaExpandClause
, getDef
) where
import Control.Arrow ( first )
import Agda.Syntax.Common
import Agda.Syntax.Internal
import Agda.TypeChecking.Monad.Base
import Agda.TypeChecking.Monad.Context
import Agda.TypeChecking.Monad.Debug
import Agda.TypeChecking.Level
import Agda.... |
9eb8352711b11820363f9f839a4b8976bf72d2fa529e801cfee01ab6ade78899 | JacquesCarette/Drasil | Assumptions.hs | module Drasil.GlassBR.Assumptions (assumpGT, assumpGC, assumpES, assumpSV,
assumpGL, assumpBC, assumpRT, assumpLDFC, assumptionConstants,
assumptions) where
import Language.Drasil hiding (organization)
import qualified Drasil.DocLang.SRS as SRS (valsOfAuxCons)
import Language.Drasil.Chunk.Concept.NamedCombinators
... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/glassbr/lib/Drasil/GlassBR/Assumptions.hs | haskell | module Drasil.GlassBR.Assumptions (assumpGT, assumpGC, assumpES, assumpSV,
assumpGL, assumpBC, assumpRT, assumpLDFC, assumptionConstants,
assumptions) where
import Language.Drasil hiding (organization)
import qualified Drasil.DocLang.SRS as SRS (valsOfAuxCons)
import Language.Drasil.Chunk.Concept.NamedCombinators
... | |
2f54c04679435914c6325c04a8926f0f0355fe2646238937a14f879a61f30c2d | zadarnowski/postgresql-wire-protocol | Encoders.hs | -- | Module: Database.PostgreSQL.Protocol.Encoders
-- Description: Encoders for PostgreSQL messages.
Copyright : © 2015 - 2019 < >
License : BSD3
Maintainer :
-- Stability: experimental
-- Portability: portable
--
-- This module defines low-level encoders for serialising PostgreSQL messages... | null | https://raw.githubusercontent.com/zadarnowski/postgresql-wire-protocol/00c1414ffd37b4157a335d8736a771175638dd92/src/Database/PostgreSQL/Protocol/Encoders.hs | haskell | | Module: Database.PostgreSQL.Protocol.Encoders
Description: Encoders for PostgreSQL messages.
Stability: experimental
Portability: portable
This module defines low-level encoders for serialising PostgreSQL messages
into lazy byte strings. At this level of abstraction, all message fields
are rendered direc... | Copyright : © 2015 - 2019 < >
License : BSD3
Maintainer :
any more meaningful types , in order to provided higher - level
module Database.PostgreSQL.Protocol.Encoders where
import Data.Bifunctor
import Data.ByteString (ByteString)
import Data.ByteString.Builder
import Data.Int
import Data.... |
157ff277f9bd0953ee3a60ad19f1e62426db639078c41c9e504007dab3a43900 | ngorogiannis/cyclist | prove.ml | open Lib
open Generic
open Program
let defs_path = ref "examples/sl.defs"
let prog_path = ref ""
module GraphComponents = Graph.Components.Make (Proc.Graph)
module Prover = Prover.Make (Seq)
module F = Frontend.Make (Prover)
module Proof = Prover.Proof
module Node = Proofnode.Make (Seq)
let prove_all = ref false
... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/procedure/prove.ml | ocaml | Append all proofs to the same file
TODO: Check well-formedness of the program:
Do all the predicates in the pre/post annotations have the correct arity? | open Lib
open Generic
open Program
let defs_path = ref "examples/sl.defs"
let prog_path = ref ""
module GraphComponents = Graph.Components.Make (Proc.Graph)
module Prover = Prover.Make (Seq)
module F = Frontend.Make (Prover)
module Proof = Prover.Proof
module Node = Proofnode.Make (Seq)
let prove_all = ref false
... |
69ca82541340c8edd63caa07b026545dd5b8643001029da607354520e63762c4 | alex314159/ib-re-actor-976-plus | gateway.clj | (ns ib-re-actor-976-plus.gateway
"The main user interface. Functions for connecting to Interactive Brokers TWS
Gateway and sending requests to it.
The IB API requires consumers to instantiate an object of type
com.ib.client.EClientSocket which is a socket client to the gateway, or TWS.
When instantiating thi... | null | https://raw.githubusercontent.com/alex314159/ib-re-actor-976-plus/4498395794a4c8c2395d8aa25f009a9c1acb076f/src/ib_re_actor_976_plus/gateway.clj | clojure | Default port for live trading
Default port for paper trading (not real money)
Synchronous calls
id-updater (next-id-updater next-id)
(swap! subscribers assoc listener-function listener-function) ; MAIN CHANGE
:next-id next-id | (ns ib-re-actor-976-plus.gateway
"The main user interface. Functions for connecting to Interactive Brokers TWS
Gateway and sending requests to it.
The IB API requires consumers to instantiate an object of type
com.ib.client.EClientSocket which is a socket client to the gateway, or TWS.
When instantiating thi... |
7547817bbf1332c70c59e89fd2bce9d5ebf98de60c0397ce0e390657dc58cb0d | lwhjp/racket-asm | decode.rkt | #lang racket/base
(require racket/list
racket/match
racklog
"instruction.rkt"
"mode.rkt"
"operand.rkt"
"register.rkt")
(provide make-read-instruction)
(define (make-read-instruction op-map)
(define (%decode-instruction ins op-tail expr tail)
(%let (mode opc... | null | https://raw.githubusercontent.com/lwhjp/racket-asm/57abd235fcb8c7505990f8e9731c01c716324ee5/x86/private/decode.rkt | racket | TODO: ip-relative
FIXME: handle multiple segment overrides | #lang racket/base
(require racket/list
racket/match
racklog
"instruction.rkt"
"mode.rkt"
"operand.rkt"
"register.rkt")
(provide make-read-instruction)
(define (make-read-instruction op-map)
(define (%decode-instruction ins op-tail expr tail)
(%let (mode opc... |
5256985598000b37bfaab8cc199e7efa9d706d085fdf4e9c4b3390cc4a1aef97 | MyDataFlow/ttalk-server | rest_simple_resource.erl | -module(rest_simple_resource).
-export([init/3, content_types_provided/2, get_text_plain/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_rest}.
content_types_provided(Req, State) ->
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
get_text_plain(Req, State) ->
{<<"This is REST!">>... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/test/http_SUITE_data/rest_simple_resource.erl | erlang | -module(rest_simple_resource).
-export([init/3, content_types_provided/2, get_text_plain/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_rest}.
content_types_provided(Req, State) ->
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
get_text_plain(Req, State) ->
{<<"This is REST!">>... | |
c42f81657edc97bf61e8f2f99da6bd9914326da51386196e323fe6f91a337740 | typelead/eta | InteractiveEvalTypes.hs | -- -----------------------------------------------------------------------------
--
( c ) The University of Glasgow , 2005 - 2007
--
-- Running statements interactively
--
-- -----------------------------------------------------------------------------
module Eta.Main.InteractiveEvalTypes (
Resume(..), Histo... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/compiler/Eta/Main/InteractiveEvalTypes.hs | haskell | -----------------------------------------------------------------------------
Running statements interactively
-----------------------------------------------------------------------------
import GHC.Stack.CCS
^ stepping mode
^ filename (for errors)
^ line number (for errors)
the original statement
[Id] to ... | ( c ) The University of Glasgow , 2005 - 2007
module Eta.Main.InteractiveEvalTypes (
Resume(..), History(..), ExecResult(..),
SingleStep(..), isStep, ExecOptions(..),
BreakInfo(..)
) where
import Eta.REPL.RemoteTypes
import Eta.REPL.Message (EvalExpr, ResumeContext)
import Eta.BasicT... |
edcc276fa73b4f1e2e6ae5e97f29ffd4f6b868214536b43e9cf439a9fe4f1984 | sheyll/b9-vm-image-builder | Interpreter.hs | -- |
-- Mostly effectful functions to assemble artifacts.
module B9.Artifact.Readable.Interpreter
( buildArtifacts,
assemble,
getArtifactOutputFiles,
runArtifactGenerator,
runArtifactAssembly,
InstanceGenerator (..),
runInstanceGenerator,
InstanceSources (..),
)
where
import B9.Artifact... | null | https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/Artifact/Readable/Interpreter.hs | haskell | |
Mostly effectful functions to assemble artifacts.
| Execute an 'ArtifactGenerator' and return a 'B9Invocation' that returns
the build id obtained by 'getBuildId'.
| Return a list of relative paths for the /local/ files to be generated
by the ArtifactGenerator. This excludes 'Shared' and Transient image targets.... | module B9.Artifact.Readable.Interpreter
( buildArtifacts,
assemble,
getArtifactOutputFiles,
runArtifactGenerator,
runArtifactAssembly,
InstanceGenerator (..),
runInstanceGenerator,
InstanceSources (..),
)
where
import B9.Artifact.Content
import B9.Artifact.Content.Readable
import B9.Art... |
2efa6e75279c276bdd07076167ccf928105e02f93dfdaf870d36a430129903c8 | AstRonin/sgi | login.erl | -module(login).
-compile(export_all).
-include_lib("kvs/include/feed.hrl").
-include_lib("nitro/include/nitro.hrl").
-include_lib("n2o/include/wf.hrl").
main() -> #dtl{file="login",app=review,bindings=[{body,body()},{folders,folders()}]}.
folders() -> string:join([filename:basename(F)||F<-filelib:wildcard(code:priv_di... | null | https://raw.githubusercontent.com/AstRonin/sgi/3854b62b6ce46ba71abd1e76e9cf5200dc0b1df3/samples/apps/review/src/login.erl | erlang | -module(login).
-compile(export_all).
-include_lib("kvs/include/feed.hrl").
-include_lib("nitro/include/nitro.hrl").
-include_lib("n2o/include/wf.hrl").
main() -> #dtl{file="login",app=review,bindings=[{body,body()},{folders,folders()}]}.
folders() -> string:join([filename:basename(F)||F<-filelib:wildcard(code:priv_di... | |
529b4c09e14dc5e44db8200283eb7a28cd5ea7f797ad7c37efe1454a252ee24f | gar1t/erlang-redis | lf_dtl.erl | -module(lf_dtl).
-export([render/2]).
render(Template, Vars) ->
M = dtl_module(Template),
case M:render(Vars) of
{ok, Rendered} -> Rendered;
{error, Err} -> error(Err)
end.
dtl_module(Template) ->
Module = module_name(Template),
case dtl_reload_enabled() of
true -> compile... | null | https://raw.githubusercontent.com/gar1t/erlang-redis/fac07e2b6d75d3866221f953c12c3fd066bc1ad1/examples/listfever/src/lf_dtl.erl | erlang | -module(lf_dtl).
-export([render/2]).
render(Template, Vars) ->
M = dtl_module(Template),
case M:render(Vars) of
{ok, Rendered} -> Rendered;
{error, Err} -> error(Err)
end.
dtl_module(Template) ->
Module = module_name(Template),
case dtl_reload_enabled() of
true -> compile... | |
e10d0ec3d93add56d9ffac327b43d26318d0769e032a63b09b1fa1de42e27eba | mikail-khan/hqfl | StockIndex.hs | module Finance.Hqfl.Instrument.StockIndex
(
StockIndex(..)
) where
import Finance.Hqfl.Instrument.Type
data StockIndex = StockIndex Price Dividend deriving (Show)
| null | https://raw.githubusercontent.com/mikail-khan/hqfl/398bd921089522c6c0e6d91893a75615a1f39a2e/src/Finance/Hqfl/Instrument/StockIndex.hs | haskell | module Finance.Hqfl.Instrument.StockIndex
(
StockIndex(..)
) where
import Finance.Hqfl.Instrument.Type
data StockIndex = StockIndex Price Dividend deriving (Show)
| |
a49a7fc24abd66fc47fbd5fa251b7e89cbf2c780ff5bb550b9239b20490908a4 | RichiH/git-annex | Option.hs | common command - line options
-
- Copyright 2010 - 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module CmdLine.Option where
import Options.Applicative
import Annex.Common
import CmdLi... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/CmdLine/Option.hs | haskell | Global options accepted by both git-annex and git-annex-shell sub-commands. | common command - line options
-
- Copyright 2010 - 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module CmdLine.Option where
import Options.Applicative
import Annex.Common
import CmdLi... |
6fcf8186290567d3e8b0de953a8861be168e5827960b95a4b33aaec7dc725569 | stylewarning/deprecated-coalton-prototype | package.lisp | package.lisp
(defpackage #:coalton-tests
(:documentation "Tests for the COALTON system.")
(:use #:cl)
(:export))
| null | https://raw.githubusercontent.com/stylewarning/deprecated-coalton-prototype/4a42ffb4222fde3abfd1b50d96e455ff2eef9fe8/tests/package.lisp | lisp | package.lisp
(defpackage #:coalton-tests
(:documentation "Tests for the COALTON system.")
(:use #:cl)
(:export))
| |
98c13fba4f185ad58c9d02902930a997e116c5611e66c4b60cdb523889acca65 | leepike/Copilot | Test.hs | --------------------------------------------------------------------------------
Copyright © 2011 National Institute of Aerospace / Galois , Inc.
--------------------------------------------------------------------------------
-- | A test suite to check for basic functionality.
module Main where
import System.Dire... | null | https://raw.githubusercontent.com/leepike/Copilot/18a71502c5c9e7262f14bb8167f3b4a09c9c6a8b/Examples/Test.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
| A test suite to check for basic functionality.
------------------------------------------------------------------------------
badExtVars >> cleanup
----... | Copyright © 2011 National Institute of Aerospace / Galois , Inc.
module Main where
import System.Directory ( removeDirectoryRecursive
, doesDirectoryExist
, doesFileExist
, removeFile )
import qualified Copilot.Compile.C99 as C99
import qualif... |
e8a92ec76320ba5de2564f544bc831ac69be185ad59bb17eb57bc445a44c88a1 | inhabitedtype/angstrom | buffering.mli | type t
val create : int -> t
val of_bigstring : off:int -> len:int -> Bigstringaf.t -> t
val feed_string : t -> off:int -> len:int -> string -> unit
val feed_bigstring : t -> off:int -> len:int -> Bigstringaf.t -> unit
val feed_input : t -> [ `String of string | `Bigstring of Bigstringaf.t ] -> unit
val shift : t... | null | https://raw.githubusercontent.com/inhabitedtype/angstrom/d3bd06a3dbdd5960bffa8abbc9925d8f5b3e9922/lib/buffering.mli | ocaml | type t
val create : int -> t
val of_bigstring : off:int -> len:int -> Bigstringaf.t -> t
val feed_string : t -> off:int -> len:int -> string -> unit
val feed_bigstring : t -> off:int -> len:int -> Bigstringaf.t -> unit
val feed_input : t -> [ `String of string | `Bigstring of Bigstringaf.t ] -> unit
val shift : t... | |
c8cc3d8ea1c4f8f825a72bfe393cba7f9edeea6d38893803d61bf3bde18e0dc0 | jlouis/eministat | eministat_SUITE.erl | -module(eministat_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-ifdef(EQC).
-define(EQC_PRESENT, true).
-else.
-define(EQC_PRESENT, false).
-endif.
all() ->
[ligustrum,
reptiles,
bug_000].
groups() -> [].
suite() ->
[{timetrap, {minutes, 2}}].
init_per_suite(Config) ... | null | https://raw.githubusercontent.com/jlouis/eministat/022764f2b8fa45909c38cdc9a28d199656e78526/test/eministat_SUITE.erl | erlang | Tests.
-- INTERNAL FUNCTIONS ------------------------------------ | -module(eministat_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-ifdef(EQC).
-define(EQC_PRESENT, true).
-else.
-define(EQC_PRESENT, false).
-endif.
all() ->
[ligustrum,
reptiles,
bug_000].
groups() -> [].
suite() ->
[{timetrap, {minutes, 2}}].
init_per_suite(Config) ... |
7a2903b2b8e9b88ad98143c8fddcf6a8f0f719db82ad7800b0b14e9da0dd3c31 | Janiczek/clj-markov | core.clj | (ns markov.core
"Markov chains.
Compute the transitional matrix and generate random walks from it."
(:use [markov.reader]))
(defn create-counts [order coll]
"Computes how many times did each 'next state' come from a 'previous state'.
Order must be < (count coll).
The result type is {previous_state {next_s... | null | https://raw.githubusercontent.com/Janiczek/clj-markov/e1da8e1653e029fbc3f38056d7019946013465f4/src/markov/core.clj | clojure | sorts and makes a seq, yay!
Public functions ;;;;
cons _ nil = (_) | (ns markov.core
"Markov chains.
Compute the transitional matrix and generate random walks from it."
(:use [markov.reader]))
(defn create-counts [order coll]
"Computes how many times did each 'next state' come from a 'previous state'.
Order must be < (count coll).
The result type is {previous_state {next_s... |
a5d053c7aa1f6064c18e19667279fe0c86ff59955324bfe0fe8e7416df65b8eb | dyzsr/ocaml-selectml | privrowsabate_ok.ml | (* TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
type 'a termpc =
[`And of 'a * 'a
|`Or of 'a * 'a
|`Not of 'a
|`Atom of string
]
type 'a termk =
[`Dia of 'a
|`Box of 'a
|'a termpc
]
module type T = sig
type term
val map : ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-polyvariants-bugs/privrowsabate_ok.ml | ocaml | TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
|
type 'a termpc =
[`And of 'a * 'a
|`Or of 'a * 'a
|`Not of 'a
|`Atom of string
]
type 'a termk =
[`Dia of 'a
|`Box of 'a
|'a termpc
]
module type T = sig
type term
val map : (term -> term) -> term -> term
val nnf : term -> term
val nnf_not : term -> term
end
module Fpc(X ... |
84a4cb049760df3384fc92961e4da3068965c1307a45f9fb55313abb9ea6dcbc | EveryTian/Haskell-Codewars | simple-assembler-interpreter.hs | -- -assembler-interpreter
module SimpleAssembler (simpleAssembler) where
import qualified Data.Map.Strict as M
import Data.Either
import Data.Maybe (fromMaybe)
type RegisterName = String
type RegisterNameOrConst = Either RegisterName Int
type Registers = M.Map String Int
data Instruction = Mov RegisterName Register... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/5kyu/simple-assembler-interpreter.hs | haskell | -assembler-interpreter
in case result of Just n -> n
Nothing -> 0 |
module SimpleAssembler (simpleAssembler) where
import qualified Data.Map.Strict as M
import Data.Either
import Data.Maybe (fromMaybe)
type RegisterName = String
type RegisterNameOrConst = Either RegisterName Int
type Registers = M.Map String Int
data Instruction = Mov RegisterName RegisterNameOrConst
... |
e03b41d9b1084e7619239fb11bd1b64a4c56a6eea5a2527d79048b2c85195a62 | brendanhay/gogol | Get.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-tpu/gen/Gogol/TPU/Projects/Locations/Operations/Get.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
/See:/ </ Cloud TPU API Reference> for @tpu.projects.locations.operation... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
d0d50ff8e6f87745d8d332a46b7cbbc94d5bf97cc67830975d535d9102636fc5 | avras/nsime | nsime_ipv4_static_routing.erl | %%
Copyright ( C ) 2012 < >
%%
%% This file is part of nsime.
%%
nsime is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later version.... | null | https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/src/nsime_ipv4_static_routing.erl | erlang |
This file is part of nsime.
(at your option) any later version.
nsime is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
along with... | Copyright ( C ) 2012 < >
nsime is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Purpose ... |
ccf0ad79a75a8e5b302c59263ce66af1d27ab224ac8868102233f8df9b1bed9b | haskell-mafia/projector | test.hs | import Disorder.Core.Main
import qualified Test.Projector.Html.Syntax as Syntax
import qualified Test.Projector.Html.Core.Elaborator as Elab
import qualified Test.Projector.Html.Data.Prim as Prim
import qualified Test.Projector.Html.ModuleGraph as ModuleGraph
import qualified Test.Projector.Html.Interpreter ... | null | https://raw.githubusercontent.com/haskell-mafia/projector/6af7c7f1e8a428b14c2c5a508f7d4a3ac2decd52/projector-html/test/test.hs | haskell | import Disorder.Core.Main
import qualified Test.Projector.Html.Syntax as Syntax
import qualified Test.Projector.Html.Core.Elaborator as Elab
import qualified Test.Projector.Html.Data.Prim as Prim
import qualified Test.Projector.Html.ModuleGraph as ModuleGraph
import qualified Test.Projector.Html.Interpreter ... | |
cde86c7b6e87cb1b19a112d6600eb857ed54a5d807711cbd209f0c2d891bdbae | damn/engine | repl.clj | (ns engine.repl
(:require [engine.core :refer [exit-app]]
[engine.dev-loop :refer [dev-loop]]
[nrepl.server :refer [start-server]]
[clojure.tools.namespace.repl :refer [set-refresh-dirs disable-reload!]]))
(println "engine.repl")
; dev-loop is a separate ns & here disable-reload!... | null | https://raw.githubusercontent.com/damn/engine/3fff91e6f6610272b5d3a6f0ada6d89adb218397/test/engine/repl.clj | clojure | dev-loop is a separate ns & here disable-reload!
because otherwise the nrepl-server gets lost at each reload & throws an error
& have to connect again | (ns engine.repl
(:require [engine.core :refer [exit-app]]
[engine.dev-loop :refer [dev-loop]]
[nrepl.server :refer [start-server]]
[clojure.tools.namespace.repl :refer [set-refresh-dirs disable-reload!]]))
(println "engine.repl")
but maybe I can have this two in one file ? not ... |
c42d73cdfd14c48287b739399ac949342d617d9575a7e8f081efa3a6b187fba4 | ocsigen/lwt | lwt_pool.ml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
[ Lwt_sequence ] is deprecated – we do n't want users outside Lwt using it .
However , it is still used internally by Lwt . So , briefly disable warning 3
( " deprecated "... | null | https://raw.githubusercontent.com/ocsigen/lwt/9943ba77a5508feaea5e1fb60b011db4179f9c61/src/core/lwt_pool.ml | ocaml | Create a new pool member.
Check validity of a pool member when use resulted in failed promise.
Dispose of a pool member.
Have the current pool elements been cleared out?
Size of the pool.
Number of elements in the pool.
Available pool members.
Promise resolvers waiting for a free member.
Create a pool ... | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
[ Lwt_sequence ] is deprecated – we do n't want users outside Lwt using it .
However , it is still used internally by Lwt . So , briefly disable warning 3
( " deprecated "... |
c90c0e3b6c733b83491ae70078e69c79e824aad9256e3aa1d964522b3cc08aad | amnh/PCG | Evaluate.hs | ------------------------------------------------------------------------------
-- |
Module : . Load . Evaluate
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
--------------------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/app/pcg/PCG/Command/Load/Evaluate.hs | haskell | ----------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
|
it as the current working state of the process. | Module : . Load . Evaluate
Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE ScopedTypeVariables #
module PCG.Command.Load.Evaluate
( evaluate
) where
import Bio.Graph
import Control.Evaluation
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Validation
import Data.... |
14446afa4347a052a8c3dd49587c2770b2a02336ae1ee8bf7d0c609683b66bfd | gvolpe/musikell | ArtistQL.hs | # LANGUAGE DeriveGeneric , RecordWildCards , TypeFamilies #
module Api.Domain.ArtistQL where
import Data.Morpheus.Kind ( OBJECT )
import Data.Morpheus.Types ( GQLType(..) )
import Data.Text ( Text )
import GHC.Generics ... | null | https://raw.githubusercontent.com/gvolpe/musikell/2ec837b605b87b268e460cd6e13b82e7eea8169b/src/Api/Domain/ArtistQL.hs | haskell | # LANGUAGE DeriveGeneric , RecordWildCards , TypeFamilies #
module Api.Domain.ArtistQL where
import Data.Morpheus.Kind ( OBJECT )
import Data.Morpheus.Types ( GQLType(..) )
import Data.Text ( Text )
import GHC.Generics ... | |
c6d845c5292d413366be994731f40a2a80d168faa3f54709ed4914099568f012 | tvirolai/blurhash | runner.cljs | (ns runner
(:require [doo.runner :refer-macros [doo-all-tests]]
[blurhash.base83-test]
[blurhash.decode-test]
[blurhash.util-test]))
(enable-console-print!)
(doo-all-tests #"blurhash.*-test")
| null | https://raw.githubusercontent.com/tvirolai/blurhash/0fd854f553ede0422e63fe401dd66a65ffc92a75/test/cljs/runner.cljs | clojure | (ns runner
(:require [doo.runner :refer-macros [doo-all-tests]]
[blurhash.base83-test]
[blurhash.decode-test]
[blurhash.util-test]))
(enable-console-print!)
(doo-all-tests #"blurhash.*-test")
| |
2380c454f0665238b7e21d7c819fdb32eac70df8702bb0bea8f01e2c3e19c466 | screenshotbot/screenshotbot-oss | test-delayed-accessors.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :util/tests/test-delayed-accessors
(:use #:cl
#:fiveam)
(:imp... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/aaa53c6107183b0545f0768a072cd5223149c9a3/src/util/tests/test-delayed-accessors.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :util/tests/test-delayed-accessors
(:use #:cl
#:fiveam)
(:import-from #:bknr.datastore
#:store-object)
... |
b0889af260c7f1a74a76d659fb707ca20267c1ae9d49c4b48a455e092cea9560 | CryptoKami/cryptokami-core | Account.hs | -- | Helpers for Wallet Set, Wallet and Account.
module Pos.Wallet.Web.Account
( myRootAddresses
, getSKById
, getSKByAddress
, getSKByAddressPure
, genSaveRootKey
, genUniqueAccountId
, genUniqueAddress
, deriveAddressSK
, deriveAddress
, AccountMo... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Account.hs | haskell | | Helpers for Wallet Set, Wallet and Account.
if you see this error, maybe you generated public key address with
no hd wallet attribute (if so, address would be ~half shorter than
others)
with derivation index
TODO: make it context-dependent!
| Allows to find a key related to given @id@ item. |
module Pos.Wallet.Web.Account
( myRootAddresses
, getSKById
, getSKByAddress
, getSKByAddressPure
, genSaveRootKey
, genUniqueAccountId
, genUniqueAddress
, deriveAddressSK
, deriveAddress
, AccountMode
, GenSeed (..)
, AddrGenSeed
... |
b61f48aa216792407a80abf7f0f767305ccd035bb046dac573dd1ccb5195f592 | MyDataFlow/ttalk-server | get_sid_benchmark.erl | -module(get_sid_benchmark).
-compile([export_all]).
%% Example results for 1mln of repetitions and data(2):
%%
%% > get_sid_benchmark:timeit().
exml : 59.420159s 1.0
re : 5.92969s 0.09979256366513593
%%
%% 1mln of repetitions and data(1):
%%
%% > get_sid_benchmark:timeit().
exml : 11.557594s 1.... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/tools/get_sid_benchmark.erl | erlang | Example results for 1mln of repetitions and data(2):
> get_sid_benchmark:timeit().
1mln of repetitions and data(1):
> get_sid_benchmark:timeit(). | -module(get_sid_benchmark).
-compile([export_all]).
exml : 59.420159s 1.0
re : 5.92969s 0.09979256366513593
exml : 11.557594s 1.0
re : 3.143657s 0.27199925866923513
re() ->
{ok, MP} = re:compile("sid=('(\\S+)'|\"(\\S+)\")", [caseless, ungreedy]),
MP.
-define(NRUNS, 1000 * 1000).
-def... |
237f231eb8e0a3bb0af9406dc6fbbf5d8fc1f0112f10a7b9f9e5bac2b9f26ea4 | namenu/advent-of-code | day07_2.cljc | (ns aoc.year2018.day07-2
(:require [aoc.util :refer [find-first iterate-while]]
[aoc.graph :as g]
[clojure.spec.alpha :as s]))
;; graph data structures
;; edges :: #{[a b] [a c] [b d]}
;; vertices :: #{a b c d}}
(deftype Graph [es vs]
g/IDirectedGraph
(edges [_] es)
(vertices [_] vs)
... | null | https://raw.githubusercontent.com/namenu/advent-of-code/83f8cf05931f814dab76696bf46fec1bb1276fac/2018/clojure/src/aoc/year2018/day07_2.cljc | clojure | graph data structures
edges :: #{[a b] [a c] [b d]}
vertices :: #{a b c d}}
tasks :: { task-name -> workload }
min은 number만 비교할 수 있음. 정점을 char->int로 변환해서 비교 | (ns aoc.year2018.day07-2
(:require [aoc.util :refer [find-first iterate-while]]
[aoc.graph :as g]
[clojure.spec.alpha :as s]))
(deftype Graph [es vs]
g/IDirectedGraph
(edges [_] es)
(vertices [_] vs)
(remove-vertex [_ v]
(Graph. (set (remove #(= (first %) v) es))
(disj... |
1b93a464b655edbf32cb93492138ba25fa60defb3b8c05a76081067bcbbc1962 | greglook/alphabase | hex_test.cljc | (ns alphabase.hex-test
(:require
[alphabase.bytes :as b]
[alphabase.hex :as hex]
[clojure.test :refer [deftest testing is]]))
(deftest encoding-test
(is (nil? (hex/encode (b/byte-array 0)))
"empty byte array encodes as nil")
(is (= "00" (hex/encode (b/byte-array 1)))
"single zero byte en... | null | https://raw.githubusercontent.com/greglook/alphabase/21f03acd09520e298e2c42dc767bd2b63a718e6e/test/alphabase/hex_test.cljc | clojure | (ns alphabase.hex-test
(:require
[alphabase.bytes :as b]
[alphabase.hex :as hex]
[clojure.test :refer [deftest testing is]]))
(deftest encoding-test
(is (nil? (hex/encode (b/byte-array 0)))
"empty byte array encodes as nil")
(is (= "00" (hex/encode (b/byte-array 1)))
"single zero byte en... | |
abba576e2d6697a485a91cd1411296abe3d9f4050ed047ce826fb5983d34de80 | jaminalder/staticart | distortion.clj | (ns staticart.distortion
(:require [staticart.geometry-helper :refer :all]
[staticart.random-helper :as rh]))
(defn distort-line [p1 p2 points variation]
(let [inner-points (rest (butlast (points-on-line p1 p2 (+ 2 points))))
dist-points (rh/gauss-variate-points inner-points variation)
... | null | https://raw.githubusercontent.com/jaminalder/staticart/079ac3e526a03a7f3f95b8981d3ee3d797f2e865/src/staticart/distortion.clj | clojure | (ns staticart.distortion
(:require [staticart.geometry-helper :refer :all]
[staticart.random-helper :as rh]))
(defn distort-line [p1 p2 points variation]
(let [inner-points (rest (butlast (points-on-line p1 p2 (+ 2 points))))
dist-points (rh/gauss-variate-points inner-points variation)
... | |
e6b29c89cb5b29e0eca6bfaf6c88d170ebbb08ca24e340471b3165f10f794c01 | pfdietz/ansi-test | eval-and-compile.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Oct 21 22:52:19 2002
Contains : Overall tests for section 3 , ' Evaluation and Compilation '
(defparameter *eval-and-compile-fns*
'(compile eval macroexpand macroexpand-1 proclaim special-operator-p
constantp))
(deftest eval-and-compile-fns
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/eval-and-compile/eval-and-compile.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Mon Oct 21 22:52:19 2002
Contains : Overall tests for section 3 , ' Evaluation and Compilation '
(defparameter *eval-and-compile-fns*
'(compile eval macroexpand macroexpand-1 proclaim special-operator-p
constantp))
(deftest eval-and-compile-fns
(remove-if #'fboundp *e... |
d74f645330502e6e8f7bf52779613f5f6ab0ddd484837ffd19d93727a434bc09 | input-output-hk/plutus | Spec.hs | | Conformance tests for the implementation .
module Main (main) where
import PlutusConformance.Common
failingTests :: [FilePath]
failingTests = []
main :: IO ()
main =
UPLC evaluation tests
runUplcEvalTests evalUplcProg (\dir -> elem dir failingTests)
| null | https://raw.githubusercontent.com/input-output-hk/plutus/9ab58c7e561c6b044ab141810ed601951bb0ee94/plutus-conformance/haskell/Spec.hs | haskell | | Conformance tests for the implementation .
module Main (main) where
import PlutusConformance.Common
failingTests :: [FilePath]
failingTests = []
main :: IO ()
main =
UPLC evaluation tests
runUplcEvalTests evalUplcProg (\dir -> elem dir failingTests)
| |
97f4f257bcc9bc722467dfdf1c9aba9f7c514c06a6de9e7b513dc9e56aeb11fa | eutro/racket-raylib | unsafe.rkt | #lang racket/base
(require "unsafe/functions.rkt"
"structs.rkt"
"enums.rkt"
"constants.rkt")
(provide (all-from-out "unsafe/functions.rkt"
"structs.rkt"
"enums.rkt"
"constants.rkt"))
| null | https://raw.githubusercontent.com/eutro/racket-raylib/8c477bec5708018b8ef067a7a6c36c1bbfb58132/generated/unsafe.rkt | racket | #lang racket/base
(require "unsafe/functions.rkt"
"structs.rkt"
"enums.rkt"
"constants.rkt")
(provide (all-from-out "unsafe/functions.rkt"
"structs.rkt"
"enums.rkt"
"constants.rkt"))
| |
054e2167807fc7deff16a68495b8239262f7a139308857a0b1411e4f30beb9ab | mcgizzle/haxchange | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
module Haxchange.Utils where
import Haxchange.Types
import Control.Arrow (first)
import qualified Data.Aeson.Types as A
import qualified Data.Attoparsec.Text as AP
import Data.ByteString (ByteString)
import qualified Data.ByteString.... | null | https://raw.githubusercontent.com/mcgizzle/haxchange/620a4c93ae28abdd637b7c1fd8b018628b3bd0e9/src/Haxchange/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
FIXME: This is a weird hack to get the milliseconds correct for Binance
------------- KEYS ---------------------------------------------- | module Haxchange.Utils where
import Haxchange.Types
import Control.Arrow (first)
import qualified Data.Aeson.Types as A
import qualified Data.Attoparsec.Text as AP
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as B8
import Data.L... |
8e8caf0098508e08465dc901ea6c397dd516b3653442219460ecbdd084001813 | melisgl/try | error.lisp | (in-package :try)
(defsection @try/errors (:title "Errors")
(error* condition)
(test-name (reader error*))
(unhandled-error condition)
(nested-condition (reader unhandled-error))
(backtrace-of (reader unhandled-error))
(debugger-invoked-p (reader unhandled-error))
(*gather-backtrace* variable)
(nlx con... | null | https://raw.githubusercontent.com/melisgl/try/a37c61f8b81d4bdf38f559bca54eef3868bb87a1/src/error.lisp | lisp | Signalling ERROR*
condition with #'ERROR, there is not a lot to be done at
that point and it would be annoying when aborting to the
toplevel. TRY will handle the condition anyway.
uninformative as it is only signalled in the cleanup of the test. | (in-package :try)
(defsection @try/errors (:title "Errors")
(error* condition)
(test-name (reader error*))
(unhandled-error condition)
(nested-condition (reader unhandled-error))
(backtrace-of (reader unhandled-error))
(debugger-invoked-p (reader unhandled-error))
(*gather-backtrace* variable)
(nlx con... |
8150e5bafe2d8729619d0af01f2fee7b0291b05c3962cddd35dee49824331af7 | sarabander/p2pu-sicp | 3.17.scm |
First version ca n't handle cyclic lists
(define (count-pairs x)
(define pairs (make-hash-table))
(define (count-pairs-1 x)
(if (or (not (pair? x))
(hash-table/get pairs x #f))
false
(begin
(hash-table/put! pairs x #t)
(count-pairs-1 (car x))
(count-pairs-1 (cdr x)))))
(count-pairs-1 x)
... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/3.3/3.17.scm | scheme | Aborting!: maximum recursion depth exceeded
Aborting!: maximum recursion depth exceeded |
First version ca n't handle cyclic lists
(define (count-pairs x)
(define pairs (make-hash-table))
(define (count-pairs-1 x)
(if (or (not (pair? x))
(hash-table/get pairs x #f))
false
(begin
(hash-table/put! pairs x #t)
(count-pairs-1 (car x))
(count-pairs-1 (cdr x)))))
(count-pairs-1 x)
... |
1e3452462f0da0bcad3988c2e83011240334a7de7b26e5fb8d809ab0ddb1b226 | ocaml-community/lambda-term | lTerm_windows.ml |
* lTerm_windows.ml
* ----------------
* Copyright : ( c ) 2011 , < >
* Licence : BSD3
*
* This file is a part of Lambda - Term .
* lTerm_windows.ml
* ----------------
* Copyright : (c) 2011, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of Lambda-Term.
*)
let (>|=) = Lw... | null | https://raw.githubusercontent.com/ocaml-community/lambda-term/8d323b24135a97e30f9a4d10baf93612dc871c1c/src/lTerm_windows.ml | ocaml |
* lTerm_windows.ml
* ----------------
* Copyright : ( c ) 2011 , < >
* Licence : BSD3
*
* This file is a part of Lambda - Term .
* lTerm_windows.ml
* ----------------
* Copyright : (c) 2011, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of Lambda-Term.
*)
let (>|=) = Lw... | |
34db2875efc7b7798a8d0a2376b13ff01901775b4bf2c5a5401b5c4692ef626d | oconn/re-frame-request | subscriptions.cljs | (ns re-frame-request.subscriptions
(:require [re-frame.core :refer [reg-sub subscribe]]))
(defn register-subscriptions
"Register re-frame-request subscriptions"
[]
(reg-sub
:request/core
(fn [{:keys [request]} _] request))
(reg-sub
:request/track-request
(fn [_ _] (subscribe [:request/core]))
... | null | https://raw.githubusercontent.com/oconn/re-frame-request/0f01a792cf5ed8c26954febc19538d851eb5df3c/src/re_frame_request/subscriptions.cljs | clojure | (ns re-frame-request.subscriptions
(:require [re-frame.core :refer [reg-sub subscribe]]))
(defn register-subscriptions
"Register re-frame-request subscriptions"
[]
(reg-sub
:request/core
(fn [{:keys [request]} _] request))
(reg-sub
:request/track-request
(fn [_ _] (subscribe [:request/core]))
... | |
ab4782de3372cb495ef6a19122b6ee1b4469a02738373498169b40b5e660ffbb | futurice/haskell-mega-repo | RemoveEmailFromEmployee.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies #-}
{-# LANGU... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/9d9af11c5f2a2925e7385a47452b8659253d71f4/fum-carbon-app/src/Futurice/App/FUM/Command/RemoveEmailFromEmployee.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
deriveVia [t| forall phase. (phase ~ 'Internal => ToJSON (RemoveEmailFromEmployee phase)) `Via` Sopica (RemoveEmailFromEmploye... | # LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
module Futurice.App.FUM.Command.RemoveEmailFromEmployee (RemoveEmailFromEmployee) where
import Control.Lens (contains, (.=))
import Futurice.Generics
import Futurice.Prelude
import Pr... |
dc29472bd537fe0bc914d0b1cc14384ae807fa3094242fb9b56fb333077aa861 | patrikja/AFPcourse | Spec.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Spec where
import qualified Control.Monad.State as CMS
import Control.Monad.State (MonadState, get, put)
import Control.Applicative -- not required for the exam
import Test.Qu... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2012-03/Spec.hs | haskell | # LANGUAGE GADTs #
not required for the exam
not needed for the exam question
----
Exam question, supporting code
Consider the following instance:
Proof of putput s' s = (put s' >> put s) =.= put s
def. of put, (>>)
def. of runS2 for Then
def. of runS2 for Put (twice)
beta-red. & simplify unreachable binding... | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Spec where
import qualified Control.Monad.State as CMS
import Control.Monad.State (MonadState, get, put)
import qualified Test.QuickCheck.Property as QC
import qualified Test.QuickCheck.Arbitrary as... |
37114174c5db017bc3e72aab27540b9f7062824d0034e424ba2b3c4ba8b9834e | ocsigen/lwt | luv_main.ml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Tester
let () = Lwt_engine.set (new Lwt_luv.engine)
let () =
Test.concurrent "unix with luv" [
Test_lwt_unix.suite;
Test_lwt_io.suite;
Test_lwt_io_non_block.suite;... | null | https://raw.githubusercontent.com/ocsigen/lwt/9943ba77a5508feaea5e1fb60b011db4179f9c61/test/unix/luv_main.ml | ocaml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Tester
let () = Lwt_engine.set (new Lwt_luv.engine)
let () =
Test.concurrent "unix with luv" [
Test_lwt_unix.suite;
Test_lwt_io.suite;
Test_lwt_io_non_block.suite;... | |
7eb67d422634a3463d226de9d7ca134e852fbb5a9680be9aa7b00844a4ff6a69 | vicfryzel/xmonad-config | xmonad.hs | xmonad config used by
Author :
-- -config
import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.SetWMName
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
i... | null | https://raw.githubusercontent.com/vicfryzel/xmonad-config/85c2ca392125ade3bb122e72a99af640896a0727/xmonad.hs | haskell | -config
----------------------------------------------------------------------
Terminal
The preferred terminal program, which is used in a binding below and by
certain contrib modules.
The command to lock the screen or show the screensaver.
The command to take a selective screenshot, where you select
what you'd... | xmonad config used by
Author :
import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.SetWMName
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMona... |
11c3d15703d2078acd4faade749df78b9b6c2924b1236d8d1eb50223b1cd69df | dinosaure/tuyau | tuyau_unix.ml | module Unix_scheduler = struct
type +'a t = 'a
let bind x f = f x
let return x = x
end
include Tuyau.Make(Unix_scheduler)(Cstruct)(Cstruct)
| null | https://raw.githubusercontent.com/dinosaure/tuyau/8ed849805153f5dfad6c045782e3d20ef06cd9b6/unix/tuyau_unix.ml | ocaml | module Unix_scheduler = struct
type +'a t = 'a
let bind x f = f x
let return x = x
end
include Tuyau.Make(Unix_scheduler)(Cstruct)(Cstruct)
| |
58d7bd4e39c8741254c1b31e4ae3667b381b1574ca25e8342c117d6ec9061be2 | erlymon/erlymon | em_timer.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 05 . Янв . 2017 6:11 AM
%%%-------------------------------------------------------------------
-module(em_timer).
-author("sergey").
-behaviour(gen_server).
-include_lib("std... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_timer/em_timer.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
---... | @author
( C ) 2017 , < COMPANY >
Created : 05 . Янв . 2017 6:11 AM
-module(em_timer).
-author("sergey").
-behaviour(gen_server).
-include_lib("stdlib/include/ms_transform.hrl").
-export([start_link/0,
create/3]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_cha... |
3b3642fc0ab9d7d7f0bf8f5d05a819afe404eb2d278ac5744399911c0d6d8ecd | cedlemo/OCaml-GI-ctypes-bindings-generator | Separator_tool_item_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Separator_tool_item_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Separator_tool_item_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Separator_tool_item_private"
| |
fb9257f0dc421642b32a54bc8afc3d87e8aa4ce96b7b5d84e3a05bae149c68e2 | racket/plt-service-monitor | beat.rkt | #lang racket/base
(require racket/date
aws/s3
json)
(provide beat)
(define (beat s3-bucket service-name
#:region [region (bucket-location s3-bucket)])
(parameterize ([s3-region region])
(define now (current-seconds))
(define now-str (parameterize ([date-display-format 'rfc282... | null | https://raw.githubusercontent.com/racket/plt-service-monitor/a40e841223178254948e216ff31e9bd629a66253/beat.rkt | racket | #lang racket/base
(require racket/date
aws/s3
json)
(provide beat)
(define (beat s3-bucket service-name
#:region [region (bucket-location s3-bucket)])
(parameterize ([s3-region region])
(define now (current-seconds))
(define now-str (parameterize ([date-display-format 'rfc282... | |
f513d44eb4dbe99d2d59d513e33a0e5ec9dad67bfb76421f09b074d9611c332a | bytekid/mkbtt | mixed.ml | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* 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 , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/mixed.ml | ocaml | ** SUBMODULES *********************************************************
** FUNCTIONS **********************************************************
should not matter
should not matter
Format.printf " %s > %s\n%!"
(ACPos.to_string p) (ACPos.to_string q);
(a)
p = q.p'
(b)
(c)
(b1), (c1)
(b2), (c2)
(d)
al... | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* 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 , either version 3 of the License , or (... |
b80926e73f41d3469c7365df21d4af0996e882008fc126a5c5d2c9fb6de917ea | winterland1989/magic-haskell | Template.hs | # LANGUAGE TemplateHaskell #
module Template where
import MakeLenses
import Lens ((^.), (%~), (.~))
import Data.Function ((&))
data Pos = Pos { _x :: Int, _y :: Int } deriving Show
makeLenses ''Pos
main = do
let p = Pos 1 2
putStrLn $ "p & x %~ negate: " ++ show (p & x %~ negate)
putStrLn $ "p & x .... | null | https://raw.githubusercontent.com/winterland1989/magic-haskell/027362d7feb175b10eafa6f12873009ae7e0fb57/code/Template.hs | haskell | # LANGUAGE TemplateHaskell #
module Template where
import MakeLenses
import Lens ((^.), (%~), (.~))
import Data.Function ((&))
data Pos = Pos { _x :: Int, _y :: Int } deriving Show
makeLenses ''Pos
main = do
let p = Pos 1 2
putStrLn $ "p & x %~ negate: " ++ show (p & x %~ negate)
putStrLn $ "p & x .... | |
a94f6818128c8e7da7e82f9568b5814541ca806dd5ba7af33bee4bc78271254e | racket/expeditor | public.rkt | #lang racket/base
(provide define-public)
(define-syntax-rule (define-public (id ...) def ...)
(define-values (id ...)
(let ()
def ...
(values id ...))))
| null | https://raw.githubusercontent.com/racket/expeditor/f4967d687c690ff1e44d376260bd2d11f9331b00/expeditor-lib/private/public.rkt | racket | #lang racket/base
(provide define-public)
(define-syntax-rule (define-public (id ...) def ...)
(define-values (id ...)
(let ()
def ...
(values id ...))))
| |
b2aa34631cd581b1c4ffd018e8651baa6d6b8d1aafe35a94b16c89da5eba19d2 | kupl/FixML | sub23.ml |
type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let rec isexist : var list -> var -> bool
= fun vars v ->
match vars with
| [] -> false
| hd::tl -> if hd = v then true else isexist tl v
let rec chkvars : exp -> var list -> bool
= fun exp vars ->
match exp with
| V... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness/submissions/sub23.ml | ocaml |
type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let rec isexist : var list -> var -> bool
= fun vars v ->
match vars with
| [] -> false
| hd::tl -> if hd = v then true else isexist tl v
let rec chkvars : exp -> var list -> bool
= fun exp vars ->
match exp with
| V... | |
d2837206e08967b2fffb62b9199c085cb386c03356e933c14649475b8cadc3de | paulgray/exml | exml_query.erl | %%%-------------------------------------------------------------------
( C ) 2011 , Erlang Solutions Ltd.
%%% @doc Easy navigation in XML trees
%%% @end
%%%-------------------------------------------------------------------
-module(exml_query).
-include("exml.hrl").
-export([path/2, path/3]).
-export([paths/2]).
-... | null | https://raw.githubusercontent.com/paulgray/exml/d04d0dfc956bd2bf5d9629a7524c6840eb02df28/src/exml_query.erl | erlang | -------------------------------------------------------------------
@doc Easy navigation in XML trees
@end
-------------------------------------------------------------------
may return undefined
@doc gets the elements/attrs/cdatas reachable by the described path | ( C ) 2011 , Erlang Solutions Ltd.
-module(exml_query).
-include("exml.hrl").
-export([path/2, path/3]).
-export([paths/2]).
-export([subelement/2, subelement/3]).
-export([subelements/2]).
-export([attr/2, attr/3]).
-export([cdata/1]).
-type path() :: [cdata | {element, binary()} | {attr, binary()}].
-export_typ... |
81c0abd02889bbc0fc039f26ee9ef4d04a703e924f458fd6acebc1d9813cada1 | GrammaticalFramework/gf-core | pgf-http.hs |
import Network.CGI(requestMethod,getVarWithDefault,logCGI,handleErrors,liftIO)
import System.Environment(getArgs)
import System.Directory(getDirectoryContents)
import System.FilePath(takeExtension,takeFileName,takeDirectory,(</>))
import RunHTTP(runHTTP,Options(..))
import ServeStaticFile(serveStaticFile)
impo... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/server/exec/pgf-http.hs | haskell |
import Network.CGI(requestMethod,getVarWithDefault,logCGI,handleErrors,liftIO)
import System.Environment(getArgs)
import System.Directory(getDirectoryContents)
import System.FilePath(takeExtension,takeFileName,takeDirectory,(</>))
import RunHTTP(runHTTP,Options(..))
import ServeStaticFile(serveStaticFile)
impo... | |
6bf5f296f538e1b44739d4b95b3f44342fa2704f69abdb75e3979d979a84eed2 | Incubaid/arakoon | arakoon_client_config.ml | type cluster_id = string
type node_cfg = {
ips : string list;
port : int;
}
let show_node_cfg { ips; port } =
Printf.sprintf "ips = %s, port = %i" (String.concat "|" ips) port
type ssl_cfg = {
ca_cert : string;
creds : (string * string) option;
protocol : Ssl.protocol;
}
type t = {
cluster_id : cluste... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/client/arakoon_client_config.ml | ocaml | type cluster_id = string
type node_cfg = {
ips : string list;
port : int;
}
let show_node_cfg { ips; port } =
Printf.sprintf "ips = %s, port = %i" (String.concat "|" ips) port
type ssl_cfg = {
ca_cert : string;
creds : (string * string) option;
protocol : Ssl.protocol;
}
type t = {
cluster_id : cluste... | |
db52701826645bfeb22c83e1ff1a4b2b34f0c8a9ee80282af5d2fff71332a2b3 | b0-system/b0 | b0_ocaml.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/kit/b0_ocaml.ml | ocaml | FIXME don't do that.
Build configuration
jsoo use case
Library resolution
Compile
XXX Maybe better things could be done here once we have a good C domain.
for link
XXX we are still missing cmxs here
for link | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
ddc254b348681f7ee13390fe819a64485ee824a1570c7d92f644c4682c1744a8 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GetSourcesSource.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the different functions to run the operation getSourcesSource
module StripeAPI.... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetSourcesSource.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the different functions to run the operation getSourcesSource
| > GET /v1/sources/{source}
| Contains all available parameters of this operation (query and path parameters)
| Monadic computation which returns the result o... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Operations.GetSourcesSource where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson ... |
bc77f0edc92840c734352be9232a0bbfbed9fd5e74774efdc3aee0775fac6554 | clojure/clojurescript | binding_test_other_ns.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs/cljs/binding_test_other_ns.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.binding-test-other-ns)
(def ^:dynamic *foo* 1)
(def bar 10)
|
7989c99d65b5735db6481dcae7d9e733824565df59dbf860eb21718f9c08728f | adam-james-v/svg-clj | path.cljc | (ns svg-clj.path
"Provides functions for generating and manipulating SVG path elements.
Every element provided in [[svg-clj.elements]] has an equivalent function in this namespace that emits path elements with a properly formatted `:d` property.
The path element has a small Domain Specific Language to create co... | null | https://raw.githubusercontent.com/adam-james-v/svg-clj/4220d7036113564a2af84a61d8f7db486ce858da/src/svg_clj/path.cljc | clojure | users are not expected to construct paths using commands."
todo: use some TDD to get this working
x y x y x y because input will ahve the form:
rx, ry do not change
xrot also no change
rx, ry do not change
xrot also no change
this is wrong. just a stub to get moving a bit
empty
circle or ellipse
line
polyli... | (ns svg-clj.path
"Provides functions for generating and manipulating SVG path elements.
Every element provided in [[svg-clj.elements]] has an equivalent function in this namespace that emits path elements with a properly formatted `:d` property.
The path element has a small Domain Specific Language to create co... |
56a1798da34ae446ae39ef7164fb2e746a246bb2b0dee7e8352ed8f318dcbe10 | eWert-Online/OSnap | discover.ml | module C = Configurator.V1
let ( let* ) = Option.bind
let main c =
let get_path lib dir =
match C.which c "pkg-config" with
| None -> raise Not_found
| Some pkgcfg ->
let env =
match C.ocaml_config_var c "system" with
| Some "macosx" ->
let* brew = C.which c "brew" in
... | null | https://raw.githubusercontent.com/eWert-Online/OSnap/0f4fe2a96809e0f49217cb8e9f3db2d0326c2972/lib/OSnap_Diff/config/discover.ml | ocaml | module C = Configurator.V1
let ( let* ) = Option.bind
let main c =
let get_path lib dir =
match C.which c "pkg-config" with
| None -> raise Not_found
| Some pkgcfg ->
let env =
match C.ocaml_config_var c "system" with
| Some "macosx" ->
let* brew = C.which c "brew" in
... | |
1b7cfa1069d8149caedc09e2a4166aada74e90aa6d5218456287f51079a7a518 | threatgrid/ctia | logging_core.clj | (ns ctia.logging-core
(:require [clojure.core.async :as a]
[clojure.tools.logging :as log]))
(def logging-prefix "event:")
(defn start [context register-listener-fn]
(assoc context :control (register-listener-fn #(log/info logging-prefix %) :blocking)))
(defn stop [{:keys [control] :as context}]
(s... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/src/ctia/logging_core.clj | clojure | (ns ctia.logging-core
(:require [clojure.core.async :as a]
[clojure.tools.logging :as log]))
(def logging-prefix "event:")
(defn start [context register-listener-fn]
(assoc context :control (register-listener-fn #(log/info logging-prefix %) :blocking)))
(defn stop [{:keys [control] :as context}]
(s... | |
cd84afa0df8f049fc1a3bf492902fce9569ccd9cecfdef7afe9eb5683e459a6a | philnguyen/soft-contract | motion.rkt | #lang racket/base
(require racket/contract
"data.rkt")
(define g6 (lambda (x) (equal? x (void))))
(define g7 (lambda (x) (world? x)))
(define g8 '"up")
(define g9 '"down")
(define g10 '"left")
(define g11 '"right")
(define g12 (or/c g8 g9 g10 g11))
(define generated-contract3 (-> (values g6)))
(define generat... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/games/snake-files/motion.rkt | racket | #lang racket/base
(require racket/contract
"data.rkt")
(define g6 (lambda (x) (equal? x (void))))
(define g7 (lambda (x) (world? x)))
(define g8 '"up")
(define g9 '"down")
(define g10 '"left")
(define g11 '"right")
(define g12 (or/c g8 g9 g10 g11))
(define generated-contract3 (-> (values g6)))
(define generat... | |
90aebef5f2b59a4dea8f55c01b1042337d064a65cebf3dfca283c078a3014917 | jwiegley/notes | foo.hs | module Main where
data Foo = Foo | Bar
foo (id -> Foo) = undefined
foo (id -> Bar) = undefined
main = undefined
| null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/6331904/foo.hs | haskell | module Main where
data Foo = Foo | Bar
foo (id -> Foo) = undefined
foo (id -> Bar) = undefined
main = undefined
| |
0a64c1ae29830e98b04a366b2a3f487d4e38843aa76599431fe3691037e61eab | overtone/overtone | blackrain.clj | (ns overtone.sc.machinery.ugen.metadata.extras.blackrain
(:use [overtone.sc.machinery.ugen common check]))
(def specs
[
{:name "AmplitudeMod"
:summary "Amplitude Follower"
:args [{:name "input"
:default 0
:doc "Input signal"}
{:name "attack-time"
:default... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/machinery/ugen/metadata/extras/blackrain.clj | clojure | (ns overtone.sc.machinery.ugen.metadata.extras.blackrain
(:use [overtone.sc.machinery.ugen common check]))
(def specs
[
{:name "AmplitudeMod"
:summary "Amplitude Follower"
:args [{:name "input"
:default 0
:doc "Input signal"}
{:name "attack-time"
:default... | |
6637024a99f6e3afb52ce1b7c13c489c79c0e13f731838851533aa76662fd9a6 | binaryage/cljs-oops | config.clj | (ns oops.circus.config
(:require [oops.circus.utils :as utils]))
(defn get-log-level [env]
INFO , DEBUG , TRACE , ALL
(defn skip-clean? [env]
(not (empty? (:oops-ft-skip-clean env))))
(defn skip-build? [env build-name]
(let [filter-str (:oops-ft-filter env)
filter-fn (utils/get-build-filter filter-st... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/circus/oops/circus/config.clj | clojure | (ns oops.circus.config
(:require [oops.circus.utils :as utils]))
(defn get-log-level [env]
INFO , DEBUG , TRACE , ALL
(defn skip-clean? [env]
(not (empty? (:oops-ft-skip-clean env))))
(defn skip-build? [env build-name]
(let [filter-str (:oops-ft-filter env)
filter-fn (utils/get-build-filter filter-st... | |
44faea16cff3f51c7f07227fba08927425cc3647f533f7dd55fd2cda4279860e | abdulapopoola/SICPBook | Ex3.63.scm | #lang racket
(define (sqrt-stream x)
(cons-stream
1.0
(stream-map (lambda (guess)
(sqrt-improve guess x))
(sqrt-stream x))))
versus the one below , every iteration of the loop
;; builds a new stream while in the example below
;; the stream is only created once.
;;Without memo... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%203/3.5/Ex3.63.scm | scheme | builds a new stream while in the example below
the stream is only created once.
Without memoization, it'll be same for both parties as
there is no 'remembering' already seen calculations but the
version will keep creating streams | #lang racket
(define (sqrt-stream x)
(cons-stream
1.0
(stream-map (lambda (guess)
(sqrt-improve guess x))
(sqrt-stream x))))
versus the one below , every iteration of the loop
old version only generates one stream while the sqrt - stream
(define (sqrt-stream x)
(define ... |
3f122871df156978b6603ba4c01b2f59475a29a2d30f9b996002856aec1a7dbb | tkvogt/judy-graph-db | Main.hs | {-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-}
module Main where
import Data.Bits(shift)
import qualified Data.Judy as J
import qualified Data.List.NonEmpty as NonEmpty
import Data.Text(Text)
import Data.Word(Word8, Word16, Word32)
import JudyGraph
import qualified JudyGraph a... | null | https://raw.githubusercontent.com/tkvogt/judy-graph-db/f7dc90236b6479f6040805d46e2803818f192469/app/Main.hs | haskell | # LANGUAGE OverloadedStrings, MultiParamTypeClasses #
| raises |-- issue --| references |-- issue)
on my keyboard … is <alt Gr> + <.>
ranges are normally generated automatically from graph files,
but here we do it by hand
PROGRAMMER Raises ISSUE
PROGRAMMER Raises ISSUE
PROGRAMMER Raises ISSUE
PROGRAMMER Raises I... | module Main where
import Data.Bits(shift)
import qualified Data.Judy as J
import qualified Data.List.NonEmpty as NonEmpty
import Data.Text(Text)
import Data.Word(Word8, Word16, Word32)
import JudyGraph
import qualified JudyGraph as J
import qualified JudyGraph.Cypher as Cy
import JudyGra... |
00d3eb04d001c10010811f472a3041c971061caf519ac1388ad0ce0fa183c68d | QuentinDuval/triboard | player.cljs | (ns triboard.logic.player
(:require
[cljs.spec :as s :include-macros true]
))
(def all [:blue :red :green])
(def player? (set all))
(def cell? (conj player? :wall :none))
(def is-ai? #{:red :green})
(s/def ::player player?)
(s/def ::owner cell?)
(s/def ::convertible-owner (conj player? :none))
(defn next... | null | https://raw.githubusercontent.com/QuentinDuval/triboard/2641d4c033fa0c64a02ef4564005b616d81b1a13/src/cljs/triboard/logic/player.cljs | clojure | TODO - remove | (ns triboard.logic.player
(:require
[cljs.spec :as s :include-macros true]
))
(def all [:blue :red :green])
(def player? (set all))
(def cell? (conj player? :wall :none))
(def is-ai? #{:red :green})
(s/def ::player player?)
(s/def ::owner cell?)
(s/def ::convertible-owner (conj player? :none))
(defn next... |
5811bb5c619ae69596acd5ce99775668642c23cb600af28402892e5a7cbbfb7f | janestreet/async | import.ml | open Core
open Async
let () = Backtrace.elide := true
let max_message_size = 1_000_000
let test ~make_transport ~imp1 ~imp2 ~state1 ~state2 ~f () =
let%bind `Reader r1, `Writer w2 = Unix.pipe (Info.of_string "rpc_test 1") in
let%bind `Reader r2, `Writer w1 = Unix.pipe (Info.of_string "rpc_test 2") in
let t1 = m... | null | https://raw.githubusercontent.com/janestreet/async/209af88dff921a3883f62ea9bd4fdf95b9429072/async_rpc/test/import.ml | ocaml | open Core
open Async
let () = Backtrace.elide := true
let max_message_size = 1_000_000
let test ~make_transport ~imp1 ~imp2 ~state1 ~state2 ~f () =
let%bind `Reader r1, `Writer w2 = Unix.pipe (Info.of_string "rpc_test 1") in
let%bind `Reader r2, `Writer w1 = Unix.pipe (Info.of_string "rpc_test 2") in
let t1 = m... | |
f98c3fa7b77edb83a329d065c23db669c7f2cd3a30ff72f8cd4f2175aaf68c0b | osener/bonsai_revery | import.mli | module Incr = Incr
module type Handler = sig
module Action : sig
type t
end
val handle : Action.t -> unit
end
module type S = sig
type action
type t = private ..
type t += C : action -> t
val inject : action -> t
end
module Event : sig
type t = private ..
type t +=
| Ignore (** [Ignore] ... | null | https://raw.githubusercontent.com/osener/bonsai_revery/754346997c21d2c4f91e6a7e7e6ce9f18df09056/src/import.mli | ocaml | * [Ignore] events are dropped, so no handler is called
* Allows one to represent a list of handlers, which will be individually dispatched to
their respective handlers. This is so callbacks can return multiple events of whatever
kind. | module Incr = Incr
module type Handler = sig
module Action : sig
type t
end
val handle : Action.t -> unit
end
module type S = sig
type action
type t = private ..
type t += C : action -> t
val inject : action -> t
end
module Event : sig
type t = private ..
type t +=
| Many of t list
va... |
231107d2e23f066bec1dc807ad2b2ad15a5b063d1457252436a752a1853c509c | OCamlPro/ocp-build | main.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-pp/main.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open Ocpp_version
open Parser
open Lexing
let debug = ref false
[ Misc.cut_at ] for OCaml > = 4.01
let cut_at s c =
let pos = String.index s c in
String.sub s 0 ... |
5710d7bff7fb2fef228fc852229e68bebc4d4ca8d46370f7a552e3cc271fa893 | LuisThiamNye/chic | windows.clj | (ns chic.windows
(:require
[potemkin :as pot :refer [doit]]
[chic.debug :as debug]
[chic.util :as util :refer [<- inline<-]]
[taoensso.encore :as enc]
[chic.ui.event :as uievt]
[io.github.humbleui.paint :as huipaint]
[chic.protocols]
[chic.error :as error]
[chic.error.stacktrace :as error.s... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/windows.clj | clojure | doui causes freeze if already on UI
:hui.event/pos pos
:*visible? (volatile! false)
:*visible? (volatile! false) | (ns chic.windows
(:require
[potemkin :as pot :refer [doit]]
[chic.debug :as debug]
[chic.util :as util :refer [<- inline<-]]
[taoensso.encore :as enc]
[chic.ui.event :as uievt]
[io.github.humbleui.paint :as huipaint]
[chic.protocols]
[chic.error :as error]
[chic.error.stacktrace :as error.s... |
32298363c7dedea3324ad5b58961ac6f9632a182b9f586405048c7b6bf17ab24 | dharrigan/spotifyd-notification | spotify-notification.clj | #!/usr/bin/env bb
(ns spotify-notification
(:require
[babashka.curl :as curl]
[cheshire.core :as json]))
(def icons {"start" "/usr/share/icons/gnome/32x32/actions/player_play.png"
"change" "/usr/share/icons/gnome/32x32/actions/player_fwd.png"
"stop" "/usr/share/icons/gnome/32x32/action... | null | https://raw.githubusercontent.com/dharrigan/spotifyd-notification/27caef1d1564c2f059f06aebf51fcd0aae2efabc/spotify-notification.clj | clojure | #!/usr/bin/env bb
(ns spotify-notification
(:require
[babashka.curl :as curl]
[cheshire.core :as json]))
(def icons {"start" "/usr/share/icons/gnome/32x32/actions/player_play.png"
"change" "/usr/share/icons/gnome/32x32/actions/player_fwd.png"
"stop" "/usr/share/icons/gnome/32x32/action... | |
629eb943044af8df8977d9a2c85fc45f63161040f7bdabfbefddaf5b74ee8c14 | silkapp/arrow-list | Class.hs | # LANGUAGE
Arrows
, FunctionalDependencies
, MultiParamTypeClasses
, TypeOperators
#
Arrows
, FunctionalDependencies
, MultiParamTypeClasses
, TypeOperators
#-}
module Control.Arrow.ListLike.Class
(
-- * Container arrow type class.
ArrowListLike (..)
, mapF
, arrMF
-- * Generic ... | null | https://raw.githubusercontent.com/silkapp/arrow-list/15937d3f05ca8684a63b97a7682772e4e945dea1/src/Control/Arrow/ListLike/Class.hs | haskell | * Container arrow type class.
* Generic arrow utilities.
* Container arrow utilities.
* Conditional and filter arrows.
* Optionality.
| A type class for arrows that produce containers of results. The container
arrow can be seen as a generalization for list arrows. Most operations
assume the container type has a... | # LANGUAGE
Arrows
, FunctionalDependencies
, MultiParamTypeClasses
, TypeOperators
#
Arrows
, FunctionalDependencies
, MultiParamTypeClasses
, TypeOperators
#-}
module Control.Arrow.ListLike.Class
(
ArrowListLike (..)
, mapF
, arrMF
, unite
, const
, concatA
, plus
, constF
, none
... |
852dce42f81788d21af5fdd7f6cd6e630d0a454ab6c2e99c89b08d8c19116fad | input-output-hk/high-assurance-legacy | Stats.hs | # LANGUAGE RecordWildCards #
module DeltaQ.Stats
( Stats (..)
, DeltaQStats (..)
, stats
) where
import Control.Monad.State
import Data.List (foldl', sort, group)
import Data.Maybe (catMaybes, fromJust)
import DeltaQ.Core
import Simulation.Time
import System.Random (StdGen)
d... | null | https://raw.githubusercontent.com/input-output-hk/high-assurance-legacy/ee90add31d3fa286322144219092d60fe854bf8d/Exploration/%CE%94Q%20simulation/src/DeltaQ/Stats.hs | haskell | # LANGUAGE RecordWildCards #
module DeltaQ.Stats
( Stats (..)
, DeltaQStats (..)
, stats
) where
import Control.Monad.State
import Data.List (foldl', sort, group)
import Data.Maybe (catMaybes, fromJust)
import DeltaQ.Core
import Simulation.Time
import System.Random (StdGen)
d... | |
a5d52c296e1ef81c2cebc067642ca25ce12a3206ff7cbc2c57613a0a4321a0c0 | kmi/irs | emergency-gis-situations.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(in-ontology emergency-gis-situations)
;;; top concepts
(def-class feature (role))
(def-class qualitative-feature (feature))
(def-class quantitative-feature (feature))
(def-class observable-features () ?x
:iff-def (exists ?y (and (slot-of... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/emergency-gis-situations/emergency-gis-situations.lisp | lisp | Package :
top concepts
exit features
entry features
representing the solution space for the classification
has-affordances (inherited allowed operations)
classification elements
testing function
support functions
classification function with implicit observables (within the caller class)
classification function... |
File created in WebOnto
(in-package "OCML")
(in-ontology emergency-gis-situations)
(def-class feature (role))
(def-class qualitative-feature (feature))
(def-class quantitative-feature (feature))
(def-class observable-features () ?x
:iff-def (exists ?y (and (slot-of ?y ?x)
(quantitati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.