_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 |
|---|---|---|---|---|---|---|---|---|
f0203dccdd454430e60ee0f7c9ca4461c3902d300e842d720e2115f84f9d7790 | Engelberg/instaparse | core.cljc | (ns instaparse.core
(#?(:clj :require :cljs :require-macros)
[instaparse.macros :refer [defclone
set-global-var!]])
(:require [clojure.walk :as walk]
[instaparse.gll :as gll]
[instaparse.cfg :as cfg]
[instaparse.failure :as fail]
[in... | null | https://raw.githubusercontent.com/Engelberg/instaparse/804b1651aac935c884dd3a911662ac0b5e181200/src/instaparse/core.cljc | clojure | if :no-slurp is set to true, string is a grammar spec
let's slurp to see
auto-whitespace is keyword, parser, or nil
For each of the macro-time opts, ensure that they are the data
types we expect, not more complex quoted expressions.
Lists cannot be evaluated verbatim | (ns instaparse.core
(#?(:clj :require :cljs :require-macros)
[instaparse.macros :refer [defclone
set-global-var!]])
(:require [clojure.walk :as walk]
[instaparse.gll :as gll]
[instaparse.cfg :as cfg]
[instaparse.failure :as fail]
[in... |
2180340627d7a562ae0c2f6f35d5b3d9b2f4836d1712a63f2563d2af3b884bb4 | McParen/croatoan | inch.lisp | (in-package :de.anvi.croatoan)
(defun extract-char (window &key y x position)
"Extract and return the single-byte complex char from the window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of ... | null | https://raw.githubusercontent.com/McParen/croatoan/413e8855b78a2e408f90efc38e8485f880691684/src/inch.lisp | lisp | (in-package :de.anvi.croatoan)
(defun extract-char (window &key y x position)
"Extract and return the single-byte complex char from the window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of ... | |
660fd1ed1cd51a2d7d2dd8b200af1e4d2484974d3dc07acf314da935ecb1041c | xtdb/xtdb-in-a-box | project.clj | (defproject xtdb-in-a-box "0.0.2"
:description "XTDB in a Box"
:dependencies [[org.clojure/clojure "1.10.1"]
;; required:
[com.xtdb/xtdb-core "1.19.0"]
[com.xtdb/xtdb-rocksdb "1.19.0"]
;; logging:
[org.clojure/tools.logging "1.1... | null | https://raw.githubusercontent.com/xtdb/xtdb-in-a-box/aca1b20a069245b5687654debc43c01df400fb9e/clj/project.clj | clojure | required:
logging:
optional:
logging: | (defproject xtdb-in-a-box "0.0.2"
:description "XTDB in a Box"
:dependencies [[org.clojure/clojure "1.10.1"]
[com.xtdb/xtdb-core "1.19.0"]
[com.xtdb/xtdb-rocksdb "1.19.0"]
[org.clojure/tools.logging "1.1.0"]
[ch.qos.logback/logback-classic "1.2.... |
ef09fba75417a13fe90d2ca29be0a22b18880269cdb790c5b655200efbb5e79b | wavewave/hxournal | Type.hs | -----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.Type
Copyright : ( c ) 2011 , 2012
--
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Portability : GHC
--
--------------------------------------------------... | null | https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/Type.hs | haskell | ---------------------------------------------------------------------------
|
Module : Application.HXournal.Type
License : BSD3
Stability : experimental
--------------------------------------------------------------------------- | Copyright : ( c ) 2011 , 2012
Maintainer : < >
Portability : GHC
module Application.HXournal.Type
( module Application.HXournal.Type.Event
, module Application.HXournal.Type.Enum
, module Application.HXournal.Type.Canvas
, module Application.HXournal.Type.XournalState
, module Application.HXournal... |
b81998285e129db0f2dc32ff77346e67bf4a7cecb839af4114c93ef26359db73 | artyom-poptsov/guile-ics | content-line-context.scm | ;;; content-line-context.scm -- Context for the content line reader.
Copyright ( C ) 2022 < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; ... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-ics/6e18975f9abd69d0cdb46502bf6b85d3441de62d/modules/ics/fsm/content-line-context.scm | scheme | content-line-context.scm -- Context for the content line reader.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
The program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY ... |
Copyright ( C ) 2022 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(define-module (ics fsm content-line-context)
#:use-module (oop goops... |
caab2d1976b9a7d1ed36d4bd57fe92c9754194adc375a094f6f24763722f2f4b | lispbuilder/lispbuilder | package.lisp | ;;; -*- lisp -*-
(in-package #:cl-user)
(defpackage #:lispbuilder-cal3d
(:use #:cl #:cffi)
(:nicknames #:cal3d)
(:documentation "The main package of `lispbuilder-cal3d'."))
| null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-cal3d/cal3d/package.lisp | lisp | -*- lisp -*- |
(in-package #:cl-user)
(defpackage #:lispbuilder-cal3d
(:use #:cl #:cffi)
(:nicknames #:cal3d)
(:documentation "The main package of `lispbuilder-cal3d'."))
|
806db3f56aa1e42d398a0b84a2bb747253bda63322aca91f921907954905ee0a | cnuernber/dtype-next | object_arrays_test.clj | (ns tech.v3.datatype.object-arrays-test
(:require [clojure.test :refer :all]
[tech.v3.datatype :as dtype]
[tech.v3.datatype.list]
[tech.v3.datatype.protocols :as dtype-proto]
[tech.v3.datatype.unary-op :as unary-op]
[tech.v3.datatype.binary-op :as binary-op]... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/3fe3b62669bf83f6273235ae91988e4fd68d3026/test/tech/v3/datatype/object_arrays_test.clj | clojure | (ns tech.v3.datatype.object-arrays-test
(:require [clojure.test :refer :all]
[tech.v3.datatype :as dtype]
[tech.v3.datatype.list]
[tech.v3.datatype.protocols :as dtype-proto]
[tech.v3.datatype.unary-op :as unary-op]
[tech.v3.datatype.binary-op :as binary-op]... | |
1cec4c24aabf295bd27a26fc6eb24e9ad69df1eb493ca24bde97e3e280d91a3b | mirage/mirage-skeleton | config.ml | open Mirage
let main =
main "Unikernel.Main" ~packages:[ package "fmt" ] ~extra_deps:[ dep app_info ]
(console @-> job)
let () = register "app-info" [ main $ default_console ]
| null | https://raw.githubusercontent.com/mirage/mirage-skeleton/144d68992a284730c383eb3d39c409a061bc452e/tutorial/app_info/config.ml | ocaml | open Mirage
let main =
main "Unikernel.Main" ~packages:[ package "fmt" ] ~extra_deps:[ dep app_info ]
(console @-> job)
let () = register "app-info" [ main $ default_console ]
| |
9d8767cb914012b2dbc35100193d5006f63ffc965a5ed62868edfafec8f7bc73 | mpdairy/posh-todo | project.clj | (defproject posh-todo "0.1.0-SNAPSHOT"
:description "An example of a Todo using Posh"
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[org.clojure/core.match "0... | null | https://raw.githubusercontent.com/mpdairy/posh-todo/e6c6596be0b022ea3301e971f9c5eaaa1ce87f0b/project.clj | clojure | (defproject posh-todo "0.1.0-SNAPSHOT"
:description "An example of a Todo using Posh"
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[org.clojure/core.match "0... | |
94fdfc9b88b344ff201632b015c553fef06bf21e12d9ca2b9f000cdb8943307d | TrustInSoft/tis-interpreter | printSlice.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/slicing/printSlice.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
f8591df98af34ed946f87ecc3bbedf77fea1b58c0f6f17ecd1aea14f3ad0bb4d | district0x/cljs-web3-next | db.cljs | (ns cljs-web3-next.db
"Functions on LevelDB.
A fast key-value storage library that provides an ordered mapping from string
keys to string values."
(:require [oops.core :refer [ocall oget oset! oapply+]]))
(defn get-db
"Gets leveldb object from web3-instance.
Parameter:
web3 - web3 instance"
[web3]
... | null | https://raw.githubusercontent.com/district0x/cljs-web3-next/a473ac9c21d994ecb6abfb4899ef5474d5dfc669/src/cljs_web3_next/db.cljs | clojure | (ns cljs-web3-next.db
"Functions on LevelDB.
A fast key-value storage library that provides an ordered mapping from string
keys to string values."
(:require [oops.core :refer [ocall oget oset! oapply+]]))
(defn get-db
"Gets leveldb object from web3-instance.
Parameter:
web3 - web3 instance"
[web3]
... | |
1f71439beaf9e5d41af719fcdc0e3ab42f770f6dfb5d5574c35a9f515acb801f | ocaml-multicore/tezos | sapling_services.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2019 - 2020 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/sapling_services.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2019 - 2020 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN ... |
57909b0163c8a01b38d807b81d145745a33e64cdf227cb20cf657754264906c2 | appleby/Lisp-In-Small-Pieces | symbol-append.scm | ;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is derived from the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
;;; The ... | null | https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/common/compat/symbol-append.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is derived from the files that accompany the book:
The original sources can be downloaded from the author's website at
-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html
This file may have been altered from the original in order to... | LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
(define (symbol-append . args)
(string->symbol
(apply string-append
(map (lambda (s)
(cond ((string? s) s)
... |
f9b7d028afef9903ae947b240955375c20d6144bff47731e20ab3bcebdff243e | dpiponi/Moodler | mock_modular.hs | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
id10 <- new' "id"
id11 <- new' "id"
id12 <- new' "id"
id13 <- new' "id"
id14 <- new' "id"
id15 <- new' "id"
id16 <- new' "id"
id17 <- new' "id"
id18 <- new' "id"
id19 ... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/mock_modular.hs | haskell | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
id10 <- new' "id"
id11 <- new' "id"
id12 <- new' "id"
id13 <- new' "id"
id14 <- new' "id"
id15 <- new' "id"
id16 <- new' "id"
id17 <- new' "id"
id18 <- new' "id"
id19 ... | |
871f37bca64c68ae45932e8842786b46b9cca33185da95eeafaa28a80e4e5e40 | abella-prover/abella | regress.ml |
* Author : < >
* Copyright ( C ) 2022 Inria ( Institut National de Recherche
* en Informatique et en Automatique )
* See LICENSE for licensing details .
* Author: Kaustuv Chaudhuri <>
* Copyright (C) 2022 Inria (Institut National de Recherche
* en Informa... | null | https://raw.githubusercontent.com/abella-prover/abella/f1ce97ebbce5c8423cd096e9f4345e32bb9f781e/test/regress.ml | ocaml | Run "abella -a" on all examples |
* Author : < >
* Copyright ( C ) 2022 Inria ( Institut National de Recherche
* en Informatique et en Automatique )
* See LICENSE for licensing details .
* Author: Kaustuv Chaudhuri <>
* Copyright (C) 2022 Inria (Institut National de Recherche
* en Informa... |
e90b062cf3aa8210b4602f0e4fa6c268f862b082e194304e59dfbe4a56720007 | Glue42/gateway-modules | domain.cljc | (ns gateway.domain
(:require [gateway.state.spec.state :as state]
[gateway.common.spec.messages :as msg]
[clojure.spec.alpha :as s]))
;; specs
(s/def ::operation-result (s/nilable (s/tuple (s/nilable ::state/state)
(s/nilable (s/coll-of ::msg/o... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/domain.cljc | clojure | specs | (ns gateway.domain
(:require [gateway.state.spec.state :as state]
[gateway.common.spec.messages :as msg]
[clojure.spec.alpha :as s]))
(s/def ::operation-result (s/nilable (s/tuple (s/nilable ::state/state)
(s/nilable (s/coll-of ::msg/outgoing-m... |
04d157ef4b6540244a2d95b5d2d049b2e7ec08795fb74afdfd3d8fc7c851deb3 | smahood/re-frame-conj-2016 | step3.cljs | (ns show.steps.step3
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :as re-frisk]
[cljs.spec :as s]
[show.slides.views :as views]))
(declare slides)
(defn slideshow []
[:div.slideshow-half-width
[:div.slide
[(nth slides 0)]]])
(defn title-slide []
[:... | null | https://raw.githubusercontent.com/smahood/re-frame-conj-2016/51fe544a5f4e95f28c26995c11d64301ba9a2142/show/src/show/steps/step3.cljs | clojure | (ns show.steps.step3
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :as re-frisk]
[cljs.spec :as s]
[show.slides.views :as views]))
(declare slides)
(defn slideshow []
[:div.slideshow-half-width
[:div.slide
[(nth slides 0)]]])
(defn title-slide []
[:... | |
a6862fa4c77e58fbbbfa6f687956971e7e93dc65ec370cf70b5659a5e83d6c00 | typedclojure/typedclojure | loop.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.checker/src/typed/cljc/checker/check/loop.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.cljc.checker.check.loop
(:require [clojure.core.typed.errors :as err]
[clojure.core.typed.util-vars :as vs]
[typed.clj.checker.parse-unparse :as prs]
[typed.cljc.checker.check.let :as let]
[typed.cljc.checker.check.... |
3565a2c2a70db507f04097003bd90dd3c131cd42542d6fc398f0c1c5f3641b03 | purebred-mua/purebred | Event.hs | -- This file is part of purebred
Copyright ( C ) 2017 - 2021 and
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later ... | null | https://raw.githubusercontent.com/purebred-mua/purebred/f5ae68637d84fafde088df09420cea4e606b77ed/src/Purebred/Types/Event.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2017 - 2021 and
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
module Purebred.Types.Event
(
PurebredEvent(..)
,... |
c52497a387fc8675718aefa58b023c06bd0911d95d18c0ea6adc37e002963da5 | fosskers/aura | L.hs | -- |
Module : Aura . Commands . L
Copyright : ( c ) , 2012 - 2021
-- License : GPL3
Maintainer : < >
--
-- Handle all @-L@ flags - those which involve the pacman log file.
module Aura.Commands.L
( viewLogFile
, searchLogFile
, logInfoOnPkg
) where
import Aura.Colour (dtot, red)
impo... | null | https://raw.githubusercontent.com/fosskers/aura/08cd46eaa598094f7395455d66690d3d8c59e965/haskell/aura/exec/Aura/Commands/L.hs | haskell | |
License : GPL3
Handle all @-L@ flags - those which involve the pacman log file.
-
| Print all lines in the log file which contain a given `Text`.
| The result of @-Li@. | Module : Aura . Commands . L
Copyright : ( c ) , 2012 - 2021
Maintainer : < >
module Aura.Commands.L
( viewLogFile
, searchLogFile
, logInfoOnPkg
) where
import Aura.Colour (dtot, red)
import Aura.Core (Env(..), report)
import Aura.IO
import Aura.Language... |
1d1324090f3ff5be30e398e47b3ce05d486ab236e4a8acb02f899a3ca6de9725 | samply/blaze | logical_operators.clj | (ns blaze.elm.compiler.logical-operators
"13. Logical Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defunop]]))
13.1 . And
(defn- nil-and-expr [x]
(reify core/Expression
(-eval [_ context... | null | https://raw.githubusercontent.com/samply/blaze/f7d26bf3db0bc74b9195c59891261b1eb2c5accb/modules/cql/src/blaze/elm/compiler/logical_operators.clj | clojure | (ns blaze.elm.compiler.logical-operators
"13. Logical Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defunop]]))
13.1 . And
(defn- nil-and-expr [x]
(reify core/Expression
(-eval [_ context... | |
2766059459da194e158bde0291ba564dbe593f73e42f8be0e415cecbc8404821 | marineschimel/ilqr_vae | variational.ml | open Base
open Owl
include Variational_typ
open Covariance
open Priors
open Dynamics
open Likelihoods
open Accessor.O
(* -------------------------------------
-- iLQR primitive
------------------------------------- *)
module ILQR (U : Prior_T) (D : Dynamics_T) (L : Likelihood_T) = struct
module G = Owl_parame... | null | https://raw.githubusercontent.com/marineschimel/ilqr_vae/8491790c037ce004e095a5e3a7614c01c6663fc8/lib/variational.ml | ocaml | -------------------------------------
-- iLQR primitive
-------------------------------------
n : dimensionality of state space; m : input dimension
Stdio.printf "\n loss %f || Iter %i \n%!" c _k;
-------------------------------------
-- VAE
-------------------------------------
state dimension
i... | open Base
open Owl
include Variational_typ
open Covariance
open Priors
open Dynamics
open Likelihoods
open Accessor.O
module ILQR (U : Prior_T) (D : Dynamics_T) (L : Likelihood_T) = struct
module G = Owl_parameters.Make (Generative_P.Make (U.P) (D.P) (L.P))
let linesearch = U.requires_linesearch || D.requires_li... |
9fb8cbe006d1bddd370c99b6d1afcec083398fbb244e2250c88817d28086123a | ananthakumaran/eopl | mutpair.clj | (ns eopl.core.mutpair
(:use eopl.core.define-datatype)
(:use eopl.core.vector-ref))
(define-datatype mutpair mutpair?
(a-pair
(left-loc reference?)
(right-loc reference?)))
(defn make-pair [left right]
(a-pair (newref left)
(newref right)))
(defn left [mp]
(cases mutpair mp
(a-pair (le... | null | https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/core/mutpair.clj | clojure | (ns eopl.core.mutpair
(:use eopl.core.define-datatype)
(:use eopl.core.vector-ref))
(define-datatype mutpair mutpair?
(a-pair
(left-loc reference?)
(right-loc reference?)))
(defn make-pair [left right]
(a-pair (newref left)
(newref right)))
(defn left [mp]
(cases mutpair mp
(a-pair (le... | |
10a6a3cc2bbc9a207e09c9cd5fac827ac45f6cb5838cd543ed1901dce87a6a2c | Clojure2D/clojure2d-examples | aabb.clj | (ns rt4.the-next-week.ch05b.aabb
(:require [rt4.the-next-week.ch05b.interval :as interval]
[fastmath.vector :as v]
[fastmath.core :as m])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol AABBP... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05b/aabb.clj | clojure | (ns rt4.the-next-week.ch05b.aabb
(:require [rt4.the-next-week.ch05b.interval :as interval]
[fastmath.vector :as v]
[fastmath.core :as m])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol AABBP... | |
54aa5771cce12ed3763f03b77b047ac79ed23c4eea75892c7e90b653640ff4f2 | ocurrent/opam-repo-ci | packageOpt.ml | type t = {
pkg : OpamPackage.t;
urgent : ([`High | `Low] -> bool) option;
has_tests : bool;
}
let compare {pkg = pkg1; urgent = _; has_tests = _} {pkg = pkg2; urgent = _; has_tests = _} =
OpamPackage.compare pkg1 pkg2
let pp f {pkg; urgent = _; has_tests = _} =
Fmt.of_to_string OpamPackage.to_string f pkg
| null | https://raw.githubusercontent.com/ocurrent/opam-repo-ci/d60f72a41fff211ccc0c9b00b41a3bf849067b8f/lib/packageOpt.ml | ocaml | type t = {
pkg : OpamPackage.t;
urgent : ([`High | `Low] -> bool) option;
has_tests : bool;
}
let compare {pkg = pkg1; urgent = _; has_tests = _} {pkg = pkg2; urgent = _; has_tests = _} =
OpamPackage.compare pkg1 pkg2
let pp f {pkg; urgent = _; has_tests = _} =
Fmt.of_to_string OpamPackage.to_string f pkg
| |
1a6b6d58111b813d4d789b0e87b2b0f15939ccf42f268ab29a57f1930db79a1b | expede/rescue | Class.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
# LANGUAGE UndecidableInstances #
| The ' MonadRescu... | null | https://raw.githubusercontent.com/expede/rescue/5f460a4cd9a01ac84e669a50711375c8f8dcba75/library/Control/Monad/Rescue/Class.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
$setup
>>> :set -XDataKinds
>>> :set -XFlexibleContexts
>>> :set -XTypeApplications
>>> :set -XLambdaCase
>>> import Data.Proxy
| Pull a potential error out of the surrou... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
| The ' MonadRescue ' class , meant for retrieving the success / failure branches
module Control.Monad.Rescue.Class (MonadRescue (..)) where
import Data.WorldPeac... |
1745955464d0139bc5813a6f1a0865cc1d5648f8f2afed157308ed89554564e8 | basho/riak_cs | riak_cs_delete_fsm_sup.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_delete_fsm_sup.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
4939db219143ef4c032b457108b106976c8c37ed7b04f3118c6c5a51e5e4e938 | xapi-project/xen-api | xcp_service.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/8d17b53bc236e23aa1ec455137773f7367665d83/ocaml/xapi-idl/lib/xcp_service.ml | ocaml | Server configuration. We have built-in (hopefully) sensible defaults,
together with command-line arguments and a configuration file. They are
applied in order: (latest takes precedence) defaults < arguments < config
file
Trim trailing whitespace from a line
Remove the unnecessary doc parameter
Search th... |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
78422ebbcbdb6b270d6b3f35b391777833a781b6fe55268c26c204202b1693be | adinapoli/clj3D | fenvs.clj | (ns clj3D.test.fenvs
(:use
[clj3D.fenvs]
[clojure.test]:reload)
(:import [com.jme3.math Vector3f]))
;;Needed for private-function testing
(def jvector (ns-resolve 'clj3D.fenvs 'jvector))
(deftest curry-test
(let [sum2 #(+ %1 %2)]
(is (= 3 ((curry sum2 1) 2)) "Simple currying ((sum 1) 2)")
(is ... | null | https://raw.githubusercontent.com/adinapoli/clj3D/1175bcaddc1d59fe37c6876dc8cc178417211e38/test/clj3D/test/fenvs.clj | clojure | Needed for private-function testing | (ns clj3D.test.fenvs
(:use
[clj3D.fenvs]
[clojure.test]:reload)
(:import [com.jme3.math Vector3f]))
(def jvector (ns-resolve 'clj3D.fenvs 'jvector))
(deftest curry-test
(let [sum2 #(+ %1 %2)]
(is (= 3 ((curry sum2 1) 2)) "Simple currying ((sum 1) 2)")
(is (function? (curry sum2 1)))))
(defte... |
db789b5f247883df5d16436bf6b9b4a6a4598c5bc7df21e666909097ba5e91ab | zenspider/schemers | exercise.1.30.scm | #lang racket/base
;;; Exercise 1.30:
;; The `sum' procedure above generates a linear recursion. The
;; procedure can be rewritten so that the sum is performed
;; iteratively. Show how to do this by filling in the missing
;; expressions in the following definition:
(define (sum f a b n)
(define (iterate a result)
... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_1/exercise.1.30.scm | scheme | Exercise 1.30:
The `sum' procedure above generates a linear recursion. The
procedure can be rewritten so that the sum is performed
iteratively. Show how to do this by filling in the missing
expressions in the following definition: | #lang racket/base
(define (sum f a b n)
(define (iterate a result)
(if (> a b) result
(iterate (n a) (+ result (f a)))))
(iterate a 0))
(define (inc n) (+ n 1))
(define (identity n) n)
(sum identity 1 10 inc)
(= (/ (+ (* 10 10) 10) 2) (sum identity 1 10 inc))
|
4437c2ab1c6bcda6ce9ca3920c60e4c1a9a98f2a664e0b930fa794483faaf612 | 2600hz-archive/whistle | rabbit_event.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_event.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved .
-module(rabbi... |
a9c26d4166b14520d64f7c7e12d0c07e1e2968d9e2a6368d70e8d2fafcb43d25 | dyzsr/ocaml-selectml | t172-pushenvacc1.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;;
let x = 5 in
let f _ = x + x in
if f 0 <> 10 then raise Not_found... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t172-pushenvacc1.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;;
let x = 5 in
let f _ = x + x in
if f 0 <> 10 then raise Not_found... | |
f13bb8d8ef7e5f0d6897b2d47ebc8918d5336ad043a31e93ac1ec6e4569b7904 | dvdt/xvsy | datasets.clj | (ns xvsy.datasets
(:require [korma.core]
[schema.core :as s]
[xvsy.goog-bq :as goog-bq]
[xvsy.ggsql :refer [defdataset]]))
(korma.db/defdb bq (goog-bq/goog-bq {}))
(defdataset bq-natality "natality"
(korma.core/table "publicdata:samples.natality")
(korma.core/database bq)
(... | null | https://raw.githubusercontent.com/dvdt/xvsy/ff29b96affc6723bb9c66da1011f31900af679dd/src/clj/xvsy/datasets.clj | clojure | (ns xvsy.datasets
(:require [korma.core]
[schema.core :as s]
[xvsy.goog-bq :as goog-bq]
[xvsy.ggsql :refer [defdataset]]))
(korma.db/defdb bq (goog-bq/goog-bq {}))
(defdataset bq-natality "natality"
(korma.core/table "publicdata:samples.natality")
(korma.core/database bq)
(... | |
1158e86ea32f6234d2e81f2acbc6d487e81d0563f6db1ddfc16ecb34a3389052 | ijvcms/chuanqi_dev | task_comply.erl | %%%-------------------------------------------------------------------
@author yubing
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 05 . 一月 2016 10:20
%%%-------------------------------------------------------------------
-module(task_comply).
-include("cache.hrl").
-include("config.hrl").
-include("... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/task/task_comply.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
存库
存库
存库
存库
更新玩家获取道具信息
更新玩家获取道具信息
存库
更新玩家的怪物击杀任务信息
存库
更新任务信息
通关副本信息 纪录
存库
击杀怪物获取道具 任务信息
判断随机数
存库
接取任务时检测
判断升级信息
判断物品获取
刷新活跃任务领取红点 | @author yubing
( C ) 2016 , < COMPANY >
Created : 05 . 一月 2016 10:20
-module(task_comply).
-include("cache.hrl").
-include("config.hrl").
-include("proto.hrl").
-include("record.hrl").
-include("common.hrl").
-include("button_tips_config.hrl").
-export([update_player_task_info/3,
update_player_tasksort_kill_... |
38f590ee4b389f769c50e0ea35ee05a0c3e6303d902776f822b5bed41af16490 | amnh/poy5 | randomTree.ml | A program to generate newick trees , not random , but balanced binary trees , of
* a certain length
* a certain length *)
let size = ref 8
let branch_length_variation = ref 0.
let branch_length = ref 0.1
let is_random = ref false
let () = Random.self_init ()
let asgn r verifier msg x =
if verifier x then r :=... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/utils/randomTree.ml | ocaml | A program to generate newick trees , not random , but balanced binary trees , of
* a certain length
* a certain length *)
let size = ref 8
let branch_length_variation = ref 0.
let branch_length = ref 0.1
let is_random = ref false
let () = Random.self_init ()
let asgn r verifier msg x =
if verifier x then r :=... | |
c7ab2b373b87cd6e478b9a720dfad9b7dcec9240e546e70e6f2193bf74e4d900 | guriguri/cauca | rest_test.clj | (ns cauca.component.rest-test
(:use [clojure test]
)
(:require [cauca.factory :as f]
[cauca.component.rest :as rest]
[cauca.log :as log]
[cauca.config :as config]
)
)
(defn request [method resource web-app & params]
(web-app {:request-method method... | null | https://raw.githubusercontent.com/guriguri/cauca/38ba3ee7200d2369a1a4f7ae58e286bd09dd16f3/test/clj/cauca/component/rest_test.clj | clojure | (ns cauca.component.rest-test
(:use [clojure test]
)
(:require [cauca.factory :as f]
[cauca.component.rest :as rest]
[cauca.log :as log]
[cauca.config :as config]
)
)
(defn request [method resource web-app & params]
(web-app {:request-method method... | |
cfce32465a498a60c8c41ac33b69e8bc87fcd2ee8af4a4be24f714128bdb3fdd | janestreet/base | test_int64.ml | open! Import
open! Int64
let%expect_test "hash coherence" =
check_int_hash_coherence [%here] (module Int64);
[%expect {| |}]
;;
let numbers =
[ 0x0000_0000_0000_1020L
; 0x0000_0000_0011_2233L
; 0x0000_0000_1122_3344L
; 0x0000_0011_2233_4455L
; 0x0000_1122_3344_5566L
; 0x0011_2233_4455_6677L
; 0x1122... | null | https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/test/test_int64.ml | ocaml | open! Import
open! Int64
let%expect_test "hash coherence" =
check_int_hash_coherence [%here] (module Int64);
[%expect {| |}]
;;
let numbers =
[ 0x0000_0000_0000_1020L
; 0x0000_0000_0011_2233L
; 0x0000_0000_1122_3344L
; 0x0000_0011_2233_4455L
; 0x0000_1122_3344_5566L
; 0x0011_2233_4455_6677L
; 0x1122... | |
66c70eab2944a0c4e83b4228428611ba5c70af74d0e4b01e5b75b1f70fe9eb6c | sysbio-bioinf/avatar | mo_select.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/algorithms/mo_select.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
done ite... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.algorithms.mo-select
(:require
[avatar.algorithms.score :as score]
[avatar.algorithms.common :as c]
[avatar.algorithms.greedy-setcover :as gs]
[avatar.util :as u]
[clojure.data.int-map :as im]
[c... |
4f875c8e732bf62f063c7eeb0d81cc75e195c64045ced0a918cc36267b08d6ee | PEZ/rich4clojure | problem_117.clj | (ns rich4clojure.hard.problem-117
(:require [hyperfiddle.rcf :refer [tests]]))
;; = For Science! =
;; By 4Clojure user: amcnamara
;; Difficulty: Hard
;; Tags: [game]
;;
;; A mad scientist with tenure has created an experiment
;; tracking mice in a maze. Several mazes have been
;; randomly generated, and you've been... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/hard/problem_117.clj | clojure | = For Science! =
By 4Clojure user: amcnamara
Difficulty: Hard
Tags: [game]
A mad scientist with tenure has created an experiment
tracking mice in a maze. Several mazes have been
randomly generated, and you've been tasked with writing
a program to determine the mazes in which it's possible
for the mouse to re... | (ns rich4clojure.hard.problem-117
(:require [hyperfiddle.rcf :refer [tests]]))
(def __ :tests-will-fail)
(comment
)
(tests
true := (__ ["M C"])
false := (__ ["M # C"])
true := (__ ["#######"
"# #"
"# # #"
"#M # C#"
"#######"])
false :=... |
3cbd9659376aae20a7f1b45171e8258eb2673f5ac783d716d940fd74ea5c100e | klutometis/clrs | section.scm | (require-extension
syntax-case
foof-loop)
(require '../2.1/section)
(require '../srfi/srfi-70)
(module
section-8.4
(bucket-sort)
(import* section-2.1
insertion-sort)
(import* srfi-70
exact-floor)
(include "../8.4/bucket-sort.scm"))
| null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/8.4/section.scm | scheme | (require-extension
syntax-case
foof-loop)
(require '../2.1/section)
(require '../srfi/srfi-70)
(module
section-8.4
(bucket-sort)
(import* section-2.1
insertion-sort)
(import* srfi-70
exact-floor)
(include "../8.4/bucket-sort.scm"))
| |
515eae6b1b5b167a505a645999dbc584b7d9e31f50440bcc3ada4d76b8b4d0ef | DSiSc/why3 | close_epsilon.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/close_epsilon.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
* The aim of this translation is to obtain terms where all epsilon
abstractions are closed
abstr... |
11aef9e7d68da7afb4c08f2cfc052cf9e107f39cbadb6f3323274de3e91d1523 | GlideAngle/flare-timing | Distance.hs | module Flight.Gap.Validity.Distance (DistanceValidity(..)) where
import GHC.Generics (Generic)
import Data.Typeable (Typeable, typeOf)
import "newtype" Control.Newtype (Newtype(..))
import Data.Via.Scientific
(DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci, deriveShowViaSci)
newtype DistanceValidity = D... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-valid/library/Flight/Gap/Validity/Distance.hs | haskell | module Flight.Gap.Validity.Distance (DistanceValidity(..)) where
import GHC.Generics (Generic)
import Data.Typeable (Typeable, typeOf)
import "newtype" Control.Newtype (Newtype(..))
import Data.Via.Scientific
(DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci, deriveShowViaSci)
newtype DistanceValidity = D... | |
dbc1d955ac3c73734ebd03d7ee2d708d1cc7cae8178260c34ea759bb4f26781a | scicloj/tablecloth | columns_test.clj | (ns tablecloth.api.columns-test
(:require [tablecloth.api :as api]
[tech.v3.datatype :as dtype]
[midje.sweet :refer [tabular fact =>]]))
;;
(def dss (api/dataset {:idx [1 1 1 2 2 2 3 3 3]
:a ["a" "b" "c" "a" "b" "c" "a" "b" "c"]
"z" 1
... | null | https://raw.githubusercontent.com/scicloj/tablecloth/e5f53bcfb5aab20a1807cecc3782cfba2b58476b/test/tablecloth/api/columns_test.clj | clojure | (ns tablecloth.api.columns-test
(:require [tablecloth.api :as api]
[tech.v3.datatype :as dtype]
[midje.sweet :refer [tabular fact =>]]))
(def dss (api/dataset {:idx [1 1 1 2 2 2 3 3 3]
:a ["a" "b" "c" "a" "b" "c" "a" "b" "c"]
"z" 1
... | |
e9e49ab92c8e2bf527d145ccb55cfbe895661af163edebf38c30906990258d82 | amar47shah/cis-194 | AParser.hs | CIS 194 HW 10
due Monday , 1 April
due Monday, 1 April
-}
module AParser (Parser, runParser, satisfy, char, posInt) where
import Control.Applicative
import Data.Char
-- A parser for a value of type a is a function which takes a String
-- represnting the input to be parsed, and succeeds or fails; if it
--... | null | https://raw.githubusercontent.com/amar47shah/cis-194/2b35ce18df176b47502950030af26e14d866b3e4/2013-byorgey/solutions/AParser.hs | haskell | A parser for a value of type a is a function which takes a String
represnting the input to be parsed, and succeeds or fails; if it
succeeds, it returns the parsed value along with the remainder of
the input.
does not satisfy the predicate (or an empty input), it fails.
fail on the empty input
check if x satisfie... | CIS 194 HW 10
due Monday , 1 April
due Monday, 1 April
-}
module AParser (Parser, runParser, satisfy, char, posInt) where
import Control.Applicative
import Data.Char
newtype Parser a = Parser { runParser :: String -> Maybe (a, String) }
For example , ' satisfy ' takes a predicate on , and constructs ... |
9211eba91b1967bf75c7bfe5bd93fbecd91d065e4d2033ff074c8adc8f1f5b25 | sarabander/p2pu-sicp | 2.17.scm |
(define (last-pair lst)
(let ((butfirst (cdr lst)))
(if (null? butfirst)
lst
(last-pair butfirst))))
(last-pair '(k l m n)) ; '(n)
(last-pair '()) ; error
| null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.2/2.17.scm | scheme | '(n)
error |
(define (last-pair lst)
(let ((butfirst (cdr lst)))
(if (null? butfirst)
lst
(last-pair butfirst))))
|
aae88468195a013c3bda74f53ef9165f4133b55f9770624279f5bb27f238056b | alanzplus/EOPL | subst.rkt | #lang eopl
(define subst
(lambda (new_sym old_sym slst)
(if (null? slst)
'()
(cons
(subst-in-s-exp new_sym old_sym (car slst))
(subst new_sym old_sym (cdr slst))))))
(define subst-in-s-exp
(lambda (new_sym old_sym sexp)
(if (symbol? sexp)
(if (eqv? sexp old_sym) n... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/subst.rkt | racket | #lang eopl
(define subst
(lambda (new_sym old_sym slst)
(if (null? slst)
'()
(cons
(subst-in-s-exp new_sym old_sym (car slst))
(subst new_sym old_sym (cdr slst))))))
(define subst-in-s-exp
(lambda (new_sym old_sym sexp)
(if (symbol? sexp)
(if (eqv? sexp old_sym) n... | |
bd80ca41ad7bc127a63b4278b0371e0626cd4b4d061f5f63405b5e3a886a0d9f | lambdamikel/DLMAPS | hooks9.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
(in-package :THEMATIC-SUBSTRATE)
;;;
;;;
;;;
(defmethod register-bindings :before ((substrate substrate) (query query) (answer-pattern list)
(new-bindings list))
(with-critical-... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/query/hooks9.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
notwendig!
|
(in-package :THEMATIC-SUBSTRATE)
(defmethod register-bindings :before ((substrate substrate) (query query) (answer-pattern list)
(new-bindings list))
(with-critical-section
(let ((tuple (construct-result-tuple query)))
(when tuple
(with-slots (bindings-queue ne... |
7015ad21e894cf72606addc07598b4ea33dbb077d8201e69a44612446402fb53 | vbedegi/re-alm | core_test.clj | (ns re-alm.core-test
(:require [clojure.test :refer :all]
[re-alm.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/vbedegi/re-alm/73fdb86b2cb92bec16865be44b101361e7e84115/test/re_alm/core_test.clj | clojure | (ns re-alm.core-test
(:require [clojure.test :refer :all]
[re-alm.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
a85c4c84955592bf45ba74204e20b973a6516a24b4e03779e589c6415be884e8 | onetom/clj-figwheel-main-devcards | core_test.cljs | (ns app.core-test
(:require [app.core]))
| null | https://raw.githubusercontent.com/onetom/clj-figwheel-main-devcards/5ee1d8c5ee3d9399c03855deaa42adaaa1e40154/test/app/core_test.cljs | clojure | (ns app.core-test
(:require [app.core]))
| |
7b1b6dd9bd1a5f7933b93df946517a018d0a9234bff6e23090f62677b34a5a88 | simmone/racket-simple-xlsx | rels.rkt | #lang racket
(require simple-xml)
(require "../xlsx/xlsx.rkt")
(provide (contract-out
[rels (-> list?)]
[write-rels (->* () (path-string?) void?)]
))
(define (rels)
'("Relationships"
("xmlns" . "")
("Relationship"
("Id" . "rId3")
("Type" . "-properties")
("Targ... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/_rels/rels.rkt | racket | #lang racket
(require simple-xml)
(require "../xlsx/xlsx.rkt")
(provide (contract-out
[rels (-> list?)]
[write-rels (->* () (path-string?) void?)]
))
(define (rels)
'("Relationships"
("xmlns" . "")
("Relationship"
("Id" . "rId3")
("Type" . "-properties")
("Targ... | |
907e92dbdd58c8d44caaa2ae9076218a023e3d120f1d9e17fe6ac0ccb08161f8 | cronokirby/haze | Bencoding.hs | |
Description : Functions related to the type
Contains the base data type representing
data , as well as encoders and decoders to marshall
this data from byte strings .
ByteString is used as the base target , since Bencoding
is n't guaranteed to be in utf-8 text , however the strings
contained insid... | null | https://raw.githubusercontent.com/cronokirby/haze/3cfbc9de8d923a541429f4a5cb1eb4151d5aea08/src/Haze/Bencoding.hs | haskell | | Encode Bencoding as itself.
This is useful for combining with 'encode'.
| Encode a thing as a bytestring.
| Decode Bencoding as itself.
This is useful for combining with 'decode'.
| Decode a bytestring into something | |
Description : Functions related to the type
Contains the base data type representing
data , as well as encoders and decoders to marshall
this data from byte strings .
ByteString is used as the base target , since Bencoding
is n't guaranteed to be in utf-8 text , however the strings
contained insid... |
9b4289f3eab80246baa3144256514d70764e4c7d6600acd2a2e158eb4c64a8ca | samedhi/firemore | firebase_test.cljs | (ns firemore.firebase-test
(:require
[firemore.firebase :as sut]
[cljs.test :as t :include-macros true]))
(t/deftest fundamentals-test
(t/is (some? @sut/FB))
(t/is (some? (sut/db @sut/FB)))
(t/is (some? (sut/auth @sut/FB))))
| null | https://raw.githubusercontent.com/samedhi/firemore/8a1829efbe9cbed367f1d49d0e92e01c5aa20ad5/test/firemore/firebase_test.cljs | clojure | (ns firemore.firebase-test
(:require
[firemore.firebase :as sut]
[cljs.test :as t :include-macros true]))
(t/deftest fundamentals-test
(t/is (some? @sut/FB))
(t/is (some? (sut/db @sut/FB)))
(t/is (some? (sut/auth @sut/FB))))
| |
3875f496560a33527862d194b6b8bba46418250dff73c6290b24950d0027bddd | mihaimaruseac/io-manager | SimpleEchoExample.hs | |
Module : $ Header$
Description : Simple Example of using the io - manager library
Copyright : ( c ) : BSD3
Maintainer :
Stability : stable
Portability : portable
A simple test module for IOManager which will echo the contents of the
input files to the output f... | null | https://raw.githubusercontent.com/mihaimaruseac/io-manager/590462cd87a22d0eff2b12824cd3c4a775f206ce/simple-echo-example/SimpleEchoExample.hs | haskell | | The main function simply tells which is the function implemented by the
student.
| Solution of the problem. Add here your implementation.
| Convert input representation to output representation.
| Output the contents. | |
Module : $ Header$
Description : Simple Example of using the io - manager library
Copyright : ( c ) : BSD3
Maintainer :
Stability : stable
Portability : portable
A simple test module for IOManager which will echo the contents of the
input files to the output f... |
4951de74ca183fc77bcd8bc375a85861c38145e0975a51962a8ffe24ac699ecf | VisionsGlobalEmpowerment/webchange | running_time_limited.clj | (ns webchange.templates.library.running-time-limited
(:require
[webchange.templates.core :as core]
[webchange.templates.utils.common :as common]
[webchange.templates.utils.dialog :as dialog]))
(def available-times (mapv (fn [v] {:text (str v " sec") :value v}) (range 30 70 10)))
(def available-speed
[{... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/4be2784b170befe245d60e32271b88e6fae31c13/src/clj/webchange/templates/library/running_time_limited.clj | clojure | "box-target-background" "box-target" | (ns webchange.templates.library.running-time-limited
(:require
[webchange.templates.core :as core]
[webchange.templates.utils.common :as common]
[webchange.templates.utils.dialog :as dialog]))
(def available-times (mapv (fn [v] {:text (str v " sec") :value v}) (range 30 70 10)))
(def available-speed
[{... |
7963eb3c2d41053ba649ef864b619897804db4b7666fe6bb65a92247d15c04f4 | synrc/cr | cr_tcp.erl | -module(cr_tcp).
-description('prim_inet based TCP non-blocking listener').
-copyright('Synrc Research Center s.r.o.').
-behaviour(gen_server).
-include("cr.hrl").
-export(?GEN_SERVER).
-compile(export_all).
-record(state, {listener,acceptor,module,name,port,ring}).
handle_info({inet_async,ListSock,Ref,Message},
#... | null | https://raw.githubusercontent.com/synrc/cr/b4a30dc55d30500a1c239d6234444e1ecff5aab5/src/tcp/cr_tcp.erl | erlang | -module(cr_tcp).
-description('prim_inet based TCP non-blocking listener').
-copyright('Synrc Research Center s.r.o.').
-behaviour(gen_server).
-include("cr.hrl").
-export(?GEN_SERVER).
-compile(export_all).
-record(state, {listener,acceptor,module,name,port,ring}).
handle_info({inet_async,ListSock,Ref,Message},
#... | |
1d9117040608d289e9591e825281a2c257a58c2f5f8011e5998ed2bb4ea2f67e | beamspirit/bigwig | bigwig_http_rb.erl | %%
%% report browser api
%%
-module(bigwig_http_rb).
-behaviour(cowboy_http_handler).
-export([init/3, handle/2, terminate/2]).
init({tcp, http}, Req, _Opts) ->
bigwig_report_reader:start(), %% will only be started once anyway, registered name
bigwig_report_reader:rescan(), %% ouch
{ok, Req, undefined_stat... | null | https://raw.githubusercontent.com/beamspirit/bigwig/552ac9968d2457286056a17f3be7f53ec72a31cc/src/bigwig_http_rb.erl | erlang |
report browser api
will only be started once anyway, registered name
ouch
/rb/reports
/rb/reports/123
if not, add a format_report that wraps it into an obj that includes hash?
Make a proplist to pass to make_filter, from the querstring
20 etc ) , and to_list
Create a rb filter based on query params | -module(bigwig_http_rb).
-behaviour(cowboy_http_handler).
-export([init/3, handle/2, terminate/2]).
init({tcp, http}, Req, _Opts) ->
{ok, Req, undefined_state}.
handle(Req, State) ->
{Path, Req2} = cowboy_http_req:path(Req),
handle_path(Path, Req2, State).
handle_path([<<"rb">>, <<"reports">>], Req0, Sta... |
ebe35459c327dc3c57d49300f118f902f7a9a73918a7ae8bdf844a8c47eeae8c | mkurtak/clj-salt-api | http.clj | Copyright ( c )
;; All rights reserved.
(ns ^:no-doc salt.http
(:require [aleph.http :as http]
[byte-streams :as bs]
[cheshire.core :as json]
[clojure.core.async :as a]
[clojure.string :as str]
[manifold.deferred :as d]
[manifold.stream :as m... | null | https://raw.githubusercontent.com/mkurtak/clj-salt-api/6c6889640c1dc8717f4268202d05d330f6a6d162/src/salt/http.clj | clojure | All rights reserved.
Exception is only thrown from create-deferred-fn (from calling thread).
It must be put on promise/chan asynchronously to prevent deadlock.
TODO what to do with remaining pv? | Copyright ( c )
(ns ^:no-doc salt.http
(:require [aleph.http :as http]
[byte-streams :as bs]
[cheshire.core :as json]
[clojure.core.async :as a]
[clojure.string :as str]
[manifold.deferred :as d]
[manifold.stream :as ms]
[salt.cor... |
d49633c26df0a8114e3ea16d50dbcdef2305e8eb35b2b1219f42d8a7778af8eb | dparis/gen-phzr | collision_group.cljs | (ns phzr.physics.p2.collision-group
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->CollisionGroup
"Collision Group
Parameters:
* bitmask (number) - The CollisionGroup bitmask."
([bitmask]
(js/Phaser.Physics.P... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/physics/p2/collision_group.cljs | clojure | (ns phzr.physics.p2.collision-group
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->CollisionGroup
"Collision Group
Parameters:
* bitmask (number) - The CollisionGroup bitmask."
([bitmask]
(js/Phaser.Physics.P... | |
6d9d56981de78c0e015456e69df93f2be95941202e042bb3f2fa125382c60357 | rjnw/sham | info-values.rkt | #lang racket
(require "private/utils.rkt")
(provide (all-defined-out))
| null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-sam/sham/sam/syntax/info-values.rkt | racket | #lang racket
(require "private/utils.rkt")
(provide (all-defined-out))
| |
7c1b1459b12883d7ffd8a907c63ac72a677c2e0b84c9c4d182b56f994bac5a26 | inhabitedtype/ocaml-aws | errors_internal.ml | type t =
| AlreadyExistsException
| AssociatedInstances
| AssociationAlreadyExists
| AssociationDoesNotExist
| AssociationExecutionDoesNotExist
| AssociationLimitExceeded
| AssociationVersionLimitExceeded
| AuthFailure
| AutomationDefinitionNotFoundException
| AutomationDefinitionVersionNotFoundExce... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/errors_internal.ml | ocaml | type t =
| AlreadyExistsException
| AssociatedInstances
| AssociationAlreadyExists
| AssociationDoesNotExist
| AssociationExecutionDoesNotExist
| AssociationLimitExceeded
| AssociationVersionLimitExceeded
| AuthFailure
| AutomationDefinitionNotFoundException
| AutomationDefinitionVersionNotFoundExce... | |
b4f850ac1c2eb925883e0e76c12c8a4499597a78ef87def002dc03e90eacd080 | BillHallahan/G2 | InitRewrite.hs | module G2.Equiv.InitRewrite (initWithRHS, initWithLHS) where
import G2.Language
import qualified G2.Language.ExprEnv as E
import qualified G2.Language.Typing as T
import qualified G2.Language.Expr as X
import G2.Execution.Memory
initWithRHS :: State t -> Bindings -> RewriteRule -> (State t, Bindings)
initWithRHS s b... | null | https://raw.githubusercontent.com/BillHallahan/G2/8a28e05ae500f0a6893c10e58d39674c76ecbefd/src/G2/Equiv/InitRewrite.hs | haskell | module G2.Equiv.InitRewrite (initWithRHS, initWithLHS) where
import G2.Language
import qualified G2.Language.ExprEnv as E
import qualified G2.Language.Typing as T
import qualified G2.Language.Expr as X
import G2.Execution.Memory
initWithRHS :: State t -> Bindings -> RewriteRule -> (State t, Bindings)
initWithRHS s b... | |
f6a6324c50e213a7bf9af8ceb7888d1a343b582ebb7ed90acca72daf28588a3a | typedclojure/typedclojure | runtime_infer.clj | (ns typed.clj.annotator.test.runtime-infer
(:require [clojure.test :refer :all]
[clojure.pprint :as pp]
[clojure.repl :as repl]
[clojure.set :as set]
[com.gfredericks.test.chuck :as chuck]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/1b3c9ef6786a792ae991c438ea8dca31175aa4a7/typed/clj.annotator/test/typed/clj/annotator/test/runtime_infer.clj | clojure | ppenv : Env -> nil
testing only
set up ns refers
Any U Vec Map
Sym HMap Nothing
'unparse-prop1 t
'unparse-prop1 t
'unparse-prop1 t
'unparse-prop1 t
collapse maps with completely disjoint keys
don't collapse common keys with keyword entry
upcast Kw + HMap to Any
simplify keywords + seqables to Any
don't simplify... | (ns typed.clj.annotator.test.runtime-infer
(:require [clojure.test :refer :all]
[clojure.pprint :as pp]
[clojure.repl :as repl]
[clojure.set :as set]
[com.gfredericks.test.chuck :as chuck]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
... |
6d1ca832233966570ef9c9226bd5d442e204fea662e78ca9961349572b5904ae | archimag/cliki2 | articles.lisp | articles.lisp
(in-package #:cliki2)
(restas:define-route view-article (":title")
(or (let ((article (article-with-title title)))
(when (and article
(not (string= (article-title article) title)))
(restas:redirect 'view-article
:title (article-title ar... | null | https://raw.githubusercontent.com/archimag/cliki2/f0b6910f040907c70fd842ed76472af2d645c984/src/routes/articles.lisp | lisp | articles.lisp
(in-package #:cliki2)
(restas:define-route view-article (":title")
(or (let ((article (article-with-title title)))
(when (and article
(not (string= (article-title article) title)))
(restas:redirect 'view-article
:title (article-title ar... | |
96668e52b4db6e523398790e2d4e5d1534b7632379d5bd88cb3d88d3d00f4905 | Clozure/ccl-tests | ceiling-aux.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Aug 19 06:52:02 2003
;;;; Contains: Aux. functions for CEILING
(in-package :cl-test)
(defun ceiling.1-fn ()
(loop for n = (- (random 2000000000)
1000000000)
for d = (1+ (random 10000))
for vals = (multiple-value-list (ceiling n d))
for (q r) = vals
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/ceiling-aux.lsp | lisp | -*- Mode: Lisp -*-
Contains: Aux. functions for CEILING | Author :
Created : Tue Aug 19 06:52:02 2003
(in-package :cl-test)
(defun ceiling.1-fn ()
(loop for n = (- (random 2000000000)
1000000000)
for d = (1+ (random 10000))
for vals = (multiple-value-list (ceiling n d))
for (q r) = vals
for n2 = (+ (* q d) r)
repeat 1000
unless (and (eql (length vals... |
92ae4990fcf4c521f54f25bc60c2bbd4df3bdd3e78615ba822427f1bb4a90f53 | felixmulder/haskell-in-production | Log.hs | module Log
( Loggable(..)
, Log(..)
, Logger(..)
) where
import Prelude
import Control.Monad.Reader (ReaderT, lift)
import Control.Monad.Reader.Class (asks)
import Data.Has (Has(..))
import Data.Text (Text)
import GHC.Stack (HasCallStack)
class Loggable a where
fromLoggable :: a -> Text
class Monad m => L... | null | https://raw.githubusercontent.com/felixmulder/haskell-in-production/ff3431f01342b8689d3449007759706d0bba6488/part-1-testable-components/src/Log.hs | haskell | module Log
( Loggable(..)
, Log(..)
, Logger(..)
) where
import Prelude
import Control.Monad.Reader (ReaderT, lift)
import Control.Monad.Reader.Class (asks)
import Data.Has (Has(..))
import Data.Text (Text)
import GHC.Stack (HasCallStack)
class Loggable a where
fromLoggable :: a -> Text
class Monad m => L... | |
a6480c1b79656c9952754dc207d863deadee5be56c73c2ddb4bc4c844c1cd496 | rescript-lang/rescript-compiler | belt_Option.ml | Copyright ( C ) 2017 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/f716534c90d57017cad7e3176fa5d0b8b26fc88f/jscomp/others/belt_Option.ml | ocaml | Copyright ( C ) 2017 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... | |
f9583e566a7a1deb7d00106b183d9cb7621014893d75a8416ce1ef760ca63e79 | CryptoKami/cryptokami-core | Assurance.hs | -- | Assurance levels info.
module Pos.Wallet.Web.Assurance
( AssuranceLevel (..)
, assuredBlockDepth
) where
import Pos.Core.Common (BlockCount)
import Pos.Wallet.Web.ClientTypes (CWalletAssurance (..))
data AssuranceLevel
= HighAssurance
-- | For given assurance level, recommen... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Assurance.hs | haskell | | Assurance levels info.
| For given assurance level, recommended transaction depth to assure that
transaction won't be canceled by some fork.
Values are taken from this table:
-assurance/ |
module Pos.Wallet.Web.Assurance
( AssuranceLevel (..)
, assuredBlockDepth
) where
import Pos.Core.Common (BlockCount)
import Pos.Wallet.Web.ClientTypes (CWalletAssurance (..))
data AssuranceLevel
= HighAssurance
assuredBlockDepth :: AssuranceLevel -> CWalletAssurance -> BlockCoun... |
71c9fcb7dff4d1045834c0d5016c4151b85712b575a766577125a7218c4d91df | rsnikhil/Forvis_RISCV-ISA-Spec | Main_TandemVerifier.hs | module Main_TandemVerifier (main_TandemVerifier) where
-- ================================================================
-- This is the 'main' function for the use-case where we use the
-- formal spec as a tandem verifier. Here, it receives commands
on stdin and produces responses on stdout .
-- ================... | null | https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/ZZ_OLD/v1/src/Main_TandemVerifier.hs | haskell | ================================================================
This is the 'main' function for the use-case where we use the
formal spec as a tandem verifier. Here, it receives commands
================================================================
Project imports
============================================... | module Main_TandemVerifier (main_TandemVerifier) where
on stdin and produces responses on stdout .
Standard Haskell imports
import System.IO
import Numeric (showHex, readHex)
import System.Exit
import BitManipulation
import ArchDefs
import ArchState
import RunProgram
main_TandemVerifier :: IO ()
main_TandemV... |
3ec34be878b27191b1dccea797dfa76fbd1b54b1323a26abbbf05048aae125bc | michalkonecny/aern2 | Integration.hs | module AERN2.PPoly.Integration where
import MixedTypesNumPrelude
import Data.List
import AERN2.MP.Ball
import AERN2.MP.Dyadic
import AERN2.Interval
import AERN2.Poly.Cheb
import AERN2.PPoly.Type
import AERN2.RealFun.Operations
integral :: PPoly -> MPBall -> MPBall -> MPBall
integral (PPoly ps dom) l r =
0.5*(domR ... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-univariate/src/AERN2/PPoly/Integration.hs | haskell | TODO: properly work out required endpoint precision
TODO: eval direct? | module AERN2.PPoly.Integration where
import MixedTypesNumPrelude
import Data.List
import AERN2.MP.Ball
import AERN2.MP.Dyadic
import AERN2.Interval
import AERN2.Poly.Cheb
import AERN2.PPoly.Type
import AERN2.RealFun.Operations
integral :: PPoly -> MPBall -> MPBall -> MPBall
integral (PPoly ps dom) l r =
0.5*(domR ... |
ef37cd42dd4b84aec5c6ad1d3314302add249433714e4a644c3ba09cdc91f0c2 | lambe-lang/mitch | transpiler.mli | val run : 'a Mitch_lang.Term.t -> (Mitch_ir.Objcode.t list, string) result
| null | https://raw.githubusercontent.com/lambe-lang/mitch/2c47f6627c3a219c31afd078836e9e7be3e26719/lib/mitch/system/s01_transpiler/transpiler.mli | ocaml | val run : 'a Mitch_lang.Term.t -> (Mitch_ir.Objcode.t list, string) result
| |
8fcf8a562073630523e199cb50c3ffb7fa161ca5a58e3fe3e4bb22a2dcb282fd | rd--/hsc3 | pv_PlayBuf.help.hs | pv_PlayBuf ;
let rec_buf = control kr "rec" 10
fft_buf = localBufId 'α' 1024 1
x = mouseX kr (-1) 1 Linear 0.2
c = X.pv_PlayBuf fft_buf rec_buf x 50 1
in ifft c 1 0
-- pv_PlayBuf
let rec_buf = control kr "rec" 10
fft_buf = localBufId 'β' 1024 1
n = range (-1) 2 (lfNoise2Id 'γ' kr 0.2)
c = ... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/pv_PlayBuf.help.hs | haskell | pv_PlayBuf | pv_PlayBuf ;
let rec_buf = control kr "rec" 10
fft_buf = localBufId 'α' 1024 1
x = mouseX kr (-1) 1 Linear 0.2
c = X.pv_PlayBuf fft_buf rec_buf x 50 1
in ifft c 1 0
let rec_buf = control kr "rec" 10
fft_buf = localBufId 'β' 1024 1
n = range (-1) 2 (lfNoise2Id 'γ' kr 0.2)
c = X.pv_PlayBuf f... |
538faa597db20e5e24ddd9a594e8c871e5322187677f1f05e5ac3d7e75a24012 | haguenau/wyrd | tmkStruct.ml | module Geom = struct
type t = {
mutable x: int;
mutable y: int;
mutable w: int;
mutable h: int;
}
let null () =
{ x = 0; y = 0; w = 0; h = 0 }
let record (x,y,w,h) g =
g.x <- x;
g.y <- y;
g.w <- w;
g.h <- h
end
module State = struct
type t = bool * bool * bool
(* focu... | null | https://raw.githubusercontent.com/haguenau/wyrd/490ce39ad9ecf36969eb74b9f882f85a1ef14ba3/curses/tmk/tmkStruct.ml | ocaml | focus, selected, sensitive | module Geom = struct
type t = {
mutable x: int;
mutable y: int;
mutable w: int;
mutable h: int;
}
let null () =
{ x = 0; y = 0; w = 0; h = 0 }
let record (x,y,w,h) g =
g.x <- x;
g.y <- y;
g.w <- w;
g.h <- h
end
module State = struct
type t = bool * bool * bool
let nor... |
39b4f1c1419deb32aaa38bdc673449b69935f54f97ac8b952feec2866130d451 | eponai/sulolive | main.cljs | (ns env.ios.main
(:require [eponai.mobile.ios.core :as core]))
(core/init {:server-address ""})
| null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/sulo-native/env/prod/env/ios/main.cljs | clojure | (ns env.ios.main
(:require [eponai.mobile.ios.core :as core]))
(core/init {:server-address ""})
| |
c8b42769888b24055964424ead0236bd83df5fd5937f162b396187f096d62d36 | VictorNicollet/Ohm | couchDB.mli | Ohm is © 2012
exception CouchDB_Error
type implementation
class virtual ctx : object ('self)
method couchDB : implementation
method virtual time : float
end
val ctx_decay : #ctx -> ctx
class init_ctx : object
method couchDB : implementation
method time : float
end
type database
module type CONF... | null | https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/src/couchDB.mli | ocaml | Ohm is © 2012
exception CouchDB_Error
type implementation
class virtual ctx : object ('self)
method couchDB : implementation
method virtual time : float
end
val ctx_decay : #ctx -> ctx
class init_ctx : object
method couchDB : implementation
method time : float
end
type database
module type CONF... | |
3d15263d890452a5b0310734632fc941d4d1a2bff5d1a506956e95a056383d6d | helium/miner | miner_poc_SUITE.erl | -module(miner_poc_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-export([
groups/0, all/0, init_per_group/2, end_per_group/2
]).
-export([
init_per_testcase/2,
end_per_testcase/2,
basic_test/1,
... | null | https://raw.githubusercontent.com/helium/miner/fadfdf74ece9d3c515c03725d1c1c0f0e7c51abd/test/miner_poc_SUITE.erl | erlang | spare-tortilla-raccoon
kind-tangerine-octopus
damp-hemp-pangolin
fierce-lipstick-poodle
raspy-parchment-pike
fresh-gingham-porpoise
glorious-eggshell-finch
--------------------------------------------------------------------
COMMON TEST CALLBACK FUNCTIONS
--------------------------------------------------------... | -module(miner_poc_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-export([
groups/0, all/0, init_per_group/2, end_per_group/2
]).
-export([
init_per_testcase/2,
end_per_testcase/2,
basic_test/1,
... |
6a4883b003da346c24f46bf5ad84ef176e5d679082d25a50edf1276b769e3143 | fossas/fossa-cli | PipenvSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
module Analysis.Python.PipenvSpec (spec) where
import Analysis.FixtureExpectationUtils
import Analysis.FixtureUtils
import Path
import Strategy.Python.Pipenv qualified as Pipenv
import Test.Hspec
import Types (DiscoveredProjectType (PipenvProjectType), GraphBreadth (Com... | null | https://raw.githubusercontent.com/fossas/fossa-cli/e1edac30265888f0252c58598f63b9e475813128/integration-test/Analysis/Python/PipenvSpec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
module Analysis.Python.PipenvSpec (spec) where
import Analysis.FixtureExpectationUtils
import Analysis.FixtureUtils
import Path
import Strategy.Python.Pipenv qualified as Pipenv
import Test.Hspec
import Types (DiscoveredProjectType (PipenvProjectType), GraphBreadth (Com... | |
f47b8d3feb2b7150663d82145b908f13cc9a4e2a7ad959f7d5d186d1af7e98b8 | clojure/core.rrb-vector | rrb_vector.cljs | Copyright ( c ) and contributors . 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 t... | null | https://raw.githubusercontent.com/clojure/core.rrb-vector/88c2f814b47c0bbc4092dad82be2ec783ed2961f/src/main/cljs/clojure/core/rrb_vector.cljs | 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 ) and contributors . All rights reserved .
(ns clojure.core.rrb-vector
"An implementation of the confluently persistent vector data
structure introduced in Bagwell, Rompf, \"RRB-Trees: Efficient
Immutable Vectors\", EPFL-REPORT-169879, September, 2011.
RRB-Trees build upon Clojure's Persi... |
8a43e3a3ce012f9bb24f2cc84983322f17f310c76989bb737735cc0a5cb17bd1 | binsec/haunted | path_predicate_env.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/base/path_predicate_env.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
16867a9a49ad3304c6a1ffefbf88894f19ea8330baba3e853228f635115c04fe | wireapp/wire-server | Env.hs | # LANGUAGE TemplateHaskell #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , e... | null | https://raw.githubusercontent.com/wireapp/wire-server/f72b09756102a5c66169cca0343aa7b7e6e54491/services/galley/src/Galley/Env.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
mo... |
3a326d1d978e6cde866e80531223f6d3ec38c2a078e28554ba7e4ae3e1927d05 | s3rius/brainbreak | AST.hs | module Compiler.Backends.C.AST where
data CType
= CTypeInt
| CTypeMap CType CType
deriving (Eq, Show)
data CVar
= CVar String CType
| MapElement CVar CVar
deriving (Eq, Show)
data CConst
= CConstString String
| CConstInt Int
| CEmptyMap CType CType
deriving (Eq, Show)
data CValue
= CValue CVar... | null | https://raw.githubusercontent.com/s3rius/brainbreak/bee6439ce4f30318980c3d19cc8cfdc3b8eefbce/src/Compiler/Backends/C/AST.hs | haskell | module Compiler.Backends.C.AST where
data CType
= CTypeInt
| CTypeMap CType CType
deriving (Eq, Show)
data CVar
= CVar String CType
| MapElement CVar CVar
deriving (Eq, Show)
data CConst
= CConstString String
| CConstInt Int
| CEmptyMap CType CType
deriving (Eq, Show)
data CValue
= CValue CVar... | |
45bf53a5010a9f83864679f858d118664e2198a4067b5058e8a29775b4ad78fe | bennn/dissertation | world.rkt | #lang typed/racket
(require "base-types.rkt")
(require require-typed-check)
(require/typed/check "bset.rkt"
[blocks-union (-> BSet BSet BSet)]
[blocks-max-x (-> BSet Real)]
[blocks-min-x (-> BSet Real)]
[blocks-max-y (-> BSet Real)])
(require/typed/check "tetras.rkt"
[tetra-move (-> Real Real Tetra Tetra... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/tetris/typed/world.rkt | racket | and create a new tetra.
Take the current tetra and move it down until it lands.
Has the current tetra landed on blocks?
Has the current tetra landed on the floor?
Has the current tetra landed?
Step the world, either touchdown or move the tetra down on step.
Make a world with the new tetra *IF* if doesn't lie on ... | #lang typed/racket
(require "base-types.rkt")
(require require-typed-check)
(require/typed/check "bset.rkt"
[blocks-union (-> BSet BSet BSet)]
[blocks-max-x (-> BSet Real)]
[blocks-min-x (-> BSet Real)]
[blocks-max-y (-> BSet Real)])
(require/typed/check "tetras.rkt"
[tetra-move (-> Real Real Tetra Tetra... |
781b0ab20e15bbab2aa4d5d4d8872a8b8336ea59f85e3e536b13f6adeb4e7340 | pascal-knodel/haskell-craft | E'12'42.hs | --
--
--
------------------
Exercise 12.42 .
------------------
--
--
--
module E'12'42 where
| null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'12'42.hs | haskell |
----------------
----------------
| Exercise 12.42 .
module E'12'42 where
|
9d3d013de60db6df93c5e31be06fffa75c7b4727a710f1d995f3148a01e862cc | artyom-poptsov/guile-png | PLTE.scm | ;;; PLTE.scm -- PLTE chunk.
Copyright ( C ) 2022 < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later version.
;;
;;... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-png/04368784524d536c07e842d07199816c2b645ef7/modules/png/core/chunk/PLTE.scm | scheme | PLTE.scm -- PLTE chunk.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
The program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See... |
Copyright ( C ) 2022 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
PNG image palette ( PLTE ) chunk . The chunk contains from 1 to 256 pal... |
88e687cd9c2e7a9885fd2de51283304f4d98fb8fe3830d7b929328cb2947d085 | GumTreeDiff/cgum | flag_cocci.ml |
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... | null | https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/flag_cocci.ml | ocaml | the inputs
the output
the derived inputs
the "underived" outputs
false
if true then when have a #include "../../xx.h", we look also for xx.h in
* current directory. This is because of how works extract_c_and_res
|
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... |
7d90a2f0429baeec8d73d646fd87f10d930ce57d680102d289558d465f432a51 | FranklinChen/hugs98-plus-Sep2006 | IO.hs | # OPTIONS_GHC -fno - implicit - prelude #
-----------------------------------------------------------------------------
-- |
-- Module : System.IO
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : stab... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/System/IO.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.IO
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
---------------------------------------------------------------------------
:: (a... | # OPTIONS_GHC -fno - implicit - prelude #
Copyright : ( c ) The University of Glasgow 2001
The standard IO library .
module System.IO (
* The IO monad
instance MonadFix
IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode),
| These functions are also exported by the " Prelude " .
#... |
fbfc8be8fd0a46a40c959553f4b6284b0d46c1361a44ff547b0b38a7d142d4da | input-output-hk/cardano-transactions | Encoding.hs | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
{-# OPTIONS_HADDOCK prune #-}
module Codec.Binary.Encoding
(
-- * Converting From Bases
fromBase16
, fromBech32
, fromBase58
, fromBase64
-- * Conversion To Bases
, base16
, bech32
, base58
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-transactions/efc3914f950438b70ebe20919bf6c0ecf93b3bbc/shared/Codec/Binary/Encoding.hs | haskell | # OPTIONS_HADDOCK prune #
* Converting From Bases
* Conversion To Bases
@since 2.0.0
@since 2.0.0
@since 2.0.0
@since 2.0.0
@since 2.0.0
@since 2.0.0
@since 2.0.0 | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Codec.Binary.Encoding
(
fromBase16
, fromBech32
, fromBase58
, fromBase64
, base16
, bech32
, base58
, base64
) where
import Codec.Binary.Bech32
( HumanReadablePart )
import Data.By... |
d2dff01bc513d6e4df2b91b9698b63f2480b5d6bc1a4dc52ad5ce10b6c9cdeff | exoscale/clojure-kubernetes-client | v1_env_from_source.clj | (ns clojure-kubernetes-client.specs.v1-env-from-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-config-map-env-source :refer :all]
[clojure-kubernetes-client.specs.v1-secret-env-source :refer :all]
)
(:impo... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_env_from_source.clj | clojure | (ns clojure-kubernetes-client.specs.v1-env-from-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-config-map-env-source :refer :all]
[clojure-kubernetes-client.specs.v1-secret-env-source :refer :all]
)
(:impo... | |
981eeff8679be526bd510a7199f22a984e9d3241e390a453c8916929c160b429 | mvaldesdeleon/aoc18 | Day3Main.hs | module Day3Main where
import Day3 (day3)
main :: IO ()
main = day3
| null | https://raw.githubusercontent.com/mvaldesdeleon/aoc18/1a6f6de7c482e5de264360e36f97a3c7487e2457/app/Day3Main.hs | haskell | module Day3Main where
import Day3 (day3)
main :: IO ()
main = day3
| |
14b6ef87bf3ac1b7f71c4e6780799dd9d374c5a9747759a46fee1ad4f048a0ac | dnadales/sandbox | ExercisesFoldableSpec.hs | -- |
module ExercisesFoldableSpec where
import Data.Foldable
import Data.Functor.Compose
import Data.Monoid
import Data.Semigroup
import Test.Hspec
spec :: Spec
spec = do
describe "foldl" $ do
it "folds a list of numbers with +" $ do
foldl (+) 0 [0, 1, 2,... | null | https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/my-typeclassopedia/my-typeclassopedia-haskell/test/ExercisesFoldableSpec.hs | haskell | |
In this case the fold is applied to the list, and to the maybe values.
A fold on the maybe values extracts their values. |
module ExercisesFoldableSpec where
import Data.Foldable
import Data.Functor.Compose
import Data.Monoid
import Data.Semigroup
import Test.Hspec
spec :: Spec
spec = do
describe "foldl" $ do
it "folds a list of numbers with +" $ do
foldl (+) 0 [0, 1, 2, 3] `... |
5988cb0d0484f2cf39893d284866578d8aba6810954c0f4a07cfa0d91a579bee | danieljharvey/mimsa | IRSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.IR.IRSpec (spec) where
import Data.Foldable (traverse_)
import Data.Functor
import Data.Text (Text)
import qualified Data.Text.IO as T
import qualified LLVM.AST as LLVM
import qualified Smol.Core.Compile.RunLLVM as Run
import Smol.Core.IR.FromExpr.Expr
import Smol.Core.I... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/296ab9bcbdbaf682fa76921ce3c80d4bbafb52ae/smol-core/test/Test/IR/IRSpec.hs | haskell | # LANGUAGE OverloadedStrings #
run the code, get the output, die
single arity function that return prim
single arity function that returns struct
single arity function that returns struct
oh fuck
constructor with no args
predicates in constructor
predicates in constructor
data shapes are wrong
wildcards fuck i... |
module Test.IR.IRSpec (spec) where
import Data.Foldable (traverse_)
import Data.Functor
import Data.Text (Text)
import qualified Data.Text.IO as T
import qualified LLVM.AST as LLVM
import qualified Smol.Core.Compile.RunLLVM as Run
import Smol.Core.IR.FromExpr.Expr
import Smol.Core.IR.FromResolvedExpr
import Smol.Core... |
77f9bc652b78f97ba83c5a0e0cdb0c8887c1faa57479f87668a8cbbf60f53d3f | samply/blaze | health_test.clj | (ns blaze.handler.health-test
(:require
[blaze.handler.health]
[blaze.test-util :as tu :refer [with-system]]
[blaze.test-util.ring :refer [call]]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [deftest]]
[juxt.iota :refer [given]]
[taoensso.timbre :as log]))
(st/instrumen... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/test/blaze/handler/health_test.clj | clojure | (ns blaze.handler.health-test
(:require
[blaze.handler.health]
[blaze.test-util :as tu :refer [with-system]]
[blaze.test-util.ring :refer [call]]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [deftest]]
[juxt.iota :refer [given]]
[taoensso.timbre :as log]))
(st/instrumen... | |
3899cb3b996c213ac7ce70eee28a7c599c95a87cb052b72f5f0552be7ad8aead | 3b/3bgl-misc | textures.lisp | (in-package 3bgl-sg2)
(defclass sampler ()
((sampler :reader sampler :initarg :sampler)
(spec :reader spec :initarg :spec)))
(defclass texture ()
((texture :reader texture :initarg :texture)
(source :reader source :initarg :source)
(target :reader target :initarg :target :initform :texture-2d)))
(defcla... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/scenegraph2/textures.lisp | lisp | (swizzle-r :red)
(swizzle-g :green)
(swizzle-b :blue)
(swizzle-a :alpha)
:swizzle-r swizzle-r
:swizzle-g swizzle-g
:swizzle-b swizzle-b
:swizzle-a swizzle-a
(gl:sampler-parameter s :texture-swizzle-r swizzle-r)
(gl:sampler-parameter s :texture-swizzle-g swizzle-g)
(gl:sampler-parameter s :texture-swizzle-b swizzle-b)
(... | (in-package 3bgl-sg2)
(defclass sampler ()
((sampler :reader sampler :initarg :sampler)
(spec :reader spec :initarg :spec)))
(defclass texture ()
((texture :reader texture :initarg :texture)
(source :reader source :initarg :source)
(target :reader target :initarg :target :initform :texture-2d)))
(defcla... |
7a9ef97fd96c10dff90815064b36f4385ad3f9c11907357bba5212205a11bd49 | tezos/tezos-mirror | p2p.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/7f2b112463a4c5de2a96aada8d07c0f9e142d4f1/src/lib_p2p/p2p.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 - 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , W... |
b6603874dcac3fae2b1fe9d0d9ae119963cff3c50259536526b1f10d035b0443 | aphyr/gretchen | flatzinc_test.clj | (ns gretchen.constraint.flatzinc-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.walk :refer [p... | null | https://raw.githubusercontent.com/aphyr/gretchen/bb7c4439884494a218561bc08a164ff0da84af36/test/gretchen/constraint/flatzinc_test.clj | clojure | test.spec iters
TODO: verify that all_different works | (ns gretchen.constraint.flatzinc-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.walk :refer [p... |
3bd1716076572d971773aca913d7cd322fc04ccaacd5deef900c9ff4fe83f104 | kutyel/haskell-book | Chapter14Spec.hs | module Test.Chapter14Spec where
import Chapter14
import Data.List (sort)
import Test.Hspec (Spec, describe, it)
import Test.QuickCheck
( Gen,
NonZero (NonZero),
Positive (Positive),
Testable (property),
elements,
expectFailure,
frequency,
)
genFoolEqual :: Gen Fool
genFoolEqual = elements ... | null | https://raw.githubusercontent.com/kutyel/haskell-book/fd4dc0332b67575cfaf5e3fb0e26687dc01772a0/test/Test/Chapter14Spec.hs | haskell | module Test.Chapter14Spec where
import Chapter14
import Data.List (sort)
import Test.Hspec (Spec, describe, it)
import Test.QuickCheck
( Gen,
NonZero (NonZero),
Positive (Positive),
Testable (property),
elements,
expectFailure,
frequency,
)
genFoolEqual :: Gen Fool
genFoolEqual = elements ... | |
fdf35d7c1aa09c3a5805c8137c185342daaf0449469864d0a6b155a3fa18c445 | dcastro/haskell-flatbuffers | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
HLINT ignore structField " Reduce duplication "
HLINT ignore typeRef " Use < $ > "
module FlatBuffers.Internal.Compiler.Parser where
import Control.Monad ( when )
import qualified Control.Monad.Combinators.NonEm... | null | https://raw.githubusercontent.com/dcastro/haskell-flatbuffers/cea6a75109de109ae906741ee73cbb0f356a8e0d/src/FlatBuffers/Internal/Compiler/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
| Roughly based on: .
Differences between this parser and the above grammar:
* Unions members now support aliases.
* Attributes can be reffered to either as an identifier or as a string literal (e.g. @attr@ or @"attr"@).
* Struct fields can't have default values.
* The gram... | # LANGUAGE TypeApplications #
HLINT ignore structField " Reduce duplication "
HLINT ignore typeRef " Use < $ > "
module FlatBuffers.Internal.Compiler.Parser where
import Control.Monad ( when )
import qualified Control.Monad.Combinators.NonEmpty as NE
import qualified D... |
5af99c5da7dfa09c6c61b4d8012a5ab7327f5f2253966b6ec2b39d559c70b0d6 | michalkonecny/aern2 | App.hs | |
Module : AERN2.RealFun . PlotService . App
Description : Serving data about a real function
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Serving data about a real function
Module : AERN2.RealFun.PlotServ... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-plot/server/src/AERN2/RealFun/PlotService/App.hs | haskell | import Text.Printf
Functions processing | |
Module : AERN2.RealFun . PlotService . App
Description : Serving data about a real function
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Serving data about a real function
Module : AERN2.RealFun.PlotServ... |
00d577c302950849d7570dcdf8d6ea46152604bb0e6df9fe24984ae020262ad6 | Apress/haskell-quick-syntax-reference | ch7.hs | add :: Integer -> Integer -> Integer
add x y = x + y
main = do
putStrLn "Adding two numbers:"
print(add 3 7)
main = putStrLn "Learning about Haskell main function"
main = do
putStrLn "Are you enjoying Haskell?"
answer <- getLine
putStrLn ("You answered: " ++ answ... | null | https://raw.githubusercontent.com/Apress/haskell-quick-syntax-reference/8bcb2773532de752d6297a91a3aaf49fd92ed03b/ch7.hs | haskell | add :: Integer -> Integer -> Integer
add x y = x + y
main = do
putStrLn "Adding two numbers:"
print(add 3 7)
main = putStrLn "Learning about Haskell main function"
main = do
putStrLn "Are you enjoying Haskell?"
answer <- getLine
putStrLn ("You answered: " ++ answ... | |
d56cc48e54b161c3836034ec8a6a6b80561dbd84d02610b61279067ac7b1a33e | gator1/jepsen | time.clj | (ns jepsen.nemesis.time
"Functions for messing with time and clocks."
(:require [jepsen.control :as c]
[jepsen.os.debian :as debian]
[clojure.java.io :as io])
(:import (java.io File)))
(defn compile!
"Takes a Reader to C source code and spits out a binary to /opt/jepsen/<bin>."
[reade... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/jepsen/src/jepsen/nemesis/time.clj | clojure | Upload | (ns jepsen.nemesis.time
"Functions for messing with time and clocks."
(:require [jepsen.control :as c]
[jepsen.os.debian :as debian]
[clojure.java.io :as io])
(:import (java.io File)))
(defn compile!
"Takes a Reader to C source code and spits out a binary to /opt/jepsen/<bin>."
[reade... |
81dc4829431207da7d5c6edb5db074b634a5f181ce24e219a156597a4856b17e | nitrogen/NitrogenProject.com | tests_advancedcontrols2.erl | -module(tests_advancedcontrols2).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
main() ->
wf_test:start_other(demos_advancedcontrols2, fun tests/0).
tests() ->
timer:sleep(1000), %% give google charts a chance to respond
?wf_test_js(line_chart, chart_test(line_chart)),
?wf_test_js(bar_chart,... | null | https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/tests/tests_advancedcontrols2.erl | erlang | give google charts a chance to respond | -module(tests_advancedcontrols2).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
main() ->
wf_test:start_other(demos_advancedcontrols2, fun tests/0).
tests() ->
?wf_test_js(line_chart, chart_test(line_chart)),
?wf_test_js(bar_chart, chart_test(bar_chart)),
?wf_test_js(pie_chart, chart_test(pi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.