_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 |
|---|---|---|---|---|---|---|---|---|
0f7e72510e47a8828f1459da291eea934655dc446a605eb46680b25cc279d687 | ngorogiannis/cyclist | seq.mli | * SL sequent , as a pair of SL formulas .
open Lib
open Generic
include BasicType with type t = Form.t * Form.t
val equal_upto_tags : t -> t -> bool
* Like [ equal ] but ignoring LHS tags as well as RHS ones .
val dest :
t -> (Ord_constraints.t * Heap.t) * (Ord_constraints.t * Heap.t)
* If both LHS and RHS are sym... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/seplog/seq.mli | ocaml | * [subsumed (l,r) (l',r')] is true iff both [Form.subsumed l' l] and
[Form.subsumed r r'] are true.
* Like [subsumed] but ignoring all tags. | * SL sequent , as a pair of SL formulas .
open Lib
open Generic
include BasicType with type t = Form.t * Form.t
val equal_upto_tags : t -> t -> bool
* Like [ equal ] but ignoring LHS tags as well as RHS ones .
val dest :
t -> (Ord_constraints.t * Heap.t) * (Ord_constraints.t * Heap.t)
* If both LHS and RHS are sym... |
5c33d0e302baa651551e92ca0e1c5b8e85c2058cec6c632b056b2a58b5d17615 | clojurecup2014/parade-route | map_utils.clj | (ns unity.internal.map-utils
(:require clojure.set))
;;; perhaps this doesn't belong in unity.*, however there are some
;;; missing functions (like submap?) whose absence drives me so
;;; bonkers I'm putting them here anyway.
;;; other ways to do it, should benchmark all of this also could use
;;; transients. most ... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Libraries/unity/internal/map_utils.clj | clojure | perhaps this doesn't belong in unity.*, however there are some
missing functions (like submap?) whose absence drives me so
bonkers I'm putting them here anyway.
other ways to do it, should benchmark all of this also could use
transients. most maps are small tho. hm. how fast is count on
maps? might be some testab... | (ns unity.internal.map-utils
(:require clojure.set))
(defn submap? [m1 m2]
(reduce-kv
(fn [_ k v]
(if (= v (m2 k))
true
(reduced false)))
true
m1)))
(defn supermap? [m1 m2]
(reduce dissoc m key-coll))
(defn difference
([m1] m1)
([m1 m2]
(dissoc-ks (... |
6fc03c857217ee5f4e9f932a8135bc3ece842714e94fd9ae40bc5cc61f90e5c5 | ravichugh/djs | djsDesugar.ml |
open Lang
open LangUtils
module E = Exprjs_syntax
module J = JavaScript_syntax
module L = Lambdajs_syntax
module IdMap = Prelude.IdMap
module IdSet = Prelude.IdSet
module IdSetExt = Prelude.IdSetExt
module StrSet = Utils.StrSet
(***** Check variable scopes **************************************************)
exce... | null | https://raw.githubusercontent.com/ravichugh/djs/c4a13e06adb3e0945f39966523a4d944448c1941/src/djsDesugar.ml | ocaml | **** Check variable scopes *************************************************
shouldn't accumulate lexScope, right?
rkc: not sure if x needs to be added or not
| E.FuncStmtExpr (_, f, _, _) -> IdSet.singleton f
chain scopes together
don't chain scopes together
**** Label munging *****************************... |
open Lang
open LangUtils
module E = Exprjs_syntax
module J = JavaScript_syntax
module L = Lambdajs_syntax
module IdMap = Prelude.IdMap
module IdSet = Prelude.IdSet
module IdSetExt = Prelude.IdSetExt
module StrSet = Utils.StrSet
exception NeedVarLifting of Prelude.id * Prelude.id
exception NeedImplicitGlobal of P... |
4c166f3ac4a71ecf3921a74e2e588bdcd2f029de2593e4ac126bd541424df958 | minoki/haskell-floating-point | NaNSpec.hs | # LANGUAGE HexFloatLiterals #
module NaNSpec where
import Data.Proxy
import Numeric.Floating.IEEE hiding (classify, compareByTotalOrder,
isSignMinus)
import Numeric.Floating.IEEE.NaN
import Test.Hspec
import Test.Hspec.QuickCheck
... | null | https://raw.githubusercontent.com/minoki/haskell-floating-point/7d7bb31bb2b07c637a5eaeda92fc622566e9b141/fp-ieee/test/NaNSpec.hs | haskell | # SPECIALIZE prop_classify :: Proxy Float -> Float -> Property, Proxy Double -> Double -> Property # | # LANGUAGE HexFloatLiterals #
module NaNSpec where
import Data.Proxy
import Numeric.Floating.IEEE hiding (classify, compareByTotalOrder,
isSignMinus)
import Numeric.Floating.IEEE.NaN
import Test.Hspec
import Test.Hspec.QuickCheck
... |
62c62144aaf475ffaa7966cb5131e799d6708d43b4288e8e34c8241147e72def | kawu/nerf | Dict.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Extraction utilities for various dictionary resources.
module NLP.Nerf.Dict
( extractPoliMorf
, extractPNEG
, extractNELexicon
, extractProlexbase
, extractIntTriggers
, extractExtTriggers
, module NLP.Nerf.Dict.Base
) where
import Control.Applicative ((<$>), (<*>))
import qua... | null | https://raw.githubusercontent.com/kawu/nerf/29ad341368d0869a15c205bda40247d9db2fdea8/src/NLP/Nerf/Dict.hs | haskell | # LANGUAGE OverloadedStrings #
| Extraction utilities for various dictionary resources.
| Is it a single word entry?
^ Path to Prolexbase
| Extract internal triggers from PNET dictionary.
^ Path to PNET
| Extract external triggers from PNET dictionary.
^ Path to PNET |
module NLP.Nerf.Dict
( extractPoliMorf
, extractPNEG
, extractNELexicon
, extractProlexbase
, extractIntTriggers
, extractExtTriggers
, module NLP.Nerf.Dict.Base
) where
import Control.Applicative ((<$>), (<*>))
import qualified Data.PoliMorf as Poli
import NLP.Nerf.Dict.Base
import NLP.Nerf.Dict.PNEG (readPNEG)
im... |
df4bb6bcf0c4ba76b9f94aa9851d3ed74fdf8287747a08a507bdf2b75ce9cd04 | amperity/envoy | tools.clj | (ns envoy.tools
"Build tools and tasks for checking the environment."
(:require
[clojure.java.io :as io]
[clojure.set :as set]
[environ.core :as environ]
[envoy.check :refer [behave!]]
[envoy.core :as envoy]
[table.core :refer [table]]))
(defn- print-error
"Gracefully handles a raised ex... | null | https://raw.githubusercontent.com/amperity/envoy/398ce5aae7ba1dafe2098b314c97822e7be7f165/src/envoy/tools.clj | clojure | (ns envoy.tools
"Build tools and tasks for checking the environment."
(:require
[clojure.java.io :as io]
[clojure.set :as set]
[environ.core :as environ]
[envoy.check :refer [behave!]]
[envoy.core :as envoy]
[table.core :refer [table]]))
(defn- print-error
"Gracefully handles a raised ex... | |
8dbb57675a82ce6d8e68023330ae6cba3f259ae787dcc279d77929a0ba268b23 | alura-cursos/clojure-mutabilidade-atomos-e-refs | colecoes.clj | (ns hospital.colecoes
(:use [clojure pprint]))
(defn testa-vetor []
(let [espera [111 222]]
(println espera)
(println (conj espera 333))
(println (conj espera 444))
(println (pop espera))))
(testa-vetor)
(defn testa-lista []
(let [espera '(111 222)]
(println espera)
(println (conj espe... | null | https://raw.githubusercontent.com/alura-cursos/clojure-mutabilidade-atomos-e-refs/18c70bc13862df53377ac607b53b8f210f4239dd/aula2.2/hospital/src/hospital/colecoes.clj | clojure | (println (pop espera)) não rola pop em set | (ns hospital.colecoes
(:use [clojure pprint]))
(defn testa-vetor []
(let [espera [111 222]]
(println espera)
(println (conj espera 333))
(println (conj espera 444))
(println (pop espera))))
(testa-vetor)
(defn testa-lista []
(let [espera '(111 222)]
(println espera)
(println (conj espe... |
445c27eac767f749c2bb702255544392fa68dfa150ac845490a7e414fe73845a | janestreet/bonsai | bonsai_web_ui_file.mli | * An API that allows one to read files from the client 's local disk .
A value of [ type t ] can be created in two ways :
1 . Using the companion library [ Bonsai_web_ui_file_from_web_file ] , which uses the
Web File API to drive [ t ] . Note that the Web File API does not permit the reading of
... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/file/src/bonsai_web_ui_file.mli | ocaml | * Get the contents of the file. For an advanced API that includes e.g. progress on
loading the file, and the ability to abort in-progress reads, see [read] below.
* How many bytes have been loaded so far?
* How many bytes are there to read in total?
* An in-progress file read.
* Gets the result of the read. Wil... | * An API that allows one to read files from the client 's local disk .
A value of [ type t ] can be created in two ways :
1 . Using the companion library [ Bonsai_web_ui_file_from_web_file ] , which uses the
Web File API to drive [ t ] . Note that the Web File API does not permit the reading of
... |
da7ca85ef815fa5174264f835bb3ad4b38bf8d005889c9ea451aa873daad2d9b | ntoronto/pict3d | tags.rkt | #lang typed/racket/base
(require racket/set)
(provide (all-defined-out))
(define-type Tag (U Symbol Integer))
(: tag? (-> Any Boolean : Tag))
(define (tag? v)
(or (symbol? v) (exact-integer? v)))
(define-type Tags (Setof Tag))
(define empty-tags ((inst set Tag)))
(: empty-tags? (-> Tags Boolean))
(define empty... | null | https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/private/engine/scene/tags.rkt | racket | #lang typed/racket/base
(require racket/set)
(provide (all-defined-out))
(define-type Tag (U Symbol Integer))
(: tag? (-> Any Boolean : Tag))
(define (tag? v)
(or (symbol? v) (exact-integer? v)))
(define-type Tags (Setof Tag))
(define empty-tags ((inst set Tag)))
(: empty-tags? (-> Tags Boolean))
(define empty... | |
f667cef2724e6b41900cc8c63acd8a7a8b5b5a74887c2dae13f7c52e822a059c | EwenG/muance | dom.cljs | (ns muance.internal.dom
(:require [muance.diff :as diff]
[goog.object :as o]))
(defn- nil-or-string [v]
(if (nil? v) nil (str v)))
(defn- new-text-vnode [element text]
#js {:typeid 0
:parentVnode diff/*vnode*
:nodeOrCompData element
:text text})
(defn text-node [t]
(let [vnod... | null | https://raw.githubusercontent.com/EwenG/muance/11315603060aa57f8614e8f5fcecefa0cd0db17a/src/muance/internal/dom.cljs | clojure | (ns muance.internal.dom
(:require [muance.diff :as diff]
[goog.object :as o]))
(defn- nil-or-string [v]
(if (nil? v) nil (str v)))
(defn- new-text-vnode [element text]
#js {:typeid 0
:parentVnode diff/*vnode*
:nodeOrCompData element
:text text})
(defn text-node [t]
(let [vnod... | |
ae3bfbb7bce3cf0ef634fa0098bb4eda18303f0c6ff2d3ce8500ff28e1d1ce03 | gregr/racket-misc | maybe.rkt | #lang racket/base
(provide
maybe?
(struct-out nothing)
(struct-out just)
maybe-filter
maybe-fold
maybe-fold1
maybe-from
maybe-iterate
maybe-map
maybe-monad
maybe-or
)
(require
"monad.rkt"
"record.rkt"
racket/function
racket/match
)
(module+ test
(require
rackunit
))
(recor... | null | https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/maybe.rkt | racket | #lang racket/base
(provide
maybe?
(struct-out nothing)
(struct-out just)
maybe-filter
maybe-fold
maybe-fold1
maybe-from
maybe-iterate
maybe-map
maybe-monad
maybe-or
)
(require
"monad.rkt"
"record.rkt"
racket/function
racket/match
)
(module+ test
(require
rackunit
))
(recor... | |
903b285203c8eeadfc090d9b7789c726a203414509017fee6fcd6d0f47e9b556 | khotyn/4clojure-answer | 41-drop-every-nth-item.clj | (fn
[a b]
(letfn
[(step
[a b]
(if
(>= (count a) b)
(concat
(take (- b 1) a)
(step (drop b a) b))
(take (- b 1) a)))]
(step a b)))
| null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/41-drop-every-nth-item.clj | clojure | (fn
[a b]
(letfn
[(step
[a b]
(if
(>= (count a) b)
(concat
(take (- b 1) a)
(step (drop b a) b))
(take (- b 1) a)))]
(step a b)))
| |
4810193cdaccf9bc3c2001930ee1ad49c4190fa2298b75b51202e7aa9f08f7a2 | jaredloomis/andromeda | Glom.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
module Andromeda.Lambda.Glom where
import GHC.Stack (errorWithStackTrace)
import Data.String (IsString(..))
import Andromeda.Lambda.Type
data Glom f a where
UnitG :: Glom f ()
BaseG :: (HasType a, HasGLSL a) => f a -> Glom f a
PairG :: (HasType a, H... | null | https://raw.githubusercontent.com/jaredloomis/andromeda/502dfa6703eca9717c7cde0c93959fa0a83e77ed/src/Andromeda/Lambda/Glom.hs | haskell | # LANGUAGE GADTs #
| A pattern for a Variable. This is how
non-native conglomerate types can be
| A GLSL Variable. | # LANGUAGE ScopedTypeVariables #
module Andromeda.Lambda.Glom where
import GHC.Stack (errorWithStackTrace)
import Data.String (IsString(..))
import Andromeda.Lambda.Type
data Glom f a where
UnitG :: Glom f ()
BaseG :: (HasType a, HasGLSL a) => f a -> Glom f a
PairG :: (HasType a, HasType b, HasGLSL a, Ha... |
52bae65383250340096e7f607123e5b778a4e4feabd57ce3317730d9fbfe80cf | dgtized/shimmers | square_packing.cljs | (ns shimmers.sketches.square-packing
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.algorithm.square-packing :as square]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.common.sequence :as cs]
[shimmers.common.ui.controls :as c... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/square_packing.cljs | clojure | Further Experiments: pack resulting squares with patterns of their own?
Colors and shapes, even tilted or "hand drawn" squares? | (ns shimmers.sketches.square-packing
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.algorithm.square-packing :as square]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.common.sequence :as cs]
[shimmers.common.ui.controls :as c... |
6622919069633e1110723c4d185c8f1b84c7c96c6f54215b8d22b8ad3f538339 | snowdriftcoop/snowdrift | MarkupInstancesSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
module MarkupInstancesSpec where
import Data.Function (on)
import Test.Tasty.HUnit
import Text.Blaze.Html
import Text.Blaze.Html.Renderer.Text
import MarkupInstances ()
import Crowdmatch
shouldBeHtml :: (ToMarkup m) => m -> Html ->... | null | https://raw.githubusercontent.com/snowdriftcoop/snowdrift/a49e2139ce499995a133c4ee2caa05e11332408d/website/test/MarkupInstancesSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # OPTIONS_GHC -fno - warn - missing - signatures #
module MarkupInstancesSpec where
import Data.Function (on)
import Test.Tasty.HUnit
import Text.Blaze.Html
import Text.Blaze.Html.Renderer.Text
import MarkupInstances ()
import Crowdmatch
shouldBeHtml :: (ToMarkup m) => m -> Html -> Assertion
shouldBeHtml actual expe... |
7828982910e32c5539aab73e1c34201d16e1b961332cd1c0ef80bb25d6e17f41 | ghc/testsuite | ins.hs | -- !! TEST OF DEFACTORISATION FOR FUNCTIONS THAT DROP
-- !! POLYMORPHIC VARIABLES
module Test where
data Boolean = FF | TT
data Pair a b = MkPair a b
data LList alpha = Nill | Conss alpha (LList alpha)
data Nat = Zero | Succ Nat
data Tree x = Leaf x | Node (Tree x) (Tree x)
data A a = MkA a (A a)
appe... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/stranal/should_compile/ins.hs | haskell | !! TEST OF DEFACTORISATION FOR FUNCTIONS THAT DROP
!! POLYMORPHIC VARIABLES |
module Test where
data Boolean = FF | TT
data Pair a b = MkPair a b
data LList alpha = Nill | Conss alpha (LList alpha)
data Nat = Zero | Succ Nat
data Tree x = Leaf x | Node (Tree x) (Tree x)
data A a = MkA a (A a)
append :: LList a -> LList a -> LList a
append xs ys = case xs of
Nill -> ys
... |
0a82c1979558491260159d88f770a324c31fe58c41d50a491be32a5b5ef0647c | Frama-C/Frama-C-snapshot | eval_typ.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/utils/eval_typ.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
077bfac80467833b358fdb59c79120f5793e641b1676eb7bdece8fc27ed7dca3 | reiddraper/knockbox | two_phase.clj | ;; -------------------------------------------------------------------
Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
;;
This file is provided to you under the Apache License ,
;; Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtai... | null | https://raw.githubusercontent.com/reiddraper/knockbox/ed22221759d0d3dbe4f1b1f83355e95e945de729/src/knockbox/sets/two_phase.clj | clojure | -------------------------------------------------------------------
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 permission... | Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
(in-ns ... |
119c1d721b63d0695ce4479d409f8d60ac850e5c629a78dfdd93222dd7b79dcf | ghcjs/jsaddle-dom | WaveShaperNode.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.WaveShaperNode
(setCurve, getCurve, setOversample, getOversample,
WaveShaperNode(..), gTypeWaveShaperNode)
... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/WaveShaperNode.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.WaveShaperNode
(setCurve, getCurve, setOversample, getOversample,
WaveShaperNode(..), gTypeWaveShaperNode)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, may... |
db8b391160c4fab7953ce8c28c6df78393b561b6e633fc6987af6dfed1ea4d7f | kowainik/stan | Stan0206.hs | # OPTIONS_GHC -fno - warn - missing - export - lists #
# LANGUAGE ExistentialQuantification #
module Target.AntiPattern.Stan0206 where
data RecordExample a = RecordExample
{ strictField :: !Int
, lazyField :: Int
, lazyVar :: a
}
newtype NewtypeExample1 = NewtypeExample1 Bool
newtype NewtypeExa... | null | https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/target/Target/AntiPattern/Stan0206.hs | haskell | # OPTIONS_GHC -fno - warn - missing - export - lists #
# LANGUAGE ExistentialQuantification #
module Target.AntiPattern.Stan0206 where
data RecordExample a = RecordExample
{ strictField :: !Int
, lazyField :: Int
, lazyVar :: a
}
newtype NewtypeExample1 = NewtypeExample1 Bool
newtype NewtypeExa... | |
f7d5eecfd3fb6fa6be18ebeb46a88ab1ab978954289281443a8a08f594a96d94 | danehuang/augurv2 | CgLowMM.hs |
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agreed to in writing , software
- distributed... | null | https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/Low/CgLowMM.hs | haskell | --------------------------------------------------------------------
---------------------------------
== Types and operations
---------------------------------
== Transformations
---------------------------------
== Top-level |
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agreed to in writing , software
- distributed... |
6eeb5e13f36c2c20b988f9ae65299f324d677635505821913c9db4bc2a12c6b8 | fare/lisp-interface-library | empty.lisp | ;;;;; Pure types with empty objects
(uiop:define-package :lil/pure/empty
(:use :closer-common-lisp
:lil/core)
(:use-reexport
:lil/interface/empty)
(:export
#:<empty!able> #:empty!))
(in-package :lil/pure/empty)
(define-interface <empty!able> (<emptyable>) ()
(:generic> empty! (ignored) (:in 1)
... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/pure/empty.lisp | lisp | Pure types with empty objects |
(uiop:define-package :lil/pure/empty
(:use :closer-common-lisp
:lil/core)
(:use-reexport
:lil/interface/empty)
(:export
#:<empty!able> #:empty!))
(in-package :lil/pure/empty)
(define-interface <empty!able> (<emptyable>) ()
(:generic> empty! (ignored) (:in 1)
(:values empty) (:out 0)
(:me... |
28dd161a1712621caa41a6dc9d4c26b1cb5b8860fb45dab2f1f795e737ee6a50 | funimagej/fun.imagej | moire_.clj | @Integer(label="Num steps " ) num - steps
; @Float(label="Angle (degree)") angle
(require '[fun.imagej.imp :as ij1])
(def imp (ij.IJ/createImage "Moire" "8-bit black" 500 500 1))
( ij . / run imp " Add Noise " " " )
(ij.IJ/run imp "Salt and Pepper" "")
(ij.IJ/run imp "8-bit" "")
(ij.IJ/setAutoThreshold imp, ... | null | https://raw.githubusercontent.com/funimagej/fun.imagej/dcbe14581ba9394d8ecc6e254e02fac8130a942d/src/plugins/Scripts/Plugins/FunImageJ/Experimental/moire_.clj | clojure | @Float(label="Angle (degree)") angle
@ImagePlus(label="Target image",description="Input image (will be binarized)") imp | @Integer(label="Num steps " ) num - steps
(require '[fun.imagej.imp :as ij1])
(def imp (ij.IJ/createImage "Moire" "8-bit black" 500 500 1))
( ij . / run imp " Add Noise " " " )
(ij.IJ/run imp "Salt and Pepper" "")
(ij.IJ/run imp "8-bit" "")
(ij.IJ/setAutoThreshold imp, "Default dark")
(ij.IJ/run imp "Convert... |
db744232fe093729a9e443d3eb94abbf05649145c4940643d9f40d4a27d1b450 | sile/jsone | jsone_encode.erl | %%% @doc JSON encoding module
@private
%%% @end
%%%
Copyright ( c ) 2013 - 2016 , < >
%%%
%%% The MIT License
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Software without restrictio... | null | https://raw.githubusercontent.com/sile/jsone/af04fd469ae6cffe86a45d9ca62042321ee88103/src/jsone_encode.erl | erlang | @doc JSON encoding module
@end
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the... | @private
Copyright ( c ) 2013 - 2016 , < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY... |
50bb30df1cb0ec7f25cb6dd5712a00560ae4ea106c4e72b1361876a1b1776539 | ocurrent/clarke | calc.ml | open Clarke
open Eio
open Cmdliner
let data_file_term =
Arg.required
@@ Arg.opt Arg.(some string) None
@@ Arg.info ~doc:"A file containing JSON values" [ "data" ]
let msg_err = function Error (`Msg s) -> Error s | Ok _ as v -> v
let cmd setup_log fs =
let main () file =
Path.(with_open_in (fs / file)) @@... | null | https://raw.githubusercontent.com/ocurrent/clarke/521ec17a6c5d9333b7495561a77505adf7e03a0a/src/bin/calc.ml | ocaml | open Clarke
open Eio
open Cmdliner
let data_file_term =
Arg.required
@@ Arg.opt Arg.(some string) None
@@ Arg.info ~doc:"A file containing JSON values" [ "data" ]
let msg_err = function Error (`Msg s) -> Error s | Ok _ as v -> v
let cmd setup_log fs =
let main () file =
Path.(with_open_in (fs / file)) @@... | |
d1539d74c477a95e55e9d97f7b135e8ee65bca753f19f162d21e768a00cda1c9 | google/orthotope | RankedS.hs | Copyright 2020 Google LLC
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distributed un... | null | https://raw.githubusercontent.com/google/orthotope/8b11f152670ecbb34c6bd4055ee022484e3cbfbe/Data/Array/Internal/RankedS.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2020 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE FlexibleContexts #
# L... |
2fed108567fc499005e3579d88019384e04c4b8545fc6e5d99d45eb4fedc19d2 | janestreet/email_message | bigstring_shared.mli | open! Core
(** Immutable sequences of bytes which can be windowed efficiently. *)
type t = private Bigstring.t [@@deriving sexp_of, compare, hash]
val of_bigstring : Bigstring.t -> t
val to_bigstring : t -> Bigstring.t
include Stringable.S with type t := t
include String_monoidable.S with type t := t
val to_lexbuf ... | null | https://raw.githubusercontent.com/janestreet/email_message/2ac874947fecf8da4d5ae8ee934d829bf6e3bc44/src/bigstring_shared.mli | ocaml | * Immutable sequences of bytes which can be windowed efficiently. | open! Core
type t = private Bigstring.t [@@deriving sexp_of, compare, hash]
val of_bigstring : Bigstring.t -> t
val to_bigstring : t -> Bigstring.t
include Stringable.S with type t := t
include String_monoidable.S with type t := t
val to_lexbuf : t -> Lexing.lexbuf
* Empty , immutable
val empty : t
val length : ... |
b94e099dec366feb1f56b7490c78d30a921b972f6eb3653a4a45001d743044b3 | grin-compiler/ghc-wpc-sample-programs | DataOpts.hs | |
Module : . DataOpts
Description : Optimisations for code i.e. Forcing , detagging and collapsing .
License : : The Idris Community .
Module : Idris.DataOpts
Description : Optimisations for Idris code i.e. Forcing, detagging and collapsing.
License : BSD3
Maintainer : The Idris Co... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/DataOpts.hs | haskell | Term is for run time optimisation (after type checking, collapsing allowed)
Compile time: no collapsing
Run-time: do everything
Nat special cases | |
Module : . DataOpts
Description : Optimisations for code i.e. Forcing , detagging and collapsing .
License : : The Idris Community .
Module : Idris.DataOpts
Description : Optimisations for Idris code i.e. Forcing, detagging and collapsing.
License : BSD3
Maintainer : The Idris Co... |
33a0be186b9bb3346dda8dd18992227dcce826c17c2a20afdb9a69259382d892 | ralsei/sawzall | constructors.rkt | #lang racket/base
(require (for-syntax racket/base
racket/sequence)
data-frame
syntax/parse/define)
(provide column-df row-df)
(begin-for-syntax
(define-syntax-class column-spec
[pattern col:id
#:with name #'(symbol->string 'col)]
[pattern col
... | null | https://raw.githubusercontent.com/ralsei/sawzall/61f147cd523466b74422c3990fd95cd6ead64559/sawzall-lib/constructors.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/sequence)
data-frame
syntax/parse/define)
(provide column-df row-df)
(begin-for-syntax
(define-syntax-class column-spec
[pattern col:id
#:with name #'(symbol->string 'col)]
[pattern col
... | |
8e877b04b168f5d87ed95bdf2a4b6790b8ec73a2acfab21341bdc321347355d3 | 8c6794b6/haskell-sc-scratch | FromLily.hs | # LANGUAGE NoMonomorphismRestriction #
------------------------------------------------------------------------------
-- | Trying to read midi file created by lilypond and convert it to
data which is sequentially playable by .
--
module Scratch.MIDI.FromLily where
import Control.Applicative
import Control.Arrow
im... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/MIDI/FromLily.hs | haskell | ----------------------------------------------------------------------------
| Trying to read midi file created by lilypond and convert it to
| MIDI file created by lilypond.
| Extracts the track from midi file.
| Extract pitch and velocity from midi event.
| Plays single track midi file with percussive synthdef.... | # LANGUAGE NoMonomorphismRestriction #
data which is sequentially playable by .
module Scratch.MIDI.FromLily where
import Control.Applicative
import Control.Arrow
import Control.Monad (join)
import Data.Maybe
import qualified Data.EventList.Relative.TimeBody as TimeBody
import qualified Numeric.NonNegative.Class ... |
4f4f86bc77d052aed4174a9040b63d5ad6241a3255451816ffd88ad3e67e3e5b | spartango/CS153 | cish.ml | open Ast
open Eval
This magic is used to glue the generated lexer and parser together .
* Expect one command - line argument , a file to parse .
* You do not need to understand this interaction with the system .
* Expect one command-line argument, a file to parse.
* You do not need to understand this interac... | null | https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps3/cish.ml | ocaml | Usage ps4 [file-to-compile] | open Ast
open Eval
This magic is used to glue the generated lexer and parser together .
* Expect one command - line argument , a file to parse .
* You do not need to understand this interaction with the system .
* Expect one command-line argument, a file to parse.
* You do not need to understand this interac... |
a54156fa1ce8363af1bb3799ddb344024aea86f0361842cea97eb559d2986310 | weblocks-framework/weblocks-stores | store-api.lisp |
(in-package :weblocks-stores)
(export '(open-store close-store clean-store *default-store*
begin-transaction commit-transaction rollback-transaction
dynamic-transaction use-dynamic-transaction-p
persist-object delete-persistent-object
delete-persistent-object-by-id find-persist... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks-stores/4231ae1f99b991b35b782c5eeeb7b775c62b9574/src/store/store-api.lisp | lisp | Store initialization and finalization
Transactions
Creating and deleting persistent objects
Querying persistent objects
Scaffold utilities |
(in-package :weblocks-stores)
(export '(open-store close-store clean-store *default-store*
begin-transaction commit-transaction rollback-transaction
dynamic-transaction use-dynamic-transaction-p
persist-object delete-persistent-object
delete-persistent-object-by-id find-persist... |
cabd48571858b414ad88d66d751d9014861213428b7c1535332019b495a0eeb3 | evincarofautumn/hap-hs | Errors.hs | {-# LANGUAGE GADTs #-}
module Hap.Runtime.Errors
( Cycle(..)
) where
import Control.Exception (Exception)
import Data.Typeable (Typeable)
import Hap.Runtime.Types
--------------------------------------------------------------------------------
-- Types
------------------------------------------------------------... | null | https://raw.githubusercontent.com/evincarofautumn/hap-hs/6b70df6345e54785cbde345c1fdd65e6aa649efe/lib/Hap/Runtime/Errors.hs | haskell | # LANGUAGE GADTs #
------------------------------------------------------------------------------
Types
------------------------------------------------------------------------------
The exception raised when a dependency cycle is detected.
-----------------------------------------------------------------------------... |
module Hap.Runtime.Errors
( Cycle(..)
) where
import Control.Exception (Exception)
import Data.Typeable (Typeable)
import Hap.Runtime.Types
data Cycle where
Cycle :: !(SomeCell m) -> Cycle
deriving (Typeable)
instance Exception Cycle
instance Show Cycle where
show (Cycle cell) = concat
[ "circular ... |
491b988c5dbb6b8ae18b37516f514ebd6d34a40d35d6f7d1d808b4a75576e8cc | jaked/froc | talk.ml | module D = Dom
module F = Froc
module Fd = Froc_dom
module Fda = Froc_dom_anim
open Ocamljs.Inline
let (|>) x f = f x
DEFINE DEBUG
IFDEF DEBUG
THEN
class type console =
object
method log : string -> unit
end
let console = (Ocamljs.var "console" : console)
ENDIF
module Util =
struct
let findi arr p =
let le... | null | https://raw.githubusercontent.com/jaked/froc/6068a1fab883ed9254bfeb53a1f9c15e8af0bb20/examples/froc-dom/talk/talk.ml | ocaml |
the merge below reports only the leftmost simultaneous event,
so we have to account for the combination to avoid losing the
ball in the corners. is there a more compositional way?
bounce v off the tangent to the paddle
track page history
show only the current page
elapsed ... | module D = Dom
module F = Froc
module Fd = Froc_dom
module Fda = Froc_dom_anim
open Ocamljs.Inline
let (|>) x f = f x
DEFINE DEBUG
IFDEF DEBUG
THEN
class type console =
object
method log : string -> unit
end
let console = (Ocamljs.var "console" : console)
ENDIF
module Util =
struct
let findi arr p =
let le... |
6ab1aaaa8395145ff6ea2ad269d791a26f4f61f1818be45833bec06ed86602ba | jwiegley/notes | RegAlloc.hs | determineLiveIntervals :: Procedure a IRVar -> S.Set LiveInterval
determineLiveIntervals p0
= S.fromList
$ Map.elems
$ foldl' go Map.empty
$ zip [1..]
$ foldGraphNodes collect (procBody p0) []
where
collect node rest =
execWriter (traverseIRInstr (tell . (:[])) (node^.nodeIRInstr)) ++ ... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/e132e5d65732d7e69653/RegAlloc.hs | haskell | determineLiveIntervals :: Procedure a IRVar -> S.Set LiveInterval
determineLiveIntervals p0
= S.fromList
$ Map.elems
$ foldl' go Map.empty
$ zip [1..]
$ foldGraphNodes collect (procBody p0) []
where
collect node rest =
execWriter (traverseIRInstr (tell . (:[])) (node^.nodeIRInstr)) ++ ... | |
9e636a8de2971c5c46748ed5ebeb15d27038175a4223dabf6ef32dda9fc02705 | goldfirere/th-desugar | OSet.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFoldable #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-----------------------------------------------------------------------------
-- |
Module : Language . . TH.Desugar . OSet
... | null | https://raw.githubusercontent.com/goldfirere/th-desugar/d87ea5678dfd6726a0776db71468dbd97dda2985/Language/Haskell/TH/Desugar/OSet.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
also remembers the order that values were inserted.
that assumes left-biased indices everywhere.
---------... | # LANGUAGE CPP #
# LANGUAGE DeriveFoldable #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Module : Language . . TH.Desugar . OSet
Copyright : ( C ) 2016 - 2018 , 2019
Maintainer :
An ' OSet ' behaves much like a ' S.Set ' , with ... |
dbdd68d8b60d1609f44502d68f618b3d53ddc678189ecb7c631465af346e2be0 | herd/herdtools7 | archExtra_gen.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/0b4e2c864620e602695648d13e9f011ae6be965c/gen/archExtra_gen.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
89dd76c214d34b1c82124ef0f4d5780e09be18372a22662605b4699fc949204b | johnwayner/lein-datomic | datomic.clj | (ns leiningen.datomic
(:require [conch.core :as sh])
(:use [leinjacker.eval :only (eval-in-project)])
(:import java.io.File))
(defn start
"Start a Datomic instance as specified in project.clj."
[root {:keys [install-location config db-uri test-data]}]
(if config
(let [p (sh/proc "bin/transactor" (str... | null | https://raw.githubusercontent.com/johnwayner/lein-datomic/c2eaa384f45ea5020a82f3318785cfd17affb442/src/leiningen/datomic.clj | clojure | calls spin up threads that are preventing
the process from ending on its own. | (ns leiningen.datomic
(:require [conch.core :as sh])
(:use [leinjacker.eval :only (eval-in-project)])
(:import java.io.File))
(defn start
"Start a Datomic instance as specified in project.clj."
[root {:keys [install-location config db-uri test-data]}]
(if config
(let [p (sh/proc "bin/transactor" (str... |
3697d92fbf5ae7c51674091e4c7df7c0ba1157ad58336e0c03c13815beaae72c | srid/zulip-archive | Main.hs | # LANGUAGE BlockArguments #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGU... | null | https://raw.githubusercontent.com/srid/zulip-archive/2d58b95cc70951cc0b5f52ec08416922ee6d7ce6/src/Main.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Route represents the route for each generated static page.
| Periodically trigger site generation
`generateSite`
| Shake action for generating the static site
Fetch (and/or load from cache) all zulip data
Write an index.html linking ... | # LANGUAGE BlockArguments #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
module Main where
import Clay (Css, em... |
c196086f55aecb37bb582fdfddea1996a78a8e9568559c62febb4d33f8f41a1c | davazp/cl-icalendar | package.lisp | package.lisp
;;
Copyrigth ( C ) 2010
;;
This file is part of cl - icalendar .
;;
;; cl-icalendar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your option... | null | https://raw.githubusercontent.com/davazp/cl-icalendar/b5295ac245f5d333fa593352039ca4fd6a52a058/package.lisp | lisp |
cl-icalendar is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-icalendar 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 Publ... | package.lisp
Copyrigth ( C ) 2010
This file is part of cl - icalendar .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(defpackage :cl-icalendar
(... |
dc53ebe481b31c3070ca4daa39ed18a9d8fc7e2e26139925d53d9a1a626df996 | ammarhakim/gkylcas | basisSer1x2v.lisp | ;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima)
(DSKSETQ |$varsC| '((MLIST SIMP) $X))
(ADD2LNC '|$varsC| $VALUES)
(DSKSETQ |$varsP| '((MLIST SIMP) $X $VX $VY))
(ADD2LNC '|$varsP| $VALUES)
(DSKSETQ |$basisC|
'((MLIST SIMP
(10.
"/Users/JunoRavin/gkyl... | null | https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g2/basis-precalc/basisSer1x2v.lisp | lisp | -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- | (in-package :maxima)
(DSKSETQ |$varsC| '((MLIST SIMP) $X))
(ADD2LNC '|$varsC| $VALUES)
(DSKSETQ |$varsP| '((MLIST SIMP) $X $VX $VY))
(ADD2LNC '|$varsP| $VALUES)
(DSKSETQ |$basisC|
'((MLIST SIMP
(10.
"/Users/JunoRavin/gkyl/cas-scripts/basis-precalc/basis-pre-calc.mac"
S... |
d8eae4b723bc4a584e54807e22d457a3107437abba7e13f7d1f84827eb508d78 | brendanhay/gogol | DeleteProject.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-serviceconsumermanagement/gen/Gogol/ServiceConsumerManagement/Services/TenancyUnits/DeleteProject.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Deletes the specified project resource identified by a tenant resource tag. The mothod removes a project lien with a \'TenantManager\' origin if that was added. It will then attempt to delete the project. If that operation fails, ... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
4fd7f39b364677b7c78c1a32355057cff3f62d5387899208b468cec012d1c3fc | rudymatela/speculate | tauts.hs | # LANGUAGE TemplateHaskell #
for GHC < 7.10
import Test.Speculate hiding (Name(..))
import qualified Test.Speculate as S
import Taut hiding (main)
deriveListable ''Name
deriveListable ''Prop
deriving instance Typeable Name
deriving instance Typeable Prop
prop :: Prop
prop = undefined
name :: Name
name = undefined... | null | https://raw.githubusercontent.com/rudymatela/speculate/a531e55fce64b6569c0de57dddd90b35854b82b8/eg/tauts.hs | haskell | # LANGUAGE TemplateHaskell #
for GHC < 7.10
import Test.Speculate hiding (Name(..))
import qualified Test.Speculate as S
import Taut hiding (main)
deriveListable ''Name
deriveListable ''Prop
deriving instance Typeable Name
deriving instance Typeable Prop
prop :: Prop
prop = undefined
name :: Name
name = undefined... | |
841c4c08ef5668c3c52f7f7f810b7dfdbb6c51d4ea2371d5cc65f3a3969aef97 | austinhaas/kanren | case_inf.clj | (ns pettomato.kanren.cKanren.case-inf
(:require
[pettomato.kanren.cKanren.streams :refer [mzero? unit?]]))
(defmacro case-inf
[e _ e0 [f'] e1 [a'] e2 [a f] e3]
`(let [a# ~e]
(cond
(mzero? a#) ~e0
(delay? a#) (let [~f' a#] ~e1)
(unit? a#) (let [~a' a#] ~e2)
:else (let [[~a ~... | null | https://raw.githubusercontent.com/austinhaas/kanren/f55b68279ade01dbaae67a074ea3441370a27f9e/src/pettomato/kanren/cKanren/case_inf.clj | clojure | (ns pettomato.kanren.cKanren.case-inf
(:require
[pettomato.kanren.cKanren.streams :refer [mzero? unit?]]))
(defmacro case-inf
[e _ e0 [f'] e1 [a'] e2 [a f] e3]
`(let [a# ~e]
(cond
(mzero? a#) ~e0
(delay? a#) (let [~f' a#] ~e1)
(unit? a#) (let [~a' a#] ~e2)
:else (let [[~a ~... | |
a222619687514b08ef0ea96f4f21aaf5b575e7cfe1b3686e1c687d6dca870fe2 | freizl/dive-into-haskell | report2.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Maybe
import Data.List
import qualified Data.Map as Map
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Project
main :: IO ()
main = do
cdb <- initCustDB
odb <- initOrderDB
sdb <- initSalesDB
report2 cdb odb sdb
repo... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/problems/reports/src/report2.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import Data.Maybe
import Data.List
import qualified Data.Map as Map
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Project
main :: IO ()
main = do
cdb <- initCustDB
odb <- initOrderDB
sdb <- initSalesDB
report2 cdb odb sdb
report2 :: CustDB -> OrderDB -> SalesDB... |
3eb9c36a355847a0948ec82710f33b5c7336773830ad50e06c9c5d1a99a104ae | uw-unsat/serval | arm.rkt | #lang racket/base
(require ffi/unsafe)
(provide (all-defined-out))
(require "const/arm.rkt"
"engine.rkt")
(struct arm-engine (ptr mode)
#:methods gen:engine
[(define (engine-ptr engine)
(arm-engine-ptr engine))
(define (engine-reg-enum engine)
_uc_arm_reg)
(define (engine-reg-type engin... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/unicorn/arm.rkt | racket | #lang racket/base
(require ffi/unsafe)
(provide (all-defined-out))
(require "const/arm.rkt"
"engine.rkt")
(struct arm-engine (ptr mode)
#:methods gen:engine
[(define (engine-ptr engine)
(arm-engine-ptr engine))
(define (engine-reg-enum engine)
_uc_arm_reg)
(define (engine-reg-type engin... | |
aeae11b78db3d08983c2e954d63ee499f83be7f9cb43f16a4cf081ef99b5b941 | ejlilley/AbstractMusic | per-tonos.hs | module Main where
import LilyParse
import Text.Parsec.String
import LilyConvert
import System.IO
import Control.Monad
import System.Environment
import System.Exit
import System.Console.GetOpt
import Music (mapMusic, mapPhrase, noteToSound, Metronome(..), apTran, Music(..), dropPhraseEnd)
import Tuning
import Sho... | null | https://raw.githubusercontent.com/ejlilley/AbstractMusic/815ab33ee204dd3ebf29076bde330bfdf6938677/per-tonos.hs | haskell | playCsound harpsichord m | module Main where
import LilyParse
import Text.Parsec.String
import LilyConvert
import System.IO
import Control.Monad
import System.Environment
import System.Exit
import System.Console.GetOpt
import Music (mapMusic, mapPhrase, noteToSound, Metronome(..), apTran, Music(..), dropPhraseEnd)
import Tuning
import Sho... |
45966122cb3c2372542de871105be2d24978ef623bcf0cd8c57cbf4932f16167 | cfpb/qu | static.clj | (ns qu.generate.static
(:require [clojure.java.io :as io]
[me.raynes.fs :as fs]))
(defn -main
[& args]
(let [resource-dir (fs/file (io/resource "static/"))
out-dir (if-let [path (first args)]
(fs/file path)
(fs/file "resources/static"))]
(when (fs/exis... | null | https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/src/qu/generate/static.clj | clojure | (ns qu.generate.static
(:require [clojure.java.io :as io]
[me.raynes.fs :as fs]))
(defn -main
[& args]
(let [resource-dir (fs/file (io/resource "static/"))
out-dir (if-let [path (first args)]
(fs/file path)
(fs/file "resources/static"))]
(when (fs/exis... | |
0260bcc2a30a3a36a6c2a18370858ec053608d6d75c015e494829df7dd03e25e | smallhadroncollider/brok | DB.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Brok.IO.DB
( getCached
, setCached
) where
import ClassyPrelude
import Data.Either (fromRight)
import Data.Time.Clock.POSIX (getPOSIXTime)
import System.Directory (doesFileExist)
import Brok.Parser.DB (db)
import ... | null | https://raw.githubusercontent.com/smallhadroncollider/brok/bf62288d913af5fc694e683cc247f66426025400/src/Brok/IO/DB.hs | haskell | # LANGUAGE OverloadedStrings #
time stuff
write db
read db | # LANGUAGE NoImplicitPrelude #
module Brok.IO.DB
( getCached
, setCached
) where
import ClassyPrelude
import Data.Either (fromRight)
import Data.Time.Clock.POSIX (getPOSIXTime)
import System.Directory (doesFileExist)
import Brok.Parser.DB (db)
import Brok.Types.Brok (Brok, appConfig)... |
e53b17f3f0f5cd4b32a2f97becf8805dec506897bb8f94e4388248e75c86d57a | protz/mezzo | MzMap.mli | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/lib/MzMap.mli | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module type S = sig
include Map.S
... |
a3f0a1abca65aa74db28f2ead875617e24f7fda6e8248855bb73d68812c0b32b | jimcrayne/jhc | tc149.hs | {-# OPTIONS -fglasgow-exts -fforall #-}
module ShouldCompile where
type Generic i o = forall x. i x -> o x
type Id x = x
foo :: Generic Id Id
foo = error "urk"
-- The point here is that we instantiate "i" and "o"
-- with a partially applied type synonym. This is
OK in GHC because we check type validity only * a... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc149.hs | haskell | # OPTIONS -fglasgow-exts -fforall #
The point here is that we instantiate "i" and "o"
with a partially applied type synonym. This is
expanding type synonyms.
|
module ShouldCompile where
type Generic i o = forall x. i x -> o x
type Id x = x
foo :: Generic Id Id
foo = error "urk"
OK in GHC because we check type validity only * after *
However , a bug in GHC 5.03 - Feb02 made this break a
type invariant ( see Type.mkAppTy )
|
c9e2d0a9490f6178fb19f234b20013b49d6cd608d7dc8aa0ff56eb0a29d21299 | winterland1989/mysql-haskell | Connection.hs | |
Module : Database . MySQL.Connection
Description : Connection managment
Copyright : ( c ) Winterland , 2016
License : BSD
Maintainer :
Stability : experimental
Portability : PORTABLE
This is an internal module , the ' ' type should not directly acessed to user .
Module : ... | null | https://raw.githubusercontent.com/winterland1989/mysql-haskell/d93caffe0991e1090a3854acff355ff0ea6075c7/Database/MySQL/Connection.hs | haskell | ------------------------------------------------------------------------------
consider protecting it with a @MVar@.
# UNPACK #
# UNPACK #
| Everything you need to establish a MySQL connection.
but be aware this is a partial utf8 encoding, you may want to use 'defaultConnectInfoMB4'
instead to support full u... | |
Module : Database . MySQL.Connection
Description : Connection managment
Copyright : ( c ) Winterland , 2016
License : BSD
Maintainer :
Stability : experimental
Portability : PORTABLE
This is an internal module , the ' ' type should not directly acessed to user .
Module : ... |
9b1ed5c9280a2e5469aba5fee8ac8ef8200a9832944ecc4359368c0baf1441f1 | tolitius/lasync | project.clj | (defproject tolitius/lasync "0.1.24"
:description "executor service that blocks on .submit after the task queue limit is reached"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src"]
:java-source-paths ["src/java"]
:scm {:name "git"
:url ""}
:prof... | null | https://raw.githubusercontent.com/tolitius/lasync/532ba8f2560066038334ae3f2d49be19da8143e3/project.clj | clojure | (defproject tolitius/lasync "0.1.24"
:description "executor service that blocks on .submit after the task queue limit is reached"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src"]
:java-source-paths ["src/java"]
:scm {:name "git"
:url ""}
:prof... | |
e2ae2eb5dfec595c6d7cb3fc991fd06dcd93b6f14220d02bc7d27b10db44dc2f | let-def/lwd | nottui_lwt.mli | open Notty
open Nottui
* Nottui_lwt exposes an Lwt - driven mainloop .
UI execution is done in an Lwt thread and UI events can spawn and
synchronize threads .
UI execution is done in an Lwt thread and UI events can spawn and
synchronize threads.
*)
type event = [
| `Key of Unescape.key
| `... | null | https://raw.githubusercontent.com/let-def/lwd/2b2113f66f57cf3cfb7562a546c04a28f8450391/lib/nottui-lwt/nottui_lwt.mli | ocaml | * FIXME: Refactor to use [Nottui.Ui.event]?
* Turn a stream of events into a stream of images.
?term:Term.t ->
* Run mainloop in [Lwt], until the [quit] promise is fulfilled.
The ui is a normal [Lwd.t] value, but events are free to spawn asynchronous
[Lwt] threads.
| open Notty
open Nottui
* Nottui_lwt exposes an Lwt - driven mainloop .
UI execution is done in an Lwt thread and UI events can spawn and
synchronize threads .
UI execution is done in an Lwt thread and UI events can spawn and
synchronize threads.
*)
type event = [
| `Key of Unescape.key
| `... |
dd1b6aa4c4c1ab89793369b33753e330331338d9dfcc919c05839116c8eb3571 | ocaml-omake/omake | omake_shell.mli | Shell toploop .
val shell : Omake_options.t -> string option -> string list -> unit
| null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/main/omake_shell.mli | ocaml | Shell toploop .
val shell : Omake_options.t -> string option -> string list -> unit
| |
59242118ddc25223e4dae83b1d731c74fa4dcec5045747001f2a136e37c7830c | SimulaVR/godot-haskell | CanvasItemMaterial.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.CanvasItemMaterial
(Godot.Core.CanvasItemMaterial._B... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/CanvasItemMaterial.hs | haskell | | The manner in which a material's rendering is applied to underlying textures.
| The manner in which a material's rendering is applied to underlying textures.
| The manner in which material reacts to lighting.
| The manner in which material reacts to lighting.
| The number of columns in the spritesheet assigned a... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.CanvasItemMaterial
(Godot.Core.CanvasItemMaterial._B... |
095bbbe3f8af2aaebae93eaf730d8e443abf79d505bf1bb97c807e87bfd43e70 | alanz/ghc-exactprint | IndentedDo.hs |
foo =
parseTestFile "gitlogo-double.ppm" "a multi-image file" $ do
\res -> case res of
Right ([ PPM { ppmHeader = h1 }
, PPM { ppmHeader = h2 }], rest) -> do h1 `shouldBe` PPMHeader P6 220 92
h2 `shouldBe` PPMHeader P6 220 92
... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/IndentedDo.hs | haskell |
foo =
parseTestFile "gitlogo-double.ppm" "a multi-image file" $ do
\res -> case res of
Right ([ PPM { ppmHeader = h1 }
, PPM { ppmHeader = h2 }], rest) -> do h1 `shouldBe` PPMHeader P6 220 92
h2 `shouldBe` PPMHeader P6 220 92
... | |
8ffb961ed0f35bbcad524489cded85a542b5088c2aea68048e0cae4c03f26a35 | Dean177/reason-standard | Integer.ml |
module Comp : Comparator.T = struct
type t
let compare = compare
end
type t = Comp.t
external ofInt : int -> t = "BigInt" [@@bs.module "jsbi"]
external ofInt64 : Int64.t -> t = "BigInt" [@@bs.module "jsbi"]
external ofFloatUnsafe : float -> t = "BigInt" [@@bs.module "jsbi"]
let ofFloat float =
TODO , thi... | null | https://raw.githubusercontent.com/Dean177/reason-standard/74ed165c988eb4a4ea54339e829ff1d59b186d15/bucklescript/src/Integer.ml | ocaml |
module Comp : Comparator.T = struct
type t
let compare = compare
end
type t = Comp.t
external ofInt : int -> t = "BigInt" [@@bs.module "jsbi"]
external ofInt64 : Int64.t -> t = "BigInt" [@@bs.module "jsbi"]
external ofFloatUnsafe : float -> t = "BigInt" [@@bs.module "jsbi"]
let ofFloat float =
TODO , thi... | |
725064da851a49c668cc3136a2fbe82e89daf1e128834ef545cd6ebf8babee34 | spawnfest/dtu | dtu.erl | -module(dtu).
%% API exports
-export([main/1]).
%%====================================================================
%% API functions
%%====================================================================
%% escript Entry point
main([Code]) ->
io:format("Result: ~p~n ~p~n", [Code, parse_string(Code)]),
... | null | https://raw.githubusercontent.com/spawnfest/dtu/de71d8dc0f1823c234359f0abd72c6162905c0cd/src/dtu.erl | erlang | API exports
====================================================================
API functions
====================================================================
escript Entry point
====================================================================
================================================================... | -module(dtu).
-export([main/1]).
main([Code]) ->
io:format("Result: ~p~n ~p~n", [Code, parse_string(Code)]),
erlang:halt(0);
main(["file", Path]) ->
io:format("Result:~n~p~n", [parse_file(Path)]),
erlang:halt(0);
main(["css", Path]) ->
compile_and_print_path(Path, fun dtu_css:format/1),
er... |
020edb7c12cba817a031bbc52e660cf683952df5dfbea387a4a67173d8ac87a2 | slindley/effect-handlers | CodensityPipes.hs | An implementation of part of Pipes library using
codensity handlers . The original library is here :
codensity handlers. The original library is here:
-}
# LANGUAGE TypeFamilies , GADTs , NoMonomorphismRestriction , RankNTypes ,
MultiParamTypeClasses , FlexibleInstances , OverlappingInst... | null | https://raw.githubusercontent.com/slindley/effect-handlers/39d0d09582d198dd6210177a0896db55d92529f4/Examples/CodensityPipes.hs | haskell | An implementation of part of Pipes library using
codensity handlers . The original library is here :
codensity handlers. The original library is here:
-}
# LANGUAGE TypeFamilies , GADTs , NoMonomorphismRestriction , RankNTypes ,
MultiParamTypeClasses , FlexibleInstances , OverlappingInst... | |
9026559db560302217400e00427d429f470ad5bbcfab2ce2359c7d2ec0f743b4 | Eduap-com/WordMat | f.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/hompack/lisp/f.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
4655507c12c5fe52f5ea38c48b784c1f59173929beadff80faaa0a964f26a856 | pezipink/asi64 | starfield.rkt | #lang asi64
(require (for-syntax syntax/parse))
(set-emulator-program! emu "c64.prg")
(set-emulator-execute?! emu #f)
(set-emulator-breakpoints?! emu #t) ;bps
(set-emulator-path! emu "C:\\Program Files\\WinVICE-3.0-x64\\x64.exe")
(define vic-control $d018)
(define black 0)
(define white 1)
(define background $d021)
(d... | null | https://raw.githubusercontent.com/pezipink/asi64/81e61a25a6f35e137df6326353b9c54f50f2d829/samples/starfield.rkt | racket | bps
breaking hygeine here, very sorry
finally wrap around if the carry is et
asssemble at video memory location
do nothing for a while so
this doesn't trigger more than
once on the same frame! | #lang asi64
(require (for-syntax syntax/parse))
(set-emulator-program! emu "c64.prg")
(set-emulator-execute?! emu #f)
(set-emulator-path! emu "C:\\Program Files\\WinVICE-3.0-x64\\x64.exe")
(define vic-control $d018)
(define black 0)
(define white 1)
(define background $d021)
(define border $d020)
(define-op (mov src ... |
d285a1aad39576af734dc605bd23b6a244d6dbfe844ecbd42967a9ef1f4ee5db | yuriy-chumak/ol | lexical_analyzer.scm | ; #Ol
(import (owl parse))
(define (get-comment)
(get-either
(let-parses (
(_ (get-imm #\*))
(_ (get-imm #\/)))
#true)
(let-parses (
(_ get-byte)
(_ (get-comment)))
#true)))
(define get-whitespace
(get-any-of
(get-byte-if (lambd... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/lexical_analyzer.scm | scheme | #Ol
whitespace
comment
| (import (owl parse))
(define (get-comment)
(get-either
(let-parses (
(_ (get-imm #\*))
(_ (get-imm #\/)))
#true)
(let-parses (
(_ get-byte)
(_ (get-comment)))
#true)))
(define get-whitespace
(get-any-of
(_ (get-imm #\/))
... |
b798ccbb1dffaabc85f442b0a29c2ad02a640e8520ab4863b33eff134f2cd85a | racket/distro-build | manage-snapshots.rkt | #lang racket/base
(require racket/cmdline
racket/file
net/url
scribble/html
"download-page.rkt"
"private/find-desired-snapshots.rkt"
(only-in distro-build/config
extract-options+post-processes+aliases
infer-installer-alias))
(mod... | null | https://raw.githubusercontent.com/racket/distro-build/7720561ae1fc586ff9a304f62d44e8c095093c26/distro-build-server/manage-snapshots.rkt | racket | Map installer names to aliases, which is useful for creating "current" links:
Add extra installer aliases that we can infer from previous
successes, so we don't lose "current" links due to a new
failure:
Link current successes:
Link past successes:
Record the current version number, because that's useful for
cr... | #lang racket/base
(require racket/cmdline
racket/file
net/url
scribble/html
"download-page.rkt"
"private/find-desired-snapshots.rkt"
(only-in distro-build/config
extract-options+post-processes+aliases
infer-installer-alias))
(mod... |
415a693d2fa9d71d5b904e228a6e20d25e1f4a1131368dd0d71ba075bb14d829 | ocaml-sf/learn-ocaml-corpus | reflect_skip_return.ml | The following four constructor functions are implemented already .
let return (x : 'a) : 'a m =
MReturn x
let (>>=) (m1 : 'a m) (m2 : 'a -> 'b m) : 'b m =
MBind (m1, m2)
let fail : 'a m =
MFail
let choose (m1 : 'a m) (m2 : 'a m) : 'a m =
MChoose (m1, m2)
(* The bulk of the work is to implement an interpr... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/nondet_monad_defun/wrong/reflect_skip_return.ml | ocaml | The bulk of the work is to implement an interpreter for each of the
data types [_ failure], [(_, _) success], and [_ m].
Invoked when the left branch of a choice has failed.
[m2] is the right branch of the choice.
[s] and [f] are the continuations of the choice.
Used at the top level of [s... | The following four constructor functions are implemented already .
let return (x : 'a) : 'a m =
MReturn x
let (>>=) (m1 : 'a m) (m2 : 'a -> 'b m) : 'b m =
MBind (m1, m2)
let fail : 'a m =
MFail
let choose (m1 : 'a m) (m2 : 'a m) : 'a m =
MChoose (m1, m2)
let rec apply_failure : type answer . answer fail... |
2a1c7a18a52720ce3b9150edb97f878307836d7a9241077381296646ba91e3af | functional-koans/clojure-koans | project.clj | (defproject clojure-koans "0.5.2-SNAPSHOT"
:description "The Clojure koans."
:dependencies [[org.clojure/clojure "1.10.0"]
[koan-engine "0.2.5"]]
:dev-dependencies [[lein-koan "0.1.5"]]
:profiles {:dev {:dependencies [[lein-koan "0.1.5"]]}}
:repl-options {:init-ns koan-engine.runner
... | null | https://raw.githubusercontent.com/functional-koans/clojure-koans/a9c22921a5a3fb0c7fc09d9bd57c61b308b1a803/project.clj | clojure | (defproject clojure-koans "0.5.2-SNAPSHOT"
:description "The Clojure koans."
:dependencies [[org.clojure/clojure "1.10.0"]
[koan-engine "0.2.5"]]
:dev-dependencies [[lein-koan "0.1.5"]]
:profiles {:dev {:dependencies [[lein-koan "0.1.5"]]}}
:repl-options {:init-ns koan-engine.runner
... | |
4965857e9fc548d31fb11688a67482802ceeec965278e28d00188abfc6dc632f | Chris00/ocaml-rope | tinyRope.ml | Rope : an implementation of the data structure described in
, H. , Atkinson , R. , and Plass , M. 1995 . Ropes : an alternative to
strings . Softw . Pract . . 25 , 12 ( Dec. 1995 ) , 1315 - 1330 .
Motivated by extensible array implementation .
Copyright ( C ) 2007 < >
... | null | https://raw.githubusercontent.com/Chris00/ocaml-rope/7d457b2e69a16aede8cfbae43be29f208d007694/bench/tinyRope.ml | ocaml | =begin ignore
left, left size, right, right size, height
For debugging and judging balancing
=end
=begin code
by construction, there cannot be Empty or Leaf "" leaves
check overflow
function or balanced
len - i > 0, thus Leaf "" can't happen
Leaf "" cannot happen
=end | Rope : an implementation of the data structure described in
, H. , Atkinson , R. , and Plass , M. 1995 . Ropes : an alternative to
strings . Softw . Pract . . 25 , 12 ( Dec. 1995 ) , 1315 - 1330 .
Motivated by extensible array implementation .
Copyright ( C ) 2007 < >
... |
120b0546c30df0540b1956946355ee227d1a3185ba1624e260ecd584844c08fa | johnswanson/tictag | signup.cljs | (ns tictag.views.signup
(:require [re-frame.core :refer [dispatch subscribe]]
[reagent.core :as reagent]
[goog.string :as gstr]
[taoensso.timbre :as timbre]
[tictag.views.common :refer [input]]
[tictag.utils :as utils]))
(defn signup []
(let [user ... | null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/src/cljs/tictag/views/signup.cljs | clojure | (ns tictag.views.signup
(:require [re-frame.core :refer [dispatch subscribe]]
[reagent.core :as reagent]
[goog.string :as gstr]
[taoensso.timbre :as timbre]
[tictag.views.common :refer [input]]
[tictag.utils :as utils]))
(defn signup []
(let [user ... | |
f5032bb137f07742266e7fdd8e68c03dde745e6b500fc05debca13245a2abe02 | lambda-fairy/robot | RightClick.hs | -- | Open the right-click menu, then use the keyboard to select the
first entry .
import Test.Robot
main = runRobot $ mapM_ (>> sleep 0.25)
[tap rightButton, tap _Down, tap _Return]
| null | https://raw.githubusercontent.com/lambda-fairy/robot/3b851d733c5835f04a7c4538e5fca1e1f42a7665/examples/RightClick.hs | haskell | | Open the right-click menu, then use the keyboard to select the | first entry .
import Test.Robot
main = runRobot $ mapM_ (>> sleep 0.25)
[tap rightButton, tap _Down, tap _Return]
|
79beae8dac6febb5d0c438337cee528b00adef89254ec1a41349fd77ee81513a | ghc/ghc | Base.hs | # LANGUAGE CPP #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DataKinds #
# LANGUAGE StandaloneDeriving #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TypeOperators #
module Base (
-- * General utilities
module Control.Applicative,
module Control.Monad.Extra,
module Data.Lis... | null | https://raw.githubusercontent.com/ghc/ghc/eb5a6b91e02b48f9171217743e3417cb33eb92e3/hadrian/src/Base.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE DeriveTraversable #
* General utilities
* Shake
* Basic data types
* Paths
TODO: Move this to build directory?
| Path to system configuration files, such as 'configFile'.
| Path to the system configuration file generated by the @configure@ script.
| Path to source files of the buil... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE StandaloneDeriving #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TypeOperators #
module Base (
module Control.Applicative,
module Control.Monad.Extra,
module Data.List.Extra,
module Data.Maybe,
module Data.Semigroup,
module Hadrian.Utiliti... |
fcbdd6aff87aadab143fa49ae39b9bd49235a943e7296359a637d49399379fd0 | cronokirby/haskell-in-haskell | 0010.hs |
data Color = Red | Blue | Green
showColor :: Color -> String
showColor Red = "Red"
showColor Blue = "Blue"
showColor Green = "Green"
-- OUT(Red)
main :: String
main = showColor Red
| null | https://raw.githubusercontent.com/cronokirby/haskell-in-haskell/83cb8114c7a71f2fc530d1865dd22776a3779417/integration_tests/0010.hs | haskell | OUT(Red) |
data Color = Red | Blue | Green
showColor :: Color -> String
showColor Red = "Red"
showColor Blue = "Blue"
showColor Green = "Green"
main :: String
main = showColor Red
|
628b7a3b5f56519134a03197a8bcf95ae22714dcef7828c73cfde3ea15f63851 | huangz1990/SICP-answers | p94-rotate90.scm | ;;; p94-rotate90.scm
(define (rotate90 painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 1.0 1.0)
(make-vect 0.0 0.0)))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/p94-rotate90.scm | scheme | p94-rotate90.scm |
(define (rotate90 painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 1.0 1.0)
(make-vect 0.0 0.0)))
|
a127d053a83b6ff5c3593861567e6efe49a6e1feea1d940b847a68e46ef44d03 | astrada/ocaml-extjs | ext_Version.mli | * A utility class that wrap around a string version ...
{ % < p > A utility class that wrap around a string version number and provide convenient
method to perform comparison . See also : < a href="#!/api / Ext . Version - static - method - compare " rel="Ext . Version - static - method - compare " class="docC... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_Version.mli | ocaml | * {% <p>Returns the build component value</p> %}
{b Returns}:
{ul {- [Js.number Js.t] {% <p>build</p> %}
}
}
* {% <p>Returns the patch component value</p> %}
{b Returns}:
{ul {- [Js.number Js.t] {% <p>patch</p> %}
}
}
* {% <p>Returns the release component value</p> %}... | * A utility class that wrap around a string version ...
{ % < p > A utility class that wrap around a string version number and provide convenient
method to perform comparison . See also : < a href="#!/api / Ext . Version - static - method - compare " rel="Ext . Version - static - method - compare " class="docC... |
2d4592d4459b3dab820e5e18b053d8dca98dde0ded2c16e1932f46b52a264556 | fukamachi/psychiq | util.lisp | (in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(handler-bind (#+sbcl (warning #'muffle-warning))
(defpackage psychiq.util
(:use #:cl)
(:export #:symbol-name-with-package
#:generate-random-id
#:machine-identity
#:getpid))))
(in-... | null | https://raw.githubusercontent.com/fukamachi/psychiq/602fbb51d4c871de5909ec0c5a159652f4ae9ad3/src/util/util.lisp | lisp | (in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(handler-bind (#+sbcl (warning #'muffle-warning))
(defpackage psychiq.util
(:use #:cl)
(:export #:symbol-name-with-package
#:generate-random-id
#:machine-identity
#:getpid))))
(in-... | |
e309bda80c90ed01898bce239ce8e51b9cbc87fd7227ab74f588d1eecafbdb01 | ayamada/copy-of-svn.tir.jp | dispatch-tir.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
;;; cgi dispatch module
Copyright ( c ) 2005 , All rights reserved .
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-www-cgi-dispatch-tir/tags/0.0.1/src/lib/www/cgi/dispatch-tir.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
cgi dispatch module
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... | $ Id$
Copyright ( c ) 2005 , All rights reserved .
" 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
note : 初回ディスパッチ時にテーブルを生... |
3bda93f7e806f2781995747b254cd5f9ad52ac3e2fe85d6e98c1de80c238b9f6 | ecraven/r7rs-swank | mit.scm | (declare (usual-integrations))
srfi 13
(define (string-start+end str start end)
(let ((s (if (eq? #!default start)
0 start))
(e (if (eq? #!default end)
(string-length str) end)))
(values s e)))
(define (string-start+end+start+end s1 start1 end1 s2 start2 end2)
(let ((s (... | null | https://raw.githubusercontent.com/ecraven/r7rs-swank/5fe82c99ba0bd434a6815d8b9bb94aa2df6ae6c9/specific/mit.scm | scheme | (define string-hash-ci string-ci-hash)
(- tlen ti) -- how many chars left.
(- plen pi) -- how many chars left.
Win.
Lose.
Retreat.
Here's the main loop. We have set rv[0] ... rv[i].
lp2 invariant:
pat[(k-j) .. k-1] matches pat[start .. start+j-1]
or j = -1.
pat[(k-j) .. k] matches pat[start..start+j].
ad... | (declare (usual-integrations))
srfi 13
(define (string-start+end str start end)
(let ((s (if (eq? #!default start)
0 start))
(e (if (eq? #!default end)
(string-length str) end)))
(values s e)))
(define (string-start+end+start+end s1 start1 end1 s2 start2 end2)
(let ((s (... |
e433e42864936bac1ad6dd099a58cdc7dfae79a3d76d3bdb92ae9678c084e81f | haskell-works/hw-dsv | QueryStrict.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module App.Commands.QueryStrict
( cmdQueryStrict
) where
import App.Char
import App.Commands.Options.Parse
import Control.Applicative
im... | null | https://raw.githubusercontent.com/haskell-works/hw-dsv/4f1274af383281589165232186f99219479d7898/app/App/Commands/QueryStrict.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module App.Commands.QueryStrict
( cmdQueryStrict
) where
import App.Char
import App.Commands.Options.Parse
import Control.Applicative
import Control.Lens
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.... |
7ddfe88248b2a6de4f5ab35ff907ee161be7abe910b506c7629584a73aab8a68 | alexandroid000/improv | TriggerResponse.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_srvs.TriggerResponse where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBina... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Std_srvs/Ros/Std_srvs/TriggerResponse.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_srvs.TriggerResponse where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
i... |
fb0185885c81f7d64c02721b961c76b8c3be845519fc87bdf717278c1af5f0e1 | backtracking/mlpost | real_plot.ml | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/real_plot.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
module C = Command
module P = Picture
type ('a, 'b) node = { values : 'b; node : 'a }
type 'a curve =... |
8a3bfdb037c304df59f8338e80c902ce8b3bf1d9fb8d5f8e158e8955663d878d | fulcro-legacy/semantic-ui-wrapper | ui_visibility.cljs | (ns fulcrologic.semantic-ui.behaviors.visibility.ui-visibility
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/behaviors/Visibility/Visibility" :default Visibility]))
(def ui-visibility
"Visibility provides a set of callbacks for when a content appears in the v... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/behaviors/visibility/ui_visibility.cljs | clojure | (ns fulcrologic.semantic-ui.behaviors.visibility.ui-visibility
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/behaviors/Visibility/Visibility" :default Visibility]))
(def ui-visibility
"Visibility provides a set of callbacks for when a content appears in the v... | |
5a04ee2e20de9be0fa34544563884b32b4add6d8ccecdb95dc724eb82d852c3f | garrigue/lablgtk | gtkNew.ml | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src-unsupported/gtkNew.ml | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
7a5b80eccba2d48a800e6f2fbb343e8f8d6a70116e01acfc09156b521bbf1e61 | adventuring/tootsville.net | twilio.lisp | ;;;; -*- lisp -*-
;;;
src / endpoints / gossip / twilio.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
mo... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/endpoints/gossip/twilio.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
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
Affero General Public License for more det... | src / endpoints / gossip / twilio.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later... |
92bf030cf901b13d250c7b28ad6ebedf1959211d74104210225a3395975f0d1a | travelping/ergw | node_selection_SUITE.erl | Copyright 2018 , Travelping GmbH < >
%% 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 .
-module(node_selection_SU... | null | https://raw.githubusercontent.com/travelping/ergw/e149b57019046f9c08b99412fbe47078bdec58e8/apps/ergw_core/test/node_selection_SUITE.erl | erlang | This program is free software; you can redistribute it and/or
A/AAAA record alternatives
===================================================================
Common Test callbacks
===================================================================
===================================================================
T... | Copyright 2018 , Travelping GmbH < >
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 .
-module(node_selection_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("... |
7f0138eba710470738dc40014eb0d96226b80f80ecfe3a2db83211c95442cf7a | Glue42/gateway-modules | constants.cljc | (ns gateway.constants
(:require [gateway.reason :refer [reason]]))
domain base URI
(defonce global-domain-uri "global")
(defonce context-domain-uri "context")
;; errors
(defonce failure (str global-domain-uri ".errors.failure"))
(defonce error-unhandled-message "gateway.errors.unhandled_message")
| null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/constants.cljc | clojure | errors | (ns gateway.constants
(:require [gateway.reason :refer [reason]]))
domain base URI
(defonce global-domain-uri "global")
(defonce context-domain-uri "context")
(defonce failure (str global-domain-uri ".errors.failure"))
(defonce error-unhandled-message "gateway.errors.unhandled_message")
|
99d1296098ba46db548f3a87d11a3b89a397e249f5abcb9e589eb79693193af1 | apache/couchdb-chttpd | chttpd_cors_test.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-chttpd/74002101513c03df74a4c25f3c892f5d003fa5da/test/chttpd_cors_test.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(chttpd_cors_test).
-include_lib("couch/include/couch_db.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("chttpd/include/chttpd_cors.h... |
885e5bb517bb3a3201ecc7e8edf4483fa86cbcd28b3339fd4ba563935f501197 | bootstrapworld/curr | contentlist.rkt | ; This file specifies the pages that make up the numbered portion of the
; workbook for the course containing this resources/workbook directory.
; The list should contain names of either .scrbl or .pdf files that
; are in the workbook/pages directory. Each list element must
; include either a .scrbl or a .pdf ex... | null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/algebra/resources/workbook/langs/en-us/contentlist.rkt | racket | This file specifies the pages that make up the numbered portion of the
workbook for the course containing this resources/workbook directory.
The list should contain names of either .scrbl or .pdf files that
are in the workbook/pages directory. Each list element must
include either a .scrbl or a .pdf extensio... |
Currently ( Apr 2018 ) we are inserting the extra exercises from
one more than the number of exercises to insert , to account
(
("ColleenPages.pdf" "Unit-1")
("StudentWorkbook.pdf" "NinjaCat-Dissection")
("StudentWorkbook.pdf" "NinjaCat-Coordinates")
("StudentWorkbook.pdf" "Game-Design")
("StudentWorkbook.p... |
203f9fb6c935baa52c71763fb6f0a75113e376f454cfd6cb63f44e555b688862 | maralorn/nix-output-monitor | Strict.hs | module Data.Sequence.Strict (
Seq.sortOn,
Seq.filter,
(<|),
Data.Sequence.Strict.fromList,
Seq.null,
Seq.length,
Seq ((Seq.:<|)),
) where
import Data.Sequence qualified as Seq
import Relude
(<|) :: a -> Seq a -> Seq a
!item <| rest = item Seq.<| rest
fromList :: [a] -> Seq.Seq a
fromList = foldr (<|) m... | null | https://raw.githubusercontent.com/maralorn/nix-output-monitor/a5f5f07de6c62b5b9dad32be2b0b6e0bab90f9ed/lib/Data/Sequence/Strict.hs | haskell | module Data.Sequence.Strict (
Seq.sortOn,
Seq.filter,
(<|),
Data.Sequence.Strict.fromList,
Seq.null,
Seq.length,
Seq ((Seq.:<|)),
) where
import Data.Sequence qualified as Seq
import Relude
(<|) :: a -> Seq a -> Seq a
!item <| rest = item Seq.<| rest
fromList :: [a] -> Seq.Seq a
fromList = foldr (<|) m... | |
fb4754fc2039e0bbb456d07dffbc2edc528ace491fbebc486646ca7037836103 | poroh/ersip | ersip_hdr_rack_test.erl | %%%
Copyright ( c ) 2020 Dmitry Poroh
%%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%%
RSeq tests
%%%
-module(ersip_hdr_rack_test).
-include_lib("eunit/include/eunit.hrl").
%%===================================================================
%% Cases
%%=====... | null | https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/message/ersip_hdr_rack_test.erl | erlang |
All rights reserved.
===================================================================
Cases
===================================================================
===================================================================
Helpers
=================================================================== | Copyright ( c ) 2020 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
RSeq tests
-module(ersip_hdr_rack_test).
-include_lib("eunit/include/eunit.hrl").
parse_test() ->
parse_success(<<"776656 1 INVITE">>),
parse_success(<<"776656 0 INVITE">>),
parse_success(<<"4... |
ef116d97cdb9daf174f9b99e99f5742941e6801696983836e97efd4666f134b1 | slyrus/retrospectiff | compression.lisp |
(in-package :retrospectiff.compression)
(defparameter *compressions*
(list (list +no-compression+ #'identity #'identity)
(list +packbits-compression+ 'packbits-decode 'packbits-encode)
(list +lzw-compression+ 'lzw-decode 'lzw-encode)
(list +jpeg-compression+ 'jpeg-decode nil)
(list +deflate-compre... | null | https://raw.githubusercontent.com/slyrus/retrospectiff/c2a69d77d5010f8cdd9045b3e36a08a73da5d321/compression.lisp | lisp |
(in-package :retrospectiff.compression)
(defparameter *compressions*
(list (list +no-compression+ #'identity #'identity)
(list +packbits-compression+ 'packbits-decode 'packbits-encode)
(list +lzw-compression+ 'lzw-decode 'lzw-encode)
(list +jpeg-compression+ 'jpeg-decode nil)
(list +deflate-compre... | |
c9603a7b9d47a561ec94aa183b0801962891f00a819fe4c21baa13899c9cbd5e | ejgallego/coq-lsp | utils.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-lsp/6612c0eec724e228967991dfbc500e4437aa47de/coq/utils.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2022 - 2023 Inria ... |
5e14a83d0ab14302289ffea4ef7a5cc070dd78fc9bcb3c0b211a0f6280b24274 | Carnap/Carnap | Lande.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PurePropositional.Logic.Lande
( parseLandeProp, LandeProp(..), landePropCalc) where
import Text.Parsec
import Control.Lens (view)
import Carnap.Core.Data.Types (Form)
import Carnap.Core.Data.Classes (lhs)
import Carn... | null | https://raw.githubusercontent.com/Carnap/Carnap/c9d79556c0c55f7a0457deafa350292853292a83/Carnap/src/Carnap/Languages/PurePropositional/Logic/Lande.hs | haskell | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PurePropositional.Logic.Lande
( parseLandeProp, LandeProp(..), landePropCalc) where
import Text.Parsec
import Control.Lens (view)
import Carnap.Core.Data.Types (Form)
import Carnap.Core.Data.Classes (lhs)
import Carn... | |
42cdfeec65217d4682daecf7c5661a9c46f4162c41356371a12d08b7212366eb | mirage/irmin | content_addressable.mli |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-git/content_addressable.mli | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 " AND... | |
736040e6dcfb2af18374e9a7a95bdd8d31127e803c8785ddb7612080f9e8e207 | bilus/reforms | repl.clj | (require 'cljs.repl)
(require 'cljs.build.api)
;(require 'cljs.repl.browser)
(require 'cljs.repl.node)
(cljs.build.api/build "src"
{:main 'reforms.core
:output-to "out/main.js"
:verbose true})
;(cljs.repl/repl (cljs.repl.browser/repl-env)
(clj... | null | https://raw.githubusercontent.com/bilus/reforms/fc914fec27ee29b787e9ab66f376f41d49543deb/repl.clj | clojure | (require 'cljs.repl.browser)
(cljs.repl/repl (cljs.repl.browser/repl-env) | (require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.node)
(cljs.build.api/build "src"
{:main 'reforms.core
:output-to "out/main.js"
:verbose true})
(cljs.repl/repl (cljs.repl.node/repl-env)
:watch "src"
... |
95066b63975a58bf56b097404b578ec15ecb96e0b582e39895c3b17adde5fbea | cljfx/cljfx | mutator.clj | (ns cljfx.mutator
"Part of a public API
All Mutator implementations should be treated as Mutator protocol implementations
only, their internals are subject to change"
(:require [clojure.set :as set])
(:import [java.util Collection]
[javafx.beans.value ObservableValue ChangeListener]
[ja... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/src/cljfx/mutator.clj | clojure | (ns cljfx.mutator
"Part of a public API
All Mutator implementations should be treated as Mutator protocol implementations
only, their internals are subject to change"
(:require [clojure.set :as set])
(:import [java.util Collection]
[javafx.beans.value ObservableValue ChangeListener]
[ja... | |
35ce5f19fff87ca4f149828632d4fcaab4c2ac551de237d4aa10d289a5d26968 | avsm/ocaml-lens | myocamlbuild.ml | OASIS_START
DO NOT EDIT ( digest : 2ee1b65797d78eba0e238e3eeb0c20c5 )
module OASISGettext = struct
# 22 " src / oasis / OASISGettext.ml "
let ns_ str =
str
let s_ str =
str
let f_ (str: ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
... | null | https://raw.githubusercontent.com/avsm/ocaml-lens/e39dc3529df572ae169a90ed5d2b217231ed9974/myocamlbuild.ml | ocaml | these functions are not really officially exported
ocamlfind command
This lists all supported packages.
Mock to list available syntaxes.
By using Before_options one let command line options have an higher
* priority on the contrary using After_options will guarantee to have
* the higher p... | OASIS_START
DO NOT EDIT ( digest : 2ee1b65797d78eba0e238e3eeb0c20c5 )
module OASISGettext = struct
# 22 " src / oasis / OASISGettext.ml "
let ns_ str =
str
let s_ str =
str
let f_ (str: ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
... |
180037e4b980984a22267f25c808e6ee23e055f78c4db1f255ef8d5217e25990 | ralt/lxc-wrapper | ip.lisp | (in-package #:lxc-wrapper)
(defun next-ip (file)
"Finds the next available IP for the LXC"
(format
nil
"~{~D~^.~}"
(generate-next-ip
(with-open-file (f file)
(loop for line = (read-line f nil)
while line
when (line-matches-ip line)
collect (line-get-ip line))))))
(defun add-ip (file ip ho... | null | https://raw.githubusercontent.com/ralt/lxc-wrapper/16f34432e2cfa8dcb7fa1a5383930143085dc1e0/src/ip.lisp | lisp | only /24 supported
doesn't exist.
We can't just sort the list of IPs and add one, because the IPs
may not be sequential.
@todo
@todo | (in-package #:lxc-wrapper)
(defun next-ip (file)
"Finds the next available IP for the LXC"
(format
nil
"~{~D~^.~}"
(generate-next-ip
(with-open-file (f file)
(loop for line = (read-line f nil)
while line
when (line-matches-ip line)
collect (line-get-ip line))))))
(defun add-ip (file ip ho... |
78757fb0a6bc3075e12e9f35c9d4e93f9ffa0624eb45b248811ea2df2e790bf4 | mariari/Misc-Lisp-Scripts | probability.lisp | (defmacro curry (fn . args)
"Creates a partially applied function that takes 1 argument"
(let ((arg (gensym)))
`(lambda (,arg) (,fn ,@args ,arg))))
(defun range (max &optional (min 0) (step 1))
(loop for x from min to max by step
collect x))
(defun fact (num &optional (bot 1))
(reduce #'* (range num ... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Class/probability.lisp | lisp | (defun list-to-2d-array (list)
(make-array (list (length list)
:initial-contents list))
(defparameter z (coerce *passed-values-c* 'vector))
(w (cl-plplot:basic-3d-window)))
(cl-plplot:add-plot-to-window w c) | (defmacro curry (fn . args)
"Creates a partially applied function that takes 1 argument"
(let ((arg (gensym)))
`(lambda (,arg) (,fn ,@args ,arg))))
(defun range (max &optional (min 0) (step 1))
(loop for x from min to max by step
collect x))
(defun fact (num &optional (bot 1))
(reduce #'* (range num ... |
74b56645edf82179ba5a6b16dcd136bdc85fccea602200ff6d01b1c0deb4f68c | muesli4/table-layout | Vertical.hs | -- | This module provides functions for vertical alginment of columns.
module Text.Layout.Table.Vertical
( -- * Vertical padding of columns
vPad
, vPadAll
, -- * Converting columns to rows with positioning
colsAsRowsAll
, colsAsRows
) where
import Data.List
import Text.Layout.Table.Spe... | null | https://raw.githubusercontent.com/muesli4/table-layout/fc94bb1038c15ddbfcb2cec941c65d142e38bf40/src/Text/Layout/Table/Vertical.hs | haskell | | This module provides functions for vertical alginment of columns.
* Vertical padding of columns
* Converting columns to rows with positioning
| Fill all columns to the same length by aligning at the given position.
| Fill all columns to the same length by aligning at the given positions. | module Text.Layout.Table.Vertical
vPad
, vPadAll
colsAsRowsAll
, colsAsRows
) where
import Data.List
import Text.Layout.Table.Spec.Position
import Text.Layout.Table.Spec.Util
import Text.Layout.Table.Primitives.Basic
| Merges multiple columns together to a valid grid without holes . For exa... |
c7fff7b1c9f7445ba28470782a4d62b5e5487a0552eab08287540246a043fd99 | RefactoringTools/HaRe | A2.hs | module Demote.A2 where
import Demote.C2
main xs = case xs of
[] -> 0
[x:xs] -> x^pow + sumSquares xs
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Demote/A2.hs | haskell | module Demote.A2 where
import Demote.C2
main xs = case xs of
[] -> 0
[x:xs] -> x^pow + sumSquares xs
| |
b42d74a90e70db80f9475d56110426a08ae867bf490e02af06a002f07faabbbe | puppetlabs/puppetdb | explore_test.clj | (ns puppetlabs.puppetdb.http.explore-test
(:import [com.fasterxml.jackson.core JsonParseException])
(:require [cheshire.core :as json]
[puppetlabs.puppetdb.scf.storage :as scf-store]
[puppetlabs.puppetdb.http :as http]
[clojure.test :refer :all]
[puppetlabs.puppetdb.t... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/http/explore_test.clj | clojure | host3 should be deactivated
The certname for each resource should be the current host
The certname for each resource should be the current host
The certname for each resource should be the current host
Create a tree-structure for facts: node -> name -> value
The fqdn fact should be the name of the host | (ns puppetlabs.puppetdb.http.explore-test
(:import [com.fasterxml.jackson.core JsonParseException])
(:require [cheshire.core :as json]
[puppetlabs.puppetdb.scf.storage :as scf-store]
[puppetlabs.puppetdb.http :as http]
[clojure.test :refer :all]
[puppetlabs.puppetdb.t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.