_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 |
|---|---|---|---|---|---|---|---|---|
2a9f64a937e7a4171bed64a4a98eb9b461a5ae89b28eb2358560eb923c6d027c | sysbio-bioinf/avatar | import_matrix_file.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/dialogs/import_matrix_file.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE 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.
enable c... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.ui.dialogs.import-matrix-file
(:require
[clj-jfx.core :as jfx]
[avatar.data.import :as imp]
[avatar.util :as u]
[clojure.string :as str]
[clj-jfx.properties :as props]
[avatar.ui.tools :as t]
... |
035f631f43ecf6f7f13f9414c359cbc64581792229c8c875351f510e5716eb8f | bennn/trivial | string-fail.rkt | #lang racket/base
(require
trivial/private/test-common)
(module+ test (test-compile-error
#:require trivial/string
#:exn #rx"out of range"
(string-ref "" 0)
(string-ref "abc" 3)
(string-ref "a" -1)
( string - set ! " " 0 # \x )
( string - set ! " a " 3 ( ( lambda ( x ) x ) # \A ) ) ; ; TODO not a compile -... | null | https://raw.githubusercontent.com/bennn/trivial/c8fb9dcc377d1bf40ca167e34072bec90d2651e1/test/string-fail.rkt | racket | ; TODO not a compile - time error
(bytes-set! #"a" 1 3) | #lang racket/base
(require
trivial/private/test-common)
(module+ test (test-compile-error
#:require trivial/string
#:exn #rx"out of range"
(string-ref "" 0)
(string-ref "abc" 3)
(string-ref "a" -1)
( string - set ! " " 0 # \x )
(substring "asdf" -3)
(substring "asdf" 0 8)
(substring "asdf" 0 -1)
(s... |
2622e56ae7e3f46f31bfad749ee0d7d2ee6221b96c396662439891c32bc7a22c | fp-works/2019-winter-Haskell-school | TestHomework.hs | import Homework
import Test.Hspec
import Test.QuickCheck
main :: IO ()
main = hspec $ do
describe "fun1'" $ do
it "should behave just like fun1" $ property $
\xs -> (fun1' xs) == (fun1 xs)
describe "fun2'" $ do
it "should behave just like fun2" $ property $
forAll (arbitrary :: Gen (Positive I... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week4/jimfang/TestHomework.hs | haskell | import Homework
import Test.Hspec
import Test.QuickCheck
main :: IO ()
main = hspec $ do
describe "fun1'" $ do
it "should behave just like fun1" $ property $
\xs -> (fun1' xs) == (fun1 xs)
describe "fun2'" $ do
it "should behave just like fun2" $ property $
forAll (arbitrary :: Gen (Positive I... | |
9e7cbb5e9eb9ec457af656dbf974b9ed1d4cdbde87dc6739bf3f73548d5847b6 | fendor/hsimport | SymbolTest2.hs | module Test where
import Foo.Bar
import Foo.Bar.Blub (foo)
import Ugah.Argh
| null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/SymbolTest2.hs | haskell | module Test where
import Foo.Bar
import Foo.Bar.Blub (foo)
import Ugah.Argh
| |
ca7d8e32f78a03988aeb8126606cf67fafb75e24f8fb6769734cb60dcc73f0ab | lisp-korea/sicp | ex-3-5-lispro.scm | ; stream
(define true (= 0 0))
(define false (= 1 0))
(define (cons-stream a b)
(cons a (delay b)))
(define the-empty-stream '())
(define stream-null? null?)
(define (stream-car stream) (car stream))
(define (stream-cdr stream) (force (cdr stream)))
section 3.5
(define (stream-ref s n)
(if (= n 0)
(stre... | null | https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch03/3.5/ex-3-5-lispro.scm | scheme | stream
print-stream-n
상수 c
s1 / s2
execute
| (define true (= 0 0))
(define false (= 1 0))
(define (cons-stream a b)
(cons a (delay b)))
(define the-empty-stream '())
(define stream-null? null?)
(define (stream-car stream) (car stream))
(define (stream-cdr stream) (force (cdr stream)))
section 3.5
(define (stream-ref s n)
(if (= n 0)
(stream-car s)... |
4662892cdef94540da012d565201ab5fd3f8a7e27bbecccef0f186dced59c0fd | FlowForwarding/lincx | linc_us4_flow.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_us4/src/linc_us4_flow.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_us4_flow).
-export([initialize/1,
terminate/1,
... |
6ecc715fc7db7aa327e4a3a9c48e9a6a51d5c5e92d9d0cf7100fdaf8b266b86c | DavidAlphaFox/RabbitMQ | rabbit_shovel_mgmt.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WA... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-shovel-management/src/rabbit_shovel_mgmt.erl | erlang | compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
--------------------------------------------------------------------
--------... | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
... |
86c210e1b289e2e52a826f95f37ceded5ea180f9b014701fc7d062c2dcb2cfed | jordanthayer/ocaml-search | idtastar_ideal.ml | *
iDTA * search algorithm ( calculating ideal values ) as
through the search interface
December 2009
iDTA* search algorithm (calculating ideal values) as
through the search interface
Sofia Lemons - December 2009
*)
(******** ERROR FUNCTIONS AND STRUCTS *********)
(** Struct... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/realtime/idtastar_ideal.ml | ocaml | ******* ERROR FUNCTIONS AND STRUCTS ********
* Structure for learned error model. Stores error samples by feature
value, search effort, error value, then count of times that
error was seen.
* Number of times we've seen each feature set value.
* Error values we've seen for this feature value. (feature
(h... | *
iDTA * search algorithm ( calculating ideal values ) as
through the search interface
December 2009
iDTA* search algorithm (calculating ideal values) as
through the search interface
Sofia Lemons - December 2009
*)
type prob_table = {
mutable branch_factor : float;
muta... |
29c6bf83e980ff5aea8795205dce9ed76fa78aebdcfa287e0c7302f7483a4922 | luc-tielen/eclair-lang | Vector.hs | {-# OPTIONS_GHC -Wno-unused-top-binds #-}
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Eclair.LLVM.Vector
( Vector(..)
, Types(..)
, Destructor
, codegen
, startPtrOf
) where
import Prelude hiding (EQ, void)
import Control.Monad.Morph
import Eclair.LLVM.Codegen
import Eclair.LLVM.Externals
d... | null | https://raw.githubusercontent.com/luc-tielen/eclair-lang/cba2c5fa6b0ca8932607ad6fd0a6d25dce2afceb/lib/Eclair/LLVM/Vector.hs | haskell | # OPTIONS_GHC -Wno-unused-top-binds #
Type representing what to do when an element of the vector is destroyed.
The operand is a pointer to an element type that needs to be cleaned up.
pointer to start of the vector
capacity: how many elements can fit inside the vector
or 0?
NOTE: Assumes vector memory already all... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Eclair.LLVM.Vector
( Vector(..)
, Types(..)
, Destructor
, codegen
, startPtrOf
) where
import Prelude hiding (EQ, void)
import Control.Monad.Morph
import Eclair.LLVM.Codegen
import Eclair.LLVM.Externals
data Types
= Types
{ tyIndex :: Type
... |
9f5d1729e3519fe14e4bae9900cde20e73124ea4ac4bc60a7867e556350c17e4 | Quid2/zm | ADT.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables , CPP #
Parse ZM ADT declarations and values
module ZM.Parser.ADT
( adts
, adt
, parType
, absReference
, m... | null | https://raw.githubusercontent.com/Quid2/zm/b1ae01cdf881a29987aa5e62035c5278a78b80d3/src/ZM/Parser/ADT.hs | haskell | # LANGUAGE RankNTypes #
, absId
$setup
absIdAt
flds = eitherP unnamedFlds namedFlds
many typeAt
typeAt = typ absIdAt
Add location information to the result of a parser.
We assume that:
* the parser does not parse initial space
* the length of parsed text is equal to the length of the pretty-shown ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE ScopedTypeVariables , CPP #
Parse ZM ADT declarations and values
module ZM.Parser.ADT
( adts
, adt
, parType
, absReference
, maybeNamedAbsRef
, namedOrAbsRef
)
where... |
ade7a460e7c4a55ef1042bad9f098778dee843513a474ef02a11addca4ba8773 | shimmering-void/noire | pixelly.cljs | code from /
(ns starter.pixelly
(:require [quil.core :as q :include-macros true]
[quil.middleware :as m]))
(defn setup []
Set frame rate to 30 frames per second .
(q/frame-rate 60)
(q/no-smooth)
Set color mode to HSB ( HSV ) instead of default RGB .
(q/color-mode :hsb)
; setup function re... | null | https://raw.githubusercontent.com/shimmering-void/noire/3b382afb51e19ada3c5d69a53f194a1cd59bfe80/src/starter/pixelly.cljs | clojure | setup function returns initial state. It contains
circle color and position.
Update sketch state by changing circle color and position.
(q/shader dither)
this function is called in index.html
setup function called only once, during sketch initialization.
update-state is called on each iteration before draw-state... | code from /
(ns starter.pixelly
(:require [quil.core :as q :include-macros true]
[quil.middleware :as m]))
(defn setup []
Set frame rate to 30 frames per second .
(q/frame-rate 60)
(q/no-smooth)
Set color mode to HSB ( HSV ) instead of default RGB .
(q/color-mode :hsb)
(def dither (q/load... |
124d45bd89073ff72f74b4010a51269d2706d00660ea2f3fef128c34d7c0e4e7 | fission-codes/fission | Example.hs | # LANGUAGE DerivingVia #
module Test.Web.UCAN.Example
( Resource(..)
, Potency(..)
) where
import qualified RIO.Text as Text
import Test.Web.UCAN.Prelude
import Web.UCAN.Proof.Class
data Resource
= OnlyOneThing
| OnlySome
| Everything
deriving (Show, Eq, Ord)
deriving ... | null | https://raw.githubusercontent.com/fission-codes/fission/c7f5907867e94b76bdcbed3a499a4128263d7bfd/hs-ucan/test/Test/Web/UCAN/Example.hs | haskell | # LANGUAGE DerivingVia #
module Test.Web.UCAN.Example
( Resource(..)
, Potency(..)
) where
import qualified RIO.Text as Text
import Test.Web.UCAN.Prelude
import Web.UCAN.Proof.Class
data Resource
= OnlyOneThing
| OnlySome
| Everything
deriving (Show, Eq, Ord)
deriving ... | |
03c072ddc584a2fcba58f7bfd52d2f2710e20ee1b560ce4fe89aa1b7e48e54eb | qnikst/imagemagick | Types.hs | module Graphics.ImageMagick.MagickCore.Types
( module Graphics.ImageMagick.MagickCore.Types.FFI.AlphaChannelType
, module Graphics.ImageMagick.MagickCore.Types.FFI.CacheView
, module Graphics.ImageMagick.MagickCore.Types.FFI.ChannelType
, module Graphics.ImageMagick.MagickCore.Types.FFI.ColorspaceType
, modul... | null | https://raw.githubusercontent.com/qnikst/imagemagick/bc9e7ac85749f42a87901b722c5d36a8bed07d5c/src/Graphics/ImageMagick/MagickCore/Types.hs | haskell | module Graphics.ImageMagick.MagickCore.Types
( module Graphics.ImageMagick.MagickCore.Types.FFI.AlphaChannelType
, module Graphics.ImageMagick.MagickCore.Types.FFI.CacheView
, module Graphics.ImageMagick.MagickCore.Types.FFI.ChannelType
, module Graphics.ImageMagick.MagickCore.Types.FFI.ColorspaceType
, modul... | |
bf1165788d639e39d5aaf67278aeb0f8bfc7f7016e4ce15f10ac9c90f71efb58 | r0man/cljs-http | core_test.cljs | (ns cljs-http.core-test
(:require [cljs-http.core :as core]
[cljs.test :refer-macros [are is deftest testing]]))
(deftest test-build-xhr
(testing "default headers are applied on xhr object"
(let [xhr (core/build-xhr {:default-headers {"x-csrf-token" "abc123"
... | null | https://raw.githubusercontent.com/r0man/cljs-http/5588ebbd810de00db3c1dc2bea5ab9fb8d5be9b4/test/cljs_http/core_test.cljs | clojure | (ns cljs-http.core-test
(:require [cljs-http.core :as core]
[cljs.test :refer-macros [are is deftest testing]]))
(deftest test-build-xhr
(testing "default headers are applied on xhr object"
(let [xhr (core/build-xhr {:default-headers {"x-csrf-token" "abc123"
... | |
b448621efcc20b00ba9122becb539b81afab150349447cbae60230588bd7faf2 | nd/bird | 6.2.1.hs | Principle is:
Case (undefined), p(undefined) holds
Case (Null), p(Null) holds
Case (Fork xt x yt), if p(xt) holds, p(yt) holds, then p(Fork xt x yt) holds
height t <= size t < 2 ^ (height t)
height t <= size t
case Null:
left side:
height Null = 0
right side:
size Null = 1
case (Fork xt x yt):
left side:
height (F... | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch06/6.2.1.hs | haskell | Principle is:
Case (undefined), p(undefined) holds
Case (Null), p(Null) holds
Case (Fork xt x yt), if p(xt) holds, p(yt) holds, then p(Fork xt x yt) holds
height t <= size t < 2 ^ (height t)
height t <= size t
case Null:
left side:
height Null = 0
right side:
size Null = 1
case (Fork xt x yt):
left side:
height (F... | |
d516f2901182608b6a699fde97ef9118bdd956031972b7aaa161174be46e7567 | maranget/hevea | parse_opts.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet PARA , INR... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/parse_opts.mli | ocaml | *********************************************************************
HEVEA
... | , projet PARA , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
type input = File of string | Prog of string
type symbol_mode = SText | Symbol | Entity
val symbol_mode : symbo... |
a3d9fae7c3e5f03fd8232dd484b426b19c16496d685e26438fbdeef3c850c510 | MaskRay/OJHaskell | Registration system.hs | import Control.Monad
import qualified Data.Map as M
main = do
getLine
foldM_ (\mapping name -> do
let res = M.lookup name mapping
if res == Nothing
then putStrLn "OK" >> return (M.insert name 0 mapping)
else let Just res' = res
in putS... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Codeforces/4/Registration%20system.hs | haskell | import Control.Monad
import qualified Data.Map as M
main = do
getLine
foldM_ (\mapping name -> do
let res = M.lookup name mapping
if res == Nothing
then putStrLn "OK" >> return (M.insert name 0 mapping)
else let Just res' = res
in putS... | |
1e577398ece0c85a1636fc935959ff98a36ebb1f5007007d412135fdfcd2cb87 | racket/racket-lang-org | pollen.rkt | #lang racket
(require pollen/decode pollen/private/whitespace sugar/list sugar/unstable/string txexpr)
(provide (all-defined-out))
(define rcon-blue "rgb(52.941176%,80.784314%,98.039216%)")
(define rcon-red "rgb(86.27451%,7.843137%,23.529412%)")
(define (image src)
`(img ((src ,src))))
(define (speaker time name .... | null | https://raw.githubusercontent.com/racket/racket-lang-org/88dada2ee769ada9afaf1e3ec1fb28b8ddf216db/rcon/2017/pollen.rkt | racket | "http" catches both "http" and "https" prefixes
use aria-hidden = "true" attribute to hide duplicates from screen readers | #lang racket
(require pollen/decode pollen/private/whitespace sugar/list sugar/unstable/string txexpr)
(provide (all-defined-out))
(define rcon-blue "rgb(52.941176%,80.784314%,98.039216%)")
(define rcon-red "rgb(86.27451%,7.843137%,23.529412%)")
(define (image src)
`(img ((src ,src))))
(define (speaker time name .... |
d0980f2d786a779bc94c280cc75da8ed597374bb2ad38548411809fa67f02b86 | ahrefs/atd | json_adapter.ml | (* Json adapters. See .mli. *)
module type S = sig
val normalize : Json.t -> Json.t
val restore : Json.t -> Json.t
end
module Type_field = struct
module type Param = sig
val type_field_name : string
end
module Make (Param : Param) : S = struct
open Param
let normalize (x : Json.t) : Json.t =
... | null | https://raw.githubusercontent.com/ahrefs/atd/9a3cb984a695563c04b41cdd7a1ce9454eb40e1c/atdgen-codec-runtime/src/json_adapter.ml | ocaml | Json adapters. See .mli.
malformed |
module type S = sig
val normalize : Json.t -> Json.t
val restore : Json.t -> Json.t
end
module Type_field = struct
module type Param = sig
val type_field_name : string
end
module Make (Param : Param) : S = struct
open Param
let normalize (x : Json.t) : Json.t =
match x with
| `Asso... |
a455e828ac6c19a2e0ffcd99874db5986177e81a40aba40c44982dbe286fdd51 | hyperfiddle/electric | diff.cljs | (ns hyperfiddle.client.edn-view.diff
(:require ["@codemirror/state" :refer [EditorState ChangeSet]]
["@codemirror/view" :as view :refer [EditorView]]
["lezer-generator" :as lg]
[clojure.edn :as edn]
[clojure.pprint :refer [pprint]]
[clojure.string :as str]
... | null | https://raw.githubusercontent.com/hyperfiddle/electric/68f6eb7e38f76844f6a70c5055e7d30660d7eb38/scratch/edn_view/diff.cljs | clojure | Dev only!
Map Entries are not syntactic | (ns hyperfiddle.client.edn-view.diff
(:require ["@codemirror/state" :refer [EditorState ChangeSet]]
["@codemirror/view" :as view :refer [EditorView]]
["lezer-generator" :as lg]
[clojure.edn :as edn]
[clojure.pprint :refer [pprint]]
[clojure.string :as str]
... |
db12c12954b73c55e07b4eff49a5b93c7a881d09814ab22cc91b1b0d21798592 | hammerlab/coclobas | hyper_shell.mli | module Error: sig
type t = {
command: string [@main];
stdout: string option;
stderr: string option;
status: [`Exited of int | `Signaled of int | `Stopped of int] option;
exn: string option;
} [@@deriving yojson,make,show]
val to_display_string: t -> string
end
val command_must_succeed_with_ou... | null | https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/src/lib/hyper_shell.mli | ocaml | module Error: sig
type t = {
command: string [@main];
stdout: string option;
stderr: string option;
status: [`Exited of int | `Signaled of int | `Stopped of int] option;
exn: string option;
} [@@deriving yojson,make,show]
val to_display_string: t -> string
end
val command_must_succeed_with_ou... | |
4a86f0cfb749ac818e7791bd2f5f9bf84ebb016c257d3e1e28c22bb8ec942cf4 | haskell-numerics/random-fu | T.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE UndecidableInstances #
{-# OPTIONS_GHC -Wall #-}
# OPTIONS_GHC -fno - warn - name - shadowing #
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn ... | null | https://raw.githubusercontent.com/haskell-numerics/random-fu/42c72183a65c429230ad9d006534f59a6b72a329/random-fu/src/Data/Random/Distribution/T.hs | haskell | # LANGUAGE FlexibleContexts #
# OPTIONS_GHC -Wall # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - name - shadowing #
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - unused - do - bind #
# OPTIONS_GHC -fno - warn - missing - methods #
# OPTIONS_... |
8c8f5638096fc3ddb55f54a6fdedd922577706fdbb67cf5f836b24c18e6ccd35 | evturn/haskellbook | 28.10-difference-list.hs | import Criterion.Main
newtype DList a = DL { unDL :: [a] -> [a] }
-----------------------------------------------------------------------------
1 .
empty :: DList a
empty = DL $ \_ -> []
{-# INLINE empty #-}
-----------------------------------------------------------------------------
2 .
singleton :: ... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/28/28.10-difference-list.hs | haskell | ---------------------------------------------------------------------------
# INLINE empty #
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------... | import Criterion.Main
newtype DList a = DL { unDL :: [a] -> [a] }
1 .
empty :: DList a
empty = DL $ \_ -> []
2 .
singleton :: a -> DList a
singleton x = DL $ \_ -> [x]
# INLINE singleton #
3 .
toList :: DList a -> [a]
toList d = (unDL d) []
# INLINE toList #
4 .
infixr `cons`
cons :: a -> DList a... |
aae0e0c73b1927c6e02c537fd3a514177036f44599cd93ffb02b755225c07998 | krajj7/BotHack | actions.clj | (ns bothack.actions
(:require [clojure.tools.logging :as log]
[multiset.core :refer [multiset]]
[clojure.set :refer [intersection difference]]
[clojure.string :as string]
[bothack.handlers :refer :all]
[bothack.action :refer :all]
[bothack.player... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/actions.clj | clojure | (log/warn "stuck twice on diagonal movement => possibly door at" target)
(log/warn "retry diagonal move towards" target)
NH actually seems to ignore a move in some cases
TODO maybe take speed into consideration
mark portal
revisit
XXX note: items on tile HAVE to be determined via this command only, topline message... | (ns bothack.actions
(:require [clojure.tools.logging :as log]
[multiset.core :refer [multiset]]
[clojure.set :refer [intersection difference]]
[clojure.string :as string]
[bothack.handlers :refer :all]
[bothack.action :refer :all]
[bothack.player... |
2e9863677d7b0a5e147e306078543e1515bb3c48b2e3279c261629162fecc4d7 | zenspider/schemers | exercise.4.22.scm | #!/usr/bin/env csi -s
(require rackunit)
(require-library eval2)
(import eval2)
Exercise 4.22
;; Extend the evaluator in this section to support
the special form ` let ' . ( See * Note Exercise 4 - 6 : : . )
(define env (setup-environment))
(test-group "eval2 sanity check"
(test 42 (eval 42 ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.22.scm | scheme | Extend the evaluator in this section to support
See eval2.scm's analyze:
((let? exp) (analyze (let->combination exp))) | #!/usr/bin/env csi -s
(require rackunit)
(require-library eval2)
(import eval2)
Exercise 4.22
the special form ` let ' . ( See * Note Exercise 4 - 6 : : . )
(define env (setup-environment))
(test-group "eval2 sanity check"
(test 42 (eval 42 env))
(test 'x (eval '(quote x) ... |
3ca0d01b76800e632fcc287f40e3120357abf73ba5b45a03a286bb1a59db4bbc | scicloj/scicloj-data-science-handbook | sklearn.clj | (ns scicloj.helpers.sklearn
(:require [libpython-clj.python :as py]
[tech.v3.dataset.tensor :as dst]
[tech.v3.datatype :as dt]
[tech.v3.tensor :as t]
[tablecloth.api :as tc]
[camel-snake-kebab.core :as csk]
[tech.v3.dataset.column-filters :as cf]... | null | https://raw.githubusercontent.com/scicloj/scicloj-data-science-handbook/7c0488199ec0a63a9d5e785780c2bbfd102c5978/src/scicloj/helpers/sklearn.clj | clojure | only apply to maps
->jvm | (ns scicloj.helpers.sklearn
(:require [libpython-clj.python :as py]
[tech.v3.dataset.tensor :as dst]
[tech.v3.datatype :as dt]
[tech.v3.tensor :as t]
[tablecloth.api :as tc]
[camel-snake-kebab.core :as csk]
[tech.v3.dataset.column-filters :as cf]... |
e60c8f96a22e97b0326c1639dd70e3b03f8fcee9d08c9c17bd2ae1fcfa62f298 | TorXakis/TorXakis | LPEChanMap.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and University of Twente
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and University of Twente
See LICENSE at root directory of this repository.
-}
-----------------------------------... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/lpeops/src/core/LPEChanMap.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
permittedChanMap
- a list of variables; and
- a guard (= boolean expression).
getActOffe... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and University of Twente
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and University of Twente
See LICENSE at root directory of this repository.
-}
Module : LPEChanMap
Cop... |
bf1ba78275c0f37dab853610e92c989d0b27362865a341acb1568b0f1f3f5eab | ericfinster/opetopictt | value.ml | (*****************************************************************************)
(* *)
(* Values *)
(* *)
... | null | https://raw.githubusercontent.com/ericfinster/opetopictt/766a547b59280b4016657318d9fb486940b863da/lib/value.ml | ocaml | ***************************************************************************
Values
****************... |
open Fmt
open Syntax
open Suite
open Expr
open Opetopes.Idt
open Opetopes.Complex
type value =
| RigidV of lvl * spine
| ExpV of lvl * spine
| TopV of qname * spine * value
| LamV of name * (value -> value)
| PiV of name * value * (value -> value)
| PairV of value * value
| SigV of name * ... |
5987143e2501c39450eff7706faeb2e6255fcd4ce4fbc17b1b94e3546b1a8962 | garrigue/lablgtk | gears.ml | (**************************************************************************)
Lablgtk - Examples
(* *)
(* This code is in the public domain. *)
(* You may f... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/GL/gears.ml | ocaml | ************************************************************************
This code is in the public domain.
You may freely copy parts of it in your application.
... | Lablgtk - Examples
$ Id$
* 3 - D gear wheels . This program is in the public domain .
*
*
* LablGL version by
* Lablgtk version by < >
* 3-D gear wheels. This program is in the public domain.
*
* Brian Paul
* LablGL version by Ja... |
80a4e55aa7fe1fe8b60cfafcdb676f7a0e226f33d6a79cc79903adb502ea3864 | webyrd/normalization-by-evaluation | alphaKanren.scm | Complete , revised implementation of alphaKanren , an embedding of nominal
logic programming in R5RS - compliant Scheme .
;;
;; This implementation is from the revised version of:
;;
alphaKanren : A Fresh Name in Nominal Logic Programming
and
;;
first presented in the Proceedings of the 2007 Workshop ... | null | https://raw.githubusercontent.com/webyrd/normalization-by-evaluation/70787da704b76bedfcefd517b554751e53af99b9/alphaKanren-version/alphaKanren/alphaKanren.scm | scheme |
This implementation is from the revised version of:
| Complete , revised implementation of alphaKanren , an embedding of nominal
logic programming in R5RS - compliant Scheme .
alphaKanren : A Fresh Name in Nominal Logic Programming
and
first presented in the Proceedings of the 2007 Workshop on Scheme and
Functional Programming , Universite Laval Techni... |
20b20993aafbb8973a99fa7d12e655b66840d12315fee745b87b8d5275909e0a | opencog/benchmark | bio-loop3.scm | ;
; bio-loop3.scm
;
Similar to and bio-loop2.scm , but using QueryLink .
; Unlike those, this runs multiple threads so that parallelism
; performance can be understood. To make the benchmarks comparable,
; this still performs counting, so as to count the number of times
; a gene appears in a triangle.
;
; The code b... | null | https://raw.githubusercontent.com/opencog/benchmark/a551282a5b4fd1c91ecb0103e960f3b0d159a9c4/query-loop/bio-loop3.scm | scheme |
bio-loop3.scm
Unlike those, this runs multiple threads so that parallelism
performance can be understood. To make the benchmarks comparable,
this still performs counting, so as to count the number of times
a gene appears in a triangle.
The code below is partly a cut-n-paste of bio-loop2.scm, with
various chan... | Similar to and bio-loop2.scm , but using QueryLink .
(use-modules (srfi srfi-1))
(use-modules (opencog) (opencog exec))
(include "load-data.scm")
and we are looking for two other genes that interact with the
(define (find-output-interactors gene)
(define va (Variable "$a"))
(define vb (Variable "$b"))
(Query... |
9f15913ab1f9fc89ac663450a20cb454dcf8be6fe6b2ba2e00153ecc7ec0a871 | Shirakumo/kandria | sentinel.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass sentinel (listener located-entity)
((name :initform :sentinel)))
(defmethod bsize ((sentinel sentinel)) #.(vec 1 1))
(defmethod enter ((sentinel sentinel) world)
(setf (active-p (action-set 'in-map)) T))
(defmethod leave ((sentinel sentinel) world)
(setf (ac... | null | https://raw.githubusercontent.com/Shirakumo/kandria/94fd727bd93e302c6a28fae33815043d486d794b/sentinel.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass sentinel (listener located-entity)
((name :initform :sentinel)))
(defmethod bsize ((sentinel sentinel)) #.(vec 1 1))
(defmethod enter ((sentinel sentinel) world)
(setf (active-p (action-set 'in-map)) T))
(defmethod leave ((sentinel sentinel) world)
(setf (ac... | |
7caff043005bc6f9f2f9d798cd04d3341295188aee89330cd5256c4f03725987 | c-cube/trustee | token.ml |
open Common_
type t =
| LPAREN
| RPAREN
| COLON
| DOT
| COMMA
| WILDCARD
| QUESTION_MARK
| LET
| IN
| EQDEF
| QUESTION_MARK_STR of string
| SYM of string
| QUOTE_STR of string (* 'foo *)
| QUOTED_STR of string
| NUM of string
| ERROR of char
| EOF
let pp out = function
| LPAR... | null | https://raw.githubusercontent.com/c-cube/trustee/499cc5df22c3c261120ad9b72879797ddb5a081e/src/syntax/token.ml | ocaml | 'foo |
open Common_
type t =
| LPAREN
| RPAREN
| COLON
| DOT
| COMMA
| WILDCARD
| QUESTION_MARK
| LET
| IN
| EQDEF
| QUESTION_MARK_STR of string
| SYM of string
| QUOTED_STR of string
| NUM of string
| ERROR of char
| EOF
let pp out = function
| LPAREN -> Fmt.string out "'('"
| RPAR... |
cbb65de8afa821864552f81560c6ff3c6523169971e1ad1886ea9c2034db7562 | minio/minio-hs | ServerInfo.hs | #!/usr/bin/env stack
-- stack --resolver lts-14.11 runghc --package minio-hs
--
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
... | null | https://raw.githubusercontent.com/minio/minio-hs/d59f45fec4481313cfb5fafd635558ce385e7422/examples/ServerInfo.hs | haskell | stack --resolver lts-14.11 runghc --package minio-hs
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.
S... | #!/usr/bin/env stack
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
import Network.Minio
import Network.Minio.AdminAPI
import Prelude
main :: IO ()
main = do
res <-
... |
1fc718fea61c6a1fa991a31f20828c6471f8243a443a9daa4e14dca020d37da8 | coq/coq | coqpp_main.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/29eac1001ac649422e62e851fec7cb8fd33ead8d/coqpp/coqpp_main.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
407a1e2d63711fccef9e10aecd8978f448958c5ca9262f84c57ff275b93f1527 | cmsc430/www | interp-file.rkt | #lang racket
(provide (all-defined-out))
(require "interp.rkt")
(require "parse.rkt")
;; String -> Void
Parse and interpret contents of given filename ,
;; print result on stdout
(define (main fn)
(begin
(define prog (with-input-from-file fn
(λ ()
(writeln "Interpreting..." (current-output-port))
... | null | https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/www/notes/agreement/interp-file.rkt | racket | String -> Void
print result on stdout
ignore #lang racket line | #lang racket
(provide (all-defined-out))
(require "interp.rkt")
(require "parse.rkt")
Parse and interpret contents of given filename ,
(define (main fn)
(begin
(define prog (with-input-from-file fn
(λ ()
(writeln "Interpreting..." (current-output-port))
(p (read)))
(parse p)))))
(... |
e337319e99be7c57d94da6253ec646514842c71b1635f30ed2ec521ba029519d | soupi/gathering | EditEvent.hs | {- | Define Event creation
The forms will be created using the digestive-functors,
digestive-functors-lucid and the lucid libraries.
To read more about those check the Web.Gathering.Forms.Sign module
-}
module Web.Gathering.Forms.EditEvent where
import Web.Gathering.Utils
import Web.Gathering.Model
import Web.Gat... | null | https://raw.githubusercontent.com/soupi/gathering/c625f973e750d22393e5ca5720b7acf71733f3aa/src/Web/Gathering/Forms/EditEvent.hs | haskell | | Define Event creation
The forms will be created using the digestive-functors,
digestive-functors-lucid and the lucid libraries.
To read more about those check the Web.Gathering.Forms.Sign module
--------------
Edit Event --
--------------
| Definition of an edit event data type
| Definition of a form and it's... |
module Web.Gathering.Forms.EditEvent where
import Web.Gathering.Utils
import Web.Gathering.Model
import Web.Gathering.Forms.Utils
import Web.Gathering.Html (Html)
import Data.Maybe (isNothing)
import Text.Digestive ((.:))
import qualified Text.Digestive as D
import qualified Text.Digestive.Lucid.Html5 as D
import q... |
bf15a47c15a89ef8d177f37aa65f026c62da84dbcd59abd1176519846b2afe42 | dyzsr/ocaml-selectml | pr6981_ok.ml | (* TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
module type S =
sig
type a
type b
end
module Foo
(Bar : S with type a = private [> `A])
(Baz : S with type b = private < b : Bar.b ; .. >) =
struct
end
| null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-modules-bugs/pr6981_ok.ml | ocaml | TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
|
module type S =
sig
type a
type b
end
module Foo
(Bar : S with type a = private [> `A])
(Baz : S with type b = private < b : Bar.b ; .. >) =
struct
end
|
17ddf8c68a359fea8fdf747f705a0595ff4918cbf3aad855d0f9ec0064062804 | input-output-hk/plutus-apps | Run.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Templ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/e49983d8d06eb21d1005161775dab039375d644c/plutus-contract-certification/src/Plutus/Contract/Test/Certification/Run.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
* A certification report holds all the necessary information
to make sense of certification results
* There... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Plutus.Contract.Test.Certification.Run
CertificationR... |
ad8c32d8c352bd9464db2ab225487cb6cc14f407e777961541fec47f7479a198 | dbuenzli/tgls | tgl4_top.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/tgls/58bf47d393da00f24fa8e58521ddb9e3afb08d1d/src/tgl4_top.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
d5da83d1dda7b9442e0b855e1a68d2586868d5d4cda8e8855fcd6b66d8bcd56a | Glue42/gateway-modules | peer_identity.cljc | (ns gateway.common.peer-identity
(:require [gateway.reason :refer [throw-reason]]
[clojure.string :as string]))
(def known-identity-keys {"application" {:required true}
"instance" {:required false}
"region" {:required false}
... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/common/peer_identity.cljc | clojure | (ns gateway.common.peer-identity
(:require [gateway.reason :refer [throw-reason]]
[clojure.string :as string]))
(def known-identity-keys {"application" {:required true}
"instance" {:required false}
"region" {:required false}
... | |
e268901c0d385c59229405bed9dd731ee87d8de4be7f79fb2f470557cda2a27f | sampou-org/pfad | deploy.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ExtendedDefaultRules #
module Main where
import Shelly
import qualified Data.Text as T
import Control.Monad
default (T.Text)
git_ :: T.Text -> [T.Text] -> Sh ()
git_ = command1_ "git" []
main :: IO ()
main = shelly $ do
git_ "checkout" ["master"]
-- run_ "cabal" ["r... | null | https://raw.githubusercontent.com/sampou-org/pfad/3c2e0847bea9eac80672e1fbccb86ca5a6b09415/deploy.hs | haskell | # LANGUAGE OverloadedStrings #
run_ "cabal" ["run", "pfad", "rebuild"] | # LANGUAGE ExtendedDefaultRules #
module Main where
import Shelly
import qualified Data.Text as T
import Control.Monad
default (T.Text)
git_ :: T.Text -> [T.Text] -> Sh ()
git_ = command1_ "git" []
main :: IO ()
main = shelly $ do
git_ "checkout" ["master"]
run_ "stack" ["exec", "--", "pfad", "rebuild"]
git_ ... |
7ea0cbf383d299329cc891aa5db4ea489fa3348f34640bf891a40aa73e2161e6 | thebusby/into-edn | into_edn.clj | (ns into-edn
"A simple library to convert a Document/Object
into EDN data via a spec.")
(defprotocol IntoEdn
(into-edn [spec target]
"Produce EDN data via the provided spec and target.
A spec is defined by maps, vectors, and fns;
- An fn returns the result of (spec-fn target).
- vector [seq-fn], o... | null | https://raw.githubusercontent.com/thebusby/into-edn/ff4db7ac200b448029a822ffbb77341b42484d89/src/into_edn.clj | clojure | (ns into-edn
"A simple library to convert a Document/Object
into EDN data via a spec.")
(defprotocol IntoEdn
(into-edn [spec target]
"Produce EDN data via the provided spec and target.
- An fn returns the result of (spec-fn target).
- vector [seq-fn], or [seq-fn elem-fn], returns a
vector of the... | |
7c5e6f76d54bdb68fdcb72d0b50256688d2eb7db0359d6fb50d11b0b55cd09d8 | Kleidukos/Intrigue | Evaluating.hs | module Test.Evaluating where
import Data.Text.Display
import Test.Hspec
import Intrigue
spec :: Spec
spec = parallel $ do
describe "Quote" $ do
it "(car '(1 2 3))" $ do
(display <$> evalProgram "(car '(1 2 3))")
`shouldReturn` "1"
describe "Numerical operations" $ do
it "(+)" $
(displ... | null | https://raw.githubusercontent.com/Kleidukos/Intrigue/d6cb7a0ee13c04b7ef0c8ca15ac5600da25100ff/test/Test/Evaluating.hs | haskell | module Test.Evaluating where
import Data.Text.Display
import Test.Hspec
import Intrigue
spec :: Spec
spec = parallel $ do
describe "Quote" $ do
it "(car '(1 2 3))" $ do
(display <$> evalProgram "(car '(1 2 3))")
`shouldReturn` "1"
describe "Numerical operations" $ do
it "(+)" $
(displ... | |
283023536c3093fa7d83f906905e45f0e39d8bf155808807c113ea07fbc113ee | fluree/db | exec.cljc | (ns fluree.db.query.exec
"Find and format results of queries against database values."
(:require [clojure.core.async :as async :refer [go]]
[fluree.db.query.exec.select :as select]
[fluree.db.query.exec.where :as where]
[fluree.db.query.exec.group :as group]
[fluree.d... | null | https://raw.githubusercontent.com/fluree/db/8ee9ff0dd186623edda8f373fc11d5641cc3b067/src/fluree/db/query/exec.cljc | clojure | (ns fluree.db.query.exec
"Find and format results of queries against database values."
(:require [clojure.core.async :as async :refer [go]]
[fluree.db.query.exec.select :as select]
[fluree.db.query.exec.where :as where]
[fluree.db.query.exec.group :as group]
[fluree.d... | |
0389bbbb249aca7219808c1560260df33a192ee76fdeaca8df76798420284378 | quchen/generative-art | Multwomap.hs | module Data.Multwomap (
Multwomap()
, empty
, null
, size
, union
, insert
, arbitraryKey
, extract
) where
import Data.Map (Map)
import qualified Data.Map as M
import Prelude hiding (null)
import Util
data OneTwo a = One a | Two a a deriving (Eq, Ord, Show)
... | null | https://raw.githubusercontent.com/quchen/generative-art/3035d821221903e6755679a207b57ba5d14eb4f2/src/Data/Multwomap.hs | haskell | unsafe data structure: attempting to add a key twice will crash the program.
key removed. | module Data.Multwomap (
Multwomap()
, empty
, null
, size
, union
, insert
, arbitraryKey
, extract
) where
import Data.Map (Map)
import qualified Data.Map as M
import Prelude hiding (null)
import Util
data OneTwo a = One a | Two a a deriving (Eq, Ord, Show)
... |
1bde836f412d476bf254d97a53ee07f4a79a182230c1a398872299249b0779d3 | vim-scripts/slimv.vim | swank-sprof.lisp | ;;; swank-sprof.lisp
;;
Authors :
;;
License : MIT
;;
(in-package :swank)
#+sbcl
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :sb-sprof))
#+sbcl(progn
(defvar *call-graph* nil)
(defvar *node-numbers* nil)
(defvar *number-nodes* nil)
(defun pretty-name (name)
(let ((*package* (find-pack... | null | https://raw.githubusercontent.com/vim-scripts/slimv.vim/61ce81ff6b1a05314a6d750a32a1c7379f35a5dc/slime/contrib/swank-sprof.lisp | lisp | swank-sprof.lisp
:key #'sb-sprof::node-count))) | Authors :
License : MIT
(in-package :swank)
#+sbcl
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :sb-sprof))
#+sbcl(progn
(defvar *call-graph* nil)
(defvar *node-numbers* nil)
(defvar *number-nodes* nil)
(defun pretty-name (name)
(let ((*package* (find-package :common-lisp-user))
... |
d8de5240a3a2f695301f126685860904b6326ccca4e7de2bcd6ce53cf142ee77 | digital-asset/ghc | T11120.hs | # LANGUAGE MagicHash , DataKinds #
-- See also TypeOf.hs
import GHC.Prim
import Data.Typeable
data CharHash = CharHash Char#
main :: IO ()
main = print $ typeRep (Proxy :: Proxy 'CharHash)
| null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_run/T11120.hs | haskell | See also TypeOf.hs | # LANGUAGE MagicHash , DataKinds #
import GHC.Prim
import Data.Typeable
data CharHash = CharHash Char#
main :: IO ()
main = print $ typeRep (Proxy :: Proxy 'CharHash)
|
6421a52a481c775f801c7ba561fd1f5ba2cc6ab2f43e819ff8ed6ca2990a1ada | acorrenson/Oratio | verified_tree.ml | open Kernel
open Notty
open Infix
type prop = Logic.prop
type rules = [
| `IntroImpl
| `IntroAnd
| `IntroOrL
| `IntroOrR
| `ElimBot
| `ElimImpl
| `ElimOr
| `ElimAndL
| `ElimAndR
]
let name = function
| `IntroImpl -> "IntroImpl"
| `IntroAnd -> "IntroAnd"
| `IntroOrL -> "IntroOrL"
| `IntroOrR... | null | https://raw.githubusercontent.com/acorrenson/Oratio/ade8d9a3253270e311ebbcff10cb955bd2c8af42/src/translators/verified_tree.ml | ocaml | open Kernel
open Notty
open Infix
type prop = Logic.prop
type rules = [
| `IntroImpl
| `IntroAnd
| `IntroOrL
| `IntroOrR
| `ElimBot
| `ElimImpl
| `ElimOr
| `ElimAndL
| `ElimAndR
]
let name = function
| `IntroImpl -> "IntroImpl"
| `IntroAnd -> "IntroAnd"
| `IntroOrL -> "IntroOrL"
| `IntroOrR... | |
472e10912b10b4ea830fed1b313947e150766ab4b2d510ae5c04756048657d6b | startalkIM/ejabberd | brod_sock_SUITE.erl | %%%
Copyright ( c ) 2015 - 2017 , Klarna AB
%%%
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 i... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/brod/test/brod_sock_SUITE.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright ( c ) 2015 - 2017 , Klarna AB
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@private
-module(brod_sock_SUITE).
-export([ init_per_suite/1
, end_per_suite/1
, init_per_testcase/2
... |
945629baf3a71bf8e72782c68eee45b3c628af8caa2701847cab4c0e43111ed1 | zadean/xqerl | prod_AxisStep_unabbr_SUITE.erl | -module('prod_AxisStep_unabbr_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['unabbreviatedSyntax-1'/1]).
-export(['unabbreviatedSyntax-2'/1]).
-export... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_AxisStep_unabbr_SUITE.erl | erlang | -module('prod_AxisStep_unabbr_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['unabbreviatedSyntax-1'/1]).
-export(['unabbreviatedSyntax-2'/1]).
-export... | |
5ced30c19690f697e888cc693080ff038a9ded8217000b5f5f1daf0025bf250e | mirage/capnp-rpc | logger.ml | module Api = Api.MakeRPC(Capnp_rpc_lwt)
open Capnp_rpc_lwt
let local label =
let module Logger = Api.Service.Logger in
Logger.local @@ object
inherit Logger.service
method log_impl params release_param_caps =
let open Logger.Log in
let msg = Params.msg_get params in
release_param_caps (... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/8a0b6dce373dc2e2d547d85e542962862773f74b/examples/sturdy-refs/logger.ml | ocaml | module Api = Api.MakeRPC(Capnp_rpc_lwt)
open Capnp_rpc_lwt
let local label =
let module Logger = Api.Service.Logger in
Logger.local @@ object
inherit Logger.service
method log_impl params release_param_caps =
let open Logger.Log in
let msg = Params.msg_get params in
release_param_caps (... | |
325e42411fc3131c8e4fec8a296a6cb3662466d58d9e7a0ebd52380189e86414 | jordanthayer/ocaml-search | pancake_train_model.ml | * Training a CDP model on pancakes .
@author eaburns
@since 2010 - 10 - 19
@author eaburns
@since 2010-10-19
*)
open Printf
let make_cdp_next ~ncakes ~num =
let branching = float (ncakes - 2) in
branching is number of cakes minus the parent and the 1 - cake
flip .
flip. *)
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/pancake/pancake_train_model.ml | ocaml | * Training a CDP model on pancakes .
@author eaburns
@since 2010 - 10 - 19
@author eaburns
@since 2010-10-19
*)
open Printf
let make_cdp_next ~ncakes ~num =
let branching = float (ncakes - 2) in
branching is number of cakes minus the parent and the 1 - cake
flip .
flip. *)
... | |
3760b99b111d495bce184e7788e675b22dec074b04462e99e501aff4880d37fc | softlab-ntua/bencherl | dht_node_reregister.erl | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/src/dht_node_reregister.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@version $ I d : dht_node_reregister.erl 2576 2011 - 12 - 16 18:01:34Z $
-module(dht_node_reregister).
-author('... |
2ebda122bb21a3cd2bd821d4a0466c03eba8e71e8aa669fe0e4d6c1548ffd4ed | melange-re/melange | bsb_file_groups.ml | Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/mel/bsb_file_groups.ml | ocaml | output of [generators] should be added to [sources],
if it is [.ml,.mli,.re,.rei]
when [is_empty file_group]
we don't need issue [-I] [-S] in [.merlin] file
| Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... |
3beecf6ba561225437e0c20921708d2ae6129444b402a318c88f67e1586667cd | VisionsGlobalEmpowerment/webchange | create_arrange_images.cljc | (ns webchange.question.create-arrange-images
(:require
[webchange.question.common.check-button :as check-button]
[webchange.question.common.layout-markup :refer [get-layout-coordinates]]
[webchange.question.common.options-list :as options-list]
[webchange.question.common.substrate :as substrate]
[... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fe9738f5c1d32036e7cd8a3744ee3774bc8a5748/src/cljc/webchange/question/create_arrange_images.cljc | clojure | (ns webchange.question.create-arrange-images
(:require
[webchange.question.common.check-button :as check-button]
[webchange.question.common.layout-markup :refer [get-layout-coordinates]]
[webchange.question.common.options-list :as options-list]
[webchange.question.common.substrate :as substrate]
[... | |
53b6a6ef219c3cd82726bab8d8235fc3cf5c85bed4900109a76b01d8948de06f | mmottl/gsl-ocaml | vector_complex.mli | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
(** Vector of complex numbers implemented with a [Bigarray] *)
open Bigarray
open Gsl_complex
type complex_double_vector_bigarr =
... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/vector_complex.mli | ocaml | * Vector of complex numbers implemented with a [Bigarray] | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
open Bigarray
open Gsl_complex
type complex_double_vector_bigarr =
(Complex.t, complex64_elt, c_layout) Array1.t
type vector ... |
535c30699b194bbacb9e7c49ac4b268c1fda50585411ccfc3d14e5e0176905f4 | VisionsGlobalEmpowerment/webchange | message.cljs | (ns webchange.ui-deprecated.components.message
(:require
[cljs-react-material-ui.icons :as ic]
[cljs-react-material-ui.reagent :as ui]
[webchange.ui-deprecated.theme :refer [get-in-theme]]))
(defn- get-styles
[type]
(let [color (case type
"warn" (get-in-theme [:palette :warning :defau... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/ui_deprecated/components/message.cljs | clojure | (ns webchange.ui-deprecated.components.message
(:require
[cljs-react-material-ui.icons :as ic]
[cljs-react-material-ui.reagent :as ui]
[webchange.ui-deprecated.theme :refer [get-in-theme]]))
(defn- get-styles
[type]
(let [color (case type
"warn" (get-in-theme [:palette :warning :defau... | |
7e5502f2708f2e55b73599201c98e9aa999590188a454bb145e790ebdbe90a4e | overtone/overtone | dwg.clj | (ns overtone.sc.machinery.ugen.metadata.extras.dwg
(:use [overtone.sc.machinery.ugen common check]))
(def specs
[{:name "DWGSoundBoard"
:summary "Documentation missing, should be used with the other DWG UGens."
:args [{:name "inp"
:default 0.0
:doc "Input signal."... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/machinery/ugen/metadata/extras/dwg.clj | clojure | (ns overtone.sc.machinery.ugen.metadata.extras.dwg
(:use [overtone.sc.machinery.ugen common check]))
(def specs
[{:name "DWGSoundBoard"
:summary "Documentation missing, should be used with the other DWG UGens."
:args [{:name "inp"
:default 0.0
:doc "Input signal."... | |
b219484eadb4dc89b002436bf276d900e6ae94c5a530526983f8fd8e72f842be | galdor/tungsten | sink.lisp | (in-package :log)
(defclass sink ()
())
(defgeneric write-message (message sink))
(defclass default-sink (sink)
())
(defun make-default-sink ()
(make-instance 'default-sink))
(defmethod write-message (message (sink default-sink))
(declare (type message message))
(with-slots (domain level text-format text... | null | https://raw.githubusercontent.com/galdor/tungsten/ae09c510a4d30ec8141abe77cdf613410f2c2098/tungsten-log/src/sink.lisp | lisp | (in-package :log)
(defclass sink ()
())
(defgeneric write-message (message sink))
(defclass default-sink (sink)
())
(defun make-default-sink ()
(make-instance 'default-sink))
(defmethod write-message (message (sink default-sink))
(declare (type message message))
(with-slots (domain level text-format text... | |
bab0f659e77b6583a7d805f5fbda1461a5ff5a505ec41efed2e1445cfcc5703d | argp/bap | asmir.ml | * High level interface to libasmir .
The functions in this file should be used instead of calling functions
directly . These functions should be easier to use , and , unlike the Libasmir
ones , will handle garbage collection .
@author
The functions in this file should be used instead... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/asmir.ml | ocaml | * Get executable code bytes
* Get any readable bytes.
more to come later when we support them
* How many blocks to obtain when reading a FULL trace (not streaming)
more verbose debugging
Debug output for testing
maps a string variable to the var we are using for it
* [gamma_create mem decls] creates a new varct... | * High level interface to libasmir .
The functions in this file should be used instead of calling functions
directly . These functions should be easier to use , and , unlike the Libasmir
ones , will handle garbage collection .
@author
The functions in this file should be used instead... |
1174331d76995031aa88a9b983625a012f4786176712366d1f6037cf4ede0854 | ghilesZ/apronext | intervalext.ml | open Apron
module S = Scalarext
include Interval
let join a b =
{ inf= (if S.cmp a.inf b.inf < 0 then a.inf else b.inf)
; sup= (if S.cmp a.sup b.sup > 0 then a.sup else b.sup) }
let meet a b : t =
let inf = if S.cmp a.inf b.inf > 0 then a.inf else b.inf in
let sup = if S.cmp a.sup b.sup < 0 then a.sup else b.... | null | https://raw.githubusercontent.com/ghilesZ/apronext/7ee6b1043cfe6ccbb4f94af54b48cc455fc31bd6/src/intervalext.ml | ocaml | * scalar range of an interval
* same as range but result as an mpqf
* midpoint of an interval
* Random uniform value within an interval, according to the type
* returns true if and only if both bounds are finite | open Apron
module S = Scalarext
include Interval
let join a b =
{ inf= (if S.cmp a.inf b.inf < 0 then a.inf else b.inf)
; sup= (if S.cmp a.sup b.sup > 0 then a.sup else b.sup) }
let meet a b : t =
let inf = if S.cmp a.inf b.inf > 0 then a.inf else b.inf in
let sup = if S.cmp a.sup b.sup < 0 then a.sup else b.... |
f64ba8ff7b5aa5478e6fa31c773c1b4de2b7a7c84ca8da29871ef523a6c92847 | ajkavanagh/vimwiki-publishing-system | Utils.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeAp... | null | https://raw.githubusercontent.com/ajkavanagh/vimwiki-publishing-system/c358ea03bcdb576ce4a7a4e42ac38ba5e1816c7b/src/Lib/Context/Utils.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
it?
| try to extract a string argument from the args list, and if successful, run
monad.
| Using the filte... | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE AllowAmbiguousTypes #
needed for the instance ToGV... |
c4ae4cf0db4d8ecc85b32eacfe2f5c65663d7fe342b9b85b4c83438d70d9cbc9 | racket/htdp | guess3.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname guess3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/htdp/tests/guess3.rkt | racket | about the language level of this file in a form that our tools can easily process.
to determine how guess digits and target relate to each other
check-guess : number number -> symbol
to determine how guess and target relate to each other
to convert a vector of digits into a number
0-th digit is right-most dig... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname guess3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(require htdp/guess)
check - guess - for - list : ( ) number - ... |
dc6d9329c4e5f9f5fec32e60f5c1664ac54cb6533023eec962597e235c1652bc | ailisp/Graphic-Forms | textedit-window.lisp | (in-package :graphic-forms.uitoolkit.tests)
(defvar *textedit-control* nil)
(defvar *textedit-win* nil)
(defvar *textedit-file-filters* '(("Text Files (*.txt)" . "*.txt")
("All Files (*.*)" . "*.*")))
(defvar *textedit-new-title* "new file - TextEdit")
(... | null | https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/demos/textedit/textedit-window.lisp | lisp | (in-package :graphic-forms.uitoolkit.tests)
(defvar *textedit-control* nil)
(defvar *textedit-win* nil)
(defvar *textedit-file-filters* '(("Text Files (*.txt)" . "*.txt")
("All Files (*.*)" . "*.*")))
(defvar *textedit-new-title* "new file - TextEdit")
(... | |
1fa0282f6ba6d7e7273430867b8424dd4af12590dd65fdacaa1bd4742869973a | tsloughter/grpcbox | grpc_testing_reconnect_service_bhvr.erl | %%%-------------------------------------------------------------------
%% @doc Behaviour to implement for grpc service grpc.testing.ReconnectService.
%% @end
%%%-------------------------------------------------------------------
this module was generated on 2019 - 03 - 09T00:28:54 + 00:00 and should not be modified ... | null | https://raw.githubusercontent.com/tsloughter/grpcbox/a5aa6e918a2ddbff40e8ebb3c12b1453fe953e03/interop/src/grpc_testing_reconnect_service_bhvr.erl | erlang | -------------------------------------------------------------------
@doc Behaviour to implement for grpc service grpc.testing.ReconnectService.
@end
-------------------------------------------------------------------
@doc Unary RPC
@doc Unary RPC |
this module was generated on 2019 - 03 - 09T00:28:54 + 00:00 and should not be modified manually
-module(grpc_testing_reconnect_service_bhvr).
-callback start(ctx:t(), test_pb:reconnect_params()) ->
{ok, test_pb:empty(), ctx:t()} | grpcbox_stream:grpc_error_response().
-callback stop(ctx:t(), test_pb:empty())... |
629f291b8c86725df3765cda279d030c3ef59b87e489f07678d810ddaa44ac4c | nyu-acsys/drift | indirectHO01.ml | (*
Implementation error
*)
let c1_COEFFICIENT_1088 = 0
let c0_COEFFICIENT_1087 = 0
let id_1030 set_flag_app_11380 s_app_h_EXPARAM_11310 x_1031 = (0 - x_1031)
let app_without_checking_1158 x_DO_NOT_CARE_1213 x_DO_NOT_CARE_1214 h_EXPARAM_10908 x_DO_NOT_CARE_1211 x_DO_NOT_CARE_1212 h_10330 set_flag_app_11380 s_app_h_... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DRIFT/negative/indirectHO01.ml | ocaml |
Implementation error
|
let c1_COEFFICIENT_1088 = 0
let c0_COEFFICIENT_1087 = 0
let id_1030 set_flag_app_11380 s_app_h_EXPARAM_11310 x_1031 = (0 - x_1031)
let app_without_checking_1158 x_DO_NOT_CARE_1213 x_DO_NOT_CARE_1214 h_EXPARAM_10908 x_DO_NOT_CARE_1211 x_DO_NOT_CARE_1212 h_10330 set_flag_app_11380 s_app_h_EXPARAM_11310 v_10340 =
le... |
628683d069aa879297d02820e7ba5441b61603cc4b4e58da7e8348cebf7ee7ac | pascal-knodel/haskell-craft | Craft3e.hs | module Craft3e where
import E'10''1
import E'10''2
import E'10''3
import E'10''4
import E'10''5
import E'10''6
import E'10''7
import E'10''8
import E'10''9
import E'10'10
import E'10'11
import E'10'12
import E'10'13
import E'10'14
import E'10'15
import E'10'16
import E'10'17
import E'10'18
import E'10'19
import E'10'2... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/Craft3e.hs | haskell | module Craft3e where
import E'10''1
import E'10''2
import E'10''3
import E'10''4
import E'10''5
import E'10''6
import E'10''7
import E'10''8
import E'10''9
import E'10'10
import E'10'11
import E'10'12
import E'10'13
import E'10'14
import E'10'15
import E'10'16
import E'10'17
import E'10'18
import E'10'19
import E'10'2... | |
c7c200ec2e65e3d1d0904ac0cd18e779ff505d53236539c0a8fbaa390e310fc5 | votinginfoproject/data-processor | party_selection.clj | (ns vip.data-processor.validation.v5.party-selection
(:require [vip.data-processor.validation.v5.util :as util]))
(def validate-no-missing-party-ids
(util/validate-no-missing-elements :party-selection [:party-ids]))
| null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/v5/party_selection.clj | clojure | (ns vip.data-processor.validation.v5.party-selection
(:require [vip.data-processor.validation.v5.util :as util]))
(def validate-no-missing-party-ids
(util/validate-no-missing-elements :party-selection [:party-ids]))
| |
174c4d2d23661ed72fd80ee1af884667a81385a99f975ff805d0ed63eb6ec56e | tbarnetlamb/hyphen | HyphenBase.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
{-|
Module : HyphenBase
Description : Some simple utility functions and definitions used by Hyphen
-}
module HyphenBase where
import Control.Arrow
import Data.Char
... | null | https://raw.githubusercontent.com/tbarnetlamb/hyphen/9f8b5a7adba525e770df1fb8c72475467e7497d2/hyphen/lowlevel_src/HyphenBase.hs | haskell | # LANGUAGE DeriveDataTypeable #
|
Module : HyphenBase
Description : Some simple utility functions and definitions used by Hyphen
for us to keep track of Ptr ()s which represent stable pointers in
this manner, and so we create a newtype.
|Alias for undefined to represent a function which *should*
compile in in... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
module HyphenBase where
import Control.Arrow
import Data.Char
import Data.Text (Text)
import Data.Map.Strict (Map)
import Foreign.Ptr
import Foreign.Storable
import qualif... |
ed0fc5905a28cd570e31b3dd20d052e8ca325acea88e30dbe6d4e9c65aa66a81 | EduardoRFS/ppx_let_locs | typedecl.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/EduardoRFS/ppx_let_locs/46b0cdfc46c4bc1450a25b6ae455cc65e663acd0/ocaml/typing/typedecl.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
open Format
val transl_type_decl:
Env.t -> Asttypes.rec_flag -> Parsetree.type_declarati... |
3cf7f9f9bd266088a6d1e6ac8fedac2e5afe79e17237638bddfa198f6a2af212 | john-shaffer/krulak | failjure.clj | (ns krulak.failjure
(:require [failjure.core :as f]))
(defn parse-double [s]
(try
(Double/parseDouble s)
(catch Exception e
(assoc
(f/fail (str e))
:error e))))
(defn parse-long [s]
(try
(Long/parseLong s)
(catch Exception e
(assoc
(f/fail (str e))
:er... | null | https://raw.githubusercontent.com/john-shaffer/krulak/fe64f721070864c8587434ebe37707ae3c7d7e2b/src/krulak/failjure.clj | clojure | (ns krulak.failjure
(:require [failjure.core :as f]))
(defn parse-double [s]
(try
(Double/parseDouble s)
(catch Exception e
(assoc
(f/fail (str e))
:error e))))
(defn parse-long [s]
(try
(Long/parseLong s)
(catch Exception e
(assoc
(f/fail (str e))
:er... | |
56c521f9d049a07ab758c6c5b3b1c28ad8ee8cf5e2e410d77e118c5f22ae8e42 | tomoyuki28jp/web4r | package.lisp | (in-package :cl-user)
(defpackage :web4r
(:use :cl :my-util :sml :inflector :hunchentoot :elephant)
(:export ; --- specials ---
:*web4r-dir*
:*public-dir*
:*sml-dir*
:*example-bdb*
:*upload-save-dir*
:*tmp-save-dir*
:*tmp-files-gc-lifetim... | null | https://raw.githubusercontent.com/tomoyuki28jp/web4r/c0ebe1f8d29994af20bdece8e9ad8b356b136ae9/src/package.lisp | lisp | --- specials ---
--- util ---
--- debug ---
--- cont ---
--- server ---
--- valid ---
--- pager ---
--- pclass ---
--- pages ---
--- user.lisp ---
--- image ---
--- http ---
--- inflector --- | (in-package :cl-user)
(defpackage :web4r
(:use :cl :my-util :sml :inflector :hunchentoot :elephant)
:*web4r-dir*
:*public-dir*
:*sml-dir*
:*example-bdb*
:*upload-save-dir*
:*tmp-save-dir*
:*tmp-files-gc-lifetime*
:*tmp-files-gc-p... |
a285697846b4a1164fab6d23867067a581e52219cfbc58e94975e470fa1ab1b1 | CloudI/CloudI | tcp_echo_app.erl | %% Feel free to use, reuse and abuse the code in this file.
@private
-module(tcp_echo_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
{ok, _} = ranch:start_listener(tcp_echo,
ranch_tcp, [{port, 5555}], echo_protocol, []),
tcp_echo_sup:start_link().
... | null | https://raw.githubusercontent.com/CloudI/CloudI/75b93bb0e7dc4734f5cd1ef913788e44b577a3d5/src/external/cloudi_x_ranch/examples/tcp_echo/src/tcp_echo_app.erl | erlang | Feel free to use, reuse and abuse the code in this file.
API.
API. |
@private
-module(tcp_echo_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
{ok, _} = ranch:start_listener(tcp_echo,
ranch_tcp, [{port, 5555}], echo_protocol, []),
tcp_echo_sup:start_link().
stop(_State) ->
ok.
|
1c67c6bf6691b032c00e86ad024dbf51b7df9875ef8d6e3860eb715d6a72c72b | quchen/generative-art | PathParser.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Parse an SVG path, as see in the <g> element, such as
-- @M413.654,295.115c0,0-1.283-13.865,12.717-19.615@.
module Geometry.SvgParser.PathParser (parse) where
import Control.Applicative
import Control.Monad.Trans.State
import Data.Foldable
import... | null | https://raw.githubusercontent.com/quchen/generative-art/1f9617a2fbfe6bccfdcced69e1da5e8c4d250455/src/Geometry/SvgParser/PathParser.hs | haskell | # LANGUAGE OverloadedStrings #
| Parse an SVG path, as see in the <g> element, such as
@M413.654,295.115c0,0-1.283-13.865,12.717-19.615@.
Safety wrappers so I don’t mix them up |
module Geometry.SvgParser.PathParser (parse) where
import Control.Applicative
import Control.Monad.Trans.State
import Data.Foldable
import Data.Maybe
import Data.Text (Text)
import Data.Traversable
import qualified Data.Text ... |
89ac5e05dc7802750464dd09fc16c6b5a0b9675f6ca1a621963e1878f0b730c9 | bvaugon/ocapic | analog.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/analog/analog.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Pic;;
open Lcd;;
set_bit IRCF1;;
set_bit IRCF0;;
set_bit PLLEN;;
let disp = connect ~bus_size:Lcd.Four ~e:LATD0 ~rs:LATD2 ~rw:LATD1 ~bus:PORTB;;
disp.init ();;
disp.config ();;... |
9952716741d9bcda277fe15a8afc9e3fbd44c98339be974a7fadfc8947a0cdbf | serokell/ariadne | Checkbox.hs | module Ariadne.UI.Vty.Widget.Form.Checkbox
( TypeOfCheckField(..)
, initCheckboxWidget
) where
import Control.Lens (makeLensesWith)
import qualified Brick as B
import Ariadne.UI.Vty.Keyboard
import Ariadne.UI.Vty.Widget
import Ariadne.Util
data TypeOfCheckField = Check | Expand
data CheckboxWi... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ui/vty-lib/src/Ariadne/UI/Vty/Widget/Form/Checkbox.hs | haskell | module Ariadne.UI.Vty.Widget.Form.Checkbox
( TypeOfCheckField(..)
, initCheckboxWidget
) where
import Control.Lens (makeLensesWith)
import qualified Brick as B
import Ariadne.UI.Vty.Keyboard
import Ariadne.UI.Vty.Widget
import Ariadne.Util
data TypeOfCheckField = Check | Expand
data CheckboxWi... | |
45af3c623f51c2165079fbedf04e53229ccdfdccf831b509060525dfc7edf6cd | aeternity/enoise | enoise.erl | %%% ------------------------------------------------------------------
2018 , Aeternity Anstalt
%%%
@doc Module is an interface to the Noise protocol
%%% []
%%%
The module implements Noise handshake in ` handshake/3 ' .
%%%
%%% For convenience there is also an API to use Noise over TCP (i.e. `gen_tcp')
%%% and a... | null | https://raw.githubusercontent.com/aeternity/enoise/991d7390ea49216f0b170d7b9662b3ff0a925aaa/src/enoise.erl | erlang | ------------------------------------------------------------------
[]
For convenience there is also an API to use Noise over TCP (i.e. `gen_tcp')
and after "upgrading" a `gen_tcp'-socket into a `enoise'-socket it has a
similar API as `gen_tcp'.
@end ------------------------------------------------------------... | 2018 , Aeternity Anstalt
@doc Module is an interface to the Noise protocol
The module implements Noise handshake in ` handshake/3 ' .
-module(enoise).
-export([handshake/2, handshake/3, step_handshake/2]).
-export([ accept/2
, close/1
, connect/2
, controlling_process/2
, send/... |
6a1f6318c661e07be9c684c564d08a6df75c4f1db88e3cd5dfc6b69c2d555bed | reactive-systems/syfco | Info.hs | -----------------------------------------------------------------------------
-- |
Module : Reader . . Info
License : MIT ( see the LICENSE file )
Maintainer : ( )
--
Parser for the INFO section .
--
-----------------------------------------------------------------------------
module Rea... | null | https://raw.githubusercontent.com/reactive-systems/syfco/603bbdba1c4902674165714516eea7b6dacbd155/src/lib/Reader/Parser/Info.hs | haskell | ---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
| Parses t... | Module : Reader . . Info
License : MIT ( see the LICENSE file )
Maintainer : ( )
Parser for the INFO section .
module Reader.Parser.Info
( infoParser
, targetParser
, semanticsParser
) where
import Data.List
( dropWhileEnd
)
import Data.Types
( Semantics(..)
, Target(.... |
2ca0503619709bd762c4f6fa76eb09e5cbec059753994d35797e744f61812c5e | arachne-framework/arachne-docs | project.clj | (defproject components "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0-alpha14"]
[org.arachne-framework/arachne-pedestal "0.2.0-master-0059-7f13b97"]
[datascript "0.15.5"]
[ch.qos.logback/logback-classic "1.1.3"]]
:source-paths ["src" "config"]
:repos... | null | https://raw.githubusercontent.com/arachne-framework/arachne-docs/5288932ea266639e41b139b19aaa109b1bf8b341/tutorial-code/components/project.clj | clojure | (defproject components "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0-alpha14"]
[org.arachne-framework/arachne-pedestal "0.2.0-master-0059-7f13b97"]
[datascript "0.15.5"]
[ch.qos.logback/logback-classic "1.1.3"]]
:source-paths ["src" "config"]
:repos... | |
9bbb6a1169bc2b2c5aaf2332476a61a9e26eba4ef1fc8e24c5e45bc56559e9d9 | re-ops/re-core | callback.clj | (ns re-mote.zero.callback
"Callback handling for run-hosts async"
(:require
[taoensso.timbre :refer (refer-timbre)]
[re-share.schedule :refer [watch seconds]]
[re-share.wait :refer [wait-time curr-time]]
[re-mote.zero.results :refer (all-ready? get-results)]))
(refer-timbre)
(def callbacks (atom {}))... | null | https://raw.githubusercontent.com/re-ops/re-core/93596efd4f3068d57e8140106da60011a6569310/src/re_mote/zero/callback.clj | clojure | (ns re-mote.zero.callback
"Callback handling for run-hosts async"
(:require
[taoensso.timbre :refer (refer-timbre)]
[re-share.schedule :refer [watch seconds]]
[re-share.wait :refer [wait-time curr-time]]
[re-mote.zero.results :refer (all-ready? get-results)]))
(refer-timbre)
(def callbacks (atom {}))... | |
6782e32721d61c9db6d34a4e39b62d079f48f815e2be6b7ceca6412859f5233c | TrustInSoft/tis-interpreter | Separation.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/Separation.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
3186e2cf9e4f4beff94afd744517888675b11e2fc842fe8ea485333fc169526a | bkc39/ocaml-prelude | monad.ml | open Data.Function
open Functor
open Pointed
open Applicative
module type MONAD_DEF = sig
type 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module type MONAD_DEF_JOIN = sig
type 'a t
val join : 'a t t -> 'a t
end
module type S = sig
include Applicative.S
include MONAD_DEF with ty... | null | https://raw.githubusercontent.com/bkc39/ocaml-prelude/59e17e868420a3abb05dcbfd5c82892a29cdd1aa/control/monad.ml | ocaml | open Data.Function
open Functor
open Pointed
open Applicative
module type MONAD_DEF = sig
type 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module type MONAD_DEF_JOIN = sig
type 'a t
val join : 'a t t -> 'a t
end
module type S = sig
include Applicative.S
include MONAD_DEF with ty... | |
6eec461da486e49ecc5102f6cb742beefeccc8749d1c71603e8b9045eaa090e7 | manuel-serrano/hop | letrec_expansion.scm | ;*=====================================================================*/
* Author : * /
* Copyright : 2007 - 13 , see LICENSE file * /
;* ------------------------------------------------------------- */
* This file is part of Scheme2Js . ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/letrec_expansion.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* */
* but WITHOUT ANY WARRANTY; without even the implied warranty of */
* MERCHANTABILITY or FITNE... | * Author : * /
* Copyright : 2007 - 13 , see LICENSE file * /
* This file is part of Scheme2Js . * /
* Scheme2Js is distributed in the hope that it will be useful , * /
(module letrec-expansion
(i... |
f217770fe90b4d96d2e813f56b4ca3c3d5f299e1805a2d68cdf96498a73c8d4f | ghcjs/jsaddle-dom | HTMLTextAreaElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLTextAreaElement
(checkValidity, checkValidity_, reportValidity, reportValidity_,
setCustomValidity, sel... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLTextAreaElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/HTMLTextAreaElement.checkValidity Mozilla HTMLTextAreaElement.checkValidity documentation>
| <-US/docs/Web/API/HTMLTextAreaElement.checkValidity Mozilla HTMLTextAreaElement.checkValidity documentation>
... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLTextAreaElement
(checkValidity, checkValidity_, reportValidity, reportValidity_,
setCustomValidity, select, setRangeText, setRangeText4,
setSelectionRange, setAutofocus, getAutofocus, setDirName... |
d846f7e8328dada3d7e00e5c65dc90579667900db7280258ef3c41a327808052 | zwizwa/rai | stream-meta.rkt | #lang racket/base
(require "stream-syntax.rkt"
"tools.rkt")
(provide
ai-lambda-meta
unpack
unvector
vector-sum
ai-map
ai-length
ai-sum ai-prod
poly tailor-approx
t-exp-tail
t-sin-tail
t-cos-tail
iterate
reduce-+ init-0
$
)
The stream object language is first order to keep it " algebraic " .
;... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/stream-meta.rkt | racket | However, the meta language can be higher order: it is just Scheme.
The idea here is to use explicit metaprogramming in the sense of
having both ordinary Scheme semantics and stream semantics
available, without the language Racket #lang support from
Convenience form for writing compile time combinators.
Note the s... | #lang racket/base
(require "stream-syntax.rkt"
"tools.rkt")
(provide
ai-lambda-meta
unpack
unvector
vector-sum
ai-map
ai-length
ai-sum ai-prod
poly tailor-approx
t-exp-tail
t-sin-tail
t-cos-tail
iterate
reduce-+ init-0
$
)
The stream object language is first order to keep it " algebraic " .
... |
eb983e7b3c416fbf5d3e11cffc79175535d6868c8e0c7e539b79f105f75c59c1 | theodormoroianu/SecondYearCourses | HaskellChurch_20210415162328.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415162328.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: C... |
0d9d56cab6c284040932e11c722d9517b03b89414777d36395b842473ea38849 | karamaan/karamaan-opaleye | Bend.hs | {-# LANGUAGE Arrows #-}
module Karamaan.Opaleye.Bend where
import Karamaan.Opaleye.QueryArr (Query, QueryArr)
import Control.Arrow ((<<<), arr, returnA)
import Karamaan.Opaleye.Wire (Wire)
import Karamaan.Opaleye.Operators2 (eq)
import Karamaan.Opaleye.Predicates (restrict)
import qualified Karamaan.Plankton.Arrow as... | null | https://raw.githubusercontent.com/karamaan/karamaan-opaleye/2863dc1dba9ea1e810cb0860a9b8de53f50af354/Karamaan/Opaleye/Bend.hs | haskell | # LANGUAGE Arrows # |
module Karamaan.Opaleye.Bend where
import Karamaan.Opaleye.QueryArr (Query, QueryArr)
import Control.Arrow ((<<<), arr, returnA)
import Karamaan.Opaleye.Wire (Wire)
import Karamaan.Opaleye.Operators2 (eq)
import Karamaan.Opaleye.Predicates (restrict)
import qualified Karamaan.Plankton.Arrow as UA
bend :: (b -> Wire ... |
47827c9e29dcba0092d81a9e010c44b5f129362566313a4df393464fc82de016 | fjvallarino/monomer | Lens.hs | |
Module : . Core . Lens
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Lenses for the Core types .
Module : Monomer.Core.Lens
Copyright : (c) 2018 Francisco Vallarino
License ... | null | https://raw.githubusercontent.com/fjvallarino/monomer/5b90aebae9f8d1d6c11265750823c016fdd3d785/src/Monomer/Core/Lens.hs | haskell | Style
Widget | |
Module : . Core . Lens
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Lenses for the Core types .
Module : Monomer.Core.Lens
Copyright : (c) 2018 Francisco Vallarino
License ... |
68611fe13f0ed7b919b99d0058d24d4dec3cdd0ce685d41affa50fa807ef85c9 | DSiSc/why3 | opt.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/util/opt.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
let inhabited = function None -> false | Some _ -> true
let get = function None -> invalid_arg "Opt.get"... |
3c3f09be9016aac1b4d2da2a43feff8d07aab1421d45ca18b9c2eb5c719960db | sdiehl/elliptic-curve | Binary.hs | module Test.Binary where
import Protolude
import qualified Data.Curve.Binary.SECT113R1 as SECT113R1
import qualified Data.Curve.Binary.SECT113R2 as SECT113R2
import qualified Data.Curve.Binary.SECT131R1 as SECT131R1
import qualified Data.Curve.Binary.SECT131R2 as SECT131R2
import qualified Data.Curve.Binary.SECT163K1... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/test/Test/Binary.hs | haskell | module Test.Binary where
import Protolude
import qualified Data.Curve.Binary.SECT113R1 as SECT113R1
import qualified Data.Curve.Binary.SECT113R2 as SECT113R2
import qualified Data.Curve.Binary.SECT131R1 as SECT131R1
import qualified Data.Curve.Binary.SECT131R2 as SECT131R2
import qualified Data.Curve.Binary.SECT163K1... | |
e384d2962b4fa8366ea628408501ac65b580ef76989184d0979215cb7dad004a | brianium/indexed.db | request.cljs | (ns ^:no-doc indexed.db.impl.request
(:require [indexed.db.impl.protocols :as impl]))
(deftype Request [request]
impl/EventTarget
(target [_] request)
impl/HasErrors
(error
[_]
(.-error request))
impl/BelongsToSource
(source
[_]
(.-source request))
impl/IDBRequest
(result
[_]
... | null | https://raw.githubusercontent.com/brianium/indexed.db/251bb9b461bd0fc9f5543656d73a4774de28d2bc/src/indexed/db/impl/request.cljs | clojure | (ns ^:no-doc indexed.db.impl.request
(:require [indexed.db.impl.protocols :as impl]))
(deftype Request [request]
impl/EventTarget
(target [_] request)
impl/HasErrors
(error
[_]
(.-error request))
impl/BelongsToSource
(source
[_]
(.-source request))
impl/IDBRequest
(result
[_]
... | |
5ec627b4a69788e5134b6371a77062a9aa4375a5f0f20586fbadb593ee596eb2 | atdixon/me.untethr.nostr-desk | store.clj | (ns me.untethr.nostr.store
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[me.untethr.nostr.domain :as domain]
[me.untethr.nostr.json :as json]
[me.untethr.nostr.parse :as parse]
[next.jdbc :as jdbc]
... | null | https://raw.githubusercontent.com/atdixon/me.untethr.nostr-desk/444ed1e68e07ba4643174924c39f7f3ea685ddda/src/me/untethr/nostr/store.clj | clojure | --
@see -select-with-union-order-by-and-limit
--
todo make efficient via delete by trigger or gc process
todo make efficient via delete by trigger or gc process
secret-key could be nil | (ns me.untethr.nostr.store
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[me.untethr.nostr.domain :as domain]
[me.untethr.nostr.json :as json]
[me.untethr.nostr.parse :as parse]
[next.jdbc :as jdbc]
... |
5c2c388a8035013c060a0be99e0ea862dd98f3b9a63d48942a21dd364f330eb6 | kyleburton/sandbox | profiles.clj | {:user
{:plugins [[lein-swank "1.4.5"]
[lein-release/lein-release "1.0.5"]]}}
| null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/talks/2014-getting-started-with-go/files/self/.lein/profiles.clj | clojure | {:user
{:plugins [[lein-swank "1.4.5"]
[lein-release/lein-release "1.0.5"]]}}
| |
6bf3c59c2f7c73975cbcee5a199ca397b4cd70083e294604f5db91af6cdfebb2 | tezos-checker/checker | checkerMain.ml | open CheckerEntrypoints
open CheckerTypes
open Checker
open Fa2Interface
open Error
open Common
open GetOracleEntrypoint
(* We can not serialize all of our parameters, since `Balance_of` contains a `contract`. So, we split
* up parameters we can not serialize here.
*)
type strict_params =
| Balance_of of fa2_balanc... | null | https://raw.githubusercontent.com/tezos-checker/checker/95e3824277b88f524cc65fa996fb659d6399eb97/src/checkerMain.ml | ocaml | We can not serialize all of our parameters, since `Balance_of` contains a `contract`. So, we split
* up parameters we can not serialize here.
check if the given oracle, collateral_fa2, and ctez contracts have the entrypoints we need
emit a touch operation to checker
initialize checker state
add the metadata b... | open CheckerEntrypoints
open CheckerTypes
open Checker
open Fa2Interface
open Error
open Common
open GetOracleEntrypoint
type strict_params =
| Balance_of of fa2_balance_of_param
| Transfer of fa2_transfer list
type checker_params =
| LazyParams of lazy_params
| StrictParams of strict_params
type params =
... |
da4784802c36bc251b9d6d93797aab1823c1b9916aa8430180feddf0557a2c0e | wireapp/wire-server | IdPConfigStore.hs | # LANGUAGE TemplateHaskell #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , e... | null | https://raw.githubusercontent.com/wireapp/wire-server/cfaf9184e15b08b09853d9c5be9e5fc37dcb9a3c/services/spar/src/Spar/Sem/IdPConfigStore.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
mo... |
0b12678ba8c782b66eb0a507e708aaec8774ed2e7955eb746ac0b954f8b86dcf | anmonteiro/ocaml-h2 | hpack.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/66d92f1694b488ea638aa5073c796e164d5fbd9e/hpack/src/hpack.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | |
e424dcd875cd44f2a91f48880bf2e5a9a18067266ee79aae699d7a541658cac9 | GNOME/aisleriot | aunt-mary.scm | ;; AisleRiot - aunt_mary.scm -*-scheme-*-
Copyright ( C ) , 2005 .
Aunt Mary is a very difficult Klondike variation .
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either versio... | null | https://raw.githubusercontent.com/GNOME/aisleriot/5ab7f90d8a196f1fcfe5a552cef4a4c1a4b5ac39/games/aunt-mary.scm | scheme | AisleRiot - aunt_mary.scm -*-scheme-*-
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTIC... | Copyright ( C ) , 2005 .
Aunt Mary is a very difficult Klondike variation .
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
(use-modules (aisleriot in... |
c59b2fa6617a8cc3e73b67ba9bcb030e9d06b58825b39c8a67b4cd3151198c0c | CGenie/haskell-snake | Board.hs | Board.hs -- board logic
module Game.HSnake.Board where
import Control.Lens
import Game.HSnake.Basic
data Board = Board {
_xSize :: Int,
_ySize :: Int
} deriving (Eq, Show)
makeLenses ''Board
initialBoard = Board numRectsX numRectsY
| null | https://raw.githubusercontent.com/CGenie/haskell-snake/3783e65632cd89691f63bff0ff51ede9efbe81bd/src/Game/HSnake/Board.hs | haskell | board logic | module Game.HSnake.Board where
import Control.Lens
import Game.HSnake.Basic
data Board = Board {
_xSize :: Int,
_ySize :: Int
} deriving (Eq, Show)
makeLenses ''Board
initialBoard = Board numRectsX numRectsY
|
0a4f37a97076301caefebfeb0d498982866058125d88277118444d7b1bbfe247 | rollacaster/sketches | lift_induced_drag.cljs | (ns sketches.nature-of-code.lift-induced-drag
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.vector :as v]
[sketches.mover :as m]))
(defn setup []
{:movers (map
(fn [i]
{:mass (+ 1 (rand-int 50))
:loca... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/forces/lift_induced_drag.cljs | clojure | (ns sketches.nature-of-code.lift-induced-drag
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.vector :as v]
[sketches.mover :as m]))
(defn setup []
{:movers (map
(fn [i]
{:mass (+ 1 (rand-int 50))
:loca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.