_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 |
|---|---|---|---|---|---|---|---|---|
1b600d5c6d983ee944a37e887e2d3a7cba87761eed95bb7cbc57443c4fc07e85 | fakedata-haskell/fakedata | Job.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.Job where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.I... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Job.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Provider.Job where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Provider.TH
im... |
6b42629e13686dfe144872aa22bf0fadc5da1f012aea01209745f1d72750b6ad | avsm/ocaml-yaml | yaml_unix.ml | Copyright ( c ) 2018 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/avsm/ocaml-yaml/3f883dee5986a7f27db5b026bab265f844789d5e/unix/yaml_unix.ml | ocaml | Copyright ( c ) 2018 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | |
21fc517be4c556d5fc59deda28a4380f7f0907ad5f98564941c142df1b857d01 | emmabastas/elm-embed | Solve.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE OverloadedStrings #-}
module Type.Solve
( run
)
where
import Control.Monad
import qualified Data.Map.Strict as Map
import Data.Map.Strict ((!))
import qualified Data.Name as Name
import qualified Data.NonEmptyList as NE
import qualified Data.Vector as Vector
import qualified D... | null | https://raw.githubusercontent.com/emmabastas/elm-embed/c2c4f9dcc5c4f47480f728247ff7b4d0700d7476/compiler/src/Type/Solve.hs | haskell | # LANGUAGE OverloadedStrings #
RUN SOLVER
SOLVER
work in the next pool to localize header
introduce variables
run solver in next pool
pop pool
check that things went well
EXPECTATIONS TO VARIABLE
ERROR HELPERS
| Every variable has rank less than or equal to the maxRank of the pool.
This sorts variables into th... | # OPTIONS_GHC -Wall #
module Type.Solve
( run
)
where
import Control.Monad
import qualified Data.Map.Strict as Map
import Data.Map.Strict ((!))
import qualified Data.Name as Name
import qualified Data.NonEmptyList as NE
import qualified Data.Vector as Vector
import qualified Data.Vector.Mutable as MVector
impo... |
6bd7b253fdcd02b97e676fcc72d02162b2738236acb032c7e05a06edde6ee72e | kristianlm/chicken-gochan | signal-handler.scm | test gochan in combination with posix signal handlers
(cond-expand
(chicken-5
(import gochan test
(only srfi-18 thread-start! thread-sleep!)
(only (chicken process) process-signal process-fork)
(only (chicken process signal)
signal-handler signal/int signal/usr1 signal/usr2)
(only (chicken pro... | null | https://raw.githubusercontent.com/kristianlm/chicken-gochan/165d4280fe5d2fc48942885ba23005c4f1e6e153/tests/signal-handler.scm | scheme | TODO: find out why (it's hard)
sleep to make sure we keep order
avoid false-positive deadlock exceptions: | test gochan in combination with posix signal handlers
(cond-expand
(chicken-5
(import gochan test
(only srfi-18 thread-start! thread-sleep!)
(only (chicken process) process-signal process-fork)
(only (chicken process signal)
signal-handler signal/int signal/usr1 signal/usr2)
(only (chicken pro... |
eaa6ea03ab3569f7792f090770f675394b2427acfbd20b1c565a14c99a515d1e | dmitryvk/sbcl-win32-threads | room.lisp | ;;;; heap-grovelling memory usage stuff
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain a... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/room.lisp | lisp | heap-grovelling memory usage stuff
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
type format database
the name of this type
kind of type (how we determine length)
machines when I just ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(declaim (special sb!vm:*read-only-space-free-pointer*
sb!vm:*static-space-free-point... |
b9e772a3b42f26bd9d8a61d208ccd106a54c522e38c8562578bc77a4801d8d69 | jerith/chaocaml | json_utils.ml | let prettify_or_escaped str =
try Yojson.Basic.prettify str with
| _ -> String.escaped str
let member name json = Yojson.Basic.Util.member name json
let get_int name json =
member name json |> Yojson.Basic.Util.to_int
let get_float name json =
member name json |> Yojson.Basic.Util.to_number
let get_string n... | null | https://raw.githubusercontent.com/jerith/chaocaml/9489ee4386f9e97becebc5afab85cada6c5466ab/lib/json_utils.ml | ocaml | let prettify_or_escaped str =
try Yojson.Basic.prettify str with
| _ -> String.escaped str
let member name json = Yojson.Basic.Util.member name json
let get_int name json =
member name json |> Yojson.Basic.Util.to_int
let get_float name json =
member name json |> Yojson.Basic.Util.to_number
let get_string n... | |
e3381dc1fb3b76706e45c4cecc6b1059f37f8e169c075d5d3c207ae273c3e84c | Butanium/monte-carlo-tree-search-TSP | Launch_exploration_experiment.ml | let max_time = 30.
let exploration_policies =
MCTS.
[
Standard_deviation 0.01;
Standard_deviation 0.1;
Standard_deviation 0.5;
Standard_deviation 1.;
Min_spanning_tree 0.01;
Min_spanning_tree 0.1;
Min_spanning_tree 0.5;
Min_spanning_tree 1.;
Standard_deviatio... | null | https://raw.githubusercontent.com/Butanium/monte-carlo-tree-search-TSP/09f5c99addaa4a4dc9841eeede1cced48811b356/tests/Launch_exploration_experiment.ml | ocaml | let max_time = 30.
let exploration_policies =
MCTS.
[
Standard_deviation 0.01;
Standard_deviation 0.1;
Standard_deviation 0.5;
Standard_deviation 1.;
Min_spanning_tree 0.01;
Min_spanning_tree 0.1;
Min_spanning_tree 0.5;
Min_spanning_tree 1.;
Standard_deviatio... | |
eabc82094f076df37057fd7c97b3725545aaae517d5ed3c706c259f38e4bfe47 | nikita-volkov/rerebase | IO.hs | module GHC.Conc.IO
(
module Rebase.GHC.Conc.IO
)
where
import Rebase.GHC.Conc.IO
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/GHC/Conc/IO.hs | haskell | module GHC.Conc.IO
(
module Rebase.GHC.Conc.IO
)
where
import Rebase.GHC.Conc.IO
| |
5f943b5284589c70a3335a6e31834db21f0d6959419863cd8fb2749b8c4a9f7b | f-me/carma-public | CaseStatus.hs | # LANGUAGE TemplateHaskell #
module Carma.Model.CaseStatus where
import Data.Text
import Data.Typeable
import Data.Model
import Data.Model.View
import Data.Model.TH
import Carma.Model.Types()
import Carma.Model.PgTypes()
data CaseStatus = CaseStatus
{ ident
:: PK Int CaseStatus "Статус кейса"
, label
:... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/CaseStatus.hs | haskell | # LANGUAGE TemplateHaskell #
module Carma.Model.CaseStatus where
import Data.Text
import Data.Typeable
import Data.Model
import Data.Model.View
import Data.Model.TH
import Carma.Model.Types()
import Carma.Model.PgTypes()
data CaseStatus = CaseStatus
{ ident
:: PK Int CaseStatus "Статус кейса"
, label
:... | |
d662026b260396809ac4a6c32b6ad8db8eed00dc40e84c2a5abe4c2d92e1e63f | juxt/spin | alpha_test.clj | Copyright © 2020 - 2021 , JUXT LTD .
(ns juxt.spin.alpha-test
(:require
[clojure.test :refer [deftest is testing]]
[juxt.spin.alpha :as spin]))
(alias 'http (create-ns 'juxt.http.alpha))
(defn header [request header value]
(-> request
(assoc-in [:headers header] value)))
(defn request [method relu... | null | https://raw.githubusercontent.com/juxt/spin/faace930ed2ff05eea0d184eea4b62d00287b611/test/juxt/spin/alpha_test.clj | clojure | Copyright © 2020 - 2021 , JUXT LTD .
(ns juxt.spin.alpha-test
(:require
[clojure.test :refer [deftest is testing]]
[juxt.spin.alpha :as spin]))
(alias 'http (create-ns 'juxt.http.alpha))
(defn header [request header value]
(-> request
(assoc-in [:headers header] value)))
(defn request [method relu... | |
6672f21d9ff0b2b597e92eff49a05f211c18d7b29d1d1df169823d22158f049f | crinklywrappr/gooff | project.clj | (defproject gooff "0.0.4"
:description "KISS scheduling library. Inspired by Snooze"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-time "0.15.2"]]
:repl-options {:init-ns gooff.co... | null | https://raw.githubusercontent.com/crinklywrappr/gooff/a48f1b9adf4e14a190918aa7c9e1181d3f4bd866/project.clj | clojure | (defproject gooff "0.0.4"
:description "KISS scheduling library. Inspired by Snooze"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-time "0.15.2"]]
:repl-options {:init-ns gooff.co... | |
036b17d175fa1efc0267a15a363956c68c9ea0fae29cd27c6c99745afd73f09e | AdRoll/rebar3_format | indent_81.erl | -module(indent_81).
-format #{break_indent => 8,
paper => 50,
sub_indent => 1}.
-format #{inline_clause_bodies => true}.
-record(record,
{fields =
should:be(
indented_using:break_indent(8)),
including ::
those:that_use_typ... | null | https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/paper_and_ribbon/indent_81.erl | erlang | -module(indent_81).
-format #{break_indent => 8,
paper => 50,
sub_indent => 1}.
-format #{inline_clause_bodies => true}.
-record(record,
{fields =
should:be(
indented_using:break_indent(8)),
including ::
those:that_use_typ... | |
9ebfce15503ec264166bd8978bfe748c733795cf699c7c2094fd4a89bf246669 | BranchTaken/Hemlock | convertIntf.ml | (** Integer conversion function interfaces. Actual integer conversion function names replace
[_u_]/[_x_] with e.g. [_u256_]/[_i512_]. *)
open RudimentsInt0
(** Conversion function interface for a signed integer type of/to a larger signed integer type. *)
module type IX = sig
type t
(** Signed integer type. *)... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/df833ae60a056f355eb90235464310afb571c81b/bootstrap/src/basis/convertIntf.ml | ocaml | * Integer conversion function interfaces. Actual integer conversion function names replace
[_u_]/[_x_] with e.g. [_u256_]/[_i512_].
* Conversion function interface for a signed integer type of/to a larger signed integer type.
* Signed integer type.
* Signed integer type larger than {!type:t}.
* [trunc_of_x x] c... |
open RudimentsInt0
module type IX = sig
type t
type x
val trunc_of_x: x -> t
val extend_to_x: t -> x
val narrow_of_x_opt: x -> t option
val narrow_of_x_hlt: x -> t
end
module type IU = sig
type t
type u
val trunc_of_u: u -> t
* [ u ] converts the least sigificant bits of [ u ] to a { ! type... |
77241391d6b851e78a88b91ba76188e99f62ec80fbdf3394a919419b81b9a09c | spell-music/csound-expression | Color.hs | -- | A gallery of instruments (found in Csound catalog).
module Color where
import Csound.Base
bass (amp, cps) = sig amp * once env * osc (sig cps)
where env = eexps [1, 0.00001]
pluckSynth (amp, cps1, cps2) = 0.5 * sig amp * once env * pluck 1 (sig cps1) cps2 def 3
where env = eexps [1, 0.004]
marimbaSynth... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/examples/Color.hs | haskell | | A gallery of instruments (found in Csound catalog).
snow flakes
4pok | module Color where
import Csound.Base
bass (amp, cps) = sig amp * once env * osc (sig cps)
where env = eexps [1, 0.00001]
pluckSynth (amp, cps1, cps2) = 0.5 * sig amp * once env * pluck 1 (sig cps1) cps2 def 3
where env = eexps [1, 0.004]
marimbaSynth :: (D, D) -> Sig
marimbaSynth (amp, cps) = a6
where
... |
8d667edf28df7d8ff136b69db3218bc504a5b60b16ce1c3a99f04b918f552d78 | jpmonettas/flow-storm-debugger | core.clj | (ns flow-storm.fn-sampler.core
"Instrument entire namespaces for sampling fn args and return values.
The main entry point is flow-storm.fn-sampler.core/sample
When instrumented namespaces code runs, the sampler will collect fns
into a map {fully-qualified-fn-symbol-1 {:args-types #{...}
... | null | https://raw.githubusercontent.com/jpmonettas/flow-storm-debugger/5f5e7b8a370100594545c7f3a8a5fbe453b4c29c/src-inst/flow_storm/fn_sampler/core.clj | clojure | should be enough for entities
;
Stats ;;
;
----------------------------------------------------------- | (ns flow-storm.fn-sampler.core
"Instrument entire namespaces for sampling fn args and return values.
The main entry point is flow-storm.fn-sampler.core/sample
When instrumented namespaces code runs, the sampler will collect fns
into a map {fully-qualified-fn-symbol-1 {:args-types #{...}
... |
b3a00c77c35f8fececbde10bdf49bf7d3c137ababe1164273629b367a2d2248a | drym-org/qi | builtin.rkt | #lang racket/base
(provide cond-fn
compose-fn
root-mean-square
fact
ping
eratos
collatz
filter-map-fn
filter-map-values
double-list
double-values)
(require (only-in math sqr)
racket/list
racket/match)
(define ... | null | https://raw.githubusercontent.com/drym-org/qi/a8bd930eda09e07b8f44fd2e7100b7be96d446ea/qi-sdk/profile/builtin.rkt | racket | #lang racket/base
(provide cond-fn
compose-fn
root-mean-square
fact
ping
eratos
collatz
filter-map-fn
filter-map-values
double-list
double-values)
(require (only-in math sqr)
racket/list
racket/match)
(define ... | |
e2ad4ec47d59e9657e3a7b775749683239c7fece32c7b052f2d8ef1303637d04 | ulisesmac/Horarios-FC-UNAM | async_storage.cljs | (ns react-native-async-storage.async-storage
(:require
["@react-native-async-storage/async-storage" :default AsyncStorage]
[cljs.core.async :refer [go take!]]
[cljs.core.async.interop :refer [<p!]]
[cljs.reader :refer [read-string]]
[re-frame.core :as rf]))
(def set-item (.-setItem AsyncStorage))
(def... | null | https://raw.githubusercontent.com/ulisesmac/Horarios-FC-UNAM/428e3618ee2ff39a61c5c35017649597b1436fc3/src/react_native_async_storage/async_storage.cljs | clojure | (ns react-native-async-storage.async-storage
(:require
["@react-native-async-storage/async-storage" :default AsyncStorage]
[cljs.core.async :refer [go take!]]
[cljs.core.async.interop :refer [<p!]]
[cljs.reader :refer [read-string]]
[re-frame.core :as rf]))
(def set-item (.-setItem AsyncStorage))
(def... | |
717bd7bd28b55de420246b168ebfc1a646dc952124e523ad21858dbd78046bc0 | purescript/purescript | Common.hs | module Language.PureScript.Sugar.Names.Common (warnDuplicateRefs) where
import Prelude
import Protolude (ordNub)
import Control.Monad.Writer (MonadWriter(..))
import Data.Foldable (for_)
import Data.List (group, sort, (\\))
import Data.Maybe (mapMaybe)
import Language.PureScript.AST
import Language.PureScript.Error... | null | https://raw.githubusercontent.com/purescript/purescript/b71cb532c7d8d97505376cb528080ca3046615fe/src/Language/PureScript/Sugar/Names/Common.hs | haskell | |
Warns about duplicate values in a list of declaration refs.
Removes all unique elements from list
as well as one of each duplicate.
Example:
removeUnique [1,2,2,3,3,3,4] == [2,3,3]
Note that it may be more correct to keep ALL duplicates,
but that requires additional changes in how warnings are printed.
Exa... | module Language.PureScript.Sugar.Names.Common (warnDuplicateRefs) where
import Prelude
import Protolude (ordNub)
import Control.Monad.Writer (MonadWriter(..))
import Data.Foldable (for_)
import Data.List (group, sort, (\\))
import Data.Maybe (mapMaybe)
import Language.PureScript.AST
import Language.PureScript.Error... |
7bead202310fe9e281e72a45439cc7ac91b04c05244a6c0f203dd8f5dddcbd39 | AdRoll/rebar3_format | numbers.erl | -module(numbers).
-compile(export_all).
thing() ->
fun normal/0.
normal() ->
{4294967295, 341, 4681, -1.0e+1, 5.0e-2, 1.2312231234e+16}.
weird() ->
{1.00099999999999988987,
4294967295,
341,
4681,
-1.0e+1,
5.0e-2,
1.2312231234e+16,
1.19999999999999995559,
1.1999999... | null | https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/numbers.erl | erlang | -module(numbers).
-compile(export_all).
thing() ->
fun normal/0.
normal() ->
{4294967295, 341, 4681, -1.0e+1, 5.0e-2, 1.2312231234e+16}.
weird() ->
{1.00099999999999988987,
4294967295,
341,
4681,
-1.0e+1,
5.0e-2,
1.2312231234e+16,
1.19999999999999995559,
1.1999999... | |
36688c21cf60487966a4d4c46857e0169dec409a92b59daafb7d9bad1dcf1228 | pflanze/chj-schemelib | list-util-lazy.scm | Copyright 2010 - 2018 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require def... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/list-util-lazy.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
(cj-env-1 identity) cj-source, sigh
also see |the| in easy-1
can't use cj-inline yet (circular dependency)
improper-list ah, doesn't check for that case, oh well should be fine:
require that a list is give... | Copyright 2010 - 2018 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require define-macro-star
test
(test-lib-1 %try-error)
C
srfi-1
(fixnum inc dec)
(improper-list improper-length)
... |
4b8721b0671d7e8c20964712abb10712835acff2b1daa4d2b0459457a82df56b | LeventErkok/conjugateGradient | ConjugateGradient.hs | ---------------------------------------------------------------------------------
-- |
-- Module : Math.ConjugateGradient
Copyright : ( c )
-- License : BSD3
-- Maintainer :
-- Stability : stable
--
-- (The linear equation solver library is hosted at <>.
-- Comments, bug reports, and patches a... | null | https://raw.githubusercontent.com/LeventErkok/conjugateGradient/6bf8fe95f75e2725122dcbfa3b5f9db8640478a1/Math/ConjugateGradient.hs | haskell | -------------------------------------------------------------------------------
|
Module : Math.ConjugateGradient
License : BSD3
Maintainer :
Stability : stable
(The linear equation solver library is hosted at <>.
Comments, bug reports, and patches are always welcome.)
Sparse matrix linear-eq... | Copyright : ( c )
methods ( such as LU decomposition ) are way too expensive to be useful in practice .
in ASIC placement algorithms and when solving partial differential equations .
4x + y = 1
x + 3y = 2
> > > import Data . IntMap . Strict
> > > import System . Random
> > > let ... |
73c10ffdc397edc7151dead38f85d7374f7a898deca5b9d7591357c37594aead | Gbury/dolmen | intf.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
* External Typechecker interface
This module defines the external typechcker interface , that is ,
the interface of an instantiated typechecker .
This module defines the external typechcker interface, that is,
... | null | https://raw.githubusercontent.com/Gbury/dolmen/9453b8f2536e1b07d836001c0416a55a863fc869/src/typecheck/intf.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information
* Higher-order typechecking
* Control whether the typechecker should type
* Type arguments must be explicitly given in funciton applications
* Type arguments are not given in funciton applications, and instead
type annotat... |
* External Typechecker interface
This module defines the external typechcker interface , that is ,
the interface of an instantiated typechecker .
This module defines the external typechcker interface, that is,
the interface of an instantiated typechecker. *)
* { 1 Typechecker interface }
type ... |
d586dc36c80ad0a1ea2baa2d512a2a28c5f6d9409abb631508fe82828c5919d2 | coccinelle/coccinelle | lexer_c.mli | val pr2 : string -> unit
val pr2_once : string -> unit
exception Lexical of string
val tok : Lexing.lexbuf -> string
val eoltok : Lexing.lexbuf -> string
val tokinfo : Lexing.lexbuf -> Ast_c.info
val eoltokinfo : Lexing.lexbuf -> Ast_c.info
val eoftokinfo : Lexing.lexbuf -> Parser_c.token
val no_ifdef_mark : unit -> (i... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_c/lexer_c.mli | ocaml | val pr2 : string -> unit
val pr2_once : string -> unit
exception Lexical of string
val tok : Lexing.lexbuf -> string
val eoltok : Lexing.lexbuf -> string
val tokinfo : Lexing.lexbuf -> Ast_c.info
val eoltokinfo : Lexing.lexbuf -> Ast_c.info
val eoftokinfo : Lexing.lexbuf -> Parser_c.token
val no_ifdef_mark : unit -> (i... | |
1e998aebc1e0b5b052f85eea7e4f3572a3fb061b5ec1b378eb4e9948e1d742d3 | penpot/penpot | comments.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.viewer.comments
(:require
[app.common.geom.matrix :as gmt]
[app.common.geom.point :as ... | null | https://raw.githubusercontent.com/penpot/penpot/a85a65a554d79fe6cde0cf25c18302946cdb4385/frontend/src/app/main/ui/viewer/comments.cljs | clojure |
Copyright (c) KALEIDOS INC | 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.viewer.comments
(:require
[app.common.geom.matrix :as gmt]
[app.common.geom.point :as gpt]
[app.common.geom.shapes :... |
475b9c295cc1abeecdccd35b200d6d6e2bcbc842d4888e42462917440d0a9023 | TheClimateCorporation/lemur | core_test.clj | Copyright 2012 The Climate Corporation
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;you may not use this file except in compliance with the License.
;You may obtain a copy of the License at
;
; -2.0
;
;Unless required by applicable law or agreed to in writing, software
distributed under t... | null | https://raw.githubusercontent.com/TheClimateCorporation/lemur/00eb21b6f534ceefe354ab89042826188d156991/src/test/clj/lemur/core_test.clj | clojure |
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 permissio... | Copyright 2012 The Climate Corporation
distributed under the License is distributed on an " AS IS " BASIS ,
(ns lemur.core-test
(:use
lemur.core
[lemur.command-line :only [quit]]
[lemur.evaluating-map :only [evaluating-map]]
[lemur.common :only [eoval]]
midje.sweet
clojure.test
lemur.test... |
b98f181f2ae74ace04917db7ebc74e7c5e6b88b8752181f868a8ee35a4383d85 | sheyll/newtype-zoo | Complete.hs | -- | Indicate that something is `Complete`.
module NewtypeZoo.Complete
( Complete(Complete)
, _theComplete
, theComplete
) where
import Control.Comonad (Comonad)
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
impor... | null | https://raw.githubusercontent.com/sheyll/newtype-zoo/0e67717cbcd9233d9c26b6aacb4c6f8bba6ef5f7/src/NewtypeZoo/Complete.hs | haskell | | Indicate that something is `Complete`. | module NewtypeZoo.Complete
( Complete(Complete)
, _theComplete
, theComplete
) where
import Control.Comonad (Comonad)
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
import Data.Bits (Bits,FiniteBits... |
f11f5ba56670fd73ca2d318d5fc3482fac38c3f5a4befadaf53ea9c78a04dc7f | rowangithub/DOrder | 434_a-init.ml | (*
USED: PLDI2011 as a-init
*)
let make_array n i = assert (0 <= i && i < n); 0
let update i a x j :int= if j > i-1 && j <= i then x else a (j)
let rec init i n a =
if i >= n then a else init (i + 1) n (update i a 1)
let main k n i =
if k >= 0 && k <= 0 then
let x = init k n (make_array n) in
if 0 <= i &... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/434_a-init.ml | ocaml |
USED: PLDI2011 as a-init
|
let make_array n i = assert (0 <= i && i < n); 0
let update i a x j :int= if j > i-1 && j <= i then x else a (j)
let rec init i n a =
if i >= n then a else init (i + 1) n (update i a 1)
let main k n i =
if k >= 0 && k <= 0 then
let x = init k n (make_array n) in
if 0 <= i && i < n then
assert (x ... |
c57c44446daa29d0b85ab424bceabf0edf020d188fbafdbdb1338681a8c5487a | shayan-najd/NativeMetaprogramming | T11541.hs | module T11541 where
g :: Ord k => k -> v -> ()
g k v = ()
f x y =
let m = min x y
in g m foo
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T11541.hs | haskell | module T11541 where
g :: Ord k => k -> v -> ()
g k v = ()
f x y =
let m = min x y
in g m foo
| |
07a108c5d1c6a8fd4253a0d8be4eccf9e6bcde52d02b1d75075274e57a4d0787 | atolab/zenoh | routing.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-router/routing.ml | ocaml | TODO: Should decide if broker will ever send batched data
Should never happen |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... |
6fc0e8388a86a64f2818b72479630e3759b203500d86adba67df7d9e214c6d42 | headwinds/reagent-reframe-material-ui | demo-react-reselect.cljs | (ns example.demos.autocomplete.demo-react-reselect
(:require [reagent.core :as r]
["material-ui" :as mui]
[clojure.string :as string]
[example.demos.demo-text-field :refer [text-field]]
[cljsjs.react-select]))
State
(def model-default {
:query ""
:submitted fal... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/src/example/demos/autocomplete/demo-react-reselect.cljs | clojure | on enter it replaces the state with value from the select
return sample | (ns example.demos.autocomplete.demo-react-reselect
(:require [reagent.core :as r]
["material-ui" :as mui]
[clojure.string :as string]
[example.demos.demo-text-field :refer [text-field]]
[cljsjs.react-select]))
State
(def model-default {
:query ""
:submitted fal... |
7816f0cab80221d259afbfc87d4ef2f047364230aed9a086672f1e3eb44b88d1 | autolwe/autolwe | Abbrevs.ml | (* * Define some abbreviations *)
module L = BatList
module F = Format
module BL = Bolt.Logger
module O = BatOption
let hcomb = Hashcons.combine
let hcomb_l = Hashcons.combine_list
let hcomb_h = Hashcons.combine_hashes
| null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Util/Abbrevs.ml | ocaml | * Define some abbreviations |
module L = BatList
module F = Format
module BL = Bolt.Logger
module O = BatOption
let hcomb = Hashcons.combine
let hcomb_l = Hashcons.combine_list
let hcomb_h = Hashcons.combine_hashes
|
ad1ae8367d5d87975ad915c352929bb8715fd87ba8e5eda7aa3fd30ffb521b68 | pallet/pallet | debug.clj | (ns pallet.debug
"Helpers for debugging."
(:require
[clojure.tools.logging :as logging]
[pallet.core.session :refer [session]]))
(defn log-session
"A crate function that will log the session map at the debug level, using
the supplied format string.
(log-session session \"The session is %s\")"
... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/debug.clj | clojure | (ns pallet.debug
"Helpers for debugging."
(:require
[clojure.tools.logging :as logging]
[pallet.core.session :refer [session]]))
(defn log-session
"A crate function that will log the session map at the debug level, using
the supplied format string.
(log-session session \"The session is %s\")"
... | |
0944256087083bbc33e0c5c86b8bd939820cde09af610d60a47abfad7083755c | fukamachi/lack | response.lisp | (in-package :cl-user)
(defpackage lack.response
(:use :cl)
(:import-from :quri
:url-encode)
(:import-from :local-time
:format-timestring
:universal-to-timestamp
:+gmt-zone+)
(:export :response
:make-response
:finalize-response... | null | https://raw.githubusercontent.com/fukamachi/lack/fdcce2cbadd0e55e1f29eb18953c38946e30c32f/src/response.lisp | lisp | (in-package :cl-user)
(defpackage lack.response
(:use :cl)
(:import-from :quri
:url-encode)
(:import-from :local-time
:format-timestring
:universal-to-timestamp
:+gmt-zone+)
(:export :response
:make-response
:finalize-response... | |
bc49e3ea9e4c2d94cf937331623d66124824a2034bf1503054266f4d896e186b | blynn/compiler | mandelbrot.hs | A set first studied by Douady and .
infixr 9 .;
infixl 7 * , /;
infixl 6 + , -;
infixr 5 ++;
infix 4 == , <= , <;
infixr 0 $;
data Bool = True | False;
ife a b c = case a of { True -> b ; False -> c };
($) f x = f x;
(.) f g x = f (g x);
flip f x y = f y x;
fpair p = \f -> case p of { (,) x y -> f x y };
flst xs n c... | null | https://raw.githubusercontent.com/blynn/compiler/b9fe455ad4ee4fbabe77f2f5c3c9aaa53cffa85b/test/mandelbrot.hs | haskell | Arithmetic right shift. | A set first studied by Douady and .
infixr 9 .;
infixl 7 * , /;
infixl 6 + , -;
infixr 5 ++;
infix 4 == , <= , <;
infixr 0 $;
data Bool = True | False;
ife a b c = case a of { True -> b ; False -> c };
($) f x = f x;
(.) f g x = f (g x);
flip f x y = f y x;
fpair p = \f -> case p of { (,) x y -> f x y };
flst xs n c... |
1a27a2e09a242bc41488e5bd5c496b219c356211133dbb26a5be00ab5a7c0f13 | uim/uim | pregexp.scm | ;pregexp.scm
;Portable regular expressions for Scheme
;/~dorai
DOT neu DOT edu
Oct 2 , 1999
(define *pregexp-version* 20050502) ;last change
(define *pregexp-comment-char* #\;)
(define *pregexp-nul-char-int*
;can't assume #\nul maps to 0 because of Scsh
(- (char->integer #\a) 97))
(define *pregexp-return-c... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/pregexp.scm | scheme | pregexp.scm
Portable regular expressions for Scheme
/~dorai
last change
)
can't assume #\nul maps to 0 because of Scsh
modify this as needed
s[i] = \
must have at least something following \
s[i] = \
lbrack, colon already read
s[i-1] = left-paren
s[i-1] = {
returns (p q k) where s[k] = }
too restrictive for Sc... |
DOT neu DOT edu
Oct 2 , 1999
(define *pregexp-nul-char-int*
(- (char->integer #\a) 97))
(define *pregexp-return-char*
ca n't use # \return because it is n't R5RS
(integer->char
(+ 13 *pregexp-nul-char-int*)))
(define *pregexp-tab-char*
ca n't use # \tab because it is n't R5RS
(integer->char
(+ 9... |
705468d7f8bd185aef97220e9d4e71d279639add7eeef4e4d88d74ae199a984f | fission-codes/fission | Error.hs | module Fission.Web.Client.Error
( retryOnStatus
, checkStatus
) where
import Network.HTTP.Types.Status
import Servant.Client
import Fission.Prelude hiding (fromMaybe)
import Fission.Error
import Fission.Web.Client
retryOnStatus ::
( MonadLogger ... | null | https://raw.githubusercontent.com/fission-codes/fission/9f28864905c1f39421ec08b05f31d1498770fe38/fission-web-client/library/Fission/Web/Client/Error.hs | haskell | module Fission.Web.Client.Error
( retryOnStatus
, checkStatus
) where
import Network.HTTP.Types.Status
import Servant.Client
import Fission.Prelude hiding (fromMaybe)
import Fission.Error
import Fission.Web.Client
retryOnStatus ::
( MonadLogger ... | |
a5221205d8d6b8f546d3f41e9c4cecd098a2359287045ed2acc3577b2c1d4c18 | ryukinix/discrete-mathematics | Cuboid.hs | module Geometry.Cuboid
( volume
, area
) where
volume :: (Fractional a) => a -> a -> a -> a
volume a b c = rectangleArea a (b * c)
area :: (Fractional a) => a -> a -> a -> a
area a b c = 2 * rectangleArea a b
+ 2 * rectangleArea b c
+ 2 * rectangleArea a c
rectangleArea :: (Fraction... | null | https://raw.githubusercontent.com/ryukinix/discrete-mathematics/1f779e05822c094af33745e2dd3c9a35c6dfb388/src/x-haskell/Geometry/Cuboid.hs | haskell | module Geometry.Cuboid
( volume
, area
) where
volume :: (Fractional a) => a -> a -> a -> a
volume a b c = rectangleArea a (b * c)
area :: (Fractional a) => a -> a -> a -> a
area a b c = 2 * rectangleArea a b
+ 2 * rectangleArea b c
+ 2 * rectangleArea a c
rectangleArea :: (Fraction... | |
750d2e8e2dc2d630f1313cd2a7448eb4d932fb719e492e72754058f3c954d274 | dstarcev/stepic-haskell | Task8.hs | module Module1.Task8 where
doubleFact :: Integer -> Integer
doubleFact n = if n < 1 then 1 else n * doubleFact (n - 2)
| null | https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module1/Task8.hs | haskell | module Module1.Task8 where
doubleFact :: Integer -> Integer
doubleFact n = if n < 1 then 1 else n * doubleFact (n - 2)
| |
f48e91f871a426897ded4260a7ce2984b12393ed3dd79c5be8ec3cd522707ea8 | sealchain-project/sealchain | Sqlite.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# OPTIONS_GHC -fno - warn - orphans #
| Sqlite database for the ' TxMeta ' portion of the wallet kernel .
module Cardano.Wallet.Kernel.DB.Sqlite (
-- * Resource creation and acquisi... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/Kernel/DB/Sqlite.hs | haskell | * Resource creation and acquisition
* Clear all entries
* Basic API
* Unsafe functions
* testing
| A type modelling the underlying SQL database.
----------+----------------+--------------------+------------------+---------------------+-----------------+-----------------
----------+----------------+--------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# OPTIONS_GHC -fno - warn - orphans #
| Sqlite database for the ' TxMeta ' portion of the wallet kernel .
module Cardano.Wallet.Kernel.DB.Sqlite (
newConnection
, closeMetaDB
... |
d9374cb93633257e34569d22c258fd82858d52cb74e333d85d9f76e7e1214075 | audreyt/openafp | Instances.hs |
module OpenAFP.Prelude.Instances where
import OpenAFP.Types
import OpenAFP.Records
import OpenAFP.Internals
import OpenAFP.Prelude.InstanceT
import OpenAFP.Prelude.InstancePTX
import OpenAFP.Prelude.InstanceAFP
import qualified Data.ByteString as S
instance Rec T_ where
recSizeOf c = 1 + (S.length $ packChunk c)
... | null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Prelude/Instances.hs | haskell |
module OpenAFP.Prelude.Instances where
import OpenAFP.Types
import OpenAFP.Records
import OpenAFP.Internals
import OpenAFP.Prelude.InstanceT
import OpenAFP.Prelude.InstancePTX
import OpenAFP.Prelude.InstanceAFP
import qualified Data.ByteString as S
instance Rec T_ where
recSizeOf c = 1 + (S.length $ packChunk c)
... | |
2d53b54cbc427d19aaab111e4d555b195828c5fae68fc68ffb4b98e65b551688 | scarvalhojr/haskellbook | section28.9.hs |
import Criterion.Main
import Control.Monad (replicateM_)
import qualified System.IO as SIO (readFile)
import qualified Data.Text as T (Text)
import qualified Data.Text.Lazy as TL (Text)
import qualified Data.Text.IO as TIO (readFile, putStrLn)
import quali... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter28/section28.9.hs | haskell | Compile with:
ghc -prof -rtsopts -O2 section28.9.hs
Run with:
./section28.9 +RTS -hc > /dev/null
Produce heap usage graph with:
hp2ps -c section28.9.hp |
import Criterion.Main
import Control.Monad (replicateM_)
import qualified System.IO as SIO (readFile)
import qualified Data.Text as T (Text)
import qualified Data.Text.Lazy as TL (Text)
import qualified Data.Text.IO as TIO (readFile, putStrLn)
import quali... |
1dbef565990436e7df910f228c133e26111cb0dc574680d8bf96c41fa3dae08a | simonmar/parconc-examples | ThreadPool.hs | module ThreadPool where
import Control.Concurrent
import Control.Exception
import Control.Monad
import Text.Printf
< < ThreadPool
data ThreadPool = ThreadPool [ThreadId] (Chan (IO ()))
newThreadPool :: Int -> IO ThreadPool
newThreadPool n = do
c <- newChan
tids <- replicateM n $ forkIO (worker c)
return (Thr... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/ThreadPool.hs | haskell | >> | module ThreadPool where
import Control.Concurrent
import Control.Exception
import Control.Monad
import Text.Printf
< < ThreadPool
data ThreadPool = ThreadPool [ThreadId] (Chan (IO ()))
newThreadPool :: Int -> IO ThreadPool
newThreadPool n = do
c <- newChan
tids <- replicateM n $ forkIO (worker c)
return (Thr... |
223c6d19a13f9815bad855613f1c156d10c813dc8f03c85cd298b570eabc726c | nicwest/vertcyl | switches.clj | (ns vertcyl.switches
(:require [scad-clj.model :refer [cube rotate translate union]]
[scad-clj.scad :refer [write-scad]]))
(def mx-cutter
(let [extra (cube 3.5 15.6 15.6)
angle (/ Math/PI 2)]
(union
(cube 14 14 14)
(translate [4.0 0 0] extra)
(translate [-4.0 0 0] ex... | null | https://raw.githubusercontent.com/nicwest/vertcyl/5719d6daa51bccfed6f19463770791606b1ee161/src/vertcyl/switches.clj | clojure | (ns vertcyl.switches
(:require [scad-clj.model :refer [cube rotate translate union]]
[scad-clj.scad :refer [write-scad]]))
(def mx-cutter
(let [extra (cube 3.5 15.6 15.6)
angle (/ Math/PI 2)]
(union
(cube 14 14 14)
(translate [4.0 0 0] extra)
(translate [-4.0 0 0] ex... | |
153a8c4f6c7ed3b57ca73eddd21ff2118aa113aee4ec9990dff73ad84faa3538 | fdlk/advent-2019 | day22.clj | (ns advent-2019.day22
(:require [advent-2019.core :refer [lines parse-int]]))
(def deck-size 10007)
(defn parse
[line]
(let [cut-match (re-matches #"cut (-?\d+)" line)
deal-match (re-matches #"deal with increment (\d+)" line)]
(if (= line "deal into new stack")
[:deal-stack]
(if (some? c... | null | https://raw.githubusercontent.com/fdlk/advent-2019/e7496448f9b67a550ac091f0df24d9890f437766/src/advent_2019/day22.clj | clojure | (ns advent-2019.day22
(:require [advent-2019.core :refer [lines parse-int]]))
(def deck-size 10007)
(defn parse
[line]
(let [cut-match (re-matches #"cut (-?\d+)" line)
deal-match (re-matches #"deal with increment (\d+)" line)]
(if (= line "deal into new stack")
[:deal-stack]
(if (some? c... | |
d4e60def3d8e769d9cfdee3d69d85f6e1db8eee40052779b4de8f49befdb313b | basho/machi | machi_chain_repair.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You... | null | https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/src/machi_chain_repair.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
866f69e8ad89085353635ec33a6b38bb9ddd6c55ba8af2e3d20eac26030c08df | xapi-project/message-switch | v6_cli.ml | (* Licensing CLI *)
module Cmds = V6_interface.RPC_API (Cmdlinergen.Gen ())
let version_str description =
let maj, min, mic = description.Idl.Interface.version in
Printf.sprintf "%d.%d.%d" maj min mic
let default_cmd =
let doc =
String.concat ""
[
"A CLI for the V6d API. This allows scripting... | null | https://raw.githubusercontent.com/xapi-project/message-switch/1d0d1aa45c01eba144ac2826d0d88bb663e33101/xapi-idl/v6/v6_cli.ml | ocaml | Licensing CLI |
module Cmds = V6_interface.RPC_API (Cmdlinergen.Gen ())
let version_str description =
let maj, min, mic = description.Idl.Interface.version in
Printf.sprintf "%d.%d.%d" maj min mic
let default_cmd =
let doc =
String.concat ""
[
"A CLI for the V6d API. This allows scripting of the licensing da... |
9c7b66ed365356cfcfcfba046f840361e6a80ed840706e48e02e43009eb9ffa5 | CryptoKami/cryptokami-core | Main.hs | # LANGUAGE QuasiQuotes #
module Main ( module Main ) where
import Universum
import Control.Monad (forM)
import Data.List (intersperse)
import Data.Text (Text)
import Data.Version (showVersion)
import NeatInterpolation (text)
import Options.Applica... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/tools/src/cli-docs/Main.hs | haskell | | We run executable to get its help info.
| Top section for Markdown chapter.
-
-
THIS IS AUTOGENERATED CHAPTER. DO NOT CHANGE IT MANUALLY! -->
-------------------- | # LANGUAGE QuasiQuotes #
module Main ( module Main ) where
import Universum
import Control.Monad (forM)
import Data.List (intersperse)
import Data.Text (Text)
import Data.Version (showVersion)
import NeatInterpolation (text)
import Options.Applica... |
af451e30e415063f4d189fba198a45790229ca0eede119f32e61c56eeefbebd7 | zxymike93/SICP | 411.rkt | #lang sicp
;; env => (frame frame frame '())
(define the-empty-env '())
;; frame env -> env
(define (extend-env frame env)
(cons frame env))
;; env -> frame
(define (first-frame env)
(car env))
;; env -> (frame frame frame ...)
(define (rest-frames env)
(cdr env))
;; (syb syb syb ..) (num num num ..) -> fram... | null | https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter4/411.rkt | racket | env => (frame frame frame '())
frame env -> env
env -> frame
env -> (frame frame frame ...)
(syb syb syb ..) (num num num ..) -> frame
(make-frame '(x y z) '(1 2 3))
frame -> (syb num)
frame -> ((syb num) (syb num) ..)
(syb num) -> syb
(syb num) -> num
(lookup-variable-value <var> <env>) -> 返回对应的 val / false... | #lang sicp
(define the-empty-env '())
(define (extend-env frame env)
(cons frame env))
(define (first-frame env)
(car env))
(define (rest-frames env)
(cdr env))
> > > ( ( x . 1 ) ( y . 2 ) ( z . 3 ) )
(define (make-frame vars vals)
(define (make-kv vars vals)
(if (null? vars)
'()
(let... |
dc1932cc29aaf639d733b9b3bf45613f5c284f262edfed263127b2b2d83cc1d0 | BillHallahan/G2 | M02.hs | {-@ LIQUID "--no-termination" @-}
module M2 (main) where
data Peano = Succ Peano | Nil
@ main : : Peano - > { b : | b } @
main :: Peano -> Bool
main xs =
case while xs cond loop (1 - 0, 0, 0, 0) of
(z, x, y, w) -> x == y
while :: Peano -> (Peano -> a -> Bool) -> (a -> a) -> a -> a
while ys pred body x ... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/CompareVerified/M02.hs | haskell | @ LIQUID "--no-termination" @
@ cond :: Peano -> (Int, Int, Int, Int) -> Bool @ |
module M2 (main) where
data Peano = Succ Peano | Nil
@ main : : Peano - > { b : | b } @
main :: Peano -> Bool
main xs =
case while xs cond loop (1 - 0, 0, 0, 0) of
(z, x, y, w) -> x == y
while :: Peano -> (Peano -> a -> Bool) -> (a -> a) -> a -> a
while ys pred body x = if pred ys x then while (peanoTa... |
0a4811e08fbe33dbea0eca66fef306de3c0056189cb6385160e75fc2a31418ec | CRogers/obc | gUtil.ml | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/lablgtk/gUtil.ml | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
d7eaf651eb428562a6e795cff6a2706fb81abbbd60e972160bd7275387ac11b1 | dakk/caravand-fullnode | rpc.mli | (* RPC api interface *)
open Blockchain
open Network
open Utils
type t
val init : Config.rpc -> Chain.t -> Net.t -> t
val loop : t -> unit
val shutdown : t -> unit
| null | https://raw.githubusercontent.com/dakk/caravand-fullnode/72735bf380812aea32ba0d3d4aa671f741cdaecb/src/api/rpc.mli | ocaml | RPC api interface | open Blockchain
open Network
open Utils
type t
val init : Config.rpc -> Chain.t -> Net.t -> t
val loop : t -> unit
val shutdown : t -> unit
|
0ed46302f81d6e10ade156f9f20bb9240ed4717ddb6fafd84faa8a35cb0a77b7 | hipsleek/hipsleek | gLogViewWindow.ml | #include "xdebug.cppo"
(**/**)
open GUtil.SourceUtil
(**/**)
class log_view_window ?(title="Log") log () =
let tag_results = "results" in
let tag_current = "current" in
let win = GWindow.window
~title
~height:600 ~width:850
~allow_shrink:true
() in
object (self)
inherit GWindow.wind... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/gLogViewWindow.ml | ocaml | */*
*/*
set event handlers
****************
* Public methods
* **************
clear_callback ();
*****************
* Private methods
* ***************
clear current highlight
search
update current state and highlight all results
get next pos and it's iter
scroll to and highlight it
... | #include "xdebug.cppo"
open GUtil.SourceUtil
class log_view_window ?(title="Log") log () =
let tag_results = "results" in
let tag_current = "current" in
let win = GWindow.window
~title
~height:600 ~width:850
~allow_shrink:true
() in
object (self)
inherit GWindow.window win#as_window... |
6a890b05787361583c0eae1cecf9504e79d51a2ae40375387c7552c8bcc2cd71 | racket/racket7 | define-et-al.rkt |
;;----------------------------------------------------------------------
-define , when , unless , let / ec , define - struct
(module define-et-al '#%kernel
(#%require (for-syntax '#%kernel "stx.rkt" "qq-and-or.rkt"
"member.rkt" "cond.rkt"))
;; No error checking here, because these ... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/racket/private/define-et-al.rkt | racket | ----------------------------------------------------------------------
No error checking here, because these macros merely help
us write macros before the real define and define-syntax
generates the call to `make-struct-type'
define-struct |
-define , when , unless , let / ec , define - struct
(module define-et-al '#%kernel
(#%require (for-syntax '#%kernel "stx.rkt" "qq-and-or.rkt"
"member.rkt" "cond.rkt"))
(define-syntaxes (-define -define-syntax)
(let ([here (quote-syntax here)])
(let ([mk-define
(lamb... |
814040010f593bc80af2ebbf93043e9876dc38e0236fff60de00cb4731ad47c7 | sdiehl/write-you-a-haskell | Check.hs | module Check (
check,
checkTop,
TypeError(..)
) where
import Syntax
import Control.Monad.Except
import Control.Monad.Reader
type Env = [(Name, Type)]
extend :: (Name, Type) -> Env -> Env
extend xt env = xt : env
data TypeError
= Mismatch Type Type
| NotFunction Type
| NotInScope Name
type Check = Excep... | null | https://raw.githubusercontent.com/sdiehl/write-you-a-haskell/ae73485e045ef38f50846b62bd91777a9943d1f7/chapter5/stlc/Check.hs | haskell | module Check (
check,
checkTop,
TypeError(..)
) where
import Syntax
import Control.Monad.Except
import Control.Monad.Reader
type Env = [(Name, Type)]
extend :: (Name, Type) -> Env -> Env
extend xt env = xt : env
data TypeError
= Mismatch Type Type
| NotFunction Type
| NotInScope Name
type Check = Excep... | |
1f958024a949cb93dcfeed7dda504de02a4dc35755f4861d196b77ea50799c91 | maximedenes/native-coq | ascii_syntax.ml | (***********************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/syntax/ascii_syntax.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 - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Errors
open Ut... |
63dfcb37151d1c3e25122d3acba8059b6d60195fb24081efc3a6647e01b7e845 | ChrisTitusTech/ubuntu-titus | 210_effects-selection_glow-selection-shadow.scm | 210_effects-selection_glow-selection.scm
last modified / tested by [ gimphelp.org ]
08/26/2018 on GIMP 2.10.6
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0\s... | null | https://raw.githubusercontent.com/ChrisTitusTech/ubuntu-titus/f6f3ed4681cf4f8d0365c9d355e09fc0e2482799/dotconfig/GIMP/2.10/scripts/210_effects-selection_glow-selection-shadow.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
==================================================
... | 210_effects-selection_glow-selection.scm
last modified / tested by [ gimphelp.org ]
08/26/2018 on GIMP 2.10.6
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
it under the terms of the GNU General Public License as published by
the Free Software... |
67464ba33d41434b9982b0ae71eeed9683d87c833a90c6b524966a7752d08ff5 | Frama-C/Frama-C-snapshot | pp_lines.ml | This module can be used to force the printing of # lines inside
oracles . If you want to use it inside another test , please move
the EXECNOW that forces its compilation inside test_config , to
avoid race conditions .
oracles. If you want to use it inside another test, please move
the EXECNOW ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/syntax/pp_lines.ml | ocaml | This module can be used to force the printing of # lines inside
oracles . If you want to use it inside another test , please move
the EXECNOW that forces its compilation inside test_config , to
avoid race conditions .
oracles. If you want to use it inside another test, please move
the EXECNOW ... | |
531df865c1d8ad4a048a56958e1f80caeed26e09acad8097d3947dcb5ebb0329 | transient-haskell/transient | Indeterminism.hs | -----------------------------------------------------------------------------
--
-- Module : Transient.Indeterminism
-- Copyright :
License : MIT
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- | see <-parallel-non-determinism-transient-effects-iii>
--
----------------------... | null | https://raw.githubusercontent.com/transient-haskell/transient/301831888887fb199e9f9bfaba2502389e73bc93/src/Transient/Indeterminism.hs | haskell | ---------------------------------------------------------------------------
Module : Transient.Indeterminism
Copyright :
Maintainer :
Stability :
Portability :
| see <-parallel-non-determinism-transient-effects-iii>
----------------------------------------------------------------------... | License : MIT
module Transient.Indeterminism (
choose, choose', chooseStream, collect, collect', group, groupByTime, burst
) where
import Transient.Internals hiding (retry)
import Data.IORef
import Control.Applicative
import Data.Monoid
import Control.Concurrent
import Data.Typeable
import Co... |
ab26a11e2a01ebd5e62726c1903277893bf8be3561c552e5a2d62e52e3c66aa2 | lisp-mirror/cl-tar | v7.lisp | (in-package #:tar-simple-extract-test)
(para:define-test extract-v7
(with-temp-dir ()
(tar:with-open-archive (a (asdf:system-relative-pathname
:tar "test/v7.tar"))
(tar-simple-extract:simple-extract-archive a)
(para:is equal
"Hello, world!
"
... | null | https://raw.githubusercontent.com/lisp-mirror/cl-tar/b25b03cd47b4b4b308546e346b2c9ec2718f358f/test/simple-extract/v7.lisp | lisp | (in-package #:tar-simple-extract-test)
(para:define-test extract-v7
(with-temp-dir ()
(tar:with-open-archive (a (asdf:system-relative-pathname
:tar "test/v7.tar"))
(tar-simple-extract:simple-extract-archive a)
(para:is equal
"Hello, world!
"
... | |
ebf016a0c89d0cdc52842f7046bdd404467b2cfbf51b31a5d0b6d8855708ece7 | elarous/O2SN | cors.clj | (ns o2sn.cors
"Ring middleware for Cross-Origin Resource Sharing."
(:require [clojure.tools.logging :as log]
[clojure.set :as set]
[clojure.string :as str]))
; find-header / get-header have been copied from ring-core
to reduce dependency on external libs
(defn- find-header
"Looks up a ... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/server/main/o2sn/cors.clj | clojure | find-header / get-header have been copied from ring-core
...or else it's a predefined collection,
do a normal existence check.
(fn [resp]
(println "---- INPUT ----")
(prn resp)
(println "---- OUTPUT ----")
resp2)))
(def res1 (handle-cors (debug identity) request access-control add-access-co... | (ns o2sn.cors
"Ring middleware for Cross-Origin Resource Sharing."
(:require [clojure.tools.logging :as log]
[clojure.set :as set]
[clojure.string :as str]))
to reduce dependency on external libs
(defn- find-header
"Looks up a header in a Ring response (or request) case insensitively,
... |
e6d3ddab033c3f3294eec6ce7dc6b7ef500ad02ef7472679b323b92fa8d1f3eb | PascalLG/nubo-hs | WebService.hs | -----------------------------------------------------------------------------
Nubo Client Application
Copyright ( c ) 2017 ,
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the Software without... | null | https://raw.githubusercontent.com/PascalLG/nubo-hs/390212b73c31746f4ff03a3e341f92d657db0223/Client/src/WebService.hs | haskell | ---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished ... | Nubo Client Application
Copyright ( c ) 2017 ,
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ... |
aeaac4b15adc134ecad6d87f7ac5977372a418b42b06936fb76c737fa5fa8eab | mentat-collective/MathBox.cljs | build.clj | (ns build
"tools.build declarations for the mathbox.cljs library."
(:require [clojure.data.xml :as xml]
[clojure.tools.build.api :as b]
[clojure.tools.build.tasks.write-pom :as write-pom]))
(xml/alias-uri 'pom "")
(alter-var-root
#'write-pom/to-dep
(fn [old]
(fn [[_ {:keys [mvn/scope]... | null | https://raw.githubusercontent.com/mentat-collective/MathBox.cljs/665a0d5f01fb2ed9b0bfeee6f9ad679915f13465/build.clj | clojure | source for jar creation.
## Tasks | (ns build
"tools.build declarations for the mathbox.cljs library."
(:require [clojure.data.xml :as xml]
[clojure.tools.build.api :as b]
[clojure.tools.build.tasks.write-pom :as write-pom]))
(xml/alias-uri 'pom "")
(alter-var-root
#'write-pom/to-dep
(fn [old]
(fn [[_ {:keys [mvn/scope]... |
f73f4616e40b1a5c9c35c7af411ea1b439f3ddeef066592befc3d3d7cbc5709f | atlas-engineer/nyxt | history.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
(define-test toggle-history-mode ()
(let ((buffer (make-instance 'modable-buffer)))
(with-current-buffer buffer
(assert-true (enable-modes* 'nyxt/history-mode:history-mode buffer))
... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/history.lisp | lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
(define-test toggle-history-mode ()
(let ((buffer (make-instance 'modable-buffer)))
(with-current-buffer buffer
(assert-true (enable-modes* 'nyxt/history-mode:history-mode buffer))
... | |
7ad77d82343a601f68dd0f313c95a6085835f9bdef4e6b6408d8a1cccd0ae488 | gabebw/haskell-upenn-cs194 | HW01.hs | module HW01 where
import System.IO (readFile)
import Data.Char (isDigit)
Exercise 1
lastDigit :: Integer -> Integer
lastDigit n = n `mod` 10
dropLastDigit :: Integer -> Integer
dropLastDigit n = n `div` 10
Exercise 2
toRevDigits :: Integer -> [Integer]
toRevDigits n
| n <= 0 = []
| otherwise = lastDig... | null | https://raw.githubusercontent.com/gabebw/haskell-upenn-cs194/94a27807de77df43f38ad8d044666548e9c849d4/fall-2015/hw1-introduction/HW01.hs | haskell | Pattern matching
Return the list of moves to be performed to move the stack of
n discs from the peg a to peg b.
Personal bonus exercise:
"12-34" becomes "1234" and suitable
for passing to `luhn`
Is every line a valid credit card number? | module HW01 where
import System.IO (readFile)
import Data.Char (isDigit)
Exercise 1
lastDigit :: Integer -> Integer
lastDigit n = n `mod` 10
dropLastDigit :: Integer -> Integer
dropLastDigit n = n `div` 10
Exercise 2
toRevDigits :: Integer -> [Integer]
toRevDigits n
| n <= 0 = []
| otherwise = lastDig... |
2e98ff97a673a6b84af40fafef40d209c5b8f7530147e4dcb82e4712a7cd871d | portkey-cloud/edn-to-cfn | rds.clj | (ns portkey.cloudformation.rds
"AUTOGENERATED clojure.spec definitions"
(:require [clojure.spec.alpha]
[portkey.cloudformation]))
(do
(clojure.core/defmethod
portkey.cloudformation/resource-type-spec
:portkey.cloudformation.rds/event-subscription
[___19567__auto__]
(clojure.spec.alpha/keys
... | null | https://raw.githubusercontent.com/portkey-cloud/edn-to-cfn/7a3d247d35b7c4988c9b55634d03a008b87a2449/src/portkey/cloudformation/rds.clj | clojure | (ns portkey.cloudformation.rds
"AUTOGENERATED clojure.spec definitions"
(:require [clojure.spec.alpha]
[portkey.cloudformation]))
(do
(clojure.core/defmethod
portkey.cloudformation/resource-type-spec
:portkey.cloudformation.rds/event-subscription
[___19567__auto__]
(clojure.spec.alpha/keys
... | |
4ad1f4235c8550996f09014b13793cc835387752ae799cf22c2c350900c12423 | tlaplus/tlapm | action.ml |
* frontend / action.ml
* The action frontend is responsible on transforming obligations containing
* actions to purely first - order obligations
* 1 ) expend definitions of UNCHANGED , [ A]_v and < < A>>_v
* 2 ) distribute primes over constant operators
* 3 ) for a leibniz non - constant operator op ,... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/src/frontend/action.ml | ocaml | Note: we append "#prime" to get a variable name that is not in the
space of regular TLA identifers. It will be transcoded by
[Tla_parser.pickle] into a regular identifier without clash.
TODO:
since we cannot distinguish between leibniz and non-leibniz
operators, we treat all of them as ... |
* frontend / action.ml
* The action frontend is responsible on transforming obligations containing
* actions to purely first - order obligations
* 1 ) expend definitions of UNCHANGED , [ A]_v and < < A>>_v
* 2 ) distribute primes over constant operators
* 3 ) for a leibniz non - constant operator op ,... |
dcf6bf9522b9c57635100b4fe1efcaf20b223b58af89aa8f6f75e087ec5fbc9a | babashka/babashka | colors_test.clj | (ns clojure.term.colors-test
(:require [clojure.test :refer :all]
[clojure.term.colors :refer :all]))
(defn get-fn
"get function from symbol in clojure.term.colors package"
[fname]
(ns-resolve (the-ns 'clojure.term.colors)
(-> fname name symbol)))
(defn test-colors-from-map
"test p... | null | https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/clojure/term/colors_test.clj | clojure | (ns clojure.term.colors-test
(:require [clojure.test :refer :all]
[clojure.term.colors :refer :all]))
(defn get-fn
"get function from symbol in clojure.term.colors package"
[fname]
(ns-resolve (the-ns 'clojure.term.colors)
(-> fname name symbol)))
(defn test-colors-from-map
"test p... | |
75f538b3649322c80c57af4276a0a58881d9055e3b79352584ffb5b553cc5c29 | liebke/avout | transaction.clj | (ns avout.transaction
(:require [zookeeper :as zk]
[zookeeper.data :as data]
[zookeeper.util :as util]
[avout.locks :as locks]
[avout.config :as cfg]
[clojure.string :as s])
(:import (clojure.lang IRef)
(java.util Arrays TreeMap)
(jav... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/src/avout/transaction.clj | clojure | protocols
implementation
transaction states
; TODO
returnValue
client-handle
txid
startPoint
startTime
readPoint
commitPoint
values
sets
commutes
ensures
latch
retry-count
state | (ns avout.transaction
(:require [zookeeper :as zk]
[zookeeper.data :as data]
[zookeeper.util :as util]
[avout.locks :as locks]
[avout.config :as cfg]
[clojure.string :as s])
(:import (clojure.lang IRef)
(java.util Arrays TreeMap)
(jav... |
96bca6d240f811082723bb99ced560e32aac642e01fbfa3dc3638bda73ec372b | PDP-10/panda | backq.lsp | ;;; BACKQ -*-Mode:Lisp;Package:SI;Lowercase:T-*-
;;; *************************************************************************
* * * * * * * * * * * BACKQuote reader macro function * * * * * * * * * * * * * * * * * * * *
;;; *************************************************************************
... | null | https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/maclisp/backq.lsp | lisp | BACKQ -*-Mode:Lisp;Package:SI;Lowercase:T-*-
*************************************************************************
*************************************************************************
*************************************************************************
"READ" will cause the ` readm... | * * * * * * * * * * * BACKQuote reader macro function * * * * * * * * * * * * * * * * * * * *
* * ( c ) Copyright 1981 Massachusetts Institute of Technology * * * * * * * * * * * * *
NOTE WELL TWO WARNINGS :
1 ) comma is defined as a readmacro character all the time ,
not just within BACKQUOT... |
e150911941d3fe94239037af4b45c6505a8696a7cf738f1bed7f480e49c86185 | mbattyani/cl-typesetting | pprint.lisp | cl - typesetting copyright 2002 - 2021 see license.txt for the details
;;; You can reach me at or
;;; The homepage of cl-typesetting is here: -typesetting.html
(in-package #:typeset)
;;; This is a module to typeset Common Lisp code with some syntax coloring
The syntax coloring is too simple to be 100 % accura... | null | https://raw.githubusercontent.com/mbattyani/cl-typesetting/86eba981fc4254addebecf765578ec350d6e3b75/pprint.lisp | lisp | You can reach me at or
The homepage of cl-typesetting is here: -typesetting.html
This is a module to typeset Common Lisp code with some syntax coloring
Improvements welcomed!
do (add-symbol-decoration symbol decoration))
line))) | cl - typesetting copyright 2002 - 2021 see license.txt for the details
(in-package #:typeset)
The syntax coloring is too simple to be 100 % accurate :
(defparameter *pp-font-size* 9)
(defparameter *pp-default-decoration* '("courier" (0.0 0.0 0.0)))
(defparameter *pp-keyword-decoration* '("courier" (0.8 0.0 0.0... |
ee2a4f5745eb27f837563d5b4938004a9ca7fc0c0f9933a77b764678b4934987 | wildbit/archaeologist | git_test.clj | (ns archaeologist.git-test
(:require [clojure.test :refer :all]
[archaeologist.test-helper :refer :all]
[archaeologist.core :refer :all]
[archaeologist.git :refer :all]))
(declare ^:dynamic *repository*)
(use-fixtures :once (setup-fn *repository* #(open-repository "test/fixtures/g... | null | https://raw.githubusercontent.com/wildbit/archaeologist/61dbaf9bb4f221e5769cda75b846c939b84d7e56/test/archaeologist/git_test.clj | clojure | (ns archaeologist.git-test
(:require [clojure.test :refer :all]
[archaeologist.test-helper :refer :all]
[archaeologist.core :refer :all]
[archaeologist.git :refer :all]))
(declare ^:dynamic *repository*)
(use-fixtures :once (setup-fn *repository* #(open-repository "test/fixtures/g... | |
ceab0ecf8ebb210a231f3576a583f71ee5541c22df5cf7012383300c786c7c02 | rtrusso/scp | const.scm | (define foo 'bar)
(if 'foo
'baz
'zap)
| null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/const.scm | scheme | (define foo 'bar)
(if 'foo
'baz
'zap)
| |
21a6609097b50cb598705f0e5f9ca40295a3fff1c9ecc6d34022a2c207dc7fce | janestreet/async | test_async_quickcheck.ml | open! Core
open! Async
let trials = 5
let examples = [ "Example 1"; "Example 2"; "Example 3" ]
let generator = Quickcheck.Generator.return "Generated value"
let%expect_test "[~examples] are tested first" =
let%bind () =
Async_quickcheck.async_test ~trials ~examples generator ~f:(fun string ->
print_endlin... | null | https://raw.githubusercontent.com/janestreet/async/619938fa44738ad9fa5399901e89ca33ff665919/async_quickcheck/test/test_async_quickcheck.ml | ocaml | open! Core
open! Async
let trials = 5
let examples = [ "Example 1"; "Example 2"; "Example 3" ]
let generator = Quickcheck.Generator.return "Generated value"
let%expect_test "[~examples] are tested first" =
let%bind () =
Async_quickcheck.async_test ~trials ~examples generator ~f:(fun string ->
print_endlin... | |
e2dfaf515029bfd01c45407c8f957d04163377c9da63dd7b25a21d6faa28e32d | thepower/tpnode | hashqueue.erl | -module(hashqueue).
-export([new/0,
add/4,
remove/2,
pop/1,
get/2,
head/1
]).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
new() ->
{
queue:new(),
#{}
}.
add(Key, Timestamp, Value, {Q, H}) ->
{
queue:in({Key, Timestamp}... | null | https://raw.githubusercontent.com/thepower/tpnode/11b8bf67be72b4ceea5a75e387cc33dcd8ec1898/apps/tpnode/src/hashqueue.erl | erlang | -module(hashqueue).
-export([new/0,
add/4,
remove/2,
pop/1,
get/2,
head/1
]).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
new() ->
{
queue:new(),
#{}
}.
add(Key, Timestamp, Value, {Q, H}) ->
{
queue:in({Key, Timestamp}... | |
c00b9f6c8dcbf5d049e245e60d544eb463b1c005ab1e5e972b48fe3db27d7727 | RyanGlScott/text-show | Data.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
|
Module : Instances . Data . Data
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
' Arbitrary... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Instances/Data/Data.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
|
Module : Instances . Data . Data
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
' Arbitrary... | |
148ee038e56bc243f86f181d89ff58a9a53fe74dbd252f4bf35feaab1f78cbef | michiakig/sicp | ex-5.20.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 5 Section 3 Storage Allocation and Garbage Collection
Exercise 5.20
;; this is a bit crude
index 0 1 2 3 4 5
the-cars n1 p1 p1
the-cdrs n2 e0 p2
;; the free pointer will be p3
;; x will be p1, y will be p3
Exercise 5.21
;; a. Recur... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch5/ex-5.20.scm | scheme | Structure and Interpretation of Computer Programs
this is a bit crude
the free pointer will be p3
x will be p1, y will be p3
a. Recursive count-leaves:
b. Recursive count-leaves with explicit counter: | Chapter 5 Section 3 Storage Allocation and Garbage Collection
Exercise 5.20
index 0 1 2 3 4 5
the-cars n1 p1 p1
the-cdrs n2 e0 p2
Exercise 5.21
(define (count-leaves tree)
(cond ((null? tree) 0)
((not (pair? tree)) 1)
(else (+ (count-leaves (car tree))
(co... |
7b52bc48ca98e09e331eb02cbc9caa49e6a3c60b5a4b24181d34b063e86d566c | ocaml-multicore/ocaml-tsan | odoc_value.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/ocamldoc/odoc_value.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Name = Odoc_name
type t_value = {
val_name : Name.t ;
mutable val_info : Odoc_types.info op... |
10269b93e686a539a91f047afc8c7f307d4f1a5616c1ec278521227529709c51 | anmonteiro/anmonteiro.github.io | query.cljs | (ns om-next-routing.query
(:require [goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]))
(enable-console-print!)
(defmulti read om/dispatch)
(defmulti mutate om/dispatch)
(defmethod read :route/data
[{:keys [state] :as env} k _]
(let [st @state
route (fi... | null | https://raw.githubusercontent.com/anmonteiro/anmonteiro.github.io/c5400c2431576305e5ce3f2cdfb223b1ee893bde/assets/cljs/om_next_routing/query.cljs | clojure | (om/add-root! reconciler Root (gdom/getElement "app")) | (ns om-next-routing.query
(:require [goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]))
(enable-console-print!)
(defmulti read om/dispatch)
(defmulti mutate om/dispatch)
(defmethod read :route/data
[{:keys [state] :as env} k _]
(let [st @state
route (fi... |
1dc597369c69ab5a180f448983d65192f9238c59714014af0268923eae3e8ba0 | ocsigen/ocaml-eliom | bounds.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/basic-more/bounds.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Test bound checks with ocamlopt
let a = [| 0; 1; 2 |]
let trail = ref []
let test n =
let result =... |
e0b7611265320fd67a3f074d83b246ab6425c50d322921b328c3db573e46c23f | CloudI/CloudI | proper_dict.erl | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
%%% -------------------------------------------------------------------
Copyright 2010 - 2017 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it a... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/src/proper_dict.erl | erlang | -------------------------------------------------------------------
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITN... | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
Copyright 2010 - 2017 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Licens... |
2383cf99b017550fe86895e744562533471fa2c339b9d158e0aa586689ac99f5 | Decentralized-Pictures/T4L3NT | publisher.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_time_measurement/runtime/publisher.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
de1bb8d3dc0fb16f942cc4d59c8adb6e855ead9920316729cf4ab5db329ac63f | nuprl/gradual-typing-performance | bset-blocks-max-x.rkt | #lang racket/base
(provide blocks-max-x)
(require "data-block.rkt")
;; =============================================================================
;; Compute the maximum x coordinate;
;; if set is empty, return 0, the coord of the board's left edge.
;(: blocks-max-x (-> BSet Real))
(define (blocks-max-x bs)
(fo... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/tetris/untyped/bset-blocks-max-x.rkt | racket | =============================================================================
Compute the maximum x coordinate;
if set is empty, return 0, the coord of the board's left edge.
(: blocks-max-x (-> BSet Real)) | #lang racket/base
(provide blocks-max-x)
(require "data-block.rkt")
(define (blocks-max-x bs)
(foldr (λ (b
n )
(max (block-x b) n)) 0 bs))
|
7edfdfbbee5298bd8cbc93942cfd9eee441f0c01719d0f16d56fc9ed903b230a | landakram/kiwi-desktop | utils.cljs | (ns kiwi.test.utils)
(defn capture-into [atm]
(fn [arg]
(reset! atm arg)))
| null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/test/cljs/kiwi/utils.cljs | clojure | (ns kiwi.test.utils)
(defn capture-into [atm]
(fn [arg]
(reset! atm arg)))
| |
a81d8feb26ddee3b9aca12c3942276b73afccb4f81619c89620aa05946db5a87 | spectrum-finance/cardano-dex-backend | Traced.hs | module Spectrum.Executor.PoolTracker.Data.Traced
( Traced(..)
) where
import GHC.Generics
( Generic )
import Data.Aeson
( FromJSON, ToJSON )
import Ledger
( TxOutRef )
| State of an on - chain entity linked to a prev version of .
data Traced a = Traced
{ tracedState :: a
, prevTxOutRef :: TxOutRef
... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/47528f6a43124ab4f6849521d61dbb3fad476c19/amm-executor/src/Spectrum/Executor/PoolTracker/Data/Traced.hs | haskell | module Spectrum.Executor.PoolTracker.Data.Traced
( Traced(..)
) where
import GHC.Generics
( Generic )
import Data.Aeson
( FromJSON, ToJSON )
import Ledger
( TxOutRef )
| State of an on - chain entity linked to a prev version of .
data Traced a = Traced
{ tracedState :: a
, prevTxOutRef :: TxOutRef
... | |
5efbd174e667bc53fd54ff5897d5a8cdcfa715e33cf1b1666a0c9cef2a1a9adc | haskell/haskell-language-server | ImportUtils.hs | module Development.IDE.Plugin.Plugins.ImportUtils
( ImportStyle(..),
quickFixImportKind',
quickFixImportKind,
renderImportStyle,
unImportStyle,
importStyles,
QualifiedImportStyle(..),
qualifiedImportStyle
) where
import Data.List.NonEmpty (NonEmpty ((... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/d621fc4b143110ea8feef5826665f7bb0871c207/plugins/hls-refactor-plugin/src/Development/IDE/Plugin/Plugins/ImportUtils.hs | haskell | | Possible import styles for an 'IdentInfo'.
'IdentInfo'.
^ Import a top-level export from a module, e.g., a function, a type, a
class.
> import M (?)
Some exports that have a parent, like a type-class method or an
associated type/data family, can still be imported as a top-level
import.
Note that this is ... | module Development.IDE.Plugin.Plugins.ImportUtils
( ImportStyle(..),
quickFixImportKind',
quickFixImportKind,
renderImportStyle,
unImportStyle,
importStyles,
QualifiedImportStyle(..),
qualifiedImportStyle
) where
import Data.List.NonEmpty (NonEmpty ((... |
c9f887a356b410b2c1ed3df4d3f84d77ad7b99acba471b9369343dd8081d5c48 | ghc/ghc | Bool.hs | module GHC.Data.Bool
( OverridingBool(..)
, overrideWith
)
where
import GHC.Prelude.Basic
data OverridingBool
= Auto
| Never
| Always
deriving
( Show
^ @since 9.4.1
^ @since 9.4.1
^ @since 9.4.1
^ @since 9.4.1
^ @since 9.4.1
)
overrideWith :: Bool -> OverridingBool -> Bool
overrideWit... | null | https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/compiler/GHC/Data/Bool.hs | haskell | module GHC.Data.Bool
( OverridingBool(..)
, overrideWith
)
where
import GHC.Prelude.Basic
data OverridingBool
= Auto
| Never
| Always
deriving
( Show
^ @since 9.4.1
^ @since 9.4.1
^ @since 9.4.1
^ @since 9.4.1
^ @since 9.4.1
)
overrideWith :: Bool -> OverridingBool -> Bool
overrideWit... | |
9dd5abc7c30b6623090f356eaa4dcf976eec390e7dff89f41c879b93d8a566d0 | LexiFi/menhir | CalcPrinters.mli | open Parser.MenhirInterpreter
This module offers the functionality required by the functor
[ MenhirLib . Printers . Make ] .
[MenhirLib.Printers.Make]. *)
val print: string -> unit
val print_symbol: xsymbol -> unit
val print_element: (element -> unit) option
| null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/demos/calc-inspection/CalcPrinters.mli | ocaml | open Parser.MenhirInterpreter
This module offers the functionality required by the functor
[ MenhirLib . Printers . Make ] .
[MenhirLib.Printers.Make]. *)
val print: string -> unit
val print_symbol: xsymbol -> unit
val print_element: (element -> unit) option
| |
ad03ccbe01d4b3c8c7b5892b6b356c304eb52100820eed2ce19b37c342391c35 | LdBeth/keim | prover-flags.lisp | (in-package :resprover)
;;; We set up a list of flags, which can then be interactively changed
using the SET - FLAG command .
;;; This is pretty barebones. You could think about defining a flag
;;; to have a certain range of possible values or certain types.
(defvar *flags*
(list '*report-generated*
'*report... | null | https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/examples/prover-flags.lisp | lisp | We set up a list of flags, which can then be interactively changed
This is pretty barebones. You could think about defining a flag
to have a certain range of possible values or certain types. | (in-package :resprover)
using the SET - FLAG command .
(defvar *flags*
(list '*report-generated*
'*report-kept*
'*use-unit-resolution*
'*use-unit-preference*
'*use-input-resolution*
'*use-forward-subsumption*
'*use-backward-subsumption*
'*use-factoring*)
"A list of symbols, all of which are ... |
42bd97ed2ed2c4aef94833a745735889ae4b1f39adce2410ddac05e8ecafb525 | shayne-fletcher/zen | expr2.ml | type expr2 =
| Var of string
| IntConst of int
| FloatConst of float
| UnOp of (string*expr2)
| BinOp of (string*expr2*expr2)
let rec string_of_expr2 e =
match e with
| Var s -> "Var ('"^s^"')"
| IntConst i -> "IntConst ("^(string_of_int i)^")"
| FloatConst f -> "FloatConst ("^(string_of_float f)^"... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/expr/expr2.ml | ocaml | type expr2 =
| Var of string
| IntConst of int
| FloatConst of float
| UnOp of (string*expr2)
| BinOp of (string*expr2*expr2)
let rec string_of_expr2 e =
match e with
| Var s -> "Var ('"^s^"')"
| IntConst i -> "IntConst ("^(string_of_int i)^")"
| FloatConst f -> "FloatConst ("^(string_of_float f)^"... | |
6a868dce3735e374f0ab361a2a06f6186cba5f715e0f7ef5ea3f511ec2fcc515 | merijn/Belewitte | V1.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies... | null | https://raw.githubusercontent.com/merijn/Belewitte/cab6010a2bc54acfc4f4b169c95799fe455799ef/benchmark-analysis/src/Schema/Timers/V1.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE Undecidab... |
6df1bb54cd9786b750412fb4bbe396322ac1ec7e15c2c8f2d73fa8622051b0a8 | marick/fp-oo | zipper.clj | (require '[clojure.zip :as zip])
;; This is a handy function for inserting into a flow:
;; (-> zipper zlog zip/right zlog...)
(def zlog
(fn [z] (println "LOG:" (pr-str (zip/node z))) z))
;; This prints the tree above the current node.
(def zuplog
(fn [z] (zlog (zip/up z)) z))
For the first set of exer... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/sources/zipper.clj | clojure | This is a handy function for inserting into a flow:
(-> zipper zlog zip/right zlog...)
This prints the tree above the current node. | (require '[clojure.zip :as zip])
(def zlog
(fn [z] (println "LOG:" (pr-str (zip/node z))) z))
(def zuplog
(fn [z] (zlog (zip/up z)) z))
For the first set of exercises
(def flattenize
(fn [tree]
(letfn [(flatten-zipper [so-far zipper]
(cond (zip/end? zipper)
... |
333c8aaf737cf38d9e031b797f7c9d71af5dce05896fbf610552365a266101f0 | ocaml/merlin | browse_raw.mli | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2014 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/ocaml/merlin/7692405b163ff5e601d3f02f4c9ad405727c59fd/src/ocaml/merlin_specific/browse_raw.mli | ocaml | Compatibility with previous versions of OCaml
Items come with their final environment
* Accessors for information specific to a node | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2014 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
7188cbae6e255f4a7e0c96528aa0cc32afedf91ada95cc6c6769dd4abc6e980b | ralt/fs-watcher | package.lisp | (defpackage #:fs-watcher
(:use #:cl #:com.gigamonkeys.pathnames)
(:import-from #:alexandria :flatten)
(:export :watch))
| null | https://raw.githubusercontent.com/ralt/fs-watcher/1c47fdd495f93ab4aea75cabd90d168df7ecc7dd/src/package.lisp | lisp | (defpackage #:fs-watcher
(:use #:cl #:com.gigamonkeys.pathnames)
(:import-from #:alexandria :flatten)
(:export :watch))
| |
67829b7ba3c88e63c212501bb290821da105171e31c25a94b42be5fb72052fd6 | valpackett/microformats2-parser | Property.hs | # LANGUAGE Safe , NoImplicitPrelude , OverloadedStrings , QuasiQuotes , UnicodeSyntax , CPP , RankNTypes , TupleSections #
LOL : CPP is required for the \ linebreak thing
module Data.Microformats2.Parser.Property where
import Prelude.Compat
import qualified Data.Text as T
import Data.Text (Text)... | null | https://raw.githubusercontent.com/valpackett/microformats2-parser/eb55df250d4ab77180507aba6879141fc3680b42/library/Data/Microformats2/Parser/Property.hs | haskell | # LANGUAGE Safe , NoImplicitPrelude , OverloadedStrings , QuasiQuotes , UnicodeSyntax , CPP , RankNTypes , TupleSections #
LOL : CPP is required for the \ linebreak thing
module Data.Microformats2.Parser.Property where
import Prelude.Compat
import qualified Data.Text as T
import Data.Text (Text)... | |
6f9739cecb7555efda27ea86ffb58989dcb90542944200c1e7ee665591677ae0 | stbuehler/haskell-nettle | Utils.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Crypto.Nettle.Hash.Types
Copyright : ( c ) 2013
License : MIT - style ( see the file COPYING )
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- C... | null | https://raw.githubusercontent.com/stbuehler/haskell-nettle/0fb94a24c72efd1ef74c368669301bb755977f37/src/Nettle/Utils.hs | haskell | ---------------------------------------------------------------------------
|
Module : Crypto.Nettle.Hash.Types
Maintainer :
Stability : experimental
Portability : portable
Collection of internal utility functions and exports of common imports
-----------------------------------------------------... | # LANGUAGE CPP #
Copyright : ( c ) 2013
License : MIT - style ( see the file COPYING )
module Nettle.Utils
( Ptr
, plusPtr
, FunPtr
, Word8
, Word
, forM_
, unsafeDupablePerformIO
, withByteStringPtr
, netEncode
) where
import qualified Data.ByteString as B
import qualified Data.ByteStrin... |
54fbce17041d06caa68fd07a2ebfdfdc50d39663e34c8f1adcd0563854f75ed4 | cbaggers/cepl | slice.lisp | (defstruct slice
(start 0)
(end :end)
(step 1))
(defun slice (&optional (start 0) end (step 1) sequence)
(if sequence
(%perform-slice start end step sequence)
(make-slice :start start :end (or end :end) :step step)))
(defun %perform-slice (start end step sequence)
)
(defun range (num-or-slice)
... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/protocode/slice.lisp | lisp | (defstruct slice
(start 0)
(end :end)
(step 1))
(defun slice (&optional (start 0) end (step 1) sequence)
(if sequence
(%perform-slice start end step sequence)
(make-slice :start start :end (or end :end) :step step)))
(defun %perform-slice (start end step sequence)
)
(defun range (num-or-slice)
... | |
86d235dd44d2722f36d638cf75f83baf249a5e36411de80c876dc286e815e85c | ocaml/ocamlbuild | main.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/main.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 GNU Library General Public License , with
Original author :
val main : unit -> unit
|
7b075003a9b306227059e6824ff92ae523f455751d2081eae9e91e6fbf83889d | charlieg/Sparser | rules.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1992,1993,1994,1995 -- all rights reserved
;;;
;;; File: "rules"
;;; Module: "grammar;rules:SGML:"
Version : September 1995
initiated 10/19/91 , tweeked 10/21,10/30 . fixed typo 10/31 .
Added html 9/20/95
(in-... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/rules/SGML/rules.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "rules"
Module: "grammar;rules:SGML:"
------
sgml
------
------
html
------ | copyright ( c ) 1992,1993,1994,1995 -- all rights reserved
Version : September 1995
initiated 10/19/91 , tweeked 10/21,10/30 . fixed typo 10/31 .
Added html 9/20/95
(in-package :sparser)
(define-interior-of-paired-punctuation :angle-brackets
:lhs SGML-tag/start
:rhs ( SGML-label )
:form sec... |
e2ab9b13c09970b033080b33e3b198748e0911d3d237e3881bff86d8b7488a4a | mro/geohash | geohash.ml |
* geohash.ml
*
* Created by on 16.05.20 .
* Copyright © 2020 - 2021 mobile Software /~me . All rights reserved .
*
* 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 , e... | null | https://raw.githubusercontent.com/mro/geohash/fbd81a15734aef8454f6064b66c7ffc911276050/bin/geohash.ml | ocaml |
* geohash.ml
*
* Created by on 16.05.20 .
* Copyright © 2020 - 2021 mobile Software /~me . All rights reserved .
*
* 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 , e... | |
fd199f2e8566059295d70b42d7c21b9d7ddfc4eb40aede3af30342b26cb053e6 | jumarko/web-development-with-clojure | handler.clj | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/compojure-template/resources/leiningen/new/compojure/handler.clj | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(ns {{namespace}}.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.mi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.