_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 |
|---|---|---|---|---|---|---|---|---|
e1ae5aa8bd4b0491e21940abeeefad1d0f00a01bd8077ea46d5f07e170ad0e4a | let-def/grenier | test.ml | open Strong
let ic = Scanf.Scanning.from_file Sys.argv.(1)
let () =
Scanf.bscanf ic "%d %d %d %d\n" @@
fun state_count transition_count initial_state final_state_count ->
Printf.eprintf
"state_count:%d transition_count:%d initial_state:%d final_state_count:%d\n"
state_count transition_count initial_sta... | null | https://raw.githubusercontent.com/let-def/grenier/3391e5e31db88e587100436e9407881fb8ef7873/state_elimination/test/test.ml | ocaml | Concatenation
Disjunction | open Strong
let ic = Scanf.Scanning.from_file Sys.argv.(1)
let () =
Scanf.bscanf ic "%d %d %d %d\n" @@
fun state_count transition_count initial_state final_state_count ->
Printf.eprintf
"state_count:%d transition_count:%d initial_state:%d final_state_count:%d\n"
state_count transition_count initial_sta... |
608dda5090473b18be75fa9abcd1aaba099aba7833e3a24a81390fe0880660cf | WorksHub/client | cv.cljs | (ns wh.logged-in.profile.components.cv
(:require [wh.common.upload :as upload]
[wh.logged-in.profile.components :as components]
[wh.logged-in.profile.events :as events]
[wh.logged-in.profile.subs :as subs]
[wh.re-frame.events :refer [dispatch]]
[wh.re-frame.... | null | https://raw.githubusercontent.com/WorksHub/client/7f864db40f2b70eda1336d33ce1b216d34e37432/client/src/wh/logged_in/profile/components/cv.cljs | clojure | (ns wh.logged-in.profile.components.cv
(:require [wh.common.upload :as upload]
[wh.logged-in.profile.components :as components]
[wh.logged-in.profile.events :as events]
[wh.logged-in.profile.subs :as subs]
[wh.re-frame.events :refer [dispatch]]
[wh.re-frame.... | |
96c2a6489aa0b95986ac7240d3cadbea27638088c29272feb433623f9a01a6c3 | faylang/fay | doLet.hs | module DoLet where
main = do
first
second
third
fourth
fifth
sixth
newtyp
first = do
let x = 123
print x
second = do
let x = 123
x <- return 10
print x
third = do
x <- return 123
let x = 777
print x
fourth = do
x <- return 123
let y = 777
print x
print y
fifth = do
print 12... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/doLet.hs | haskell | module DoLet where
main = do
first
second
third
fourth
fifth
sixth
newtyp
first = do
let x = 123
print x
second = do
let x = 123
x <- return 10
print x
third = do
x <- return 123
let x = 777
print x
fourth = do
x <- return 123
let y = 777
print x
print y
fifth = do
print 12... | |
c56be25801ace3c8fef1aa16d23217a69e8b114a0a9ac4374c1e8f82d4a02f69 | mpickering/hashtag-coerce | ModuleA.hs | module ModuleA where
newtype Baz = Baz Int
qux :: [Int] -> [Baz]
qux = map Baz
| null | https://raw.githubusercontent.com/mpickering/hashtag-coerce/7a8da32600a0a38dd27bdcc960cb971d4620e6bc/test/src/ModuleA.hs | haskell | module ModuleA where
newtype Baz = Baz Int
qux :: [Int] -> [Baz]
qux = map Baz
| |
68ff26143f4f15646bd5b6123796fe9f3ddb39f78cc3c9652cb67bd2abbf3eec | tschady/advent-of-code | d06.clj | (ns aoc.2020.d06
(:require [aoc.file-util :as file-util]
[clojure.set :refer [intersection]]
[clojure.string :as str]))
(def input (map str/split-lines (file-util/read-chunks "2020/d06.txt")))
(defn part-1 [input]
(reduce + (map (comp count distinct (partial apply str)) input)))
(defn par... | null | https://raw.githubusercontent.com/tschady/advent-of-code/1e4a95ef580c3bf635837eff52aa998b0acfc666/src/aoc/2020/d06.clj | clojure | (ns aoc.2020.d06
(:require [aoc.file-util :as file-util]
[clojure.set :refer [intersection]]
[clojure.string :as str]))
(def input (map str/split-lines (file-util/read-chunks "2020/d06.txt")))
(defn part-1 [input]
(reduce + (map (comp count distinct (partial apply str)) input)))
(defn par... | |
48c555f6b1c9f1098d05bec385a086e126c4a707546dc7d6484b498783302f7b | techascent/tech.ml | regression.clj | (ns tech.v3.libs.smile.regression
"Namespace to require to enable a set of smile regression models"
(:require [tech.v3.ml :as ml]
[tech.v3.ml.model :as model]
[tech.v3.dataset :as ds]
[tech.v3.tensor :as dtt]
[tech.v3.dataset.utils :as ds-utils]
[tech.v3.d... | null | https://raw.githubusercontent.com/techascent/tech.ml/7f2cc506980a05f0f8c85f8b1ff0cde6b9451f54/src/tech/v3/libs/smile/regression.clj | clojure | NeuralNetwork$ActivationFunction
OnlineRegression
Least squares regression. Least-squares is highly efficient for
normally distributed errors but is prone to long tails and outliers.
Quantile regression. The gradient tree boosting based
on this loss function is highly robust. The trees use only order
information... | (ns tech.v3.libs.smile.regression
"Namespace to require to enable a set of smile regression models"
(:require [tech.v3.ml :as ml]
[tech.v3.ml.model :as model]
[tech.v3.dataset :as ds]
[tech.v3.tensor :as dtt]
[tech.v3.dataset.utils :as ds-utils]
[tech.v3.d... |
84cd6b3c1c7723443e4cc8a2498a651a7badde5e0ec0e111a579ae1e4670f3ec | aws-beam/aws-erlang | aws_robomaker.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc This section provides documentation for the AWS RoboMaker API
%% operations.
-module(aws_robomaker).
-export([batch_delete_worlds/2,
batch_delete_worlds/3,
batch_describe_simulation_job/2,
batch... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_robomaker.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc This section provides documentation for the AWS RoboMaker API
operations.
====================================================================
API
====================================================================
@doc Cancels the specified deployment job.
@doc C... | See -beam/aws-codegen for more details .
-module(aws_robomaker).
-export([batch_delete_worlds/2,
batch_delete_worlds/3,
batch_describe_simulation_job/2,
batch_describe_simulation_job/3,
cancel_deployment_job/2,
cancel_deployment_job/3,
cancel_simulation_job/2,
... |
34f614bdd7dac726deb52cc8d738f9a82494f77510d0565a5bed67dbe52a4734 | soegaard/pyffi | python-functions.rkt | #lang racket/base
(provide get-fun
get-fun-as-pyproc
pyproc->procedure
is-function?
is-module?
is-class?
is-method?
get-signature)
(require "structs.rkt"
"python-c-api.rkt"
"python-evaluation.rkt"
"python-environment.rkt"
... | null | https://raw.githubusercontent.com/soegaard/pyffi/8dd7b1c860da839794c8dec76a5a3d2a7cfdb453/pyffi-lib/pyffi/python-functions.rkt | racket | "python-attributes.rkt"
Inspect
note: `getmembers` returns a cyclic data structure, so avoid using ~py
Procedures
p - a pyproc with the signature of pyfun
the default is the generic converter
convert Python result to Racket value
the default is the generic converter
We must fetch and normalize the exc... | #lang racket/base
(provide get-fun
get-fun-as-pyproc
pyproc->procedure
is-function?
is-module?
is-class?
is-method?
get-signature)
(require "structs.rkt"
"python-c-api.rkt"
"python-evaluation.rkt"
"python-environment.rkt"
... |
8e2831742ece93680ed9d409bc8c8038d0b0578a83fd572462ff6e2eb783593a | racket/racket7 | load.rkt | #lang racket
(require syntax/strip-context)
(provide (rename-out [module-begin #%module-begin]
[top-interaction #%top-interaction]))
(define-syntax-rule (module-begin form ...)
(#%plain-module-begin (top-interaction . (#%top-interaction . form)) ...))
(define-syntax-rule (top-interaction . for... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/racket/load.rkt | racket | Make a new namespace to run user code. All evaluation has to start
with `module-begin' or `top-interaction', and we wrap such
evaluations to swap the namespace in and out.
`#reader'-loaded modules see a different top-level namespace,
though it's the same module registry. | #lang racket
(require syntax/strip-context)
(provide (rename-out [module-begin #%module-begin]
[top-interaction #%top-interaction]))
(define-syntax-rule (module-begin form ...)
(#%plain-module-begin (top-interaction . (#%top-interaction . form)) ...))
(define-syntax-rule (top-interaction . for... |
78917cf100750ecefadc25e80ebe77bd1e3dc62c827b7a98293e3391f1b5e22f | polymeris/cljs-aws | pinpoint.cljs | (ns cljs-aws.pinpoint
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "Pinpoint" "pinpoint-2016-12-01.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/pinpoint.cljs | clojure | (ns cljs-aws.pinpoint
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "Pinpoint" "pinpoint-2016-12-01.min.json")
| |
dbfd25e0fa585d7c907a869f6cf5d510bfeb0d092a5e0d7de06322cb45d0d2eb | hoelzl/Snark | unify-bag.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: unify-bag.lisp
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 di... | null | https://raw.githubusercontent.com/hoelzl/Snark/06f86a31f476b2e4c28519765ab1e1519a4cc932/src/unify-bag.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: unify-bag.lisp
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 la... | 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 SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 .
... |
6e2c0c2ff56684f25173d70bc87ddec018588d7ee584cc904fbaeb504f7031a0 | input-output-hk/ouroboros-network | Server.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Ouroboros.Consensus.MiniProtocol.LocalStateQuery.Server (localStateQueryServer) where
import Ouroboros.Network.Protocol.LocalStateQuery.Server
import Ouroboros.Network.Protocol.LocalStateQuer... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c25d36e62549d5bec9876cb57d1c52ee41bdec3a/ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/LocalStateQuery/Server.hs | haskell | ^ Get tip point
^ Get a past ledger
^ Get the immutable point | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Ouroboros.Consensus.MiniProtocol.LocalStateQuery.Server (localStateQueryServer) where
import Ouroboros.Network.Protocol.LocalStateQuery.Server
import Ouroboros.Network.Protocol.LocalStateQuer... |
cc98ccb412d96714a33c7030445a0a95b8b0f4a093955ab2632b2927dac885fc | well-typed-lightbulbs/ocaml-esp32 | pat_type_sharing.ml | (* TEST
* expect
*)
type 'a r = { a : 'a; b : 'a; }
type 'a ty = Int : int ty | Float : float ty;;
[%%expect{|
type 'a r = { a : 'a; b : 'a; }
type 'a ty = Int : int ty | Float : float ty
|}]
let foo (type a) (ty : a ty) (x : a r) =
match ty, x with
| Int, { a = 3; b } -> b
| _ -> assert false;;
[%%expect{|
v... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/typing-misc/pat_type_sharing.ml | ocaml | TEST
* expect
| type 'a r = { a : 'a; b : 'a; }
type 'a ty = Int : int ty | Float : float ty;;
[%%expect{|
type 'a r = { a : 'a; b : 'a; }
type 'a ty = Int : int ty | Float : float ty
|}]
let foo (type a) (ty : a ty) (x : a r) =
match ty, x with
| Int, { a = 3; b } -> b
| _ -> assert false;;
[%%expect{|
val foo : 'a ty -> 'a r ... |
ccf59a05516d84e3d4344f3946489a7c0815a91f3fa9c66fe8939d5403b614c6 | BardurArantsson/cqrs | Routing.hs | {-# LANGUAGE OverloadedStrings #-}
module CQRSExample.Routing
( toServerEvent
, routes
) where
import Blaze.ByteString.Builder.ByteString (fromLazyByteString)
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Control.Concurrent.STM (a... | null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-example/src/CQRSExample/Routing.hs | haskell | # LANGUAGE OverloadedStrings #
Convert a JSON value to a server event.
Routes for the example application.
Redirect to index
Actions
Notifications
Done | module CQRSExample.Routing
( toServerEvent
, routes
) where
import Blaze.ByteString.Builder.ByteString (fromLazyByteString)
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Control.Concurrent.STM (atomically, TChan)
import ... |
86b0feb412e8253bffb2ece1b44b861f6aebf94df179408f10a2978c29c1dc82 | billstclair/trubanc-lisp | taskmaster.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Base : 10 -*-
;;; $Header$
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistributions of... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/hunchentoot-1.0.0/taskmaster.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 -*-
$Header$
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following d... |
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :hunchentoot)
(defclass taskmaster ()
((acceptor :accessor taskmaster-acceptor
:doc... |
8fc9f27990a67d3c81dfe797c149ad1211e03527cd504c0796303ed945a40c16 | lwhjp/ecmascript | function.rkt | #lang racket/base
(require racket/class
racket/function
racket/lazy-require
racket/match
racket/string
"../private/error.rkt"
"../private/function.rkt"
"../private/object.rkt"
"../private/primitive.rkt"
"../private/this.rkt"
(onl... | null | https://raw.githubusercontent.com/lwhjp/ecmascript/69fcfa42856ea799ff9d9d63a60eaf1b1783fe50/lib/function.rkt | racket | TODO: bind | #lang racket/base
(require racket/class
racket/function
racket/lazy-require
racket/match
racket/string
"../private/error.rkt"
"../private/function.rkt"
"../private/object.rkt"
"../private/primitive.rkt"
"../private/this.rkt"
(onl... |
445a8931eb64b07efb9461f03cbc4dd02e950ae15f62435c24b49549cd9ae53f | input-output-hk/cardano-ledger | Gen.hs | # LANGUAGE LambdaCase #
# LANGUAGE NumDecimals #
{-# LANGUAGE OverloadedStrings #-}
module Test.Cardano.Chain.Common.Gen (
genAddrAttributes,
genAddrAttributesWithNM,
genAddress,
genAddressWithNM,
genAddrType,
genAddrSpendingData,
genAttributes,
genBlockCount,
genCanonicalTxFeePolicy,
genChainDiffi... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/eras/byron/ledger/impl/test/Test/Cardano/Chain/Common/Gen.hs | haskell | # LANGUAGE OverloadedStrings #
slow
slow | # LANGUAGE LambdaCase #
# LANGUAGE NumDecimals #
module Test.Cardano.Chain.Common.Gen (
genAddrAttributes,
genAddrAttributesWithNM,
genAddress,
genAddressWithNM,
genAddrType,
genAddrSpendingData,
genAttributes,
genBlockCount,
genCanonicalTxFeePolicy,
genChainDifficulty,
genCompactAddress,
genCu... |
9b23fcd93aa1742b975a50ff622f6fc40cbe09ffbb76d161db44e818ec36fc34 | cac-t-u-s/om-sharp | data-structures.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/e99c153a554c22ff1d4951e2f44a736602866690/src/visual-language/tools/data-structures.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
(defclass* store (named-object)
((value :initform nil :initarg :value :accessor value :documentation "the value of the variable"))
(:icon :store)
(:documentation "A general storage class used to simulate variables. Can be associated to global variables.
The slot <value> can ... |
f3c570db6dec2d966bba28ed31fd8d570a605f6de519f0992cc9afc8fa951bef | rntz/moxy | tags.rkt | #lang racket
(require
racket/provide-syntax
(for-syntax racket/syntax syntax/parse))
(require "util.rkt")
;; Tag & annotated value interface
(provide
(struct-out tag) make-tag!
(struct-out tagged) make-tagged tagged-isa?
define-tag define-tags tag-out
(for-syntax tag-name-id tag-predicate-id tag-field-id
... | null | https://raw.githubusercontent.com/rntz/moxy/18015aed1596ae55658be4ac9eb5cbb3debb1644/tags.rkt | racket | Tag & annotated value interface
Defines a new tag, along with a constructor & match-expander for it.
match expander
regular expander
for each field, define accessor | #lang racket
(require
racket/provide-syntax
(for-syntax racket/syntax syntax/parse))
(require "util.rkt")
(provide
(struct-out tag) make-tag!
(struct-out tagged) make-tagged tagged-isa?
define-tag define-tags tag-out
(for-syntax tag-name-id tag-predicate-id tag-field-id
tag-fields-id tag-fields))
(st... |
7e97051312535f41868fbfefa6fbb09449baf068ce7a23935c6c9d249b01d677 | target/theta-idl | Process.hs | # LANGUAGE FlexibleContexts #
-- | Functionality for launching and interacting with external
processes : streaming Theta values encoded as Avro over STDIN and
-- reading them back over STDOUT.
module Theta.Target.Avro.Process where
import Control.Monad.Catch (MonadThrow (throwM))
import ... | null | https://raw.githubusercontent.com/target/theta-idl/2be1cf2a8086506de65d431166af00ecd2d0da91/theta/src/Theta/Target/Avro/Process.hs | haskell | | Functionality for launching and interacting with external
reading them back over STDOUT.
| Run an external process with a single input of type @a@, reading
If the process terminates with a non-zero error code, raises a
^ Path to the executable to run.
^ Arguments for the executable.
container.
container.
| ... | # LANGUAGE FlexibleContexts #
processes : streaming Theta values encoded as Avro over STDIN and
module Theta.Target.Avro.Process where
import Control.Monad.Catch (MonadThrow (throwM))
import Control.Monad.Except (MonadError)
import Control.Monad.IO.Class ... |
f98c62914dccb04361f0ef58b048b9c545ac8d091b7eb04978e0a5ced2c10ace | kowainik/stan | Example.hs | HLINT ignore " Unused LANGUAGE pragma "
# OPTIONS_GHC -fno - warn - unused - top - binds #
# LANGUAGE NoUndecidableInstances #
# LANGUAGE PatternSynonyms #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Module that contains code that should trigger vari... | null | https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/src/Stan/Example.hs | haskell | HLINT ignore " Unused LANGUAGE pragma "
# OPTIONS_GHC -fno - warn - unused - top - binds #
# LANGUAGE NoUndecidableInstances #
# LANGUAGE PatternSynonyms #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Module that contains code that should trigger vari... | |
ae24e77404fa705176f84b4e985ca780cf997c9dc420eed4d1f50025df8bc072 | cmcl/franklyfrank | unionfind.ml | (*pp deriving *)
(**************************************************************************)
Mini , a type inference engine based on constraint solving .
Copyright ( C ) 2006 . ,
and .
(* ... | null | https://raw.githubusercontent.com/cmcl/franklyfrank/6cc1c4f7377ea2a907675ec0fae9ff32829cec83/typing/unionfind.ml | ocaml | pp deriving
************************************************************************
This program is free software; you can redistribute it and/or modify
This program ... | Mini , a type inference engine based on constraint solving .
Copyright ( C ) 2006 . ,
and .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; version 2 of the Licen... |
9067821562230f58d729fc06f3224858d0b17c87fc6a929e7230483c53547bef | AlexCharlton/glls | particles.scm | ;;;; particles.scm
;;;; This example illustrates 2D particle affect without the need for
;;;; mvp matrices, and manipulates particle vertex data at runtime.
;;;; NOTE:
;;;; This uses glls-render, so if this file is compiled it must be linked with OpenGL
;;;; E.g.:
;;;; csc -lGL complete.scm
(import chicken scheme)
... | null | https://raw.githubusercontent.com/AlexCharlton/glls/31d1124f8e7a79cea196d6d1228b26e0344c3753/examples/particles.scm | scheme | particles.scm
This example illustrates 2D particle affect without the need for
mvp matrices, and manipulates particle vertex data at runtime.
NOTE:
This uses glls-render, so if this file is compiled it must be linked with OpenGL
E.g.:
csc -lGL complete.scm
note we don't need gl-math in this example
a shader th... |
(import chicken scheme)
(use glls-render (prefix glfw3 glfw:) (prefix opengl-glew gl:) gl-utils
srfi-18 miscmacros)
(define-pipeline point-shader
((#:vertex version: 130
input: ((position #:vec2)))
(define (main) #:void
(set! gl:position (vec4 position 0.0 1.0))
(set! gl:... |
9de7ebdb69b880459374c9d52d7c9db515bf6a5789c58cb1ba197299ff078cc7 | tommaisey/aeon | g-head.help.scm | ; /g_head Add node to head of group
; [
; int - group ID
; int - node ID
; ] * N
Adds the node to the head ( first to be executed ) of the group .
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/server-command/g-head.help.scm | scheme | /g_head Add node to head of group
[
int - group ID
int - node ID
] * N |
Adds the node to the head ( first to be executed ) of the group .
|
b2db2bc22a8ca0755da0997d73ee43fe23e7c4cdd2de83f3708fbe26b2043ade | YoEight/lambda-database-experiment | Connection.hs | --------------------------------------------------------------------------------
-- |
-- Module : Lambda.Node.Manager.Connection
Copyright : ( C ) 2017
-- License : (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Portability : non-portable
--
-------------------------------------------... | null | https://raw.githubusercontent.com/YoEight/lambda-database-experiment/da4fab8bd358fb8fb78412c805d6f5bc05854432/lambda-node/library/Lambda/Node/Manager/Connection.hs | haskell | ------------------------------------------------------------------------------
|
Module : Lambda.Node.Manager.Connection
License : (see the file LICENSE)
Stability : provisional
Portability : non-portable
------------------------------------------------------------------------------
-----------------------------... | Copyright : ( C ) 2017
Maintainer : < >
module Lambda.Node.Manager.Connection (new) where
import Network.Simple.TCP
import Data.Serialize
import Lambda.Bus
import Lambda.Logger
import Lambda.Prelude
import Lambda.Prelude.Stopwatch
import Network.Connection
import Protocol.Package
import Protocol.Message
impo... |
274cb60eed8d280c2ab4dba716f799d4c41ca7d0af4ab68115645183520ae18b | coowry/baleen | baleen_tests.erl | -module(baleen_tests).
-include_lib("eunit/include/eunit.hrl").
-import(baleen, [format/2]).
invalid_simple_test_() ->
[ ?_assertMatch({error, <<"Invalid term",_/binary>>},
baleen:validate(baleen:invalid(), "Hola"))
, ?_assertNotMatch({ok, _},
baleen:validate(baleen:invalid(), 42)) ].
invalid_t... | null | https://raw.githubusercontent.com/coowry/baleen/debb641617c59d5d042b16442db1fd9e69e17cfb/test/baleen_tests.erl | erlang | -module(baleen_tests).
-include_lib("eunit/include/eunit.hrl").
-import(baleen, [format/2]).
invalid_simple_test_() ->
[ ?_assertMatch({error, <<"Invalid term",_/binary>>},
baleen:validate(baleen:invalid(), "Hola"))
, ?_assertNotMatch({ok, _},
baleen:validate(baleen:invalid(), 42)) ].
invalid_t... | |
54f7763e41428707c4ace85d7fa73e83416f2232d9047ac2e9aad8deaadf01b0 | deadcode/Learning-CL--David-Touretzky | 8.28.lisp | (defun my-nth (n x)
(cond ((null x) nil)
((zerop n) (first x))
(t (my-nth (- n 1) (rest x)))))
(let ((test1 '(my-nth 5 '(a b c)))
(test2 '(my-nth 1000 '(a b c)))
(test3 '(my-nth 2 '(a b c))))
(format t "~s = ~s~%" test1 (eval test1))
(format t "~s = ~s~%" test2 (eval test2))
... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.28.lisp | lisp | (defun my-nth (n x)
(cond ((null x) nil)
((zerop n) (first x))
(t (my-nth (- n 1) (rest x)))))
(let ((test1 '(my-nth 5 '(a b c)))
(test2 '(my-nth 1000 '(a b c)))
(test3 '(my-nth 2 '(a b c))))
(format t "~s = ~s~%" test1 (eval test1))
(format t "~s = ~s~%" test2 (eval test2))
... | |
7256fd9864d4ccf435c546a73b2f2a67101dda335e35ef7bda11b53326241866 | broadinstitute/wfl | wgs_test.clj | (ns wfl.integration.modules.wgs-test
(:require [clojure.test :refer [deftest is testing
use-fixtures]]
[clojure.string :as str]
[wfl.api.workloads :as api]
[wfl.integration.modules.sh... | null | https://raw.githubusercontent.com/broadinstitute/wfl/ca30908a6b62aa3ea8e5e15c3b410263d0173ee9/api/test/wfl/integration/modules/wgs_test.clj | clojure | (ns wfl.integration.modules.wgs-test
(:require [clojure.test :refer [deftest is testing
use-fixtures]]
[clojure.string :as str]
[wfl.api.workloads :as api]
[wfl.integration.modules.sh... | |
c80aca059359a141d38a2ea5a22c559e32811d036b0c8a1df0bd3dd718dd347c | nuvla/api-server | infrastructure_service_template_coe_test.cljc | (ns sixsq.nuvla.server.resources.spec.infrastructure-service-template-coe-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.infrastructure-service-template :as tpl]
[sixsq.nuvla.server.resources.infrastructure-service-template-coe :as tpl-coe]
[sixsq.nuvla.server.resources.s... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/infrastructure_service_template_coe_test.cljc | clojure | (ns sixsq.nuvla.server.resources.spec.infrastructure-service-template-coe-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.infrastructure-service-template :as tpl]
[sixsq.nuvla.server.resources.infrastructure-service-template-coe :as tpl-coe]
[sixsq.nuvla.server.resources.s... | |
66c071b3459f93eb96384fd687e795816754a715161a0fadebaaf3e15eff700d | argp/bap | kruskal.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/kruskal.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
$ I d :... |
ef0ad1b5c9f869fea4a9c96e54839085107b2892a1765811e637d23616cd39a2 | kumarshantanu/lein-servlet | project.clj | (defproject lein-servlet/adapter-jetty8 "0.4.1"
:description "Jetty 8 adapter for lein-servlet"
:url "-servlet"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:eval-in-leiningen true
:dependencies [[org.eclipse.jetty/jetty-server "8.1.16.v20140903"]
[org.eclipse.jetty... | null | https://raw.githubusercontent.com/kumarshantanu/lein-servlet/2be06155a677eba1c5a812d28499cd5b23535414/adapter-jetty8/project.clj | clojure | (defproject lein-servlet/adapter-jetty8 "0.4.1"
:description "Jetty 8 adapter for lein-servlet"
:url "-servlet"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:eval-in-leiningen true
:dependencies [[org.eclipse.jetty/jetty-server "8.1.16.v20140903"]
[org.eclipse.jetty... | |
9e9a1db7f46fd272c1f3c3dda535d84299df16796bde05cbce2626d52dc4718e | lpw25/ocaml-typed-effects | includecore.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/typing/includecore.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Asttypes
open Path
open Types
ope... |
cc9e919927ba371e68c5741005e9a8ac2a8e5c39f28d2340df2ab88961cf521a | agda/agda | Substitution.hs | module Agda.Compiler.JS.Substitution where
import Prelude hiding ( map, lookup )
import Data.Map ( empty, unionWith, singleton, findWithDefault )
import qualified Data.Map as Map
import Data.List ( genericIndex )
import qualified Data.List as List
import Agda.Syntax.Common ( Nat )
import Agda.Compiler.JS.Syntax
( E... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/src/full/Agda/Compiler/JS/Substitution.hs | haskell | Map for expressions
Shifting
Substitution
A variant on substitution which performs beta-reduction
Beta-reducing application and field access
Replace any top-level occurrences of self
recursions would evaluate before the module has been defined,
Find the fixed point of an expression, with no top-level occurrence... | module Agda.Compiler.JS.Substitution where
import Prelude hiding ( map, lookup )
import Data.Map ( empty, unionWith, singleton, findWithDefault )
import qualified Data.Map as Map
import Data.List ( genericIndex )
import qualified Data.List as List
import Agda.Syntax.Common ( Nat )
import Agda.Compiler.JS.Syntax
( E... |
3110cc6a64c326fb96c1b460b505207c40d4a04637a840dda135e19eec13c85c | jimburton/scrabble | Game.hs | module ScrabbleCLI.Game ( startGame, startGameAI )
where
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Control.Monad.IO.Class (liftIO)
import Data.Maybe (fromJust)
import Data.Char (toUpper)
import Lens.Simple
import System.Console.Haskeline
import System.Random ... | null | https://raw.githubusercontent.com/jimburton/scrabble/194190eb208a5f6237644a4fc891c9b0a9b2cb07/cli/ScrabbleCLI/Game.hs | haskell | =========== Playing a CLI game =============== --
| Start a new game.
| Start a new game against the computer.
| Play the game.
| Take a turn.
^ The game
^ Previous score as text
| Allow the computer to take a turn.
| Take a turn manually.
^ The game
| Handle the situation when the game ends.
| Read a comma... | module ScrabbleCLI.Game ( startGame, startGameAI )
where
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Control.Monad.IO.Class (liftIO)
import Data.Maybe (fromJust)
import Data.Char (toUpper)
import Lens.Simple
import System.Console.Haskeline
import System.Random ... |
696f548ecfe91614033664318d5c646e9d4fb6f03adbb2d158c45776a32ea950 | DerekCuevas/interview-cake-clj | core.clj | (ns simulate-7-sided-die.core
(:gen-class))
(defn- random [floor ceiling]
(+ floor (rand-int (inc (- ceiling floor)))))
(defn- rand5 []
(random 1 5))
(def ^:private rand7-matrix
(->> (range 1 8)
(cycle)
(take 21)
(partition 5 5 (repeat 0))
(mapv vec)))
(defn rand7-with-matrix []
... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/simulate-7-sided-die/src/simulate_7_sided_die/core.clj | clojure | (ns simulate-7-sided-die.core
(:gen-class))
(defn- random [floor ceiling]
(+ floor (rand-int (inc (- ceiling floor)))))
(defn- rand5 []
(random 1 5))
(def ^:private rand7-matrix
(->> (range 1 8)
(cycle)
(take 21)
(partition 5 5 (repeat 0))
(mapv vec)))
(defn rand7-with-matrix []
... | |
0fc35548c08e244a81a2cc8795ccf0a32063b2c7a01cb13f2bd2e2ea0c1f780c | redstarssystems/apptemplate | init.clj | (ns build.init
"Helper functions and internal constants for all tasks."
(:require
[babashka.fs :as fs]
[babashka.process :refer [process check]]
[babashka.wait :as wait]
[clojure.string :as str])
(:import
(java.io
File)
(java.lang
ProcessBuilder$Redirect)
(java.net
Se... | null | https://raw.githubusercontent.com/redstarssystems/apptemplate/764fa977dea6b6b8d8e914c1112155f77b394a27/resources/org/rssys/apptemplate/root/tasks/src/build/init.clj | clojure |
Tasks helpers and internal task constants only
| (ns build.init
"Helper functions and internal constants for all tasks."
(:require
[babashka.fs :as fs]
[babashka.process :refer [process check]]
[babashka.wait :as wait]
[clojure.string :as str])
(:import
(java.io
File)
(java.lang
ProcessBuilder$Redirect)
(java.net
Se... |
2cde847d07de384fb8eff964f56ade791f8eab792f1a50a0389346c7815dd8cd | nasa/PRECiSA | PrettyPrint.hs | -- Notices:
--
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
-- Disclaimers
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTOR... | null | https://raw.githubusercontent.com/nasa/PRECiSA/4f72e50d75528ce81cf0858ca9bf58b352e4f4b9/PRECiSA/src/Kodiak/PrettyPrint.hs | haskell | Notices:
Disclaimers | Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMITE... |
4c4cb0872b3802d7b08cdba0be0d93b1c625097b58d7ab6324c682e7472b9fc3 | Frama-C/Frama-C-snapshot | horwitz.ml | (*
ledit bin/toplevel.top -deps tests/slicing/horwitz.c
#use "tests/slicing/select.ml";;
tests/slicing/horwitz.byte -deps tests/slicing/horwitz.c
* *)
include LibSelect;;
let () =
Db.Main.extend
(fun _ ->
ignore (test_select_data ~do_prop_to_callers:true "incr" "*pi"));;
| null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/slicing/horwitz.ml | ocaml |
ledit bin/toplevel.top -deps tests/slicing/horwitz.c
#use "tests/slicing/select.ml";;
tests/slicing/horwitz.byte -deps tests/slicing/horwitz.c
* |
include LibSelect;;
let () =
Db.Main.extend
(fun _ ->
ignore (test_select_data ~do_prop_to_callers:true "incr" "*pi"));;
|
37d6941d3446bedef75f082951625dd5f4090348460b733905372b9b132db82f | Liqwid-Labs/liqwid-plutarch-extra | Tuple.hs | module Plutarch.Extra.Tuple (pfstTuple, psndTuple) where
import Plutarch.Api.V1.Tuple (PTuple)
| Extract the first component of a ' PTuple ' .
@since 3.0.3
@since 3.0.3
-}
pfstTuple ::
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
(PIsData a) =>
Term s (PTuple a b :--> a)
pfstTuple = phoi... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/8741fde489a0123cab0b90e01d0ac207d306af33/src/Plutarch/Extra/Tuple.hs | haskell | > a)
> b) | module Plutarch.Extra.Tuple (pfstTuple, psndTuple) where
import Plutarch.Api.V1.Tuple (PTuple)
| Extract the first component of a ' PTuple ' .
@since 3.0.3
@since 3.0.3
-}
pfstTuple ::
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
(PIsData a) =>
pfstTuple = phoistAcyclic $ plam $ pfromData ... |
ffa7f93ac73fe7fd6ed04e36872bc6b14b325a45c4b351fdc97dbc63e3ce1585 | BoeingX/haskell-programming-from-first-principles | Ciphers.hs | module Lists.ChapterExercises.Ciphers where
import Data.Char
chars :: [Char]
chars = ['a'..'z'] ++ ['A'..'Z']
caesar :: Int -> String -> String
caesar _ "" = ""
caesar n (x : xs)
| not $ x `elem` chars = x : caesar n xs
| otherwise = let base = if isUpper x then ord 'A' else ord 'a'
x' = chr ... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/Lists/ChapterExercises/Ciphers.hs | haskell | module Lists.ChapterExercises.Ciphers where
import Data.Char
chars :: [Char]
chars = ['a'..'z'] ++ ['A'..'Z']
caesar :: Int -> String -> String
caesar _ "" = ""
caesar n (x : xs)
| not $ x `elem` chars = x : caesar n xs
| otherwise = let base = if isUpper x then ord 'A' else ord 'a'
x' = chr ... | |
af6c3fbb42af6daa1e44cc4fa0f40421ce62138d80d5cbf31ab2e67084e7b3fc | d-plaindoux/transept | response.mli | (** Define [Response] module. *)
(** {1 Structure anatomy} *)
module CORE : sig
type (_, _) t
(** Response abstract data type *)
val success : 's * 'a * bool -> ('s, 'a) t
(** Define successful response *)
val failure : 's * bool -> ('s, 'a) t
(** Define fazilure response *)
val fold : ('s, 'a) t -> ... | null | https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_specs/response.mli | ocaml | * Define [Response] module.
* {1 Structure anatomy}
* Response abstract data type
* Define successful response
* Define fazilure response
* Catamorphism dedicated to response data type.
* {1 API} |
module CORE : sig
type (_, _) t
val success : 's * 'a * bool -> ('s, 'a) t
val failure : 's * bool -> ('s, 'a) t
val fold : ('s, 'a) t -> ('s * 'a * bool -> 'b) -> ('s * bool -> 'b) -> 'b
end
module type API = module type of CORE
|
71019e82092fe427b6e535b664365b6bb805b69588d42884dc600c2fa768e332 | lambdacube3d/lambdacube-compiler | PerfReport.hs | # LANGUAGE ViewPatterns , TupleSections , RecordWildCards #
import Data.Monoid
import Data.Char
import System.Directory
import System.FilePath
import Text.Printf
import Control.Monad
import Options.Applicative
import Data.Map (Map,(!))
import qualified Data.Map as Map
-- HINT: lambdacube-compiler-test-suite --overall-... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-compiler/ca8d65a210a8801c8358fc29a9ead427afc9fce4/test/PerfReport.hs | haskell | HINT: lambdacube-compiler-test-suite --overall-time performance +RTS -tcurrent.log --machine-readable
read current result
read previous results | # LANGUAGE ViewPatterns , TupleSections , RecordWildCards #
import Data.Monoid
import Data.Char
import System.Directory
import System.FilePath
import Text.Printf
import Control.Monad
import Options.Applicative
import Data.Map (Map,(!))
import qualified Data.Map as Map
output : current.log overall-time.txt
data Conf... |
ace958bf232f446e40dda2b817c9265553f3d6fb194af741f5f35e9ca17603bf | roehst/tapl-implementations | syntax.mli | module Syntax : syntax trees and associated support functions
open Support.Pervasive
open Support.Error
(* Data type definitions *)
type ty =
TyVar of int * int
| TyId of string
| TyTop
| TyArr of ty * ty
| TyBool
| TyRecord of (string * ty) list
| TyString
| TyUnit
| TyFloat
| TyAll of string... | null | https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/fullfsub/syntax.mli | ocaml | Data type definitions
Contexts
Shifting and substitution
Printing
Misc | module Syntax : syntax trees and associated support functions
open Support.Pervasive
open Support.Error
type ty =
TyVar of int * int
| TyId of string
| TyTop
| TyArr of ty * ty
| TyBool
| TyRecord of (string * ty) list
| TyString
| TyUnit
| TyFloat
| TyAll of string * ty * ty
| TyNat
| TyS... |
8ac078868c08d1a0abf7c86b9b5200e1bb39e87cc9cd1816839ddd357aeacbf3 | ocsigen/ocaml-eliom | intext.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/lib-marshal/intext.ml | 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
let max_data_depth = 500000
type t = A | B of int | C of float | D of string | E of char
| F of ... |
bda09ed23c19afac6258b95d0aef2da927ed82ec9102a11e35b7e1033fe72261 | emqx/emqx | emqx_retainer_mnesia_cli.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 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_retainer/src/emqx_retainer_mnesia_cli.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 ) 2022 - 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_retainer_mnesia_cli).
-include_lib("emqx/include/logger.hrl").
-export([load/0, r... |
92058db71a5685085147166a5788a797f7e3d72910fce1c1e43bd7a8e2944e76 | logseq/logseq | plugins_settings.cljs | (ns frontend.components.plugins-settings
(:require [rum.core :as rum]
[frontend.util :as util]
[frontend.ui :as ui]
[frontend.handler.plugin :as plugin-handler]
[cljs-bean.core :as bean]
[goog.functions :refer [debounce]]))
(rum/defc edit-settings-file
[p... | null | https://raw.githubusercontent.com/logseq/logseq/5d0117b6fa911ddc3567a689c4e78de6ce04cbbe/src/main/frontend/components/plugins_settings.cljs | clojure | select
settings.json
render items
no settings | (ns frontend.components.plugins-settings
(:require [rum.core :as rum]
[frontend.util :as util]
[frontend.ui :as ui]
[frontend.handler.plugin :as plugin-handler]
[cljs-bean.core :as bean]
[goog.functions :refer [debounce]]))
(rum/defc edit-settings-file
[p... |
ca791a87647fbe7131bb6ed0b29ec61066dd71175e6f692c03c6a7a76a14c1fe | input-output-hk/plutus-apps | Compatibility.hs | module Plutus.ChainIndex.Compatibility where
import Cardano.Api (AsType (..), Block (..), BlockHeader (..), BlockInMode (..), BlockNo (..), CardanoMode,
ChainPoint (..), ChainTip (..), Hash, SlotNo (..), deserialiseFromRawBytes, proxyToAsType,
serialiseToRawBytes)
import Data.Pr... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/5ff40dafcdb07483442093efb4eaa39d12f34880/plutus-chain-index-core/src/Plutus/ChainIndex/Compatibility.hs | haskell | module Plutus.ChainIndex.Compatibility where
import Cardano.Api (AsType (..), Block (..), BlockHeader (..), BlockInMode (..), BlockNo (..), CardanoMode,
ChainPoint (..), ChainTip (..), Hash, SlotNo (..), deserialiseFromRawBytes, proxyToAsType,
serialiseToRawBytes)
import Data.Pr... | |
e1ab7f2b3f7808115bdd8fe74d9580c18f34ed74daed9a6ad342bd0108a923bc | chetmurthy/ensemble | zbcast.ml | (**************************************************************)
ZBCAST.ML : Gossip style broadcast protocol
Author : , 10/98
(**************************************************************)
open Trans
open Layer
open Buf
open Event
open Util
open View
module = Hashtble
(*****************************************... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/layers/scale/zbcast.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
retrans?
cast?
# delivered messages
# lost messages
# retrans messages ... | ZBCAST.ML : Gossip style broadcast protocol
Author : , 10/98
open Trans
open Layer
open Buf
open Event
open Util
open View
module = Hashtble
let name = Trace.filel "ZBCAST"
type round = seqno
type header = NoHdr
| Gossip of round * (seqno Arrayf.t)
| Request of round * ((rank * seqno) Arrayf.t)
type 'abv ... |
b660e4b8b063224cbdd159fd8917454872b826328b48b6ec11689791ff5befc0 | MyDataFlow/ttalk-server | exometer_slide.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtai... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/src/exometer_slide.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
@doc Efficient sliding-window buffer
This module implements an efficient sliding window, maintaining
and prepended to the primary list. When the time span between the oldes... | Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
@author < >
@author
@author < >
Initial implem... |
64ceb492da3d79f59f9ccbf876b02026ca8941352870476b91f3cfaac01761ae | coinmetrics/haskell-tools | Elastic.hs | # LANGUAGE OverloadedLists , OverloadedStrings , ViewPatterns #
module CoinMetrics.Export.Storage.Elastic
( ElasticExportStorage()
, ElasticFileExportStorage()
) where
import Control.Monad
import qualified Data.Aeson as J
import qualified Data.Aeson.Types as J
import qualified Data.ByteString.Lazy as BL
import ... | null | https://raw.githubusercontent.com/coinmetrics/haskell-tools/94d59497b6c4d829dd680df82c71fe607877ae76/coinmetrics-storage/CoinMetrics/Export/Storage/Elastic.hs | haskell | # LANGUAGE OverloadedLists , OverloadedStrings , ViewPatterns #
module CoinMetrics.Export.Storage.Elastic
( ElasticExportStorage()
, ElasticFileExportStorage()
) where
import Control.Monad
import qualified Data.Aeson as J
import qualified Data.Aeson.Types as J
import qualified Data.ByteString.Lazy as BL
import ... | |
86f10bebea0c685deec5dcb108de1e6b6c3d31c82e2ac716a90a8a2f58523db0 | NorfairKing/sydtest | Request.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - redundant - constraints -fno - warn - unused - imp... | null | https://raw.githubusercontent.com/NorfairKing/sydtest/9db39de44641f28a2c26de80fcfe08616fcf3054/sydtest-yesod/src/Test/Syd/Yesod/Request.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Make a @GET@ request for the given route
> get HomeR
> post StartProcessingR
| Perform a request using an arbitrary method for the given route.
| Synonym of 'statusShouldBe' for compatibility with yesod-test
| Assert the status of the most recently re... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - redundant - constraints -fno - warn - unused - imports #
module Test.Syd.Yesod.Request where
import Control.App... |
535b1959bdafe970e9f53e6f3d7ab41e4525c564f46a312b6835d61b727df388 | jepsen-io/maelstrom | checker.clj | (ns maelstrom.net.checker
"This checker uses net.journal and net.viz to generate statistics and
visualizations from the Fressian journal files in a store dir."
(:require [clojure.tools.logging :refer [info warn]]
[fipp.edn :refer [pprint]]
[jepsen [checker :as checker]
... | null | https://raw.githubusercontent.com/jepsen-io/maelstrom/50608759036ebd5da6b3d113a8df93734763f6a2/src/maelstrom/net/checker.clj | clojure | (fast-cardinality))})))
Fire off the plotter immediately; it can run without us
Add msgs-per-op stats, so we can tell roughly how many messages
exchanged per logical operation
Block on plot | (ns maelstrom.net.checker
"This checker uses net.journal and net.viz to generate statistics and
visualizations from the Fressian journal files in a store dir."
(:require [clojure.tools.logging :refer [info warn]]
[fipp.edn :refer [pprint]]
[jepsen [checker :as checker]
... |
45fd9d0cbe1ae0ba7ae7f8a3b9606e294e1e5928dfd5e3b12580171d90d98e36 | twanvl/simple-reflect | Vars.hs | -----------------------------------------------------------------------------
-- |
Module : Debug . SimpleReflect . Vars
Copyright : ( c ) 2008 - 2014
-- License : BSD-style
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- Single letter variable names.
--
... | null | https://raw.githubusercontent.com/twanvl/simple-reflect/81183e5f5193629956bf73a2b1a2c74fe502b7e0/Debug/SimpleReflect/Vars.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
Single letter variable names.
---------------------------------------------------------------------------
* Variables
* Functions
* Ope... | Module : Debug . SimpleReflect . Vars
Copyright : ( c ) 2008 - 2014
All names have type @Expr@ , except for , and @h@ , which are generic functions .
This means that @show ( f x : : ) = = x\"@ , but that @show ( a x : : Expr)@ gives a type error .
On the other hand , the type of @g@ in @sh... |
a15b0ef6902c8d18e86f59c52d55ddf3d333b6688f3da60499a512e3991f6506 | fortytools/holumbus | PackageRank.hs | {-# LANGUAGE BangPatterns #-}
-- ------------------------------------------------------------
module Hayoo.PackageRank
( DAGList
, DAG
, Ranking
, dagFromList
, dagToList
, ranking
, rankingStd
)
where
import Control.Arrow
import Control.DeepSeq
import D... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Hayoo/HayooIndexerLib/Hayoo/PackageRank.hs | haskell | # LANGUAGE BangPatterns #
------------------------------------------------------------
{-
-}
------------------------------------------------------------
------------------------------------------------------------
| construct a directed graph form a list of nodes and successors .
This version does not chec... |
module Hayoo.PackageRank
( DAGList
, DAG
, Ranking
, dagFromList
, dagToList
, ranking
, rankingStd
)
where
import Control.Arrow
import Control.DeepSeq
import Data.Map (Map)
import qualified Data.Map as M
import qualified Data.Map.Strict as... |
3ff813c3064a38f38324f733b237f134368e25f426f37e19ace330321184115f | geophf/1HaskellADay | Exercise.hs | # LANGUAGE QuasiQuotes #
module Y2018.M01.D09.Exercise where
-
Okay , we 've parsed articles from JSON and we 've stored those articles .
Let 's start expanding the scope here both in breath and in depth .
Depth first .
What happens when we do n't parse an article ? Or we ca n't store one ?
We 've logge... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M01/D09/Exercise.hs | haskell | }
to the database (also, the Logger m should be cleared, so you don't keep
reentering them. | # LANGUAGE QuasiQuotes #
module Y2018.M01.D09.Exercise where
-
Okay , we 've parsed articles from JSON and we 've stored those articles .
Let 's start expanding the scope here both in breath and in depth .
Depth first .
What happens when we do n't parse an article ? Or we ca n't store one ?
We 've logge... |
95d7360e070edb02362c693b840bad944c00c9d692757c9314b871be038a0c2b | funcool/yetti | middleware.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
Copyright © < >
(ns yetti.middleware
"Undertow based middleware."
(:require
[clojure.java.io :as io]
[clojure.string :as str]... | null | https://raw.githubusercontent.com/funcool/yetti/4ddcc0388ffb585df502ab58838556889dabf8d3/src/yetti/middleware.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © < >
(ns yetti.middleware
"Undertow based middleware."
(:require
[clojure.java.io :as io]
[clojure.string :as str]
... | |
9b73b27fd1265cadfa14aa31fdbb4b312f791f30b9f9a3753f52d598b6fefe5c | diffusionkinetics/open | FakeRows.hs | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving , DeriveGeneric ,
DefaultSignatures , PolyKinds , TypeOperators , ScopedTypeVariables ,
FlexibleContexts , FlexibleInstances , OverloadedStrings , InstanceSigs ,
TypeApplications , AllowAmbiguousTypes , UndecidableInstance... | null | https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/postgresql-simple-expr/lib/Database/PostgreSQL/Simple/FakeRows.hs | haskell | generate n unique tuples for key
turn keys into map of keyFieldName --> keyValue.
generate foreign keys as maps of fkFieldName --> Foreign (Key parent)
----------------------------------------------------------
| Returns n maps of foreign keys, where each map contains an entry
for each Foreign type in the table of... | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving , DeriveGeneric ,
DefaultSignatures , PolyKinds , TypeOperators , ScopedTypeVariables ,
FlexibleContexts , FlexibleInstances , OverloadedStrings , InstanceSigs ,
TypeApplications , AllowAmbiguousTypes , UndecidableInstance... |
37ea9aeead5c96948ec2cd42278b62fc76445e85123c9fbc1809db41ace7bc45 | ejgallego/dualquery | qdist.mli | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
(* Distributions... | null | https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/src/qdist.mli | ocaml | Distributions over queries
Array of the weights of each query
The actual distribution
Alias sampling arrays
New uniform distribution
qd_update : qdist -> queries -> query_cache -> syn_elem
Returns n queries sampled from dist | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
open Array
ope... |
420dedc58143da2c422c38a003e82a1886f41a7782081fb4e8cf2ed105fc1754 | haskell-servant/servant | JavascriptSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module JavascriptSpec where
import Data.List
import Data.String
import Data.String.Conversions
import Test.Hspec
import Test.Hspec.Wai
import Javascript
spec :: Spec
spec = do
describe "apiJS" $ do
it "is contained ... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/doc/tutorial/test/JavascriptSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module JavascriptSpec where
import Data.List
import Data.String
import Data.String.Conversions
import Test.Hspec
import Test.Hspec.Wai
import Javascript
spec :: Spec
spec = do
describe "apiJS" $ do
it "is contained verbatim in Javascript.lhs" $ do
... |
818e04be9b0446f44de5a8628aeed5f1629c8b405685e4ab824637bb5cd55c14 | qingliangcn/mgee | mod_team.erl | %%%----------------------------------------------------------------------
2010 mgee ( Ming Game Engine Erlang )
%%%
@author odinxu , 2010 - 1 - 19
@doc every team use one mod_team gen_server to provide role data and team data ,
when the first person join the team , create one mod_team gen_server .
%%% @end
%%... | null | https://raw.githubusercontent.com/qingliangcn/mgee/b65babc3a34ef678ae2b25ce1a8fdd06b2707bb8/src/game_mod/mod_team.erl | erlang | ----------------------------------------------------------------------
@end
----------------------------------------------------------------------
--------------------------------------------------------------------
Include files
--------------------------------------------------------------------
---------------... | 2010 mgee ( Ming Game Engine Erlang )
@author odinxu , 2010 - 1 - 19
@doc every team use one mod_team gen_server to provide role data and team data ,
when the first person join the team , create one mod_team gen_server .
-module(mod_team).
-behaviour(gen_server).
-include("mgee.hrl").
-include("game_pb.hrl... |
e5ddf82ebf798f05e6059990d7ab0e294aa93d870c1119575f4cbabd265c0e77 | lamdu/lamdu | Db.hs | module Lamdu.Data.Db
( withDB, ImplicitFreshDb(..)
) where
import Control.Exception (onException)
import qualified Lamdu.Data.Db.Init as DbInit
import Lamdu.Data.Db.Layout (DbM(..), ViewM, curDbSchemaVersion)
import Lamdu.Data.Export.JSON.Import (fileImportAll)
import qualified La... | null | https://raw.githubusercontent.com/lamdu/lamdu/2dba7d7ce3e5c8456e1b647326290d9aedaf6d9e/src/Lamdu/Data/Db.hs | haskell | module Lamdu.Data.Db
( withDB, ImplicitFreshDb(..)
) where
import Control.Exception (onException)
import qualified Lamdu.Data.Db.Init as DbInit
import Lamdu.Data.Db.Layout (DbM(..), ViewM, curDbSchemaVersion)
import Lamdu.Data.Export.JSON.Import (fileImportAll)
import qualified La... | |
7019ebe6c01fd091c69deb905ede09e4eec370f650aa60bb2db8141aa22495ba | qitab/grpc | integration-test.lisp | Copyright 2022 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
A simple integration test for gRPC Client and Server in Common Lisp
(defpackage #:grpc.test.server
(:use #:cl
#:clunit
#:grpc)
(:export :run))
(... | null | https://raw.githubusercontent.com/qitab/grpc/42a1693441f64673d92865c333b18300cc7d06ac/tests/integration-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
init | Copyright 2022 Google LLC
Use of this source code is governed by an MIT - style
A simple integration test for gRPC Client and Server in Common Lisp
(defpackage #:grpc.test.server
(:use #:cl
#:clunit
#:grpc)
(:export :run))
(in-package #:grpc.test.server)
(defsuite server-suite (grpc.test:... |
78eb2e5bd8a74c3e06449f74e16d05d239b7d84ad4b8eb8d988e18d01fb3bdc8 | nikita-volkov/rerebase | Traversable.hs | module Data.Traversable
(
module Rebase.Data.Traversable
)
where
import Rebase.Data.Traversable
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Traversable.hs | haskell | module Data.Traversable
(
module Rebase.Data.Traversable
)
where
import Rebase.Data.Traversable
| |
759036cf517e6f8a3e1fd976f7f41afc35236d310b3752607caaf52ed50d251d | soegaard/urlang | info.rkt | #lang info
This file describes the contents of the Urlang package .
;;; The information is used by the Racket package system.
The Urlang package contains multiple collections ( urlang , urlang - doc , compiler etc )
(define collection "compiler-rjs")
;;; Version number
(define version "1.0")
;;; Dependencies ... | null | https://raw.githubusercontent.com/soegaard/urlang/086622e2306e72731016c7108aca3328e5082aee/compiler-rjs/info.rkt | racket | The information is used by the Racket package system.
Version number
Dependencies declared here will need source
Dependencies here can be installed as binaries (i.e. zo-files) | #lang info
This file describes the contents of the Urlang package .
The Urlang package contains multiple collections ( urlang , urlang - doc , compiler etc )
(define collection "compiler-rjs")
(define version "1.0")
(define deps '())
(define build-deps '("base"
"nanopass" ... |
fd5a3223f3523375f649a2bf17dde53cc7d4b73a827eddedd79e0e192dc9e56a | Soostone/instrument | Main.hs | module Main
( main,
)
where
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
import qualified Instrument.Tests.CloudWatch
import Test.Tasty
--------------------------------------------------------------... | null | https://raw.githubusercontent.com/Soostone/instrument/a82d1764aad18881c6815c2ee2a55f3f5381c8f5/instrument-cloudwatch/test/Main.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----------------------------------------------------------------------------- | module Main
( main,
)
where
import qualified Instrument.Tests.CloudWatch
import Test.Tasty
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup
"instrument-cloudwatch"
[ Instrument.Tests.CloudWatch.tests
]
|
b684204f8e6125c3f38e8f9d066f159286e2316a2fd8d3f2ca0778a50a9c8565 | brendanhay/amazonka | GetSamplingTargets.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/GetSamplingTargets.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Requests a sampling quota for rules that the service is using to sample
requests.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newGetSamplingTargets' smart constructor.
| In... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
f67727cc417c235539133fa9e2a8e0785964c1639282f90b1be9dc21dd59b458 | haskoin/haskoin-wallet | AccountStore.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Network.Haskoin.Wallet.AccountStore where
import Control.Arrow (first)
import Control.Monad
import Control.Monad.Except
import Control.Monad.Reader
import ... | null | https://raw.githubusercontent.com/haskoin/haskoin-wallet/6ec0851d745e41fc011715eae461bf29c3019e9e/src/Network/Haskoin/Wallet/AccountStore.hs | haskell | # LANGUAGE OverloadedStrings #
Commit --
Helpers -- | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Network.Haskoin.Wallet.AccountStore where
import Control.Arrow (first)
import Control.Monad
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
impor... |
1d13322d2d4d766cf975d50f2e7ff2849ff5df4b9f9a5202ec180e0242eaf20d | dancrossnyc/multics | vt52.ctl.lisp | ;;; ***********************************************************
;;; * *
* Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
;;; * *
* Copyright ( c ) 1978 by Massachusetts Institute of ... | null | https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_emacs_ctls_.s.archive/vt52.ctl.lisp | lisp | ***********************************************************
* *
* *
* *
***********************************************************
-*-LISP-*-
... | * Copyright , ( C ) Honeywell Information Systems Inc. , 1982 *
* Copyright ( c ) 1978 by Massachusetts Institute of *
* Technology and Honeywell Information Systems , Inc. *
VT52 control package
BSG 3/21/78 from DD4000ctl
(declare (special X Y screenheight screenlinelen))
(declare (special id... |
c6ab9afa6a73c647c38cd9793548106bc55679d54700674a090e81affcdf4baa | bitemyapp/fp-course | Parser.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RebindableSyntax #
module Course.Parser where
import Course.Core
import Course.Person
import Course.Functor
import Course.Applicative
import Course.Monad
import Course.List
import Co... | null | https://raw.githubusercontent.com/bitemyapp/fp-course/a9a325cd895a0953151ec3d02f40006eb7993fb8/src/Course/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
$setup
>>> :set -XOverloadedStrings
>>> import Data.Char(isUpper)
Function to determine is a parse result is an error.
| Runs the given function on a successful parse result. Otherwise return the same failing parse result.
- | Return a parser that always returns the given parse resul... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE InstanceSigs #
# LANGUAGE RebindableSyntax #
module Course.Parser where
import Course.Core
import Course.Person
import Course.Functor
import Course.Applicative
import Course.Monad
import Course.List
import Course.Optional
import Data.Char
ty... |
73b2630684caf1fa5a5b593f709671e11ad995597430a9b200a52e02f9b61c9c | dgtized/shimmers | scintillation.cljs | (ns shimmers.sketches.scintillation
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.sketch :as sketch :include-macros true]))
(defn setup []
{:theta 0})
(defn update-state [state]
(update state :theta + 0.005))
(defn draw ... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/scintillation.cljs | clojure | (ns shimmers.sketches.scintillation
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.sketch :as sketch :include-macros true]))
(defn setup []
{:theta 0})
(defn update-state [state]
(update state :theta + 0.005))
(defn draw ... | |
8f21b9a8bfca9f48b1787f9d75587e47e01db73ba1a9d27b6d75e3568568e7ba | flora-pm/flora-server | Query.hs | # LANGUAGE QuasiQuotes #
module Flora.Model.Category.Query where
import Control.Monad.IO.Class
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Vector qualified as Vector
import Database.PostgreSQL.Entity.Types (field)
import Database.PostgreSQL.Simple (Only (..))
import Data.Text.IO qualified as T
im... | null | https://raw.githubusercontent.com/flora-pm/flora-server/766b124a97938e53b18311a0aecc7ceea8e0a737/src/core/Flora/Model/Category/Query.hs | haskell | # LANGUAGE QuasiQuotes #
module Flora.Model.Category.Query where
import Control.Monad.IO.Class
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Vector qualified as Vector
import Database.PostgreSQL.Entity.Types (field)
import Database.PostgreSQL.Simple (Only (..))
import Data.Text.IO qualified as T
im... | |
38dc01a4a7c2ed76b6701d8aee6861d754f5c1ec807b5e2c7665fbca7a4e1cbc | Bodigrim/arithmoi | SequenceModel.hs | Model fitting to derive coefficients in
Math . . Primes . Sequence.chooseAlgorithm
module Main where
import Numeric.GSL.Fitting
-- | Benchmarks Sequence/filterIsPrime
-- ([start, length], ([time in microseconds], weight))
filterIsPrimeBenchData :: [([Double], ([Double], Double))]
filterIsPrimeBenchData =
[ ([... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/df789d23341247e9cdb4f690595ea99c89836d09/app/SequenceModel.hs | haskell | | Benchmarks Sequence/filterIsPrime
([start, length], ([time in microseconds], weight))
| Benchmarks Sequence/eratosthenes
([start, length], ([time in microseconds], weight)) | Model fitting to derive coefficients in
Math . . Primes . Sequence.chooseAlgorithm
module Main where
import Numeric.GSL.Fitting
filterIsPrimeBenchData :: [([Double], ([Double], Double))]
filterIsPrimeBenchData =
[ ([100000, 1000], ([777], 0.1))
, ([100000, 10000], ([8523], 0.1))
, ([1000000, 1000], ([813]... |
fd5aea8db68c95136eaf8c0d2514412dcbcf85c18bcfd9087c9c6c85d783d594 | vnarek/jude | registry.ml | type string_set = (string, unit) Hashtbl.t
type record = { pid : Pid.t; is_local : bool; is_public : bool }
type t = {
names : (string, record) Hashtbl.t;
names_rev : (Pid.t, string_set) Hashtbl.t;
on_name : (string, (Pid.t -> unit) list) Hashtbl.t;
}
let create () =
{
names = Hashtbl.create 100;
nam... | null | https://raw.githubusercontent.com/vnarek/jude/b1e9387d0242cd83b3b72695bce267c970de1857/lib/registry.ml | ocaml | TODO: Check and report if already registered | type string_set = (string, unit) Hashtbl.t
type record = { pid : Pid.t; is_local : bool; is_public : bool }
type t = {
names : (string, record) Hashtbl.t;
names_rev : (Pid.t, string_set) Hashtbl.t;
on_name : (string, (Pid.t -> unit) list) Hashtbl.t;
}
let create () =
{
names = Hashtbl.create 100;
nam... |
496c60328f5398e87f7061dca468950d16ff0b3652f5a4387df664b92a6af10d | karamellpelle/grid | Screen.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/LevelPuzzleMode/Output/Fancy/Screen.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.LevelPuzzleMode.Output.Fancy.Screen
(... |
f6bd01d84ff58af35a7611d2d8697a8d1cb70758ec364311508ffc90737e1562 | larcenists/larceny | reference.body1.scm | Copyright ( C ) ( 2015 ) . All Rights Reserved .
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without limitation the rights to use,
;;;... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/128/reference.body1.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
Software is furnished to do so, subject to the following
conditions... | Copyright ( C ) ( 2015 ) . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without
sell copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
... |
d59454fed58e999c087a25fbb42765dfaf3d0ae63d4538e7d92e5c2cd4689fc9 | vbrankov/hdf5-ocaml | ex_lite3.ml | open Bigarray
open Hdf5_raw
let _ATTR_SIZE = 5
let () =
let data = Array1.of_array int32 c_layout [| 1l; 2l; 3l; 4l; 5l |] in
let file_id = H5f.create "ex_lite3.h5" H5f.Acc.([ TRUNC ]) in
let space_id = H5s.create_simple [| _ATTR_SIZE |] in
let dset_id = H5d.create file_id "dset" H5t.native_int space_id in
... | null | https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/hl/ex_lite3.ml | ocaml | open Bigarray
open Hdf5_raw
let _ATTR_SIZE = 5
let () =
let data = Array1.of_array int32 c_layout [| 1l; 2l; 3l; 4l; 5l |] in
let file_id = H5f.create "ex_lite3.h5" H5f.Acc.([ TRUNC ]) in
let space_id = H5s.create_simple [| _ATTR_SIZE |] in
let dset_id = H5d.create file_id "dset" H5t.native_int space_id in
... | |
874b74bd8cde7f6ef70eadb383b5a0f900b599f8d9b468561a2d18a13b45e569 | evanrelf/sudoku-tui | FileIO.hs | module FileIO
( loadGame
, saveGame
, prompt
, promptSave
) where
import Game
import System.IO (hFlush, stdout)
exportGame :: Game -> String
exportGame = show . grid
importGame :: String -> Game
importGame = (\g -> Game (4, 4) g Nothing) . read
loadGame :: FilePath -> IO Game
loadGame filename = importGa... | null | https://raw.githubusercontent.com/evanrelf/sudoku-tui/5b7544296cc275e6f0a7b5781667962512ddf943/src/FileIO.hs | haskell | module FileIO
( loadGame
, saveGame
, prompt
, promptSave
) where
import Game
import System.IO (hFlush, stdout)
exportGame :: Game -> String
exportGame = show . grid
importGame :: String -> Game
importGame = (\g -> Game (4, 4) g Nothing) . read
loadGame :: FilePath -> IO Game
loadGame filename = importGa... | |
cdf62760566e59e1487a0caff32f57c4cc1f91251f6c62a65b89d7355b4cd80a | reflectionalist/S9fES | hyper.scm | Scheme 9 from Empty Space , Function Library
By , 2009
; Placed in the Public Domain
;
( hyper ) = = > integer
;
Compute A hyper(N ) B , where N = INTEGER1 , A = INTEGER2 , and B = INTEGER3 .
;
Example : ( hyper 4 3 3 ) = = > 7625597484987
(define (hyper n a b)
(cond ((= n 0) (+ 1 b))
... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/hyper.scm | scheme | Placed in the Public Domain
| Scheme 9 from Empty Space , Function Library
By , 2009
( hyper ) = = > integer
Compute A hyper(N ) B , where N = INTEGER1 , A = INTEGER2 , and B = INTEGER3 .
Example : ( hyper 4 3 3 ) = = > 7625597484987
(define (hyper n a b)
(cond ((= n 0) (+ 1 b))
((= n 1) (+ a b))
((= b ... |
da2ce7e52408180bd016fdf714fdf5b1e5af809296122faf0b229959b50b431d | maciej-bendkowski/generic-boltzmann-brain | MotzkinTree.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Test.Samplers.MotzkinTree (MotzkinTree (..)) where
import Data.Boltzmann (
BoltzmannSampler (..),
LowerBound (MkLowerBound),
System (..),
UpperBound (MkUpperBound),
mkBoltzmannSampler,
mkDefWeights,
quickCheckRejectionSampler,
)
import Data... | null | https://raw.githubusercontent.com/maciej-bendkowski/generic-boltzmann-brain/f8672b62e5c3c878aff532883b6c11fc37102fe6/test/Test/Samplers/MotzkinTree.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Test.Samplers.MotzkinTree (MotzkinTree (..)) where
import Data.Boltzmann (
BoltzmannSampler (..),
LowerBound (MkLowerBound),
System (..),
UpperBound (MkUpperBound),
mkBoltzmannSampler,
mkDefWeights,
quickCheckRejectionSampler,
)
import Data... | |
e0906d365383edff827ab9c4319f4b3c1473cc33a0e14bec9f992870c0d670e8 | tatut/ripley | xtdb.clj | (ns ripley.integration.xtdb
"XTDB query source integration.
Query source will listen to new transactions and rerun
queries on any changes."
(:require [xtdb.api :as xt]
[ripley.live.source :as source]
[ripley.live.protocols :as lp]))
(defn q
"XTDB query source. Will rerun query and u... | null | https://raw.githubusercontent.com/tatut/ripley/39d5ec45293b75767617a7c3d2c8f1f60c800da7/src/ripley/integration/xtdb.clj | clojure | (ns ripley.integration.xtdb
"XTDB query source integration.
Query source will listen to new transactions and rerun
queries on any changes."
(:require [xtdb.api :as xt]
[ripley.live.source :as source]
[ripley.live.protocols :as lp]))
(defn q
"XTDB query source. Will rerun query and u... | |
976db1763a840f303aee88e0b3d51e4a3c6472551ac1d0a4557a61ad8844e773 | janestreet/core_unix | command_unix.mli | open! Core
* Runs a command against [ Sys.argv ] , or [ argv ] if it is specified .
[ extend ] can be used to add extra command line arguments to basic subcommands of the
command . [ extend ] will be passed the ( fully expanded ) path to a command , and its
output will be appended to the list of a... | null | https://raw.githubusercontent.com/janestreet/core_unix/a051098a918b950e9d0a5da7248f1bbfb51388e5/command_unix/src/command_unix.mli | ocaml | * [Path.t] is a top-level executable name and sequence of subcommand names that can be
used to identify a command.
* [append] appends a subcommand to [t].
* [parts] returns a list containing the path's executable name followed by its
subcommands.
* Exposes the shape of a command.
* [Deprecated] should b... | open! Core
* Runs a command against [ Sys.argv ] , or [ argv ] if it is specified .
[ extend ] can be used to add extra command line arguments to basic subcommands of the
command . [ extend ] will be passed the ( fully expanded ) path to a command , and its
output will be appended to the list of a... |
d19c914c0367ec1d32c5fac8f575f7127bb3696bc277bb6072656813331247a9 | NorfairKing/tickler | Account.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Tickler.Web.Server.Handler.Account
( getAccountR,
getAccountSettingsR,
postAccountSettingsR,
postAccountDeleteR,
)
where
import qualified Data.Text as T
import Data.Time
import ... | null | https://raw.githubusercontent.com/NorfairKing/tickler/b72b81a90b7c8e783bcadc3a3b5aec44c5058952/tickler-web-server/src/Tickler/Web/Server/Handler/Account.hs | haskell | # LANGUAGE OverloadedStrings #
already bubscribed | # LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Tickler.Web.Server.Handler.Account
( getAccountR,
getAccountSettingsR,
postAccountSettingsR,
postAccountDeleteR,
)
where
import qualified Data.Text as T
import Data.Time
import Import
import Tickler.Client
import... |
692966dbcdcefccd5527e19e08c89638986fa1c5909d8d3408b59920655abc8f | uim/uim | annotation-osx-dcs.scm | ;;; annotation-osx-dcs.scm: OS X Dictionary Services functions for uim
;;;
Copyright ( c ) 2011 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistri... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/annotation-osx-dcs.scm | scheme | annotation-osx-dcs.scm: OS X Dictionary Services functions for uim
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, thi... | Copyright ( c ) 2011 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
3a8d345f575af53aec63e2dbc8c0f520266884ef7462ff6808c44089b71840ba | roburio/udns | resolver.ml | ( c ) 2017 , 2018 , all rights reserved
open Dns
let empty = Dns_resolver_cache.empty 100
let ip = Ipaddr.V4.of_string_exn
let ip6 = Ipaddr.V6.of_string_exn
let name = Domain_name.of_string_exn
let sec = Duration.of_sec
let invalid_soa = Dns_resolver_utils.invalid_soa
let root_servers = snd (List.split Dns_res... | null | https://raw.githubusercontent.com/roburio/udns/585c40933ac3d5eceb351f7edd3f45cf2615a9f8/test/resolver.ml | ocaml | TODO: not sure whether the semantics is correct... now no more any errors
from resolve_ns, no more result type
considering what is valid in the response, it turns out only the cname is
should glue be respected? don't think it's worth it | ( c ) 2017 , 2018 , all rights reserved
open Dns
let empty = Dns_resolver_cache.empty 100
let ip = Ipaddr.V4.of_string_exn
let ip6 = Ipaddr.V6.of_string_exn
let name = Domain_name.of_string_exn
let sec = Duration.of_sec
let invalid_soa = Dns_resolver_utils.invalid_soa
let root_servers = snd (List.split Dns_res... |
3e6a624ae29e803a05908190a48e2f7826983c14ca605a2ad0c31821df9f7ce7 | gregcman/cl-c-parse | yacc.lisp | (in-package :c-parse)
;;;;process the yacc.txt file
(defparameter *yacc-txt-path*
(merge-pathnames "yacc.txt" *path*))
(deflazy *yacc-txt* ()
(alexandria:read-file-into-string *yacc-txt-path*))
(deflazy *yacc-txt2* (*yacc-txt*)
(file-lines-no-whitespace-lines
*yacc-txt*))
(defun split-yacc (&optional (yacc (... | null | https://raw.githubusercontent.com/gregcman/cl-c-parse/4f9a6c61919c6ce5cb75a2500e9308b92cc5f6df/yacc.lisp | lisp | process the yacc.txt file
intersperse newlines again and concatenate for esrap-liquid
intersperse newlines again and concatenate for esrap-liquid
"return (values #<list-of-tokens> start)"
FIXME::does not handle // comments
)
because characters are terminals. FIXME:documentation
represent a contiguous region of memor... | (in-package :c-parse)
(defparameter *yacc-txt-path*
(merge-pathnames "yacc.txt" *path*))
(deflazy *yacc-txt* ()
(alexandria:read-file-into-string *yacc-txt-path*))
(deflazy *yacc-txt2* (*yacc-txt*)
(file-lines-no-whitespace-lines
*yacc-txt*))
(defun split-yacc (&optional (yacc (getfnc '*yacc-txt2*)))
(mult... |
48966855bbaef4f80bcbde0a0503f2485dc60e9cbcc1bfe369bded0043178d9c | stchang/macrotypes | mlish.rkt | #lang s-exp macrotypes/typecheck
(require
(postfix-in - racket/fixnum)
(postfix-in - racket/flonum)
(postfix-in - racket/match)
(for-syntax racket/set racket/string
macrotypes/type-constraints macrotypes/variance-constraints)
(for-meta 2 racket/base))
(extends
"ext-stlc.rkt"
#:except → ... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-example/macrotypes/examples/mlish.rkt | racket | for pattern matching
ML-like language
- top level recursive functions
- user-definable algebraic datatypes
- pattern matching
- (local) type inference
creating possibly polymorphic types
matching possibly polymorphic types
tyXs = input and output types from fn type
It infers the types of arguments from left... | #lang s-exp macrotypes/typecheck
(require
(postfix-in - racket/fixnum)
(postfix-in - racket/flonum)
(postfix-in - racket/match)
(for-syntax racket/set racket/string
macrotypes/type-constraints macrotypes/variance-constraints)
(for-meta 2 racket/base))
(extends
"ext-stlc.rkt"
#:except → ... |
9f8cf90e1935cf53950d285d9019270ee56b22ada4cbdb609d1c094de1947096 | input-output-hk/marlowe-cardano | Futures.hs | # LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
module Marlowe.Contracts.Futures
( future
) where
import Data.String (IsString(..))
import Language.Marlowe.Extended.V1
import Marlowe.Contracts.Common
|Future on the exchange rate of ADA / USD
--
-- A Future is an obligation for the parties inv... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/78a3dbb1cd692146b7d1a32e1e66faed884f2432/marlowe-contracts/src/Marlowe/Contracts/Futures.hs | haskell | # LANGUAGE OverloadedStrings #
A Future is an obligation for the parties involed in the
contract to exchange assets at maturity for the predefined
value.
at maturity.
The contract relies on /margin accounts/. The parties are required
to make payments into the margin account, in case the exchange
^ Buyer
^ S... | # LANGUAGE NumericUnderscores #
module Marlowe.Contracts.Futures
( future
) where
import Data.String (IsString(..))
import Language.Marlowe.Extended.V1
import Marlowe.Contracts.Common
|Future on the exchange rate of ADA / USD
The Future implemented here exchanges ADA for USD . The contract
is cash settled ,... |
22cf04f06bc9af2d43b21530acec7927c8559f7b37fc3f111c96e16052257100 | libguestfs/virt-v2v | parse_libvirt_xml.mli | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/virt-v2v/cff4514927b3e12a30619377149789c5bd2daebb/input/parse_libvirt_xml.mli | ocaml | * Disk type and extra information.
* type=file with <source file=...>
* HTTP/HTTPS URL
* [parse_libvirt_domain conn dom] loads the XML of the domain [dom]
from the libvirt connection [conn].
The result is a tuple with a {!Types.source} structure, a list of
libvirt disks, and the XML of the guest. | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
e8f68854912afefd9d034580499e23cb3fb8f476f39fc544a44e9fb6c14e2085 | Copilot-Language/copilot | Extra.hs | -- | Auxiliary testing helper functions.
module Test.Extra where
-- External imports
import Control.Arrow ((***))
-- * Function application
| Apply a tuple with two functions to a tuple of arguments .
apply1 :: (a1 -> b1, a2 -> b2) -- ^ Pair with functions
-> (a1, a2) -- ^ Pair with arguments
... | null | https://raw.githubusercontent.com/Copilot-Language/copilot/3ed0dd3c1d3cab37205f13cfc2ef8dd866e35533/copilot-interpreter/tests/Test/Extra.hs | haskell | | Auxiliary testing helper functions.
External imports
* Function application
^ Pair with functions
^ Pair with arguments
^ Pair with results
arguments.
^ Pair with functions
^ Pair with results
arguments.
^ Pair with functions
^ Pair with results | module Test.Extra where
import Control.Arrow ((***))
| Apply a tuple with two functions to a tuple of arguments .
apply1 = uncurry (***)
| Apply a tuple with two functions on two arguments to their tupled
^ Pair with first arguments
^ Pair with second arguments
apply2 fs = apply1 . apply1 fs
| Apply a tu... |
55f392fda3ef6f56096474fe668db05576b5bb87fffa050ab5d46b7f155ea524 | roelvandijk/numerals | GLV.hs | |
[ @ISO639 - 1@ ] gv
[ @ISO639 - 2@ ] glv
[ @ISO639 - 3@ ] glv
[ @Native name@ ] Gaelg
[ @English name@ ] Manx
[@ISO639-1@] gv
[@ISO639-2@] glv
[@ISO639-3@] glv
[@Native name@] Gaelg
[@English name@] Manx
-}
module Text.Numeral.Language.... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src/Text/Numeral/Language/GLV.hs | haskell | * Language entry
* Conversions
* Structure
* Bounds
-----------------------------------------------------------------------------
Imports
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
GLV
----------------... | |
[ @ISO639 - 1@ ] gv
[ @ISO639 - 2@ ] glv
[ @ISO639 - 3@ ] glv
[ @Native name@ ] Gaelg
[ @English name@ ] Manx
[@ISO639-1@] gv
[@ISO639-2@] glv
[@ISO639-3@] glv
[@Native name@] Gaelg
[@English name@] Manx
-}
module Text.Numeral.Language.... |
2a5f9c994f0b041f33ff91c72f4092c2a306376a874a81ba68deec89f05410a1 | mokus0/junkbox | UnboxVector.hs | # LANGUAGE
TypeFamilies ,
MultiParamTypeClasses ,
GeneralizedNewtypeDeriving
#
TypeFamilies,
MultiParamTypeClasses,
GeneralizedNewtypeDeriving
#-}
module TypeExperiments.UnboxVector where
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/UnboxVector.hs | haskell | # LANGUAGE
TypeFamilies ,
MultiParamTypeClasses ,
GeneralizedNewtypeDeriving
#
TypeFamilies,
MultiParamTypeClasses,
GeneralizedNewtypeDeriving
#-}
module TypeExperiments.UnboxVector where
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.... | |
c6b170ec63578052093f10b1ea16f4cd88ea780796455406393ef126f56bcb41 | ayamada/copy-of-svn.tir.jp | dispatch.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
;;; ToDo : vhostのregexp生成部分を作り、動作確認しましょう。
ToDo : apacheのServerAlias実装
;;; ToDo : 可能なら、lazyな評価を行うようにしたい
;;; (autoloadのように、必要な部分のみ実行するようにしたい)
(define-module tcpcgi.dispatch
(use gauche.regexp) ; regexp-quote
(use srfi-... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/tcpcgi/tags/0.4.4.2/src/lib/tcpcgi/dispatch.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
ToDo : vhostのregexp生成部分を作り、動作確認しましょう。
ToDo : 可能なら、lazyな評価を行うようにしたい
(autoloadのように、必要な部分のみ実行するようにしたい)
regexp-quote
filter-map
and-let*
alist->hash-table intersperse
上のテーブルのkeyがあるかどうかを正規表現にしたもの
上のテーブルのkeyがあるかどうかを正規表現にしたもの
で、vhost-dispa... | $ Id$
ToDo : apacheのServerAlias実装
(define-module tcpcgi.dispatch
(use text.tree)
(export
<tcpcgi.dispatch.vhost>
<tcpcgi.dispatch.path>
<tcpcgi.dispatch.none>
make-dispatch-vhost
make-dispatch-path
make-dispatch-none
dispatch.vhost->dispatch.path
dispatch.path->dispatch.none
... |
ef2238a694d97dfe2567d4f3eb8a6a80eb759a2d282cedc1d65bfd891019b146 | Frama-C/Frama-C-snapshot | GuiProof.mli | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/GuiProof.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
472cb9fed0ca5dfe150fb55e99a37c3d19d4f53206d9078829a20f8eaee58683 | RunOrg/RunOrg | feedMapView.ml | (* © 2014 RunOrg *)
open Common
open Std
type ('key, 'id, 'value) t = {
kpack : 'key Pack.packer ;
kupack : 'key Pack.unpacker ;
ipack : 'id Pack.packer ;
iupack : 'id Pack.unpacker ;
vpack : 'value Pack.packer ;
vupack : 'value Pack.unpacker ;
name : string ;
wait : (ctx, unit) Run.t ;
dbname : (c... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/cqrsLib/feedMapView.ml | ocaml | © 2014 RunOrg
Creating a new feed map
=======================
Reading an item from the map
=========================
Updating the map contents
=========================
Deleting a feed
===============
Gathering stats for a key.
==========================
Extracting feed values
======... |
open Common
open Std
type ('key, 'id, 'value) t = {
kpack : 'key Pack.packer ;
kupack : 'key Pack.unpacker ;
ipack : 'id Pack.packer ;
iupack : 'id Pack.unpacker ;
vpack : 'value Pack.packer ;
vupack : 'value Pack.unpacker ;
name : string ;
wait : (ctx, unit) Run.t ;
dbname : (ctx, string) Run.t
}
... |
39ce6b47bffd0cfcf9256a5d4ab6710e59c2b25f9aaf47904fe40a40752c5f81 | silky/fashion | WarpSpeed.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Nvds.Designs.WarpSpeed where
import Control.Monad
import Data.Colour
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import GSL.Random.Quasi (halton, QRNGType, getListS... | null | https://raw.githubusercontent.com/silky/fashion/2b01d1e5c385fe99e8e54f5828114551e9c8e309/Warp-Speed/src/Nvds/Designs/WarpSpeed.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NoMonomorphismRestriction #
Black-hole-esque thing
f pt = (pt, c # scale (norm (pt - pc)))
Accidentally-close: | # LANGUAGE FlexibleContexts #
module Nvds.Designs.WarpSpeed where
import Control.Monad
import Data.Colour
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import GSL.Random.Quasi (halton, QRNGType, getListSample, newQRNG)
getPoints :: QRNGType -> Int -> IO [Point V2 Double]
getPoints qrngTyp... |
a1d51b6e7f49b23049c9c8920d849b43ceead0a1cf2aeb99a126bc9fd52c7cb6 | dvingo/dv.fulcro-template | cider.clj | (ns clj.new.dv.fulcro-template.options.cider
(:require [clj.new.dv.fulcro--template.options.helpers :as helpers]))
(def option "+cider")
(defn files [data]
[[".dir-locals.el" (helpers/render "dir-locals.el" data)]])
| null | https://raw.githubusercontent.com/dvingo/dv.fulcro-template/3f143d9a06e00749ea7f33c16c002f416fe69415/src/clj/new/dv/fulcro_template/options/cider.clj | clojure | (ns clj.new.dv.fulcro-template.options.cider
(:require [clj.new.dv.fulcro--template.options.helpers :as helpers]))
(def option "+cider")
(defn files [data]
[[".dir-locals.el" (helpers/render "dir-locals.el" data)]])
| |
965d1177b1a99dcba276f5e1584cc9856c22596162108f87f1e43060ea7c0fc3 | pgj/mirage-kfreebsd | format.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-stdlib/src/format.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
type size;;
external size_of_int :... |
418d74bec830b2f213dac433b876f825583f271bcd68bbd773f17c234861e8df | mbenelli/klio | vectors#.scm | (namespace
("vectors#"
;; Constructors
make-vector vector
vector-unfold
vector-unfold-right
vector-copy
vector-reverse-copy
vector-append
vector-concatenate
;; Predicates
vector?
vector-empty?
vector=
;; Selectors
vector-ref
vector-length
;; Iteration
vector-fold... | null | https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/klio/vectors%23.scm | scheme | Constructors
Predicates
Selectors
Iteration
Searching
Mutators
Conversion | (namespace
("vectors#"
make-vector vector
vector-unfold
vector-unfold-right
vector-copy
vector-reverse-copy
vector-append
vector-concatenate
vector?
vector-empty?
vector=
vector-ref
vector-length
vector-fold
vector-fold-right
vector-map
vector-map!
vector-for-eac... |
60676f9d79289ed602ce9bd32b45abb0baaace48073718d277b5d4e451b6a6e3 | goldfirere/thesis | MatchToken.hs | -- Using singletons, etc., to do a "matchable" thing.
# LANGUAGE DeriveDataTypeable , TypeFamilies , TemplateHaskell , DataKinds ,
PolyKinds , GADTs , RankNTypes , MultiParamTypeClasses ,
FlexibleInstances , UndecidableInstances ,
FunctionalDependencies , StandaloneDeriving... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/hs/MatchToken.hs | haskell | Using singletons, etc., to do a "matchable" thing.
AllowAmbiguousTypes ,
ImpredicativeTypes ,
, OverlappingInstances ,
NullaryTypeClasses
AllowAmbiguousTypes,
ImpredicativeTypes,
, OverlappingInstances,
NullaryTypeClasses
matchT :: forall a. (a -> T) -> T -> Maybe a
matchT ctor t
= case (ctor undefined,... |
# LANGUAGE DeriveDataTypeable , TypeFamilies , TemplateHaskell , DataKinds ,
PolyKinds , GADTs , RankNTypes , MultiParamTypeClasses ,
FlexibleInstances , UndecidableInstances ,
FunctionalDependencies , StandaloneDeriving ,
TypeOperators , ScopedTypeVariables ... |
2d9c5c7cc9a47ac97f3551f037d3227a73f167c5c18decdbe6893f29d53d309e | chrisnc/hvx | Matrix.hs | module HVX.Internal.Matrix
( Mat
, allMat
, anyMat
, diagMat
, ei
, fpequalsMat
, lpnorm
, matrixPow
, reduceMat
, scalarMat
, zeroMat
, zeroVec
) where
import Numeric.LinearAlgebra
import HVX.Internal.Util
type Mat = Matrix Double
allMat :: (Double -> Bool) -> Mat -> Bool
allMat f x = all... | null | https://raw.githubusercontent.com/chrisnc/hvx/4256e83d265c7b6bf9336533c15eae9fecce9a6d/src/HVX/Internal/Matrix.hs | haskell | module HVX.Internal.Matrix
( Mat
, allMat
, anyMat
, diagMat
, ei
, fpequalsMat
, lpnorm
, matrixPow
, reduceMat
, scalarMat
, zeroMat
, zeroVec
) where
import Numeric.LinearAlgebra
import HVX.Internal.Util
type Mat = Matrix Double
allMat :: (Double -> Bool) -> Mat -> Bool
allMat f x = all... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.