_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 |
|---|---|---|---|---|---|---|---|---|
1e2845d5146466619dfd9bdb8e0795f90d952f2e249323ba288a601f1a54c9d8 | akira08280/programming-in-haskell | compiler.hs | Compiler example from chapter 16 of Programming in Haskell ,
, Cambridge University Press , 2016 .
data Expr = Val Int | Add Expr Expr
eval :: Expr -> Int
eval (Val n) = n
eval (Add x y) = eval x + eval y
type Stack = [Int]
type Code = [Op]
data Op = PUSH Int | ADD
deriving Show
exec :: Code -> ... | null | https://raw.githubusercontent.com/akira08280/programming-in-haskell/4067f729145429604aa7f3c8eee59b409addc685/Code/compiler.hs | haskell | Compiler example from chapter 16 of Programming in Haskell ,
, Cambridge University Press , 2016 .
data Expr = Val Int | Add Expr Expr
eval :: Expr -> Int
eval (Val n) = n
eval (Add x y) = eval x + eval y
type Stack = [Int]
type Code = [Op]
data Op = PUSH Int | ADD
deriving Show
exec :: Code -> ... | |
f985827af6d52a6b323ab10f82e73b02cc46d3a77d11be4abec56b7288453c74 | rajasegar/cl-djula-tailwind | main.lisp | (defpackage cl-djula-tailwind/tests/main
(:use :cl
:cl-djula-tailwind
:rove))
(in-package :cl-djula-tailwind/tests/main)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-djula-tailwind)' in your Lisp.
(deftest test-plain-util
(testing "should give css for mx-2"
(ok (string= (cl-... | null | https://raw.githubusercontent.com/rajasegar/cl-djula-tailwind/f008ed11fa900a238580e6922cb94953eeda9b96/tests/main.lisp | lisp | NOTE: To run this test file, execute `(asdf:test-system :cl-djula-tailwind)' in your Lisp. | (defpackage cl-djula-tailwind/tests/main
(:use :cl
:cl-djula-tailwind
:rove))
(in-package :cl-djula-tailwind/tests/main)
(deftest test-plain-util
(testing "should give css for mx-2"
(ok (string= (cl-minify-css:minify-css (get-plain-class "mx-2")) ".mx-2{margin-left:0.5rem;margin-right:0.5rem;... |
03d3807bb7a93a5a23e60efadfada8a287d2f604a10482cff3aa69a80149bd2e | braveclojure/training | core.clj | (ns blackjack.core
(:gen-class)
(:require [clojure.string :as str]
[clojure.set :as set]))
;; Arbitrary amount of starting money
(def starting-money 1000)
;; Use nested loops to iterate over suits and ranks to generate a deck
(def deck
"A deck of cards"
(loop [suits ["♠" "♥" "♦" "♣"]
deck... | null | https://raw.githubusercontent.com/braveclojure/training/5b7fb9059c17b2166c2e66850094f424319e55eb/projects/blackjack/src/blackjack/core.clj | clojure | Arbitrary amount of starting money
Use nested loops to iterate over suits and ranks to generate a deck
This is used when calculating the value of a hand
=====
Bets
=====
Notice that we separate the impure function, prompt-bet, from the
pure function, place-bet. In functional programming languages, we
try to writ... | (ns blackjack.core
(:gen-class)
(:require [clojure.string :as str]
[clojure.set :as set]))
(def starting-money 1000)
(def deck
"A deck of cards"
(loop [suits ["♠" "♥" "♦" "♣"]
deck #{}]
(if (empty? suits)
deck
(let [[suit & remaining-suits] suits]
(recur remaining... |
87584386887328a7e96e69f2c5e18fa8570ded9d030a0cd88152a22055d12acf | minio/minio-hs | Time.hs | --
MinIO Haskell SDK , ( C ) 2017 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
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, softw... | null | https://raw.githubusercontent.com/minio/minio-hs/0b3a5559fd95c4214a93545b1d602aa985c6f0c8/src/Network/Minio/Data/Time.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | MinIO Haskell SDK , ( C ) 2017 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Network.Minio.Data.Time
( awsTimeFormat,
awsTimeFormatBS,
awsDateFormat,
awsDateFormatBS,
awsParseTime,
... |
866c3d73a64af971094ef6e807d6d57fd99c6caff1997c225398d2a16c83006f | LambdaHack/LambdaHack | MonadStateRead.hs | -- | Game state reading monad and basic operations.
module Game.LambdaHack.Common.MonadStateRead
( MonadStateRead(..)
, getState, getLevel
, getGameMode, isNoConfirmsGame, getEntryArena, pickWeaponM, displayTaunt
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import Data.Either
impor... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/a3cd114410471b6a48c4f4bb746308fd4ee002b4/engine-src/Game/LambdaHack/Common/MonadStateRead.hs | haskell | | Game state reading monad and basic operations.
| Monad for reading game state. A state monad with state modification
disallowed (another constraint is needed to permit that).
The basic server and client monads are like that, because server
and clients freely modify their internal session data, but don't modify
... | module Game.LambdaHack.Common.MonadStateRead
( MonadStateRead(..)
, getState, getLevel
, getGameMode, isNoConfirmsGame, getEntryArena, pickWeaponM, displayTaunt
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import Data.Either
import qualified Data.EnumMap.Strict as EM
import ... |
f43b87d7490b8e521ff07c840db2e9cd840651a701b52bc9d8c43ab33680673b | webyrd/untitled-relational-interpreter-book | slatex.scm | Configured for Scheme dialect petite by scmxlate , v 20120421 ,
( c ) ,
;/~dorai/scmxlate/scmxlate.html
(define slatex::*slatex-version* "20090928")
(define slatex::*operating-system*
(if (getenv "COMSPEC") 'windows 'unix))
(define-syntax slatex::defenum
(let* ([old-datum->syntax-object datum->syntax-object]
... | null | https://raw.githubusercontent.com/webyrd/untitled-relational-interpreter-book/247e29afd224586c39c1983e042524c7cc9fe17b/latex/slatex/slatex.scm | scheme | /~dorai/scmxlate/scmxlate.html
)
)
)))))
)])
] | Configured for Scheme dialect petite by scmxlate , v 20120421 ,
( c ) ,
(define slatex::*slatex-version* "20090928")
(define slatex::*operating-system*
(if (getenv "COMSPEC") 'windows 'unix))
(define-syntax slatex::defenum
(let* ([old-datum->syntax-object datum->syntax-object]
[datum->syntax (lambda (... |
4571e6e1fe0f1c69bc075d58818606277e23b4722c4b30e75f883d3d2f69e121 | chameco/reliquary | AST.hs | module Reliquary.Core.AST where
import Text.Parsec
import Reliquary.AST
data Name = Integer
data CoreTerm = CStar
| CUnitType
| CUnit
| CRelTermType
| CRelTerm Term
| CVar Int
| CApply CoreTerm CoreTerm
| CLambda Core... | null | https://raw.githubusercontent.com/chameco/reliquary/0af1bc89b6e37d790e460d6119ded3bcfaa85b07/src/Reliquary/Core/AST.hs | haskell | module Reliquary.Core.AST where
import Text.Parsec
import Reliquary.AST
data Name = Integer
data CoreTerm = CStar
| CUnitType
| CUnit
| CRelTermType
| CRelTerm Term
| CVar Int
| CApply CoreTerm CoreTerm
| CLambda Core... | |
922fc9a6e94e2e6c5775aac8c63cb536ccc16298a684b994388c580672a14d87 | codereport/SICP-2020 | cezarb_solutions.rkt | #lang racket
(require rackunit)
(require racket/list)
Ex . 2.77 , 2.78 and 2.79
(define table (make-hash))
(define (put key1 key2 value) (hash-set! table (list key1 key2) value))
(define (get key1 key2) (hash-ref table (list key1 key2) #f))
(define (attach-tag tag value) (cons tag value))
(def... | null | https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%202.5%20Solutions/cezarb_solutions.rkt | racket | can we convert ?
try to find a common type (assume only binary ops ...)
convert all values to supertype
apply operation to
-- scheme-number --
-- rational --
internal procedures
interface to rest of the system
--complex --
internal procedures
interface to the rest of the system
internal... | #lang racket
(require rackunit)
(require racket/list)
Ex . 2.77 , 2.78 and 2.79
(define table (make-hash))
(define (put key1 key2 value) (hash-set! table (list key1 key2) value))
(define (get key1 key2) (hash-ref table (list key1 key2) #f))
(define (attach-tag tag value) (cons tag value))
(def... |
fdad9cc0b91fde7eee7b759d371ebafa86941700ad8ffe885043d89dfd4c19ad | janestreet/merlin-jst | type_enclosing.ml | open Std
let log_section = "type-enclosing"
let {Logger.log} = Logger.for_section log_section
type type_info =
| Modtype of Env.t * Types.module_type
| Type of Env.t * Types.type_expr
| Type_decl of Env.t * Ident.t * Types.type_declaration
| String of string
type typed_enclosings =
(Location.t * type_info ... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/9c3b60c98d80b56af18ea95c27a0902f0244659a/src/analysis/type_enclosing.ml | ocaml | Else use the reconstructed identifier | open Std
let log_section = "type-enclosing"
let {Logger.log} = Logger.for_section log_section
type type_info =
| Modtype of Env.t * Types.module_type
| Type of Env.t * Types.type_expr
| Type_decl of Env.t * Ident.t * Types.type_declaration
| String of string
type typed_enclosings =
(Location.t * type_info ... |
2971daa83c5a12e0eee28b48eb73617e03cf4ba3bb54e12fecc84db8df210f57 | silky/quipper | Example4.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
example4 :: (Qubit, Qubit, Qubit)... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/Example4.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
====================================================================== | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
example4 :: (Qubit, Qubit, Qubit) -> Circ (Qubit, Qubit, Qubit)
example4(q, a, b) = do
with_ancilla $ \c -> do
qnot_at c `controlled` [a, b]
hadamard q `controlled` [c]
qnot_at c `controlled` [a, b]
return (q,... |
4364998876ee04337dbd8319440cd60f91ee9a4be99558c8a152e4fabc967423 | reborg/clojure-essential-reference | 10.clj | < 1 >
#(nthrest lines %))
< 2 >
#(take-while (some-fn header? metric?) %))
(defn filter-pattern [lines] ; <3>
(sequence
(comp
(map (all-except-first lines))
(keep if-header-or-metric)
(filter pattern?))
(range (count lines))))
(filter-pattern device-output)
;; ((["Wireless" "MXD... | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/SequentialCollections/seqandsequence/10.clj | clojure | <3>
((["Wireless" "MXD" ""]
(["Wired" "QXD"] | < 1 >
#(nthrest lines %))
< 2 >
#(take-while (some-fn header? metric?) %))
(sequence
(comp
(map (all-except-first lines))
(keep if-header-or-metric)
(filter pattern?))
(range (count lines))))
(filter-pattern device-output)
[ " ClassA " " 34.97 " " " " 34.5 " ]
[ " ClassB ... |
3ac6abdb5fcb9bfb68170e8fa7e62998b5a79ce9196a2135a197b21f0194614e | Elastifile/git-sling | Main.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Main where
import Control.Monad (when, void, forM_)
import Control.Monad.IO.Class (liftIO)
import Data.IORef
import Data.Maybe (fromMaybe, mapMaybe)
import Data.Text... | null | https://raw.githubusercontent.com/Elastifile/git-sling/a92f1836910c0a4d8105ca0dff9d1bd08e9bb181/server/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
remove leftover branches
cleanup leftover state from previous runs
ignore
DO I... | # LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
module Main where
import Control.Monad (when, void, forM_)
import Control.Monad.IO.Class (liftIO)
import Data.IORef
import Data.Maybe (fromMaybe, mapMaybe)
import Data.Text (Text)
import qualified Data.Text ... |
8284afd96ff412b89005b426f9c5d022653ac53f242bebb8f6ee3069aabf49cf | jyh/metaprl | kat_terms.mli | extends Base_theory
extends Support_algebra
extends Base_select
extends Itt_struct2
(************************************************************************
* TERMS *
************************************************************************)
1 and 0
... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/kat/kat_terms.mli | ocaml | ***********************************************************************
* TERMS *
***********************************************************************
'x * 'y
'x + 'y
~'x | extends Base_theory
extends Support_algebra
extends Base_select
extends Itt_struct2
1 and 0
' x^ *
declare bool
declare kleene
declare le{'x; 'y}
declare ge{'x; 'y}
|
c723cc5712180e44aaff12be5370c50419eb6290971edf05b7a99604747b2b76 | input-output-hk/ouroboros-network | TrackUpdates.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Test.ThreadNet.Infra.Byron.TrackUpdates (
ProtocolVersionUpdateLabel (..)
, SoftwareVersionUpdateLabel (..)
, mkProtocolByronAndH... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-byron-test/src/Test/ThreadNet/Infra/Byron/TrackUpdates.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE MultiWayIf #
| The expectation and observation regarding whether the hard-fork proposal
successfully updated the protocol version
^ whether the proposed protocol version is adopted or not adopted by the
end of the test
^ @Just b@ indicates whether the final cha... | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Test.ThreadNet.Infra.Byron.TrackUpdates (
ProtocolVersionUpdateLabel (..)
, SoftwareVersionUpdateLabel (..)
, mkProtocolByronAndHardForkTxs
, mkUpdateLabels
) where
import Control.Exceptio... |
76a6ea0f3aceaef5cdf0c855848643d112fa5910fa621c9800eea4eab5d7d4cb | racket/compiler | zo-test.rkt | #!/bin/sh
#|
exec racket -t "$0" -- -s -t 60 -v -R $*
|#
#lang racket
(require setup/dirs
racket/runtime-path
racket/future
compiler/find-exe
"zo-test-util.rkt")
(define ((make-recorder! ht) file phase)
(hash-update! ht phase (curry list* file) empty))
(define stop-on-first-erro... | null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/zo-test.rkt | racket |
exec racket -t "$0" -- -s -t 60 -v -R $*
Test mode: | #!/bin/sh
#lang racket
(require setup/dirs
racket/runtime-path
racket/future
compiler/find-exe
"zo-test-util.rkt")
(define ((make-recorder! ht) file phase)
(hash-update! ht phase (curry list* file) empty))
(define stop-on-first-error (make-parameter #f))
(define verbose-mode (ma... |
15d227e5127e2445154c5fd0a92d241fe9e5ae32646a77302efdb5838ad507ef | sealchain-project/sealchain | DB.hs | -- | Higher-level DB functionality.
module Pos.DB.DB
( initNodeDBs
, gsAdoptedBVDataDefault
) where
import Universum
import Pos.Chain.Block (genesisBlock0, headerHash)
import Pos.Chain.Genesis as Genesis (Config (..))
import Pos.Chain.Lrc (genesisLeaders)
... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/lib/src/Pos/DB/DB.hs | haskell | | Higher-level DB functionality.
--------------------------------------------------------------------------
MonadGState instance
-------------------------------------------------------------------------- |
module Pos.DB.DB
( initNodeDBs
, gsAdoptedBVDataDefault
) where
import Universum
import Pos.Chain.Block (genesisBlock0, headerHash)
import Pos.Chain.Genesis as Genesis (Config (..))
import Pos.Chain.Lrc (genesisLeaders)
import Pos.Chain.Update (B... |
85df4d63d3b63186ce30ef85c4a7563f5c58f0f498e02403e3432b18b89be65e | soegaard/sketching | text-rotation.rkt | #lang sketching
; -docs/blob/master/content/examples/Basics/Typography/TextRotation/TextRotation.pde
; Text Rotation.
; Draws letters to the screen and rotates them at different angles.
(define angle 0.0) ; the rotation angle
(define (setup)
(size 640 360)
(frame-rate 10)
(text-size 18)
(background 0))
(d... | null | https://raw.githubusercontent.com/soegaard/sketching/94e114ac6e92ede3b85481df755b673be24b226e/sketching-doc/sketching-doc/manual-examples/basics/typography/text-rotation.rkt | racket | -docs/blob/master/content/examples/Basics/Typography/TextRotation/TextRotation.pde
Text Rotation.
Draws letters to the screen and rotates them at different angles.
the rotation angle
(smoothing 'unsmoothed)
(text-smoothing 'unsmoothed) | #lang sketching
(define (setup)
(size 640 360)
(frame-rate 10)
(text-size 18)
(background 0))
(define (draw)
(background 0)
(stroke-weight 1)
(stroke 153)
(push-matrix)
(define angle1 (radians 45))
(translate 100 180)
(rotate angle1)
(text "45 DEGREES" 0 0)
(line 0 0 150 0)
(pop-matri... |
09203a82432cc6781c1f1d04cf5648e44acef526f5ebfc8d0e1316ec00405a6d | mbenke/zpf2012 | PlusMinusUU.hs | # LANGUAGE FlexibleContexts , RankNTypes #
import Data.Char(digitToInt)
import Criterion.Main
import Text.ParserCombinators.UU
import Text.ParserCombinators.UU.Utils
import Text.ParserCombinators.UU.BasicInstances hiding(Parser)
type Parser a = P (Str Char String LineColPos) a
digit :: Parser Char
digit = pSym ( ' ... | null | https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Code/Parse2/PlusMinusUU.hs | haskell | case errors of
[] -> a
(e:_) -> error $ show e
| # LANGUAGE FlexibleContexts , RankNTypes #
import Data.Char(digitToInt)
import Criterion.Main
import Text.ParserCombinators.UU
import Text.ParserCombinators.UU.Utils
import Text.ParserCombinators.UU.BasicInstances hiding(Parser)
type Parser a = P (Str Char String LineColPos) a
digit :: Parser Char
digit = pSym ( ' ... |
455bd09428df9d49443968b98bb18277b645eac1aa421cc67089d82a16c3444c | UMM-CSci/edsger | unification_test.cljs | (ns edsger.unification-test
(:require [edsger.unification :as u]
[edsger.parsing :as p]
[cljs.test :as t :refer-macros [deftest is] :include-macros true]))
;; ==== Unit tests for `wrap`
(deftest wrap-with-symbol
(is (= '(:a) (u/wrap :a))))
(deftest wrap-with-list
(is (= '(2) (u/wrap '(2)... | null | https://raw.githubusercontent.com/UMM-CSci/edsger/60910e70274f03c169a503826f095049bda5944a/test/edsger/unification_test.cljs | clojure | ==== Unit tests for `wrap`
==== Unit tests for `check-match`
==== Unit tests for `check-match-recursive`
The following tests are to test recursive-validate
Test on recursive-validate on non-empty lists
The problem was an (unnecessary) check that used
`list?`, which returned `false` when passed vectors.
Our pars... | (ns edsger.unification-test
(:require [edsger.unification :as u]
[edsger.parsing :as p]
[cljs.test :as t :refer-macros [deftest is] :include-macros true]))
(deftest wrap-with-symbol
(is (= '(:a) (u/wrap :a))))
(deftest wrap-with-list
(is (= '(2) (u/wrap '(2)))))
(deftest a-test
(is (... |
a0ab48f4a3814975dd56ad960e4752747a98c126a8a223cfddd1bc309205fcd8 | jacekschae/learn-pedestal-course-files | user.clj | (ns user
(:require [io.pedestal.http :as http]
[clojure.edn :as edn]
[cheffy.routes :as routes]))
(defonce system-ref (atom nil))
(defn start-dev []
(let [config (-> "src/config/cheffy/development.edn" slurp edn/read-string)]
(reset! system-ref
(-> config
(assoc ::http/... | null | https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/fa60a8f208e80658a4c55f0c094b66f68a2d3c6a/increments/11-system-setup/src/dev/user.clj | clojure | (ns user
(:require [io.pedestal.http :as http]
[clojure.edn :as edn]
[cheffy.routes :as routes]))
(defonce system-ref (atom nil))
(defn start-dev []
(let [config (-> "src/config/cheffy/development.edn" slurp edn/read-string)]
(reset! system-ref
(-> config
(assoc ::http/... | |
1afe5d54998cd7d8fef6ff6f96865f09f5d3922264982099b38dd849bde3df50 | gedge-platform/gedge-platform | rabbit_exchange_type_headers.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_exchange_type_headers).
-include_l... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_exchange_type_headers.erl | erlang |
[0]
[0] spec is vague on whether it can be omitted but in practice it's
useful to allow people to do this
legacy; we didn't validate
(linear-time) behaviour on the lists:keysort
(rabbit_misc:sort_field_table) that route/1 and
rabbit_binding:{add,remove}/2 do.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_exchange_type_headers).
-include_lib("ra... |
cf63dba01d7f1059ce693cd61c765b117abe3b535a4870f9f7a8b217bf646665 | sneerteam/sneer | rx_test_util.clj | (ns sneer.rx-test-util
(:require
[clojure.core.async :refer [>!! <!! close! chan]]
[rx.lang.clojure.core :as rx]
[sneer.async :refer [decode-nil]]
[sneer.commons :refer [nvl]]
[sneer.rx :refer [observe-for-io subscribe-on-io]]
[sneer.test-util :refer [<wait-trace! <!!? closes]]
)
(:impor... | null | https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/main/clojure/sneer/rx_test_util.clj | clojure | Channels cannot take nil | (ns sneer.rx-test-util
(:require
[clojure.core.async :refer [>!! <!! close! chan]]
[rx.lang.clojure.core :as rx]
[sneer.async :refer [decode-nil]]
[sneer.commons :refer [nvl]]
[sneer.rx :refer [observe-for-io subscribe-on-io]]
[sneer.test-util :refer [<wait-trace! <!!? closes]]
)
(:impor... |
251c287edc3c6f09345a2dce0e3bcff2f67781b5457718ceed1897bc93ea7ccf | javalib-team/javalib | jSignature.mli |
* This file is part of Javalib
* Copyright ( c)2008 ( CNRS )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 , with the special exception on linking described in file
* LICENSE .
*
* This ... | null | https://raw.githubusercontent.com/javalib-team/javalib/0699f904dbb17e87ec0ad6ed0c258a1737e60329/src/jSignature.mli | ocaml | * {1 Types used in type declarations of generic signatures}
* This is the type used for type variables as P in Collection<P>.
* e.g. <?+Object>
* e.g. <?-Object>
* e.g. <Object>
* <*>
* [typeSignature] is used for method parameters and return values of
generic methods.
* {1 Types of generic signatures}
* This... |
* This file is part of Javalib
* Copyright ( c)2008 ( CNRS )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 , with the special exception on linking described in file
* LICENSE .
*
* This ... |
03042194d029a681ed238bbadce71cc6e43561842ff4fe5a96d6a26397ff39ec | OCamlPro/ezjs_min | js.ml | include Js_of_ocaml.Js
module Url = Js_of_ocaml.Url
module Dom_html = Js_of_ocaml.Dom_html
module Firebug = Js_of_ocaml.Firebug
module File = Js_of_ocaml.File
module Dom = Js_of_ocaml.Dom
module Typed_array = Js_of_ocaml.Typed_array
module Regexp = Js_of_ocaml.Regexp
type ('a, 'b) result = ('a, 'b) Stdlib.result = Ok ... | null | https://raw.githubusercontent.com/OCamlPro/ezjs_min/dd35adc11f54c4678cd39902893ecc45e07036ee/src/js.ml | ocaml | include Js_of_ocaml.Js
module Url = Js_of_ocaml.Url
module Dom_html = Js_of_ocaml.Dom_html
module Firebug = Js_of_ocaml.Firebug
module File = Js_of_ocaml.File
module Dom = Js_of_ocaml.Dom
module Typed_array = Js_of_ocaml.Typed_array
module Regexp = Js_of_ocaml.Regexp
type ('a, 'b) result = ('a, 'b) Stdlib.result = Ok ... | |
1b0c3bc8b4265380b4c4e5dd9241e5c16520e1fc80ab20718207897dbb62019d | CryptoKami/cryptokami-core | Genesis.hs | -- | Computation of LRC genesis data.
module Pos.Lrc.Genesis
( genesisLeaders
) where
import Pos.Core (GenesisData (..), HasConfiguration, SlotLeaders, genesisData)
import Pos.Lrc.FtsPure (followTheSatoshiUtxo)
import Pos.Txp.GenesisUtxo (genesisUtxo)
import Pos.Txp.Toi... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/block/src/Pos/Lrc/Genesis.hs | haskell | | Computation of LRC genesis data.
| Compute leaders of the 0-th epoch from initial shared seed and stake distribution. |
module Pos.Lrc.Genesis
( genesisLeaders
) where
import Pos.Core (GenesisData (..), HasConfiguration, SlotLeaders, genesisData)
import Pos.Lrc.FtsPure (followTheSatoshiUtxo)
import Pos.Txp.GenesisUtxo (genesisUtxo)
import Pos.Txp.Toil (GenesisUtxo (..))
genesisLeaders :... |
8b8e0512be4d163e254536434caa4fe32ab439cb866b0a4b1eae6a02ee022981 | thlack/surfs | spec.clj | (ns ^:no-doc thlack.surfs.props.spec
"Contains specs for convenience props included via thlack.surfs"
(:require [clojure.spec.alpha :as s]
[thlack.surfs.composition.spec :as comp.spec]
[thlack.surfs.strings.spec :as strings.spec]))
(s/def ::selected? boolean?)
(s/def ::disable_emoji_for (s... | null | https://raw.githubusercontent.com/thlack/surfs/e03d137d6d43c4b73a45a71984cf084d2904c4b0/src/thlack/surfs/props/spec.clj | clojure | (ns ^:no-doc thlack.surfs.props.spec
"Contains specs for convenience props included via thlack.surfs"
(:require [clojure.spec.alpha :as s]
[thlack.surfs.composition.spec :as comp.spec]
[thlack.surfs.strings.spec :as strings.spec]))
(s/def ::selected? boolean?)
(s/def ::disable_emoji_for (s... | |
96a963accbee37bb5105f5b1a09888f62e64dfd6376b22e0c02e6c20eeb2919a | FundingCircle/jackdaw | base.clj | (ns jackdaw.test.commands.base
(:require
[clojure.pprint :as pprint]))
(set! *warn-on-reflection* true)
(def command-map
{:stop (constantly true)
:sleep (fn [_machine [sleep-ms]]
(Thread/sleep sleep-ms))
:println (fn [_machine params]
(println (apply str params)))
:pprint ... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/e0c66d386277282219e070cfbd0fe2ffa3c9dca5/src/jackdaw/test/commands/base.clj | clojure | (ns jackdaw.test.commands.base
(:require
[clojure.pprint :as pprint]))
(set! *warn-on-reflection* true)
(def command-map
{:stop (constantly true)
:sleep (fn [_machine [sleep-ms]]
(Thread/sleep sleep-ms))
:println (fn [_machine params]
(println (apply str params)))
:pprint ... | |
85eaceba30b5007bd53c4410949e8d3ac15b9c0e1f5c35cccbbe841551c2053a | ucsd-progsys/dsolve | lazy.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/stdlib/lazy.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : lazy.mli , v 1.10 2002/07/30 13... |
ea7c6d4bfb3d2f048bd2db6ff9406579a3ed106bfcfb2e6ad6087f23a96bef2d | Dasudian/DSDIN | dsdo_txs_eqc.erl |
-module(dsdo_txs_eqc).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_component.hrl").
-record(state,
{ oracles = []
, queries = []
, responses = []
, accounts = []
, patron
, height = 0
}).
-rec... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdoracle/eqc/dsdo_txs_eqc.erl | erlang | -- Generators -------------------------------------------------------------
TODO: fixed block
-- Operations -------------------------------------------------------------
--- init ---
--- add_account ---
--- query_oracle ---
--- oracle_response ---
-- Common pre-/post-conditions ---------------------------------... |
-module(dsdo_txs_eqc).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_component.hrl").
-record(state,
{ oracles = []
, queries = []
, responses = []
, accounts = []
, patron
, height = 0
}).
-rec... |
c7c22cded93edd5acc6ae9391315eb13c27027a0517ff8d424618ed00f77c903 | fossas/fossa-cli | FpmTomlSpec.hs | module Fortran.FpmTomlSpec (
spec,
) where
import Data.Map (fromList)
import Data.Set qualified as Set
import Data.Text (Text)
import Data.Text.IO qualified as TIO
import DepTypes (
DepEnvironment (EnvDevelopment, EnvProduction),
DepType (GitType),
Dependency (Dependency),
VerConstraint (CEq),
)
import Grap... | null | https://raw.githubusercontent.com/fossas/fossa-cli/efc29b4f9c874e338f0b5a7d1c5b13cb9543156f/test/Fortran/FpmTomlSpec.hs | haskell | module Fortran.FpmTomlSpec (
spec,
) where
import Data.Map (fromList)
import Data.Set qualified as Set
import Data.Text (Text)
import Data.Text.IO qualified as TIO
import DepTypes (
DepEnvironment (EnvDevelopment, EnvProduction),
DepType (GitType),
Dependency (Dependency),
VerConstraint (CEq),
)
import Grap... | |
87e77460a5989111b8545e2cec6e7ab65715d118f2bd3bc548af880483ba8299 | plum-umd/fundamentals | point-fun.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 point-fun) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal... | null | https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/1/www/code/point-fun.rkt | racket | about the language level of this file in a form that our tools can easily process.
A Point is a (make-point Real Real)
dist0 : Point -> Real
Compute the distance to origin from given point
Compute the distance between given points
Move the point by the given amount | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname point-fun) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct point (x y))
(check-expect (dist0 (make-poi... |
7c90deaee45792d33a901a516920f5df377cf1787d460e9dda6d3fbaa34e9fcb | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | Lib.hs | {-# LANGUAGE OverloadedStrings #-}
module Lib where
import Data.ByteString.Char8
import Network.HTTP.Client
import OpenAPI
import OpenAPI.Common
runAddPet :: MonadHTTP m => m (Response AddPetResponse)
runAddPet = runWithConfiguration defaultConfiguration (addPet myPet)
where
myPet =
Pet
{ petCateg... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/2779306860af040f47a6e57ede65027e2862133e/example/src/Lib.hs | haskell | # LANGUAGE OverloadedStrings # | module Lib where
import Data.ByteString.Char8
import Network.HTTP.Client
import OpenAPI
import OpenAPI.Common
runAddPet :: MonadHTTP m => m (Response AddPetResponse)
runAddPet = runWithConfiguration defaultConfiguration (addPet myPet)
where
myPet =
Pet
{ petCategory = Nothing,
petId = No... |
f4d84b25d733e1ca79814b5ba7ce0c2953239ba34c881340519fc2c42946de49 | amnh/PCG | Type.hs | ------------------------------------------------------------------------------
-- |
-- Module : Data.Graph.Type
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
------------------------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/graph/src/Data/Graph/Type.hs | haskell | ----------------------------------------------------------------------------
|
Module : Data.Graph.Type
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# LANGUAGE FlexibleContexts ... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ... |
e154e278a33a6b7e00e309beca75b2a64a6beb26e93277b70458a0b8837987e4 | thattommyhall/offline-4clojure | p10.clj | ;; Intro to Maps - Elementary
;; Maps store key-value pairs. Both maps and keywords can be used as lookup functions. Commas can be used to make maps more readable, but they are not required.
;; tags -
;; restricted -
(ns offline-4clojure.p10
(:use clojure.test))
(def __
;; your solution here
)
(defn -main []
(... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p10.clj | clojure | Intro to Maps - Elementary
Maps store key-value pairs. Both maps and keywords can be used as lookup functions. Commas can be used to make maps more readable, but they are not required.
tags -
restricted -
your solution here | (ns offline-4clojure.p10
(:use clojure.test))
(def __
)
(defn -main []
(are [soln] soln
(= __ ((hash-map :a 10, :b 20, :c 30) :b))
(= __ (:b {:a 10, :b 20, :c 30}))
))
|
1daff26c92fed8fe2e1758946c016f8657de33bcb6324aa30e24b0fef133df55 | kronkltd/jiksnu | helpers_test.clj | (ns jiksnu.modules.web.helpers-test
(:require [jiksnu.modules.web.helpers :as helpers]
[jiksnu.test-helper :as th]
[midje.sweet :refer :all])
(:import org.apache.http.HttpStatus))
(facts "#'jiksnu.modules.web.helpers/serve-template"
(fact "when the template exists"
(let [template-name... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test/jiksnu/modules/web/helpers_test.clj | clojure | (ns jiksnu.modules.web.helpers-test
(:require [jiksnu.modules.web.helpers :as helpers]
[jiksnu.test-helper :as th]
[midje.sweet :refer :all])
(:import org.apache.http.HttpStatus))
(facts "#'jiksnu.modules.web.helpers/serve-template"
(fact "when the template exists"
(let [template-name... | |
417b21dc4cab6f5b48b37926781e7a0a59f281a18141ab1656357b8961d901d9 | synsem/texhs | Catcode.hs | ----------------------------------------------------------------------
-- |
Module : Text . . Catcode
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
-- License : GPL-3
--
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
Types and util... | null | https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/src/Text/TeX/Lexer/Catcode.hs | haskell | --------------------------------------------------------------------
|
License : GPL-3
Maintainer :
Stability : experimental
--------------------------------------------------------------------
* Catcodes
| TeX catcodes. The @Enum@ instance respects the canonical mapping
of catcodes to the integers ... | Module : Text . . Catcode
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
Portability : GHC
Types and utility functions for TeX catcodes and catcode tables .
module Text.TeX.Lexer.Catcode
Catcode(..)
, showCatcodePP
* Catcode groups
, catcodesAllowed
... |
d3b22d93737b0bb9f1ef243ede58ad49141095ed0c2cdd73a1bb8bcbe84f74be | BillHallahan/G2 | PolyTypes.hs | module PolyTypes where
polyFst :: a -> b -> a
polyFst a b = a
typedFst :: Int -> Double -> Int
typedFst a b = polyFst a b
| null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/TestFiles/PolyTypes.hs | haskell | module PolyTypes where
polyFst :: a -> b -> a
polyFst a b = a
typedFst :: Int -> Double -> Int
typedFst a b = polyFst a b
| |
eda60559f50f842eee286d47525ba89ac5d02c0037aaeec3f9faf2d4abe94dfe | rainyt/ocaml-haxe | return_demo.ml | exception BOOL of bool;;
exception STRING of string;;
exception INT of int;;
exception FLOAT of float;;
let getString () = try let i = ref 0 in
let break = ref true in
while (!break && true) do
i := !i + 1;
(* EIf *)
if (!i = 10) then ignore (raise (STRING ("123123(" ^ (string_of_int !i) ^ ")"))) ;
(* EIf *)
if (!i =... | null | https://raw.githubusercontent.com/rainyt/ocaml-haxe/2861a572b9171d45c3f0f40b19c538cbf9f7bfec/ocaml_ml_demo/return_demo.ml | ocaml | EIf
EIf | exception BOOL of bool;;
exception STRING of string;;
exception INT of int;;
exception FLOAT of float;;
let getString () = try let i = ref 0 in
let break = ref true in
while (!break && true) do
i := !i + 1;
if (!i = 10) then ignore (raise (STRING ("123123(" ^ (string_of_int !i) ^ ")"))) ;
if (!i = 8) then ignore (rai... |
80c1bafd8061c588b21452935993ea4fba873c1233ff2a75e17212097b0fe4ff | spwhitton/anaphora | early.lisp | -*- Mode : Lisp ; Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : ANAPHORA -*-
Anaphora : The Anaphoric Macro Package from Hell
;;;;
;;;; This been placed in Public Domain by the author,
Nikodemus Siivola < >
(in-package :anaphora)
(defmacro with-unique-names ((&rest bindings) &body body)
`(let ,(map... | null | https://raw.githubusercontent.com/spwhitton/anaphora/71964047c83cdd734bae9b318b597177f1c00665/early.lisp | lisp | Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : ANAPHORA -*-
This been placed in Public Domain by the author, |
Anaphora : The Anaphoric Macro Package from Hell
Nikodemus Siivola < >
(in-package :anaphora)
(defmacro with-unique-names ((&rest bindings) &body body)
`(let ,(mapcar #'(lambda (binding)
(destructuring-bind (var prefix)
(if (consp binding) binding (list binding binding))
`(,var (gensym ,(s... |
173899a318afdb3f44c06f9c6c4e4b0761a61d2345e5bb68c502c422931439a3 | korya/efuns | env.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/beta/include/env.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : env.mli , v 1.1 2000/08/30 13... |
230c8ee6f1f516748f673219460fd87f1f61fa695319d49e0885048ffe238cd8 | pbrisbin/renters-reality | Completion.hs | module Handler.Completion
( getCompLandlordsR
, getCompSearchesR
) where
import Import
import Helpers.Completion
getCompLandlordsR :: Handler RepJson
getCompLandlordsR = generalCompletion $ \t -> do
landlords <- uniqueLandlords
return $ filter (looseMatch t) landlords
getCompSearchesR :: Handler ... | null | https://raw.githubusercontent.com/pbrisbin/renters-reality/2e20e4ab3f47a62d0bad75f49d5e6beee1d81648/Handler/Completion.hs | haskell | module Handler.Completion
( getCompLandlordsR
, getCompSearchesR
) where
import Import
import Helpers.Completion
getCompLandlordsR :: Handler RepJson
getCompLandlordsR = generalCompletion $ \t -> do
landlords <- uniqueLandlords
return $ filter (looseMatch t) landlords
getCompSearchesR :: Handler ... | |
263687dd72752abec4c4ac37d0de9119a34c6e990c1d501e5fc053efc5c9587e | liamoc/agda-snippets | Snippets.hs | # LANGUAGE ViewPatterns #
module Agda.Contrib.Snippets
( renderAgdaSnippets
, CSSClass
, CommandLineOptions (..)
, defaultOptions
) where
import Control.Monad.Except
import Control.Monad.State (get)
import Data.Char
import Data.Function
import Data.... | null | https://raw.githubusercontent.com/liamoc/agda-snippets/433f16261b0787c87fc145d67a440fecb11c94f7/agda-snippets/src/Agda/Contrib/Snippets.hs | haskell | We simply ignore empty code blocks
start consuming code again.
^ CSS Class name
^ Returns the file contents as a string, where each code block has been rendered to HTML. | # LANGUAGE ViewPatterns #
module Agda.Contrib.Snippets
( renderAgdaSnippets
, CSSClass
, CommandLineOptions (..)
, defaultOptions
) where
import Control.Monad.Except
import Control.Monad.State (get)
import Data.Char
import Data.Function
import Data.... |
3fa4925c2ca7d9c7e2cc1766c6a066c34a3809255c5d27cb750b123cc981954d | threatgrid/ctia | asset_mapping_test.clj | (ns ctia.http.routes.graphql.asset-mapping-test
(:require
[clj-momo.test-helpers.core :as mth]
[clojure.test :refer [deftest is are join-fixtures testing use-fixtures]]
[ctia.entity.asset-mapping :as asset-mapping]
[ctia.test-helpers.auth :refer [all-capabilities]]
[ctia.test-helpers.core :as helpers]
... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/test/ctia/http/routes/graphql/asset_mapping_test.clj | clojure | (ns ctia.http.routes.graphql.asset-mapping-test
(:require
[clj-momo.test-helpers.core :as mth]
[clojure.test :refer [deftest is are join-fixtures testing use-fixtures]]
[ctia.entity.asset-mapping :as asset-mapping]
[ctia.test-helpers.auth :refer [all-capabilities]]
[ctia.test-helpers.core :as helpers]
... | |
c2fe31dda80c4dff83ca498e24fe3bfc99daaee755e126659b66b9bb50841143 | xapi-project/xen-api-libs | xen_cmdline.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/xen-utils/xen_cmdline.mli | ocaml | * Gives a list of CPU feature masks currently set.
* Sets CPU feature masks.
* Removes CPU feature masks. |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
6be533c62422b897a42113a87b86eef4a34ae16a4ce32807dd2335b4232b2323 | mooreryan/ocaml_python_bindgen | test_specs_file.ml | open! Base
open! Lib
let with_data_as_file ~data ~f =
let open Stdio in
let fname, oc = Caml.Filename.open_temp_file "pyml_bindeng_test" "" in
Exn.protectx
~f:(fun oc ->
Out_channel.output_string oc data;
Out_channel.flush oc;
f ~file_name:fname)
~finally:Out_channel.close oc
let test_... | null | https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/70e6e0fba31d4634a776df7f7e89b6b3ea528a12/test/test_specs_file.ml | ocaml | open! Base
open! Lib
let with_data_as_file ~data ~f =
let open Stdio in
let fname, oc = Caml.Filename.open_temp_file "pyml_bindeng_test" "" in
Exn.protectx
~f:(fun oc ->
Out_channel.output_string oc data;
Out_channel.flush oc;
f ~file_name:fname)
~finally:Out_channel.close oc
let test_... | |
7e5a2b4cf7de140c6ce60ae9280cd6349a361940e379914082c379608689fbe1 | abarbu/haskell-torch | Common.hs | # LANGUAGE AllowAmbiguousTypes , ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances , FunctionalDependencies , GADTs #
# LANGUAGE KindSignatures , MultiParamTypeClasses , OverloadedLabels , OverloadedStrings , PartialTypeSignatures , PolyKinds , QuasiQuotes #
# LANGUAGE RankNTypes , ScopedTypeVar... | null | https://raw.githubusercontent.com/abarbu/haskell-torch/03b2c10bf8ca3d4508d52c2123e753d93b3c4236/haskell-torch/src/Torch/Datasets/Common.hs | haskell | | You'll notice that this module calls performMinorGC in various
places. There's no way to tell the Haskell GC about external memory so huge
amounts of memory can build up before any finalizers get run :(
conceptually a training set and test set are disjoint datasets! Certain
operations behave differently at train... | # LANGUAGE AllowAmbiguousTypes , ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances , FunctionalDependencies , GADTs #
# LANGUAGE KindSignatures , MultiParamTypeClasses , OverloadedLabels , OverloadedStrings , PartialTypeSignatures , PolyKinds , QuasiQuotes #
# LANGUAGE RankNTypes , ScopedTypeVar... |
68df333a74605003d1612d73959d03b5575eb1af2c28c4ef743fb52dfa70accc | ofmooseandmen/jord | LengthSpec.hs | module Data.Geo.Jord.LengthSpec
( spec
) where
import Test.Hspec
import qualified Data.Geo.Jord.Length as Length
spec :: Spec
spec = do
describe "Reading valid lengths" $ do
it "reads -15.2m" $ Length.read "-15.2m" `shouldBe` Just (Length.metres (-15.2))
it "reads 154km" $ Length.read "15... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/test/Data/Geo/Jord/LengthSpec.hs | haskell | module Data.Geo.Jord.LengthSpec
( spec
) where
import Test.Hspec
import qualified Data.Geo.Jord.Length as Length
spec :: Spec
spec = do
describe "Reading valid lengths" $ do
it "reads -15.2m" $ Length.read "-15.2m" `shouldBe` Just (Length.metres (-15.2))
it "reads 154km" $ Length.read "15... | |
6e0e0d716f1e8f07893a2a403fb77e363d1acc875a370d5a446c522e9da38603 | ekmett/gl | Registry.hs | # OPTIONS_GHC -Wall #
-----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2014 and
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
--------------------------------------... | null | https://raw.githubusercontent.com/ekmett/gl/1488e8dce368279d39b269b5ae5dda86ba10eb2d/src/Registry.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : portable
--------------------------------------------------------------------------
| Resolve shenanigans in the OpenGL Registry | # OPTIONS_GHC -Wall #
Copyright : ( C ) 2014 and
Maintainer : < >
module Registry
( Registry(..)
, Command(..)
, Parameter(..)
, Enumeratee(..)
, Extension(..)
, Feature(..)
, Group(..)
, Remove(..)
, Require(..)
, Type(..)
, lookupCommand
, lookupEnum
, deshenaniganize
... |
6dc2fc173552a2cb94c5968206fe6c43aa8a1bb17d329b019b6b9913ae0eb653 | ThoughtWorksInc/stonecutter | middleware.clj | (ns stonecutter.middleware
(:require [clojure.tools.logging :as log]
[ring.util.response :as r]
[ring.middleware.file :as ring-mf]
[stonecutter.translation :as translation]
[stonecutter.routes :as routes]
[stonecutter.controller.user :as user]
[s... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/middleware.clj | clojure | (ns stonecutter.middleware
(:require [clojure.tools.logging :as log]
[ring.util.response :as r]
[ring.middleware.file :as ring-mf]
[stonecutter.translation :as translation]
[stonecutter.routes :as routes]
[stonecutter.controller.user :as user]
[s... | |
0683abafb41b3d3db2fba98829570b90d30b46f77586140addb5c0bd928d0d46 | lem-project/lem | input.lisp | (in-package :lem-capi)
(defun shift-bit-p (modifiers)
(/= 0 (logand modifiers sys:gesture-spec-shift-bit)))
(defun control-bit-p (modifiers)
(/= 0 (logand modifiers sys:gesture-spec-control-bit)))
(defun meta-bit-p (modifiers)
(/= 0 (logand modifiers sys:gesture-spec-meta-bit)))
(defparameter *data-sym-table*... | null | https://raw.githubusercontent.com/lem-project/lem/4f620f94a1fd3bdfb8b2364185e7db16efab57a1/frontends/capi/input.lisp | lisp | #\+ | (in-package :lem-capi)
(defun shift-bit-p (modifiers)
(/= 0 (logand modifiers sys:gesture-spec-shift-bit)))
(defun control-bit-p (modifiers)
(/= 0 (logand modifiers sys:gesture-spec-control-bit)))
(defun meta-bit-p (modifiers)
(/= 0 (logand modifiers sys:gesture-spec-meta-bit)))
(defparameter *data-sym-table*... |
d66e5b7a720e9ff3c4bb95a4f4bcfc553a9b2437b0fd1142352ffec93b427793 | ocaml-gospel/gospel | HashTable.mli | (**************************************************************************)
(* *)
VOCaL -- A Verified OCaml Library
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/bd213d7fdfaf224666acb413efc49f872251bca7/test/vocal/HashTable.mli | ocaml | ************************************************************************
(as described in file LICE... | VOCaL -- A Verified OCaml Library
Copyright ( c ) 2020 The VOCaL Project
This software is free software , distributed under the MIT license
module type HashedType = sig
type t
@ axiom sym : forall x y : y - > equiv y x
@ axiom... |
06b68736d95c1c3d28a64e01a1d9efbc7e222fc0f59db931877ab3a97cafd65b | oklm-wsh/MrMime | input.ml | include RingBuffer.Committed
type st = Internal_buffer.st = St
type bs = Internal_buffer.bs = Bs
| null | https://raw.githubusercontent.com/oklm-wsh/MrMime/4d2a9dc75905927a092c0424cff7462e2b26bb96/lib/input.ml | ocaml | include RingBuffer.Committed
type st = Internal_buffer.st = St
type bs = Internal_buffer.bs = Bs
| |
44041586c8dd9f6416c7d62ec612e192a634c4f92d868fda10bf26cf8cb83490 | justinwoo/md2sht | MD2SHT.hs | {-# LANGUAGE OverloadedStrings #-}
module MD2SHT where
import Data.Text (pack, unpack, isInfixOf)
import MD2SHT.Types
import Text.HTML.TagSoup
extractStyles :: [Rule] -> [String] -> String
extractStyles rules classNames =
concat $ applyRule =<< classNames
where
extractLine (Line (Property prop) (Value val))... | null | https://raw.githubusercontent.com/justinwoo/md2sht/c4971c65ef92af1425126dd7e28ae925128a2f0f/src/MD2SHT.hs | haskell | # LANGUAGE OverloadedStrings #
throw away class |
module MD2SHT where
import Data.Text (pack, unpack, isInfixOf)
import MD2SHT.Types
import Text.HTML.TagSoup
extractStyles :: [Rule] -> [String] -> String
extractStyles rules classNames =
concat $ applyRule =<< classNames
where
extractLine (Line (Property prop) (Value val)) =
unpack prop ++ ":" ++ unpa... |
2d62a383505fe8217e8ea74ae582ad186faeee9bdc71d9433411c475d7d51ce5 | suprematic/otplike | project.clj | (def project-version "0.6.1-alpha-SNAPSHOT")
(defproject
otplike/otplike project-version
:description "Erlang/OTP like processes and behaviours on top of core.async"
:url ""
:license {:name "Eclipse Public License - v1.0"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
... | null | https://raw.githubusercontent.com/suprematic/otplike/bc9d4e82c14053fac8a0ec141eaca897dd2cfe9b/project.clj | clojure | :source-paths ["src" "examples"] | (def project-version "0.6.1-alpha-SNAPSHOT")
(defproject
otplike/otplike project-version
:description "Erlang/OTP like processes and behaviours on top of core.async"
:url ""
:license {:name "Eclipse Public License - v1.0"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
... |
4defedf0d3d5c90f1b5d5f4f2040d84badb795e424583d5505e51d34b62af5b3 | parenthesin/microservice-boilerplate | adapters_test.clj | (ns unit.microservice-boilerplate.adapters-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.properties :as properties]
[matcher-combinators.matchers :as matchers]
[matcher-combi... | null | https://raw.githubusercontent.com/parenthesin/microservice-boilerplate/285f26a6788e9c5b0e87f1042255d8a9841129b5/test/unit/microservice_boilerplate/adapters_test.clj | clojure | (ns unit.microservice-boilerplate.adapters-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.properties :as properties]
[matcher-combinators.matchers :as matchers]
[matcher-combi... | |
f9d5967ae5856bdb9e730a7e9a5e92861e050a80b2f092d302876a42ad780c40 | ku-fpg/haskino | Morse.hs | -------------------------------------------------------------------------------
-- |
Module : System . Hardware . Haskino . SamplePrograms . Strong .
-- Based on System.Hardware.Arduino
Copyright : ( c ) University of Kansas
System . Hardware . Arduino ( c )
-- Licens... | null | https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/legacy/Shallow/Morse.hs | haskell | -----------------------------------------------------------------------------
|
Based on System.Hardware.Arduino
License : BSD3
Stability : experimental
and fit into the existing examples structure.
-----------------------------------------------------------------------------
so we can ins... | Module : System . Hardware . Haskino . SamplePrograms . Strong .
Copyright : ( c ) University of Kansas
System . Hardware . Arduino ( c )
code blinker . Original by , modified to simplify
module System.Hardware.Haskino.SamplePrograms.Strong.Morse where
import Control.Monad ... |
688d018e15718241da5cec73eeea272d9afd18f8a9001ce27bf411f0c3a840e8 | mzp/coq-for-ipad | eval.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/debugger/eval.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Objective Caml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
... |
697560d0c7b7415f7c18fd9917d42b45128e5835ddd218a63089a3011a049295 | clojure/clojurescript | core.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs_build/foreign_libs_cljs_2249/core.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns foreign-libs-cljs-2249.core
(:require [thirdparty.calculator]))
(defn main []
(println (js/Calculator.add 1 2)))
|
e4e36377a67c08fe11e3775c4f4ca555c1af880c5a97a8328ae5eb71207f6217 | TrustInSoft/tis-interpreter | idxmap.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/qed/src/idxmap.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... |
724a7e368216f74eea8ce7157122a732b1ca96f44528c21611b3d6e34674f18b | metaocaml/ber-metaocaml | caml_tex.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/tools/caml_tex.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Paris
, Nagoya University
Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with th... |
c0580eaa6bd51760b2aa27f3d1abcc82caa49d1d5863deda5ad18727bdcc303c | ygrek/ocaml-extlib | test_UTF8.ml | let substring_inputs =
[
[|
"";
"⟿";
"⟿ቄ";
"⟿ቄş";
"⟿ቄş龟";
"⟿ቄş龟¯";
|];
[|
"";
"ç";
"çe";
"çek";
"çeko";
"çekos";
"çekosl";
"çekoslo";
"çekoslov";
"çekoslova";
"çekoslovak";
"çekoslovaky";
"çekoslovakya";
"çekoslovakyal";
"çekoslov... | null | https://raw.githubusercontent.com/ygrek/ocaml-extlib/69b77f0f0500c98371aea9a6f2abb56c946cdab0/test/test_UTF8.ml | ocaml | let substring_inputs =
[
[|
"";
"⟿";
"⟿ቄ";
"⟿ቄş";
"⟿ቄş龟";
"⟿ቄş龟¯";
|];
[|
"";
"ç";
"çe";
"çek";
"çeko";
"çekos";
"çekosl";
"çekoslo";
"çekoslov";
"çekoslova";
"çekoslovak";
"çekoslovaky";
"çekoslovakya";
"çekoslovakyal";
"çekoslov... | |
30271d08e009dd65102cd8e167e62c93a82290cae1a6866037543f81af09c86c | billstclair/trubanc-lisp | swank-indentation.lisp | (in-package :swank)
(defvar *application-hints-tables* '()
"A list of hash tables mapping symbols to indentation hints (lists
of symbols and numbers as per cl-indent.el). Applications can add hash
tables to the list to change the auto indentation slime sends to
emacs.")
(defun has-application-indentation-hint-p ... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/slime/contrib/swank-indentation.lisp | lisp | override swank version of this function | (in-package :swank)
(defvar *application-hints-tables* '()
"A list of hash tables mapping symbols to indentation hints (lists
of symbols and numbers as per cl-indent.el). Applications can add hash
tables to the list to change the auto indentation slime sends to
emacs.")
(defun has-application-indentation-hint-p ... |
6176ad26481cc556a7339517e29e868bb78b4c1c9b4e38223a879d8b10ec1c73 | kumarshantanu/lein-servlet | engine.clj | (ns leiningen.servlet.engine
"Access servlet engines"
(:use leiningen.servlet.util)
(:require [clojure.string :as str]
[bultitude.core :as bult]))
(def engine-ns-prefix "leiningen.servlet.engine")
(defn engine-namespaces
"Return a seq of [eng-ns eng-name] symbol pairs of corresponding available
... | null | https://raw.githubusercontent.com/kumarshantanu/lein-servlet/2be06155a677eba1c5a812d28499cd5b23535414/plugin/src/leiningen/servlet/engine.clj | clojure | [f project args]
(let [config (:servlet project)]
(if (map? config)
(f config args)
(err-println "No :servlet map found in project.clj - see help")))) | (ns leiningen.servlet.engine
"Access servlet engines"
(:use leiningen.servlet.util)
(:require [clojure.string :as str]
[bultitude.core :as bult]))
(def engine-ns-prefix "leiningen.servlet.engine")
(defn engine-namespaces
"Return a seq of [eng-ns eng-name] symbol pairs of corresponding available
... |
570aac006ada7f6d4db403c659500856b61f27a6544d4877747c02429f4802d3 | ocaml/opam | opamPackage.mli | (**************************************************************************)
(* *)
Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/5305e159d34ccc0b9fecbaa59727ac36e75f9223/src/format/opamPackage.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
* { 2 Package name and versions }
module Version: sig
include OpamStd.ABSTRACT
* Compare... |
69d61b0eeea71314f09c3376e99dd01e399258bafe01777ff5fbc9e65d1c6e17 | CryptoKami/cryptokami-core | Signing.hs | -- | Signing done with public/private keys.
module Pos.Crypto.Signing.Types.Signing
(
-- * Keys
PublicKey (..)
, SecretKey (..)
, toPublic
, formatFullPublicKey
, fullPublicKeyF
, fullPublicKeyHexF
, shortPublicKeyHexF
, parseFullPublicKey
... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/crypto/Pos/Crypto/Signing/Types/Signing.hs | haskell | | Signing done with public/private keys.
* Keys
* Signing and verification
* Proxy signature scheme
--------------------------------------------------------------------------
Orphan instances
--------------------------------------------------------------------------
------------------------------------------------... |
module Pos.Crypto.Signing.Types.Signing
(
PublicKey (..)
, SecretKey (..)
, toPublic
, formatFullPublicKey
, fullPublicKeyF
, fullPublicKeyHexF
, shortPublicKeyHexF
, parseFullPublicKey
, Signature (..)
, Signed (..)
, ProxyCert... |
9594e6df80738fcae27dcfc22056269206971d56a53356ff5b7fe86be18504d1 | richhickey/clojure-contrib | java_utils.clj | Copyright ( c ) Stuart Halloway & Contributors , April 2009 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fa... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/java_utils.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) Stuart Halloway & Contributors , April 2009 . All rights reserved .
( 1 ) Ease - of - use . These APIs should be convenient . Performance is secondary .
( 2 ) Duck typing . I hate having to think about the difference between
a string that names a file , and a File . Ditto for a ton ... |
373f4365dd7a947f128745f329395415ae75d27f4228b8d1fce5f903a66dc16e | fukamachi/clozure-cl | darwinx8664-syscalls.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright ( C ) 2001 - 2009 Clozure Associates
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;;; file "LICENSE". The LLGPL consists... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/library/darwinx8664-syscalls.lisp | lisp | Package : CCL -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
17 is obsolete sbreak
67 is obsolete vread
88 is old sethostname
94 is... | Copyright ( C ) 2001 - 2009 Clozure Associates
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as the file " LGPL " . Where these
(in-p... |
60a1e46a421b4fa6dd19be0e18d0f42e7aa8d71832a384c8333f3d32542d6d0e | dongcarl/guix | gnome-xyz.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 , 2020 , 2021 < >
Copyright © 2019 , 2021 Theodotou < >
Copyright © 2019 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 Prior... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/gnome-xyz.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2019 , 2020 , 2021 < >
Copyright © 2019 , 2021 Theodotou < >
Copyright © 2019 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2020 Prior < >
Copyright © 2020 >
Copyright © 2020 < ... |
10ee58b3df72dff94d2dd92a7cd15ad236f8c5d8d94998fe6e17916e9ab282f9 | alesya-h/live-components | deps.clj | (ns live-components.build.deps
(:require [boot.core :as boot]))
(println "Defining deps.")
(def deps
{:build
'[[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[adzerk/boot-cljs "2.1.4"]
[adzerk/boot-reload "0.5.2"]
[ org.clojure/tools.namespace " 0.2.11 " ]
;; [org.c... | null | https://raw.githubusercontent.com/alesya-h/live-components/8ca7f9dcabaa452a67bb18d24a8661e8de83aecc/src/live_components/build/deps.clj | clojure | [org.clojure/tools.reader "0.10.0-alpha3"]
ui
for storing subscriptions | (ns live-components.build.deps
(:require [boot.core :as boot]))
(println "Defining deps.")
(def deps
{:build
'[[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[adzerk/boot-cljs "2.1.4"]
[adzerk/boot-reload "0.5.2"]
[ org.clojure/tools.namespace " 0.2.11 " ]
[ org.clojur... |
29e2620b9d01ecb244b5909ef1678dc1eb06766cc802fa74e9495211f1955579 | jfrederickson/dotfiles | jfred-packages.scm | (use-modules
( gnu packages )
(guix packages)
;; (guix profiles)
(guix download)
(guix git-download)
(guix build-system gnu)
(guix build-system python)
(gnu packages audio)
(gnu packages python-xyz)
(gnu packages python-web)
(gnu packages pkg-config)
((guix licenses) #:prefix license:))
(define-public jfr... | null | https://raw.githubusercontent.com/jfrederickson/dotfiles/ac002a0f57e253dfbacd990a40aaaa3fb89a6b53/guix/guix/jfred-packages.scm | scheme | (guix profiles)
(replace 'check
(lambda _
(invoke "tox"))))))
(native-inputs
`(("python-mock" ,python-mock)
("python-tox" ,python-tox)
("python-pytest" ,python-pytest)
("python-coverage" ,python-coverage)
("python-pytest-mock" ,python-pytest-mock)
("python-pylint" ,python-pylint)))
(native-inputs... | (use-modules
( gnu packages )
(guix packages)
(guix download)
(guix git-download)
(guix build-system gnu)
(guix build-system python)
(gnu packages audio)
(gnu packages python-xyz)
(gnu packages python-web)
(gnu packages pkg-config)
((guix licenses) #:prefix license:))
(define-public jfred:python-linode-api... |
44ca743cc5064290a64e9ed5347f9b9d64c48e789d5ddef62a8f5c233e428371 | ghcjs/jsaddle-dom | SVGMatrix.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGMatrix
(multiply, multiply_, inverse, inverse_, translate, translate_,
scale, scale_, scaleNonUniform, s... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGMatrix.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGMatrix.scaleNonUniform Mozilla SVGMatrix.scaleNonUniform documentation>
| <-US/docs/Web/API/SVGMatrix.scaleNonUniform Mozilla SVGMatrix.scaleNonUniform documentation>
| <-US/docs/Web/API/SVGMatrix.fl... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGMatrix
(multiply, multiply_, inverse, inverse_, translate, translate_,
scale, scale_, scaleNonUniform, scaleNonUniform_, rotate, rotate_,
rotateFromVector, rotateFromVector_, flipX, flipX_, flipY... |
80a96a37379078d9f236a19d8fbf65ab6f9850cc3230057ad416813513ccf4b8 | jimrthy/frereth | routes.clj | (ns backend.web.routes
(:require
[backend.web.handlers :as handlers]
[cheshire.core :as json]
[clojure.pprint :refer [pprint]]
[clojure.spec.alpha :as s]
[frereth.apps.shared.lamport :as lamport]
[frereth.weald.logging :as log]
[frereth.weald.specs :as weald]
[integrant.core :as ig]
[io.ped... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/log-viewer/src/clj/backend/web/routes.clj | clojure |
TODO: Surely I can come up with something more restrictive
Actual spec:
Starts with a "/"
Consists of 0 or mor path segments separated by slashes
* string literal
* colon (\:) followed by a legal clojure identifier name.
This is a path parameter (highly discouraged)
* asterisk (\*) followed by a legal clojur... | (ns backend.web.routes
(:require
[backend.web.handlers :as handlers]
[cheshire.core :as json]
[clojure.pprint :refer [pprint]]
[clojure.spec.alpha :as s]
[frereth.apps.shared.lamport :as lamport]
[frereth.weald.logging :as log]
[frereth.weald.specs :as weald]
[integrant.core :as ig]
[io.ped... |
ae2a0f483905447b3210d0946f6343abd3058f6e6889720b33fc776a3dfcee3f | janestreet/hardcaml | test_rtl.ml | open! Import
open Signal
let rtl_write_null outputs = Rtl.print Verilog (Circuit.create_exn ~name:"test" outputs)
let%expect_test "Port names must be unique" =
require_does_raise [%here] (fun () -> rtl_write_null [ output "a" (input "a" 1) ]);
[%expect
{|
("Port names are not unique" (circuit_name test) (... | null | https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/test/lib/test_rtl.ml | ocaml | The exception is raised by the [output] function. | open! Import
open Signal
let rtl_write_null outputs = Rtl.print Verilog (Circuit.create_exn ~name:"test" outputs)
let%expect_test "Port names must be unique" =
require_does_raise [%here] (fun () -> rtl_write_null [ output "a" (input "a" 1) ]);
[%expect
{|
("Port names are not unique" (circuit_name test) (... |
a7c08a8fafade444dc60f5ac69f198c6c72349b5ca7f58cae0e07517eeadaf2d | exoscale/clojure-kubernetes-client | v1beta1_non_resource_rule.clj | (ns clojure-kubernetes-client.specs.v1beta1-non-resource-rule
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1beta1-non-resource-rule-data v1beta1-non-resource-rule)
(def v1beta1-non-resource-rule-data
{
(ds/opt :nonResourceURL... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_non_resource_rule.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-non-resource-rule
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1beta1-non-resource-rule-data v1beta1-non-resource-rule)
(def v1beta1-non-resource-rule-data
{
(ds/opt :nonResourceURL... | |
22337fd7191fe61a5b17ff3dd1bf33d570910aad05cb29a6973b9fedcde20dfe | mbal/swank-racket | eval.rkt | ;;; Provides the functions for the evaluation thread.
;;;
;;; In the normal implementation of swank (so, the common lisp one, or even the
;;; clojure one), the evaluation thread only evaluates stuff. However, in this
;;; version, the evaluation thread does more: basically all the things pass
;;; through this thread, si... | null | https://raw.githubusercontent.com/mbal/swank-racket/8a2efd2737700a795f301ec8ab47e11734336076/eval.rkt | racket | Provides the functions for the evaluation thread.
In the normal implementation of swank (so, the common lisp one, or even the
clojure one), the evaluation thread only evaluates stuff. However, in this
version, the evaluation thread does more: basically all the things pass
through this thread, since it's the only ... |
#lang racket
(require racket/base
racket/rerequire
(only-in srfi/13 string-prefix-ci?)
"complete.rkt"
"repl.rkt"
"modutil.rkt"
"describe.rkt"
"util.rkt")
(provide swank-evaluation)
(define (swank-evaluation parent-thread)
There are two namespaces that ... |
ffd610dba440082eaa0f5833e64d19909961405eee131b649c11239bf2a9745c | NorfairKing/the-notes | Terms.hs | module Relations.Preorders.Terms where
import Notes
makeDefs [
"preorder"
]
makeEx "powsetSubsetPreorder"
| null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Relations/Preorders/Terms.hs | haskell | module Relations.Preorders.Terms where
import Notes
makeDefs [
"preorder"
]
makeEx "powsetSubsetPreorder"
| |
2bb5d2648d504290ee2f1cc7a9d587520d688bd22bdd78a4b634a2bfddbee147 | dyzsr/ocaml-selectml | t110-orint.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
if (3 lor 6) <> 7 then raise Not_found;;
*
0 CONSTINT 4... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t110-orint.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
if (3 lor 6) <> 7 then raise Not_found;;
*
0 CONSTINT 4... | |
9c5e336e76412684822581de0bcc9e1705a75a85deea0d3ad7af79d728fe3add | LPCIC/matita | notationPt.ml | Copyright ( C ) 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content/notationPt.ml | ocaml | * CIC Notation Parse Tree
source file location
unparsed version
* To be increased each time the term type below changes, used for "safe"
* marshalling
kind, name, body
what to match, inductive type, out type, <pattern,action> list
name, body, where
literal, substitutions.
* Some [] -> user has given... | Copyright ( C ) 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... |
c0c50159f260d2532a5563add8e091b315fb35161b6744bcf49daafe7a5b9453 | BitGameEN/bitgamex | log_player_login.erl | %%%--------------------------------------------------------
@Module :
%%% @Description: 自动生成
%%%--------------------------------------------------------
-module(log_player_login).
-export([get_one/1, set_one/1, build_record_from_row/1]).
-include("common.hrl").
-include("record_log_player_login.hrl").
get_one(Id) -... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/data/log_player_login.erl | erlang | --------------------------------------------------------
@Description: 自动生成
-------------------------------------------------------- | @Module :
-module(log_player_login).
-export([get_one/1, set_one/1, build_record_from_row/1]).
-include("common.hrl").
-include("record_log_player_login.hrl").
get_one(Id) ->
case db_esql:get_row(?DB_LOG, <<"select id,game_id,game_package_id,player_id,device_id,device_model,os_type,os_ver,ip,lang,time from player_... |
1681a5ecb7db052ed91af804cb58bd5718cfcf94eac0fecc973a2fbeba423c84 | jberryman/directory-tree | Examples.hs | module Main
where
import System.Directory.Tree
import qualified Data.Foldable as F
import qualified Data.Traversable as T
-- for main2:
import Data.Digest.Pure.MD5
import qualified Data.ByteString.Lazy as B
main = darcsInitialize
-- simple example of creating a directory by hand and writing to disk: here we
... | null | https://raw.githubusercontent.com/jberryman/directory-tree/bfd31a37ba4af34ed25b2e55865db8c30b175510/EXAMPLES/Examples.hs | haskell | for main2:
simple example of creating a directory by hand and writing to disk: here we
replicate (kind of) running the command "darcs initialize" in the current
directory:
here we read directories from different locations on the disk and combine
them into a new directory structure, ignoring the anchored base d... | module Main
where
import System.Directory.Tree
import qualified Data.Foldable as F
import qualified Data.Traversable as T
import Data.Digest.Pure.MD5
import qualified Data.ByteString.Lazy as B
main = darcsInitialize
darcsInitialize = writeDirectory ("source_dir" :/ darcs_d)
where darcs_d = Dir "_darcs" [... |
a36b64e47eee9c21fa04713a67d5f39774eab1c6da48ce7bac5677d284ceda2d | yuriy-chumak/ol | zero_to_the_zero_power.scm | (print "0^0: " (expt 0 0))
(print "0.0^0: " (expt #i0 0))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/73230a893bee928c0111ad2416fd527e7d6749ee/tests/rosettacode/zero_to_the_zero_power.scm | scheme | (print "0^0: " (expt 0 0))
(print "0.0^0: " (expt #i0 0))
| |
fb83545a901b3d0a483c70e1f5c0c3091c6c371ad550a346b0facb0465a885d0 | kawasima/supreme-uploading | user.cljs | (ns cljs.user
(:require [figwheel.client :as figwheel]
[supreme-uploading.core]))
(js/console.info "Starting in development mode")
(enable-console-print!)
(figwheel/start {:websocket-url "ws:3449/figwheel-ws"})
| null | https://raw.githubusercontent.com/kawasima/supreme-uploading/35837b737719f7cca9f5a7ff67f21f486100331b/dev/cljs/user.cljs | clojure | (ns cljs.user
(:require [figwheel.client :as figwheel]
[supreme-uploading.core]))
(js/console.info "Starting in development mode")
(enable-console-print!)
(figwheel/start {:websocket-url "ws:3449/figwheel-ws"})
| |
199d1694b8ad37a7f5365e3f794bad58e173c62de559ee287af86dd52ce1e00d | semperos/clj-webdriver | firefox.clj | (ns webdriver.firefox
(:require [clojure.java.io :as io])
(:import org.openqa.selenium.firefox.FirefoxProfile))
(defn new-profile
"Create an instance of `FirefoxProfile`"
([] (FirefoxProfile.))
([profile-dir] (FirefoxProfile. (io/file profile-dir))))
(defn enable-extension
"Given a `FirefoxProfile` object... | null | https://raw.githubusercontent.com/semperos/clj-webdriver/508eb95cb6ad8a5838ff0772b2a5852dc802dde1/src/webdriver/firefox.clj | clojure | reflection warnings | (ns webdriver.firefox
(:require [clojure.java.io :as io])
(:import org.openqa.selenium.firefox.FirefoxProfile))
(defn new-profile
"Create an instance of `FirefoxProfile`"
([] (FirefoxProfile.))
([profile-dir] (FirefoxProfile. (io/file profile-dir))))
(defn enable-extension
"Given a `FirefoxProfile` object... |
0a8af880042c112743005f6d80b8dc7c71f4acb9f969d40ad3b6f3573462c4df | nvim-treesitter/nvim-treesitter | folds.scm | [
(meta_map)
(map)
(array)
] @fold
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/c38646edf2bdfac157ca619697ecad9ea87fd469/queries/cpon/folds.scm | scheme | [
(meta_map)
(map)
(array)
] @fold
| |
6fcc291c041fabde231520f631fc3d4a4973facece71c2a4d4040ae93dba3274 | nickzuber/infrared | command.mli | type t = {
name: string;
aliases: string list;
doc: string;
flags: Flag.t list
}
val create : name:string -> aliases:string list -> doc:string -> flags:Flag.t list -> t
| null | https://raw.githubusercontent.com/nickzuber/infrared/b67bc728458047650439649605af7a8072357b3c/Infrared/commands/command.mli | ocaml | type t = {
name: string;
aliases: string list;
doc: string;
flags: Flag.t list
}
val create : name:string -> aliases:string list -> doc:string -> flags:Flag.t list -> t
| |
837ec51295ae123c9f334ff5372553a4c11b99433b77ac97d34a2507b6088617 | RichiH/git-annex | FileMatcher.hs | git - annex file matching
-
- Copyright 2012 - 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012-2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Annex.FileMatcher (
GetFileMatcher,
checkFileMatcher,
checkMatche... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/FileMatcher.hs | haskell | This is really dumb tokenization; there's no support for quoted values.
- Open and close parens are always treated as standalone tokens;
- otherwise tokens must be separated by whitespace.
Generates a matcher for files large enough (or meeting other criteria)
- to be added to the annex, rather than directly to gi... | git - annex file matching
-
- Copyright 2012 - 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012-2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Annex.FileMatcher (
GetFileMatcher,
checkFileMatcher,
checkMatche... |
15fae1967ca0b48748958fd417ac57ef6e91fb1187715a37b39476425d685c9b | dbuenzli/remat | br.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-www/br.mli | ocaml | * Minimal browser interaction.
* The type for browser strings.
* [str s] is [s] as a browser string.
* Browser strings.
* {1 Empty string}
* [empty] is an empty string.
* [is_empty s] is [true] if [s] is an empty string.
* {1 String operations}
* [app s0 s1] appends [s1] to [s0].
* [split sep s] is the list of... | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... |
878a54c7317bff8479ce418f79b5f3324d0dd9f8b65f3ad141ce28fdb71264ce | walmartlabs/lacinia | schema-1.clj | (ns my.clojure-game-geek.schema
"Contains custom resolvers and a function to provide the full schema."
(:require [clojure.java.io :as io]
[com.walmartlabs.lacinia.util :as util]
[com.walmartlabs.lacinia.schema :as schema]
[clojure.edn :as edn]))
(defn resolve-game-by-id
[games... | null | https://raw.githubusercontent.com/walmartlabs/lacinia/66056ff3588a7966e7ae3e34b79ad876d4982af2/docs/_examples/tutorial/schema-1.clj | clojure | (ns my.clojure-game-geek.schema
"Contains custom resolvers and a function to provide the full schema."
(:require [clojure.java.io :as io]
[com.walmartlabs.lacinia.util :as util]
[com.walmartlabs.lacinia.schema :as schema]
[clojure.edn :as edn]))
(defn resolve-game-by-id
[games... | |
f90900b5d660b5d140f375949293a9154958fd75afaacd19416d80a521ed1357 | ryukinix/dotfiles | client.lisp | ;;;; client.lisp
(in-package #:quicklisp-client)
(defvar *quickload-verbose* nil
"When NIL, show terse output when quickloading a system. Otherwise,
show normal compile and load output.")
(defvar *quickload-prompt* nil
"When NIL, quickload systems without prompting for enter to
continue, otherwise proceed di... | null | https://raw.githubusercontent.com/ryukinix/dotfiles/19678ea571c9afde8bd662a2bf4eae0bfea840d0/.quicklisp/quicklisp/client.lisp | lisp | client.lisp
FIXME: find-asdf-system-file does another find-system
behind the scenes. Bogus. Should be a better way to go
from system object to system file. |
(in-package #:quicklisp-client)
(defvar *quickload-verbose* nil
"When NIL, show terse output when quickloading a system. Otherwise,
show normal compile and load output.")
(defvar *quickload-prompt* nil
"When NIL, quickload systems without prompting for enter to
continue, otherwise proceed directly without us... |
2ecaee47bb39c135a04f2c6fbe1cde349a1af4b17b2bdce3eeb140c5f4ecc340 | argp/bap | netchan_cat.ml | Yet another ( slower ) " cat " implementation , it is just meant to be a
showcase for integration with ocamlnet 's .
showcase for integration with ocamlnet's Netchannels. *)
let oc =
Netchannels.lift_out
(`Rec (new Netchannels.channel_of_output IO.stdout :>
Netchannels.rec_out_channel))
let _ =
... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/examples/snippets/netchan_cat.ml | ocaml | Yet another ( slower ) " cat " implementation , it is just meant to be a
showcase for integration with ocamlnet 's .
showcase for integration with ocamlnet's Netchannels. *)
let oc =
Netchannels.lift_out
(`Rec (new Netchannels.channel_of_output IO.stdout :>
Netchannels.rec_out_channel))
let _ =
... | |
ef2162a685e0e239329a6994af5f2d47ee39cc9d9be39eda867cf5bf5a38c9b3 | ndmitchell/safe | Test.hs | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Main(main) where
import Safe
import Safe.Exact
import qualified Safe.Foldable as F
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import System.IO.Unsafe
import Test... | null | https://raw.githubusercontent.com/ndmitchell/safe/c490d6b36b461159ab29b3da9133948e4ec1db45/Test.hs | haskell | -------------------------------------------------------------------
TESTS
All from the docs, so check they match
test is lazy
------------------------------------------------------------------- | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Main(main) where
import Safe
import Safe.Exact
import qualified Safe.Foldable as F
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import System.IO.Unsafe
import Test... |
f6e479a1bdb5d035275e8e919677f7b1ae0b48f21564beb0c1c02abb09d83684 | ragkousism/Guix-on-Hurd | irc.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 ng0 < >
Copyright © 2017 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or ... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/irc.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 ng0 < >
Copyright © 2017 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU .... |
bc03d5c651a34b6e67e580c2f4acaaf86a6837e33f3bbaa858d540b904f8b1e5 | ParaPhraseAGH/erlang-mas | mas_conc_supervisor.erl | @author jstypka < >
%% @version 1.0
-module(mas_conc_supervisor).
-behaviour(gen_server).
-include("mas.hrl").
%% API
-export([start/2, go/1, close/1]).
%% gen_server
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-export_type([arenas/0]).
-type sim_params() ... | null | https://raw.githubusercontent.com/ParaPhraseAGH/erlang-mas/e53ac7ace59b50696bd5e89a1e710d88213e2b1d/src/concurrent/mas_conc_supervisor.erl | erlang | @version 1.0
API
gen_server
====================================================================
API functions
====================================================================
====================================================================
Callbacks
====================================================... | @author jstypka < >
-module(mas_conc_supervisor).
-behaviour(gen_server).
-include("mas.hrl").
-export([start/2, go/1, close/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-export_type([arenas/0]).
-type sim_params() :: mas:sim_params().
-type arenas() :... |
55d802f9b3881834ebe5d7e872e716770a8a71da5bb600759599fc015a10bd99 | WorksHub/client | tag_test.cljc | (ns wh.components.tag-test
(:require [clojure.test :refer :all]
[wh.components.tag :refer :all]))
(def default-tags [{:id 1
:label "Clojure"
:type :tech
:subtype :software}
{:id 2
:label "C... | null | https://raw.githubusercontent.com/WorksHub/client/add3a9a37eb3e9baa57b5c845ffed2e4d11b8714/common/test/wh/components/tag_test.cljc | clojure | (ns wh.components.tag-test
(:require [clojure.test :refer :all]
[wh.components.tag :refer :all]))
(def default-tags [{:id 1
:label "Clojure"
:type :tech
:subtype :software}
{:id 2
:label "C... | |
4c39acf0d3034e8912f8a50c851a4ed1d282d060fd16eb616481cf226aadba1f | grin-compiler/ghc-wpc-sample-programs | HtmlParsec.hs | {-# LANGUAGE CPP #-}
-- ------------------------------------------------------------
|
Module : Text . . HtmlParsec
Copyright : Copyright ( C ) 2005
License : MIT
Maintainer : ( )
Stability : stable
Portability : portable
This parser tries to in... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/src/Text/XML/HXT/Parser/HtmlParsec.hs | haskell | # LANGUAGE CPP #
------------------------------------------------------------
------------------------------------------------------------
, char
------------------------------------------------------------
------------------------------------------------------------
-------------------------------... |
|
Module : Text . . HtmlParsec
Copyright : Copyright ( C ) 2005
License : MIT
Maintainer : ( )
Stability : stable
Portability : portable
This parser tries to interprete everything as HTML
no errors are emitted during parsing . If something looks
weir... |
dd14419430528f42c9008c736fcd28f1586b9c8100733fc0b850c49138fe8f4d | YellPika/constraint-rules | Cache.hs | # #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ImplicitParams #-}
# LANGUAGE UnicodeSyntax #
{-# LANGUAGE ViewPatterns #-}
module Data.Constraint.Rule.Plugin.Cache where
import Data.Constraint.Rule.Plugin.Definitions
import Data.Constraint.Rule.Plugin.Prelude
import Data.Constraint (Dict (..))
import D... | null | https://raw.githubusercontent.com/YellPika/constraint-rules/b06dfae3fe01c45c1d78e5611c031ab6591d2e66/src/Data/Constraint/Rule/Plugin/Cache.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE ImplicitParams #
# LANGUAGE ViewPatterns # | # #
# LANGUAGE UnicodeSyntax #
module Data.Constraint.Rule.Plugin.Cache where
import Data.Constraint.Rule.Plugin.Definitions
import Data.Constraint.Rule.Plugin.Prelude
import Data.Constraint (Dict (..))
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
import Data.List (findIndex)
type Ca... |
86ffefa7ebc6c1fdc431c5d3e3032550dbfd9ee67bbd4a6c1780c54aaa50f6f4 | Storkle/clj-forex | socket_service.clj | ;;forex.backend.mql.socket-service: provide background sockets which allow us to connect with metatrader. Provides functions to interact with the background socket
(clojure.core/use 'nstools.ns)
(ns+ forex.backend.mql.socket-service
(:clone clj.core)
(:require
clojure.contrib.core
[forex.util.fib... | null | https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/backend/mql/socket_service.clj | clojure | forex.backend.mql.socket-service: provide background sockets which allow us to connect with metatrader. Provides functions to interact with the background socket
socket service
(println (format "id is %s info is %s" id info))
TODO: get rid of reflection warnings?
TODO: make shorter
TODO: weird bug when stopping everyth... |
(clojure.core/use 'nstools.ns)
(ns+ forex.backend.mql.socket-service
(:clone clj.core)
(:require
clojure.contrib.core
[forex.util.fiber.mbox :as m]
[clojure.contrib.logging :as l])
(:import (java.io DataInputStream ByteArrayInputStream))
(:use
forex.backend.mql.error
... |
abebda90aec7bdd2152d59ad52a4d784e26fb9876412627b357777191cbc13c7 | Clozure/ccl-tests | ftruncate.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Aug 20 06:36:35 2003
;;;; Contains: Tests of FTRUNCATE
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "ftruncate-aux.lsp")
;;; Error tests
(deftest ftruncate.error.1
(signals-error (ftruncate) program-error)
t)
(deftest ft... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/ftruncate.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of FTRUNCATE
Error tests
Non-error tests
To add: tests that involve adding/subtracting EPSILON constants
(suitably scaled) to floated integers. | Author :
Created : We d Aug 20 06:36:35 2003
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "ftruncate-aux.lsp")
(deftest ftruncate.error.1
(signals-error (ftruncate) program-error)
t)
(deftest ftruncate.error.2
(signals-error (ftruncate 1.0 1 nil) program-error)
t)... |
d72acdb32e7b62c5512159d5e472bc40e41c64b9008b9631820204b2534cea81 | skanev/playground | 17-tests.scm | (require rackunit rackunit/text-ui)
(load "helpers/simulator.scm")
(load "../17.scm")
(define instructions '())
(define (get-instructions)
(reverse instructions))
(define (collect-instructions inst)
(set! instructions (cons inst instructions)))
(define (reset-tracing!)
(set! instructions '()))
(define machine
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/tests/17-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "helpers/simulator.scm")
(load "../17.scm")
(define instructions '())
(define (get-instructions)
(reverse instructions))
(define (collect-instructions inst)
(set! instructions (cons inst instructions)))
(define (reset-tracing!)
(set! instructions '()))
(define machine
... | |
946879404728de6b9aec45f7ffd34a6321119faf0420ee6a11803b0d7398a803 | NorfairKing/validity | UUID.hs | # OPTIONS_GHC -fno - warn - orphans #
module Data.Validity.UUID where
import Data.UUID
import Data.Validity
-- | A 'UUID' is valid according to the contained words
instance Validity UUID where
validate = delve "words" . toWords
| null | https://raw.githubusercontent.com/NorfairKing/validity/1c3671a662673e21a1c5e8056eef5a7b0e8720ea/validity-uuid/src/Data/Validity/UUID.hs | haskell | | A 'UUID' is valid according to the contained words | # OPTIONS_GHC -fno - warn - orphans #
module Data.Validity.UUID where
import Data.UUID
import Data.Validity
instance Validity UUID where
validate = delve "words" . toWords
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.