_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 |
|---|---|---|---|---|---|---|---|---|
4750b2725bf0448beb2c0bd2607671817b29be15cc766d4aac8908913b283201 | janestreet/merlin-jst | diffing.mli |
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_413/utils/diffing.mli | ocaml | ************************************************************************
OCaml
... |
, projet Cambium , Paris
Copyright 2020 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* { 0 Parametric diffing }
This module implements diffing over lists of arbitrary content .
It is p... |
1f4d9acc2506177a4f02d6a917c026523f7d8f8b11bbbde26b89b3f31bb5c3e4 | backtracking/functory | figures.ml | (* figure mlpost *)
open Mlpost
open Point
open Path
open Command
open Num
open Num.Infix
open Color
open Box
let fill = gray 0.8
let state =
let node s =
let s = "\\sf{" ^ s ^ "}" in
round_rect ~dx:zero ~fill (tex s)
in
let nc = node "not connected" in
let alive = node "alive" in
let pinged = node... | null | https://raw.githubusercontent.com/backtracking/functory/75368305a853a90ebea9e306d82e4ef32649d1ce/doc/tfp-2011/slides/figures.ml | ocaml | figure mlpost
Assign
Kill
Ping
Stop
Pong
Aborted
disconnection
Completed 2
Local Variables:
compile-command: "mlpost -latex slides.tex -xpdf figures.ml"
End:
|
open Mlpost
open Point
open Path
open Command
open Num
open Num.Infix
open Color
open Box
let fill = gray 0.8
let state =
let node s =
let s = "\\sf{" ^ s ^ "}" in
round_rect ~dx:zero ~fill (tex s)
in
let nc = node "not connected" in
let alive = node "alive" in
let pinged = node "pinged" in
let e... |
26694ee2748a4c74ca6d8e94b44ff7307b258d20e112da049243a9f81865985f | Relph1119/sicp-solutions-manual | p1-40-cubic.scm | (load "src/practices/ch01/p1-8-cube.scm")
(load "src/examples/ch01/p8-square.scm")
(define (cubic a b c)
(lambda (x)
(+ (cube x)
(* a (square x))
(* b x)
c))) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-40-cubic.scm | scheme | (load "src/practices/ch01/p1-8-cube.scm")
(load "src/examples/ch01/p8-square.scm")
(define (cubic a b c)
(lambda (x)
(+ (cube x)
(* a (square x))
(* b x)
c))) | |
8ae56c13d9c700e5d96e073b8d773ed4d7e2434de1fa85d87261b862277715bb | dcavar/schemeNLP | swedish.scm | (define stopwords-swedish '("alla" "allt" "att" "av" "blev" "bli" "blir" "blivit" "de" "dem" "den" "denna" "deras" "dess" "dessa" "det" "detta" "dig" "din" "dina" "ditt" "du" "där" "då" "efter" "ej" "eller" "en" "er" "era" "ert" "ett" "från" "för" "ha" "hade" "han" "hans" "har" "henne" "hennes" "hon" "honom" "hur" "här... | null | https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/swedish.scm | scheme | (define stopwords-swedish '("alla" "allt" "att" "av" "blev" "bli" "blir" "blivit" "de" "dem" "den" "denna" "deras" "dess" "dessa" "det" "detta" "dig" "din" "dina" "ditt" "du" "där" "då" "efter" "ej" "eller" "en" "er" "era" "ert" "ett" "från" "för" "ha" "hade" "han" "hans" "har" "henne" "hennes" "hon" "honom" "hur" "här... | |
28de96d3b46129b74bfb2d450abec968eae58e0e1f6b8269c43042beddf07127 | channable/icepeak | auth_stress_test.hs | #!/usr/bin/env stack
-- stack --stack-yaml ../../client-haskell/stack.yaml runghc --package QuickCheck --package quickcheck-text
# OPTIONS_GHC -Wall #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
| This test first sends a number of write requests that should be accepted by
the server , ... | null | https://raw.githubusercontent.com/channable/icepeak/19674df79c5c2c191367a87dff3a10588515044b/server/integration-tests/auth_stress_test.hs | haskell | stack --stack-yaml ../../client-haskell/stack.yaml runghc --package QuickCheck --package quickcheck-text
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
# OPTIONS_GHC -Wall #
# LANGUAGE ScopedTypeVariables #
| This test first sends a number of write requests that should be accepted by
the server , followed by the same number of requests that should be accepted .
the server, followed by the same number of requests that should be accep... |
34157bb347aaf49c478e7d4c3f71badde7a2a7a55b92db9bf8894bb9e3c4da26 | ghc/ghc | Settings.hs |
-- | Run-time settings
module GHC.Settings
( Settings (..)
, ToolSettings (..)
, FileSettings (..)
, GhcNameVersion (..)
, Platform (..)
, PlatformMisc (..)
-- * Accessors
, dynLibSuffix
, sProgramName
, sProjectVersion
, sGhcUsagePath
, sGhciUsagePath
, sToolDir
, sTopDir
, sGlobalPacka... | null | https://raw.githubusercontent.com/ghc/ghc/cad5c5760f6fe06057eb7ad9927b9c1e83417c1e/compiler/GHC/Settings.hs | haskell | | Run-time settings
* Accessors
# UNPACk #
# UNPACK #
# UNPACK #
# UNPACK #
They should have their own fields instead.
Probably should further split down by phase, or split between
platform-specific and platform-agnostic.
commands for particular phases
merging, hence the 'Maybe'. See Note [Object merging] in
o... |
module GHC.Settings
( Settings (..)
, ToolSettings (..)
, FileSettings (..)
, GhcNameVersion (..)
, Platform (..)
, PlatformMisc (..)
, dynLibSuffix
, sProgramName
, sProjectVersion
, sGhcUsagePath
, sGhciUsagePath
, sToolDir
, sTopDir
, sGlobalPackageDatabasePath
, sLdSupportsCompactUnw... |
88e38485faa49c5fab6575342b7c1a88aa218ab41b611ba42d6023ad5e34235e | ocaml-ppx/ocamlformat | js_sig.mli | open! Core
* First documentation comment .
exception First_exception
* Second documentation comment .
exception Second_exception
[@@@ocamlformat "parse-docstrings=true"]
[@@@ocamlformat "wrap-comments=true"]
* { e foooooooo oooooo oooo } { i fooooo ooooo oooo } { b fooooooo oooooo oooooo oooooo oooooo ooooo... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/js_sig.mli | ocaml | open! Core
* First documentation comment .
exception First_exception
* Second documentation comment .
exception Second_exception
[@@@ocamlformat "parse-docstrings=true"]
[@@@ocamlformat "wrap-comments=true"]
* { e foooooooo oooooo oooo } { i fooooo ooooo oooo } { b fooooooo oooooo oooooo oooooo oooooo ooooo... | |
525bb5508455c8b211d8cc13a2c0746f049b77986523cee0cb2bc49f37d59464 | cyverse-archive/DiscoveryEnvironmentBackend | uuids.clj | (ns kameleon.uuids)
(def ^:private uuid-regexes
[#"^\p{XDigit}{8}(?:-\p{XDigit}{4}){3}-\p{XDigit}{12}$"
#"^[at]\p{XDigit}{32}"])
(defn is-uuid?
[id]
(or (instance? java.util.UUID id)
(and (string? id) (some #(re-find % id) uuid-regexes))))
(defn uuid
[]
(java.util.UUID/randomUUID))
(defmulti uuid... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/kameleon/src/kameleon/uuids.clj | clojure | (ns kameleon.uuids)
(def ^:private uuid-regexes
[#"^\p{XDigit}{8}(?:-\p{XDigit}{4}){3}-\p{XDigit}{12}$"
#"^[at]\p{XDigit}{32}"])
(defn is-uuid?
[id]
(or (instance? java.util.UUID id)
(and (string? id) (some #(re-find % id) uuid-regexes))))
(defn uuid
[]
(java.util.UUID/randomUUID))
(defmulti uuid... | |
7a87b673d9e5a18f4d72cb09866909980222a145fc1e25365b1b1d86d0639b16 | metosin/ring-swagger | swagger_ui_test.clj | (ns ring.swagger.swagger-ui-test
(:require [midje.sweet :refer :all]
[ring.mock.request :as mock]
[ring.swagger.test-utils :as test-utils]
[ring.swagger.swagger-ui :refer :all]
[cheshire.core :as json]))
(tabular
(fact get-path
(get-path ?root ?uri) => ?path)
... | null | https://raw.githubusercontent.com/metosin/ring-swagger/0ef9046174dec0ebd4cbf97d6cc5c6846ef11996/test/ring/swagger/swagger_ui_test.clj | clojure | Request to directory, uri doesn't necessarily end with "/"
Some possible envinronments
Servlet context:
- uri will contain full path
- servlet context countains ServletContext object
- context contains context path (under compojure this will also contain compojure context) | (ns ring.swagger.swagger-ui-test
(:require [midje.sweet :refer :all]
[ring.mock.request :as mock]
[ring.swagger.test-utils :as test-utils]
[ring.swagger.swagger-ui :refer :all]
[cheshire.core :as json]))
(tabular
(fact get-path
(get-path ?root ?uri) => ?path)
... |
b64a440e89d57dfc73cd39275f435f4150de9ba24071f85b72cdd8e8255b9575 | ghc/nofib | Main.hs | -- This is a simple program using ANSI escape sequences to create a program
-- which uses direct cursor addressing and input/output.
--
People are often quite surprised the first time they see a program like
-- this written in a functional language.
import System.Environment
-- Basic screen control codes:
-- Choos... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/ansi/Main.hs | haskell | This is a simple program using ANSI escape sequences to create a program
which uses direct cursor addressing and input/output.
this written in a functional language.
Basic screen control codes:
Choose whichever of the following lines is suitable for your system:
partain: cls = "\ESC[2J" -- for PC with ANSI.SY... | People are often quite surprised the first time they see a program like
import System.Environment
for Sun window
goto x y = '\ESC':'[':(show y ++(';':show x ++ "H"))
at (x,y) s = goto x y ++ s
home = goto 1 1
highlight s = "\ESC[7m"++s++"\ESC[0m"
type Interact = String -> String
end ... |
5468dc58423babce81b1e99228872088776767f2528430e8a65fd4f72b3a25b6 | flybot-sg/lasagna-pull | schema.cljc | Copyright 2022 , Flybot Pte . Ltd.
Apache License 2.0 , /
(ns sg.flybot.pullable.schema
"Pattern validation with Malli schema."
(:require [malli.core :as m]
[malli.util :as mu]))
(defn lvar?
"predict if `x` is a logical var, a.k.a lvar"
[x]
(boolean (and (symbol? x) (re-matches #"\?.*" (str... | null | https://raw.githubusercontent.com/flybot-sg/lasagna-pull/fc7fe7defdbdec07730f87cbd72593cd59bd5ac2/src/sg/flybot/pullable/schema.cljc | clojure | => true
=> true
=> false
-------------------
key, however, we need to put a key in a list, so we need wrap a map schema
inside a custom schema.
or an equivlent as a function. But we need to know it in order to make different
for example, `[:not list?]` should actually be treated as `:any`.
TODO options are fixed, s... | Copyright 2022 , Flybot Pte . Ltd.
Apache License 2.0 , /
(ns sg.flybot.pullable.schema
"Pattern validation with Malli schema."
(:require [malli.core :as m]
[malli.util :as mu]))
(defn lvar?
"predict if `x` is a logical var, a.k.a lvar"
[x]
(boolean (and (symbol? x) (re-matches #"\?.*" (str... |
a66e700f295c2c45173e41fd003f48ae89912c9f8289f6c0ae1d3a12cca10f00 | cloudkj/layer | options.scm | (declare (unit options))
(use srfi-13)
;;; Helpers
;; Returns true if the given option spec is for a required parameter.
(define (required? option)
(equal? (caddr option) '(required #t)))
;; Returns a lookup function for looking up option values by the option
;; definition. The lookup function optionally takes a ... | null | https://raw.githubusercontent.com/cloudkj/layer/eb9d36207a33e770591bb8c0fd639ec4f0f63466/src/options.scm | scheme | Helpers
Returns true if the given option spec is for a required parameter.
Returns a lookup function for looking up option values by the option
definition. The lookup function optionally takes a function to apply to the
value of the option, if it exists. If the option does not exist, the lookup
will return a defa... | (declare (unit options))
(use srfi-13)
(define (required? option)
(equal? (caddr option) '(required #t)))
(define (make-options-lookup options)
(lambda (option-definition #!optional default f)
(let* ((key (car option-definition))
(val (assoc key options)))
(cond ((not val) default)
... |
766250e09e9dbed6910ba87512d26b598033958162faf611cad28a64eaeba408 | portkey-cloud/aws-clj-sdk | _2015-04-08.clj | (ns portkey.aws.workspaces.-2015-04-08 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope
{:service "workspaces", :region "ap-northeast-1"},
:ssl-common-name "workspaces.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/workspaces/_2015-04-08.clj | clojure | (ns portkey.aws.workspaces.-2015-04-08 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope
{:service "workspaces", :region "ap-northeast-1"},
:ssl-common-name "workspaces.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"... | |
12c67197301a6a4357f5200d8edce0bf59d5b06ddd471b2174e1594feca003c0 | exoscale/clojure-kubernetes-client | v1_security_context.clj | (ns clojure-kubernetes-client.specs.v1-security-context
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-capabilities :refer :all]
[clojure-kubernetes-client.specs.v1-se-linux-options :refer :all]
)
(:import (java.... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_security_context.clj | clojure | (ns clojure-kubernetes-client.specs.v1-security-context
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-capabilities :refer :all]
[clojure-kubernetes-client.specs.v1-se-linux-options :refer :all]
)
(:import (java.... | |
9ed1547d3092c59a9c49d769b028b6e0d124be31d94b459445cae564a5f39ffb | aymanosman/cl-missile-command | main.lisp | (in-package :raylib)
(defvar frame 0)
(defvar paused nil)
(defvar shader)
(defvar target)
(defvar scale)
(defvar camera)
(defvar screen-width 600)
(defvar screen-height 600)
(defvar game-screen-width 160)
(defvar game-screen-height 128)
(defvar screen-x-offset)
(defvar screen-y-offset)
(defvar city-texture)
(defvar de... | null | https://raw.githubusercontent.com/aymanosman/cl-missile-command/366eaaaa58937add4f79fb9839aac48f387fba0e/main.lisp | lisp | HELPERS
TODO Why do :enter and :tab always return T?
MODEL
UPDATE
collides with player explosion
mirv split
turn into normal missile
the original mirv survives as a normal missile
collides with ground
increment the multiplier every other wave
VIEW
trail
head
MAIN
(when (is-key-pressed :r)
(setup)
(... | (in-package :raylib)
(defvar frame 0)
(defvar paused nil)
(defvar shader)
(defvar target)
(defvar scale)
(defvar camera)
(defvar screen-width 600)
(defvar screen-height 600)
(defvar game-screen-width 160)
(defvar game-screen-height 128)
(defvar screen-x-offset)
(defvar screen-y-offset)
(defvar city-texture)
(defvar de... |
48fcad3c08ff422c0408f679dc079f838f2b448fe31ea299e44ff9059b6f7fb2 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.admin.views
(:require
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.admin.pages.index :refer [pages]]
[webchange.admin.routes :as routes]
[webchange.admin.state :as state]
[webchange.admin.widgets.confirm.views :refer [block-confirm]]
[webchange.admin.widgets.l... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/bfc1897e371c44aa9707b645f2f376558374f66e/src/cljs/webchange/admin/views.cljs | clojure | (ns webchange.admin.views
(:require
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.admin.pages.index :refer [pages]]
[webchange.admin.routes :as routes]
[webchange.admin.state :as state]
[webchange.admin.widgets.confirm.views :refer [block-confirm]]
[webchange.admin.widgets.l... | |
0d65c6bcb02586c01f55a31c998b7a551823d52b5515b56bf25fee74863f9a45 | johnwhitington/ocamli | camlinternalFormat.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/stdlib/camlinternalFormat.ml | ocaml | ************************************************************************
OCaml
... | , ENSTA
Copyright 2014 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open CamlinternalFormatBasics
type mutable_char_set = bytes
let create_char_set () = Bytes.make 32 '\000... |
689641a260232d47aae7041edb35d2b335a6bea88745f58cbbe61968b1db5fc0 | glebec/haskell-programming-allen-moronuki | 03-typeInference1.hs | module TypeInference1 where
f :: Num a => a -> a -> a
f x y = x + y + 3
: t f 1
f 1 : : a = > a - > a
| null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/05-types/03-typeInference1.hs | haskell | module TypeInference1 where
f :: Num a => a -> a -> a
f x y = x + y + 3
: t f 1
f 1 : : a = > a - > a
| |
21c4e5483342dcd3abc07f12155149f8ffa60d150651c646bacffd9d23e2ff3e | mstksg/backprop-learn | Dropout.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Strict #-}
# LANGUAGE TypeApplicatio... | null | https://raw.githubusercontent.com/mstksg/backprop-learn/59aea530a0fad45de6d18b9a723914d1d66dc222/old/src/Learn/Neural/Network/Dropout.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Strict #
# LANGUAGE TypeInType #
| For something like
@
@
you could have
@
0.2 ':&%' 0.3 :&% DOExt
@
rate, and it is therefore impossible... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Learn.Neural.Network.Dropout (
Dropout(..)
, NetworkDO(..)
, netOpDO
, netOpDOPure
, konstD... |
3b2a1e0c60d4fc160261d3a2eeb2f9f48c4c10d15912b6d8e044a378867fe669 | kronkltd/jiksnu | handlers.clj | (ns jiksnu.modules.web.handlers
(:require [ciste.loader :refer [defhandler]]
[jiksnu.modules.core.handlers :as handler]
jiksnu.modules.core.handlers.html
jiksnu.modules.core.handlers.xrd
jiksnu.modules.web.formats
jiksnu.plugins.google-analytics
... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/web/handlers.clj | clojure | (ns jiksnu.modules.web.handlers
(:require [ciste.loader :refer [defhandler]]
[jiksnu.modules.core.handlers :as handler]
jiksnu.modules.core.handlers.html
jiksnu.modules.core.handlers.xrd
jiksnu.modules.web.formats
jiksnu.plugins.google-analytics
... | |
3b8bb288169aba7546fc0e058abab1eed18f7851dfa71e060adefe0e18152be7 | hopbit/sonic-pi-snippets | ambient.sps | # key: ambient
# point_line: 0
# point_index: 7
# --
# Gist:
# Created by: Darin Wilson -> /
# Ambient experiment for Sonic Pi (-pi.net/)
#
# The piece consists of three long loops, each of which plays one of
# two randomly selected pitches. Each note has different attack,
# release and sleep values, so that they move... | null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/tunes/ambient.sps | scheme | # key: ambient
# point_line: 0
# point_index: 7
# --
# Gist:
# Created by: Darin Wilson -> /
# Ambient experiment for Sonic Pi (-pi.net/)
#
# The piece consists of three long loops, each of which plays one of
# two randomly selected pitches. Each note has different attack,
# release and sleep values, so that they move... | |
fa9ff1279bfa1629df2c50e1fbcc2a561d2ec031ace7ea80cb583fcc0fda154f | expipiplus1/vulkan | DisplayTiming.hs | {-# language CPP #-}
No documentation found for Chapter " DisplayTiming "
module OpenXR.Core10.DisplayTiming ( beginFrame
, useFrame
, locateViews
, endFrame
, waitFrame
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/openxr/src/OpenXR/Core10/DisplayTiming.hs | haskell | # language CPP #
# SOURCE #
# SOURCE #
| xrBeginFrame - Marks a frame
== Parameter Descriptions
= Description
'beginFrame' is called prior to the start of frame rendering. The
application /should/ still call 'beginFrame' but omit rendering work for
the frame if 'FrameState'::@shouldRender@ is
'OpenXR.Core10.F... | No documentation found for Chapter " DisplayTiming "
module OpenXR.Core10.DisplayTiming ( beginFrame
, useFrame
, locateViews
, endFrame
, waitFrame
... |
1800fb2109bb57a80b678b3c6a3d5cba94959934e2b3dd9224ed1a6d1e68dcc2 | tek/ribosome | Run.hs | module Ribosome.Menu.Prompt.Run where
import Conc (Gates, consumeElem, subscribeAsync, withAsync_)
import Time (MilliSeconds, convert)
import Ribosome.Api.Input (feedKey, syntheticInput, syntheticInputFk)
import Ribosome.Host.Effect.Rpc (Rpc)
import Ribosome.Menu.Data.MenuConfig (MenuConfig, menuSync)
import Ribosome... | null | https://raw.githubusercontent.com/tek/ribosome/ca2e87d262adadc30c72941d3087fff7da97addb/packages/menu/lib/Ribosome/Menu/Prompt/Run.hs | haskell | module Ribosome.Menu.Prompt.Run where
import Conc (Gates, consumeElem, subscribeAsync, withAsync_)
import Time (MilliSeconds, convert)
import Ribosome.Api.Input (feedKey, syntheticInput, syntheticInputFk)
import Ribosome.Host.Effect.Rpc (Rpc)
import Ribosome.Menu.Data.MenuConfig (MenuConfig, menuSync)
import Ribosome... | |
73cdb63d08552e67d38fc822ce64f809029aa7bdbbda553a2abbcdd444f6eb49 | ocsigen/ojwidgets | ojw_alert.mli |
include Ojw_alert_sigs.T
with module D = Ojw_dom.T
with module Content = Ojw_dom.T
| null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/experimental/ojw_alert.mli | ocaml |
include Ojw_alert_sigs.T
with module D = Ojw_dom.T
with module Content = Ojw_dom.T
| |
0a3aa1e89b8855b862b5f21e1f80390d006149547a727893acf2498242d1f0fd | nionita/Barbarossa | Evolve.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE PatternGuards #
module Main (main) where
import Prelude
import Control.Concurrent.Async
import Control.Exception
import Control.Monad (forM, forM_, when)
import Control.Monad.Trans.Class
import Control.Monad.Trans.State.Lazy
import Data.Char (isSpace)
import Data.List (i... | null | https://raw.githubusercontent.com/nionita/Barbarossa/81032b17ac36dc01771cbcfaaae88c30e7661d7b/Main/Evolve.hs | haskell | # LANGUAGE DeriveDataTypeable #
Some constants for the evolving environment
Other constants
seconds
seconds per move
expect a maximum game length of so may moves
time out factor
Calculations with the hardcoded parameters:
Big care here: the running engine should not produce a logfile,
as that would give an err... | # LANGUAGE PatternGuards #
module Main (main) where
import Prelude
import Control.Concurrent.Async
import Control.Exception
import Control.Monad (forM, forM_, when)
import Control.Monad.Trans.Class
import Control.Monad.Trans.State.Lazy
import Data.Char (isSpace)
import Data.List (isPrefixOf, sortBy, groupBy, stripPre... |
6667b206de39b4c772c87f9eac36665f7b07628e8b4861eb393c0fedaab01d70 | phoe/protest | macros.lisp | src / parachute / macros.lisp
(in-package #:protest/for-parachute)
(defmacro true (form &optional description &rest format-args)
`(parachute:eval-in-context
parachute:*context*
(make-instance
'test-case-comparison-result
:expression '(true ,form)
:value-form ',form
:body (lambda () ,fo... | null | https://raw.githubusercontent.com/phoe/protest/be885130044d9950758a2d1726246c4c114692c1/src/parachute/macros.lisp | lisp | src / parachute / macros.lisp
(in-package #:protest/for-parachute)
(defmacro true (form &optional description &rest format-args)
`(parachute:eval-in-context
parachute:*context*
(make-instance
'test-case-comparison-result
:expression '(true ,form)
:value-form ',form
:body (lambda () ,fo... | |
d336dd3687368e6ad0231f2989f1f36f499fc59a333a29ae0d5646fe80b5d8f3 | janestreet/bonsai | effect.mli | open! Core
open! Async_kernel
open! Import
open Bonsai.For_open
include module type of Virtual_dom.Vdom.Effect
* [ of_deferred_fun ] is a way to convert from a deferred - returning function
to an effect - returning function . This function is commonly used to wrap RPC
calls . Memory is allocated perman... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web/effect.mli | ocaml | open! Core
open! Async_kernel
open! Import
open Bonsai.For_open
include module type of Virtual_dom.Vdom.Effect
* [ of_deferred_fun ] is a way to convert from a deferred - returning function
to an effect - returning function . This function is commonly used to wrap RPC
calls . Memory is allocated perman... | |
c778f17c274685932fd8d90144dedf3e23f8494f022fe31f72f1bd11c0528b5a | NorfairKing/mergeless | Collection.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
-- | A way to synchronise items without merge conflicts.
--
-- This c... | null | https://raw.githubusercontent.com/NorfairKing/mergeless/77fc3d9a66ec4573156116591dbf9e87d61ba3dd/mergeless/src/Data/Mergeless/Collection.hs | haskell | # LANGUAGE OverloadedStrings #
| A way to synchronise items without merge conflicts.
This concept has a few requirements:
* Items must be immutable.
* Items must allow for a centrally unique identifier.
* Items must allow for a client-side unique identifier.
* Identifiers for items must be generated in such a w... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
* The server accepts a ' SyncRequest ' .
* The server respons with a ' SyncResponse ' .
* The clie... |
850f38d81a7244abf054a703c2f80cb7e5d7f7d995d46a9741e29e54828deb97 | simmsb/calamity | LocalWriter.hs | # LANGUAGE TemplateHaskell #
-- | A Writer monad that supports local writing, reverse reader I guess?
module CalamityCommands.Internal.LocalWriter (
LocalWriter (..),
ltell,
llisten,
runLocalWriter,
) where
import Polysemy qualified as P
import Polysemy.State qualified as P
data LocalWriter o m a where
Lte... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity-commands/CalamityCommands/Internal/LocalWriter.hs | haskell | | A Writer monad that supports local writing, reverse reader I guess? | # LANGUAGE TemplateHaskell #
module CalamityCommands.Internal.LocalWriter (
LocalWriter (..),
ltell,
llisten,
runLocalWriter,
) where
import Polysemy qualified as P
import Polysemy.State qualified as P
data LocalWriter o m a where
Ltell :: o -> LocalWriter o m ()
Llisten :: m a -> LocalWriter o m (o, a)
... |
0f0e6260e44dd3da16fcd9c1bf7c73593fa34f6b8b4200bdf05f6936620ba884 | clash-lang/clash-compiler | MAC.hs | module MAC where
import Clash.Prelude
import Clash.Explicit.Testbench
ma acc (x,y) = acc + x * y
macT acc (x,y) = (acc',o)
where
acc' = ma acc (x,y)
o = acc
mac
:: SystemClockResetEnable
=> Signal System (Signed 9, Signed 9)
-> Signal System (Signed 9)
mac = macT `mealy` 0
topEntity
:: Clock S... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/examples/MAC.hs | haskell | # NOINLINE topEntity # | module MAC where
import Clash.Prelude
import Clash.Explicit.Testbench
ma acc (x,y) = acc + x * y
macT acc (x,y) = (acc',o)
where
acc' = ma acc (x,y)
o = acc
mac
:: SystemClockResetEnable
=> Signal System (Signed 9, Signed 9)
-> Signal System (Signed 9)
mac = macT `mealy` 0
topEntity
:: Clock S... |
2461b1a6710b5e919438edda5d6e5a6254e633a656e1dca0d7fef054d0217bbd | fission-codes/fission | Types.hs | module Fission.Web.API.User.WhoAmI.Types (Routes (..)) where
import Fission.User.Username.Types
import Fission.Web.API.Prelude
import qualified Fission.Web.API.Auth.Types as Auth
newtype Routes mode = Routes
{ whoAmI ::
mode
:- Summary "Get username"
:> Description "Get user... | null | https://raw.githubusercontent.com/fission-codes/fission/7e69c0da210a77412c96631f5ff7ef1b38240d37/fission-web-api/library/Fission/Web/API/User/WhoAmI/Types.hs | haskell | module Fission.Web.API.User.WhoAmI.Types (Routes (..)) where
import Fission.User.Username.Types
import Fission.Web.API.Prelude
import qualified Fission.Web.API.Auth.Types as Auth
newtype Routes mode = Routes
{ whoAmI ::
mode
:- Summary "Get username"
:> Description "Get user... | |
c683c7de9e4253a7cedf11d98b17e3568716283850042eae13545557d05fa3ab | d-cent/mooncake | customise_feed.cljs | (ns mooncake.js.customise-feed
(:require [dommy.core :as d])
(:require-macros [dommy.core :as dm]))
(def checkbox-none-class :checkbox--none)
(def checkbox-some-class :checkbox--some)
(def checkbox-all-class :checkbox--all)
(def source-container-selector :.clj--feed-item)
(def src-checkbox-selector :.clj--src-ch... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src-cljs/mooncake/js/customise_feed.cljs | clojure | (ns mooncake.js.customise-feed
(:require [dommy.core :as d])
(:require-macros [dommy.core :as dm]))
(def checkbox-none-class :checkbox--none)
(def checkbox-some-class :checkbox--some)
(def checkbox-all-class :checkbox--all)
(def source-container-selector :.clj--feed-item)
(def src-checkbox-selector :.clj--src-ch... | |
75b9824112eef5e4bc9a8b0cc0bd00959a9feb31452c87ba8805f0feb30d65a6 | hammerlab/biokepi | main.ml |
open Biokepi_run_environment.Common
let say fmt = ksprintf (printf "%s\n%!") fmt
let get_env s =
try Sys.getenv s with _ -> failwithf "Missing environment variable: %s" s
let get_opt s =
try Some (Sys.getenv s) with _ -> None
let simple_somatic_example ~variant_caller ~normal_fastqs ~tumor_fastqs ~dataset =
... | null | https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/app/main.ml | ocaml | Using a bit of the “internal” representation of
workflow-nodes here:
|
open Biokepi_run_environment.Common
let say fmt = ksprintf (printf "%s\n%!") fmt
let get_env s =
try Sys.getenv s with _ -> failwithf "Missing environment variable: %s" s
let get_opt s =
try Some (Sys.getenv s) with _ -> None
let simple_somatic_example ~variant_caller ~normal_fastqs ~tumor_fastqs ~dataset =
... |
cc57d86fd308b8d12f0f8ac913f63117deb9ca72d83898a02b29cdebaf2b44f6 | well-typed/cborg | Main.hs | module Main
( main -- :: IO ()
) where
import Criterion.Main (bgroup, defaultMain)
-- Import our benchmark suites
import qualified Mini as Mini
import qualified Macro as Macro
import Utils (prepBenchmarkFiles)
-- A simple driver, for running every set of benchmarks.
main ::... | null | https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/bench/versus/Main.hs | haskell | :: IO ()
Import our benchmark suites
A simple driver, for running every set of benchmarks. | module Main
) where
import Criterion.Main (bgroup, defaultMain)
import qualified Mini as Mini
import qualified Macro as Macro
import Utils (prepBenchmarkFiles)
main :: IO ()
main = prepBenchmarkFiles >> defaultMain
[ bgroup "mini" Mini.benchmarks
, bgroup "macro" M... |
30159b14d49d59db60fe9193c134e62a08b15a49ce0d79fd47fd73e954544461 | bsaleil/lc | primes.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultbak/m5inter/primes.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst) `(vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make-vector ,... |
3ae89687cfe2f1665d9ab965d0d529b8df05233195d20f5388e4d9a3afca57ff | racket/draw | unsafe-draw.rkt | #lang racket/base
(require ffi/unsafe
racket/draw/unsafe/cairo-lib
racket/draw/unsafe/brush)
(provide surface-brush)
(define cairo_image_surface_create
(get-ffi-obj 'cairo_image_surface_create cairo-lib (_fun _int _int _int -> _pointer)))
(define cairo_surface_destroy
(get-ffi-obj 'cairo_surface... | null | https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-test/tests/racket/draw/unsafe-draw.rkt | racket | #lang racket/base
(require ffi/unsafe
racket/draw/unsafe/cairo-lib
racket/draw/unsafe/brush)
(provide surface-brush)
(define cairo_image_surface_create
(get-ffi-obj 'cairo_image_surface_create cairo-lib (_fun _int _int _int -> _pointer)))
(define cairo_surface_destroy
(get-ffi-obj 'cairo_surface... | |
dbd4030ad3f3e2f1c8897af68b1f30328b4cb4619995648d817d29bed18d1687 | dgtized/shimmers | vector.cljc | (ns shimmers.math.vector
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(def v2 gv/vec2)
(def v3 gv/vec3)
(def ^:const up (v3 0 1 0))
(def ^:const down (v3 0 -1 0))
(def ^:const left (v3 -1 0 0))
(def ^:const right (v3 1 0 0))
(def ... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/math/vector.cljc | clojure | TODO: use -predicates | (ns shimmers.math.vector
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(def v2 gv/vec2)
(def v3 gv/vec3)
(def ^:const up (v3 0 1 0))
(def ^:const down (v3 0 -1 0))
(def ^:const left (v3 -1 0 0))
(def ^:const right (v3 1 0 0))
(def ... |
7592bb9b4f0b2d2e1d98fb38e847f07057c7a0b7089e5c71dc17c4b4784a3ff6 | audreyt/openafp | IOB.hs |
module OpenAFP.Records.AFP.IOB where
import OpenAFP.Types
import OpenAFP.Internals
data IOB = IOB {
iob_Type :: !N3
,iob_ :: !N3
,iob :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/IOB.hs | haskell |
module OpenAFP.Records.AFP.IOB where
import OpenAFP.Types
import OpenAFP.Internals
data IOB = IOB {
iob_Type :: !N3
,iob_ :: !N3
,iob :: !NStr
} deriving (Show, Typeable)
| |
ee49e1a2f5d5405cfd066e9802c329a0da561b69359500ad80c94dc49e5a8b34 | paulbutcher/lein-lambda | project.clj | (defproject lambda-api/lein-template "0.2.0"
:description "A Leiningen template for a webservice hosted on AWS Lambda"
:url "-lambda"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/paulbutcher/lein-lambda/20398b6dadeb9679d7eb258d4c47b60cd8485ff7/template/project.clj | clojure | (defproject lambda-api/lein-template "0.2.0"
:description "A Leiningen template for a webservice hosted on AWS Lambda"
:url "-lambda"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:eval-in-leiningen true)
| |
98e2456e3ff1183a8a40029a0f317faef0421a39795e0473b3cc6a91077209d4 | bobbae/gosling-emacs | mh-mode.ml | ; modified justify-mail paragraph command Oct 18,1982-dg
; This file implements a "mail draft mode" for composition of messages in
; the MH mail handler (q.v.). When MH calls Emacs, its customary call
; is
; emacs ./reply ./message -lmh-mode -email-draft-mode
; for the case of a reply, and
; emacs ./draft -lmh-mod... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/stanford/mh-mode.ml | ocaml | ; modified justify-mail paragraph command Oct 18,1982-dg
; This file implements a "mail draft mode" for composition of messages in
; the MH mail handler (q.v.). When MH calls Emacs, its customary call
; is
; emacs ./reply ./message -lmh-mode -email-draft-mode
; for the case of a reply, and
; emacs ./draft -lmh-mod... | |
3fd04f016e4357815b1683d4aa568b1994bef3f7d709289d1828c52e4fd725f9 | jaspervdj/lorem-markdownum | Code.hs | --------------------------------------------------------------------------------
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module LoremMarkdownum.Gen.Code
( CodeConfig (..)
, CodeGen
, runCodeGen
, Code
, genCode
, genStatement
, genIdentifier
... | null | https://raw.githubusercontent.com/jaspervdj/lorem-markdownum/fabe4e5f3094467c992b83c1f99ae01a1c3f3155/lib/LoremMarkdownum/Gen/Code.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-------------------------------------------... | # LANGUAGE GeneralizedNewtypeDeriving #
module LoremMarkdownum.Gen.Code
( CodeConfig (..)
, CodeGen
, runCodeGen
, Code
, genCode
, genStatement
, genIdentifier
, genBinOp
, printCode
, printStatement
) where
import Control.Monad (replicateM)
im... |
d5111ad0f87be7397ace7df743ddc4f4738e99893eaa65f2b921b0b6437dd236 | Zulu-Inuoe/clution | numbers.lisp | (in-package :alexandria)
(declaim (inline clamp))
(defun clamp (number min max)
"Clamps the NUMBER into [min, max] range. Returns MIN if NUMBER is lesser then
MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER."
(if (< number min)
min
(if (> number max)
max
number))... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/alexandria-20170830-git/numbers.lisp | lisp | 2.0
The correct version is numerically stable, at the expense of an
unstable version can often be converted to a fast instruction on
a lot of machines, though this is machine/implementation
efficiency, and we're only talking about a single extra multiply,
many would prefer the stable version
Factorial
small num... | (in-package :alexandria)
(declaim (inline clamp))
(defun clamp (number min max)
"Clamps the NUMBER into [min, max] range. Returns MIN if NUMBER is lesser then
MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER."
(if (< number min)
min
(if (> number max)
max
number))... |
40bd3fc389c9ac0a8cdaa83d6ffece05d46c8baebc3bc9f137b5bfa5700f474a | esl/erlang-web | wpart_datetime.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/wparts-1.4.1/src/wpart_datetime.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
8584402f65e014c7d099e6e1eee58f8716a1d84204b657acffe6100a29cf2955 | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
-- `cmm-sources` and friends need ≥3.0.
main = cabalTest $
fails $ cabal "check" []
| null | https://raw.githubusercontent.com/haskell/cabal/1cfe7c4c7257aa7ae450209d34b4a359e6703a10/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/Sources/cabal.test.hs | haskell | `cmm-sources` and friends need ≥3.0. | import Test.Cabal.Prelude
main = cabalTest $
fails $ cabal "check" []
|
332e4bad06f9d877c3a59d30d0bf37faf7f36558851cf5f9a9d024a759ccfcda | MaskRay/OJHaskell | 68.hs | import Data.List
permute [] = [[]]
permute l = concatMap (\(x:xs) -> map (x:) $ permute xs) $ take (length l) $ unfoldr (\l@(x:xs) -> Just (l, xs++[x])) l
main = putStrLn $ maximum $ map (concatMap show) solutions
where
solutions = [concat handles |
external <- map (6:) $ permute [6+1..10],
... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/68.hs | haskell | import Data.List
permute [] = [[]]
permute l = concatMap (\(x:xs) -> map (x:) $ permute xs) $ take (length l) $ unfoldr (\l@(x:xs) -> Just (l, xs++[x])) l
main = putStrLn $ maximum $ map (concatMap show) solutions
where
solutions = [concat handles |
external <- map (6:) $ permute [6+1..10],
... | |
e5b81c215454b2366036f3717c3d2d7fde26b7fe8d48f9806895cbb2256cd381 | m4dc4p/haskelldb | Generate.hs | -----------------------------------------------------------
-- |
Module : Database . HaskellDB.Sql . Generate
Copyright : ( c ) 1999 ,
HWT Group ( c ) 2003 ,
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- The... | null | https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/src/Database/HaskellDB/Sql/Generate.hs | haskell | ---------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : non-portable
The type of SQL generators.
---------------------------------------------------------
| Ensures non-aggregate expressions in the select are included in
group by claus... | Module : Database . HaskellDB.Sql . Generate
Copyright : ( c ) 1999 ,
HWT Group ( c ) 2003 ,
Maintainer :
module Database.HaskellDB.Sql.Generate (SqlGenerator(..)) where
import Database.HaskellDB.PrimQuery
import Database.HaskellDB.FieldType
import Database.HaskellDB.Sql
... |
1a71e242d7cd67b24a38122f8706389fbf1f73124ad63e09bd3a0212603eb860 | moon-chilled/loop | test.scm | (load "../loop.scm")
(define-macro (deftest name form . results)
(let ((x (gensym)))
`(let ((,x (list-values ,form)))
(if (equal? ,x ',results)
(format #t "pass ~a~%" ',name)
(error "Test ~a failed; returned ~a but was supposed to return ~a" ',name ,x ',results)))))
(define-macro* (incf... | null | https://raw.githubusercontent.com/moon-chilled/loop/a51ee32112321b227344e0f5a28148f2a208c3e6/test/test.scm | scheme | commented in sicl:
(defun loop-with-repeat-do-collect-finally ()
(assert (equal (let ((result nil))
collect n into foo
result)
(defun loop-repeat-sum-finally ()
(assert (equal (let ((result nil))
result)
10))) | (load "../loop.scm")
(define-macro (deftest name form . results)
(let ((x (gensym)))
`(let ((,x (list-values ,form)))
(if (equal? ,x ',results)
(format #t "pass ~a~%" ',name)
(error "Test ~a failed; returned ~a but was supposed to return ~a" ',name ,x ',results)))))
(define-macro* (incf... |
aea29d91ddbb68927b0f66c5ee903974733929c28d1e97a04f94b46442dbabf1 | conreality/conreality | model.ml | (* This is free and unencumbered software released into the public domain. *)
open Prelude
module Object_color = struct
#include "model/object_color.ml"
end
module Object_shape = struct
#include "model/object_shape.ml"
end
module Intent_designation = struct
#include "model/intent_designation.ml"
end
module T... | null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/model.ml | ocaml | This is free and unencumbered software released into the public domain. |
open Prelude
module Object_color = struct
#include "model/object_color.ml"
end
module Object_shape = struct
#include "model/object_shape.ml"
end
module Intent_designation = struct
#include "model/intent_designation.ml"
end
module Threat_level = struct
#include "model/threat_level.ml"
end
module Object = s... |
685f6ec673b44e0823b931d343aed3c615cc0394bd69f0e88b5fdb7df8f13984 | danielsz/system | h2.clj | (ns system.components.h2
(:require [system.components.jdbc :as jdbc]
[com.stuartsierra.component :as component]))
returns a JDBC component with a H2 spec
(def DEFAULT-DB-SPEC
{:classname "org.h2.Driver" ; must be in classpath
:subprotocol "h2"
:subname "~/test"
:user "sa"
:password... | null | https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/src/system/components/h2.clj | clojure | must be in classpath
must be in classpath | (ns system.components.h2
(:require [system.components.jdbc :as jdbc]
[com.stuartsierra.component :as component]))
returns a JDBC component with a H2 spec
(def DEFAULT-DB-SPEC
:subprotocol "h2"
:subname "~/test"
:user "sa"
:password ""
:host "127.0.0.1"
:AUTO_SERVER "TRUE"
:DB... |
e834c1af0e891dfea3605d4227b5b0fcfc3f3501d9031c62922ac1c01cc46233 | ananthakumaran/eopl | 15.clj | ;; Implement the lambda-calculus expression interface for the
;; representation specified by the grammer above
(ns eopl.chap-2.15
(:use clojure.test))
(defn var-exp [var]
var)
(defn var-exp? [exp]
(symbol? exp))
(defn var-exp->var [exp]
exp)
(defn lambda-exp [var lc-exp]
`(~'lambda (~var) ~lc-exp))
(def... | null | https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_2/15.clj | clojure | Implement the lambda-calculus expression interface for the
representation specified by the grammer above |
(ns eopl.chap-2.15
(:use clojure.test))
(defn var-exp [var]
var)
(defn var-exp? [exp]
(symbol? exp))
(defn var-exp->var [exp]
exp)
(defn lambda-exp [var lc-exp]
`(~'lambda (~var) ~lc-exp))
(defn lambda-exp? [exp]
(and (seq? exp)
(= 'lambda (first exp))))
(defn lambda-exp->bound-var [exp]
(fi... |
469ae343745e39bdeb56a864a09c4c02f602642a1cba0a1a0c118b31e98de847 | ejackson/mlapp | naive_text.clj | (ns mlapp.naive-text
"The text classification using Naive Bayes and beta-binomial model"
(:use [plumbing.core]
[incanter.charts :only [bar-chart]]
[incanter.core :only [pow view]]
[clojure.set])
(:require [fs.core :as fs]
[stemmers.core :as stem]
[clojure.... | null | https://raw.githubusercontent.com/ejackson/mlapp/b3613bedd65921dcc4dff561fca79d97c205db9a/src/mlapp/naive_text.clj | clojure | -----------------------------------------------------------------------------
Read the files
The random variable of interest is x_ij -> whether stem j appears in doc i or not.
So want to track, for each document the set of stems, and then, for each stem in the union
count how many documents it appears within.
A f... | (ns mlapp.naive-text
"The text classification using Naive Bayes and beta-binomial model"
(:use [plumbing.core]
[incanter.charts :only [bar-chart]]
[incanter.core :only [pow view]]
[clojure.set])
(:require [fs.core :as fs]
[stemmers.core :as stem]
[clojure.... |
d268b139048d0acb3116c289b15bebeaae24ce274be59fbc47167a67a89df5a0 | riak-haskell-client/riak-haskell-client | Riak.hs | -- |
-- Module: Network.Riak
Copyright : ( c ) 2011 MailRank , Inc.
License : Apache
Maintainer : < > , < >
-- Stability: experimental
-- Portability: portable
--
A client for the Riak decentralized data store .
--
-- The functions in this module use JSON as the storage
-- representation,... | null | https://raw.githubusercontent.com/riak-haskell-client/riak-haskell-client/a1eafc4c16b85a98b2d29e306165f4d93819609f/riak/src/Network/Riak.hs | haskell | |
Module: Network.Riak
Stability: experimental
Portability: portable
The functions in this module use JSON as the storage
representation, and automatically perform conflict resolution
during storage and retrieval.
This library is organized to allow a tradeoff between power
and ease of use. If you wo... | Copyright : ( c ) 2011 MailRank , Inc.
License : Apache
Maintainer : < > , < >
A client for the Riak decentralized data store .
[ Network . Riak . CRDT ] CRDT operations .
A short getting started guide is available at < -of-riak/haskell/ >
module Network.Riak
(
ClientID
, Clien... |
c84828de2ae5c4ba75f565c53be91b9864b83561c76f1dc6b18006b2d8859ae7 | fukamachi/cl-line-bot-sdk | package.lisp | (uiop:define-package #:linebot
(:nicknames #:cl-line-bot-sdk)
(:use-reexport #:linebot/api
#:linebot/webhook
#:linebot/handler
#:linebot/config
#:linebot/errors
#:linebot/models))
| null | https://raw.githubusercontent.com/fukamachi/cl-line-bot-sdk/2f8660035eb7babe5bfe637f6de4be2500e1268f/linebot/package.lisp | lisp | (uiop:define-package #:linebot
(:nicknames #:cl-line-bot-sdk)
(:use-reexport #:linebot/api
#:linebot/webhook
#:linebot/handler
#:linebot/config
#:linebot/errors
#:linebot/models))
| |
a3b2be445bb7ccc110a84be89091676902096e8fa0925d3f7a003a63c894796e | akabe/ocaml-jupyter | test_process.ml | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
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 limitat... | null | https://raw.githubusercontent.com/akabe/ocaml-jupyter/26d50e6db9fc554e9c5d394b5a857b119252588d/tests/notebook/test_process.ml | ocaml | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
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 limitat... | |
39546eb918b7c6b7fcf6e2fdf5deb86bb20ca5b5d9150d87b78eb6909b66b370 | hemmi/coq2scala | mod_subst.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/kernel/mod_subst.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file provides types and functi... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by from contents ... |
226c8205996c5d296b257fe09f31df0b8a70a783a741a622f63d4a7309d6904b | erlangonrails/devdb | pg_local.erl | This file is a copy of pg2.erl from the R13B-3 Erlang / OTP
%% distribution, with the following modifications:
%%
1 ) Process groups are node - local only .
%%
2 ) Groups are created / deleted implicitly .
%%
3 ) ' join ' and ' leave ' are asynchronous .
%%
4 ) the type specs of the exported non - callback fu... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/rabbitmq-server-1.8.0/src/pg_local.erl | erlang | distribution, with the following modifications:
extracted into a separate, guarded section, and rewritten in
old-style spec syntax, for better compatibility with older
removed.
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with t... | This file is a copy of pg2.erl from the R13B-3 Erlang / OTP
1 ) Process groups are node - local only .
2 ) Groups are created / deleted implicitly .
3 ) ' join ' and ' leave ' are asynchronous .
4 ) the type specs of the exported non - callback functions have been
versions of Erlang / OTP . The remaining... |
79d47aa8f2af772e1dda44dee925c987045a63b10eff1ae6e96d00c59096ab76 | dannywillems/jsoo-lib | test_number.ml | let () =
assert (
Unsigned.UInt32.equal
(Unsigned.UInt32.of_int 42)
Jsoo_lib.Number.(to_uint32 (of_int 42)) ) ;
assert (
Unsigned.UInt64.equal
(Unsigned.UInt64.of_int 42)
Jsoo_lib.Number.(to_uint64 (of_int 42)) ) ;
assert (42 = Jsoo_lib.Number.(to_int (of_int 42))) ;
assert (Jsoo... | null | https://raw.githubusercontent.com/dannywillems/jsoo-lib/d9ac3e1a86469eb78cce56dc0c083048c7e75ccf/test/test_number.ml | ocaml | let () =
assert (
Unsigned.UInt32.equal
(Unsigned.UInt32.of_int 42)
Jsoo_lib.Number.(to_uint32 (of_int 42)) ) ;
assert (
Unsigned.UInt64.equal
(Unsigned.UInt64.of_int 42)
Jsoo_lib.Number.(to_uint64 (of_int 42)) ) ;
assert (42 = Jsoo_lib.Number.(to_int (of_int 42))) ;
assert (Jsoo... | |
2412584a8ddf9411c6b33eecd447a7411b7d9b48f93cd8d1bd59ff216b21b742 | bobzhang/fan | use.ml | (* use.ml *)
#use "test/fixtures/rec.ml";
(* value use *)
value use = 3;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/use.ml | ocaml | use.ml
value use | #use "test/fixtures/rec.ml";
value use = 3;
|
0cd9e7172888814fe497347cd3211e843384a77711d173eb01480975f107c4e4 | tiensonqin/lymchat | invite.cljs | (ns lymchat.shared.scene.invite
(:require [reagent.core :as r]
[re-frame.core :refer [subscribe dispatch]]
[lymchat.styles :refer [styles pl-style]]
[lymchat.shared.ui :refer [text view image touchable-highlight touchable-opacity button icon icon-button material-icon-button colors... | null | https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/src/lymchat/shared/scene/invite.cljs | clojure | (ns lymchat.shared.scene.invite
(:require [reagent.core :as r]
[re-frame.core :refer [subscribe dispatch]]
[lymchat.styles :refer [styles pl-style]]
[lymchat.shared.ui :refer [text view image touchable-highlight touchable-opacity button icon icon-button material-icon-button colors... | |
c087a188772232badc85e9b8ee5a9e493d4a6bebc8007580124dba7e3a7acb62 | bobzhang/fan | ast_print.mli | include (module type of Pprintast)
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/common/ast_print.mli | ocaml | include (module type of Pprintast)
| |
a9c0b33c947fc35c5fa027903680a5847fb12824b2031fa6841c8dc0370c124d | AdRoll/erlmld | kpl_agg.erl | %%%-------------------------------------------------------------------
( C ) 2016 , AdRoll
%%% @doc
%%%
Kinesis record aggregator .
%%%
Follows the KPL aggregated record format :
%%% -kinesis-producer/blob/master/aggregation-format.md
%%%
This is an Erlang port of the aggregation functionality ... | null | https://raw.githubusercontent.com/AdRoll/erlmld/0ca902895fb058a42d4b8a7ab32ec91a74441e61/src/kpl_agg.erl | erlang | -------------------------------------------------------------------
@doc
-kinesis-producer/blob/master/aggregation-format.md
Creating a new aggregator:
Agg = kpl_agg:new()
Adding user records to an aggregator (the aggregator will emit an
aggregated record when it is full):
... | ( C ) 2016 , AdRoll
Kinesis record aggregator .
Follows the KPL aggregated record format :
This is an Erlang port of the aggregation functionality from :
You can also use kpl : add_all to add multiple records at once . A
{ undefined , ...
{ AggRecord , NewAgg }... |
53129884746adf472d6914bd151f7cb99673321491fd46ded2cf13128df121b6 | sneeuwballen/zipperposition | ast_tptp.ml |
This file is free software , part of Logtk . See file " license " for more details .
* { 1 TPTP Ast }
open Logtk
module PT = STerm
module Loc = ParseLocation
type name =
| NameInt of int
| NameString of string
(** name of a formula *)
and role =
| R_axiom (* true *)
| R_hypothesis (* true *)
|... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/parsers/ast_tptp.ml | ocaml | * name of a formula
true
true
symbol definition
true, but must be proved before
must be proved before use
must be proved before use
to be proven
negation of conjecture, must prove 'false'
no specific semantics (proof...)
finite interpretation, don't care
existential question
type declaration
e... |
This file is free software , part of Logtk . See file " license " for more details .
* { 1 TPTP Ast }
open Logtk
module PT = STerm
module Loc = ParseLocation
type name =
| NameInt of int
| NameString of string
and role =
and optional_info = general_data list
and general_data =
| GString of string
| GInt ... |
704cb0de456cf8ceda2d5822d0708e8d7d5ab5d5281089a76265348b20972e03 | mongodb-haskell/mongodb | GridFS.hs | -- Author:
< >
-- | MongoDB GridFS implementation
# LANGUAGE OverloadedStrings , FlexibleContexts , FlexibleInstances , UndecidableInstances , MultiParamTypeClasses , TypeFamilies , CPP , RankNTypes #
module Database.MongoDB.GridFS
( Bucket
, files, chunks
, File
, document, bucket
-- ** Setup
, openD... | null | https://raw.githubusercontent.com/mongodb-haskell/mongodb/497025bd3c7d02efdf903b21486f8929ee14eb11/Database/MongoDB/GridFS.hs | haskell | Author:
| MongoDB GridFS implementation
** Setup
** Query
** Delete
** Conduits
magic constant for md5Finalize
^ Files are stored in "buckets". You open a bucket with openDefaultBucket or openBucket
^ Open the default 'Bucket' (named "fs")
^ Open a 'Bucket'
^ Get a chunk of a file
^ Find files in the bucket... | < >
# LANGUAGE OverloadedStrings , FlexibleContexts , FlexibleInstances , UndecidableInstances , MultiParamTypeClasses , TypeFamilies , CPP , RankNTypes #
module Database.MongoDB.GridFS
( Bucket
, files, chunks
, File
, document, bucket
, openDefaultBucket
, openBucket
, findFile
, findOneFile
,... |
66b6a425da0c0d11fbc08cfcc0f00694f37cac4e7560fe415539a250ff1343c4 | lexi-lambda/syntax-classes | info.rkt | #lang info
(define version "1.3")
(define collection 'multi)
(define deps
'(["base" #:version "7.8.0.9"]))
(define build-deps
'())
| null | https://raw.githubusercontent.com/lexi-lambda/syntax-classes/4d64d35259d69ee8d5c90f475fe777c66d54c8fd/syntax-classes-lib/info.rkt | racket | #lang info
(define version "1.3")
(define collection 'multi)
(define deps
'(["base" #:version "7.8.0.9"]))
(define build-deps
'())
| |
a573ae406ccdfe5ab57a9cfe9e9423bf014b85d2b770d3f69f803a7d71c37a7f | roman/Haskell-Reactive-Extensions | FirstTest.hs | module Rx.Observable.FirstTest where
import Control.Exception (ErrorCall(..), fromException)
import qualified Rx.Observable as Rx
import Test.HUnit
import Test.Hspec
tests :: Spec
tests = do
describe "Rx.Observable.once" $ do
it "succeeds when source emits an element once" $ do
let source = Rx.once $ ret... | null | https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-core/test/Rx/Observable/FirstTest.hs | haskell | module Rx.Observable.FirstTest where
import Control.Exception (ErrorCall(..), fromException)
import qualified Rx.Observable as Rx
import Test.HUnit
import Test.Hspec
tests :: Spec
tests = do
describe "Rx.Observable.once" $ do
it "succeeds when source emits an element once" $ do
let source = Rx.once $ ret... | |
d55f6eb0752461608c22e5e79f7a753a08d694705649a5352dde65530da6058b | orx/ocaml-orx | clock.ml | open Common
open Direct_bindings
include Orx_gen.Clock
let () =
if
Clock_info.assumed_clock_modifier_number
<> Unsigned.Size_t.to_int Clock_info.clock_modifier_number
then
Fmt.failwith
"orxCLOCK_MODIFIER_NUMBER is %d but the OCaml bindings expect it to be \
%d - fix and recompile the bind... | null | https://raw.githubusercontent.com/orx/ocaml-orx/ce3be01870b04a1498dbb24bbe4ad0f13d36615c/src/lib/clock.ml | ocaml | open Common
open Direct_bindings
include Orx_gen.Clock
let () =
if
Clock_info.assumed_clock_modifier_number
<> Unsigned.Size_t.to_int Clock_info.clock_modifier_number
then
Fmt.failwith
"orxCLOCK_MODIFIER_NUMBER is %d but the OCaml bindings expect it to be \
%d - fix and recompile the bind... | |
c597bbeb4d59d75d8cbb0343ab15e2d98b07c685776b9a2a184bbdeb6df50c67 | isovector/circuitry | Word.hs | module Circuitry.Word (Word2 (..), Word3(..), Word4 (..)) where
import Data.Bits
import Data.Typeable
import Data.Ratio
import Test.QuickCheck (Arbitrary, arbitrary, shrink)
import Test.QuickCheck.Function
import Data.List (nub)
import GHC.Generics (Generic)
newtype Word2 = Word2 { unWord2 :: Int } deriving stock (Eq... | null | https://raw.githubusercontent.com/isovector/circuitry/55b9697a8e34b4ae2effe7b4cbb8fbf4c1419c85/src/Circuitry/Word.hs | haskell | module Circuitry.Word (Word2 (..), Word3(..), Word4 (..)) where
import Data.Bits
import Data.Typeable
import Data.Ratio
import Test.QuickCheck (Arbitrary, arbitrary, shrink)
import Test.QuickCheck.Function
import Data.List (nub)
import GHC.Generics (Generic)
newtype Word2 = Word2 { unWord2 :: Int } deriving stock (Eq... | |
e903e2b7d61a29a8a60ff868a677e4664f46a12673059d57a7739425401c7e08 | victorvianna/mini-gcc | typing.mli |
exception Error of string
val program: Ptree.file -> Ttree.file
| null | https://raw.githubusercontent.com/victorvianna/mini-gcc/04659816d0a1097ae12b57243572fff9e91c0b13/typing.mli | ocaml |
exception Error of string
val program: Ptree.file -> Ttree.file
| |
8e245f1642f74b2462fe362b3f57c4ae641965949a9b8294bcd599f292ef3d65 | IvanMartinez/oauth2_webmachine | oauth2_wrq.erl | 2013 author .
%% @doc Functions to read webmachine OAuth2 requests and generate responses.
Distributed under the terms and conditions of the Apache 2.0 license .
-module(oauth2_wrq).
-include_lib("webmachine/include/wm_reqdata.hrl").
-define(AUTHENTICATE_REALM, "oauth2_webmachine").
%% ========================... | null | https://raw.githubusercontent.com/IvanMartinez/oauth2_webmachine/d4b358167bdb2129989a4bec71753ab75044ad69/src/oauth2_wrq.erl | erlang | @doc Functions to read webmachine OAuth2 requests and generate responses.
====================================================================
API functions
====================================================================
====================================================================
===================... | 2013 author .
Distributed under the terms and conditions of the Apache 2.0 license .
-module(oauth2_wrq).
-include_lib("webmachine/include/wm_reqdata.hrl").
-define(AUTHENTICATE_REALM, "oauth2_webmachine").
-export([parse_body/1, get_client_credentials/2, get_client_id/1, get_code/1,
get_grant_type/1... |
48c44fb6dafb82aabca2916bfa1b739850df7821fe470643609d37944f41a934 | tekul/jose-jwt | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK prune #-}
-- | Parses encoded JWTs into data structures which can be handled
module Jose.Internal.Parser
( parseJwt
, DecodableJwt (..)
, EncryptedCEK (..)
, Payload (..)
, IV (..)
, Tag (..)
, AAD (..)
, Sig (..)
, SigTarget (... | null | https://raw.githubusercontent.com/tekul/jose-jwt/1ac2335d4feda47da21075f39b8c8805a51583f0/Jose/Internal/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_HADDOCK prune #
| Parses encoded JWTs into data structures which can be handled |
module Jose.Internal.Parser
( parseJwt
, DecodableJwt (..)
, EncryptedCEK (..)
, Payload (..)
, IV (..)
, Tag (..)
, AAD (..)
, Sig (..)
, SigTarget (..)
)
where
import Data.Bifunctor (first)
import Data.Aeson (eitherDecodeStrict')
import Data.Attoparsec.By... |
508e2be7b826fb7699bbff21c9afcf1cc1ff4ae8d7da8dc189754b0d8435510b | backtracking/mlpost | othergraphs.ml | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/garbage/othergraphs.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
open Mlpost
open Num
open Box
open Command
open Point
open Path
module Co = Color
module P = Pen
module... |
31ce2d652722fa4b37d2c69308a58aa7a724a9255420f0b18bea19588c95e022 | sethtrain/clj-twilio | core.clj | (ns twilio.core
(:use [clojure.contrib.prxml :only [prxml]]))
(defmacro twiml-response [& verbs]
`(with-out-str
(prxml
[:decl! {:version "1.1"}]
[:Response ~@verbs])))
| null | https://raw.githubusercontent.com/sethtrain/clj-twilio/924b2aab51f543611dc37022f7c0e82b677ee521/src/twilio/core.clj | clojure | (ns twilio.core
(:use [clojure.contrib.prxml :only [prxml]]))
(defmacro twiml-response [& verbs]
`(with-out-str
(prxml
[:decl! {:version "1.1"}]
[:Response ~@verbs])))
| |
ffa71c40a4396b73ddc39b6a0b37b9188c82ae300de83ea60af77acca35ebee6 | HiiGHoVuTi/Mirtelo | Main.hs | {-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-}
module Main where
import WS (run_server)
import DB (run)
import Database.MongoDB
import qualified Data.Text as T
main = do
pipe <- connect (host "127.0.0.1")
putStrLn "Server is now up !"
run pipe $ do
-- delete $ select [] "message"
-- insert... | null | https://raw.githubusercontent.com/HiiGHoVuTi/Mirtelo/639772f690e7ed9e01c0592bdbf04416e55b218b/server/app/Main.hs | haskell | # LANGUAGE OverloadedStrings, ExtendedDefaultRules #
delete $ select [] "message"
insert "message" ["author" =: "Maxime", "contents" =: "Welcome !", "thread" =: "\"general>main\""] |
module Main where
import WS (run_server)
import DB (run)
import Database.MongoDB
import qualified Data.Text as T
main = do
pipe <- connect (host "127.0.0.1")
putStrLn "Server is now up !"
run pipe $ do
return()
run_server pipe
close pipe
|
9f75be114aa1cf5910ca038ed85f01368efc32a39aa5c5b42a462ee8bb68375d | jserot/fsml | valuation.ml | (**********************************************************************)
(* *)
This file is part of the FSML library
(* github.com/jserot/fsml *)
(* ... | null | https://raw.githubusercontent.com/jserot/fsml/9e3e04acbbb1cb1700fa9d4a0497f35ad4f70796/src/lib/valuation.ml | ocaml | ********************************************************************
github.com/jserot/fsml
... | This file is part of the FSML library
Copyright ( c ) 2020 - present , . All rights reserved .
type name = string
[@@deriving show {with_path=false}, yojson]
type value = Expr.t
[@@deriving show {with_path=false}, yojson]
[@@deriving show {with_path=false}, yojson]
let... |
91a12051f8f146cbafb88e16c432260d841bdefd5b82e86ca6b2f31253203385 | minio/minio-hs | MakeBucket.hs | #!/usr/bin/env stack
-- stack --resolver lts-14.11 runghc --package minio-hs
--
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
... | null | https://raw.githubusercontent.com/minio/minio-hs/c52f2811fe8eb2a657f1467d0798067a15deb395/examples/MakeBucket.hs | haskell | stack --resolver lts-14.11 runghc --package minio-hs
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
S... | #!/usr/bin/env stack
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
import Network.Minio
import Prelude
| The following example uses 's play server at
. The end... |
96cb2297121bb4e35a715d80576cf56710d9b0a7348059c4f10979190db9bf63 | mejgun/haskell-tdlib | PremiumFeature.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.PremiumFeature where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- | Describes a feature available to Premium users
data PremiumFeature
= -- | Increased limits
PremiumFeatureIncreasedLimits
| -- | ... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/b088f5062023fa201a68ebda128ab2fc489329ab/src/TD/Data/PremiumFeature.hs | haskell | # LANGUAGE OverloadedStrings #
|
| Describes a feature available to Premium users
| Increased limits
| Increased maximum upload file size
| Improved download speed
| The ability to convert voice notes to text
| Disabled ads
| Allowed to use more reactions
| Allowed to use premium stickers with unique effects
... |
module TD.Data.PremiumFeature where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data PremiumFeature
PremiumFeatureIncreasedLimits
PremiumFeatureIncreasedUploadFileSize
PremiumFeatureImprovedDownloadSpeed
PremiumFeatureVoiceRecognition
Premiu... |
099478b0cedbd85a74bb6dbfe413ea608eb0646e92c58ff88cc39732ba8079f9 | janestreet/memtrace_viewer_with_deps | ojs_exn.ml | The gen_js_api is released under the terms of an MIT - like license .
(* See the attached LICENSE file. *)
Copyright 2015 by LexiFi .
type t = Ojs.t
let name x = Ojs.string_of_js (Ojs.get x "name")
let message x = Ojs.strin... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/gen_js_api/lib/ojs_exn.ml | ocaml | See the attached LICENSE file. | The gen_js_api is released under the terms of an MIT - like license .
Copyright 2015 by LexiFi .
type t = Ojs.t
let name x = Ojs.string_of_js (Ojs.get x "name")
let message x = Ojs.string_of_js (Ojs.get x "message")
let stack x = Ojs.option_of_js Ojs.string_of_js... |
6f340e61a7bf35dd36a5f2fca7156a684c447176de9bfcbc48dbcd437a1cd3ac | positiondev/fn | Heist.hs | {-# LANGUAGE OverloadedStrings #-}
|
This module contains helpers to make Heist fit in more closely within
` Fn ` 's stance against monad transformers and for regular functions .
In particular , it instantiates the Monad for HeistState to be a
StateT that contains our context , so that in the splices we can ... | null | https://raw.githubusercontent.com/positiondev/fn/2dd3fbc0e55aabbf8838905c9ef47278f6632906/fn-extra/src/Web/Fn/Extra/Heist.hs | haskell | # LANGUAGE OverloadedStrings #
* Types
* Initializer
* Rendering templates
* Building splices
| The type of our state. We need a StateT to be able to pass the
runtime context (which includes the current request) into the
splices.
| The type of our splice (interpreted version). We need a StateT to
be able to pa... |
|
This module contains helpers to make Heist fit in more closely within
` Fn ` 's stance against monad transformers and for regular functions .
In particular , it instantiates the Monad for HeistState to be a
StateT that contains our context , so that in the splices we can get
the context out ( and modify ... |
7a1843a02e1416027ed055da6cac0f7563d31dba3d48a42cb2abb3aff9361632 | nvim-treesitter/nvim-treesitter | indents.scm | [
(class_body)
(enum_body)
(interface_body)
(constructor_declaration)
(constructor_body)
(block)
(switch_block)
(array_initializer)
(argument_list)
(formal_parameters)
] @indent
(expression_statement (method_invocation) @indent)
[
"("
")"
"{"
"}"
"["
"]"
] @branch
"}" @indent_end
(li... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/f8595b13bff62d5c64d54840e16678b9ad843620/queries/java/indents.scm | scheme | [
(class_body)
(enum_body)
(interface_body)
(constructor_declaration)
(constructor_body)
(block)
(switch_block)
(array_initializer)
(argument_list)
(formal_parameters)
] @indent
(expression_statement (method_invocation) @indent)
[
"("
")"
"{"
"}"
"["
"]"
] @branch
"}" @indent_end
(li... | |
3f8a0c4f7ea5250de0bf9b2e30052501f386b61862aae2f6483a5fdad52c752b | eeng/shevek | auth.clj | (ns shevek.querying.auth
(:require [shevek.lib.collections :refer [find-by]]
[shevek.schema.auth :refer [filter-measures]]))
(defn filter-query [{:keys [allowed-cubes] :as user} {:keys [cube measures] :as q}]
(let [{:keys [filters]} (find-by :name cube allowed-cubes)]
(cond-> (update q :filters con... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/querying/auth.clj | clojure | (ns shevek.querying.auth
(:require [shevek.lib.collections :refer [find-by]]
[shevek.schema.auth :refer [filter-measures]]))
(defn filter-query [{:keys [allowed-cubes] :as user} {:keys [cube measures] :as q}]
(let [{:keys [filters]} (find-by :name cube allowed-cubes)]
(cond-> (update q :filters con... | |
8a4c2a0c7705ee9d329882a599b38a6b7902840985452341032f9847b7f0412c | huangjs/cl | enorm.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/minpack/lisp/enorm.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls nil)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
40e8e31a63d3e00edbc074af83187cc0260784c0d75e27c9415f960ec165142f | eponai/sulolive | reconciler.cljc | (ns eponai.client.reconciler
(:require [om.next :as om]
[eponai.client.parser.merge :as merge]
[eponai.client.remotes :as remotes]
[eponai.client.utils :as utils]
[eponai.client.local-storage :as local-storage]
[eponai.common.ui.router :as router]))
(defn ... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/client/reconciler.cljc | clojure | TODO: Use this from run.cljs and from fullstack tests.
Optional
With defaults: | (ns eponai.client.reconciler
(:require [om.next :as om]
[eponai.client.parser.merge :as merge]
[eponai.client.remotes :as remotes]
[eponai.client.utils :as utils]
[eponai.client.local-storage :as local-storage]
[eponai.common.ui.router :as router]))
(defn ... |
6cc77fc8e916e1946bc3222659563ea52f249e924f1d9804845defa8afe86ce6 | bgamari/bayes-stack | RunLDA.hs | # LANGUAGE BangPatterns , GeneralizedNewtypeDeriving , StandaloneDeriving #
import Prelude hiding (mapM)
import Options.Applicative
import Data.Monoid ((<>))
import Control.Monad.Trans.Class
import Data.Vector (Vector)
import qualified Data.Vector.Generic as V
import... | null | https://raw.githubusercontent.com/bgamari/bayes-stack/020df7bb7263104fdea254e57d6c7daf7806da3e/network-topic-models/RunLDA.hs | haskell | # LANGUAGE BangPatterns , GeneralizedNewtypeDeriving , StandaloneDeriving #
import Prelude hiding (mapM)
import Options.Applicative
import Data.Monoid ((<>))
import Control.Monad.Trans.Class
import Data.Vector (Vector)
import qualified Data.Vector.Generic as V
import... | |
094012329338f15eb0504f8eabcf9f636d29d270de45be00d3ec6e3238b5777f | dparis/gen-phzr | rectangle.cljs | (ns phzr.rectangle
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [clone]))
(defn ->Rectangle
"Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the sp... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/rectangle.cljs | clojure | otherwise false."
otherwise false."
otherwise false."
otherwise false."
otherwise false."
otherwise false."
otherwise false."
otherwise false."
that is, a Rectangle with its x, y, width, and height properties set to 0."
that is, a Rectangle with its x, y, width, and height properties set to 0."
otherwise fal... | (ns phzr.rectangle
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [clone]))
(defn ->Rectangle
"Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the sp... |
9d4538b725396c8e15f73641cbb15c863a52e4039f34829f6047b0ad4925d1fe | Deep-Symmetry/open-beat-control | core.clj | (ns open-beat-control.core
"The main entry point for the open-beat-control daemon. Handles any
command-line arguments, then establishes and interacts with
connections to any Pioneer Pro DJ Link session that can be found,
providing remote control via an OSC server."
(:require [clojure.java.io :as io]
... | null | https://raw.githubusercontent.com/Deep-Symmetry/open-beat-control/ea772ac10adea82c901927e7efcc0dab6c8b1383/src/open_beat_control/core.clj | clojure | The file exists, so make sure it is writable and a plain file
Requested existing file looks fine, make sure we can roll over
The requested file does not exist, make sure we can create it
The parent directory exists, make sure we can write to it
The parent directory doesn't exist, make sure we can create it
Handle... | (ns open-beat-control.core
"The main entry point for the open-beat-control daemon. Handles any
command-line arguments, then establishes and interacts with
connections to any Pioneer Pro DJ Link session that can be found,
providing remote control via an OSC server."
(:require [clojure.java.io :as io]
... |
45dd870da7ab3ac64addeab4511df52f01e38296799bbb402d184f41ffae7966 | felko/pion | Common.hs | -- | Common syntactic representations between multiple passes.
module Language.Pion.Syntax.Common
( Side (..),
PortMap,
Branch (..),
Branches (..),
branchesToHashMap,
Conjunction (..),
conjunctionToBranches,
conjunctionToHashMap,
Literal (..),
)
where
import qualified Data.HashMap.S... | null | https://raw.githubusercontent.com/felko/pion/657fb28ebc37fccd76ad25312b299935bbb66d0f/src/Language/Pion/Syntax/Common.hs | haskell | | Common syntactic representations between multiple passes.
# OVERLAPPING #
| A conjunction of items.
Used for conjunctive connectives, to support both
ordered and record types. | module Language.Pion.Syntax.Common
( Side (..),
PortMap,
Branch (..),
Branches (..),
branchesToHashMap,
Conjunction (..),
conjunctionToBranches,
conjunctionToHashMap,
Literal (..),
)
where
import qualified Data.HashMap.Strict as HashMap
import Language.Pion.Name
import Language.Pion... |
816c014fafcb5421234c8871c8e7d955d8f2e3bbba7ebb213ec900fccf05cceb | prl-julia/juliette-wa | wa-examples.rkt | #lang racket
(require redex)
(require "wa-surface.rkt") ; import surface language
(provide (all-defined-out)) ; export all definitions
;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;; Surface Language Examples
;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;; ========================================... | null | https://raw.githubusercontent.com/prl-julia/juliette-wa/1d1a2154e7b4e232ea2166fba485a3bf574ebd88/src/redex/attic/wa-examples.rkt | racket | import surface language
export all definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Surface Language Examples
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
==================================================
Types
==================================================
----------------------------... | #lang racket
(require redex)
(define tInt (term Int64))
(define tFlt (term Float64))
(define tNum (term Number))
(define tStr (term String))
(define tBool (term Bool))
(define tSkip (term Nothing))
(define tTop (term Any))
(define tBot (term Bot))
(define (tMethod name) (term (mtag ,name)))
(define tsE... |
3567423d4cead989999995616bc9bcf8dcb0bc0183857ffc5bbb322995a581ce | quephird/dodonpascii | entities.clj | (ns dodonpascii.entities
"This module is responsible for creating entities."
(:require [quil.core :as q :include-macros true]
[dodonpascii.resources :as r]
[dodonpascii.helpers :as h]
[dodonpascii.levels :as l]))
(defn is-player-starting? [{{start-t :life-start-time} :player
... | null | https://raw.githubusercontent.com/quephird/dodonpascii/5a04c41d0f4a5b78118572a1a64e4e8a4be98bb3/src/dodonpascii/entities.clj | clojure | (ns dodonpascii.entities
"This module is responsible for creating entities."
(:require [quil.core :as q :include-macros true]
[dodonpascii.resources :as r]
[dodonpascii.helpers :as h]
[dodonpascii.levels :as l]))
(defn is-player-starting? [{{start-t :life-start-time} :player
... | |
d467f768f9024b083749e31055dd0821362fea17d61cd82812840e0c860b7fbc | ktakashi/sagittarius-scheme | factories.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; text/markdown/parser/factories.scm - Parser factories
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3ba83ba82b857c21df86ccce99395020310d3af8/sitelib/text/markdown/parser/factories.scm | scheme | coding : utf-8 -*-
text/markdown/parser/factories.scm - Parser factories
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice... | Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (text markdown parser factorie... |
358b6ef59adc5c9e7064100e41637a9b5c0d4a2fc00f1174015bd3bae53cacbb | LPCIC/matita | nCicRefineUtil.mli |
||M|| This file is part of HELM , an Hypertextual , Electronic
||A|| Library of Mathematics , developed at the Computer Science
||T|| Department , University of Bologna , Italy .
||I||
||T||... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_refiner/nCicRefineUtil.mli | ocaml |
||M|| This file is part of HELM , an Hypertextual , Electronic
||A|| Library of Mathematics , developed at the Computer Science
||T|| Department , University of Bologna , Italy .
||I||
||T||... | |
f0bdb7eb1b1f6c473b80bb2076325f1948f8a000444d31f6fe9f49db15e426be | pcapriotti/optparse-applicative | Builder.hs | # LANGUAGE CPP #
module Options.Applicative.Builder (
* builders
--
-- | This module contains utility functions and combinators to create parsers
-- for individual options.
--
-- Each parser builder takes an option modifier. A modifier can be created by
composing the basic modifiers provided by this modu... | null | https://raw.githubusercontent.com/pcapriotti/optparse-applicative/362c61cf36fb00199237b3314753774828be812d/src/Options/Applicative/Builder.hs | haskell |
| This module contains utility functions and combinators to create parsers
for individual options.
Each parser builder takes an option modifier. A modifier can be created by
For example:
> out = strOption
> ( long "output"
> <> short 'o'
> <> metavar "FILENAME" )
creates a parser for an option c... | # LANGUAGE CPP #
module Options.Applicative.Builder (
* builders
composing the basic modifiers provided by this module using the ' Monoid '
operations ' ' and ' mappend ' , or their aliases ' idm ' and ' < > ' .
subparser,
strArgument,
argument,
flag,
flag',
switch,
abortOption,
infoOption,
st... |
c970fd8f73df2138c9d5e1e280b03bc60281368a6ce6b3761e0ee905abb1665f | yminer/libml | propagateMlpnnStdVisitor.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/nn/propagate/propagateMlpnnStdVisitor.ml | ocaml | *
Propagation of the activation.
| * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... |
9184f3347aed1dfa4a1e2904f853e118de22fe2a25b96ebf41f1f0ca150921e4 | racket/htdp | test-aux.rkt | #lang racket/gui
(require rackunit)
(provide
;; syntax
;; (testing e ...) creates a top-level test in its own eventspace that
;; shuts down after the tests are run
testing
(all-from-out rackunit))
;; -----------------------------------------------------------------------------
(define-syntax-rule
(test... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/2htdp/tests/test-aux.rkt | racket | syntax
(testing e ...) creates a top-level test in its own eventspace that
shuts down after the tests are run
-----------------------------------------------------------------------------
module+ test | #lang racket/gui
(require rackunit)
(provide
testing
(all-from-out rackunit))
(define-syntax-rule
(testing e ...)
(do-testing (lambda () e ...))))
(define (do-testing thunk)
(parameterize ((current-eventspace (make-eventspace)))
(define ch (make-channel))
(queue-callback
(lambda ()
... |
c293c41ce6ead53a2f17e75b072caacd6d8e1b9f69166394c633ca3ad4455914 | learnhaskell-brisbane/learn | week7b.hs | import RelationalAlgebra
borrower = Table
"borrower"
[ "cstmr-name", "loan-num" ]
[ ["Adams" , "L-16" ]
, ["Curry" , "L-93" ]
, ["Hayes" , "L-15" ]
, ["Jackson" , "L-14" ]
, ["Jones" , "L-17" ]
, ["Smith" , "L-11" ]
, ["Smith" , "L-23" ]
, ["Williams" , "L-17" ] ]
l16 = printTable (selectf "loan-... | null | https://raw.githubusercontent.com/learnhaskell-brisbane/learn/4b65a2aa8998a4087708aba5cb232c35c15ef6ce/chapter7/week7b.hs | haskell | import RelationalAlgebra
borrower = Table
"borrower"
[ "cstmr-name", "loan-num" ]
[ ["Adams" , "L-16" ]
, ["Curry" , "L-93" ]
, ["Hayes" , "L-15" ]
, ["Jackson" , "L-14" ]
, ["Jones" , "L-17" ]
, ["Smith" , "L-11" ]
, ["Smith" , "L-23" ]
, ["Williams" , "L-17" ] ]
l16 = printTable (selectf "loan-... | |
11d8b13b85f58672612158fe5abf636583bac2d41c6939392137e2ab18f51545 | bazurbat/chicken-scheme | test-finalizers.scm | ;;;; test-finalizers.scm
(use extras)
(##sys#eval-debug-level 0) ; disable keeping trace-buffer with frameinfo
(define x (list 1 2 3))
(define y (list 4 5 6))
(define x-f #f)
(define y-f #f)
(begin
(set-finalizer!
x
(lambda (o)
(format #t "Delete: ~A (y: ~a)~%" o y-f)
(set! x-f #t)))
#t)
(beg... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/tests/test-finalizers.scm | scheme | test-finalizers.scm
disable keeping trace-buffer with frameinfo
This ought to work, see patches/finalizer.closures.diff for
a fix that unfortunately disables finalizers in the interpreter
(probably due to the different closure representation).
(assert (not y-f))
(set! x #f)
(gc #t)
(assert (not x-f))
(assert (not ... |
(use extras)
(define x (list 1 2 3))
(define y (list 4 5 6))
(define x-f #f)
(define y-f #f)
(begin
(set-finalizer!
x
(lambda (o)
(format #t "Delete: ~A (y: ~a)~%" o y-f)
(set! x-f #t)))
#t)
(begin
(set-finalizer!
y
(let ((p x))
(lambda (o)
(format #t "Delete: ~A: ~A~%" ... |
0b3187fedef10c3bcde401c6b11fb88ab2eaac0e2bb3a538bac084e39429fbf3 | BillHallahan/G2 | Test3.hs | -- cmd_line = (--no-keep-quals)
{-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--prune-unsorted" @-}
# LANGUAGE DeriveGeneric #
module Combined () where
data R = R
f :: R
f = k a
a :: Int
a = 1
@ k : : { v : Int | v = 1 } - > R @
k :: Int -> R
k p = R
| null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Pos/Test3.hs | haskell | cmd_line = (--no-keep-quals)
@ LIQUID "--short-names" @
@ LIQUID "--no-termination" @
@ LIQUID "--prune-unsorted" @ |
# LANGUAGE DeriveGeneric #
module Combined () where
data R = R
f :: R
f = k a
a :: Int
a = 1
@ k : : { v : Int | v = 1 } - > R @
k :: Int -> R
k p = R
|
644ad5ac4ae69fa6a8e16d245630779c6aaa64787e6585919e683c8d18d7bf2d | gedge-platform/gedge-platform | rabbit_mqtt_connection_info.erl | 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 ( c ) 2017 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mqtt_connection_info).
%% Module t... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_mqtt/src/rabbit_mqtt_connection_info.erl | erlang |
Module to add the MQTT client ID to authentication properties
API | 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 ( c ) 2017 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mqtt_connection_info).
-export([additio... |
a1941306858b07644015bed9eee9f424df43f0151a548d6212411b214a2db5d0 | nuprl/gradual-typing-performance | quad-main.rkt | #lang racket/base
(provide
typeset
)
;; ----------------------------------------------------------------------------
(require
benchmark-util
"../base/core.rkt"
(only-in racket/list append* empty empty? split-at drop-right)
racket/class
(only-in racket/sequence sequence->list)
(only-in math/flonum fl+ f... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/test/mini-quadMB/untyped/quad-main.rkt | racket | ----------------------------------------------------------------------------
bg: should maybe import this
=============================================================================
-----------------------------------------------------------------------------
(log-quad-debug "last word will not be hyphenated")
... | #lang racket/base
(provide
typeset
)
(require
benchmark-util
"../base/core.rkt"
(only-in racket/list append* empty empty? split-at drop-right)
racket/class
(only-in racket/sequence sequence->list)
(only-in math/flonum fl+ fl fl>)
(only-in "quads.rkt"
quad-car
line
quads->column
quads->page
qu... |
75d3dcccb2ede6bd4e44506798f79b6be161c04db25b89892393633dce8ad3e1 | clj-kondo/clj-kondo | in_ns.clj | (ns in-ns.in-ns)
(in-ns 'in-ns.base-ns)
(foo 1 2 3) ;; this should give a warning
| null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/in-ns/in_ns.clj | clojure | this should give a warning | (ns in-ns.in-ns)
(in-ns 'in-ns.base-ns)
|
230ec2c947f394b6807da4f8c7dd44b1bcdb716aa4e43eac1311dcb781436dcc | hopv/MoCHi | curry.ml | open Syntax
open Term_util
open Type
open Util
module Tree = Rose_tree
module RT = Ref_type
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
let leaf x = Tree.leaf (Some x)
let node tys = Tree.Node(None, tys)
let root x = Option.get @@ Tree.root x
let flatten x = List.filter_map Fun.... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/curry.ml | ocaml | ty' must be the result type
Function types cannot have predicates
for predicates | open Syntax
open Term_util
open Type
open Util
module Tree = Rose_tree
module RT = Ref_type
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
let leaf x = Tree.leaf (Some x)
let node tys = Tree.Node(None, tys)
let root x = Option.get @@ Tree.root x
let flatten x = List.filter_map Fun.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.