_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 |
|---|---|---|---|---|---|---|---|---|
a357e945906bac87ee05ecafdb2e727004ea4998fc329fbe0d75c09da6f3e300 | xmonad/xmonad-contrib | NoFrillsDecoration.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.NoFrillsDecoration
-- Description : Most basic version of decoration for windows.
Copyright : ( c ) Jan Vornberger 2009
-- License : BSD3-... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/3058d1ca22d565b2fa93227fdde44d8626d6f75d/XMonad/Layout/NoFrillsDecoration.hs | haskell | --------------------------------------------------------------------------
|
Module : XMonad.Layout.NoFrillsDecoration
Description : Most basic version of decoration for windows.
License : BSD3-style (see LICENSE)
Maintainer :
Stability : unstable
Portability : not portable
Most basic versi... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
Copyright : ( c ) Jan Vornberger 2009
modifications . In contrast to " XMonad . Layout . SimpleDecoration " this will
module XMonad.Layout.NoFrillsDecoration
noFrillsDeco
, module XMonad.Layout.SimpleDecoration
, NoFrillsDecoration
) wh... |
7d2b32aa7a8283a06f461ab2b382657a4f9096469a708168c2caf49d70d5160b | jafingerhut/clojure-benchmarks | revcomp.clj-11.clj | The Computer Language Benchmarks Game
;; /
contributed by
(ns revcomp
(:gen-class))
(set! *warn-on-reflection* true)
(def complement-dna-char-map
{\w \W, \W \W,
\s \S, \S \S,
\a \T, \A \T,
\t \A, \T \A,
\u \A, \U \A,
\g \C, \G \C,
\c \G, \C \G,
\y \R, \Y \... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/revcomp/revcomp.clj-11.clj | clojure | /
from beginning and end towards the middle
that, the line just read | The Computer Language Benchmarks Game
contributed by
(ns revcomp
(:gen-class))
(set! *warn-on-reflection* true)
(def complement-dna-char-map
{\w \W, \W \W,
\s \S, \S \S,
\a \T, \A \T,
\t \A, \T \A,
\u \A, \U \A,
\g \C, \G \C,
\c \G, \C \G,
\y \R, \Y \R,
... |
e5cfe413d2d5eac433408228af33117ac100120239d98b04145a004ab013008f | simonmar/parconc-examples | findpar2.hs | {-# LANGUAGE BangPatterns #-}
import System.Directory
import System.FilePath
import Control.Concurrent.Async
import System.Environment
import Data.List hiding (find)
import Control.Exception (finally)
import Data.Maybe (isJust)
import Control.Concurrent.MVar
import Data.IORef
import GHC.Conc (getNumCapabilities)
-- <<... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/findpar2.hs | haskell | # LANGUAGE BangPatterns #
<<main
>>
<<find
<3>
>>
<<subfind
<3>
>>
<<NBSem
>> | import System.Directory
import System.FilePath
import Control.Concurrent.Async
import System.Environment
import Data.List hiding (find)
import Control.Exception (finally)
import Data.Maybe (isJust)
import Control.Concurrent.MVar
import Data.IORef
import GHC.Conc (getNumCapabilities)
main = do
[n,s,d] <- getArgs
se... |
1056be7a8ddf756de3d8148d7c69f2bdd871b6f82cd94a66ff529856b9c8460f | CarlosMChica/HaskellBook | ManualBang.hs | {-# LANGUAGE BangPatterns #-}
module ManualBang where
doesntEval :: Bool -> Int
doesntEval b = 1
manualSeq :: Bool -> Int
manualSeq b = b `seq` 1
banging :: Bool -> Int
banging !b = 1
--doesntEval
--doesntEval =
-- \_ -> I# 1#
--manualSeq
--manualSeq =
-- \b_a1ia ->
-- case b_a1ia of _
-- {... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter27/ManualBang.hs | haskell | # LANGUAGE BangPatterns #
doesntEval
doesntEval =
\_ -> I# 1#
manualSeq
manualSeq =
\b_a1ia ->
case b_a1ia of _
{ __DEFAULT -> I# 1# }
banging
banging =
\b_a1ib ->
case b_a1ib of _
{ __DEFAULT -> I# 1# }} | module ManualBang where
doesntEval :: Bool -> Int
doesntEval b = 1
manualSeq :: Bool -> Int
manualSeq b = b `seq` 1
banging :: Bool -> Int
banging !b = 1
data Foo = Foo Int !Int
first (Foo x _) = x
second (Foo _ y) = y
|
0f83c80e5ab93c4c60585e089792673aadf0d323f0516f61b4ddc5049dc94af4 | msszczep/pequod-cljs | handler.clj | (ns pequod-cljs.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[hiccup.page :refer [include-js include-css html5]]
[pequod-cljs.middleware :refer [wrap-middleware]]
[config.core :refer [env]]))
(def mount-target... | null | https://raw.githubusercontent.com/msszczep/pequod-cljs/986ad97fa39d5b83828c07daf80655460b27d2dd/src/clj/pequod_cljs/handler.clj | clojure | (ns pequod-cljs.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[hiccup.page :refer [include-js include-css html5]]
[pequod-cljs.middleware :refer [wrap-middleware]]
[config.core :refer [env]]))
(def mount-target... | |
fb0c6adc1c7dd8668cbda42eda0640cea58cea518562c33b01dba2d997c67d2f | tuura/plato | STG.hs | module Tuura.Concept.STG (
module Data.Monoid,
module Tuura.Concept.Circuit.Basic,
module Tuura.Concept.Circuit.Derived,
) where
import Data.Monoid
import Tuura.Concept.Circuit.Basic
import Tuura.Concept.Circuit.Derived
| null | https://raw.githubusercontent.com/tuura/plato/4b528f73ad677cf634dde7644a0ec5c759114baf/src/Tuura/Concept/STG.hs | haskell | module Tuura.Concept.STG (
module Data.Monoid,
module Tuura.Concept.Circuit.Basic,
module Tuura.Concept.Circuit.Derived,
) where
import Data.Monoid
import Tuura.Concept.Circuit.Basic
import Tuura.Concept.Circuit.Derived
| |
447e4724d7dafc7b552bc2d5731bbc28c93c1999e3d422a228d5bb2fc79d1eaa | FreeProving/free-compiler | Strategy.hs | module Base.Strategy where
import Data.Function ( id )
import Data.List ( append, sum )
import Data.Maybe
import Test.QuickCheck
import FreeC.NonDet
-------------------------------------------------------------------------------
-- Trivial Test Functions ... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/example/Base/Strategy.hs | haskell | -----------------------------------------------------------------------------
Trivial Test Functions --
-----------------------------------------------------------------------------
property @id True@ cannot be proved because the application of @id@
values as false ... | module Base.Strategy where
import Data.Function ( id )
import Data.List ( append, sum )
import Data.Maybe
import Test.QuickCheck
import FreeC.NonDet
The boolean property @True@ is always satisfied . However , the equivalent
introduces sharing syntax and t... |
f2860831364082c04e12dde1a8297dc86cf7a7b7d132dded3475dee10c4928d6 | reborg/clojure-essential-reference | 5.clj | < 1 >
(->> (into () (range n))
(map
#(do
(println "produce" %)
(Thread/sleep 2000) %))))
< 2 >
(map #(do (println "consume" %) %) xs))
(first (fast-consumer (seque (slow-producer 5)))) ; <3>
< 4 >
produce 3
produce 2
consume 4
4
produce 1
produce 0 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/SequentialCollections/seque/5.clj | clojure | <3> | < 1 >
(->> (into () (range n))
(map
#(do
(println "produce" %)
(Thread/sleep 2000) %))))
< 2 >
(map #(do (println "consume" %) %) xs))
< 4 >
produce 3
produce 2
consume 4
4
produce 1
produce 0 |
2e890b84e25db4bebe63c55febdb99ca122ef3d3e1dcb87825455ef3e4000f44 | scslab/hails | SimpleApp2.hs | {-# LANGUAGE OverloadedStrings #-}
module SimpleApp2 (server) where
import Prelude hiding (lookup)
import Data.String
import Control.Monad
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy.Char8 as L8
import LIO
import Hails.Web
import qualified Hails.Web.Frank as Frank
import Hails.H... | null | https://raw.githubusercontent.com/scslab/hails/4d4dfe0cdfb7c8941a55ce882cba20d82c6d9cfd/examples/SimpleFullExample/SimpleApp2.hs | haskell | # LANGUAGE OverloadedStrings # | module SimpleApp2 (server) where
import Prelude hiding (lookup)
import Data.String
import Control.Monad
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy.Char8 as L8
import LIO
import Hails.Web
import qualified Hails.Web.Frank as Frank
import Hails.HttpServer
import Hails.Database
im... |
506d81dd127a9b939e757eea238b65961d3adbb4444d92b971bdc04aaba380ad | nikita-volkov/rerebase | Word.hs | module GHC.Word
(
module Rebase.GHC.Word
)
where
import Rebase.GHC.Word
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/GHC/Word.hs | haskell | module GHC.Word
(
module Rebase.GHC.Word
)
where
import Rebase.GHC.Word
| |
bc88db3fcae64eae0b463763f3431c1cb610260308df549a19d01f402bfddd37 | s0kil/000-rip | Edit.hs | module Web.View.Links.Edit where
import Web.View.Prelude
data EditView = EditView { link :: Link }
instance View EditView where
html EditView { .. } = [hsx|
{breadcrumb}
<div class="h-100" id="sessions-new">
<div class="d-flex align-items-center">
<div class="w-100">
... | null | https://raw.githubusercontent.com/s0kil/000-rip/979d638f2aec9917f6603ba1e48179e600f33c6f/Web/View/Links/Edit.hs | haskell | module Web.View.Links.Edit where
import Web.View.Prelude
data EditView = EditView { link :: Link }
instance View EditView where
html EditView { .. } = [hsx|
{breadcrumb}
<div class="h-100" id="sessions-new">
<div class="d-flex align-items-center">
<div class="w-100">
... | |
32901571469ed82269421169fee00cec9896fd95ad9e593c19a646c6c56558bd | pfdietz/ansi-test | make-array.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Fri Sep 20 06:47:37 2002
;;;; Contains: Tests for MAKE-ARRAY
(deftest make-array.1
(let ((a (make-array-with-checks 10)))
(and (symbolp a) a))
nil)
(deftest make-array.1a
(let ((a (make-array-with-checks '(10))))
(and (symbolp a) a))
nil)
(def... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/arrays/make-array.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for MAKE-ARRAY
Should return a symbol only in error situations
Higher dimensional arrays
(deftest make-array.24
#(a a a a a))
Adjustable arrays
Displaced arrays
Multidimensional displaced arrays
Keywords tests
Error tests
Order of evaluation tests
Must add back order ... | Author :
Created : Fri Sep 20 06:47:37 2002
(deftest make-array.1
(let ((a (make-array-with-checks 10)))
(and (symbolp a) a))
nil)
(deftest make-array.1a
(let ((a (make-array-with-checks '(10))))
(and (symbolp a) a))
nil)
(deftest make-array.2
(make-array-with-checks 3 :initial-eleme... |
52890c79a16cb7a2e81d7ca5af77fb6f951b99c0933b3bc42f8110a18e54c2ef | yetibot/yetibot | jargon.clj | (ns yetibot.commands.jargon
(:require
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.models.jargon :refer [jargon]]))
(defn list-cmd
"jargon list # list known jargon"
{:yb/cat #{:fun}}
[_] jargon)
(defn rand-jargon
"jargon # respond with random jargon"
{:yb/cat #{:fun}}
[_] (rand-nth jargon))
... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/jargon.clj | clojure | (ns yetibot.commands.jargon
(:require
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.models.jargon :refer [jargon]]))
(defn list-cmd
"jargon list # list known jargon"
{:yb/cat #{:fun}}
[_] jargon)
(defn rand-jargon
"jargon # respond with random jargon"
{:yb/cat #{:fun}}
[_] (rand-nth jargon))
... | |
2949d005bff212676c2e3d78af464c94517665ef36043ecf9ccf6a166e73a5ec | EFanZh/EOPL-Exercises | exercise-1.34-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-1.34.rkt")
(check-equal? (path 17 '(14 (7 () (12 () ()))
(26 (20 (17 () ())
())
(31 () ()))))
'(right left left))
(check-equal? (path 7 '(... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-1.34-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-1.34.rkt")
(check-equal? (path 17 '(14 (7 () (12 () ()))
(26 (20 (17 () ())
())
(31 () ()))))
'(right left left))
(check-equal? (path 7 '(... | |
f2b8592dea3c63fe7050b23a3f8cc3ba06a47bfe148a317dc8bd78f368509974 | KestrelInstitute/Specware | dist-utils.lisp | (in-package :common-lisp-user)
for simplicity , use the same package that GatherComponents.lisp uses
(defpackage :Distribution)
(defvar Distribution::*verbose* t)
#+Allegro (provide "dist-utils")
| null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Release/LispUtilities/dist-utils.lisp | lisp | (in-package :common-lisp-user)
for simplicity , use the same package that GatherComponents.lisp uses
(defpackage :Distribution)
(defvar Distribution::*verbose* t)
#+Allegro (provide "dist-utils")
| |
c35c76c88a1bd6b921b5448e33f52050f668a1dcfdfc7567e7422e92de99e5ba | facebookarchive/lex-pass | Stmt.hs | module Lang.Php.Ast.Stmt (
module Lang.Php.Ast.StmtParse,
module Lang.Php.Ast.StmtTypes,
module Lang.Php.Ast.StmtUnparse
) where
import Lang.Php.Ast.StmtParse
import Lang.Php.Ast.StmtTypes
import Lang.Php.Ast.StmtUnparse
| null | https://raw.githubusercontent.com/facebookarchive/lex-pass/dcfa9560a95f2c1344e15493dabcc1645b1ca5e8/src/Lang/Php/Ast/Stmt.hs | haskell | module Lang.Php.Ast.Stmt (
module Lang.Php.Ast.StmtParse,
module Lang.Php.Ast.StmtTypes,
module Lang.Php.Ast.StmtUnparse
) where
import Lang.Php.Ast.StmtParse
import Lang.Php.Ast.StmtTypes
import Lang.Php.Ast.StmtUnparse
| |
8c9566d2c89844a37cc0fa97ee5ec02e46180037d7641c8ef35749172530a1b7 | geoffder/dometyl-keyboard | eyelet.mli | open OCADml
open OSCADml
type hole =
| Through
| Inset of
{ depth : float
; punch : [ `Rel of float | `Abs of float ] option
}
type sink =
| Pan of float
| Counter
type fastener =
| SameMagnet
| Magnet of
{ rad : float
; thickness : float
}
| Screw of
{ head_ra... | null | https://raw.githubusercontent.com/geoffder/dometyl-keyboard/5efa847361e0ceb80de5b03dd28a702d6b42412d/lib/eyelet.mli | ocaml | open OCADml
open OSCADml
type hole =
| Through
| Inset of
{ depth : float
; punch : [ `Rel of float | `Abs of float ] option
}
type sink =
| Pan of float
| Counter
type fastener =
| SameMagnet
| Magnet of
{ rad : float
; thickness : float
}
| Screw of
{ head_ra... | |
1a0e85c344ea97f4a64624d3507646e6cd873a3a539b7da833cd99457bc9a623 | SimulaVR/godot-haskell | Panel.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Panel () where
import Data.Coerce
import Foreign.C
import G... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Panel.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Panel () where
import Data.Coerce
import Foreign.C
import G... | |
4ab6476bd028fd108bc47f4d774a1525485f43d60d0eb61c25c5f844f270a3bd | schnef/pm | pm_init.erl | -module(pm_init).
-export([main/1]).
main(_) ->
pm_db:install(),
init:stop().
| null | https://raw.githubusercontent.com/schnef/pm/8691c9688c51dfb0aaa4d089ef59c0af54c27e63/src/pm_init.erl | erlang | -module(pm_init).
-export([main/1]).
main(_) ->
pm_db:install(),
init:stop().
| |
f677321c0a45cb1e2ecdb75769f27bfef39a7876afc33979e3976e4a3e991a62 | uhc/uhc | Parser.hs | -------------------------------------------------------------------------
Text
-------------------------------------------------------------------------
Text is parsed in 2 steps , the first step is done here by parsing only the meta data required to find out the types of the various chunks of text .
Text is pa... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/text2text/Text/Parser.hs | haskell | -----------------------------------------------------------------------
-----------------------------------------------------------------------
-----------------------------------------------------------------------
-----------------------------------------------------------------------
--------------------------------... | Text
Text is parsed in 2 steps , the first step is done here by parsing only the meta data required to find out the types of the various chunks of text .
Text is parsed in 2 steps, the first step is done here by parsing only the meta data required to find out the types of the various chunks of text.
-}
module ... |
692bc45cc6295cea5d6294b6dcf661ebf04bfe872ad6a6e34c71e7fd38470bd2 | basho-labs/fling | fling_smoke.erl | -module(fling_smoke).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
smoke_test_() ->
{timeout, 60, fun() -> smoke() end}.
smoke_get_key({K, _V}) -> K.
smoke_get_value({_K, V}) -> V.
smoke() ->
application:load(fling),
application:set_env(fling, secs_per_tick, 1),
{ok, _} = applica... | null | https://raw.githubusercontent.com/basho-labs/fling/b6e25809f43b73461cc23d33d17b1e4f106b9cb3/test/fling_smoke.erl | erlang | -module(fling_smoke).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
smoke_test_() ->
{timeout, 60, fun() -> smoke() end}.
smoke_get_key({K, _V}) -> K.
smoke_get_value({_K, V}) -> V.
smoke() ->
application:load(fling),
application:set_env(fling, secs_per_tick, 1),
{ok, _} = applica... | |
73ddaa6a432f970b39d796f470160960fab4d1b5f3d22f9633051c2a0beef93c | tmarble/webica | web_driver.clj | (ns webica.web-driver
"Clojure binding for Selenium class WebDriver"
(:refer-clojure :exclude [get])
(:require [clojure.core :as clj]
[webica.core :as w])
(:import [org.openqa.selenium
WebDriver]))
(w/intern-java WebDriver *ns*)
| null | https://raw.githubusercontent.com/tmarble/webica/c48c4a750492430607042d0f15082af7d487dc08/src/webica/web_driver.clj | clojure | (ns webica.web-driver
"Clojure binding for Selenium class WebDriver"
(:refer-clojure :exclude [get])
(:require [clojure.core :as clj]
[webica.core :as w])
(:import [org.openqa.selenium
WebDriver]))
(w/intern-java WebDriver *ns*)
| |
650b8b0aab1021d4b047d07238f95f37d4518e473619a0344b46205c644eb033 | wilkerlucio/cljc-misc | math.cljc | (ns com.wsscode.misc.math)
(defn floor [x]
#?(:clj (int (Math/floor ^double x))
:cljs (js/Math.floor x)))
(defn round [x]
#?(:clj (Math/round ^double x)
:cljs (js/Math.round x)))
(defn ceil [x]
#?(:clj (int (Math/ceil ^double x))
:cljs (js/Math.ceil x)))
(defn divmod [n d]
[(floor (/ n d))... | null | https://raw.githubusercontent.com/wilkerlucio/cljc-misc/a54ac1bbfa23c4bac15162880f4b9141f9136e04/src/main/com/wsscode/misc/math.cljc | clojure | (ns com.wsscode.misc.math)
(defn floor [x]
#?(:clj (int (Math/floor ^double x))
:cljs (js/Math.floor x)))
(defn round [x]
#?(:clj (Math/round ^double x)
:cljs (js/Math.round x)))
(defn ceil [x]
#?(:clj (int (Math/ceil ^double x))
:cljs (js/Math.ceil x)))
(defn divmod [n d]
[(floor (/ n d))... | |
38f1a9b2fc702ac47dd4d02045472e3961a2535adaa1e99414ce2ef29b81bca7 | sgbj/MaximaSharp | zbesy.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" 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 46c1f6a93b0d 2012/05/03 04:40:28 toy $... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/zbesy.lisp | lisp | Compiled by f2cl version:
"f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ "
" macros.l , v fceac53... |
73ca57a4bc4baf2de53bb5c183847f7b5cb0c2d6f6f7a23ecef9c50713ea3da9 | dbuenzli/webs | webs_cli.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The webs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/webs/a3300bee6bc7a54eeba4082988728d9bb777d7ac/src/webs_cli.ml | ocaml | Quick service | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The webs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... |
1f738a0ed24c457842e0bd6c643e6b2424e217d85e15492680686a1b908b20ea | chaoxu/fancy-walks | B.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances #
{-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control ... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codeforces.com/89/B.hs | haskell | # OPTIONS_GHC -O2 #
--------------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------------------------- | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances #
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control . Monad . State
import C... |
644d9edfac5b2572128a0dcc95bc7ddd3a2d6537aa6d9d232c9177ea1b30f600 | j-mie6/ParsleyHaskell | ParserOps.hs | |
Module : . ParserOps
Description : Combinators that interact with user - defined functions .
License : BSD-3 - Clause
Maintainer : : stable
This module contains the definition of ` ParserOps ` , which is used to generalise
the representation of user - defined functions to either ` De... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley/src/ghc/Parsley/ParserOps.hs | haskell | ^ The predicate that a character must satisfy to be parsed
^ A parser that matches a single character matching the predicate
^ A list of predicates and their outcomes
^ A parser whose result is used to choose an outcome
^ A parser who will be executed if no predicates succeed | |
Module : . ParserOps
Description : Combinators that interact with user - defined functions .
License : BSD-3 - Clause
Maintainer : : stable
This module contains the definition of ` ParserOps ` , which is used to generalise
the representation of user - defined functions to either ` De... |
5d04a417f46e711701d6fe5f2a9332e616c6c483f834bc34845da73969809a8a | JanAhrens/yesod-oauth-demo | Notes.hs | # LANGUAGE OverloadedStrings , FlexibleInstances #
module Handler.Notes where
import Import
import Data.Aeson hiding (object)
instance ToJSON (Entity Note) where
toJSON (Entity note_id (Note user subject content)) = object
[ "id" .= note_id
, "user" .= user
, "subject" .= subject
, "content"... | null | https://raw.githubusercontent.com/JanAhrens/yesod-oauth-demo/0966dc7907c35ce483f4842752dd89e8da84c542/Handler/Notes.hs | haskell | # LANGUAGE OverloadedStrings , FlexibleInstances #
module Handler.Notes where
import Import
import Data.Aeson hiding (object)
instance ToJSON (Entity Note) where
toJSON (Entity note_id (Note user subject content)) = object
[ "id" .= note_id
, "user" .= user
, "subject" .= subject
, "content"... | |
8feee5e2f22e49910d7f8cefe4962808f13779e5b21122af38c3f9a537105341 | fission-codes/fission | Class.hs | module Fission.Web.Server.App.URL.Class (HasAppURL (..)) where
import Fission.Prelude
import Fission.URL.Types
-- | Interface for getting the base app URL
class Monad m => HasAppURL m where
-- | Get the base app URL (at time of writing: 'fission.app')
getAppURL :: m URL
| null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/App/URL/Class.hs | haskell | | Interface for getting the base app URL
| Get the base app URL (at time of writing: 'fission.app') | module Fission.Web.Server.App.URL.Class (HasAppURL (..)) where
import Fission.Prelude
import Fission.URL.Types
class Monad m => HasAppURL m where
getAppURL :: m URL
|
1bc836153ee40846fbf454ae375d8ae680e3320196a413a70f75d2514f3306fb | skynet-gh/skylobby | download_test.clj | (ns skylobby.fx.download-test
(:require
[cljfx.api :as fx]
[clojure.test :refer [deftest is]]
[skylobby.fx.download :as fx.download]))
(set! *warn-on-reflection* true)
(deftest downloader-root
(is (map?
(fx.download/downloader-root
{:fx/context (fx/create-context nil)})))
(is (ma... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/7895ad30d992b790ffbffcd2d7be2cf17f8df794/test/clj/skylobby/fx/download_test.clj | clojure | (ns skylobby.fx.download-test
(:require
[cljfx.api :as fx]
[clojure.test :refer [deftest is]]
[skylobby.fx.download :as fx.download]))
(set! *warn-on-reflection* true)
(deftest downloader-root
(is (map?
(fx.download/downloader-root
{:fx/context (fx/create-context nil)})))
(is (ma... | |
2832a7037e7d9296d48d61c8199f54af62f2965a23155620c083decfb647f1db | spurious/snd-mirror | binary-io.scm | ;;; read/write binary (sound) files
;;;
;;; names are read|write b|l int|float n,
so read - bint32 reads the next 4 bytes from the current input port ,
interpreting them as a big - endian 32 - bit integer
(provide 'snd-binary-io.scm)
;;; -------- strings (0-terminated)
(define (io-read-string)
(do ((char... | null | https://raw.githubusercontent.com/spurious/snd-mirror/8e7a643c840592797c29384ffe07c87ba5c0a3eb/binary-io.scm | scheme | read/write binary (sound) files
names are read|write b|l int|float n,
-------- strings (0-terminated)
(for-each write-char str)
-------- strings (unterminated)
(do ((str (make-string len))
(i 0 (+ i 1)))
((= i len) str)
(set! (str i) (read-char))))
(for-each write-char str))
this depends o... | so read - bint32 reads the next 4 bytes from the current input port ,
interpreting them as a big - endian 32 - bit integer
(provide 'snd-binary-io.scm)
(define (io-read-string)
(do ((chars ())
(c (read-byte) (read-byte)))
((or (eof-object? c)
(= c 0))
(reverse (apply string chars))... |
c0a75cc6634674c8db5a13e730d17fa36f54ae069eb08a6eb1abb92a3a67dcd1 | mfelleisen/RacketSchool | testing-in-impl.rkt | #lang RecImpl
+ | null | https://raw.githubusercontent.com/mfelleisen/RacketSchool/ada599f31d548a538a37d998b32d80aa881d699a/Plan/Resources/testing-in-impl.rkt | racket | #lang RecImpl
+ | |
89068e6ca93e5da9a68aa66856ab00f0d66b3a8420cb0e934f6fd6841198a5f8 | jgertm/lang | type_checker_test.clj | (ns lang.type-checker-test
(:require [clojure.test :refer [deftest is testing]]
[lang.module :as module]
[lang.test-prelude :refer :all]
matcher-combinators.test))
(deftest typecheck-atoms
(let [module
(run :type-checker
(defmodule lang.type-checker-test.atom-d... | null | https://raw.githubusercontent.com/jgertm/lang/5a4d73f01d93d7615e44f8ce2dfe8a237dd80766/test/lang/type_checker_test.clj | clojure | (ns lang.type-checker-test
(:require [clojure.test :refer [deftest is testing]]
[lang.module :as module]
[lang.test-prelude :refer :all]
matcher-combinators.test))
(deftest typecheck-atoms
(let [module
(run :type-checker
(defmodule lang.type-checker-test.atom-d... | |
c6941f7a1b4cbd1127bc4c1e27f1819bc363eb8d830b81b1f628e01b9a11d206 | emqx/emqx | emqx_mgmt_api_stats.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_management/src/emqx_mgmt_api_stats.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_mgmt_api_stats).
-behaviour(minirest_api).
-include_lib("typerefl/include/types.hr... |
bfc67d0f6908d098b7ac696898a30cec99ae0a23dbfdf7292e2ff12cf8bbcaee | robert-strandh/CLIMatis | zone-test.lisp | (in-package #:clim3-zone-test)
| null | https://raw.githubusercontent.com/robert-strandh/CLIMatis/4949ddcc46d3f81596f956d12f64035e04589b29/Zone/zone-test.lisp | lisp | (in-package #:clim3-zone-test)
| |
2131984a6f8d3ff7069eace0bf075269b4ab4ca40b74edff88bab3b18624280e | B-Lang-org/bsc | PFPrint.hs | module PFPrint(PPrint(..), module Pretty, PDetail(..),
ppReadable, ppReadableIndent, ppAll, ppDebug, ppString, pp80,
pparen, pfPrint, sepList, maxPrec,
PVPrint(..),
pvpReadable, pvpReadableIndent, pvpAll, pvpDebug, pvpString, pvpStringNQ, pvp80,
pvparen,
pfpReadable, pfpR... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/PFPrint.hs | haskell | import Debug.Trace | module PFPrint(PPrint(..), module Pretty, PDetail(..),
ppReadable, ppReadableIndent, ppAll, ppDebug, ppString, pp80,
pparen, pfPrint, sepList, maxPrec,
PVPrint(..),
pvpReadable, pvpReadableIndent, pvpAll, pvpDebug, pvpString, pvpStringNQ, pvp80,
pvparen,
pfpReadable, pfpR... |
62b275b8b53ce7a48c47b72d8cc41880ad084e4c36e18c5c2ee627e8f86d10d6 | tezos/tezos-mirror | cmdline.ml | (** [interval] is the type of inclusive intervals. *)
type interval = Interval.t
open Interval
type options = {
prod_deg : interval option;
att_deg : interval option;
cons_deg : interval option;
ngraphs : int; (** Number of graphs to sample *)
nroutings : int; (** Number of routings per graph to sample *)... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/bbca5502eb430d3915ad697259d3bffc62c2d01d/devtools/simdal/bin/cmdline.ml | ocaml | * [interval] is the type of inclusive intervals.
* Number of graphs to sample
* Number of routings per graph to sample
* Redundancy factor induced by erasure code | type interval = Interval.t
open Interval
type options = {
prod_deg : interval option;
att_deg : interval option;
cons_deg : interval option;
autocorrelation_drop : int;
with_consumers : bool;
min_relayed_shards : int;
verbose : bool;
message_kb : float;
data_root : string;
flat_stake : bool;
ana... |
1f46ce36d0c6ed49f984847d11e2099c23329c3893b9a375ca3cda3d22b43772 | morloc-project/morloc | Namespace.hs | # LANGUAGE ViewPatterns , OverloadedStrings #
|
Module : Morloc . Namespace
Description : All types and datastructures
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.Namespace
Description : All types and datastructures
Copyright ... | null | https://raw.githubusercontent.com/morloc-project/morloc/eb2ca1a4214c0b504ed3463c3f9306aa21cf1f3e/library/Morloc/Namespace.hs | haskell | ** Synonyms
** Other functors
** Indexed
** Newtypes
** Language
** Data
** Serialization
------------------
** Error handling
** Configuration
** Package metadata
* Types
* Typechecking
* Mostly frontend expressions
** Type extensions
** Types used in post-typechecking tree
** Typeclasses
** kludge
|... | # LANGUAGE ViewPatterns , OverloadedStrings #
|
Module : Morloc . Namespace
Description : All types and datastructures
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.Namespace
Description : All types and datastructures
Copyright ... |
3fca53373998b7ef02925b0f7a3383f2cad6ed36e3687ea4bd839ca03df5e4ce | ferd/zippers | prop_zipper_bintrees.erl | -module(prop_zipper_bintrees).
-include_lib("proper/include/proper.hrl").
%% Zipping to the top without any previous root to
%% do so should return undefined.
prop_top_failure() ->
?FORALL(Tree, root(any()),
equals(undefined, zipper_bintrees:top(Tree))).
%% Zipping to the right without any right root bran... | null | https://raw.githubusercontent.com/ferd/zippers/3a01bb0b214d354885a47e2865d11bbe1bfbaf7a/test/prop_zipper_bintrees.erl | erlang | Zipping to the top without any previous root to
do so should return undefined.
Zipping to the right without any right root branch
to do so should return undefined.
Zipping to the left without any left root branch
to do so should return undefined.
Trying to obtain a value from a branch without any value
(ex.: ge... | -module(prop_zipper_bintrees).
-include_lib("proper/include/proper.hrl").
prop_top_failure() ->
?FORALL(Tree, root(any()),
equals(undefined, zipper_bintrees:top(Tree))).
prop_right_failure() ->
?FORALL(Tree, root(any()),
equals(undefined,
zipper_bintrees:right(zipper_bintrees:ri... |
e5613f8245698eef8bcf44d9e3bc403e981691fd2c2202442427f125d0f87b4f | tezos/tezos-mirror | analysis.ml | module Tree = Simdal.Sampler.Network_stats_helpers.Tree
type tree = Tree.t
type subgraph_predicate = Simdal.G.vertex -> bool
type 'a t = {
pre_shard_iteration : Simdal.Sampler.state -> unit;
sample :
Simdal.Sampler.state -> shard:int -> subgraph_predicate -> tree list -> unit;
post_shard_iteration : Simdal... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/bbca5502eb430d3915ad697259d3bffc62c2d01d/devtools/simdal/bin/analysis.ml | ocaml | probability that the receiver fails
average shard fill rate for largest receiver | module Tree = Simdal.Sampler.Network_stats_helpers.Tree
type tree = Tree.t
type subgraph_predicate = Simdal.G.vertex -> bool
type 'a t = {
pre_shard_iteration : Simdal.Sampler.state -> unit;
sample :
Simdal.Sampler.state -> shard:int -> subgraph_predicate -> tree list -> unit;
post_shard_iteration : Simdal... |
a599d7a969c5c091f5ffc40fc19ad0b6aa677473f18822fecc3d8296c6e5bc18 | onedata/op-worker | harvesting_worker.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% worker_plugin used for adding harv... | null | https://raw.githubusercontent.com/onedata/op-worker/171b05ac629acb4fc337b7dc2f5bf7c433d2c23f/src/modules/harvesting/harvesting_worker.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
worker_plugin used for adding harvesting supervision tree to the
main tree.
For more details on harvesting please read the docs
in {@link harvesting_stream} module.
@e... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(harvesting_worker).
-author("Jakub Kudzia").
-behaviour(worker_plugin_behaviour).
-include("modules/harvesting/harvesting.hrl").
-include_lib("ctool/include/logging.hrl").
-export([init/1... |
ba1a323384a3328c1d7e7a05e000e7e0107efda700da4179faa7f616978dd62b | patricoferris/ocaml-multicore-monorepo | paf_cohttp.mli | val scheme : [ `HTTP | `HTTPS ] Mimic.value
val port : int Mimic.value
val domain_name : [ `host ] Domain_name.t Mimic.value
val ipaddr : Ipaddr.t Mimic.value
val sleep : (int64 -> unit Lwt.t) Mimic.value
val with_uri : Uri.t -> Mimic.ctx -> Mimic.ctx
include Cohttp_lwt.S.Client with type ctx = Mimic.ctx
| null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/paf/lib/paf_cohttp.mli | ocaml | val scheme : [ `HTTP | `HTTPS ] Mimic.value
val port : int Mimic.value
val domain_name : [ `host ] Domain_name.t Mimic.value
val ipaddr : Ipaddr.t Mimic.value
val sleep : (int64 -> unit Lwt.t) Mimic.value
val with_uri : Uri.t -> Mimic.ctx -> Mimic.ctx
include Cohttp_lwt.S.Client with type ctx = Mimic.ctx
| |
edaf0e9db36b444d4deba47f1c6edf107018b519188c8558429ff1c5cd865ad7 | tezos/tezos-mirror | prevalidator_internal.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/448daee0f4ae76893ae524536e428aa0e22f1d60/src/lib_shell/prevalidator_internal.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2018 - 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , W... |
28c2bf4329e043f96f00f653687d21c894dcf97cc72e29ab71311a635461b301 | zhuangxm/clj-rpc | adjust_response.clj | (ns clj-rpc.test.adjust-response
(:use [midje.sweet]
[clj-rpc.helper])
(:require [clj-rpc.context :as context]
[clj-rpc.user-data :as store]
[clj-rpc.server :as server]))
test can define new mutlimethod function of command options
(defn succ-add
"连续+"
[x]
(let [v (or (store/ge... | null | https://raw.githubusercontent.com/zhuangxm/clj-rpc/73a2f66b5ed0cce865d102acb49ba229203343ad/test/clj_rpc/test/adjust_response.clj | clojure | 测试使用的cookie key name
this option do nothing with method request
this option add value to result and save it to the session
render-response execute reserve order of the options
export command with new define option | (ns clj-rpc.test.adjust-response
(:use [midje.sweet]
[clj-rpc.helper])
(:require [clj-rpc.context :as context]
[clj-rpc.user-data :as store]
[clj-rpc.server :as server]))
test can define new mutlimethod function of command options
(defn succ-add
"连续+"
[x]
(let [v (or (store/ge... |
c5a4cb76a12cd513cccb186151da6593b10564dab6a5a1ac7138e32319ae8cb3 | janestreet/merlin-jst | typedecl.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_414/typing/typedecl.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
open Format
val transl_type_decl:
Env.t -> Asttypes.rec_flag -> Parsetree.type_declarati... |
cc811cc9179fb2cf37e8f00f0d87d5e2f18dd064f8b78dcf1993982e45825b54 | malcolmreynolds/GSLL | vector-sub.lisp | Regression test VECTOR - SUB for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST VECTOR-SUB
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(-25.57 -25.88 9.440001))
(MULTIPLE-VALUE-LIST
(LET ((V1
... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/vector-sub.lisp | lisp | Regression test VECTOR - SUB for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST VECTOR-SUB
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(-25.57 -25.88 9.440001))
(MULTIPLE-VALUE-LIST
(LET ((V1
... | |
2a310dd42b5acb06a6053c26ff4905fbfd4ee535a2a74b271c97f8e88b1f90f9 | kssytsrk/cellular-automata | colors.lisp | ;;;; -*-lisp-*-
;;;;
;;;; colors.lisp
(in-package #:ca)
(defparameter *colors-grayscale*
(list (cons 0 (sdl:color :r 255 :g 255 :b 255 :a 255))
(cons 1 (sdl:color :r 100 :g 100 :b 100 :a 255))
(cons 2 (sdl:color :r 20 :g 20 :b 20 :a 255))
(cons 3 (sdl:color :r 50 :g 50 :b 50 :a 255))
(co... | null | https://raw.githubusercontent.com/kssytsrk/cellular-automata/173ada0a89b6095501d91829288927e8d46ccd9d/colors.lisp | lisp | -*-lisp-*-
colors.lisp |
(in-package #:ca)
(defparameter *colors-grayscale*
(list (cons 0 (sdl:color :r 255 :g 255 :b 255 :a 255))
(cons 1 (sdl:color :r 100 :g 100 :b 100 :a 255))
(cons 2 (sdl:color :r 20 :g 20 :b 20 :a 255))
(cons 3 (sdl:color :r 50 :g 50 :b 50 :a 255))
(cons 4 (sdl:color :r 70 :g 70 :b 70 ... |
12af58318b5a498c0baec34e1a4caae502709325d44011c0327e8ecd5181942a | turtl/api | crypto.lisp | (in-package :turtl)
(defun sha256 (sequence/string)
"Return a *string* sha256 hash of the given string/byte sequence."
(string-downcase
(ironclad:byte-array-to-hex-string
(ironclad:digest-sequence (ironclad:make-digest 'ironclad:sha256)
(if (stringp sequence/string)
... | null | https://raw.githubusercontent.com/turtl/api/20ab4cc91128921300913b885eb1e201a5e0fc3f/lib/crypto.lisp | lisp | (sequence (coerce sequence '(vector (unsigned-byte 8))))
(hash (ironclad:digest-sequence :md5 sequence)) | (in-package :turtl)
(defun sha256 (sequence/string)
"Return a *string* sha256 hash of the given string/byte sequence."
(string-downcase
(ironclad:byte-array-to-hex-string
(ironclad:digest-sequence (ironclad:make-digest 'ironclad:sha256)
(if (stringp sequence/string)
... |
0558a31852cbf38377908dc35258241628c484ac67ad3f98767af9651c04b5e3 | dhall-lang/dhall-json | Main.hs | {-# LANGUAGE ApplicativeDo #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Exception (SomeException)
import Data.Monoid ((<>))
import Dhall.JSON (Conversion)
import Options.Applicative (Parser, ParserInfo)
import qualified Control.Exception
import qualified... | null | https://raw.githubusercontent.com/dhall-lang/dhall-json/082fb2403acd636fdd05e21c96005e455e256a86/dhall-to-json/Main.hs | haskell | # LANGUAGE ApplicativeDo #
# LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Main where
import Control.Exception (SomeException)
import Data.Monoid ((<>))
import Dhall.JSON (Conversion)
import Options.Applicative (Parser, ParserInfo)
import qualified Control.Exception
import qualified Data.Aeson
import qualified Data.Aeson.Encode.Pretty
import qualified... |
0ab90b779fadd7c4daa2564a3e26e322673f66defb5c04915fd3031a052a8cff | conscell/hugs-android | Cpphs.hs | -----------------------------------------------------------------------------
-- |
Module : Language . Preprocessor . Cpphs
Copyright : 2000 - 2006
-- Licence : LGPL
--
Maintainer : < >
-- Stability : experimental
-- Portability : All
--
-- Include the interface that is exported
---... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/cpphs/Language/Preprocessor/Cpphs.hs | haskell | ---------------------------------------------------------------------------
|
Licence : LGPL
Stability : experimental
Portability : All
Include the interface that is exported
--------------------------------------------------------------------------- | Module : Language . Preprocessor . Cpphs
Copyright : 2000 - 2006
Maintainer : < >
module Language.Preprocessor.Cpphs (runCpphs, cppIfdef, macroPass, CpphsOption(..), parseOption) where
import Language.Preprocessor.Cpphs.CppIfdef(cppIfdef)
import Language.Preprocessor.Cpphs.MacroPass(macro... |
47f388063f4f4819a0b691ab5b096db121d26d6846c7b8e30c5d7131b3568c3a | jarcane/heresy | collatz.rkt | #lang heresy
(def fn collatz (n)
(select
((one? n) '(1))
((even? n) (join n (collatz (/ n 2))))
((odd? n) (join n (collatz (+ (* 3 n) 1))))))
(def fn coll-count (n)
(let recur ([x n]
[c 0])
(select
((one? x) `(,n ,c))
((even? x)
(recur (/ x 2) (inc c)))
(else (recur... | null | https://raw.githubusercontent.com/jarcane/heresy/a736b69178dffa2ef97f5eb5204f3e06840088c2/examples/collatz.rkt | racket | #lang heresy
(def fn collatz (n)
(select
((one? n) '(1))
((even? n) (join n (collatz (/ n 2))))
((odd? n) (join n (collatz (+ (* 3 n) 1))))))
(def fn coll-count (n)
(let recur ([x n]
[c 0])
(select
((one? x) `(,n ,c))
((even? x)
(recur (/ x 2) (inc c)))
(else (recur... | |
8ee62fd27dd65fb05296b007efa4cfa14bdd21ab8e4d8664b6bbed23ad71da58 | ejgallego/coq-serapi | jslibmng.mli | JsCoq
* Copyright ( C ) 2016 / Mines ParisTech
*
* LICENSE : +
* Copyright (C) 2016 Emilio Gallego / Mines ParisTech
*
* LICENSE: GPLv3+
*)
Library management for JsCoq .
*
* Due to the large size of Coq libraries , we perform caching and lazy
* loading in the browser .
*
* Due to t... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/jscoq/coq-js/jslibmng.mli | ocaml | Information about the bundle, we could well put the json here
Information about loading progress
Bundle [pkg] is loaded
* [info_pkg out_fn base_path lib_path pkgs] gathers package list [pkgs] from
directory [lib_path], emits events using [out_fn].
* [load_pkg base_path pkg_file] loads package [pkg_file]
* ... | JsCoq
* Copyright ( C ) 2016 / Mines ParisTech
*
* LICENSE : +
* Copyright (C) 2016 Emilio Gallego / Mines ParisTech
*
* LICENSE: GPLv3+
*)
Library management for JsCoq .
*
* Due to the large size of Coq libraries , we perform caching and lazy
* loading in the browser .
*
* Due to t... |
d9b1c30b09c93ad2a14f437924e809642db7ffc09c42a6ab6c68ae3224fed0b1 | bract/bract.core | echo.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/bract/bract.core/625b8738554b1e1b61bd8522397fb698fb12d3d3/src/bract/core/echo.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns bract.core.echo
"Verbose echo utility functions."
(:require
[clojure.string :as string]
[bract.core.util :as util])
(:import
[bract.core Echo]))
(def ^:dynamic *inducer-hierarchy* [])
(def ^:dynamic *inducer-prefix* nil)
(defmacro with-inducer-... |
891b9d2015d8a35d2b85186e44ca3aefd25464f764f7df78c9d64ac758657424 | samply/blaze | rocksdb_spec.clj | (ns blaze.db.kv.rocksdb-spec
(:require
[blaze.db.kv.rocksdb.spec]))
| null | https://raw.githubusercontent.com/samply/blaze/281ca0f35c845ed6e7b7f37fe2d4b9a060b065ca/modules/rocksdb/src/blaze/db/kv/rocksdb_spec.clj | clojure | (ns blaze.db.kv.rocksdb-spec
(:require
[blaze.db.kv.rocksdb.spec]))
| |
88a28505580a58dd79aad71752ee79689fa07a3b27b73293c0d9a11f79c26d76 | robert-strandh/SICL | convert-special-binding.lisp | (cl:in-package #:cleavir-cst-to-ast)
(defmethod convert-special-binding
(client variable-cst value-ast body-function environment)
(cleavir-ast:make-ast 'cleavir-ast:bind-ast
:name-ast (cleavir-ast:make-ast 'cleavir-ast:literal-ast
:value (cst:raw variable-cst))
:value-ast value-ast
:b... | null | https://raw.githubusercontent.com/robert-strandh/SICL/5dbb0e8e4ab7fc1fd729fa2876c3d1d28823638a/Code/Cleavir/CST-to-AST/convert-special-binding.lisp | lisp | (cl:in-package #:cleavir-cst-to-ast)
(defmethod convert-special-binding
(client variable-cst value-ast body-function environment)
(cleavir-ast:make-ast 'cleavir-ast:bind-ast
:name-ast (cleavir-ast:make-ast 'cleavir-ast:literal-ast
:value (cst:raw variable-cst))
:value-ast value-ast
:b... | |
e6fb5af8eb2bf390cec093b132db97d00a3636d4eb74ebf34e19e487c91c4d8e | clj-kondo/clj-kondo | ignored.clj | #_{:clj-kondo/ignore [:namespace-name-mismatch]}
(ns ignore-that-the-namespace-does-not-match-the-filename)
;; This should NOT trigger the linter :namespace-name-mismatch
;; because the linter is ignored.
| null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/a26bae8bfd26d4e176844294dd48e06ba3585164/corpus/namespace_name_mismatch/ignored.clj | clojure | This should NOT trigger the linter :namespace-name-mismatch
because the linter is ignored. | #_{:clj-kondo/ignore [:namespace-name-mismatch]}
(ns ignore-that-the-namespace-does-not-match-the-filename)
|
63a684a0b89f835643a82b34fdfb233c8cce95f4f8c348fe80f301837200480a | abcdw/rde | gnupg.scm | (define-module (gnu home-services gnupg)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-module (gnu home-services-utils)
#:use-module (gnu packages)
#:use-module (gnu packages gnupg)
#:use-module (gnu services configuration)
#:use-module (guix gexp)
#:use-module (guix i... | null | https://raw.githubusercontent.com/abcdw/rde/7fa3798b32968a46ba19d076561124ff86e0f450/src/gnu/home-services/gnupg.scm | scheme | Commentary:
(service home-gnupg-service-type
(home-gnupg-configuration
(home-gpg-configuration
(extra-config
'((cert-digest-algo . "SHA256")
"SHA384"
"SHA256"
... | (define-module (gnu home-services gnupg)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-module (gnu home-services-utils)
#:use-module (gnu packages)
#:use-module (gnu packages gnupg)
#:use-module (gnu services configuration)
#:use-module (guix gexp)
#:use-module (guix i... |
26797d664a1e19969b1ca641d6fa125a2e0ebb3f83b23d951d68ec2f5972fb40 | draperlaboratory/VIBES | abi.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-opt/lib/abi.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
* Passes relating to function calls and the ABI requirements thereof .
open Bap.Std
ope... |
00a9bf14725356d3975e3aff5c82d1c6cee0b4729a6354e6455e046e35c89536 | sebashack/servantRestfulAPI | Operations.hs | module HelperLibs.SCalendar.Operations where
import Control.Monad
import HelperLibs.SCalendar.BreadCrumbs
import HelperLibs.SCalendar.DataTypes
import HelperLibs.SCalendar.Internal
import qualified Data.Set as S
import qualified Data.Time as TM
import qualified Data.Text as T
basic calendar constructor : It takes... | null | https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/HelperLibs/SCalendar/Operations.hs | haskell | number of days we want.
This is like createCalendar, but this function attaches a set of Identifiers to the Calendar.
calendar is properly updated.
Create a bigger calendar with a space for our
smaller calendar.
put the smaller calendar in the slot and update the larger calendar.
Given an interval, an amount o... | module HelperLibs.SCalendar.Operations where
import Control.Monad
import HelperLibs.SCalendar.BreadCrumbs
import HelperLibs.SCalendar.DataTypes
import HelperLibs.SCalendar.Internal
import qualified Data.Set as S
import qualified Data.Time as TM
import qualified Data.Text as T
basic calendar constructor : It takes... |
855d0678a50b69dcd6555725e44765085ecd3fc7e59ec9333cbc062860d52b95 | erlangonrails/devdb | iq.erl | Copyright ProcessOne 2006 - 2010 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this s... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/testsuite/iq.erl | erlang |
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the Licens... | Copyright ProcessOne 2006 - 2010 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(iq).
-include_lib("eunit/include/e... |
57f2ad833e391e232e3c48aba3f99f799fbc1217bb7469c466c367b42841afe8 | nuprl/gradual-typing-performance | universe.rkt | (module universe mzscheme
(provide (all-from 2htdp/universe))
(require 2htdp/universe))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/teachpack/2htdp/universe.rkt | racket | (module universe mzscheme
(provide (all-from 2htdp/universe))
(require 2htdp/universe))
| |
dfcaeca408033479e532edf864812afbdf1af5a0423f9706aeb206bf553861f5 | Peaker/git-mediate | Main.hs | # LANGUAGE NoImplicitPrelude , OverloadedRecordDot , FlexibleContexts #
module Main (main) where
import Conflict (Conflict(..))
import qualified Conflict
import qualified Control.Exception as E
import Control.Monad (when, unless, filterM)
import Data.Algorithm.Diff (Diff, PolyDiff(..))
i... | null | https://raw.githubusercontent.com/Peaker/git-mediate/5c31d5885abd78f34502247c8a8bd03cc73784ac/src/Main.hs | haskell | '>' -> ">>>>>>>"
Print git's error message. Usually -
"fatal: Not a git repository (or any of the parent directories): .git"
from git-diff manpage:
have their type (i.e. regular file, symlink, submodule, ...) changed (T),
Heuristically delete files that were remove/modify conflict
and ended up with empty content | # LANGUAGE NoImplicitPrelude , OverloadedRecordDot , FlexibleContexts #
module Main (main) where
import Conflict (Conflict(..))
import qualified Conflict
import qualified Control.Exception as E
import Control.Monad (when, unless, filterM)
import Data.Algorithm.Diff (Diff, PolyDiff(..))
i... |
efd4aeb75b597f5eea3237f3274b9d4959d81319a0356d617d9c5008c9531274 | CyberCat-Institute/open-game-engine | Preprocessor.hs | module OpenGames.Preprocessor
( module Preprocessor
) where
import OpenGames.Preprocessor.BlockSyntax as Preprocessor
import OpenGames.Preprocessor.Codegen as Preprocessor
import OpenGames.Preprocessor.CompileBlock as Preprocessor
import OpenGames.Preprocessor.CompileSyntax as Preprocessor
import OpenGames.Prepr... | null | https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/OpenGames/Preprocessor.hs | haskell | module OpenGames.Preprocessor
( module Preprocessor
) where
import OpenGames.Preprocessor.BlockSyntax as Preprocessor
import OpenGames.Preprocessor.Codegen as Preprocessor
import OpenGames.Preprocessor.CompileBlock as Preprocessor
import OpenGames.Preprocessor.CompileSyntax as Preprocessor
import OpenGames.Prepr... | |
a28f14a75643a97de8bbe7aceff0df0c3a7f39baf1e3c84b7d651553ca090bcd | okuoku/nausicaa | test-ffi-memory-alloc.sps | ;;;
Part of : / Scheme
;;;Contents: tests for (ffi memory) allocation functions
Date : Tue Dec 16 , 2008
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2008 - 2010 < >
;;;
;;;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
t... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-ffi-memory-alloc.sps | scheme |
Contents: tests for (ffi memory) allocation functions
Abstract
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
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ... | Part of : / Scheme
Date : Tue Dec 16 , 2008
Copyright ( c ) 2008 - 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
(import (nausicaa)
(nausicaa checks)
(nausic... |
3b16a43c7fae793ca6f476a5f73c97b71c1c72468dd06601bee9567325a02ae4 | TyOverby/mono | span_float.ml | open! Import
open Std_internal
open! Int.Replace_polymorphic_compare
module Stable = struct
module V1 = struct
module Parts = struct
type t =
{ sign : Sign.t
; hr : int
; min : int
; sec : int
; ms : int
; us : int
; ns : int
}
[@@derivi... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-core/core/src/span_float.ml | ocaml | due to precision limitations in float we can't expect better than microsecond
precision
WARNING: if you are going to change this function in any material way, make sure
you update Stable appropriately.
This is the same float-to-string conversion used in [Float.sexp_of_t]. It's like
[Float... | open! Import
open Std_internal
open! Int.Replace_polymorphic_compare
module Stable = struct
module V1 = struct
module Parts = struct
type t =
{ sign : Sign.t
; hr : int
; min : int
; sec : int
; ms : int
; us : int
; ns : int
}
[@@derivi... |
ac000c070e18f478ee509bf5ab4db0899dfb30de9ddcdc3af0c8abb8fcd9cb6a | cyverse-archive/DiscoveryEnvironmentBackend | validation.clj | (ns metadactyl.service.apps.de.validation
(:use [slingshot.slingshot :only [try+ throw+]]
[korma.core :exclude [update]]
[kameleon.core]
[kameleon.entities]
[kameleon.queries :only [parameter-types-for-tool-type]]
[metadactyl.persistence.app-metadata :only [get-app]])
(:requi... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/service/apps/de/validation.clj | clojure | (ns metadactyl.service.apps.de.validation
(:use [slingshot.slingshot :only [try+ throw+]]
[korma.core :exclude [update]]
[kameleon.core]
[kameleon.entities]
[kameleon.queries :only [parameter-types-for-tool-type]]
[metadactyl.persistence.app-metadata :only [get-app]])
(:requi... | |
c7eb706ddc769fd4ae0ca69ca4a1c8d46de5b235c15fe726ed1038d656b68e50 | dyzsr/ocaml-selectml | weaklifetime2.ml | (* TEST
*)
let n = 500
let loop = 2
let alive = ref (Array.init n (fun _ -> Array.make 10 0))
let create_weaks () =
Array.init n (fun i ->
let w = Weak.create 1 in
Weak.set w 0 (Some (!alive.(i)));
w
)
* We are trying to keep the weak pointer of weak2 set when the
weak pointer of weak1... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/misc/weaklifetime2.ml | ocaml | TEST
* put the weak pointers in the major heap
* make *this* weak key alive |
let n = 500
let loop = 2
let alive = ref (Array.init n (fun _ -> Array.make 10 0))
let create_weaks () =
Array.init n (fun i ->
let w = Weak.create 1 in
Weak.set w 0 (Some (!alive.(i)));
w
)
* We are trying to keep the weak pointer of weak2 set when the
weak pointer of weak1 and are w... |
1d63b0f2f0b36e099e608fa5ec7d87a7a994edbf0f5dd25627df4063a3734a71 | ChrisPenner/proton | Scrap.hs | module Examples.Scrap where
import Linear
import Proton
import Data.Ord
import Data.List
import Data.Profunctor.Distributing
import Proton.Algebraic
import Data.Profunctor.Closed
import Data.Profunctor.Rep
import Debug.Trace
import qualified Data.Map as M
import Data.Distributive
import Control.Applicative
import Data... | null | https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Examples/Scrap.hs | haskell | compVectors = algebraic pure _ (liftA2 (+))
We can use a list-lens as a setter over a single element
-- We can explicitly compare to a specific result
-- We can provide an aggregator explicitly
print $ flowers & measureNearest . aggregate *% maximum . traceShowId | module Examples.Scrap where
import Linear
import Proton
import Data.Ord
import Data.List
import Data.Profunctor.Distributing
import Proton.Algebraic
import Data.Profunctor.Closed
import Data.Profunctor.Rep
import Debug.Trace
import qualified Data.Map as M
import Data.Distributive
import Control.Applicative
import Data... |
907e98a86e2fdc3ceb33bdf934caf382b137f81e06acbce1a5ce6285af2c7ac3 | ptaoussanis/truss | project.clj | (defproject com.taoensso/truss "1.8.0"
:author "Peter Taoussanis <>"
:description "Assertions API for Clojure/Script"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"
:distribution :repo
:comments "Same as Clojure"}
:min-lein-version "2.3.3"
:global-vars... | null | https://raw.githubusercontent.com/ptaoussanis/truss/76af44fca7424fdb1eb9f7d1b6c72e40ea98901a/project.clj | clojure | :default [:base :system :user :provided :dev] | (defproject com.taoensso/truss "1.8.0"
:author "Peter Taoussanis <>"
:description "Assertions API for Clojure/Script"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"
:distribution :repo
:comments "Same as Clojure"}
:min-lein-version "2.3.3"
:global-vars... |
b77fccfd467b8d407fff5f17118ac5b25603617fe321ef8920aa4b7d913f1722 | mwotton/squealgen | DBSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Basic.DBSpec where
import Control.Monad
import Basic.Public
import DBHelpers
import Squeal.PostgreSQL
import Test.Hspec
import Data.Text
import Data.Maybe(fromJust)
-- temporary, needs to be in Squeal
import Squeal.PostgreSQL.Session.D... | null | https://raw.githubusercontent.com/mwotton/squealgen/859ba8c8dcbd9394b1c063244a4728f4efa5465d/test/Basic/DBSpec.hs | haskell | # LANGUAGE OverloadedStrings #
temporary, needs to be in Squeal | module Basic.DBSpec where
import Control.Monad
import Basic.Public
import DBHelpers
import Squeal.PostgreSQL
import Test.Hspec
import Data.Text
import Data.Maybe(fromJust)
import Squeal.PostgreSQL.Session.Decode(devalue)
import PostgreSQL.Binary.Decoding(text_strict)
import Con... |
1ef96defaa0563fddc99faa32f788aee246b2a746d92c68852d2da313984c0d3 | Eventuria/demonstration-gsd | Command.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE DeriveGeneric #
module Eventuria.Libraries.CQRS.Write.Aggregate.Commands.Command where
import Data.Aeson
import Data.Map
import GHC.Generics
import Eventuria.Libraries.CQRS.Write.Aggregate.Core
import Eventuria.Libraries.CQRS.Write.Aggregate.Commands.CommandId
import Eve... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/Libraries/CQRS/Write/Aggregate/Commands/Command.hs | haskell | # LANGUAGE DuplicateRecordFields #
# LANGUAGE DeriveGeneric #
module Eventuria.Libraries.CQRS.Write.Aggregate.Commands.Command where
import Data.Aeson
import Data.Map
import GHC.Generics
import Eventuria.Libraries.CQRS.Write.Aggregate.Core
import Eventuria.Libraries.CQRS.Write.Aggregate.Commands.CommandId
import Eve... | |
0db7795a35e1446210d5b92bc5e1f0c7740a83ef51bad338ced95c1b16d4114e | hiratara/Haskell-Nyumon-Sample | WeightRecord.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TemplateHaskell #
module Model.WeightRecord
( NewWRecord(NewWRecord, nwrUserId, nwrTime, nwrWeight)
, nwrUserId'
, nwrTime'
, nwrWeight'
, insertNewWRecord
, selectWRecord
)
where
import Control.Exception (ca... | null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap10-samples/src/Model/WeightRecord.hs | haskell | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TemplateHaskell #
module Model.WeightRecord
( NewWRecord(NewWRecord, nwrUserId, nwrTime, nwrWeight)
, nwrUserId'
, nwrTime'
, nwrWeight'
, insertNewWRecord
, selectWRecord
)
where
import Control.Exception (ca... | |
f7b81c643838518f3e24a29a6dfb4c0ea60d76272981243b960b3360e9dd3555 | 2600hz-archive/whistle | rabbit_direct.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_direct.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved .
-module(rabbi... |
83029ee290f0fd9618a2bf1979f1f4ba925a8ebcecdc080072472483a143c770 | samply/blaze | rest_api_test.clj | (ns blaze.rest-api-test
(:require
[blaze.async.comp :as ac]
[blaze.db.api-stub :refer [mem-node-system]]
[blaze.db.impl.search-param]
[blaze.fhir.spec :as fhir-spec]
[blaze.fhir.structure-definition-repo]
[blaze.fhir.structure-definition-repo.protocols :as sdrp]
[blaze.handler.util :as han... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/rest-api/test/blaze/rest_api_test.clj | clojure | (ns blaze.rest-api-test
(:require
[blaze.async.comp :as ac]
[blaze.db.api-stub :refer [mem-node-system]]
[blaze.db.impl.search-param]
[blaze.fhir.spec :as fhir-spec]
[blaze.fhir.structure-definition-repo]
[blaze.fhir.structure-definition-repo.protocols :as sdrp]
[blaze.handler.util :as han... | |
a7f84a7b0a8f0fc7c89064c1a797519107e100363e62f7b6fb8c8474b59353c5 | fjvallarino/monomer | OptionButton.hs | |
Module : . Widgets . Singles . OptionButton
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Option button widget , used for choosing one value from a fixed set . Each
instance of is ass... | null | https://raw.githubusercontent.com/fjvallarino/monomer/b8d3b82b50719204385179614f06bae283f90303/src/Monomer/Widgets/Singles/OptionButton.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# LANGUAGE StrictData #
* Configuration
* Constructors
* Internal
| Sets the style for the Off state of the option button.
| Creates an optionButton using the given lens.
^ The caption.
^ The option value.
^ The lens into the model.
... | |
Module : . Widgets . Singles . OptionButton
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Option button widget , used for choosing one value from a fixed set . Each
instance of is ass... |
6ecd6f2abc01b6620b48685fe8fabdb6d98ac98f03ae781cfd9478f0d55fa381 | amnh/poy5 | breakinvCS.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/breakinvCS.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
b143d0b4e334ca7cb721a407b3230f93420c4093b6e0bedfdd4a046aa33bf1ee | Opetushallitus/ataru | valintalaskentaservice_protocol.clj | (ns ataru.valinta-laskenta-service.valintalaskentaservice-protocol)
(defprotocol ValintaLaskentaService
(hakemuksen-tulokset [this hakukohde-oid haku-oid])
(valinnan-tuloksien-hakeminen-sallittu? [this superuser? haku])) | null | https://raw.githubusercontent.com/Opetushallitus/ataru/27f650e0665e2735aab0c4059f766a3fb2826246/src/clj/ataru/valinta_laskenta_service/valintalaskentaservice_protocol.clj | clojure | (ns ataru.valinta-laskenta-service.valintalaskentaservice-protocol)
(defprotocol ValintaLaskentaService
(hakemuksen-tulokset [this hakukohde-oid haku-oid])
(valinnan-tuloksien-hakeminen-sallittu? [this superuser? haku])) | |
5a80ecd2ae45df9921ffe23cf17c2078b67d45f4e9ff6711e5e377da8e53c528 | taffybar/taffybar | Auth.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Taffybar.Auth where
import Control.Arrow
import Control.Monad.IO.Class
import Data.Maybe
import System.Taffybar.Util
import Text.Regex
fieldRegex :: Regex
fieldRegex = mkRegexWithOpts "^(.*?): *(.*?)$" True True
passGe... | null | https://raw.githubusercontent.com/taffybar/taffybar/4d3227e9cd8308c1e43846496a8a7ab417ef8e5b/src/System/Taffybar/Auth.hs | haskell | # LANGUAGE OverloadedStrings # | module System.Taffybar.Auth where
import Control.Arrow
import Control.Monad.IO.Class
import Data.Maybe
import System.Taffybar.Util
import Text.Regex
fieldRegex :: Regex
fieldRegex = mkRegexWithOpts "^(.*?): *(.*?)$" True True
passGet :: MonadIO m => String -> m (Eith... |
6249b396e0bf9d5eac074bb28cc22f0dc97af8ca796a9e4c6939aacbfbe1c329 | input-output-hk/cardano-ledger | BHeader.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/libs/cardano-protocol-tpraos/src/Cardano/Protocol/TPraos/BHeader.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| The hash of a Block Header
| The previous hash of a block
^ block number
^ block slot
^ Hash of the previous block header
^ verification key of block issuer
^ VRF verification key for block issuer
^ block nonce
^ leader election value
^ Size of the bloc... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module Cardano.Protocol.TPr... |
872ba7a7d97acc966b236a6c5b646ceabbdd6b8a2e632c73f6bba6e714b3f085 | finnishtransportagency/harja | tieluvat_test.cljs | (ns harja.tiedot.tieluvat.tieluvat-test
(:require [clojure.test :refer-macros [deftest is testing]]
[harja.tiedot.tieluvat.tielupa-tiedot :as tiedot]
[harja.domain.tielupa :as tielupa]
[harja.testutils.tuck-apurit :refer-macros [vaadi-async-kutsut] :refer [e!]]
[harja.p... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/110c979dc11526dcde966445e82d326b4ee05991/test/cljs/harja/tiedot/tieluvat/tieluvat_test.cljs | clojure | TODO: Päivitä PaivitaValinnat | (ns harja.tiedot.tieluvat.tieluvat-test
(:require [clojure.test :refer-macros [deftest is testing]]
[harja.tiedot.tieluvat.tielupa-tiedot :as tiedot]
[harja.domain.tielupa :as tielupa]
[harja.testutils.tuck-apurit :refer-macros [vaadi-async-kutsut] :refer [e!]]
[harja.p... |
c72c0d8c92d245bcb9d589f3cad1e8f26e8048594f10b4ddb37ee304b9a4e5d9 | kitlang/kit | TermRewrite.hs | module Kit.Compiler.TermRewrite where
import Control.Monad
import Data.List
import Kit.Ast
import Kit.Compiler.Context
import Kit.Compiler.Module
import Kit.Compiler.TypeContext
import Kit.Compiler.Unify
import Kit.Compiler.Utils
import Kit.Error
import Kit.Log
import Kit.Ast.Span
import Kit.Str
data TermRewriteError... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Compiler/TermRewrite.hs | haskell |
Checks whether a typed expression matches a given pattern.
Returns Nothing on no match, or Just with a list of macro variable to
expression bindings.
The expression discriminant and children will be compared automatically; if
an expression type contains anything else that should be compared, it needs
to ... | module Kit.Compiler.TermRewrite where
import Control.Monad
import Data.List
import Kit.Ast
import Kit.Compiler.Context
import Kit.Compiler.Module
import Kit.Compiler.TypeContext
import Kit.Compiler.Unify
import Kit.Compiler.Utils
import Kit.Error
import Kit.Log
import Kit.Ast.Span
import Kit.Str
data TermRewriteError... |
1383a7b63d15c23baede8586b4426756aa14a3c29315455d190800fd32b2cf48 | juxt/skip | core.clj | Copyright © 2016 , JUXT LTD .
(ns skip.core
(:require
[skip.notify :refer [INotify notify IWatchable watch unwatch new-watchers]]
[skip.file-watcher :as file-watcher]
[clojure.java.io :as io]))
(defprotocol IDependencies
(add-dependency [_ dependency] "Add a dependency (immutable)")
(add-dependency! ... | null | https://raw.githubusercontent.com/juxt/skip/114b3105993f8cd062be913e21b81a15af825702/src/skip/core.clj | clojure | proxying, possible deprecated
A file can be fresh, then stale, then freshened | Copyright © 2016 , JUXT LTD .
(ns skip.core
(:require
[skip.notify :refer [INotify notify IWatchable watch unwatch new-watchers]]
[skip.file-watcher :as file-watcher]
[clojure.java.io :as io]))
(defprotocol IDependencies
(add-dependency [_ dependency] "Add a dependency (immutable)")
(add-dependency! ... |
d7445ff2e7d421790f4e6cb47087084899b250f3bbea940205e93b06b257a419 | ocaml-multicore/ocaml-tsan | channel_of.ml | (* TEST
* hasunix
include unix
** bytecode
** native
*)
open Printf
let shouldpass msg fn arg =
try
ignore (fn arg); printf "%s: passed (no error)\n" msg
with Unix.Unix_error(err, _, _) ->
printf "%s: FAILED (error %s)\n" msg (Unix.error_message err)
let shouldfail msg fn arg =
try
ignore (fn arg);... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/lib-unix/common/channel_of.ml | ocaml | TEST
* hasunix
include unix
** bytecode
** native
Files
Pipes
Sockets
Whatever is connected to standard descriptors; hopefully a terminal
A closed file descriptor should now fail
Send something to stdout, but don't flush and don't close the channel.
This tests proper auto-flushing at exit of channels ... |
open Printf
let shouldpass msg fn arg =
try
ignore (fn arg); printf "%s: passed (no error)\n" msg
with Unix.Unix_error(err, _, _) ->
printf "%s: FAILED (error %s)\n" msg (Unix.error_message err)
let shouldfail msg fn arg =
try
ignore (fn arg); printf "%s: FAILED (no error raised)\n" msg
with Unix... |
8497f4f84250a86a7f690864df43eed2360f73332b8a8a9b23a2b889bf75855d | adamdoupe/find_ear_rails | namespace.ml |
open Cfg
open Cfg_printer.CodePrinter
open Printf
open Utils
type scope =
| Absolute_Scope of string list
| Relative_Scope of string list
type links = scope list
type 'a t =
| Root of 'a t StrMap.t * links
| Node of 'a t StrMap.t * links * 'a
type 'a ctx =
| Top
| Path of 'a ctx * string * 'a t
... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/cfg/namespace.ml | ocaml | src parent, scope, target parent
Avoid revisiting cycles in the scope graph
flatten the list of scoped identifiers, saving the right most
element separately. Also, the head of the list is "" if this is an
absolute path |
open Cfg
open Cfg_printer.CodePrinter
open Printf
open Utils
type scope =
| Absolute_Scope of string list
| Relative_Scope of string list
type links = scope list
type 'a t =
| Root of 'a t StrMap.t * links
| Node of 'a t StrMap.t * links * 'a
type 'a ctx =
| Top
| Path of 'a ctx * string * 'a t
t... |
39504364a6a73a206f6ca5f0cf3925b264d4e5d2e6c390276450592482cfcddc | unison-code/unison | Uni.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Uni.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
8a8b8a73450397edce9497985ce34b3aa9f6142a0b3badbdcbbae4978eda404a | jellelicht/guix | environment-gdb.scm | (use-modules (guix)
(gnu packages gdb)
(gnu packages autotools)
(gnu packages texinfo))
Augment the package definition of GDB with the build tools
needed when developing GDB ( and which are not needed when
;; simply installing it.)
(package (inherit gdb)
(native-inputs `(("... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/doc/environment-gdb.scm | scheme | simply installing it.) | (use-modules (guix)
(gnu packages gdb)
(gnu packages autotools)
(gnu packages texinfo))
Augment the package definition of GDB with the build tools
needed when developing GDB ( and which are not needed when
(package (inherit gdb)
(native-inputs `(("autoconf" ,autoconf-2.64)
... |
2d57aaa54ea1f2d2ca203def0e87114bd29596c787fb611c13687d9eb7a035d9 | FlowerWrong/mblog | echo.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/cowboy/echo.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(echo).
-export([me/1]).
me(X) ->
io:format("echo:~p~n",[X]),
X.
|
078e759bb2646030f4a30d3d5a6ad0c5dad007385d899586c92fad3688458859 | dmitryvk/sbcl-win32-threads | linux-os.lisp | OS interface functions for SBCL under Linux
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public do... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/linux-os.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Check that target machine features are set up consistently with
this file.
uname-software-version?
Return user time, system time, and number... | OS interface functions for SBCL under Linux
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!SYS")
#!-linux (error "missing :LINUX feature")
(defun softwa... |
0dce6bc4cb652efbf51f0d1d685c822878b77d2ed4265a18869aafac86b86962 | pauloborba/plc | IntroducaoAProgramacaoFuncionalEHaskell.hs | module IntroducaoAProgramacaoFuncionalEHaskell where
import Data.Char
fatorial , sintaxe da matemática , sem muita
if statement in
then obrigatório
parênteses opcional na condição
fat n = if n == 0 then 1 else n * fat (n-1)
comentários com -- ou { - - }
respondendo perguntas de sintaxe com o google
-... | null | https://raw.githubusercontent.com/pauloborba/plc/34a6f725019e65fe1fff0c772bbb0b32315b41b9/src/IntroducaoAProgramacaoFuncionalEHaskell.hs | haskell | ou { - - }
or grammar: /
tipos básicos
Int operators: +, *, -, ^, div, mod :: Int -> Int -> Int
>, >=, ==, /=, <=, < :: Int -> Int -> Bool
Olhar #x13-1160006
&&, || :: Bool -> Bool -> Bool
not :: Bool -> Bool
String
++ :: String -> String -> String
show :: ? -> String (overloading)
Float e Do... | module IntroducaoAProgramacaoFuncionalEHaskell where
import Data.Char
fatorial , sintaxe da matemática , sem muita
if statement in
then obrigatório
parênteses opcional na condição
fat n = if n == 0 then 1 else n * fat (n-1)
respondendo perguntas de sintaxe com o google
f n-1 a ( f n ) - 1 , se f só... |
ce6e9d145fa57ef0fb9d6a080b96edea582e3aed04b6aad75711350b9ef48533 | degree9/enterprise | env_test.cljc | (ns degree9.env-test
(:require
#?(:node [degree9.env :as env])
[clojure.test :refer [deftest is]]))
;; TESTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#?(:node
(deftest ??dir
(doseq [e [:pwd :home :user]]
(is ((set (env/keys)) e)))))
#?(:node
(deftest ??get
(is (... | null | https://raw.githubusercontent.com/degree9/enterprise/65737c347e513d0a0bf94f2d4374935c7270185d/src/degree9/env_test.cljc | clojure | TESTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
no fallback yields nil for no match
should fallback to foo with no match | (ns degree9.env-test
(:require
#?(:node [degree9.env :as env])
[clojure.test :refer [deftest is]]))
#?(:node
(deftest ??dir
(doseq [e [:pwd :home :user]]
(is ((set (env/keys)) e)))))
#?(:node
(deftest ??get
(is (degree9.string/includes? (env/get :env-test-var) "foo"))
(is (degree9.string/... |
cf8f031365420e8067173ec7a65b3cbe81e7810386f9f590f6383d8873e7adbc | CloudI/CloudI | hackney_ssl.erl | %%% -*- erlang -*-
%%%
This file is part of hackney released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2011 - 2012 , < >
-module(hackney_ssl).
-compile({parse_transform, ct_expand}).
-export([messages/1,
connect/3, connect/4,
recv/3, recv/2,
send/2,
setop... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_hackney/src/hackney_ssl.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc Atoms used to identify messages in {active, once | true} mode.
tuple with parts of an IP as numbers. This function attempts to parse given
string and either returns such tuple, or the string if it's impossible to
parse.
See: -538
This will be evaluated ... | This file is part of hackney released under the Apache 2 license .
Copyright ( c ) 2011 - 2012 , < >
-module(hackney_ssl).
-compile({parse_transform, ct_expand}).
-export([messages/1,
connect/3, connect/4,
recv/3, recv/2,
send/2,
setopts/2,
controlling_process/2,
peername/1,
close/1,
shutdown/2... |
8cc4e00fbf27afb61c638e924f6cb87ae9a60e982ec029eeb248e156d42ce5f7 | janegca/htdp2e | Exercise-259-Sets.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-259-Sets) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2ht... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise-259-Sets.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design a data representation for finite and infinite sets so that you can
represent the sets of all odd numbers, all even numbers, all numbers
Hint: Mathematicians sometimes interpret sets as functions that consume a
if it does... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-259-Sets) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeat... |
2b08fb5b21098dbf252214d315e2356aebc1891b31bc7a9fe23fa667ac3b1c8c | soenkehahn/getopt-generics | HasArgumentsSpec.hs | # LANGUAGE ScopedTypeVariables #
module WithCli.HasArgumentsSpec where
import Control.Monad
import Test.Hspec
import Test.QuickCheck
import WithCli.HasArguments
spec :: Spec
spec = do
describe "parseBool" $ do
forM_ ["true", "True", "tRue", "TRUE", "yes", "yEs", "on", "... | null | https://raw.githubusercontent.com/soenkehahn/getopt-generics/735319c8146043f704d17f06b7bbfa41d84fe3e6/test/WithCli/HasArgumentsSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
module WithCli.HasArgumentsSpec where
import Control.Monad
import Test.Hspec
import Test.QuickCheck
import WithCli.HasArguments
spec :: Spec
spec = do
describe "parseBool" $ do
forM_ ["true", "True", "tRue", "TRUE", "yes", "yEs", "on", "... | |
0c165b8233a9b8d2b82a5d5fca7c259b3a6f5e5c9f79ef2348fafb55682591cd | thepower/tpnode | tpnode_dtx_runner.erl | -module(tpnode_dtx_runner).
-include("include/tplog.hrl").
-export([ready2prepare/0,prepare/0,ready4run/0,run/0]).
run() ->
case whereis(dtx_runner) of
undefined ->
spawn(fun() ->
register(dtx_runner, self()),
prepare(),
timer:sleep(1000),
ca... | null | https://raw.githubusercontent.com/thepower/tpnode/6212422bc9061d44d150ef2d777d6e694396ed15/apps/tpnode/src/tpnode_dtx_runner.erl | erlang | false or expiring | -module(tpnode_dtx_runner).
-include("include/tplog.hrl").
-export([ready2prepare/0,prepare/0,ready4run/0,run/0]).
run() ->
case whereis(dtx_runner) of
undefined ->
spawn(fun() ->
register(dtx_runner, self()),
prepare(),
timer:sleep(1000),
ca... |
6fb6e7dcbb139e8ba2452006874883931d0a87270e880c76ec8bd65f57f844c4 | ruhler/smten | TypeLits.hs |
{-# LANGUAGE DataKinds, TypeOperators #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE ExplicitNamespaces #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Smten.Smten.TypeLits (
Nat, SingI, type (+),
) where
import GHC.TypeLits
i... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Smten/TypeLits.hs | haskell | # LANGUAGE DataKinds, TypeOperators #
# LANGUAGE TypeSynonymInstances #
If you need math for bigger numbers, expand them here. |
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Smten.Smten.TypeLits (
Nat, SingI, type (+),
) where
import GHC.TypeLits
import Smten.Smten.TypeLitsTH
Tell GHC about addition . At least for numbers u... |
46d1c1e4d72f6f71b5f056432be84d8bb6bb1a3972fc0f766ac9f7464f126950 | christoff-buerger/racr | main.scm | ; This program and the accompanying materials are made available under the
terms of the MIT license ( X11 license ) which accompanies this distribution .
Author :
#!r6rs
(library
(siple main)
(export
siple-specification
siple-interpret)
(import
(rnrs)
(racr core)
(siple exception-api)
(siple typ... | null | https://raw.githubusercontent.com/christoff-buerger/racr/ecb2a9b8bf3f333550728cf45b97607a8298532f/examples/siple/main.scm | scheme | This program and the accompanying materials are made available under the
Arbitrary procedure application that does not return anything.
Avoids printing the interpretation's result state: | terms of the MIT license ( X11 license ) which accompanies this distribution .
Author :
#!r6rs
(library
(siple main)
(export
siple-specification
siple-interpret)
(import
(rnrs)
(racr core)
(siple exception-api)
(siple type)
(siple state)
(siple lexer)
(siple ast)
(siple parser)
(siple ... |
aadda1a50679efcc70f39a14b56c210c6428a26cdbcda22fdb073660f3d714a6 | javier-paris/erlang-tcpip | closing.erl | %%%-------------------------------------------------------------------
%%% File : closing.erl
Author : < >
Description : closing connection state
%%%
Created : 9 Sep 2004 by < >
%%%
%%%
erlang - tcpip , Copyright ( C ) 2004 Javier Paris
%%%
Licensed under the Apache License , Version 2.0 ( the... | null | https://raw.githubusercontent.com/javier-paris/erlang-tcpip/708b57fa37176980cddfd8605867426368d33ed1/src/closing.erl | erlang | -------------------------------------------------------------------
File : closing.erl
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 ... | Author : < >
Description : closing connection state
Created : 9 Sep 2004 by < >
erlang - tcpip , Copyright ( C ) 2004 Javier Paris
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(closing).
-expo... |
b9d61f3aa97fc68db2c56ad56d44b1fe7be9d15ec183af5a3b67db75ff089f6f | part-cw/lambdanative | ex-loglog.scm | (begin
;; the data to plot
(define data '((1.95 2.39) (0.99 0.82) (1.21 1.39) (1.97 2.23) (2.25 2.23)
(3.65 4.17) (2.84 2.85) (2.42 2.79) (1.34 0.78) (3.26 3.91) (1.67 2.49)
(3.59 2.84) (2.65 2.85) (1.56 2.55) (1.58 0.95) (2.33 2.07) (1.02 1.63)
(1.93 1.04) (1.32 2.75) (1.82 2.54) (1.2 1.68) (1.78 1.91) (1.4 1.55)
(2.... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/apps/scmgraph/examples/ex-loglog.scm | scheme | the data to plot
set the font
set the origin
set the style of the log axis
initialize the log axis
draw a domain mesh
draw some lines
a solid diagonal line
lines
plot markers here
draw an axis frame
draw the x and y axis
draw the axis labels | (begin
(define data '((1.95 2.39) (0.99 0.82) (1.21 1.39) (1.97 2.23) (2.25 2.23)
(3.65 4.17) (2.84 2.85) (2.42 2.79) (1.34 0.78) (3.26 3.91) (1.67 2.49)
(3.59 2.84) (2.65 2.85) (1.56 2.55) (1.58 0.95) (2.33 2.07) (1.02 1.63)
(1.93 1.04) (1.32 2.75) (1.82 2.54) (1.2 1.68) (1.78 1.91) (1.4 1.55)
(2.37 1.89) (3.91 3.26)... |
08e262d96d6b9a0510a606a8190cc163ca501d79df9c26c45f959db0f7f12cf2 | evolutics/haskell-formatter | Input.hs | predecessor = predecessor
-- comment 0
^comment 1
successor :: a
successor = successor
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/depends_on_displacement/single_annotation/line_pair/none_after/Input.hs | haskell | comment 0 | predecessor = predecessor
^comment 1
successor :: a
successor = successor
|
c225ff3cd918fba74a51991a2df8133d7149fed8bf88b5bb26a485ec5fdb7692 | TrustInSoft/tis-kernel | bag.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/libraries/utils/bag.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.