_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 |
|---|---|---|---|---|---|---|---|---|
e691b61056d3f588962488c2d0f9d1d2bc1ca643e300a7fecbce5e5d6bca47b1 | koalaman/shellcheck | ControlFlow.hs |
Copyright 2022 Vidar Holen
This file is part of ShellCheck .
ShellCheck 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... | null | https://raw.githubusercontent.com/koalaman/shellcheck/d1d574c0911bb9405ffb79926e6d4dd4c0a16ca5/src/ShellCheck/Checks/ControlFlow.hs | haskell | This is scaffolding for a work in progress.
A check that runs on the entire graph
A check invoked once per node, with its (pre,post) data
A check invoked once per effect, with its node's (pre,post) data |
Copyright 2022 Vidar Holen
This file is part of ShellCheck .
ShellCheck 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... |
9352f8aee063fe116a6003ac7f1de002cc765700bc8ab8cd93ab7943451982fe | LambdaZagreb/game-of-life-workshop | core_test.clj | (ns clj-gameoflife.core-test
(:require [clojure.test :refer :all]
[clj-gameoflife.core :refer :all]))
(deftest test-create-empty-world
(testing "Create an empty square world"
(let [empty-5-5 (create-empty-world 5 5)]
(is (= 5 (count empty-5-5)))
(is (= 5 (count (first empty-5-5))))))
... | null | https://raw.githubusercontent.com/LambdaZagreb/game-of-life-workshop/9cc1be366116ac84300f23b281c6fff55202cdbc/clojure/test/clj_gameoflife/core_test.clj | clojure | (ns clj-gameoflife.core-test
(:require [clojure.test :refer :all]
[clj-gameoflife.core :refer :all]))
(deftest test-create-empty-world
(testing "Create an empty square world"
(let [empty-5-5 (create-empty-world 5 5)]
(is (= 5 (count empty-5-5)))
(is (= 5 (count (first empty-5-5))))))
... | |
702d4ce625755643b34221e292ff740cb91747b9470c7e1ea02b5606c0b4ac63 | rd--/hsc3 | mouseY.help.hs | -- mouseY ; frequency at X axis, amplitude at Y axis
let freq = mouseX kr 20 2000 Exponential 0.1
ampl = mouseY kr 0.01 0.1 Linear 0.1
in sinOsc ar freq 0 * ampl
-- mouseY ; variant with equal arguments but a random traversal
let freq = mouseXRand kr 20 2000 Exponential 0.1
ampl = mouseYRand kr 0.01 0.1 Linear... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/mouseY.help.hs | haskell | mouseY ; frequency at X axis, amplitude at Y axis
mouseY ; variant with equal arguments but a random traversal | let freq = mouseX kr 20 2000 Exponential 0.1
ampl = mouseY kr 0.01 0.1 Linear 0.1
in sinOsc ar freq 0 * ampl
let freq = mouseXRand kr 20 2000 Exponential 0.1
ampl = mouseYRand kr 0.01 0.1 Linear 0.1
in sinOsc ar freq 0 * ampl
|
3b684cac984830812b0faba7436b61753c712418f1f35bea2a71ba33cc3e297e | input-output-hk/cardano-sl | TraceSpec.hs | module Test.Pos.Util.TraceSpec
( spec)
where
import Universum hiding (replicate)
import Control.Concurrent (threadDelay)
import Control.Monad (when)
import Data.Text (append, replicate)
import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)
import Data.... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/test/Test/Pos/Util/TraceSpec.hs | haskell | | Count as many lines as you itented to log.
| Count as many lines as you itented to log.
| Count as many lines as you itented to log.
| example: setup trace
complexWork :: MonadIO m => TraceIO -> Text -> m ()
| example: unstructured trace
complexWork :: MonadIO m => TraceIO -> Text -> m ()
| example: nam... | module Test.Pos.Util.TraceSpec
( spec)
where
import Universum hiding (replicate)
import Control.Concurrent (threadDelay)
import Control.Monad (when)
import Data.Text (append, replicate)
import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)
import Data.... |
5d10b0a8d0fe1314267dea4f0fb31025412639755f0854f7b3cd4192595991f9 | ghoseb/yfinance | project.clj | (defproject yfinance "0.01"
:description "Clojure code to access Yahoo! Finance"
:author "Baishampayan Ghose"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[clj-time "0.1.0-SNAPSHOT"]]
:dev-dependencies [[swank-clojure "1.1.0"]])
| null | https://raw.githubusercontent.com/ghoseb/yfinance/27a1e486120b03f7d180b5389f5ebeff6f968d29/project.clj | clojure | (defproject yfinance "0.01"
:description "Clojure code to access Yahoo! Finance"
:author "Baishampayan Ghose"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[clj-time "0.1.0-SNAPSHOT"]]
:dev-dependencies [[swank-clojure "1.1.0"]])
| |
6dfea7e03de1a00f4250dd3925c7695a7ff0fb3e859f1af9094f7eb706fae25a | the-dr-lazy/cascade | Projects.hs | |
Module : Cascade . Api . Network . TestClient . Api . Projects
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE ... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/test/Cascade/Api/Network/TestClient/Api/Projects.hs | haskell | |
Module : Cascade . Api . Network . TestClient . Api . Projects
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE ... | |
06721a32b33c84cfaea9953ab97381dfd0df6347fbe27d88c253d59b6c6d72cd | agrafix/highjson | Types.hs | # LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Data.HighJson.Types
( HighSpec(..), SpecType(..)
, BodySpec(..)
, RecordFields(..), RecordField(..), RecordSpec(..)
, SumOptions(..), S... | null | https://raw.githubusercontent.com/agrafix/highjson/2a07567e54bfccc679d92fcd804c20da5275d0c9/highjson/src/Data/HighJson/Types.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
module Data.HighJson.Types
( HighSpec(..), SpecType(..)
, BodySpec(..)
, RecordFields(..), RecordField(..), RecordSpec(..)
, SumOptions(..), SumOption(..), SumSpec(..)
, EnumOption(..), Enu... |
2feb9da13e750e25ec7e11111dcb9087fd3ccab151153257b906d1f6b860a66c | bobzhang/fan | match_parser.ml | open Camlp4.PreCast;
let _loc = Loc.ghost in
let e = <:expr< parser [: `"a" :] -> t >> in
let a =
match e with
[ <:expr< parser [: `$str:x$ :] -> t >> -> x
| _ -> assert False ]
in Format.printf "a: %S@." a;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/match_parser.ml | ocaml | open Camlp4.PreCast;
let _loc = Loc.ghost in
let e = <:expr< parser [: `"a" :] -> t >> in
let a =
match e with
[ <:expr< parser [: `$str:x$ :] -> t >> -> x
| _ -> assert False ]
in Format.printf "a: %S@." a;
| |
a1ec43f02b7c8db1491e0dc1aebc4a1cc691da73617cc14bfe58576afbc08b9e | ertugrulcetin/herfi | tentacle.cljs | (ns herfi.scene.entity.tentacle
(:require
[herfi.scene.ecs :as ecs]))
(defn create-tentacles []
(dotimes [i 5]
(-> (str "tentacle-" i)
(ecs/create-entity
{:rotation [0 (* (js/Math.random) js/Math.PI 2) 0]})
(ecs/add-component :render {:type :asset
... | null | https://raw.githubusercontent.com/ertugrulcetin/herfi/113e89cb3a478c1ce3f9bbe9f0d5367f42533d61/src/cljs/herfi/scene/entity/tentacle.cljs | clojure | (ns herfi.scene.entity.tentacle
(:require
[herfi.scene.ecs :as ecs]))
(defn create-tentacles []
(dotimes [i 5]
(-> (str "tentacle-" i)
(ecs/create-entity
{:rotation [0 (* (js/Math.random) js/Math.PI 2) 0]})
(ecs/add-component :render {:type :asset
... | |
4783fe5dbd5e95cba660b1dc048bece616bd927d2f86572d0aa73b20ceb99c68 | myuon/minilight | Rules.hs | module Control.Lens.TH.Rules where
import Control.Lens
import Language.Haskell.TH
-- | Custom rules of the lens. All lens are prefixed by '_'.
lensRules_ :: LensRules
lensRules_ =
lensRules & lensField .~ \_ _ n -> [TopName (mkName ('_' : nameBase n))]
| null | https://raw.githubusercontent.com/myuon/minilight/3c6a4f6b9ed15c97c7de02a281c31152442fb4d7/src/Control/Lens/TH/Rules.hs | haskell | | Custom rules of the lens. All lens are prefixed by '_'. | module Control.Lens.TH.Rules where
import Control.Lens
import Language.Haskell.TH
lensRules_ :: LensRules
lensRules_ =
lensRules & lensField .~ \_ _ n -> [TopName (mkName ('_' : nameBase n))]
|
398f26f6e4b7a0f3a1acf8ec1a8321dfaaef153b11ff24fafee74a1c1957e55e | Bogdanp/racket-smtp-server | info.rkt | #lang info
(define license 'BSD-3-Clause)
(define collection "tests")
(define deps '("base"))
(define build-deps '("net-lib"
"rackcheck-lib"
"rackunit-lib"
"smtp-server"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-smtp-server/3b58fcbd1fc17345b7f4d5ba0315679d08ffa80f/smtp-server-test/info.rkt | racket | #lang info
(define license 'BSD-3-Clause)
(define collection "tests")
(define deps '("base"))
(define build-deps '("net-lib"
"rackcheck-lib"
"rackunit-lib"
"smtp-server"))
| |
3f5473e059cbc963f9de2705b1b9703b143894d4b1a8ab91b380d2b56fff8c27 | mauricioszabo/clover | core.cljs | (ns clover.core
(:require [clover.aux :as aux :include-macros true]
[clover.commands.formatter :as formatter]
[clover.vs :as vs]
[clover.state :as st]
[clover.ui :as ui]
[clover.commands.connection :as conn]
[repl-tooling.editor-integration.evalu... | null | https://raw.githubusercontent.com/mauricioszabo/clover/abaaebfda55d8ba017df011ea975afdac7caec0e/src/clover/core.cljs | clojure | :onEnterRules [{:beforeText #".*"
:action {}
:removeText js/Number.MAX_VALUE}]}))) | (ns clover.core
(:require [clover.aux :as aux :include-macros true]
[clover.commands.formatter :as formatter]
[clover.vs :as vs]
[clover.state :as st]
[clover.ui :as ui]
[clover.commands.connection :as conn]
[repl-tooling.editor-integration.evalu... |
b9e4324ab7eae244ddaa63db618ade893e6204e77fad517c46a514804c89d7b4 | armedbear/abcl | socket.lisp | socket.lisp
;;;
Copyright ( C ) 2004 - 2006
$ Id$
;;;
;;; 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 2
of the License , or ( at your option ) any later version .
;;;... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/src/org/armedbear/lisp/socket.lisp | lisp |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details... | socket.lisp
Copyright ( C ) 2004 - 2006
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1... |
b61a0425ca3e3cbed3bde48c3a108f8c5f1a844076cef39726c0802c2884376c | pixlsus/registry.gimp.org_static | sharpblur-gimp-2.0_1.scm | (define (script-fu-sharp-blur img drw image-blur-radius edge-blur-radius edge-detect-amount edge-gamma-correction)
(let* ((drawable-width (car (gimp-drawable-width drw)))
(drawable-height (car (gimp-drawable-height drw)))
(image (car (gimp-image-new drawable-width drawable-height RGB)))
(drawable (car (gimp-la... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/sharpblur-gimp-2.0_1.scm | scheme | (define (script-fu-sharp-blur img drw image-blur-radius edge-blur-radius edge-detect-amount edge-gamma-correction)
(let* ((drawable-width (car (gimp-drawable-width drw)))
(drawable-height (car (gimp-drawable-height drw)))
(image (car (gimp-image-new drawable-width drawable-height RGB)))
(drawable (car (gimp-la... | |
5c4a9ef3d2a1a716b0a77fff94c966220ff53b929e8891f76a428424685c17a1 | BillHallahan/G2 | Test11.hs | -- cmd_line = (--no-keep-quals)
{-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--prune-unsorted" @-}
# LANGUAGE DeriveGeneric #
module Combined () where
data R = R
data Assocs = Assocs R
f :: R
f = k g a
g :: Assocs
g = Assocs (i $ i R)
i :: R -> R
i x = x
a :: Int
a = 1
@ k : : ... | null | https://raw.githubusercontent.com/BillHallahan/G2/4d287df8ed7ba13c06d96d4911b9eedf870e80a1/tests/LiquidInf/Artificial/Pos/Test11.hs | haskell | cmd_line = (--no-keep-quals)
@ LIQUID "--short-names" @
@ LIQUID "--no-termination" @
@ LIQUID "--prune-unsorted" @ |
# LANGUAGE DeriveGeneric #
module Combined () where
data R = R
data Assocs = Assocs R
f :: R
f = k g a
g :: Assocs
g = Assocs (i $ i R)
i :: R -> R
i x = x
a :: Int
a = 1
@ k : : Assocs - > { v : Int | v = 1 } - > R @
k :: Assocs -> Int -> R
k (Assocs _) p = R
|
09c46d2ca412126ad3a84971c80a63405c90c38a623a7019ee07263de9a122fb | wireapp/wire-server | SubConversation.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
-- 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 t... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/libs/wire-api/src/Wire/API/MLS/SubConversation.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
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... | # LANGUAGE GeneralizedNewtypeDeriving #
# 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... |
b0b985474bb9eb7c7132af3ff1e577f0280e54ddd4f3a4cb7f4e440d191204fd | locusmath/locus | object.clj | (ns locus.algebra.commutative.monoid.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.copresheaf.structure... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/algebra/commutative/monoid/object.clj | clojure | Commutative monoids are the same thing as N-semimodules. Once you have loaded the preliminary
to-semimodule method. The difference between commutative semigroups and commutative monoids,
means that this is not possible for commutative semigroups. To resolve this, we provide the
adjoin-identity method which takes a ... | (ns locus.algebra.commutative.monoid.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.copresheaf.structure... |
365231b7e2c9bdeaaba72671ad88aadbd830330072223aac0ca737b458afa626 | fccm/OCamlSDL2 | sdltimer.mli | OCamlSDL2 - An OCaml interface to the SDL2 library
Copyright ( C ) 2013
This software is provided " AS - IS " , without any express or implied warranty .
In no event will the authors be held liable for any damages arising from
the use of this software .
Permission is granted to anyone to use this... | null | https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/src/sdltimer.mli | ocaml | * Time management
* API Doc:
{{:}Timer category}
* {{:}api doc}
* (seconds, milliseconds)
* {{:}api doc}
vim: set ts=2 sw=2 et: | OCamlSDL2 - An OCaml interface to the SDL2 library
Copyright ( C ) 2013
This software is provided " AS - IS " , without any express or implied warranty .
In no event will the authors be held liable for any damages arising from
the use of this software .
Permission is granted to anyone to use this... |
2fcdfa151bbd1cacf32bf937e453ec9c77846019a6fdebbcc803ca11126d8588 | bytekid/mkbtt | ruleLabeling.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/confluence/ruleLabeling.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
Destructors... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
402332cb61b3df101f2c58a8694d08bfc61ed59757a5030c693bafc34970cd9e | glondu/belenios | election.mli | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/a1f9e4cc8c9aa823f3d0f9ba1e21b8c700cd5522/src/lib/shell/election.mli | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
5d3119fd67cc052e573ab1c14fcf20e560fdbdd96809b0fc2044414d30e8c9b3 | mkurtak/clj-salt-api | http_test.clj | Copyright ( c )
;; All rights reserved.
(ns salt.http-test
(:require
[clojure.test :refer [deftest is testing]]
[salt.http :as http]))
(deftest parse-body-test
(testing "parse-body"
(is (= ["Error body"]
(http/parse-body {:status 404
:header "This is header"
... | null | https://raw.githubusercontent.com/mkurtak/clj-salt-api/6c6889640c1dc8717f4268202d05d330f6a6d162/test/src/salt/http_test.clj | clojure | All rights reserved. | Copyright ( c )
(ns salt.http-test
(:require
[clojure.test :refer [deftest is testing]]
[salt.http :as http]))
(deftest parse-body-test
(testing "parse-body"
(is (= ["Error body"]
(http/parse-body {:status 404
:header "This is header"
... |
9f6ef7656f167073126b9b4c225f1fc3177397b86f1e3736326a996606108c89 | vlacs/saml20-clj | shared_test.clj | (ns saml20-clj.shared-test
(:require [clojure.test :refer :all]
[saml20-clj.shared :as shared]))
(def arb-str "Th1s 15 50m3 s7r1ng w17h 13773r5 and numb3rs!")
(def arb-xml "<tag1 hasmore=\"1\"><tag2 hasmore=\"1\"><tag3>foobar</tag3></tag2><tag4>inter arma enim silent leges</tag4></tag1>")
(def arb-xml-re... | null | https://raw.githubusercontent.com/vlacs/saml20-clj/ed4f5a99ea34116316d4f1faa8aba2cdc63f708c/test/saml20_clj/shared_test.clj | clojure | (ns saml20-clj.shared-test
(:require [clojure.test :refer :all]
[saml20-clj.shared :as shared]))
(def arb-str "Th1s 15 50m3 s7r1ng w17h 13773r5 and numb3rs!")
(def arb-xml "<tag1 hasmore=\"1\"><tag2 hasmore=\"1\"><tag3>foobar</tag3></tag2><tag4>inter arma enim silent leges</tag4></tag1>")
(def arb-xml-re... | |
c0ebc0e264cb869726943cbba2a6220e6ca808a2777471eb39bf2dcb12f98dca | lispbuilder/lispbuilder | primitives-win32.lisp | ;;;;; A simple example to verify the correctness of the Win32 and OpenRM packages.
Author : ,
;;;;;
(in-package #:rm-examples)
(defun wire-box-example-1 ()
(make-instance 'rm::native-window
:title-caption "Wire Box Example 1" :icon-caption "Wire Box Example 1"
:width 320 :he... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/examples/primitives-win32.lisp | lisp | A simple example to verify the correctness of the Win32 and OpenRM packages.
(rm::c4d 1.0 1.0 0.0 1.0)
Sphere Primitive
Add to scene graph
Default camera and lighting
Show window
Process events
Delete the Scene Graph. Attempt to close stray windows
(defmethod rm::on-mouse-down ((window rm::window) button ... | Author : ,
(in-package #:rm-examples)
(defun wire-box-example-1 ()
(make-instance 'rm::native-window
:title-caption "Wire Box Example 1" :icon-caption "Wire Box Example 1"
:width 320 :height 240)
(let ((box (rm::new-box :type :solid
:rgb/a (rm:c... |
a25de655c04e640fac3facc781157b71e6bd216c9ba89ef546f27d73c688c36d | 7theta/re-frame-via | events.cljs | ;; Copyright (c) 7theta. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-v10.html)
;; which can be found in the LICENSE file at the root of this
;; distribution.
;;
;; By using this software in any fashion, you are agreeing to be bo... | null | https://raw.githubusercontent.com/7theta/re-frame-via/ae530337eff4098991e937d6e06aa413d8ad7b45/example/src/cljs/example/events.cljs | clojure | Copyright (c) 7theta. All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-v10.html)
which can be found in the LICENSE file at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the ... |
(ns example.events
(:require [example.app :refer [app]]
[example.config :refer [config]]
[re-frame-via.fx :as via-fx]
[example.app :refer [app]]
[example.db :as db]
[re-frame.core :refer [reg-event-db reg-event-fx]]))
(via-fx/register (:via.client/server-p... |
7746d436a6fdab37b1a5196d9384fa94c413acefaeed0c6bcb74ca32b157c41a | input-output-hk/cardano-ledger | Generators.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# O... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/3dfed13700815645c3b080452073bd18669a17b9/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/Generators.hs | haskell | # LANGUAGE ConstraintKinds #
------------------------------------------------------------------------------
ShelleyEra Generators
These are generators for roundtrip tests, so the generated values are not
necessarily valid
------------------------------------------------------------------------------ | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
modu... |
123317092d16c09332636fecb288e02041f5a8a9aeeda7a7b0c765fd8d08558f | mirage/irmin | inode.mli |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-pack/inode.mli | ocaml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | |
33e1f8d495ba77e6a77dcc3c7ee8630e7722896ee260bda6dfc9ce7cbb40e573 | asivitz/Hickory | Input.hs | # LANGUAGE DeriveGeneric , OverloadedLabels , StrictData , OverloadedRecordDot #
# LANGUAGE TypeFamilies #
module Hickory.Input where
import Linear (V2(..))
import Hickory.Math.Vector
import qualified Data.HashMap.Strict as HashMap
import Data.Hashable
import GHC.Generics (Generic)
import Control.Lens (over)
import D... | null | https://raw.githubusercontent.com/asivitz/Hickory/e476df26be3492eb8471fd0947bb7c4d904d3076/core/Hickory/Input.hs | haskell | Touch ends (w/ duration)
Touch begins
Touch is moved by user | # LANGUAGE DeriveGeneric , OverloadedLabels , StrictData , OverloadedRecordDot #
# LANGUAGE TypeFamilies #
module Hickory.Input where
import Linear (V2(..))
import Hickory.Math.Vector
import qualified Data.HashMap.Strict as HashMap
import Data.Hashable
import GHC.Generics (Generic)
import Control.Lens (over)
import D... |
cf19e2ebdf52958e8e6a765f3f7fb891aec13b62fc448ced5247f2e4ac634bf6 | caiorss/Functional-Programming | recursion.hs | {-
recursion.hs
Recursive Functions Examples
* -wedel.de/~si/HXmlToolbox/thesis/x298.html
-}
-- Calculate the length of a list
len :: [a] -> Int
len [] = 0
len (_:xs) = 1 + len xs
-- Product of A List
prod :: [Int] -> Int
prod [] = 1
prod (x:xs) = x * prod xs
-- Reverse a L... | null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/codes/recursion.hs | haskell |
recursion.hs
Recursive Functions Examples
* -wedel.de/~si/HXmlToolbox/thesis/x298.html
Calculate the length of a list
Product of A List
Reverse a List
Maximum Element of a list
maxx :: [a] -> a
maxx [x] = x
maxx (x:xs) | x >= maxx(xs) = x | otherwise maxx(xs)
Factorial
Fibbonaci
vect... |
len :: [a] -> Int
len [] = 0
len (_:xs) = 1 + len xs
prod :: [Int] -> Int
prod [] = 1
prod (x:xs) = x * prod xs
reverse2 :: [a] -> [a]
reverse2 [] = []
reverse2 (x:xs) = reverse2 xs ++ [x]
fact 0 = 1
fact n = n*fact(n-1)
fib 0 = 1
fib 1 = 1
fib n | n>= 2
= fib(n-1) + fib(n-2)
da... |
5acb332e97b10e48abbad38fadd66be5b97bbcc0ff278cf7bc3c44eb5f7f58f9 | deadcode/Learning-CL--David-Touretzky | 11.ffo-return-from.lisp | (defun find-first-odd (x)
(format t "~&Searching for an odd number...")
(dolist (element x)
(when (oddp element)
(format t "~&Found ~S." element)
(return-from find-first-odd element)))
(format t "~&None found.")
'none)
(let ((test1 '(find-first-odd '(2 4 6 7 8)))
(test2 '(find-f... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%2011/11.ffo-return-from.lisp | lisp | (defun find-first-odd (x)
(format t "~&Searching for an odd number...")
(dolist (element x)
(when (oddp element)
(format t "~&Found ~S." element)
(return-from find-first-odd element)))
(format t "~&None found.")
'none)
(let ((test1 '(find-first-odd '(2 4 6 7 8)))
(test2 '(find-f... | |
68ab425a48f48bcf09c0c98ef8bf6eb6a7d2516f22e3a00c0d7410900b347270 | spurious/sagittarius-scheme-mirror | mime.scm | ;;; -*- Scheme -*-
;;;
;;; mime.scm - RFC2045 Multipurpose Internet Mail Extensions utilities
;;;
Copyright ( c ) 2009 - 2012 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/mime.scm | scheme | -*- Scheme -*-
mime.scm - RFC2045 Multipurpose Internet Mail Extensions utilities
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
... | Copyright ( c ) 2009 - 2012 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
Ref RFC2045 Multipurpose Internet Mail Ext... |
dc5c168480752d82a56b6025ff6b2871ec2d339a8425df504b4a9dbc31041453 | conreality/conreality | topic.mli | (* This is free and unencumbered software released into the public domain. *)
type t
val separator_string : string
val separator_char : char
val create : string list -> t
val path : t -> string list
val message_type : t -> string
val qos_policy : t -> int
val of_string : string -> t
val to_string : t -> string
| null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/messaging/topic.mli | ocaml | This is free and unencumbered software released into the public domain. |
type t
val separator_string : string
val separator_char : char
val create : string list -> t
val path : t -> string list
val message_type : t -> string
val qos_policy : t -> int
val of_string : string -> t
val to_string : t -> string
|
0013c1e5914beca35b875b48f8414fbb4f3c50deead070877e4a6f3e49136662 | project-oak/hafnium-verification | Buck.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/integration/Buck.mli | ocaml | * Given a list of arguments, stores them in a file if needed and returns the new command line |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
6ae3aa20b29df864ba40ad968585e7a4aba3d7fc3e46c08fc9c7d65208842c20 | kerneis/cpc | machdepenv.ml | open Machdep
module R = Str
module L = List
module H = Hashtbl
let preparse (s:string) : (string, string list) H.t =
let specTable = H.create 32 in
let commaRegexp = R.regexp "," in
let spaceRegexp = R.regexp "[ \t]+" in
let specRegexp = R.regexp "^\\([a-zA-Z_0-9]+\\)[ \t]*=\\(.*\\)$" in
let specs = R.split ... | null | https://raw.githubusercontent.com/kerneis/cpc/0ca695d25e58dadbd92639162338a06a517875d9/src/machdepenv.ml | ocaml | open Machdep
module R = Str
module L = List
module H = Hashtbl
let preparse (s:string) : (string, string list) H.t =
let specTable = H.create 32 in
let commaRegexp = R.regexp "," in
let spaceRegexp = R.regexp "[ \t]+" in
let specRegexp = R.regexp "^\\([a-zA-Z_0-9]+\\)[ \t]*=\\(.*\\)$" in
let specs = R.split ... | |
415e684da5274dca67c0ae341cc5f831d2e36d87d020e8a9f6cfe1492984bfb7 | BinaryAnalysisPlatform/bap | bil_float.mli | Transforms floating - point operations into bitvector operations .
The reason why this module is in BIL is because it is not a theory
but a theory transformer in other words it is not a structure but
a functor that requires other theory . Right now , the other theory
is hardcoded to be the BIL th... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/7031fed8b6d2ce26e6b8186fcf180c72e044d8b6/plugins/bil/bil_float.mli | ocaml | Transforms floating - point operations into bitvector operations .
The reason why this module is in BIL is because it is not a theory
but a theory transformer in other words it is not a structure but
a functor that requires other theory . Right now , the other theory
is hardcoded to be the BIL th... | |
24686311aca2c419bbae48550fbcdff6f1705dd43722d143d9fcb1eaaef3f982 | janegca/htdp2e | Exercise-208-WalkthroughExtract.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-intermediate-reader.ss" "lang")((modname Exercise-208-WalkthroughExtract) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t con... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise-208-WalkthroughExtract.rkt | racket | about the language level of this file in a form that our tools can easily process.
by hand. Show every step.
Answer:
== (cond
[else (cond
== (cond
[#false '()]
[else (cond
== (cond
== (cond
[#false | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname Exercise-208-WalkthroughExtract) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 208 .
Check step 1 of the ... |
c6337c3d42d97e77952c8668378cc47c2de73aaa6f08f1829082b393a670dd0c | vikram/lisplibraries | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
$ Header : /usr / local / cvsrep / url - rewrite / specials.lisp , v 1.8 2006/01/03 18:40:23 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or witho... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/url-rewrite-0.1.1/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | $ Header : /usr / local / cvsrep / url - rewrite / specials.lisp , v 1.8 2006/01/03 18:40:23 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-pa... |
6ede86c0d11d92f01ce5abf8af715be0e16ec1b3094db6dd387bfae57b412f1b | LdBeth/star-lisp | pvars.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : ( * SIM - I COMMON - LISP - GLOBAL ) ; Base : 10 ; Muser : yes -*-
(in-package :*sim-i)
;;;> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
;;;>
;;;> The Thinking Machines *Lisp Simulator is in the public domain.
;;;> ... | null | https://raw.githubusercontent.com/LdBeth/star-lisp/034fb97fe8780d6e9fbff7c1d8c4a6b8c331797b/source/pvars.lisp | lisp | Syntax : COMMON - LISP ; Package : ( * SIM - I COMMON - LISP - GLOBAL ) ; Base : 10 ; Muser : yes -*-
> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
>
> The Thinking Machines *Lisp Simulator is in the public domain.
> You are free to do whatever you like with it, includin... |
(in-package :*sim-i)
The Simulator 's representation of a pvar .
In some CLs , nasty circularities arise because Internal - Pvarp gets declared
inline as being ( Typep Foo ' Pvar ) , which gets optimized into a call to
Internal - Pvarp thanks to the Pvar Deftype . So we define Internal - Pvarp
#+:cor... |
01c0f9651970b6c2afdd3143f66dec623637a99e5ca362d675420f49360ac8cb | sellout/haskerwaul | Left.hs | # language UndecidableInstances
, UndecidableSuperClasses #
, UndecidableSuperClasses #-}
module Haskerwaul.Module.Left
( module Haskerwaul.Module.Left
-- * extended modules
, module Haskerwaul.Group.Abelian
, module Haskerwaul.Ring
) where
import Haskerwaul.Group.Abelian
import Hask... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Module/Left.hs | haskell | * extended modules
-- | Every `CommutativeRig` forms a `Haskerwaul.Module.Module` with itself. | # language UndecidableInstances
, UndecidableSuperClasses #
, UndecidableSuperClasses #-}
module Haskerwaul.Module.Left
( module Haskerwaul.Module.Left
, module Haskerwaul.Group.Abelian
, module Haskerwaul.Ring
) where
import Haskerwaul.Group.Abelian
import Haskerwaul.Ring
class (Ring... |
b6b2acb4eff6b2c77dffe236430c9e085aa1f049345509b6b0ab6cf746dac810 | AccelerateHS/accelerate-cuda | IndexSpace.hs | # LANGUAGE GADTs #
# LANGUAGE ImpredicativeTypes #
# LANGUAGE PatternGuards #
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE ViewPatterns #
-- |
Module : Data . Array . Accelerate . CUDA.CodeGen . IndexSpace
Co... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-cuda/6285f87859788628ce68d1ff76ce7b348f585f9e/Data/Array/Accelerate/CUDA/CodeGen/IndexSpace.hs | haskell | # LANGUAGE QuasiQuotes #
|
License : BSD3
Stability : experimental
Array construction
Permutations
processes multiple elements, striding the array by the grid size.
=> Exp ix -- dimension of the result
-> (Exp ix -> Exp a) -- function t... | # LANGUAGE GADTs #
# LANGUAGE ImpredicativeTypes #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE ViewPatterns #
Module : Data . Array . Accelerate . CUDA.CodeGen . IndexSpace
Copyright : [ 2008 .. 2014 ] ,
... |
1aa203162f8e6c73fc119d451aeed2744c011b401972b896f9f05baef142dce9 | timrichardt/stern-brocot-tree | arithmetic.clj | (ns stern-brocot.arithmetic
(:require [stern-brocot.tree :refer [L R
SSB->Q
Q->SSB
fmt]]
[stern-brocot.bihomographic :refer [bihom]]))
(defn add
"Given two or more lazy sequences of SSB,... | null | https://raw.githubusercontent.com/timrichardt/stern-brocot-tree/b6a641850fa3ebc81a1c0bc307254e565ca54c91/src/stern_brocot/arithmetic.clj | clojure | (ns stern-brocot.arithmetic
(:require [stern-brocot.tree :refer [L R
SSB->Q
Q->SSB
fmt]]
[stern-brocot.bihomographic :refer [bihom]]))
(defn add
"Given two or more lazy sequences of SSB,... | |
50546b8429ee06db48760f9844996c418b21e61047d6659704200fb65192c973 | themetaschemer/malt | autodiff.rkt | #lang racket
(require "autodiff/A-autodiff.rkt")
(require "autodiff/B-prims.rkt")
(require "autodiff/C-dualized-tensor-ops.rkt")
(require "autodiff/D-test-helpers.rkt")
(require "autodiff/E-print.rkt")
(provide dual dual? ρ κ ∇ ∇¹ scalar? trace-print dual* map*)
(provide prim1 prim2 ext1 ext2)
(provide (rename-out (d... | null | https://raw.githubusercontent.com/themetaschemer/malt/9efaf616bc68e62a471e9770e5c8819b748b9bb1/flat-tensors/autodiff.rkt | racket | #lang racket
(require "autodiff/A-autodiff.rkt")
(require "autodiff/B-prims.rkt")
(require "autodiff/C-dualized-tensor-ops.rkt")
(require "autodiff/D-test-helpers.rkt")
(require "autodiff/E-print.rkt")
(provide dual dual? ρ κ ∇ ∇¹ scalar? trace-print dual* map*)
(provide prim1 prim2 ext1 ext2)
(provide (rename-out (d... | |
2a49282ffc72f55185cd96c3a3fd2ed85032398044f12f4b1f8c8c45c7550ac4 | etarasov/iptadmin | AddChainPage.hs |
module IptAdmin.AddChainPage where
import Control.Monad.Error
import Happstack.Server.SimpleHTTP
import IptAdmin.EditChainForm.Parse
import IptAdmin.EditChainForm.Render
import IptAdmin.Render
import IptAdmin.System
import IptAdmin.Types
import IptAdmin.Utils
import Iptables
import Iptables.Types
import Text.ParserCo... | null | https://raw.githubusercontent.com/etarasov/iptadmin/ceaca3424a0b2891da4d5d91eaf516a3566f2885/src/IptAdmin/AddChainPage.hs | haskell | redir $ "/show?table=" ++ tableName ++ bookmarkForJump newChainName' Nothing |
module IptAdmin.AddChainPage where
import Control.Monad.Error
import Happstack.Server.SimpleHTTP
import IptAdmin.EditChainForm.Parse
import IptAdmin.EditChainForm.Render
import IptAdmin.Render
import IptAdmin.System
import IptAdmin.Types
import IptAdmin.Utils
import Iptables
import Iptables.Types
import Text.ParserCo... |
194ba8cdb9d51551df368058b63235f602a31ae80afcf0c7add0a80784181550 | may-liu/qtalk | pubsub_db_odbc.erl | %%% ====================================================================
` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You should have received a copy of the
%%% Erlang Public License ... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/pubsub_db_odbc.erl | erlang | ====================================================================
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the... | ` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Initial Developer of the Original Code is ProcessOne .
Portions created by ProcessOne are C... |
23638ec2239bf26d2b263ffb272c1e9c05d986ab352c16cae3cdf7106b7cae94 | vbmithr/ocaml-bittrex-api | bittrex_async.mli | open Async.Std
include module type of Bittrex_intf
(** Specific modules. *)
module Bitfinex : BITFINEX with type 'a t := 'a Deferred.t
module Bitstamp : BITSTAMP with type 'a t := 'a Deferred.t
module BTCE : BTCE with type 'a t := 'a Deferred.t
module Kraken : KRAKEN with type 'a t := 'a Deferred.t
(** Generic modu... | null | https://raw.githubusercontent.com/vbmithr/ocaml-bittrex-api/1f76a574b71586244fed469cf2e1230797cca3ed/lib/bittrex_async.mli | ocaml | * Specific modules.
* Generic module. Use this when you need to use multiple exchanges
dynamically, for example if you have a program that takes an
exchange name as an argument. | open Async.Std
include module type of Bittrex_intf
module Bitfinex : BITFINEX with type 'a t := 'a Deferred.t
module Bitstamp : BITSTAMP with type 'a t := 'a Deferred.t
module BTCE : BTCE with type 'a t := 'a Deferred.t
module Kraken : KRAKEN with type 'a t := 'a Deferred.t
module Generic : GENERIC with type 'a t ... |
734ee25b72e81160f20017e9010ecd511c641dae26e3413a4f8300b6969395fc | threatgrid/ctia | firehose_event_hook_test.clj | (ns ctia.flows.hooks.firehose-event-hook-test
(:require
[clj-momo.test-helpers.core :as mth]
[clj-momo.test-helpers.http :as http]
[clojure.instant :as instant]
[clojure.string :as string]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.domain.entities :refer [schema-vers... | null | https://raw.githubusercontent.com/threatgrid/ctia/f70ee898556f673073350fd16238261dc1cbf524/test/ctia/flows/hooks/firehose_event_hook_test.clj | clojure | (ns ctia.flows.hooks.firehose-event-hook-test
(:require
[clj-momo.test-helpers.core :as mth]
[clj-momo.test-helpers.http :as http]
[clojure.instant :as instant]
[clojure.string :as string]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.domain.entities :refer [schema-vers... | |
d72546006b68c08d256fc54f51fc1464e2802913cbe37b80bf08a096dcc1d197 | SamB/coq | impargs.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/library/impargs.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Flags governing the computation of... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Util
open Nam... |
daf6003fe8153c1f39069daa34ce408b38afe046951209b6af51344778cf2df4 | tek/polysemy-hasql | Update.hs | module Polysemy.Db.Tree.Partial.Update where
import Generics.SOP (I (I), NP ((:*)), NS (S, Z))
import qualified Polysemy.Db.Data.PartialField as PartialField
import Polysemy.Db.Data.PartialField (PartialField)
import Polysemy.Db.Data.Rep (Auto)
import qualified Polysemy.Db.Kind.Data.Tree as Kind
import Polysemy.Db.Tr... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/c6db0836cc2a76c83d500f249c7c9751af9a94ec/packages/db/lib/Polysemy/Db/Tree/Partial/Update.hs | haskell | module Polysemy.Db.Tree.Partial.Update where
import Generics.SOP (I (I), NP ((:*)), NS (S, Z))
import qualified Polysemy.Db.Data.PartialField as PartialField
import Polysemy.Db.Data.PartialField (PartialField)
import Polysemy.Db.Data.Rep (Auto)
import qualified Polysemy.Db.Kind.Data.Tree as Kind
import Polysemy.Db.Tr... | |
e44feffe630e393b9e96c83ff64322952b0dfdc5a31f43aa8ed35ddc7004c371 | haskell-jp/makeMistakesToLearnHaskell | goal.hs | #!/bin/env stack
stack script --resolver = lts-11.13
--package split
--package containers
stack script --resolver=lts-11.13
--package split
--package containers
-}
import Data.List.Split
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Traversable (for)
impor... | null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/assets/goal.hs | haskell | resolver = lts-11.13
package split
package containers
resolver=lts-11.13
package split
package containers | #!/bin/env stack
-}
import Data.List.Split
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Traversable (for)
import System.Environment (getArgs)
import System.IO (BufferMode(..), hSetBuffering, stdout)
type Entry = (String, Int)
main :: IO ()
main = do
files <- getArgs
entries ... |
f571d49aaa07cb6181651ba89e5cf6f13a1d887b3ea9e612f7c8a57a8263c046 | bitterblue/commonmark-hiccup | core_test.clj | (ns commonmark-hiccup.core-test
(:require [clojure.test :refer :all]
[commonmark-hiccup.core :refer :all]))
(deftest markdown->html-test
(testing "converts a simple string of markdown to html"
(are [md html] (= html (markdown->html md))
"Test. Test." "<p>Test. Test.</p>"
"#... | null | https://raw.githubusercontent.com/bitterblue/commonmark-hiccup/a557fb6c7fa7e4d68b9845627122becf770b1245/test/commonmark_hiccup/core_test.clj | clojure | (ns commonmark-hiccup.core-test
(:require [clojure.test :refer :all]
[commonmark-hiccup.core :refer :all]))
(deftest markdown->html-test
(testing "converts a simple string of markdown to html"
(are [md html] (= html (markdown->html md))
"Test. Test." "<p>Test. Test.</p>"
"#... | |
2aee1086654acdaab79d7a104e4dc46b0ce8948b3282891e9ab3eac90e09c113 | rumblesan/improviz | Materials.hs | module Language.Interpreter.StdLib.Materials
( addMaterialStdLib
) where
import Control.Monad.Except
import Gfx.Context ( setMaterial
, setMaterialVar
)
import Language.... | null | https://raw.githubusercontent.com/rumblesan/improviz/23e16ae7b2d55d2204417ec60c7cb6673a93df7d/src/Language/Interpreter/StdLib/Materials.hs | haskell | module Language.Interpreter.StdLib.Materials
( addMaterialStdLib
) where
import Control.Monad.Except
import Gfx.Context ( setMaterial
, setMaterialVar
)
import Language.... | |
4a3b225bcc4e578fd189325b61a49b1425eaeec8f659cd3f9fc14112fb84c33c | skanev/playground | 46-tests.scm | (require rackunit rackunit/text-ui)
(load "../46.scm")
(define sicp-1.46-tests
(test-suite
"Tests for SICP exercise 1.46"
(check-= (sqrt 9) 3 0.0000001)
(check-= (sqrt 256) 16 0.0000001)
(check-= (fixed-point cos 1.0) 0.739084 0.00001)
))
(run-tests sicp-1.46-tests)
| null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/01/tests/46-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../46.scm")
(define sicp-1.46-tests
(test-suite
"Tests for SICP exercise 1.46"
(check-= (sqrt 9) 3 0.0000001)
(check-= (sqrt 256) 16 0.0000001)
(check-= (fixed-point cos 1.0) 0.739084 0.00001)
))
(run-tests sicp-1.46-tests)
| |
0b92712f49eb6a45a49c1b6fc84e22d4832b0060b72224b3376db154b9e4eceb | benoitc-attic/barrel_tcp | barrel_ssl.erl | %%% -*- erlang -*-
%%%
This file is part of barrel released under the MIT license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2011 - 2012 , < >
-module(barrel_ssl).
-export([name/0,
messages/0,
listen/1, listen/2,
accept/2,
connect/3, connect/4,
recv/3, recv/2,
send/2,
setopts/2,
cont... | null | https://raw.githubusercontent.com/benoitc-attic/barrel_tcp/e689d0f4286b97462e0fda455f87501dc0ef4487/src/barrel_ssl.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc Atoms used to identify messages in {active, once | true} mode.
@doc Listen for connections on the given port number.
@see ssl:listen/2
do we have required options
@doc Accept connections with the given listening socket.
Note that this function does bo... | This file is part of barrel released under the MIT license .
Copyright ( c ) 2011 - 2012 , < >
-module(barrel_ssl).
-export([name/0,
messages/0,
listen/1, listen/2,
accept/2,
connect/3, connect/4,
recv/3, recv/2,
send/2,
setopts/2,
controlling_process/2,
peername/1,
close/1,
sockname/1,
sendfile/2])... |
a5e79aedb43694a86366338e21ce017b37d6d0cdb13ba69f5b9d8cbabe9b97a9 | EveryTian/Haskell-Codewars | Robot.hs | module Robot
( Bearing(East,North,South,West)
, bearing
, coordinates
, mkRobot
, simulate
, turnLeft
, turnRight
) where
data Bearing = North
| East
| South
| West
deriving (Eq, Show)
data Robot = Robot Bearing (Integer, Integer) der... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/robot-simulator/src/Robot.hs | haskell | module Robot
( Bearing(East,North,South,West)
, bearing
, coordinates
, mkRobot
, simulate
, turnLeft
, turnRight
) where
data Bearing = North
| East
| South
| West
deriving (Eq, Show)
data Robot = Robot Bearing (Integer, Integer) der... | |
f91d53c5ce06d58630ecd01a177943cec3d16ced0caf3ff901818b7e2eeec10e | byulparan/cl-collider | server-options.lisp | (in-package :sc)
(defvar *sc-plugin-paths*)
(defstruct server-options
(num-control-bus 16384)
(num-audio-bus 1024)
(num-input-bus 8)
(num-output-bus 8)
(block-size 64)
(hardware-buffer-size 0)
(hardware-samplerate 0)
(num-sample-buffers 1024)
(max-num-nodes 1024)
(max-num-synthdefs 1024)
(realti... | null | https://raw.githubusercontent.com/byulparan/cl-collider/1ad7f59c36acb61987e65973b77c5deb180285b1/server-options.lisp | lisp | (in-package :sc)
(defvar *sc-plugin-paths*)
(defstruct server-options
(num-control-bus 16384)
(num-audio-bus 1024)
(num-input-bus 8)
(num-output-bus 8)
(block-size 64)
(hardware-buffer-size 0)
(hardware-samplerate 0)
(num-sample-buffers 1024)
(max-num-nodes 1024)
(max-num-synthdefs 1024)
(realti... | |
c409c550e1ff1b2592be1e5bffd7a859e49f52b68a70ff7eefb97f5aa00c747a | ethercrow/lightstep-haskell | Timestamp.hs | This file was auto - generated from google / protobuf / timestamp.proto by the proto - lens - protoc program .
# LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies , UndecidableInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , PatternSynonyms , MagicHash , No... | null | https://raw.githubusercontent.com/ethercrow/lightstep-haskell/f447fd37a6c53dcd38c32c53f71a71386f3e425a/gen/Proto/Google/Protobuf/Timestamp.hs | haskell | # OPTIONS_GHC -Wno-unused-imports#
# OPTIONS_GHC -Wno-duplicate-exports# | This file was auto - generated from google / protobuf / timestamp.proto by the proto - lens - protoc program .
# LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies , UndecidableInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , PatternSynonyms , MagicHash , No... |
4bdddf1dc8844bb36debe15e2c14e62c515c841684883d80b498ba38a61b0658 | MassD/99 | p5.ml | (*
Reverse a list. (easy)
OCaml standard library has List.rev but we ask that you reimplement it.
*)
let rev l =
let rec rev' acc = function
| [] -> acc
| hd::tl -> rev' (hd::acc) tl
in
rev' [] l
let l1 = []
let l2 = [1;2;3]
| null | https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/1-28-lists/p5.ml | ocaml |
Reverse a list. (easy)
OCaml standard library has List.rev but we ask that you reimplement it.
|
let rev l =
let rec rev' acc = function
| [] -> acc
| hd::tl -> rev' (hd::acc) tl
in
rev' [] l
let l1 = []
let l2 = [1;2;3]
|
fbfb0d419ceb813e030fdc4bf4ec6f8054d679b6e53bc5ae3ebe7d1d13077a91 | open-telemetry/opentelemetry-erlang | otel_span_utils.erl | %%%------------------------------------------------------------------------
Copyright 2019 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/5f02dfe2cdd6733f2cb5086fcf757ca37eabc2b2/apps/opentelemetry/src/otel_span_utils.erl | erlang | ------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o... | Copyright 2019 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(otel_span_utils).
-export([start_span/5,
end_span/1,
end_span/2]).
-include_lib("opentelemetry_api/include/o... |
7a68ca4aad9c21c575ee0b76b3a8623113ba1e0d8447d52da4b06940c981f4a9 | haroldcarr/learn-haskell-coq-ml-etc | gadt.hs |
# LANGUAGE GADTs , ExistentialQuantification , DataKinds , TypeFamilies , TypeOperators , MultiParamTypeClasses , FlexibleInstances #
import Data.Char
import Debug.Trace
debug = flip trace
data Test a = TI Int | TS String a
data Test' a where
TI' :: Int -> Test' a
TS' :: String -> a -> Test' a
data Te... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/gadts/2013-anton-dergunov-gadts/src/gadt.hs | haskell | locks down return type HERE
dynamic type-checking
right hand side has type Int
note T consed on front and F on end as separators
data List t = Nil | Cons t (List t)
GADT:
note f'
Peano numbers
type encode that map does not change length
note: subtraction done by structural induction
red with only black child... |
# LANGUAGE GADTs , ExistentialQuantification , DataKinds , TypeFamilies , TypeOperators , MultiParamTypeClasses , FlexibleInstances #
import Data.Char
import Debug.Trace
debug = flip trace
data Test a = TI Int | TS String a
data Test' a where
TI' :: Int -> Test' a
TS' :: String -> a -> Test' a
data Te... |
65be23c2d3c8bd5f1256875410c567dfc4263ebac71b78060462cd9152962ce2 | open-telemetry/opentelemetry-erlang | otel_tracer.erl | %%%------------------------------------------------------------------------
Copyright 2019 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/d59fcba9ab325b5fb262f4c1e6be66314300a093/apps/opentelemetry_api/src/otel_tracer.erl | erlang | ------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o... | Copyright 2019 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(otel_tracer).
-export([start_span/3,
start_span/4,
with_span/4,
with_span/5,
non_recording_... |
e1bcff41160efbb91b6a239c9ef5ba7bdd25a07d1c3dbacefb9793663eea8e05 | sdiehl/bulletproofs | Rangeproof.hs | # LANGUAGE NoImplicitPrelude #
In order to get profiling data , we first need to run ( in the parent
-- directory of this file):
--
-- stack build --library-profiling
--
-- then to profile the execution of this module, we run:
--
stack ghc -- -prof -fprof - auto -rtsopts bench / profiling / Rangeproof.hs -o Ra... | null | https://raw.githubusercontent.com/sdiehl/bulletproofs/6cb356a2ad44dea139abb81214f1babab8456b91/bench/profiling/Rangeproof.hs | haskell | directory of this file):
stack build --library-profiling
then to profile the execution of this module, we run:
-prof -fprof - auto -rtsopts bench / profiling / Rangeproof.hs -o Rangeproof
./Rangeproof +RTS -p
and look at the output in the file "Rangeproof.prof" | # LANGUAGE NoImplicitPrelude #
In order to get profiling data , we first need to run ( in the parent
module Main where
import Protolude
import qualified Bulletproofs.RangeProof as RP
import qualified Bulletproofs.Utils as Utils
import qualified Bulletproofs.Fq as Fq
main :: IO ()
main = do
let upperBound = 2 ^... |
2ab0274d2dfdcd1443cbb4907be98e39cd31dbc3440fa85e86c8d6058beb313f | GaloisInc/cryptol | Benchmark.hs | | Simple benchmarking of IO functions .
module Cryptol.Utils.Benchmark
( BenchmarkStats (..)
, benchmark
, secs
) where
import Criterion.Measurement (runBenchmark, secs, threshold)
import Criterion.Measurement.Types
import Data.Int
import qualified Data.Vector ... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/e261894654ceb3736f8de4a671f4cafc38ed6eba/src/Cryptol/Utils/Benchmark.hs | haskell | | Statistics returned by 'benchmark'.
This is extremely crude compared to the full analysis that criterion can do,
but is enough for now.
| Benchmark the application of the given function to the given input and the | | Simple benchmarking of IO functions .
module Cryptol.Utils.Benchmark
( BenchmarkStats (..)
, benchmark
, secs
) where
import Criterion.Measurement (runBenchmark, secs, threshold)
import Criterion.Measurement.Types
import Data.Int
import qualified Data.Vector ... |
c925394048e5730b773eb2e83186f9d39fa89f85b4b7cc9fb3fc114a4d7a0891 | logicmoo/wam_common_lisp | defsys.lsp | Copyright ( c ) 1992 , .
;;;;
;;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
;;;;
;;;;... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/clos/defsys.lsp | lisp |
This program is free software; you can redistribute it and/or
either
See file '../Copyright' for full details.
No recording in distribution
----------------------------------------------------------------------
----------------------------------------------------------------------
file load ... | Copyright ( c ) 1992 , .
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
(in-package 'user)
(defparameter *pathname-types* '("lsp" . "o"))
#+PDE
CLOS
(defparameter
*clos-modules*
'(
(walk () (... |
49d079c4594710ac3a028fe1d4ff3fabcd6ade70877af7dd6aef4dff35c1d543 | rescript-lang/rescript-compiler | lam_pass_exits.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/lam_pass_exits.ml | ocaml | *********************************************************************
OCaml
... | , 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 .
Adapted for Javascript backend : ... |
c9ea0559d656df0a395dc8c12b03f559c35121c526c24b825236bffed75275d4 | incanter/incanter | project.clj | (defproject incanter/incanter-mongodb "1.9.4-SNAPSHOT"
:description "Incanter-mongodb is the MongoDB module of the Incanter project."
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""
:dir "modules/incanter-mongodb"}
:min-lein-version "2.... | null | https://raw.githubusercontent.com/incanter/incanter/e0a03aac237fcc60587278a36bd2e76266fc6356/modules/incanter-mongodb/project.clj | clojure | (defproject incanter/incanter-mongodb "1.9.4-SNAPSHOT"
:description "Incanter-mongodb is the MongoDB module of the Incanter project."
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""
:dir "modules/incanter-mongodb"}
:min-lein-version "2.... | |
fc4e5436c42315758a809dbe60aa27419c2d44f577bf0820ff89b90893e9020e | xldenis/ill | Entail.hs | module Thrill.Infer.Entail where
import Thrill.Prelude
import Control.Monad.State
import qualified Data.Map as M (lookup)
import Thrill.Syntax (QualifiedName)
import Thrill.Syntax.Type
import Thrill.Infer.Monad as M
import Thrill.Infer.Types
imp... | null | https://raw.githubusercontent.com/xldenis/ill/46bb41bf5c82cd6fc4ad6d0d8d33cda9e87a671c/src/Thrill/Infer/Entail.hs | haskell |
maybe [Constraint QualifiedName] ?? | module Thrill.Infer.Entail where
import Thrill.Prelude
import Control.Monad.State
import qualified Data.Map as M (lookup)
import Thrill.Syntax (QualifiedName)
import Thrill.Syntax.Type
import Thrill.Infer.Monad as M
import Thrill.Infer.Types
imp... |
0a944e015f8d7923660e1730b9ebdc428dd0be79580a9ec0f21651a3a383767f | footprintanalytics/footprint-web | case_test.clj | (ns metabase.query-processor-test.case-test
(:require [clojure.test :refer :all]
[metabase.models :refer [Metric Segment]]
[metabase.test :as mt]))
(defn- test-case
[expr]
(some->> (mt/run-mbql-query venues {:aggregation [expr]})
mt/rows
ffirst
double))
(... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/query_processor_test/case_test.clj | clojure | (ns metabase.query-processor-test.case-test
(:require [clojure.test :refer :all]
[metabase.models :refer [Metric Segment]]
[metabase.test :as mt]))
(defn- test-case
[expr]
(some->> (mt/run-mbql-query venues {:aggregation [expr]})
mt/rows
ffirst
double))
(... | |
786b7bb405842e9e9446f022204ee51ae0055993424c3b08a9f1f67aae27a3d8 | gfngfn/Sesterl | intermediateSyntax.ml |
open MyUtil
open Syntax
open Env
type pattern =
| IPUnit
| IPBool of bool
| IPInt of int
| IPBinary of string
| IPChar of Uchar.t
[@printer (fun ppf uchar -> Format.fprintf ppf "IPChar(%a)" pp_uchar uchar)]
| IPVar of local_name
| IPWildCard
| IPListNil
| IP... | null | https://raw.githubusercontent.com/gfngfn/Sesterl/6ffdc27b1fba4f3628e167f186ceeeeefd2388b9/src/intermediateSyntax.ml | ocaml |
open MyUtil
open Syntax
open Env
type pattern =
| IPUnit
| IPBool of bool
| IPInt of int
| IPBinary of string
| IPChar of Uchar.t
[@printer (fun ppf uchar -> Format.fprintf ppf "IPChar(%a)" pp_uchar uchar)]
| IPVar of local_name
| IPWildCard
| IPListNil
| IP... | |
3a3a67760585c08ed4323531eb2d467d28d2fdb3ae3e003bca6c6218d5871492 | xapi-project/xen-api-client | xen_api_metrics.mli |
* Copyright ( C ) 2015 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 fi... | null | https://raw.githubusercontent.com/xapi-project/xen-api-client/f23b43428076e9b9773f27368230102a924b6575/lib/xen_api_metrics.mli | ocaml | * A legend identifies a specific data source.
* Find the data_source record corresponding to a legend. The data source
contains useful information such as the units.
* Points are averaged over an interval and stored in separate 'archives'.
The server will automatically select an interval given a start time ... |
* Copyright ( C ) 2015 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 fi... |
dae416f364429706e092e3e53d441c9dc528e31eb282dd50453d6158227e725f | clojure-emacs/refactor-nrepl | cljcns_same_clj_cljs_cleaned.cljc | (ns cljcns-same-clj-cljs
(:require [clojure.string :as str]))
(str/trim "abc")
| null | https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/8457b0341fdb220d4cba577ed150565e4d103364/test-resources/cljcns_same_clj_cljs_cleaned.cljc | clojure | (ns cljcns-same-clj-cljs
(:require [clojure.string :as str]))
(str/trim "abc")
| |
52ac1e89f9121e8667db3a19c4109c913cf23d3d81cfe7a5d1214deabf72472f | ocurrent/ocaml-docs-ci | o.ml | (** Overrides *)
module OpamPackage = struct
include OpamPackage
let to_yojson t = `String (OpamPackage.to_string t)
let of_yojson = function
| `String str -> (
match OpamPackage.of_string_opt str with
| Some x -> Ok x
| None -> Error "failed to parse version")
| _ -> Error "fai... | null | https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/cb5d4a54a7fd9883aec066b4bd1fcb50ca42e7bc/src/lib/o.ml | ocaml | * Overrides |
module OpamPackage = struct
include OpamPackage
let to_yojson t = `String (OpamPackage.to_string t)
let of_yojson = function
| `String str -> (
match OpamPackage.of_string_opt str with
| Some x -> Ok x
| None -> Error "failed to parse version")
| _ -> Error "failed to parse vers... |
c3eedb5a9ac29d33caf72c40ed03858c9af50ec369f496e8bcecf8cb6621d449 | footprintanalytics/footprint-web | auth.clj | (ns metabase.server.middleware.auth
"Middleware related to enforcing authentication/API keys (when applicable). Unlike most other middleware most of this
is not used as part of the normal `app`; it is instead added selectively to appropriate routes."
(:require [metabase.models.setting :refer [defsetting]]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/server/middleware/auth.clj | clojure | it is instead added selectively to appropriate routes." | (ns metabase.server.middleware.auth
"Middleware related to enforcing authentication/API keys (when applicable). Unlike most other middleware most of this
(:require [metabase.models.setting :refer [defsetting]]
[metabase.server.middleware.util :as mw.util]))
(def ^:private ^:const ^String metabase-api-k... |
6f413dcd5c292bdc9cc00b652d2c3964610a903657bcf02779f612c2518b2f7e | ocaml/ocaml | let_syntax.ml | (* TEST
* expect
*)
let id x = x
let apply x f = f x
let pair x y = x, y
module Id = struct
let (let+) = apply
let (and+) = pair
end;;
[%%expect{|
val id : 'a -> 'a = <fun>
val apply : 'a -> ('a -> 'b) -> 'b = <fun>
val pair : 'a -> 'b -> 'a * 'b = <fun>
module Id :
sig
val ( let+ ) : 'a -> ('a -> '... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/let-syntax/let_syntax.ml | ocaml | TEST
* expect
Test principality using constructor disambiguation |
let id x = x
let apply x f = f x
let pair x y = x, y
module Id = struct
let (let+) = apply
let (and+) = pair
end;;
[%%expect{|
val id : 'a -> 'a = <fun>
val apply : 'a -> ('a -> 'b) -> 'b = <fun>
val pair : 'a -> 'b -> 'a * 'b = <fun>
module Id :
sig
val ( let+ ) : 'a -> ('a -> 'b) -> 'b
val ( and+... |
0755b257985efe8c3143b3416321f33afa044817078a613db66d7cdcbb324bb2 | unclebob/MazeSolver | core.clj | (ns MazeSolver.core
(:import (javax.imageio ImageIO)
(java.io File)))
(defn getPixels [fileName]
(let [file (File. fileName)
img (ImageIO/read file)
h (.getHeight img)
w (.getWidth img)
pixels (for [y (range h)]
(for [x (range w)]
(if (... | null | https://raw.githubusercontent.com/unclebob/MazeSolver/243bc333f13affd21f52a496b023c9b58061670d/src/MazeSolver/core.clj | clojure | (ns MazeSolver.core
(:import (javax.imageio ImageIO)
(java.io File)))
(defn getPixels [fileName]
(let [file (File. fileName)
img (ImageIO/read file)
h (.getHeight img)
w (.getWidth img)
pixels (for [y (range h)]
(for [x (range w)]
(if (... | |
bfe41be9c64c1a6a1650b379658a246efcb153b5f1f6f5703a3d5867cd971b9d | jarmitage/jarmlib | StreamSharedVars.hs | -- Stream shared variables
:{
let setI = streamSetI stream
setF = streamSetF stream
setS = streamSetS stream
setR = streamSetR stream
setB = streamSetB stream
:}
| null | https://raw.githubusercontent.com/jarmitage/jarmlib/853f6d18ab32630397be91ea89846d55e59e3d70/tidal/stream/StreamSharedVars.hs | haskell | Stream shared variables | :{
let setI = streamSetI stream
setF = streamSetF stream
setS = streamSetS stream
setR = streamSetR stream
setB = streamSetB stream
:}
|
899373c40d9c0bcd752c71fa9cade1913841ba6421cc562f2dc55890a3a5eefb | phantomics/seed | package.lisp | package.lisp
(defpackage #:seed.ui-model.stage
(:export #:stage #:stage-control-set)
(:use #:cl #:seed.generate))
| null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.ui-model.stage/package.lisp | lisp | package.lisp
(defpackage #:seed.ui-model.stage
(:export #:stage #:stage-control-set)
(:use #:cl #:seed.generate))
| |
7c5206b41e5e305bdbbdc48658ce06b6bfd6ecd6c355f341921045c734f3c7a6 | bobby/redisconf19-demo | ui.cljs | (ns redis-streams-clj.storefront.ui
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[redis-streams-clj.storefront.ui.events :as events]
[redis-streams-clj.storefront.ui.subs :as subs]
[redis-streams-clj.storefront.ui.views :as views]
[redis... | null | https://raw.githubusercontent.com/bobby/redisconf19-demo/0191ed1cf6a7cdf47037de3e4dd187a5c6a33a36/storefront/src/redis_streams_clj/storefront/ui.cljs | clojure | (ns redis-streams-clj.storefront.ui
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[redis-streams-clj.storefront.ui.events :as events]
[redis-streams-clj.storefront.ui.subs :as subs]
[redis-streams-clj.storefront.ui.views :as views]
[redis... | |
d46b3625ea2ef91fb99c99a08ddc4f3169bb29bdf918b402b0545dcc79029139 | thi-ng/geom | repl.clj | (defn run-all-in-dir
"Loads (and executes) all .clj files in given directory."
[dir]
(doseq [f (filter #(.endsWith (.getName %) ".clj") (file-seq (java.io.File. dir)))]
(load-file (.getAbsolutePath f))))
| null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/examples/repl.clj | clojure | (defn run-all-in-dir
"Loads (and executes) all .clj files in given directory."
[dir]
(doseq [f (filter #(.endsWith (.getName %) ".clj") (file-seq (java.io.File. dir)))]
(load-file (.getAbsolutePath f))))
| |
27e2ad5d97a2957005d6c65ae39c42a09eb6834ed24b165054fc04c538c2c7b1 | melange-re/melange | gpr_3546_test.ml |
type 'a terminal =
| T_error : unit terminal
[@@bs.deriving accessors]
type 'a terminal2 =
| T_error2 : unit terminal2
[@@bs.deriving accessors]
type 'a terminal3 =
| T_error3 : int -> int terminal3
[@@bs.deriving accessors] | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/gpr_3546_test.ml | ocaml |
type 'a terminal =
| T_error : unit terminal
[@@bs.deriving accessors]
type 'a terminal2 =
| T_error2 : unit terminal2
[@@bs.deriving accessors]
type 'a terminal3 =
| T_error3 : int -> int terminal3
[@@bs.deriving accessors] | |
36d9df320732d008250f77a8b001af579e328125ac399cc86f5b125ae13c8323 | soulomoon/haskell-katas | Isogram.hs | module Katas.Isogram where
import Kyu7.Isogram
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "isIsogram" $ do
it "testing 'Dermatoglyphics'" $ shouldBe (isIsogram "Dermatoglyphics") True
it "testing 'moose'" $ shouldBe (isIsogram "moose") False
it "testing 'aba'" $ sho... | null | https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/test/Katas/Isogram.hs | haskell | module Katas.Isogram where
import Kyu7.Isogram
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "isIsogram" $ do
it "testing 'Dermatoglyphics'" $ shouldBe (isIsogram "Dermatoglyphics") True
it "testing 'moose'" $ shouldBe (isIsogram "moose") False
it "testing 'aba'" $ sho... | |
b12d2202f2db1da6b6b5b71ce75b34ccd4b4509f634cef4a8c5d304b7449176f | startalkIM/ejabberd | mod_irc.erl | %%%----------------------------------------------------------------------
%%% File : mod_irc.erl
Author : < >
%%% Purpose : IRC transport
Created : 15 Feb 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
mod... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/mod_irc.erl | erlang | ----------------------------------------------------------------------
File : mod_irc.erl
Purpose : IRC transport
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WAR... | Author : < >
Created : 15 Feb 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
ff0ba4b0e51357add236f996dc901c9930ad0cb539f9ef37603e2d4fcc289614 | thelema/ocaml-community | widget.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/support/widget.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
fa9ca771adc3d4f8d79715ffc90207bb24bde96396f31f77730655b4cabc00ac | erlangonrails/devdb | tx_state.erl | @copyright 2009 , 2010 fuer Informationstechnik Berlin
and onScale solutions GmbH
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 b... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/transactions/tx_state.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | @copyright 2009 , 2010 fuer Informationstechnik Berlin
and onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
The state for a whole transaction in a TM and RTM .
... |
8303bdcaa373b3cfd3c0ebb3b4099a5ab21b87615bbc8a338aed32dc87f8cdea | logseq/logseq | date_picker.cljs | (ns ^:no-doc frontend.ui.date-picker
(:require [cljs-time.core :refer [after? before? day day-of-week days first-day-of-the-month minus month months plus year]]
[cljs-time.format :refer [formatter unparse]]
[frontend.modules.shortcut.core :as shortcut]
[frontend.state :as... | null | https://raw.githubusercontent.com/logseq/logseq/9c7b4ea2016fb28b16ee42a7136c73dd52d8ce4b/src/main/frontend/ui/date_picker.cljs | clojure | Adapted from re-com date-picker
TODO: add left, right, up, down, enter bindings
Loosely based on ideas: -daterangepicker
--- cljs-time facades ------------------------------------------------------
date - a date object that satisfies cljs-time.core/DateTimeProtocol.
period - a period which will be subtracted se... | (ns ^:no-doc frontend.ui.date-picker
(:require [cljs-time.core :refer [after? before? day day-of-week days first-day-of-the-month minus month months plus year]]
[cljs-time.format :refer [formatter unparse]]
[frontend.modules.shortcut.core :as shortcut]
[frontend.state :as... |
4a5748b6b39743dc4cd2df74ca3d3f4a83375002eab6c5e0b60a30966b2e8c76 | basho/casbench | thrift_server.erl | %%
Licensed to the Apache Software Foundation ( ASF ) under one
%% or more contributor license agreements. See the NOTICE file
%% distributed with this work for additional information
%% regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
%% "License"); you ... | null | https://raw.githubusercontent.com/basho/casbench/90ad7bbb2aebef68e1dcb29ecacd353c11e4ccdd/src/thrift_server.erl | erlang |
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 require... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(thrift_server).
-behaviour(gen_server).
-export([start_link/3, stop/1,... |
679361904ea925e37f6f2937d42a0da66609685059edc2c7d82d8f904cc8566b | Armael/ocaml-libudev | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "libudev"
~opams:[Pkg.opam_file "opam" ~lint_deps_excluding:(Some ["ctypes-foreign"])]
~licenses:[]
~change_logs:[]
@@ fun _ ->
Ok [
Pkg.mllib "src/udev.mllib";
Pkg.stublibs "src/dlludev_stubs.so";
Pkg.d... | null | https://raw.githubusercontent.com/Armael/ocaml-libudev/45ee959cfc59c34d6c88f32eb70a3a33463ebbea/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "libudev"
~opams:[Pkg.opam_file "opam" ~lint_deps_excluding:(Some ["ctypes-foreign"])]
~licenses:[]
~change_logs:[]
@@ fun _ ->
Ok [
Pkg.mllib "src/udev.mllib";
Pkg.stublibs "src/dlludev_stubs.so";
Pkg.d... | |
f9d9b3c7173efea9fd62144c2b007005d844390087c0ba0687140f13632e7fb5 | UBTECH-Walker/WalkerSimulationFor2020WAIC | msg_controler_header.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-msg)
;//! \htmlinclude msg_controler_header.msg.html
(cl:defclass <msg_controler_header> (roslisp-msg-protocol:ros-message)
((header
:reader header
:initarg :header
:type std_msgs-msg:Header
:initform (cl:make-instance 'std_msgs-msg:Heade... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/msg_controler_header.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude msg_controler_header.msg.html |
(cl:in-package cruiser_msgs-msg)
(cl:defclass <msg_controler_header> (roslisp-msg-protocol:ros-message)
((header
:reader header
:initarg :header
:type std_msgs-msg:Header
:initform (cl:make-instance 'std_msgs-msg:Header))
(datapacket
:reader datapacket
:initarg :datapacket
:type cl... |
af5810d0cf5332d6efb3725085c99568ce20c09e55b9b33f40d1df56d2bf90ba | davelambert/porky | platform.lisp | -*- package : ; Syntax : Common - lisp ; Base : 10 -*-
;;;
;;;; platform.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
;;; The contents of this file are subject to the NOKOS License Version 1.0a (the
;;; "License"); you may not use this file except ... | null | https://raw.githubusercontent.com/davelambert/porky/44a4ff0e791de23f723bfd93072fcef5f8523c8a/src/platform.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
platform.lisp
--------------------------------------------------------------------------------------
The contents of this file are subject to the NOKOS License Version 1.0a (the
"License"); you may not use this file except in compliance with the License.
WARRANT... |
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights Reserved .
Cont... |
ce1d7625e770558bccd42320103c455a31f78cfb8a88b07ccd0e37cd2bee4ac0 | 2600hz/kazoo | kz_services_ratedecks.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
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 /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_services/src/modules/kz_services_ratedecks.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
------------------------------------------------------------... | ( C ) 2012 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kz_services_ratedecks).
-export([fetch/1]).
-export([id/1]).
-export([name/1]).
-export([ratedecks/0]).
... |
760f39a6352aba80a030f8809183c82ae9659351c993b06c5983dfb314c3fd7e | ndmitchell/record-dot-preprocessor | Both.hs | -- Test for everything that is supported by both the plugin and the preprocessor
import Control.Exception
import Data.Version
import Data.Proxy
import Data.Functor.Identity (Identity(..))
import qualified Data.Kind as T
main :: IO ()
main = test1 >> test2 >> test3 >> test4 >> test5 >> test6 >> test7 >> test8 >> test... | null | https://raw.githubusercontent.com/ndmitchell/record-dot-preprocessor/dbe18356c2fe69c650d1dd86cf01a9803ad47f65/examples/Both.hs | haskell | Test for everything that is supported by both the plugin and the preprocessor
-------------------------------------------------------------------
CHECK THE BASICS WORK
can you deal with multiple alternatives
test expr.lbl
test expr{lbl = val}
(.lbl)
alternatives work
comment here
-------------------------------... |
import Control.Exception
import Data.Version
import Data.Proxy
import Data.Functor.Identity (Identity(..))
import qualified Data.Kind as T
main :: IO ()
main = test1 >> test2 >> test3 >> test4 >> test5 >> test6 >> test7 >> test8 >> test9 >> putStrLn "All worked"
(===) :: (Show a, Eq a) => a -> a -> IO ()
a === b = ... |
34ef67ed79e09852246360b92add1f114f27c9760359258f23fc3808fec4c2a7 | stepcut/plugins | Plugin.hs | module Plugin where
-- user doesn't import the API
-- and provides a polymorphic value
-- import API
-- resource :: Interface
--
-- should pass type check, and dump core
--
resource : : a = > a
import API
resource = Interface { field = 7 :: Num a => a }
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/pdynload/spj4/Plugin.hs | haskell | user doesn't import the API
and provides a polymorphic value
import API
resource :: Interface
should pass type check, and dump core
| module Plugin where
resource : : a = > a
import API
resource = Interface { field = 7 :: Num a => a }
|
38d347bef8477bab6f16f73d7627fd5fbfe3777405b0cc4454a946c86b52ee34 | bdeket/rktsicm | equation-style-unifier.rkt | #lang racket/base
(provide (all-defined-out))
(require (only-in "../rkt/glue.rkt" list-head any))
bdk ; ; start original file
Unifier with segment variables -- GJS -- 1 May 2016
(define (unify t1 t2)
(unify:internal t1 t2 '() (lambda (dict) dict)))
(define (unify:internal t1 t2 dictionary succeed)
(let lp ... | null | https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/general/equation-style-unifier.rkt | racket | ; start original file
Dictionary
Backsubstitute
Syntax | #lang racket/base
(provide (all-defined-out))
(require (only-in "../rkt/glue.rkt" list-head any))
Unifier with segment variables -- GJS -- 1 May 2016
(define (unify t1 t2)
(unify:internal t1 t2 '() (lambda (dict) dict)))
(define (unify:internal t1 t2 dictionary succeed)
(let lp ((xs (list t1)) (ys (list t2... |
9cf049f77afab7aba272ee176109f79aa6e6284e6c7ee11247f626312785b3ec | cbaggers/shipshape | build-it.lisp | ;; usage at shell prompt:
;;
;; cd ~/myproject
;; sbcl --load "build-it.lisp" --name myproject
;;----------------------------------------------------
;; Setup
#-quicklisp (load #P"~/quicklisp/setup.lisp")
(push (merge-pathnames "lib/" *default-pathname-defaults*) asdf:*central-registry*)
#+sbcl
(progn
#+unix(requi... | null | https://raw.githubusercontent.com/cbaggers/shipshape/af0238a267e3f5e8dcd1ab5e41f01594f4360997/build-it.lisp | lisp | usage at shell prompt:
cd ~/myproject
sbcl --load "build-it.lisp" --name myproject
----------------------------------------------------
Setup
----------------------------------------------------
Load Shipshape
----------------------------------------------------
Do it |
#-quicklisp (load #P"~/quicklisp/setup.lisp")
(push (merge-pathnames "lib/" *default-pathname-defaults*) asdf:*central-registry*)
#+sbcl
(progn
#+unix(require 'sb-posix)
(setf sb-impl::*default-external-format* :utf-8))
(asdf:load-system :shipshape :force t)
(shipshape::command-line-invoke)
|
0b5c809abb7cca9b79a258817f6cca4c5ff2813678f2a4fae5c9b4ebe045d3b8 | haskell/alex | NFA.hs | -- -----------------------------------------------------------------------------
--
NFA.hs , part of
--
( c ) 1995 - 2000 , 2003
--
The ` scanner2nfa ' takes a ` Scanner ' ( see the ` RExp ' module ) and
-- generates its equivalent nondeterministic finite automaton. NFAs
are turned into DFAs in the DFA m... | null | https://raw.githubusercontent.com/haskell/alex/68bf35ced87841c43df8e6b4bd887d0a05253af0/src/NFA.hs | haskell | -----------------------------------------------------------------------------
generates its equivalent nondeterministic finite automaton. NFAs
See the chapter on `Finite Automata and Lexical Analysis' in the
dragon book for an excellent overview of the algorithms in this
module.
--------------------------... | NFA.hs , part of
( c ) 1995 - 2000 , 2003
The ` scanner2nfa ' takes a ` Scanner ' ( see the ` RExp ' module ) and
are turned into DFAs in the DFA module .
module NFA where
import AbsSyn
import CharSet
import DFS ( t_close, out )
import Map ( Map )
import qualified Map hiding ( Map )
import Util ( str, sp... |
c2acceaac4331be405d08512b79ed7f16670968d4379d628e148b33942d5d37a | ocurrent/ocluster | ticket.ml | open Capnp_rpc_lwt
type t = Raw.Service.Ticket.t Capability.t
let ( >>!= ) = Lwt_result.bind
let local ~job ~cancel ~release =
let module X = Raw.Service.Ticket in
X.local @@ object
inherit X.service
method job_impl _params release_param_caps =
let open X.Job in
release_param_caps ();
... | null | https://raw.githubusercontent.com/ocurrent/ocluster/5a9c0c2304adb9b786178fadc007e0cfa92a8e08/api/ticket.ml | ocaml | Note: we keep job alive until *after* calling [release]. | open Capnp_rpc_lwt
type t = Raw.Service.Ticket.t Capability.t
let ( >>!= ) = Lwt_result.bind
let local ~job ~cancel ~release =
let module X = Raw.Service.Ticket in
X.local @@ object
inherit X.service
method job_impl _params release_param_caps =
let open X.Job in
release_param_caps ();
... |
3b7acba5298cad44f70156154f91ced5b692f116e721d07e0b4a9977b2d12ae8 | kupl/LearnML | patch.ml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec evalHelper1 (f : exp) : int =
match f with
| Num a -> a
| ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub64/patch.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec evalHelper1 (f : exp) : int =
match f with
| Num a -> a
| ... | |
c16f03d3b8df533a3506b6c8fcdb15e1cc949726538e9f945e7518605eb808a9 | oakmac/cljs-cheatsheet | project.clj | (defproject cljs-cheatsheet "0.1.0"
:description "A ClojureScript Cheatsheet"
:url "-cheatsheet"
:license {:name "MIT License"
:url "-cheatsheet/blob/master/LICENSE.md"
:distribution :repo}
:dependencies
[[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
... | null | https://raw.githubusercontent.com/oakmac/cljs-cheatsheet/a35293373d8dfa05c5d197eee079cdedf9780d8f/project.clj | clojure | (defproject cljs-cheatsheet "0.1.0"
:description "A ClojureScript Cheatsheet"
:url "-cheatsheet"
:license {:name "MIT License"
:url "-cheatsheet/blob/master/LICENSE.md"
:distribution :repo}
:dependencies
[[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
... | |
c6f6162d2a4744392d9368b2cf2c7a4c594b7340b57690bafb3c798a836f2653 | tezos/tezos-mirror | client_commands.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/9cffd5ff04cf3a8fbc055ea4322a773fad184d22/tezt/tests/client_commands.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 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 AN... |
a10ab0c2bf4f00c3c88744c37db4704fcad68cbda4f2f4aa79ef31a2d09f0ea5 | codinuum/cca | ranges.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/common/ranges.ml | ocaml |
DEBUG_MSG "before fuse:\n";
List.iter (fun (st, ed) -> Printf.printf "range: %d-%d\n" st ed) sorted;
DEBUG_MSG "after fuse:\n";
List.iter (fun (st, ed) -> Printf.printf "range: %d-%d\n" st ed) !fused;
of Ranges.c |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... |
0034f092b296b4b3345357e82271b0306c7c524c9a8d9178849788d2091366b0 | clojurewerkz/support | statuses.clj | (ns clojurewerkz.support.http.statuses)
;;
;; API
;;
(defn success?
[^long status]
(<= 200 status 299))
(defn missing?
[^long status]
(= status 404))
(defn conflict?
[^long status]
(= status 409))
(defn redirect?
[^long status]
(<= 300 status 399))
(defn client-error?
[^long status]
(<= 400 s... | null | https://raw.githubusercontent.com/clojurewerkz/support/33d28084829f6ccb6aed870a357fa6b53c57d2cc/src/clojure/clojurewerkz/support/http/statuses.clj | clojure |
API
| (ns clojurewerkz.support.http.statuses)
(defn success?
[^long status]
(<= 200 status 299))
(defn missing?
[^long status]
(= status 404))
(defn conflict?
[^long status]
(= status 409))
(defn redirect?
[^long status]
(<= 300 status 399))
(defn client-error?
[^long status]
(<= 400 status 499))
... |
4c6ae561ca351535a18396cc1845e0b51566810ce612a9f3a1457fecb472342e | chef/chef-server | chef_lucene_tests.erl | Copyright 2015 Chef Server , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or ... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_index/test/chef_lucene_tests.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
entry to specify the provider... | Copyright 2015 Chef Server , 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
-module(chef_lucene_te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.