_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 |
|---|---|---|---|---|---|---|---|---|
85022db56c882080ebf9900d38e30ef563d187847cf2176f13b0776c152df272 | pjotrp/guix | install.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Foundat... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/system/install.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 , 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu system install)
#:use-module (gnu)
#:use-module (guix ge... |
b19c8de4ef409ff97fd7189dd008a943c21bfb04a8455699516ce0aa588edf34 | elnewfie/lslforge | Load.hs | module Language.Lsl.Internal.Load(
loadScript,
loadScripts,
loadModules) where
import Control.Exception(SomeException(..),tryJust)
import Language.Lsl.Internal.BuiltInModules(avEventGen)
import Language.Lsl.Syntax(compileLSLScript',compileLibrary,
Library,CompiledLSLScript,Validity,CodeErrs(..))
import... | null | https://raw.githubusercontent.com/elnewfie/lslforge/27eb84231c53fffba6bdb0db67bde81c1c12dbb9/lslforge/haskell/src/Language/Lsl/Internal/Load.hs | haskell | loadModules' files =
do parseResults <- parseFiles parseModule files
let augLib = validLibrary (avEventGen:ok)
return (augLib ++ (map (\ (n,err) -> (n,Left [err])) bad))
--return (validated ++ (map (\ (n,err) -> (n,Left err)) bad))
loadScripts library files =
do parseResults <- parse... | module Language.Lsl.Internal.Load(
loadScript,
loadScripts,
loadModules) where
import Control.Exception(SomeException(..),tryJust)
import Language.Lsl.Internal.BuiltInModules(avEventGen)
import Language.Lsl.Syntax(compileLSLScript',compileLibrary,
Library,CompiledLSLScript,Validity,CodeErrs(..))
import... |
7aaec8b986338ba8d4fb8f89a047b0571af800b4f0674ee2f612e112d717c8b7 | metosin/compojure-api | request.clj | (ns compojure.api.request)
(def coercion
"Request-scoped coercion"
::coercion)
(def swagger
"Vector of extra swagger data"
::swagger)
(def ring-swagger
"Ring-swagger options"
::ring-swagger)
(def paths
"Paths"
::paths)
(def lookup
"Reverse routing tree"
::lookup)
(def muuntaja
"Muuntaja inst... | null | https://raw.githubusercontent.com/metosin/compojure-api/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/src/compojure/api/request.clj | clojure | (ns compojure.api.request)
(def coercion
"Request-scoped coercion"
::coercion)
(def swagger
"Vector of extra swagger data"
::swagger)
(def ring-swagger
"Ring-swagger options"
::ring-swagger)
(def paths
"Paths"
::paths)
(def lookup
"Reverse routing tree"
::lookup)
(def muuntaja
"Muuntaja inst... | |
a293f53bb6acd918d3a8fc446d8248e97029def4c67b95e255078366b6e73521 | opencog/opencog | whichsubjSVOQ.scm | This rule is for which - subject sof SVO sentences , as in
" Which one of you ate all the ice cream ? "
( AN june 2015 )
(define whichsubjSVOQ
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$subj" "WordInstanceNode")
(var-decl "$verb" "WordInstanceNode")
(var-decl "$obj" "Wor... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/relex2logic/rules/whichsubjSVOQ.scm | scheme | This rule is for which - subject sof SVO sentences , as in
" Which one of you ate all the ice cream ? "
( AN june 2015 )
(define whichsubjSVOQ
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$subj" "WordInstanceNode")
(var-decl "$verb" "WordInstanceNode")
(var-decl "$obj" "Wor... | |
7a1d7f6670c2a7c4a7304c66430d72e34ccb7dbfd9e2b96dabb9de9df19e86f0 | ucsd-progsys/nate | command.mli | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/ocamlbuild/command.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 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 .
$ I d : command.mli , v 1.1.4.4 2007/12/18 08:55:22 ... |
8783618fb6f3b9848a1540c3de1d8db242d6357346490ee673e49a54c579e904 | UnkindPartition/monad-classes | Effects.hs | module Control.Monad.Classes.Effects where
-- | Writer effect
data EffWriter (w :: *)
-- | Reader effect
data EffReader (e :: *)
-- | Local state change effect
data EffLocal (e :: *)
-- | State effect
data EffState (s :: *)
-- | Arbitrary monadic effect
data EffExec (w :: * -> *)
-- | Except effect
data EffExcept... | null | https://raw.githubusercontent.com/UnkindPartition/monad-classes/19e41e250615ad1121a958baed6c3081b0efb11b/Control/Monad/Classes/Effects.hs | haskell | | Writer effect
| Reader effect
| Local state change effect
| State effect
| Arbitrary monadic effect
| Except effect | module Control.Monad.Classes.Effects where
data EffWriter (w :: *)
data EffReader (e :: *)
data EffLocal (e :: *)
data EffState (s :: *)
data EffExec (w :: * -> *)
data EffExcept (e :: *)
|
a42c491bd3f4646aa2422e45ee3c14a993615584f2ab64e296d14e8a9e4a78b8 | vmchale/apple | Main.hs | module Main (main) where
import CGen
import Control.Exception (throwIO)
import qualified Data.ByteString.Lazy as BSL
import Data.Semigroup ((<>))
import qualified Data.Text as T
import qualified Data.Version as V
import Nasm
i... | null | https://raw.githubusercontent.com/vmchale/apple/eb34c41b245c04a7c76af0f24be828d390c1526b/exe/Main.hs | haskell | module Main (main) where
import CGen
import Control.Exception (throwIO)
import qualified Data.ByteString.Lazy as BSL
import Data.Semigroup ((<>))
import qualified Data.Text as T
import qualified Data.Version as V
import Nasm
i... | |
cf233976de6777dcfd3432671b3bded344cbccd8bf2a03dc64170cbdcb1850df | plewto/Cadejo | curve_panel.clj | ;; DEPRECIATED
(ns cadejo.ui.midi.curve-panel
(:require [cadejo.util.user-message :as umsg])
(:require [cadejo.ui.util.factory :as factory])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [seesaw.core :as ss])
(:import java.awt.Dimension))
(umsg/warning "cadejo.ui.midi.curve-panel is DEPRECIATED")
(def ^... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/ui/midi/curve_panel.clj | clojure | DEPRECIATED
inverted
jrb (ss/radio :group grp)
as a temp work around curve buttons are not allowed to be disabled.
(enable! [this flag]
(doseq [b buttons]
(.setEnabled b flag))) | (ns cadejo.ui.midi.curve-panel
(:require [cadejo.util.user-message :as umsg])
(:require [cadejo.ui.util.factory :as factory])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [seesaw.core :as ss])
(:import java.awt.Dimension))
(umsg/warning "cadejo.ui.midi.curve-panel is DEPRECIATED")
(def ^:private rows 7... |
7e62e99629c28075ab59915f07cc0af4ba34631241c588f8ae4b63f54954489f | technomancy/slamhound | regrow_test.clj | (ns slam.hound.regrow-test
(:require [clojure.test :refer [deftest is testing]]
[slam.hound.regrow :refer [disambiguate grow-ns-map regrow]])
(:refer-clojure :exclude [/]))
;; Classes and vars for testing
(defrecord RegrowTestRecord [])
(deftype TreeSet [])
(definterface HashSet)
(def +i-must-be-a-cl-u... | null | https://raw.githubusercontent.com/technomancy/slamhound/68bad50282b8b559eb012d6574ef6a0e1485b3a2/test/slam/hound/regrow_test.clj | clojure | Classes and vars for testing
Explicitly require korma for tests below
Please never do this | (ns slam.hound.regrow-test
(:require [clojure.test :refer [deftest is testing]]
[slam.hound.regrow :refer [disambiguate grow-ns-map regrow]])
(:refer-clojure :exclude [/]))
(defrecord RegrowTestRecord [])
(deftype TreeSet [])
(definterface HashSet)
(def +i-must-be-a-cl-user+ true)
(def -+_$?!*><='' :ho... |
24b1fd7efd40b03b8fb195b614164747bc98a156b5c4e847067e7ff3e079e3c7 | diagrams/diagrams-lib | Points.hs | -----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Points
Copyright : ( c ) 2011 diagrams - lib team ( see LICENSE )
-- License : BSD-style (see LICENSE)
-- Maintainer :
--
-- Points in space. For more tools for working with points and
vectors... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/Points.hs | haskell | ---------------------------------------------------------------------------
|
Module : Diagrams.Points
License : BSD-style (see LICENSE)
Maintainer :
Points in space. For more tools for working with points and
---------------------------------------------------------------------------
* Points
*... | Copyright : ( c ) 2011 diagrams - lib team ( see LICENSE )
vectors , see " Linear . Affine " .
module Diagrams.Points
Point (..), origin, (*.)
, centroid
, pointDiagram
, _Point, lensP
) where
import Diagrams.Core (pointDiagram)
import Diagrams... |
d962764e55208bfbbf5d2f4f613ec25f21997b6cef02a05e17885a3946731b7b | mythical-linux/rktfetch | info.rkt | #lang info
(define pkg-authors '(DrownNotably Phate6660 xgqt))
(define pkg-desc "System fetch program in Racket")
(define version "1.0.0")
(define license 'CC0-1.0)
(define collection 'multi)
(define deps
'("base"))
(define build-deps
'("racket-doc"
"rackunit-lib"
"scribble-lib"))
| null | https://raw.githubusercontent.com/mythical-linux/rktfetch/af28507e8d14faf19555dde32b691e65ddeb9822/info.rkt | racket | #lang info
(define pkg-authors '(DrownNotably Phate6660 xgqt))
(define pkg-desc "System fetch program in Racket")
(define version "1.0.0")
(define license 'CC0-1.0)
(define collection 'multi)
(define deps
'("base"))
(define build-deps
'("racket-doc"
"rackunit-lib"
"scribble-lib"))
| |
0fdf7534426155a4f1620769ee54d0f08ba0fcf0051f2310dddd4e1b830c643c | DSLsofMath/BScProj2018 | Vector.hs |
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{ - # LANGUAGE AllowAmbiguousTypes # - }
module Combination.Vector where
import Combination.Quantity
import Dimensio... | null | https://raw.githubusercontent.com/DSLsofMath/BScProj2018/410f185c61b31c7671e60db873ba7b3afee44c30/Physics/src/Combination/Vector.hs | haskell | # LANGUAGE GADTs #
--------------------------------------
--------------------------------------
--------------------------------------
--------------------------------------
Skalning (från vänster)
--------------------------------------
Exempelanvändning
--------------------------------------
Ej dimensionssäkra
Ad... |
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{ - # LANGUAGE AllowAmbiguousTypes # - }
module Combination.Vector where
import Combination.Quantity
import Dimensions.TypeLevel
import Pre... |
e0c2cee7ac6416aa4ad58f3354a0047b40905a699b707688627ea83eb8d31782 | tweag/asterius | Ld.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
module Asterius.Ld
( LinkTask (..),
linkModules,
linkExeInMemory,
linkExe,
rtsUsedSymbols,
)
where
import Asterius.Ar
import Asterius.Binary.File
im... | null | https://raw.githubusercontent.com/tweag/asterius/506fa3b3b79d973db064a3ef1dd6de5d29a3bf78/asterius/src/Asterius/Ld.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE StrictData #
originate from gcc being called on cbits in packages. This in the past gave
deserialization failures. Hence, when we deserialize objects to be linked in
'loadTheWorld', we choose to be overpermissive and silently ignore
deserialization f... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Asterius.Ld
( LinkTask (..),
linkModules,
linkExeInMemory,
linkExe,
rtsUsedSymbols,
)
where
import Asterius.Ar
import Asterius.Binary.File
import Asterius.Binary.NameCache
import Asterius.Builtins
import Asterius.Builtins.Main
impor... |
1f6cb7f6441acc5130ca1a95418a6e1654f968cb7e060f3eb45c61987055d49c | cljfx/cljfx | scene.clj | (ns cljfx.fx.scene
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.coerce :as coerce]
[cljfx.lifecycle :as lifecycle])
(:import [javafx.scene Scene]
[javafx.geometry NodeOrientation]))
(set! *warn-on-reflection* true)
(defn- accelerators [m]
(persiste... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/scene.clj | clojure | (ns cljfx.fx.scene
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.coerce :as coerce]
[cljfx.lifecycle :as lifecycle])
(:import [javafx.scene Scene]
[javafx.geometry NodeOrientation]))
(set! *warn-on-reflection* true)
(defn- accelerators [m]
(persiste... | |
e2ff9065e19fed56d681ac8eab3093ed9a3eee9b95170d0dc80d8bd996af39cc | haskell/haskell-language-server | KnownMissingSemigroup.hs | data Semi = Semi [String] Int
instance Semigroup Semi where
(<>) = _
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/KnownMissingSemigroup.hs | haskell | data Semi = Semi [String] Int
instance Semigroup Semi where
(<>) = _
| |
3542765b4c6f7ee2321b1fefe8dace78a630eb021449de26d416680780dcce20 | tschady/advent-of-code | d05.clj | (ns aoc.2021.d05
(:require [aoc.file-util :as file-util]))
(def input (map (partial partition 2) (file-util/read-int-vectors "2021/d05.txt")))
;; ^:blog
;; I use slope and y-intercept to compute points on the line. The interesting part is
use of Infinity : ` # # Inf ` which works well mathematically , but does re... | null | https://raw.githubusercontent.com/tschady/advent-of-code/eef58af6dfbbed0fec0275e09debd42a3c293374/src/aoc/2021/d05.clj | clojure | ^:blog
I use slope and y-intercept to compute points on the line. The interesting part is
^:blog
This lets me describe horizontal/vertical/diagonal lines by their slope. | (ns aoc.2021.d05
(:require [aoc.file-util :as file-util]))
(def input (map (partial partition 2) (file-util/read-int-vectors "2021/d05.txt")))
use of Infinity : ` # # Inf ` which works well mathematically , but does require the occasional ' if ' .
(defn- ^:blog slope [[[x1 y1] [x2 y2]]]
(if (= x2 x1)
##Inf... |
4c27196d14004c1848f0676c122c28d2b3e0e6c8d769fd23ab6bfaa8528ba854 | mzp/coq-ide-for-ios | extend.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/parsing/extend.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : extend.ml 13329 201... |
3e557ffb7ce491a5d20c6245f8ea933c09bb524dc45aa01270a2715efd996672 | crategus/cl-cffi-gtk | glib.random.lisp | ;;; ----------------------------------------------------------------------------
glib.random.lisp
;;;
The documentation of this file is taken from the GLib 2.68 Reference
Manual and modified to document the Lisp binding to the GLib library .
;;; See <>. The API documentation of the Lisp binding is
avai... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/glib/glib.random.lisp | lisp | ----------------------------------------------------------------------------
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License for Lisp
License, or (at your option) any late... | glib.random.lisp
The documentation of this file is taken from the GLib 2.68 Reference
Manual and modified to document the Lisp binding to the GLib library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2013 - 2021
as published by the Free Software Foundation , either version 3 of the
the ... |
ca251a8982fe17b68e4cb787a6f21ed2690f20e6154de7da0e1c13d462614a80 | spilgames/spapi-router | spr_ets_handler_eunit.erl | -module(spr_ets_handler_eunit).
-behaviour(spapi_router_callback).
-include_lib("eunit/include/eunit.hrl").
-include("defs.hrl").
-define(DEMO_TABLE, demo_table).
-define(DEMO_CALLBACK_TABLE, demo_callback_table).
-export([new_resource/2, lost_resource/2, measure/3, success/2, failure/2]).
%% Dummy test to ensure... | null | https://raw.githubusercontent.com/spilgames/spapi-router/91485502538a36a0f4ee76d59faaf91f57ec88bb/test/spr_ets_handler_eunit.erl | erlang | Dummy test to ensure epmd is running
Note this test should not be called in code, because scan-world-code path is followed
all nodes, undefined wanted
note that the order of the keys is undetermined, hence the strange assertion comparisons
illegal nodes, should not result in {badrpc,}
this is need because we use mon... | -module(spr_ets_handler_eunit).
-behaviour(spapi_router_callback).
-include_lib("eunit/include/eunit.hrl").
-include("defs.hrl").
-define(DEMO_TABLE, demo_table).
-define(DEMO_CALLBACK_TABLE, demo_callback_table).
-export([new_resource/2, lost_resource/2, measure/3, success/2, failure/2]).
ensure_epmd_test_() ->
... |
63736dc79c1f4d72f31b868311711d82612d76adec17ec4124af9789ca28e3c6 | well-typed/large-records | R100.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.HListBaseline.Sized.R100 where
import Bench.Types
import Bench.HList
import Common.HListOfSize.HL100
hlist :: HList Fiel... | null | https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/typelet/Experiment/HListBaseline/Sized/R100.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.HListBaseline.Sized.R100 where
import Bench.Types
import Bench.HList
import Common.HListOfSize.HL100
hlist :: HList Fields
hlist =
MkT 00
:* MkT 01
:* MkT 02
:* MkT 03
:* MkT 04
:* MkT 05
:* MkT 06
:* MkT 07
... |
f222a42d881b7da61ca764fa5ef0e626ea7bbd72b57b6e32c904c5c79db76194 | vbmithr/ocaml-fix | fix_async_raw.mli | open Async
open Fix
module Log : Logs.LOG
module Log_async : Logs_async.LOG
val connect : Uri.t -> (t Pipe.Reader.t * t Pipe.Writer.t) Deferred.t
| null | https://raw.githubusercontent.com/vbmithr/ocaml-fix/8394d397428b7c7832934462969347c1ebb43e8d/src/fix_async_raw.mli | ocaml | open Async
open Fix
module Log : Logs.LOG
module Log_async : Logs_async.LOG
val connect : Uri.t -> (t Pipe.Reader.t * t Pipe.Writer.t) Deferred.t
| |
131dd97859c4a883e13c959d55788e78b2852ac8ba5172ff0aa4b919780c489f | mikeizbicki/subhask | TestSuite.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE DataKinds #
module Main
where
import SubHask
import SubHask.Algebra.Array
import SubHask.Algebra.Group
import SubHask.Algebra.Container
import SubHask.Algebra.Logic
import SubHask.Algebra.Metric
import SubHask.Algebra.Parallel
import SubHask.A... | null | https://raw.githubusercontent.com/mikeizbicki/subhask/f53fd8f465747681c88276c7dabe3646fbdf7d50/test/TestSuite.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
orphan instances needed for compilation | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE DataKinds #
module Main
where
import SubHask
import SubHask.Algebra.Array
import SubHask.Algebra.Group
import SubHask.Algebra.Container
import SubHask.Algebra.Logic
import SubHask.Algebra.Metric
import SubHask.Algebra.Parallel
import SubHask.A... |
127905d72a51622e6836d873b5b5d636cd5c2ba059414817c72f7ea82b4c5fc5 | district0x/district-registry | syncer.cljs | (ns district-registry.server.syncer
(:require [bignumber.core :as bn]
[camel-snake-kebab.core :as camel-snake-kebab]
[cljs-web3-next.core :as web3-core]
[cljs-web3-next.eth :as web3-eth]
[cljs-web3-next.utils :as web3-utils]
[cljs.core.async :as async]
... | null | https://raw.githubusercontent.com/district0x/district-registry/63b1918bf384ef04e579aad4c80a51c4f9f98151/src/district_registry/server/syncer.cljs | clojure | only allows setting a new ens-name if it is not set yet.
User got reward solely because of staking, he didn't vote
We still need to insert vote to mark reward as claimed
block if we need
So we crash as fast as we can and don't drag errors that are harder to debug | (ns district-registry.server.syncer
(:require [bignumber.core :as bn]
[camel-snake-kebab.core :as camel-snake-kebab]
[cljs-web3-next.core :as web3-core]
[cljs-web3-next.eth :as web3-eth]
[cljs-web3-next.utils :as web3-utils]
[cljs.core.async :as async]
... |
26663352eeceeadfe3f972d8ef00a8488981c7a08f0eca94be0dd62b19114b13 | UnixJunkie/consent | atom.ml |
very small atom module to help compute atom environments ( a la molprint2d ) from MOL2 files
open Printf
type t = { idx: int;
typ: string }
let create (idx: int) (typ: string): t =
indexes start at 1 in MOL2 files
{ idx = idx - 1; typ }
let dummy = create (-1) ""
example line ( output of OpenBa... | null | https://raw.githubusercontent.com/UnixJunkie/consent/f065ee7ba5a1ae014b5c3a28d0985ba5ad1abda5/src/atom.ml | ocaml |
very small atom module to help compute atom environments ( a la molprint2d ) from MOL2 files
open Printf
type t = { idx: int;
typ: string }
let create (idx: int) (typ: string): t =
indexes start at 1 in MOL2 files
{ idx = idx - 1; typ }
let dummy = create (-1) ""
example line ( output of OpenBa... | |
e6ec7521668da9879b8122c56b8d2b79296d569ccd1c1f79f10848e0c2a9a732 | BrianChevalier/radiant | test_runner.cljc | (ns radiant.test-runner
(:require [clojure.test :refer [run-tests]]
[radiant.core-test]))
(defn -main []
(let [{:keys [fail error]}
(run-tests 'radiant.core-test)
#_:clj-kondo/ignore status (+ fail error)]
#?(:clj (shutdown-agents)
(System/exit status)
:cljs (println s... | null | https://raw.githubusercontent.com/BrianChevalier/radiant/673f6db5141afd244a1b2aef17b96b38271e4169/test/radiant/test_runner.cljc | clojure | (ns radiant.test-runner
(:require [clojure.test :refer [run-tests]]
[radiant.core-test]))
(defn -main []
(let [{:keys [fail error]}
(run-tests 'radiant.core-test)
#_:clj-kondo/ignore status (+ fail error)]
#?(:clj (shutdown-agents)
(System/exit status)
:cljs (println s... | |
6158f424ce3abae3eb093adeb168a70ac67a8ab698699b0b2c60413f4e84fef2 | alphagov/govuk-guix | tailon.scm | (define-module (gds services govuk tailon)
#:use-module (gnu services)
#:use-module (gnu services admin)
#:use-module (gnu services web)
#:use-module (gds services govuk nginx)
#:use-module (gds services govuk signon))
(define-public govuk-tailon-service-type
(service-type
(inherit tailon-service-type)
... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/services/govuk/tailon.scm | scheme | (define-module (gds services govuk tailon)
#:use-module (gnu services)
#:use-module (gnu services admin)
#:use-module (gnu services web)
#:use-module (gds services govuk nginx)
#:use-module (gds services govuk signon))
(define-public govuk-tailon-service-type
(service-type
(inherit tailon-service-type)
... | |
63e115621789b24b7909f03b696c683cc0d6ca963ba7a5085bc4052cebfd44e4 | gigamonkey/yamp | html.lisp | -*- fill - column : 80 ; -*-
;;
Copyright ( c ) 2017 , . All rights reserved .
;;
(in-package :com.gigamonkeys.yamp)
(defun generate-html (file)
"Generate HTML for the markup file in the same location except with an .html
extension."
(let ((*default-pathname-defaults* (parent-directory file)))
(multipl... | null | https://raw.githubusercontent.com/gigamonkey/yamp/dcf1b811e22709682e2a375d5d7e79fabe140c80/html.lisp | lisp | -*-
Return t here since we invoke this from slime which chokes on the pathname.
Whole document rewriters.
Special section rewriters
Configuration
Link rewriting
Images
Used in config files
Used in config files
Used in config files
Used in config files
This doesn't really belong here. This is specifi... |
Copyright ( c ) 2017 , . All rights reserved .
(in-package :com.gigamonkeys.yamp)
(defun generate-html (file)
"Generate HTML for the markup file in the same location except with an .html
extension."
(let ((*default-pathname-defaults* (parent-directory file)))
(multiple-value-bind (output-file config) (ht... |
b29f9cf4629d39139157fd8027a5d869a677879f22138f05090184956cf87059 | aphyr/timelike | project.clj | (defproject timelike "0.1.0-SNAPSHOT"
:description "A virtual thread simulator."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:test-selectors {:default (constantly true)
:simple :simple
:bamboo :bamboo
:layered :layered
... | null | https://raw.githubusercontent.com/aphyr/timelike/e802908595bb28d02575985c48bf79533b4294f1/project.clj | clojure | (defproject timelike "0.1.0-SNAPSHOT"
:description "A virtual thread simulator."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:test-selectors {:default (constantly true)
:simple :simple
:bamboo :bamboo
:layered :layered
... | |
85918a1de53d00cf13c3fb3616a6e9f87e33253c68285441943e3cc4f49384de | input-output-hk/plutus-apps | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Control.Tracer (nullTracer)
import Data.Either.Combinators (mapLeft, maybeToRight)
import Data.List (elemIndex)
import Data.Proxy (Proxy (Proxy))
import Data.Text (pack)
import Data.Text.E... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8706e6c7c525b4973a7b6d2ed7c9d0ef9cd4ef46/plutus-pab-executables/sync-client/Main.hs | haskell | # LANGUAGE OverloadedStrings #
| We only need to know the location of the socket.
configuration file.
| A simple callback that reads the incoming data, from the node. | module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Control.Tracer (nullTracer)
import Data.Either.Combinators (mapLeft, maybeToRight)
import Data.List (elemIndex)
import Data.Proxy (Proxy (Proxy))
import Data.Text (pack)
import Data.Text.Encoding (encodeUtf8)
import Options... |
0bf343198bd738a2df6c68f4ce57ad6700e7d5512c3e10945ada745f3a4380db | SixtantIO/dydx-starkware | dydx_starkware_test.clj | (ns io.sixtant.dydx-starkware-test
(:require [io.sixtant.dydx-starkware :refer :all]
[clojure.test :refer :all]))
;;; The test cases here were generated using the dydx3-python client
(deftest dydx-hmac-signature-test
(is (= (request-signature
"B6_eKDmHrm9L-DdVVRU75LC9W_k67TI4tCgoeN5a"
... | null | https://raw.githubusercontent.com/SixtantIO/dydx-starkware/c067035375334d56d5de361e22d122d4b8297346/test/io/sixtant/dydx_starkware_test.clj | clojure | The test cases here were generated using the dydx3-python client | (ns io.sixtant.dydx-starkware-test
(:require [io.sixtant.dydx-starkware :refer :all]
[clojure.test :refer :all]))
(deftest dydx-hmac-signature-test
(is (= (request-signature
"B6_eKDmHrm9L-DdVVRU75LC9W_k67TI4tCgoeN5a"
{:method :get
:path "/v3/users"
:body... |
4d9fc2a4e2773e1ed3816d8390fdeb179c44b6546eda33311b87f5462ef38003 | arrdem/stacks | projects.clj | (ns stacks.tools.projects
"Trees of sources and docs.
Articles don't come alone.
They're the most useful when they come in groups.
Documentation engines need to work in terms of large filesets of documentation and sources."
{:authors ["Reid \"arrdem\" McKenzie <>"]
:license "-v10.html"}
(:require [cloju... | null | https://raw.githubusercontent.com/arrdem/stacks/a16a7a6301e400c0c40c8774d07df0a86f9806f5/src/main/clj/stacks/tools/projects.clj | clojure | find-* should get its own namespace
What kind of ns structure to generate in this case?
I really want to index the contents of a namespace too. This means doing code
loading because that's the only way to actually extract docstrings. Code loading
has to happen both in a sandbox and in a subprocess becaus... | (ns stacks.tools.projects
"Trees of sources and docs.
Articles don't come alone.
They're the most useful when they come in groups.
Documentation engines need to work in terms of large filesets of documentation and sources."
{:authors ["Reid \"arrdem\" McKenzie <>"]
:license "-v10.html"}
(:require [cloju... |
ace71fc41070b6f561b5270fded072592a253ac88a24a67e545e136f3348d8a2 | cpeikert/Lol | Gadget.hs | |
Module : Crypto . Lol . Gadget
Description : Interfaces for " gadgets , " decomposition , and error correction .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Interfaces for " gadgets... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/Gadget.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
| "Gadget" vectors, parameterized by an index type.
| The gadget vector over @u@.
| Yield an error-tolerant encoding of an element with respect to
the gadget. (Mathematically,... | |
Module : Crypto . Lol . Gadget
Description : Interfaces for " gadgets , " decomposition , and error correction .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Interfaces for " gadgets... |
b451a4bf25eeac90a5d81e071bff151e78d0b8d10ca4933d7baafd9aae44a431 | bwo/monads | applicative_fold.clj | (ns monads.examples.applicative-fold
(:refer-clojure :exclude [count])
(:require [monads.applicative :as app]
[monads.types :as types]
[clojure.algo.generic.functor :as f])
(:import [monads.applicative Pure]
[monads.types Pair]))
(deftype Fold [combine start finish]
app/Appl... | null | https://raw.githubusercontent.com/bwo/monads/a3fdfa1414dc6efae39ea289022f14449119da89/src/monads/examples/applicative_fold.clj | clojure | (ns monads.examples.applicative-fold
(:refer-clojure :exclude [count])
(:require [monads.applicative :as app]
[monads.types :as types]
[clojure.algo.generic.functor :as f])
(:import [monads.applicative Pure]
[monads.types Pair]))
(deftype Fold [combine start finish]
app/Appl... | |
c7c670d0cf86f61333d306cae02d9a98fbdb39deb114f38ad8eae6263a8f9725 | ocaml-community/obus | oBus_context.ml |
* oBus_context.ml
* ---------------
* Copyright : ( c ) 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* oBus_context.ml
* ---------------
* Copyright : (c) 2010, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of obus, an... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/src/protocol/oBus_context.ml | ocaml |
* oBus_context.ml
* ---------------
* Copyright : ( c ) 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* oBus_context.ml
* ---------------
* Copyright : (c) 2010, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of obus, an... | |
f2aa77d1c21d4d52156b3e839a954f6441596dc96a728ccd2e4b086cd3c5cb2c | ocaml/opam | opamACL.mli | (**************************************************************************)
(* *)
Copyright 2020 David Allsopp Ltd.
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/ocaml/opam/074df6b6d87d4114116ea41311892b342cfad3de/src/core/opamACL.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2020 David Allsopp Ltd.
GNU Lesser General Public License version 2.1 , with the special
* C auxiliary function used for POSIX 1003.1e DRAFT 17 permission checking .
val get_acl_executable_info : string -> int -> int list option
* If compiled without libacl ... |
9b0e8dbc111004bc246e980ff4f0994406a5faa839ac95c0998f004030e36aff | amuletml/amulet | Token.hs | module Language.Lua.Parser.Token where
import Data.Text (unpack, Text)
import Data.Position
import Data.Spanned
import Data.Span
-- | The raw classification of a token without additional metadata. This
-- is the underlying representation of what the lexer produces and the
-- parser consumes.
data TokenClass
^ An @a... | null | https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Language/Lua/Parser/Token.hs | haskell | | The raw classification of a token without additional metadata. This
is the underlying representation of what the lexer produces and the
parser consumes.
^ A @break@ token.
^ A @do@ token.
^ An @else@ token.
^ An @elseif@ token.
^ A @false@ token.
^ A @function@ .
^ An @if@ token.
^ An @in@ token.
^ A @loc... | module Language.Lua.Parser.Token where
import Data.Text (unpack, Text)
import Data.Position
import Data.Spanned
import Data.Span
data TokenClass
^ An @and@ token .
^ An @end@ token .
^ A @for@ token .
^ An @or@ token .
^ A @then@ token .
^ A @(@ token .
^ A @)@ token .
^ A @]@ token .
| TcAdd | T... |
bba6bc6d33b9e345d67f08cc2499732602f55f385fd4a523830bafbb4ecdcdbe | bmeurer/ocamljit2 | typemod.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/typemod.mli | 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 Q Public License version 1.0 .
$ Id$
open Types
open Format
val t... |
7a33a5f0aa56ef563bb7d9d802a62a6a5e778e707480168c14fa6d5e09f4f022 | elaforge/karya | Ranges.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Ranges are half - open .
module Util.Ranges (
Ranges, extract, extract1, pair_map
, ranges, sorted_ranges, merge_sorted, range, point, everything, nothing
, overlapping, o... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Util/Ranges.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Nothing means an everything range.
| Nothing means no ranges, Just Nothing means Everything.
* constructors
| This doesn't ensure that, given @(s, e)@, s <= e.
* functions
| This is like 'overlapping', e... | Copyright 2013
| Ranges are half - open .
module Util.Ranges (
Ranges, extract, extract1, pair_map
, ranges, sorted_ranges, merge_sorted, range, point, everything, nothing
, overlapping, overlapping_closed, intersection, invert
) where
import qualified Control.DeepSeq as DeepSeq
import qualified Data... |
6d3d1dcda2b3754787c725d349faa7ab5e1f9035eea96f4640df2d9336e64d80 | jyh/metaprl | itt_void.ml | doc <:doc<
@module[Itt_void]
The @tt{Itt_void} module defines the @emph{empty} type.
The <<void>> type is a subtype of every other type (since
it has no elements).
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_void.ml | ocaml | ***********************************************************************
* TERMS *
***********************************************************************
***********************************************************************
* DISPLAY FORMS ... | doc <:doc<
@module[Itt_void]
The @tt{Itt_void} module defines the @emph{empty} type.
The <<void>> type is a subtype of every other type (since
it has no elements).
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular... |
d188b49d5082b98e91feb624dcd21de0eca5053edb71c837e7c7d3e2d2b15e92 | janestreet/rpc_parallel | workers_as_masters.ml | open Core
open Async
An example demonstrating how workers can themselves act as masters and spawn more
workers . We have two layers of workers , where the first layer spawns the workers of the
second layer .
workers. We have two layers of workers, where the first layer spawns the workers of the
secon... | null | https://raw.githubusercontent.com/janestreet/rpc_parallel/b37ce51ddfd9d9b6f96d285c81db7fc36d66a1d5/example/workers_as_masters.ml | ocaml | Make sure to always use [Command.async]
This call to [Rpc_parallel.start_app] must be top level | open Core
open Async
An example demonstrating how workers can themselves act as masters and spawn more
workers . We have two layers of workers , where the first layer spawns the workers of the
second layer .
workers. We have two layers of workers, where the first layer spawns the workers of the
secon... |
968b2b3f263bd1116a8e05d4534f7e8a2155560c730b3cbfbc1c54a4b2e4a143 | braveclojure/training | ex06_more_syntax.clj | (ns training.exercises.ex06-more-syntax)
;; ========================================
;; Exceptions
;; ========================================
(try (/ 1 0)
(catch Exception e
(str "caught exception: " (.getMessage e))))
;; ========================================
;; Destructuring
;; ====================... | null | https://raw.githubusercontent.com/braveclojure/training/5b7fb9059c17b2166c2e66850094f424319e55eb/exercises/src/training/exercises/ex06_more_syntax.clj | clojure | ========================================
Exceptions
========================================
========================================
Destructuring
========================================
Destructuring is incredibly useful, but it's not absolutely
necessary so I'm not going to spend much time on it. There's an... | (ns training.exercises.ex06-more-syntax)
(try (/ 1 0)
(catch Exception e
(str "caught exception: " (.getMessage e))))
(def numbers [1 2 3 4 5])
(let [[a b] numbers]
a)
(let [[a b] numbers]
b)
(let [[a b] numbers]
(+ a b))
(let [[a b & c] [1 2 3 4 5]]
c)
(def image {:width 10 :height 30})
(l... |
2435f9ee1b3d5bdb6b99fd4892ee98756ee924d32e276c4f16544624ac917b51 | digikar99/numericals | one-arg-fn-float.lisp | (numericals.common:compiler-in-package numericals.common:*compiler-package*)
(5am:in-suite nu::array)
;; Basic Concept:
( c : dn - ssin ( array - total - size x ) ( ptr x ) 1 ( ptr out ) 1 )
FIXME : No multithreading for broadcasting ; see numericals / src / one - arg - fn.lisp
;;; Yes, this does lead to a lot ... | null | https://raw.githubusercontent.com/digikar99/numericals/8a0e7190996f38b29107d51285a65f518cbf5037/dense-numericals-src/one-arg-fn-float.lisp | lisp | Basic Concept:
see numericals / src / one - arg - fn.lisp
Yes, this does lead to a lot of code-bloat while inlining, but inlining is only
primarily useful for very small arrays, and in those cases, the performance difference
is of the order of an magnitude.
TODO: Use ARRAY or STATIC-ARRAY
It is possible for us t... | (numericals.common:compiler-in-package numericals.common:*compiler-package*)
(5am:in-suite nu::array)
( c : dn - ssin ( array - total - size x ) ( ptr x ) 1 ( ptr out ) 1 )
(define-polymorphic-function one-arg-fn/float (name x &key out broadcast) :overwrite t
:documentation "These functions have a single arra... |
ef6d4f530f55150862df7ae502aefbceb69a94e704b6d7450b831c763034f88f | PeterDWhite/Osker | PosixAPI.hs | Copyright ( C ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module PosixAPI
fork interface
, exit -- Posix exit interface
getPid interface
interface
getPGid interface
, getPGrp -- Posix getPGrp interface
setPGid interface
, setPGrp -- Posix getPGrp interface
... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Posix/PosixAPI.hs | haskell | Posix exit interface
Posix getPGrp interface
Posix getPGrp interface
--------------------------------------------------------------------
TBD: Eventually, take out the kernel gate parameter by partial
--------------------------------------------------------------------
The fork interface makes a copy of the proces... | Copyright ( C ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module PosixAPI
fork interface
getPid interface
interface
getPGid interface
setPGid interface
getSid interface
) where
The interfaces , as seen by the user half
evaluation , or by a monad
imports
impo... |
5b40d286fea497beed8102985f92a5cb0b42ddba01e63ac0a3f855c208583fc4 | bazurbat/chicken-scheme | chicken-install.scm | ;;;; chicken-install.scm
;
Copyright ( c ) 2008 - 2016 , The CHICKEN Team
; 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 source code must retain the above copyright not... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/chicken-install.scm | scheme | chicken-install.scm
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 source code must retain the above copyright notice, this list of conditions and the following
disclaim... | Copyright ( c ) 2008 - 2016 , The CHICKEN Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE... |
5cf441c6a8f01739330eeef26cb60197ae6388d9ca2c7483f4feb141b90cb57e | monadbobo/ocaml-core | piecewise_linear.mli | open Std_internal
(** piece-wise linear interpolation from float-like types to float *)
(* todo: add to_float/of_float for y values for more generality? *)
module type Key = sig
type t
include Floatable with type t := t
include Sexpable with type t := t
include Binable with type t := t
end
module type S = s... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/piecewise_linear.mli | ocaml | * piece-wise linear interpolation from float-like types to float
todo: add to_float/of_float for y values for more generality? | open Std_internal
module type Key = sig
type t
include Floatable with type t := t
include Sexpable with type t := t
include Binable with type t := t
end
module type S = sig
type key
type t
include Sexpable with type t := t
include Binable with type t := t
val create : (key * float) list -> (t, s... |
29cf9a9247f179252e4ff6405141017f9306035a6361453527901b235a3ab84d | jwiegley/notes | NB.hs | -- Normalization by Evaluation
written by , January 2020
import Control.Monad.Fail as M
type Name = String
-- Term
Expr --eval- > Value --uneval- > NormalForm --compile-
data Expr
= Var Name
| App Expr Expr
| Lam Name Expr
deriving (Show)
data Value
= Closure Env Name Expr
| Neutral Neutral
... | null | https://raw.githubusercontent.com/jwiegley/notes/ca439123e4a1f1c2a53346ea7b98c479c150c12c/haskell/NB.hs | haskell | Normalization by Evaluation
Term
eval- > Value --uneval- > NormalForm --compile- |
written by , January 2020
import Control.Monad.Fail as M
type Name = String
data Expr
= Var Name
| App Expr Expr
| Lam Name Expr
deriving (Show)
data Value
= Closure Env Name Expr
| Neutral Neutral
deriving (Show)
data Neutral
= NVar Name
| NApp Neutral Value
deriving (Show)
type Env = [... |
de26c23ca2c0c7b032e6c0e6a430c23d19f7594b89742b36e48c5ed499357a28 | lisp-korea/sicp | ex-3-3-lispro.scm | ;;;;;;ex3.12
(define (append x y)
(if (null? x)
y
(cons (car x) (append (cdr x) y))))
(define (append! x y)
(set-cdr! (last-pair x) y)
x)
(define (last-pair x)
(if (null? (cdr x))
x
(last-pair (cdr x))))
(define x (list 'a 'b))
(define y (list 'c 'd))
(define z (append x y))
z
(cdr x... | null | https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch03/3.3/ex-3-3-lispro.scm | scheme | ex3.12
+---+---+ +---+---+
+-+-+---+ +-+-+---+ |
| | |
V V |
+---+ +---+ |
| a | | b | |
+---+ +---+ |
+---------------------+
| +---+---+ +---+---+
y->+->| ● | ●-+-->| ● | / |
+-+-+---+ +-+-+---+
| ... | (define (append x y)
(if (null? x)
y
(cons (car x) (append (cdr x) y))))
(define (append! x y)
(set-cdr! (last-pair x) y)
x)
(define (last-pair x)
(if (null? (cdr x))
x
(last-pair (cdr x))))
(define x (list 'a 'b))
(define y (list 'c 'd))
(define z (append x y))
z
(cdr x)
(define w ... |
4f02539ed037074a051e2847c8443064cf48d6ff1a84529bc6ad22602d002292 | robrix/Manifold | Trifoldable.hs | module Data.Trifoldable where
class Trifoldable t where
trifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (c -> m) -> t a b c -> m
| null | https://raw.githubusercontent.com/robrix/Manifold/3cc7a49c90b9cc7d1da61c532d0ee526ccdd3474/src/Data/Trifoldable.hs | haskell | module Data.Trifoldable where
class Trifoldable t where
trifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (c -> m) -> t a b c -> m
| |
fe35d02dfa5eec490e5cebf0ac03b79eb57b49834533517a6d8e06a41cb21304 | FranklinChen/hugs98-plus-Sep2006 | XmlNodeTy.hs | module Dotnet.System.Xml.XmlNodeTy where
import qualified Dotnet.System.Object
data XmlNode_ a
type XmlNode a = Dotnet.System.Object.Object (XmlNode_ a)
| null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/dotnet/lib/Dotnet/System/Xml/XmlNodeTy.hs | haskell | module Dotnet.System.Xml.XmlNodeTy where
import qualified Dotnet.System.Object
data XmlNode_ a
type XmlNode a = Dotnet.System.Object.Object (XmlNode_ a)
| |
fc96a48bbc2f07f5018fbad1c49bcec198adaeaa4e0a4f7dc8083a53f2e85749 | erlio/vmq_diversity | vmq_diversity_script.erl | Copyright 2016 Erlio GmbH Basel Switzerland ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, sof... | null | https://raw.githubusercontent.com/erlio/vmq_diversity/cdfb41c684971c617da55da43cd518c926839027/src/vmq_diversity_script.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2016 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_script).
-behaviour(gen_server).
-export([start_link/1,
reload/1,
stats/1,
... |
5fee7ab4a9746e6a8214d9175b2620c443924aa7973afd4779012e5d91d3e60e | herd/herdtools7 | command.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/2fbfd4e36c43eb4af4eb3076269402463e3b4c1e/internal/lib/command.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
2aeb60648069d831f88d9bb5876d9f7fd4f01cf71eb465fbd18665e5ce8bef59 | richhickey/clojure-contrib | test_complex_numbers.clj | ;; Test routines for complex-numbers.clj
by
last updated April 2 , 2009
Copyright ( c ) , 2008 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this
;; distri... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/test/clojure/clojure/contrib/test_complex_numbers.clj | clojure | Test routines for complex-numbers.clj
Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution. By using this software in any fashion, you are
agreeing to be bound by the terms of this license. You must not
remove this notice, or any other, from this software. |
by
last updated April 2 , 2009
Copyright ( c ) , 2008 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns clojure.contrib.test-complex-numbers
(:refer-clojure :exclude [+ - * / = < > <= >=])
(:use [clojure.test
:only (deftest is are run-tests)]
... |
37602f1a8bffff61e71b5cb9096a56a5cd0fbe3bd0e3c72a20dc44d98dbb9918 | may-liu/qtalk | asy_sql.erl | -module(asy_sql).
-export([start_link/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2,code_change/3]).
-export([update_readmark_by_id/2,update_user_muc_readmark/4,run_sql/2]).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-include("ejabberd.hrl").
-include("logger.... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/asy_sql.erl | erlang | -module(asy_sql).
-export([start_link/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2,code_change/3]).
-export([update_readmark_by_id/2,update_user_muc_readmark/4,run_sql/2]).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-include("ejabberd.hrl").
-include("logger.... | |
15bbd4bfb470558241634ef2c7d6af044116f8b8c3b23e9af74591cff9857774 | SRI-CSL/f3d | sysdef-cme.lisp | (in-package :cl-user)
(st:define-system "cme"
:required-systems
'(qffi common-symbols ev-pathnames lcl lisp-extensions ffi-extension
cvv math gl-objects more-gl-objects basic-gui transforms geographic-transforms
rpc-projections
terrain-models
model-io
radius-classes
)
:files '("cme... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-tk/cme/sysdef-cme.lisp | lisp | this should move to the gui subsystem
experiment with running FREEDIUS without any CME site-model I/O -- It works!
this should move to the gui subsystem | (in-package :cl-user)
(st:define-system "cme"
:required-systems
'(qffi common-symbols ev-pathnames lcl lisp-extensions ffi-extension
cvv math gl-objects more-gl-objects basic-gui transforms geographic-transforms
rpc-projections
terrain-models
model-io
radius-classes
)
:files '("cme... |
ae9c4c034327634cae2324e35abd66757e9849808ec7582ae2777c5a78b126f3 | ocaml/dune | decoder.mli | * Reading OCaml values from dune lang ones
open Stdune
type ast = Ast.t =
| Atom of Loc.t * Atom.t
| Quoted_string of Loc.t * string
| Template of Template.t
| List of Loc.t * ast list
type hint =
{ on : string
; candidates : string list
}
* Monad producing a value of type [ ' a ] by parsing an input ... | null | https://raw.githubusercontent.com/ocaml/dune/eb5379322c2326f9cd4c364a6a57c9dbcc2ed4c8/src/dune_sexp/decoder.mli | ocaml | * [parse parser context sexp] parse a S-expression using the following parser.
The input consist of a single S-expression. [context] allows to pass extra
information such as versions to individual parsers.
* Access to the context
* Return the location of the list currently being parsed.
* [a <|> b] is either... | * Reading OCaml values from dune lang ones
open Stdune
type ast = Ast.t =
| Atom of Loc.t * Atom.t
| Quoted_string of Loc.t * string
| Template of Template.t
| List of Loc.t * ast list
type hint =
{ on : string
; candidates : string list
}
* Monad producing a value of type [ ' a ] by parsing an input ... |
bf85e547c97599f6c1b0c39a1ab2585c55c94bdcf216b99abaaf4abd2d8b0a9a | reactiveml/rml | pure_fun.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/compiler/pure_fun.ml | ocaml | **
** | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
a9428a5ee2b384c47b40caa487ab8d0c5a5e0c14afefb5958f9030cbff0ae3d4 | draperlaboratory/VIBES | loader.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-utils/lib/loader.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
open Bap.Std
open Bap_core_theory
val image : ?backend:string -> string -> (image, KB.c... |
964d0898be13a20fe862fe77ea25178b804d3cad9afb8a0d12137a74166a12d6 | sweirich/trellys | Diff.hs | # LANGUAGE TupleSections , ViewPatterns #
{-# OPTIONS_GHC -Wall #-}
module Language.Trellys.Diff where
import Control.Applicative
import Control.Monad
import Control.Monad.Fail
import Language.Trellys.GenericBind
import Language.Trellys.OpSem
import Language.Trellys.Syntax
( diff a1 a2 ) returns a copy of a1 wh... | null | https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/zombie-trellys/src/Language/Trellys/Diff.hs | haskell | # OPTIONS_GHC -Wall #
every non-erased subexpression that differs from a2. This is used to print
more readable error messages.
Erased head constructors:
Non-erased head constructors
The rest | # LANGUAGE TupleSections , ViewPatterns #
module Language.Trellys.Diff where
import Control.Applicative
import Control.Monad
import Control.Monad.Fail
import Language.Trellys.GenericBind
import Language.Trellys.OpSem
import Language.Trellys.Syntax
( diff a1 a2 ) returns a copy of a1 where ( AHighlight ) has been... |
a6033a3301c708fb493a286826d05b960afe2b7fdf6c3e66ecf258bb6898b67a | seagreen/hjsonschema | TwoStep.hs | -- | Differences from @examples/Simple.hs@:
--
* We demonstrate how to do the validation step without IO by first
-- getting the references with 'D4.referencesViaFilesystem'.
--
* This shows how to write the starting schema in Haskell instead
-- of parsing it from JSON.
--
-- * This schema references other schemas.... | null | https://raw.githubusercontent.com/seagreen/hjsonschema/fde6e676f79f3f3320a558f20492ad816a2543a7/examples/TwoStep.hs | haskell | | Differences from @examples/Simple.hs@:
getting the references with 'D4.referencesViaFilesystem'.
of parsing it from JSON.
* This schema references other schemas. Previously we used
'fetchHTTPAndValidate' which fetched references over HTTP (though it
didn't matter because the last schema didn't actually have ... | * We demonstrate how to do the validation step without IO by first
* This shows how to write the starting schema in Haskell instead
module TwoStep where
import Protolude
import Data.Aeson (Value(..), toJSON)
import qualified Data.List.NonEmpty as NE
import qualified JSONSchema.Draft4 as D4
im... |
481d82d767ba5ba787a3ae67d23c5911b812b6b3eecce257882f97a6fdaacf73 | liyang/true-name | TrueName.hs | # LANGUAGE CPP #
-- | Refer to <-name/blob/master/test/sanity.hs these examples>.
module Unsafe.TrueName (summon, truename) where
import Prelude
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
import Control.Monad
import Data.List (nub)
import Language.Haskell.TH.Ppr
import Language.Haskell.TH.PprLib
... | null | https://raw.githubusercontent.com/liyang/true-name/cc3891544f4c520eaa012667df3e43bf6e6d2180/Unsafe/TrueName.hs | haskell | | Refer to <-name/blob/master/test/sanity.hs these examples>.
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
'Name' to 'reify'.
If no match is found or there is some ambiguity, 'summon' will fail with
a list of 'Name's found, along with the output of 'reify' for reference.
Suppose we are give... | # LANGUAGE CPP #
module Unsafe.TrueName (summon, truename) where
import Prelude
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
import Control.Monad
import Data.List (nub)
import Language.Haskell.TH.Ppr
import Language.Haskell.TH.PprLib
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Synta... |
8061ec6e5707fcb939d2a03621def3e2be35192f69f26b4821c043eb833e5fc0 | igrishaev/domic | init.clj | (ns domic.init
(:refer-clojure :exclude [< >])
(:require
[domic.util :as u]
[domic.engine :as en]
[domic.attr-manager :as am]
[domic.attributes :as at]
[domic.transact :as transact]
[domic.query-params :as qp]
[domic.query-builder :as qb]
[clojure.java.jdbc :as jdbc]
[honeysql.core :as s... | null | https://raw.githubusercontent.com/igrishaev/domic/92fef292eb58ab485332ea54a039dbd2e1cf6d06/src/domic/init.clj | clojure | todo
fix transaction macros
E
T
Attributes: indexed, refs, unique
AV | (ns domic.init
(:refer-clojure :exclude [< >])
(:require
[domic.util :as u]
[domic.engine :as en]
[domic.attr-manager :as am]
[domic.attributes :as at]
[domic.transact :as transact]
[domic.query-params :as qp]
[domic.query-builder :as qb]
[clojure.java.jdbc :as jdbc]
[honeysql.core :as s... |
ebd0ff3cc6dad398aff8333bc7d0c2a726cd461ea9094b97c80b72be565fc494 | scheme-live/live | list.scm | (import (scheme base) (live list unstable) (live test))
(test-begin "live/list/unstable")
(test-group "list<?"
(test-eqv #f (list<? < '() '()))
(test-eqv #f (list<? < '(1) '(1)))
(test-eqv #f (list<? < '(1 2) '(1 2)))
(test-eqv #f (list<? < '(1 1 2) '(1 1 2)))
(test-eqv #t (list<? < '() '(1)))
(test-eqv... | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/tests/list.scm | scheme | (import (scheme base) (live list unstable) (live test))
(test-begin "live/list/unstable")
(test-group "list<?"
(test-eqv #f (list<? < '() '()))
(test-eqv #f (list<? < '(1) '(1)))
(test-eqv #f (list<? < '(1 2) '(1 2)))
(test-eqv #f (list<? < '(1 1 2) '(1 1 2)))
(test-eqv #t (list<? < '() '(1)))
(test-eqv... | |
0bf667c0adff5decfa9609ab8410b651bcea5c362c5df5bf088b80e4ea59b712 | penpot/penpot | export.cljs | 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) KALEIDOS INC
(ns app.main.ui.shapes.export
"Components that generates penpot specific svg nodes with
exportation data. ... | null | https://raw.githubusercontent.com/penpot/penpot/507800ae4e19d1ec3a73813be35c8f084f7afd94/frontend/src/app/main/ui/shapes/export.cljs | clojure |
Copyright (c) KALEIDOS INC
Constraints
Style and filter are special properties so we need to save it otherwise will be indistingishible from
standard properties | 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 /.
(ns app.main.ui.shapes.export
"Components that generates penpot specific svg nodes with
exportation data. This xml nodes serves mainly to e... |
778b25c6bec98164139febe17de1eb506969ec036fae1c8375c4932fe75643fc | vraid/earthgen | river-vertices.rkt | #lang typed/racket
(require vraid/math
vraid/typed-gl
vraid/color
vraid/util
math/flonum
"planet-data.rkt")
(provide (all-defined-out))
(define init-buffer
(λ ([data : planet-data]
[transform : (FlVector -> (FlVector -> FlVector))]
[color : flcolor]
[b... | null | https://raw.githubusercontent.com/vraid/earthgen/208ac834c02208ddc16a31aa9e7ff7f91c18e046/renderer/river-vertices.rkt | racket | #lang typed/racket
(require vraid/math
vraid/typed-gl
vraid/color
vraid/util
math/flonum
"planet-data.rkt")
(provide (all-defined-out))
(define init-buffer
(λ ([data : planet-data]
[transform : (FlVector -> (FlVector -> FlVector))]
[color : flcolor]
[b... | |
e95757b00593d4c6305f47dc1ceebb98f4e81dc4cb52c17d10695f7a929dd4d4 | chordify/HarmTrace-Base | Intervals.hs | {-# OPTIONS_GHC -Wall #-}
--------------------------------------------------------------------------------
-- |
Module : HarmTrace . Base . Chord . Intervals
Copyright : ( c ) 2012 - -2016 , Chordify BV
License : LGPL-3
--
-- Maintainer :
-- Stability : experimental
-- Portab... | null | https://raw.githubusercontent.com/chordify/HarmTrace-Base/cd1a0651ec29f08b1d8328f20e8569cb358587d8/src/HarmTrace/Base/Chord/Intervals.hs | haskell | # OPTIONS_GHC -Wall #
------------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
Portability : non-portable
Summary: We can represent a chord as a set of intervals relative to the
root of the chord.
----------------------------------... | Module : HarmTrace . Base . Chord . Intervals
Copyright : ( c ) 2012 - -2016 , Chordify BV
License : LGPL-3
module HarmTrace.Base.Chord.Intervals (
icToInterval
, toIntervalClss
,
, toIntSet
, addToIntSet
, shToIntSet
) where
import HarmTrace.Base.Chord.Datatypes
import Harm... |
e084ed31004469032562ff08ef414ef1020552c1bc7a71339ce78e26d6d9d8b7 | texodus/forml | Backend.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE OverlappingInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #... | null | https://raw.githubusercontent.com/texodus/forml/aca10b060face7dcff6fce04909097f3849c104e/src/hs/lib/Forml/Javascript/Backend.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE GADTs # | # LANGUAGE QuasiQuotes #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE OverlappingInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeCl... |
4855b6ed9c91cc3485548da1bcc1444f55d6a2f8d184ce6975670ea6f6f26f5b | kind2-mc/kind2 | lustreDeclarations.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/d34694b4461323322fdcc291aa3c3d9c453fc098/src/lustre/lustreDeclarations.ml | ocaml | ***********************************
Auxiliary functions for contracts
***********************************
* Returns an option of the output state variables mentioned in the current
state of a lustre expression.
**********************************************************************
********************************... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... |
79aae2a22a3b73de608bbb9d7cbac3a48a3e04d6638637b0b5c7269f33296627 | BitGameEN/bitgamex | basho_bench_driver_cberl.erl | -module(basho_bench_driver_cberl).
-export([new/1,
run/4
]).
-include("basho_bench.hrl").
new(_Id) ->
PoolSize = basho_bench_config:get(cberl_pool_size, 5),
HostPort = basho_bench_config:get(cberl_hostport, "localhost:8091"),
UserName = basho_bench_config:get(cberl_username, ""),
P... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/cberl/bench/basho_bench_driver_cberl.erl | erlang | -module(basho_bench_driver_cberl).
-export([new/1,
run/4
]).
-include("basho_bench.hrl").
new(_Id) ->
PoolSize = basho_bench_config:get(cberl_pool_size, 5),
HostPort = basho_bench_config:get(cberl_hostport, "localhost:8091"),
UserName = basho_bench_config:get(cberl_username, ""),
P... | |
f0b3130bf8fb3ed2b4c5729fd6fa603a995a88653cee00624d1563bdce80c8be | albertoruiz/easyVision | nogui.hs | import Vision.GUI
import Image.Processing
main = do
putStrLn "Working without GUI..."
x <- runS camera $ arr (sumPixels.grayscale)
>>> arrL (zip [1..] . take 1000)
print x
| null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/tour/nogui.hs | haskell | import Vision.GUI
import Image.Processing
main = do
putStrLn "Working without GUI..."
x <- runS camera $ arr (sumPixels.grayscale)
>>> arrL (zip [1..] . take 1000)
print x
| |
1b6c6058a898f467acbc46db2e9b175d672d161885e81f79609b14cd1b2661ab | hachreak/minidb | minidb_coverage_fsm.erl | %%%-------------------------------------------------------------------
@doc minidb coverage fsm
%% @end
%%%-------------------------------------------------------------------
-module(minidb_coverage_fsm).
-author('Leonardo Rossi <>').
-behaviour(riak_core_coverage_fsm).
-define(TIMEOUT, 5000).
-define(N_VAL, 1).
... | null | https://raw.githubusercontent.com/hachreak/minidb/5b2da5ad39c8496376b5386d974614eaaa3f63cf/src/minidb_coverage_fsm.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
Application callbacks
we need to execute the command on all the running nodes,
not on all the nodes in the cluster
service used to identify the running nodes
and the module ... | @doc minidb coverage fsm
-module(minidb_coverage_fsm).
-author('Leonardo Rossi <>').
-behaviour(riak_core_coverage_fsm).
-define(TIMEOUT, 5000).
-define(N_VAL, 1).
-define(VNODE_COVERAGE, 1).
-export([
finish/2,
init/2,
process_results/2,
start_link/3
]).
start_link(ReqId, From, What) ->
error_logger:... |
b779adc60cbc53958f1c4c9c3d4d0a22b334f80cda8781edb21066a3bdf1516a | spurious/snd-mirror | tlet.scm | (define size 1000000)
(set! (*s7* 'safety) -1)
(set! (*s7* 'heap-size) (* 4 1024000))
(define symbols (make-vector size 'a symbol?))
(define e (inlet))
(define (make-symbols)
(do ((e1 e)
(syms symbols)
(i 0 (+ i 1)))
((= i size))
(varlet e1 (vector-set! syms i (symbol "a-" (number->string i)... | null | https://raw.githubusercontent.com/spurious/snd-mirror/8e7a643c840592797c29384ffe07c87ba5c0a3eb/tools/tlet.scm | scheme | -------------------------------------------------------------------------------- | (define size 1000000)
(set! (*s7* 'safety) -1)
(set! (*s7* 'heap-size) (* 4 1024000))
(define symbols (make-vector size 'a symbol?))
(define e (inlet))
(define (make-symbols)
(do ((e1 e)
(syms symbols)
(i 0 (+ i 1)))
((= i size))
(varlet e1 (vector-set! syms i (symbol "a-" (number->string i)... |
f58a1dd1ec98fc33bba19df6d28e733cd009aa5af756d86f574ead7103e6686f | jimweirich/sicp-study | ex1_04.scm | SICP 1.4
Exercise 1.4 . Observe that our model of evaluation allows for
;; combinations whose operators are compound expressions. Use this
;; observation to describe the behavior of the following procedure:
(define (a-plus-abs-b a b)
((if (> b 0) + -) a b))
;; ANSWER -----------------------------------------... | null | https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter1/ex1_04.scm | scheme | combinations whose operators are compound expressions. Use this
observation to describe the behavior of the following procedure:
ANSWER ------------------------------------------------------------
(a-plus-abs-b 2 3)
; First expansion
; Expand condition
(+ 2 3) ;; Substitute if
; Substitute the... | SICP 1.4
Exercise 1.4 . Observe that our model of evaluation allows for
(define (a-plus-abs-b a b)
((if (> b 0) + -) a b))
|
f8997ad9611ddb7ab9d334db7296496951f07261bbddce1971c235c5a54aaa6b | chenyukang/eopl | callneed-cases.scm |
(define test-list
'(
;; simple arithmetic
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
;; nested arithmetic
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
;; simple variables
( test - var-1 " x " 10 )
( test ... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch4/base/callneed-cases.scm | scheme | simple arithmetic
nested arithmetic
simple variables
simple unbound variables
simple conditionals
test dynamic typechecking
make sure that the test and both arms get evaluated
properly.
and make sure the other arm doesn't get evaluated.
simple let
check nested let and shadowing
simple applications
simple l... |
(define test-list
'(
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
( test - var-1 " x " 10 )
( test - var-2 " -(x,1 ) " 9 )
( test - var-3 " -(1,x ) " -9 )
(test-unbound... |
5911d8581e95bbf101a4ee99cc6ebf832caa53c12cf7faddad7949081d2ae7eb | timbertson/passe | server_config_unix.ml | let is_sandstorm () =
(try Unix.getenv "SANDSTORM" = "1" with Not_found -> false)
| null | https://raw.githubusercontent.com/timbertson/passe/467a79ea0cd7b08a97b52be3bd1307a3bdf55799/src/server/server_config_unix.ml | ocaml | let is_sandstorm () =
(try Unix.getenv "SANDSTORM" = "1" with Not_found -> false)
| |
af20ba1a4748a5b132c3b109130b34e5c29fd0c096b1b53c711527b7d3413e14 | facebook/flow | commandHandler.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/0c6685e04b82672ee53071b485c8e58ba5f6fe93/src/server/command_handler/commandHandler.ml | ocaml | Returns the result of calling `type_parse_artifacts`, along with a bool option indicating
* whether the cache was hit -- None if no cache was available, Some true if it was hit, and Some
* false if it was missed.
This means the cache was not available
* Catch exceptions, stringify them, and return Error. Otherwis... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
62944b7f1bf534f88937c659766867db46e2fc46580947e3b2a91d66f07252ab | AndrasKovacs/ELTE-func-lang | Notes05.hs | # language InstanceSigs #
import Control.Monad -- (ap)
5 . EA
State , tree , push / pop példák
-- Applicative intro
------------------------------------------------------------
( standard : Control . Monad . State )
newtype State s a = State {runState :: s -> (a, s)}
State : : ( s - > ( a , s ) ) - > ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/8de3c3513057d3f4a8b3cc6175fb34dc3a23c18d/2021-22-1/ea/Notes05.hs | haskell | (ap)
Applicative intro
----------------------------------------------------------
runState ( st : : State s a ) s : : ( a , s )
( instance - ok a newtype )
(bejárás: balról-jobbra mélységi)
pl: label (Node (Node (Leaf True) (Leaf True)) (Leaf False))
ahány , arról az Int - ről kéne kezdeni r !
( e... | # language InstanceSigs #
5 . EA
State , tree , push / pop példák
( standard : Control . Monad . State )
newtype State s a = State {runState :: s -> (a, s)}
State : : ( s - > ( a , s ) ) - > State s a
data Tree a = Leaf a | Node (Tree a) (Tree a) deriving Show
írjunk egy függvényt , bejárás sorren... |
b893160712a640334d0c965d3192bc64c90ba8b60672755f3c99dc3c118cc6e5 | garrigue/lablgtk | cputs.ml | (**************************************************************************)
Lablgtk - Examples
(* *)
(* This code is in the public domain. *)
(* You may f... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/cputs.ml | ocaml | ************************************************************************
This code is in the public domain.
You may freely copy parts of it in your application.
... | Lablgtk - Examples
open Printf
let print_msg msg = printf "%s" msg; flush stdout
let flush_stdout () = flush stdout
open Unix
let clear_func name () =
printf "(%s) Cleared\n" name;
flush_stdout ()
let get_func name (context: GObj.selection_context) ~info ~... |
06ad7742f7f843d73761b7bfb3408ad8c21e8506f054be127141258014276018 | ParaPhrase/skel | sk_reduce_decomp.erl | %%%----------------------------------------------------------------------------
@author < >
2012 University of St Andrews ( See LICENCE )
@headerfile " skel.hrl "
%%%
%%% @doc This module contains Reduce skeleton decomp logic.
%%%
%%% The decomp process splits an input into many parts using a developer-
%%% ... | null | https://raw.githubusercontent.com/ParaPhrase/skel/bf55de94e64354592ea335f4375f4b40607baf43/src/sk_reduce_decomp.erl | erlang | ----------------------------------------------------------------------------
@doc This module contains Reduce skeleton decomp logic.
The decomp process splits an input into many parts using a developer-
defined function, then hands it on to the tree of reducer processes to be
reduced.
@end
--------------------... | @author < >
2012 University of St Andrews ( See LICENCE )
@headerfile " skel.hrl "
-module(sk_reduce_decomp).
-export([
start/3
]).
-include("skel.hrl").
-type pid_pools() :: dict:dict().
-spec start(decomp_fun(), reduce_fun(), pid()) -> eos.
decompostion functions , ` Reduce ' and ` De... |
5940e4678cd0697c7727c12c3202fe0151ad7b47e572bc9561b76c6ba8bdd457 | 7max/log4cl | test-category-separator.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
Copyright ( c ) 2012 , . All rights reserved .
;;;
This file is licensed to You under the Apache License , Version 2.0
( the " License " ) ; you may not use this file except in compliance
with the License . You may obtain a copy of the Li... | null | https://raw.githubusercontent.com/7max/log4cl/d6293f9f1b6b8871b0a4417c4bb22afb9910b97f/tests/test-category-separator.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
you may not use this file except in compliance
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
lim... | Copyright ( c ) 2012 , . All rights reserved .
This file is licensed to You under the Apache License , Version 2.0
with the License . You may obtain a copy of the License at
distributed under the License is distributed on an " AS IS " BASIS ,
(log4cl-test:defsubsuite :log4cl-test.dots)
(in-package :log4cl-... |
4fc60c82126b9fb5a79ce9b2bcdeb23ba4527520e8c47f71e2039c5045abfe46 | rmculpepper/crypto | store-os.rkt | Copyright 2012
SPDX - License - Identifier : Apache-2.0
#lang racket/base
(require racket/lazy-require)
(lazy-require
[(submod "." unix) (openssl-trust-sources)]
[(submod "." macos) (macos-trust-anchors)]
[(submod "." windows) (win32-trust-anchors)])
(provide openssl-trust-sources
macos-trust-ancho... | null | https://raw.githubusercontent.com/rmculpepper/crypto/75138461a74d6b4bc26c65e981ccfba6b60719de/x509-lib/private/store-os.rkt | racket | ============================================================
References:
-
- -certificates
from distro to distro, and there is no one configuration that works with
and this code will override with better guesses.
----
Use path-string? filter to avoid {file,directory}-exists? error on "".
=====================... | Copyright 2012
SPDX - License - Identifier : Apache-2.0
#lang racket/base
(require racket/lazy-require)
(lazy-require
[(submod "." unix) (openssl-trust-sources)]
[(submod "." macos) (macos-trust-anchors)]
[(submod "." windows) (win32-trust-anchors)])
(provide openssl-trust-sources
macos-trust-ancho... |
31a4a35335a846ab4d490f823093d2d7fbcad600ea58d00e0175cd7bdcdb5782 | weblocks-framework/weblocks | poncy.lisp | (in-package :app)
(defwidget poncy (composite)
((width :accessor poncy-width :initarg :width)
(title :accessor poncy-title :initarg :title)))
(defmethod render-widget-body ((obj poncy) &rest args)
(with-html (:div :style "margin: 0 auto; text-align:center;"
(render-image (my-tab-image "tabs"... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/nunb/poncy.lisp | lisp | (clip-path) | (in-package :app)
(defwidget poncy (composite)
((width :accessor poncy-width :initarg :width)
(title :accessor poncy-title :initarg :title)))
(defmethod render-widget-body ((obj poncy) &rest args)
(with-html (:div :style "margin: 0 auto; text-align:center;"
(render-image (my-tab-image "tabs"... |
4568c0fa7b1243ae2b5db5d59450a053e3694902db58a32988bfe554831d8418 | day8/re-frame-10x | db.cljs | (ns todomvc.db
(:require [cljs.reader]
[cljs.spec.alpha :as s]
[re-frame.core :as re-frame]))
;; -- Spec --------------------------------------------------------------------
;;
This is a clojure.spec specification for the value in app - db . It is like a
;; Schema. See:
;;
;; The value in... | null | https://raw.githubusercontent.com/day8/re-frame-10x/d8dcb17e217449aba2cf64b9f843b0e9f86cfcb6/examples/todomvc/src/todomvc/db.cljs | clojure | -- Spec --------------------------------------------------------------------
Schema. See:
The value in app-db should always match this spec. Only event handlers
can change the value in app-db so, after each event handler
How is this done? Look in events.cljs and you'll notice that all handlers
have an "after"... | (ns todomvc.db
(:require [cljs.reader]
[cljs.spec.alpha :as s]
[re-frame.core :as re-frame]))
This is a clojure.spec specification for the value in app - db . It is like a
has run , we re - check app - db for correctness ( compliance with the ) .
(s/def ::id int?)
(s/def ::title string... |
df34e06e55a54a490f56906d1d82fd4adae08004c5df2f63210f3e9605a032aa | justinethier/cyclone | test.scm | (import (scheme base)
(scheme read)
(scheme write)
(srfi 18))
;; Spawn off a thread
;(let ((t (thread-start! (make-thread (lambda () (write 'a))))))
; ; Busy wait
; (letrec ((foo (lambda () (bar)))
; (bar (lambda () (foo))))
; (foo))
;)
(define tmp2 (make-mutex))
(mutex-lock... | null | https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/tests/debug/test.scm | scheme | Spawn off a thread
(let ((t (thread-start! (make-thread (lambda () (write 'a))))))
; Busy wait
(letrec ((foo (lambda () (bar)))
(bar (lambda () (foo))))
(foo))
)
A program to prove if cooperation is working, or if it
is blocked by another thread. The (read) causes the main
thread to block. The c... | (import (scheme base)
(scheme read)
(scheme write)
(srfi 18))
(define tmp2 (make-mutex))
(mutex-lock! tmp2)
(mutex-unlock! tmp2)
(set! tmp2 #f)
(define tmp '())
(thread-start!
(make-thread
(lambda ()
(letrec ((loop (lambda ()
(set! tmp (cons "cons" tmp))
... |
280915fea64192515b04417345f03e35e5d75e73ca3319f5fc10ed131fa71e72 | y2q-actionman/cl-json-pointer | traversal.lisp | (in-package :cl-json-pointer)
Switches
(defvar *traverse-treat-string-as-atom* t
;; I don't want to treat string as an array.
"If this is T, cl-json-pointer trests string as atom.")
(defvar *traverse-nil-set-to-last-method* :list
"Determines how to set to the last (by '-') of NIL.
- `:list' :: (Default) push... | null | https://raw.githubusercontent.com/y2q-actionman/cl-json-pointer/2273645ce6768d43ada6e580e30dbbf279db54b7/src/traversal.lisp | lisp | I don't want to treat string as an array.
Tools
Main traversal.
Atoms
FIXME: I think this should be error, but a kind of 'silent' option is required..
bottom case -- refers an unsupported object.
List
accepts `nil' as alist.
accepts `nil' as plist.
plist often uses `eq', but I use this.
TODO: should be more ... | (in-package :cl-json-pointer)
Switches
(defvar *traverse-treat-string-as-atom* t
"If this is T, cl-json-pointer trests string as atom.")
(defvar *traverse-nil-set-to-last-method* :list
"Determines how to set to the last (by '-') of NIL.
- `:list' :: (Default) pushes <value> as an ordinal list.
- `:alist' :: pu... |
57d2f31c14be7f5592cb50ccad22b7c8332061bf0fc55bceac464f9d5f5afce4 | keera-studios/keera-posture | MyIO.hs | module MyIO where
myPutStrLn :: String -> IO()
myPutStrLn s = appendFile "log" $ s ++ "\r\n"
| null | https://raw.githubusercontent.com/keera-studios/keera-posture/9de5095a4a10c0cb54f6191f1a448e96645193ae/src/MyIO.hs | haskell | module MyIO where
myPutStrLn :: String -> IO()
myPutStrLn s = appendFile "log" $ s ++ "\r\n"
| |
483d933faf7091e61ea9f64861c2e07c125c9708ce74c7954eb2cf7b9a58a541 | prg-titech/baccaml | interp.ml | open Asm
exception Not_supported of string
exception Un_implemented_instruction of string
type labels = (* function label for closures *)
(Id.l * int) list
type prog_with_label =
(* prog for interpreter *)
| ProgWithLabel of (Id.l * float) list * fundef list * t * labels
let register_size = 1000000
let heap =... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/base/interp.ml | ocaml | function label for closures
prog for interpreter
Log.debug (Printf.sprintf "Ans (%d)" res);
id_t + id_or_imm * x の番地から load | open Asm
exception Not_supported of string
exception Un_implemented_instruction of string
(Id.l * int) list
type prog_with_label =
| ProgWithLabel of (Id.l * float) list * fundef list * t * labels
let register_size = 1000000
let heap = ref 0
module Util = struct
let prog_with_label prog =
let rec create_... |
1a3fa206b1d2a5a32c0879abe9cc8c46a8cf55907da21454d032f398634546d9 | infinisil/nixbot | Karma.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Plugins.Karma (karmaPlugin) where
import Frontend.Types
import ... | null | https://raw.githubusercontent.com/infinisil/nixbot/e8695fd73c07bc115ee0dd3e7c121cd985c04c06/src/Plugins/Karma.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
TODO: Use a single constructor with givenBy being a Maybe (or some iso of it)
Needs to migrate the old data | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Plugins.Karma (karmaPlugin) where
import Frontend.Types
import Plugins
import Log
import Config
import Control.Monad.Reader
im... |
c443e6d011529fe213bbcee1864bdd246ad5cb0044f72996fc378d3aecfc2c3b | libguestfs/virt-v2v | parse_domain_from_vmx.mli | virt - v2v
* Copyright ( C ) 2017 - 2021 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_domain_from_vmx.mli | ocaml | * SSH URI
XXX Exporting these is a hack. | virt - v2v
* Copyright ( C ) 2017 - 2021 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 ... |
08586284661f801018e9eeb53b4ec5b40a96996a3a42b9a1afe3caf0cf132673 | s-expressionists/Eclector | package.lisp | (cl:defpackage #:eclector.concrete-syntax-tree
(:use
#:common-lisp)
(:shadow
#:read
#:read-preserving-whitespace
#:read-from-string)
;; Read protocol
(:export
#:read
#:read-preserving-whitespace
#:read-from-string)
;; Client class (can be used as a superclass)
(:export
#:cst-clien... | null | https://raw.githubusercontent.com/s-expressionists/Eclector/acd141db4efdbd88d57a8fe4f258ffc18cc47baa/code/concrete-syntax-tree/package.lisp | lisp | Read protocol
Client class (can be used as a superclass)
Wrapper CST classes and client mixins | (cl:defpackage #:eclector.concrete-syntax-tree
(:use
#:common-lisp)
(:shadow
#:read
#:read-preserving-whitespace
#:read-from-string)
(:export
#:read
#:read-preserving-whitespace
#:read-from-string)
(:export
#:cst-client)
(:export
#:wrapper-cst
#:target
#:definition-cst
... |
feed72eb41c21ff3be45488be3e936f218c6643262697cdf4286ec8f180cd7d2 | youjinbou/gmaths | quaternion.ml | (** basic Quaternion module *)
type vector = Vec4.Float.t
type mat4x4 = Matrix.mat4x4
type t = vector
type scalar = Vec4.Float.scalar
(* shortcut *)
module Fvec4 = Vec4.Float
module M = Matrix
(* unary operations *)
let of_tuple : (float * float * float * float) -> t = Fvec4.of_tuple
let to_tuple : t -> (float * f... | null | https://raw.githubusercontent.com/youjinbou/gmaths/1a507444071941a45b39f8c65e90c37427ea68a3/src/quaternion.ml | ocaml | * basic Quaternion module
shortcut
unary operations |
type vector = Vec4.Float.t
type mat4x4 = Matrix.mat4x4
type t = vector
type scalar = Vec4.Float.scalar
module Fvec4 = Vec4.Float
module M = Matrix
let of_tuple : (float * float * float * float) -> t = Fvec4.of_tuple
let to_tuple : t -> (float * float * float * float) = Fvec4.to_tuple
let of_xyz (x,y,z) : t =
le... |
a6552343b747c65900680c85f3f54de740c01ae45230d8149192f54da4f81d7e | bpiel/guildsman | chart.cljs | (ns guildsman.chart
(:require [re-frame.core :as rf]
[reagent.core :as r]
[re-com.core :as rc]))
(defn chart-state->bb-gen-map
[state {:keys [id config data]}]
(println "!!!!!!!!1 chart-state->bb-gen-map !!!!!!!!")
(clj->js (assoc config
:transition {:d... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/cljs/com/billpiel/guildsman/chart.cljs | clojure | (println "flush") | (ns guildsman.chart
(:require [re-frame.core :as rf]
[reagent.core :as r]
[re-com.core :as rc]))
(defn chart-state->bb-gen-map
[state {:keys [id config data]}]
(println "!!!!!!!!1 chart-state->bb-gen-map !!!!!!!!")
(clj->js (assoc config
:transition {:d... |
2f197200f42f823a6a80bc81a317e3a1fbe42b1d8a95e37a7d2cbcf506e05836 | atdixon/me.untethr.nostr-desk | timeline_new.clj | (ns me.untethr.nostr.timeline-new
(:require [cljfx.api :as fx]
[clojure.set :as set]
[me.untethr.nostr.domain :as domain]
[me.untethr.nostr.parse :as parse]
[me.untethr.nostr.util :as util]
[me.untethr.nostr.util-java :as util-java])
(:import (java.util Ha... | null | https://raw.githubusercontent.com/atdixon/me.untethr.nostr-desk/65b88e68659baa1842c91f2a539889f795b41078/src/me/untethr/nostr/timeline_new.clj | clojure | these field values are only ever mutated on fx thread
contains UITextNoteWrapper
NOTE: we're querying and subscribing to all of time but for now, for ux
todo we'll really wish to query/subscribe at an epoch and only update it on scroll etc.
consider: optimization--not having to create contact set each note
identi... | (ns me.untethr.nostr.timeline-new
(:require [cljfx.api :as fx]
[clojure.set :as set]
[me.untethr.nostr.domain :as domain]
[me.untethr.nostr.parse :as parse]
[me.untethr.nostr.util :as util]
[me.untethr.nostr.util-java :as util-java])
(:import (java.util Ha... |
e37e14502e0103d0263bde65b99e6b736b2fcd8193d1a9dadd6d512f0050c8aa | coast-framework/coast | migrations_test.clj | (ns coast.db.migrations-test
(:require [coast.db.migrations :refer [references col create-table]]
[coast.db.connection]
[clojure.test :refer [deftest testing is]]))
(deftest ^:migrations col-test
(testing "col with type and name but no options"
(is (= "name text" (col :text "name" {})))... | null | https://raw.githubusercontent.com/coast-framework/coast/f31c74c7a875207a717a407e52c6449a53da2c69/test/coast/db/migrations_test.clj | clojure | (ns coast.db.migrations-test
(:require [coast.db.migrations :refer [references col create-table]]
[coast.db.connection]
[clojure.test :refer [deftest testing is]]))
(deftest ^:migrations col-test
(testing "col with type and name but no options"
(is (= "name text" (col :text "name" {})))... | |
b2f6426c88d868f95600f90741a9d9fff373360f95ed5f028bdb8886cb19f1a2 | racket/redex | stlc-sub-5.rkt | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "replace all variables")
(define-rewrite bug5
(subst x x M_x)
==>
(subst x y M_x)
#:context (define-metafunction)
#:once-only)
(include/rewrite (lib "redex/exam... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/stlc-subst/stlc-sub-5.rkt | racket | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "replace all variables")
(define-rewrite bug5
(subst x x M_x)
==>
(subst x y M_x)
#:context (define-metafunction)
#:once-only)
(include/rewrite (lib "redex/exam... | |
6bc2685f84b01f02592c906a3eee135bda21397854d639a5a6a514f8231afe19 | NorfairKing/tickler | Types.hs | module Tickler.Server.Types where
import Database.Persist.Sqlite
import Import
import Servant
import Servant.Auth.Server
import Tickler.API
import Tickler.Server.OptParse.Types
type LF = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
data TicklerServerEnv = TicklerServerEnv
{ envLogFunc :: !LF,
envConnectionP... | null | https://raw.githubusercontent.com/NorfairKing/tickler/02a3a967b22b1552f1b54c41f052e07c101663ab/tickler-server/src/Tickler/Server/Types.hs | haskell | module Tickler.Server.Types where
import Database.Persist.Sqlite
import Import
import Servant
import Servant.Auth.Server
import Tickler.API
import Tickler.Server.OptParse.Types
type LF = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
data TicklerServerEnv = TicklerServerEnv
{ envLogFunc :: !LF,
envConnectionP... | |
23e6e404aa27bcca03e3a2cd091a88ab217ab5acb034b3e8548a8560cf323911 | blockapps/eth-pruner | Types.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
module Prune.Types where
import qualified Data.ByteString as B
import Data.Time
import Data.Time.Clock.POSIX
import Data.Wo... | null | https://raw.githubusercontent.com/blockapps/eth-pruner/513fcc884c93974a29b380ca80669dc0aebec125/src_backup_withthreads/Prune/Types.hs | haskell | # LANGUAGE OverloadedStrings # | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Prune.Types where
import qualified Data.ByteString as B
import Data.Time
import Data.Time.Clock.POSIX
import Data.Word
import Blockchain.Dat... |
38abac3986fbe8cd3f87a3d89661dc8f95a52ddcdefc8cf60683eb972d6e7c5c | racket/gui | test-suite-utils.rkt | #lang racket/base
(require (only-in mzscheme fluid-let)
(for-syntax racket/base)
"debug.rkt")
(provide
test-name
failed-tests
number-of-tests
;(struct eof-result ())
eof-result?
load-framework-automatically
shutdown-listener shutdown-mred mred-running?
send-sexp-to-mred send-sexp-to-mred... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/framework/tests/test-suite-utils.rkt | racket | (struct eof-result ())
sexp -> void
grabs the frontmost window, executes the sexp and waits for a new frontmost window
in order to make the eval below work right.
this means that gracket was closed
so we can restart it and try again.
assume tcp-error means app closed
low tech hygiene | #lang racket/base
(require (only-in mzscheme fluid-let)
(for-syntax racket/base)
"debug.rkt")
(provide
test-name
failed-tests
number-of-tests
eof-result?
load-framework-automatically
shutdown-listener shutdown-mred mred-running?
send-sexp-to-mred send-sexp-to-mred/separate-thread queue-se... |
456c3959899168d6ec49d9f043295eac852e71be0fd1e7d1ed5cc485ecb2fb4f | ucsd-progsys/liquidhaskell | BinahQuery.hs | {-@ LIQUID "--no-adt" @-}
{-@ LIQUID "--exact-data-con" @-}
{-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--ple" @-}
{-@ infixr === @-}
{-@ infixr >== @-}
@ infixr < = = @
# LANGUAGE Existenti... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/ple/pos/BinahQuery.hs | haskell | @ LIQUID "--no-adt" @
@ LIQUID "--exact-data-con" @
@ LIQUID "--higherorder" @
@ LIQUID "--no-termination" @
@ LIQUID "--ple" @
@ infixr === @
@ infixr >== @
@ reflect === @
@ reflect <== @
@ reflect >== @
@ filter :: f:(a -> ... |
@ infixr < = = @
# LANGUAGE ExistentialQuantification , KindSignatures , TypeFamilies , GADTs #
module BinahQuery where
import Prelude hiding (filter)
data PersistFilter = EQUAL | LE | GE
class PersistEntity record where
data EntityField record :: * -> *
@ data Filter record typ = Filter { : : EntityField r... |
f8f81471f617b1c98e3667caa68218ed767818f60c135992cc9d5be0109c73dd | albertov/hs-abci | Timestamp_Fields.hs | This file was auto - generated from google / protobuf / timestamp.proto by the proto - lens - protoc program .
# LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies ,
UndecidableInstances , GeneralizedNewtypeDeriving ,
MultiParamTypeClasses , FlexibleContexts , FlexibleInstances ,
PatternSynonyms , Ma... | null | https://raw.githubusercontent.com/albertov/hs-abci/c86ee133d5d11f30aca2a2903121c01001b48458/src/Proto/Vendored/Google/Protobuf/Timestamp_Fields.hs | haskell | This file was auto - generated from google / protobuf / timestamp.proto by the proto - lens - protoc program .
# LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies ,
UndecidableInstances , GeneralizedNewtypeDeriving ,
MultiParamTypeClasses , FlexibleContexts , FlexibleInstances ,
PatternSynonyms , Ma... | |
19fbe9246f312368c14d4e425b41aa0ce77f550ff15fd80db1fa739557298b0d | freizl/dive-into-haskell | tutorial7-solns.hs | Informatics 1 - Functional Programming
-- Tutorial 7
--
-- Solutions
--
-- Remember: there are many possible solutions, and if your solution produces
-- the right results, then it is (most likely) correct. However, if your code
-- looks far more complicated than these sample solutions, then you're probably
-- making ... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/lectures/informatics1-FP/tutorials/tutorial7/tutorial7-solns.hs | haskell | Tutorial 7
Solutions
Remember: there are many possible solutions, and if your solution produces
the right results, then it is (most likely) correct. However, if your code
looks far more complicated than these sample solutions, then you're probably
making things too difficult for yourself---try to keep it simple... | Informatics 1 - Functional Programming
import LSystem
import Test.QuickCheck
Exercise 1
1a . split
split :: Command -> [Command]
split Sit = []
split (cmd1 :#: cmd2) = split cmd1 ++ split cmd2
split cmd = [cmd]
1b . join
join :: [Command] -> Command
join = foldr (:#:) Sit
join' :: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.