_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 |
|---|---|---|---|---|---|---|---|---|
2617e069f7fc99291a9f5402a314ac16dc1934e667f01fecb5fcc3ae27e10c59 | kappelmann/engaging-large-scale-functional-programming | Prelude.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE PackageImports #-}
module Prelude (
-- * Standard types, classes and related functions
-- ** Basic data types
Bool(False, True),
(&&), (||), not, otherwise,
Maybe(Nothing, Just),
maybe,
Either(Left, Right),
either,... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/28905255605b55353de2d06239f79448c6fe4230/resources/io_mocking/hello/mock/Prelude.hs | haskell | # LANGUAGE PackageImports #
* Standard types, classes and related functions
** Basic data types
** Basic type classes
*** Numeric types
*** Numeric type classes
*** Numeric functions
** Semigroup and Monoid
** Miscellaneous functions
* List operations
*** Special folds
** Building lists
*** Scans
*** Infin... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
module Prelude (
Bool(False, True),
(&&), (||), not, otherwise,
Maybe(Nothing, Just),
maybe,
Either(Left, Right),
either,
Ordering(LT, EQ, GT),
Char, String,
* * * Tuples
fst, snd, curry, uncurry,
Eq((==), (/=)),
... |
3d73a0db96121996b0b6c3a6501f25885a963196a609fec0d6d272a22e007252 | stesla/lambda | test_equivalent.ml | open OUnit
open TestCase
let test expected expr1 expr2 =
(fun _ -> assert_parse_equivalence expected expr1 expr2)
let suite = "Expression Equivalence" >:::
["test true variable" >:: test true "x" "x";
"test false variable" >:: test false "x" "y";
"test true application" >:: test true "x y" "x y";
"test f... | null | https://raw.githubusercontent.com/stesla/lambda/405f46d945a856f680fbee6ef65f7b55e50169fd/tests/test_equivalent.ml | ocaml | open OUnit
open TestCase
let test expected expr1 expr2 =
(fun _ -> assert_parse_equivalence expected expr1 expr2)
let suite = "Expression Equivalence" >:::
["test true variable" >:: test true "x" "x";
"test false variable" >:: test false "x" "y";
"test true application" >:: test true "x y" "x y";
"test f... | |
4ee7386642fddd102051f80f910916c2df2c4f6afb7142d113b25f0f4de48648 | alanz/ghc-exactprint | TH.hs | |
Module : Language . Grammars . AspectAG.TH
Description : Boilerplate generation
Copyright : ( c )
License : GPL
Maintainer :
Stability : experimental
Portability : POSIX
Module : Language.Grammars.AspectAG.TH
Description : Boilerplate generation
Copyright : (c) Juan Garcí... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/103bc706c82300639985a15ba6cf762316352c92/tests/examples/ghc92/TH.hs | haskell | # LANGUAGE KindSignatures #
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
# LANGUAGE GADTs #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUA... | |
Module : Language . Grammars . AspectAG.TH
Description : Boilerplate generation
Copyright : ( c )
License : GPL
Maintainer :
Stability : experimental
Portability : POSIX
Module : Language.Grammars.AspectAG.TH
Description : Boilerplate generation
Copyright : (c) Juan Garcí... |
e17a2b53ec6d26a2c59bf406e15e5a6e65e90165d598249dec18b48311f73b07 | markbastian/partsbin | v2.clj | (ns partsbin.immutant.web.v2
(:require [immutant.web :as immutant]
[integrant.core :as ig]
[partsbin.middleware :refer [wrap-component]]
[taoensso.timbre :as timbre]))
(def valid-options
#{:path :dispatch? :trust-managers :key-managers :keystore :buffer-size :auto-start :buffers... | null | https://raw.githubusercontent.com/markbastian/partsbin/8dc159327f296c9625d129b5943ec79433019e54/src/partsbin/immutant/web/v2.clj | clojure | (ns partsbin.immutant.web.v2
(:require [immutant.web :as immutant]
[integrant.core :as ig]
[partsbin.middleware :refer [wrap-component]]
[taoensso.timbre :as timbre]))
(def valid-options
#{:path :dispatch? :trust-managers :key-managers :keystore :buffer-size :auto-start :buffers... | |
11f58abbdb3c20876b0a351445ef1ca7ee1edfa087d103c43173036766f30a61 | slipstream/SlipStreamServer | session_template_mitreid_test.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.session-template-mitreid-test
(:require
[clojure.test :refer [deftest is]]
[com.sixsq.slipstream.ssclj.resources.session-template :as st]
[com.sixsq.slipstream.ssclj.resources.spec.session-template-mitreid :as st-mitreid]
[com.sixsq.slipstream.ssclj.resour... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/spec/session_template_mitreid_test.cljc | clojure | (ns com.sixsq.slipstream.ssclj.resources.spec.session-template-mitreid-test
(:require
[clojure.test :refer [deftest is]]
[com.sixsq.slipstream.ssclj.resources.session-template :as st]
[com.sixsq.slipstream.ssclj.resources.spec.session-template-mitreid :as st-mitreid]
[com.sixsq.slipstream.ssclj.resour... | |
e286a2e143d19ed1c3e3edbb831a14d50dba0777e13d6f93e33ed7ad577a98e1 | aspires/heroku-clisp-example | heroku-setup.lisp | (in-package :cl-user)
(print ">>> Building system....")
(load (make-pathname :directory *build-dir* :defaults "example.asd"))
(ql:quickload :example)
;;; Redefine / extend heroku-toplevel here if necessary.
(print ">>> Done building system")
| null | https://raw.githubusercontent.com/aspires/heroku-clisp-example/d241e1a6742b05dc28a3d974d1916aeaa50e0565/heroku-setup.lisp | lisp | Redefine / extend heroku-toplevel here if necessary. | (in-package :cl-user)
(print ">>> Building system....")
(load (make-pathname :directory *build-dir* :defaults "example.asd"))
(ql:quickload :example)
(print ">>> Done building system")
|
9ec934b179ad7ef8dc6ef48e04dfee6ec7a0727e6ac946e2ef9b0eaaaea9e26c | mejgun/haskell-tdlib | EditCustomLanguagePackInfo.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.EditCustomLanguagePackInfo where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.LanguagePackInfo as LanguagePackInfo
import qualified Utils as U
-- |
Edits information about a custom local language pack in the... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/EditCustomLanguagePackInfo.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Query.EditCustomLanguagePackInfo where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.LanguagePackInfo as LanguagePackInfo
import qualified Utils as U
Edits information about a custom local language pack in the current localization target . Can be called ... |
81ec15a39e29a3ed1dea8f0f532ed42a83aacde7d64018a28394b1bf9f0abdfb | 200ok-ch/easy | customers.cljs | (ns easy.customers
"An example customers file looks like this:
```
- name: acme
year: 2015
number: 3
address: |
Acme Corp
Langstr. 1
8004 Zürich
rate: 100
deadline: 14
contact: info
- name: wile
year: 2014
number: 2
rate: 100
address: |
Wile E. Co... | null | https://raw.githubusercontent.com/200ok-ch/easy/398b77e6dee3a02aa9fb78f7421b8f5c45ee2f23/src/easy/customers.cljs | clojure | spec
customers' shortnames
when they became a customer
a unique customer number
multiline postal address
a general discount in percentage
defaults
load
TODO: check if file exists, error otherwise | (ns easy.customers
"An example customers file looks like this:
```
- name: acme
year: 2015
number: 3
address: |
Acme Corp
Langstr. 1
8004 Zürich
rate: 100
deadline: 14
contact: info
- name: wile
year: 2014
number: 2
rate: 100
address: |
Wile E. Co... |
69366a4179bdd1aebd12ccd41fe321a55f6acae0314be629dc0a0917b6e2b303 | milankinen/cuic | util.clj | (ns ^:no-doc cuic.internal.util
(:import (java.util Base64)
(java.net MalformedURLException URI URISyntaxException)
(cuic CuicException TimeoutException)
(cuic DevtoolsProtocolException)
(cuic.internal StaleObjectException)))
(set! *warn-on-reflection* true)
(defn safe-st... | null | https://raw.githubusercontent.com/milankinen/cuic/94718c0580da2aa127d967207f163c7a546b6fb1/src/clj/cuic/internal/util.clj | clojure | (ns ^:no-doc cuic.internal.util
(:import (java.util Base64)
(java.net MalformedURLException URI URISyntaxException)
(cuic CuicException TimeoutException)
(cuic DevtoolsProtocolException)
(cuic.internal StaleObjectException)))
(set! *warn-on-reflection* true)
(defn safe-st... | |
b6ebe1dd949ff041370901ba22cd2083f352ed062cdd4bd61c1830a395e8c2a7 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GetCustomersCustomerSourcesId.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the different functions to run the operation getCustomersCustomerSourcesId
modu... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetCustomersCustomerSourcesId.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the different functions to run the operation getCustomersCustomerSourcesId
| > GET /v1/customers/{customer}/sources/{id}
| Contains all available parameters of this operation (query and path parameters)
| Monadic computat... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Operations.GetCustomersCustomerSourcesId where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualifie... |
09b9b6e560a47fca0836f8893b7307ca0f45436d49aad5c8b15e14e1360b4aa1 | haskell-suite/base | qsemn001.hs | # LANGUAGE CPP #
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.List
new = newQSemN
wait = waitQSemN
signal = signalQSemN
--------
-- dummy test-framework
type Assertion = IO ()
x @?= y = when (x /= y) $ error (show x ++ " /= " ++ show y)
testCase :: String -> IO () -> IO ()
te... | null | https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/tests/qsemn001.hs | haskell | ------
dummy test-framework
---- | # LANGUAGE CPP #
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.List
new = newQSemN
wait = waitQSemN
signal = signalQSemN
type Assertion = IO ()
x @?= y = when (x /= y) $ error (show x ++ " /= " ++ show y)
testCase :: String -> IO () -> IO ()
testCase n io = putStrLn ("test " +... |
0ea74ab860e88ce360a75c4041e3beef3ff29f2e573fac9a929287b96972cb3d | webnf/webnf | query.clj | (ns webnf.datomic.query
"# Query functions
Build an manipulate queries and handle query results"
(:require
[webnf.kv :refer [treduce-kv]]
[datomic.api :refer [q tempid entity]]))
(defn ?qsym "Gensym query symbols"
([] (?qsym ""))
([prefix] (symbol (str "?" (gensym prefix)))))
# # Building queries
;... | null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/datomic/src/webnf/datomic/query.clj | clojure | Use add-in to add to queries started with by-attr, by-value ...
## Id result functions
These help with getting query result data into the right shape | (ns webnf.datomic.query
"# Query functions
Build an manipulate queries and handle query results"
(:require
[webnf.kv :refer [treduce-kv]]
[datomic.api :refer [q tempid entity]]))
(defn ?qsym "Gensym query symbols"
([] (?qsym ""))
([prefix] (symbol (str "?" (gensym prefix)))))
# # Building queries
... |
f75052f9f66eee34ace7a09b2bbcfd8142e18c033ef6352dcf0c0ed9e2b289d2 | basho/bitcask | event_logger.erl | %%% File : event_logger.erl
Author :
%%% Description :
Created : 26 Mar 2012 by
-module(event_logger).
-compile([export_all, nowarn_export_all]).
-ifdef(PULSE).
-compile({parse_transform, pulse_instrument}).
-include_lib("pulse_otp/include/pulse_otp.hrl").
-endif.
-behaviour(gen_server).
%%... | null | https://raw.githubusercontent.com/basho/bitcask/dd96f6dd84a1cad68ccc21959ba56b0426434d85/eqc/event_logger.erl | erlang | File : event_logger.erl
Description :
API
gen_server callbacks
====================================================================
API
====================================================================
--------------------------------------------------------------------
Description: Starts the server
--... | Author :
Created : 26 Mar 2012 by
-module(event_logger).
-compile([export_all, nowarn_export_all]).
-ifdef(PULSE).
-compile({parse_transform, pulse_instrument}).
-include_lib("pulse_otp/include/pulse_otp.hrl").
-endif.
-behaviour(gen_server).
-export([start_link/0, event/1, get_events/0, start_log... |
38a90dd5078411d5bfe9c7c640800033dbb6b30e279b5f44bd30d0f26c53459f | athos/JiSE | core.clj | (ns jise.core
(:refer-clojure :exclude [class])
(:require [clojure.string :as str]
[jise.emit :as emit]
[jise.parse :as parse]
[jise.type :as type])
(:import [clojure.lang Compiler Compiler$LocalBinding DynamicClassLoader]))
(defn- qualify-cname [cname]
(let [cname' (name cn... | null | https://raw.githubusercontent.com/athos/JiSE/b487947d8c367c12c284586c6e11aaeddb4132f5/src/jise/core.clj | clojure | (ns jise.core
(:refer-clojure :exclude [class])
(:require [clojure.string :as str]
[jise.emit :as emit]
[jise.parse :as parse]
[jise.type :as type])
(:import [clojure.lang Compiler Compiler$LocalBinding DynamicClassLoader]))
(defn- qualify-cname [cname]
(let [cname' (name cn... | |
365d30255c3e0d088997208166f0ca94014317678efad7944774baf08e779339 | scrintal/heroicons-reagent | bars_3.cljs | (ns com.scrintal.heroicons.mini.bars-3)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zM2 10a.75.75 ... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/bars_3.cljs | clojure | (ns com.scrintal.heroicons.mini.bars-3)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zM2 10a.75.75 ... | |
0761876f410e58deb14cfcfcc0fd32b30fc8bab15de2833ffe71249e40c9badb | fused-effects/diffused-effects | Cut.hs | # LANGUAGE ExistentialQuantification #
module Effect.Cut
( -- * Cut effect
Cut(..)
, cutfail
, call
, cut
) where
import Algebra
import Control.Applicative (Alternative(..))
-- | 'Cut' effects are used with 'Choose' to provide control over backtracking.
data Cut m k
= Cutfail
| forall a . Call (m a) (a -> m k)
... | null | https://raw.githubusercontent.com/fused-effects/diffused-effects/83e070da3232d9a909e06d775f3f245eabb70a84/src/Effect/Cut.hs | haskell | * Cut effect
| 'Cut' effects are used with 'Choose' to provide control over backtracking.
| Fail the current branch, and prevent backtracking within the nearest enclosing 'call' (if any).
Contrast with 'empty', which fails the current branch but allows backtracking.
prop> run (runNonDet (runCut (cutfail <|> ... | # LANGUAGE ExistentialQuantification #
module Effect.Cut
Cut(..)
, cutfail
, call
, cut
) where
import Algebra
import Control.Applicative (Alternative(..))
data Cut m k
= Cutfail
| forall a . Call (m a) (a -> m k)
cutfail :: Has Cut m => m a
cutfail = send Cutfail
# INLINE cutfail #
call :: Has Cut m => m a -... |
b10071476ebb31b7acd880c28c0814211c64333e0f60e011a435e2f369f5f77a | CrossRef/cayenne | isbn.clj | (ns cayenne.ids.isbn
(:require [cayenne.ids :as ids]
[clojure.string :as string]))
(defn is-isbn?
[s]
())
(defn extract-isbn [s]
(when s
(or
(nth (re-find #"^(http\:\/\/id\.crossref\.org\/isbn\/)(.*)" s) 2)
s)))
(defn normalize-isbn [s]
(when s
(-> s
extract-isbn
... | null | https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/src/cayenne/ids/isbn.clj | clojure | (ns cayenne.ids.isbn
(:require [cayenne.ids :as ids]
[clojure.string :as string]))
(defn is-isbn?
[s]
())
(defn extract-isbn [s]
(when s
(or
(nth (re-find #"^(http\:\/\/id\.crossref\.org\/isbn\/)(.*)" s) 2)
s)))
(defn normalize-isbn [s]
(when s
(-> s
extract-isbn
... | |
04aad9ddf3a97bd214a38510ec7bfa9d0f0f206266dc603a2cd572e319477f0d | dolotech/erlang_server | pt_pack.erl | -module(pt_pack).
-export([p/2]).
p(10001, [Type,Code]) ->
Data = << Type:8,Code:32 >>,
Len = byte_size(Data),
{ok, << Len:16, 10001:16, Data/binary >>};
p(Cmd, []) -> {ok, <<0:16, Cmd:16>>};
p(10005, [Notice]) ->
NoticeAL_ = length(Notice),
NoticeF_ = fun
([Id1,Msg1]) ->
... | null | https://raw.githubusercontent.com/dolotech/erlang_server/44ea3693317f60e18b19c9ddfa179307cbd646d7/src/pt/pt_pack.erl | erlang | -module(pt_pack).
-export([p/2]).
p(10001, [Type,Code]) ->
Data = << Type:8,Code:32 >>,
Len = byte_size(Data),
{ok, << Len:16, 10001:16, Data/binary >>};
p(Cmd, []) -> {ok, <<0:16, Cmd:16>>};
p(10005, [Notice]) ->
NoticeAL_ = length(Notice),
NoticeF_ = fun
([Id1,Msg1]) ->
... | |
3e139f6118afae40b83cdff008457de0421afbbca35b1a9e80aa5f9397a9d124 | raaz-crypto/raaz | Internal.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE DataKinds #-}
-- |
--
-- Module : Raaz.Primitive.AEAD.Internal
-- Description : Generic interface to authenticated encryption.
Copyright : ( c ) , 2019
-- License : Apache-2.0 OR BSD-3-Clause... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/f3352b6b21ea7bba3e47a507b25dc69f3feb4f97/core/Raaz/Primitive/AEAD/Internal.hs | haskell | # LANGUAGE DataKinds #
|
Module : Raaz.Primitive.AEAD.Internal
Description : Generic interface to authenticated encryption.
License : Apache-2.0 OR BSD-3-Clause
Maintainer : Piyush P Kurur <>
Stability : experimental
| An authenticated encrypted packet containing a payload of type
... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) , 2019
module Raaz.Primitive.AEAD.Internal
( AEAD(..), unsafeAEAD
) where
import Data.ByteString
import Raaz.Core
@plain@ and additional authenticated data of type @aad@.
d... |
5e29cbcf98b18b9ac0f4f6ebdaf09565e79eb1e21c1ca6e36f53931a3dc3ac03 | thi-ng/geom | constants.cljs | (ns thi.ng.geom.gl.webgl.constants
(:refer-clojure :exclude [byte float int short keep repeat replace]))
;; WebGL 1.0 constants
;; see: thi.ng.geom.gl.jogl.constants for further details
(def active-attributes 0x8b89)
(def active-texture 0x84e0)
(def active-uniforms 0x8b86)
(def aliased-line-width-range 0x846e)
(def... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/gl/webgl/constants.cljs | clojure | WebGL 1.0 constants
see: thi.ng.geom.gl.jogl.constants for further details | (ns thi.ng.geom.gl.webgl.constants
(:refer-clojure :exclude [byte float int short keep repeat replace]))
(def active-attributes 0x8b89)
(def active-texture 0x84e0)
(def active-uniforms 0x8b86)
(def aliased-line-width-range 0x846e)
(def aliased-point-size-range 0x846d)
(def alpha 0x1906)
(def alpha-bits 0xd55)
(def ... |
5208c34e78475612f729377be93312d22a2dc14ae3d865d0b915b1e40ce4cced | threatgrid/asami | macros.cljc | (ns ^{:doc "Macro definintions"
:author "Paula Gearon"}
asami.durable.macros
(:require [asami.durable.common :refer [lock! unlock!]]))
(defmacro with-lock
"Uses a lock for a block of code"
[lock & body]
`(try
(lock! ~lock)
~@body
(finally (unlock! ~lock))))
(defmacro assert-args
[& ... | null | https://raw.githubusercontent.com/threatgrid/asami/870b334c5ad28a56de483770329d0f75a2489932/src/asami/durable/macros.cljc | clojure | (ns ^{:doc "Macro definintions"
:author "Paula Gearon"}
asami.durable.macros
(:require [asami.durable.common :refer [lock! unlock!]]))
(defmacro with-lock
"Uses a lock for a block of code"
[lock & body]
`(try
(lock! ~lock)
~@body
(finally (unlock! ~lock))))
(defmacro assert-args
[& ... | |
e3bccfd61a10e945c9f045492c784265a3d4a099db4a09dc666f4e428a2f03d6 | ronxin/stolzen | install-modules.scm | #lang scheme
(require "scheme-numbers.scm")
(install-scheme-number-package)
(require "rational-numbers.scm")
(install-rational-package)
(require "complex-numbers.scm")
(install-complex-package)
(require "polynomial-numbers.scm")
(install-polynomial-package)
| null | https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.5/generic-ops/install-modules.scm | scheme | #lang scheme
(require "scheme-numbers.scm")
(install-scheme-number-package)
(require "rational-numbers.scm")
(install-rational-package)
(require "complex-numbers.scm")
(install-complex-package)
(require "polynomial-numbers.scm")
(install-polynomial-package)
| |
c851ab4807336b5b6c7f07a95547d2f094a6d0c7d41ba4e678d9c95e3452c8aa | turboMaCk/aeson-combinators | JSONEncodeSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module JSONEncodeSpec where
import qualified Data.Aeson.Combinators.Encode as JE
import Data.Text
import Test.Hspec
data Object = Object
{ name :: Text
, age :: Int
} deriving (Show, Eq)
objectEncoder :: JE.Encoder... | null | https://raw.githubusercontent.com/turboMaCk/aeson-combinators/f83fdc0ae55d544381f317b0c08944165b32e880/test/JSONEncodeSpec.hs | haskell | # LANGUAGE OverloadedStrings #
poor man's workaround for key ordering | # LANGUAGE RecordWildCards #
module JSONEncodeSpec where
import qualified Data.Aeson.Combinators.Encode as JE
import Data.Text
import Test.Hspec
data Object = Object
{ name :: Text
, age :: Int
} deriving (Show, Eq)
objectEncoder :: JE.Encoder Object
objectEncoder = JE.object
... |
2f7cb051d75c260df273c7a3a7086569daf21924e347825fc4c18c94951a1c8c | chef/chef-server | chef_cert_http.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
%% @doc interface to the certificate generation service
%%
Copyright Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "L... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_objects/src/chef_cert_http.erl | erlang | ex: ts=4 sw=4 et
@doc interface to the certificate generation service
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 permis... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright Chef Software , 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 d... |
d73883badbce22674bcda14c99a8f68b872523050ec73431ac7aa3555e9bd8ab | FranklinChen/hugs98-plus-Sep2006 | PickDepth.hs |
PickDepth.hs ( adapted from which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2005 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
Picking is demonstrated in this program . In rendering mode , three
ove... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/GLUT/examples/RedBook/PickDepth.hs | haskell | The default z mapping
and the other for the column on the grid. The color of each square is
determined by its position on the grid, and the value in the board array.
Note: In contrast to the the original example, we always give names to
squares, regardless of the render mode. This simplifies the code a bit and
re... |
PickDepth.hs ( adapted from which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2005 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
Picking is demonstrated in this program . In rendering mode , three
ove... |
2f6a10bbce62f76a3b0ff542fa2bfb4c0404cba952cdfd65827a0fd1d05b3062 | Kappa-Dev/KappaTools | union_find.mli | module type Union_find =
sig
type key
type dimension
type t
val create:
Remanent_parameters_sig.parameters ->
Exception.method_handler ->
dimension ->
Exception.method_handler * t
val union_list:
Remanent_parameters_sig.parameters ->
Exception.method_handler ->
t ->
key list -... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/5e756eb3529db9976cf0a0884a22676925985978/core/KaSa_rep/more_datastructures/union_find.mli | ocaml | module type Union_find =
sig
type key
type dimension
type t
val create:
Remanent_parameters_sig.parameters ->
Exception.method_handler ->
dimension ->
Exception.method_handler * t
val union_list:
Remanent_parameters_sig.parameters ->
Exception.method_handler ->
t ->
key list -... | |
f60704cbcdab553c720bb3391b5b018c7214bb49d46617b65f7094a3a4b1e6d6 | gsakkas/rite | 20060302-17:24:50-0043a91b08c0d77c155551e167ad8e89.seminal.ml | let parrot str =
str
let reverse str =
() = parrot "test"
let _ = print_char(reverse "fast")
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060302-17%3A24%3A50-0043a91b08c0d77c155551e167ad8e89.seminal.ml | ocaml | let parrot str =
str
let reverse str =
() = parrot "test"
let _ = print_char(reverse "fast")
| |
03835d0305f58ef5bbd0f76c42062480603acc466921fc9b1aa79ec481043e9d | grin-compiler/ghc-wpc-sample-programs | BoxedArray.hs | -- |
-- Module : Basement.BoxedArray
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Simple boxed array abstraction
--
# LANGUAGE MagicHash #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE UnboxedTuples #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE MultiPa... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/basement-0.0.11/Basement/BoxedArray.hs | haskell | |
Module : Basement.BoxedArray
License : BSD-style
Stability : experimental
Portability : portable
Simple boxed array abstraction
# LANGUAGE BangPatterns #
, findIndex
| Array of a
# UNPACK #
# UNPACK #
| Mutable Array of a
# UNPACK #
# UNPACK #
| return the numbers of elements in a mutable array... | Maintainer : < >
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
module Basement.BoxedArray
( Array
, MArray
, empty
, length
, mutableLength
, copy
, unsafeCopyAtRO
, thaw
, n... |
9f40f32e9cfaabb1f34fb1b44c2dd54224f8fb357257d1cab59460677eb1865b | masaeedu/monoidal | Hask.hs | module Control.Category.Tensor.Hask
( module Control.Category.Tensor.Hask
, module T'
) where
import Data.Void
import Control.Category.Tensor as T'
hiding
( Structure
, Associative
, Braided
, Symmetric
, Unital
, Tensor
, Bistructure
, LaxLDistrib
, LaxLAnnihil
, LaxRDistrib
, LaxRAnnih... | null | https://raw.githubusercontent.com/masaeedu/monoidal/c48fa8745a08bad58e6d37041e59a0e88d10805d/src/Control/Category/Tensor/Hask.hs | haskell | module Control.Category.Tensor.Hask
( module Control.Category.Tensor.Hask
, module T'
) where
import Data.Void
import Control.Category.Tensor as T'
hiding
( Structure
, Associative
, Braided
, Symmetric
, Unital
, Tensor
, Bistructure
, LaxLDistrib
, LaxLAnnihil
, LaxRDistrib
, LaxRAnnih... | |
61ed78b60a269b4bbbd204c3669ad31dfee4732250e3114512da5745f9b25828 | pariyatti/kosa | txt_db_test.clj | (ns ^:database kosa.mobile.today.looped-doha.txt-db-test
(:require [kosa.mobile.today.looped-doha.txt :as sut]
[kosa.mobile.today.looped-doha.db :as db]
[kosa.mobile.today.looped.txt :as looped]
[clojure.test :refer :all]
[kosa.fixtures.file-fixtures :as file-fixtures]
... | null | https://raw.githubusercontent.com/pariyatti/kosa/215e03288668156e48bd02aab356e64d3eda8c7f/test/kosa/mobile/today/looped_doha/txt_db_test.clj | clojure | (ns ^:database kosa.mobile.today.looped-doha.txt-db-test
(:require [kosa.mobile.today.looped-doha.txt :as sut]
[kosa.mobile.today.looped-doha.db :as db]
[kosa.mobile.today.looped.txt :as looped]
[clojure.test :refer :all]
[kosa.fixtures.file-fixtures :as file-fixtures]
... | |
60f2daa028c0bd7068b6260de0c7ccf6a24ea7ef45b0b30aabff4dd91ecf03ed | alvatar/spheres | session-cookie-id-based-store.scm | ;;; Tools for making session middleware that rely on putting the
;;; session id in a cookie.
;;;
Copyright ( c ) 2008 - 2009 Per Eckerdal
;; API for session sack middleware:
;; (session-generate-id)
;; (cookie-id-based-session-store
;; app get: destroy!: commit!: [generate-id:] [cookie-name:])
;;
;; the get funct... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/net/sack/session-cookie-id-based-store.scm | scheme | Tools for making session middleware that rely on putting the
session id in a cookie.
API for session sack middleware:
(session-generate-id)
(cookie-id-based-session-store
app get: destroy!: commit!: [generate-id:] [cookie-name:])
the get function will be called at most once, with a session id as
the destr... | Copyright ( c ) 2008 - 2009 Per Eckerdal
parameter . It should return a hash table or # f.
(define (default-session-generate-id)
(make-uuid))
(define default-session-cookie-name "_s")
(define* (cookie-id-based-session-store app
(get: #f)
... |
779fe9805860f4fb5a19055a2d0b4fba7822a22ee9ca9bde1500acece17ad27b | chrra/htiled | Tiled.hs | module Data.Tiled
( module X
, module Data.Tiled
) where
import Data.Tiled.Load as X
import Data.Tiled.Types as X
import Data.Vector (Vector, force, slice)
-- | Yield a slice of the tile vectors without copying it.
--
-- The vectors must be at least x+w wide and y+h tal... | null | https://raw.githubusercontent.com/chrra/htiled/bc93b7c508a571edf73f952559ff2b903df4bc56/src/Data/Tiled.hs | haskell | | Yield a slice of the tile vectors without copying it.
The vectors must be at least x+w wide and y+h tall.
^ X
^ Y
^ Width
^ Height
| Yield the argument but force it not to retain any extra memory,
possibly by copying it.
Useful after slicing huge tile vectors. | module Data.Tiled
( module X
, module Data.Tiled
) where
import Data.Tiled.Load as X
import Data.Tiled.Types as X
import Data.Vector (Vector, force, slice)
sliceTileVectors
-> Vector (Vector (Maybe TileIndex))
-> Vector (Vector (Maybe TileIndex))
sliceTileVectors x ... |
6f84f60bc33d332d105fdaf904020a9dd46b1a9c8931ad730af9c22d61cb7138 | ryanprior/guix-packages | vlang.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2020 Prior < >
(define-module (testing vlang)
#:use-module (gnu packages c)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages vlang)
#:use-module (guix build-system gnu)
#:use-module (guix git-d... | null | https://raw.githubusercontent.com/ryanprior/guix-packages/a5cdd6ec5b8418024dfcafdf79436d567dd3759b/testing/vlang.scm | scheme | GNU Guix --- Functional package management for GNU
enabled to run tests in the next release.
(replace 'check
(lambda _
(let* ((tmpbin "tmp/bin")
(gcc (which "gcc")))
(symlink gcc (string-append tmpbin "/cc"))
(setenv "PATH" (string-append tmpbin ":" (getenv "PATH")))
(invoke ... | Copyright © 2020 Prior < >
(define-module (testing vlang)
#:use-module (gnu packages c)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages vlang)
#:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix licen... |
8366d2376583d56969c9f0b97964b00b68dfd4a04610b43a750774c338998f0c | JHU-PL-Lab/jaylang | toploop_option_parsers.mli | open Ddpa;;
(** This logging option sets the global logging state of the application. It
"produces" a unit but, as each argument is parsed, has the side effect of
configuring the logger. *)
val logging_option : unit BatOptParse.Opt.t
(** This logging option selects a particular DDPA analysis to perform. *)
v... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/ddpa-toploop/toploop/toploop_option_parsers.mli | ocaml | * This logging option sets the global logging state of the application. It
"produces" a unit but, as each argument is parsed, has the side effect of
configuring the logger.
* This logging option selects a particular DDPA analysis to perform.
* This logging option configures how DDPA DOT graphs are logged.
*... | open Ddpa;;
val logging_option : unit BatOptParse.Opt.t
val select_context_stack_option :
(module Ddpa_context_stack.Context_stack) option BatOptParse.Opt.t
val ddpa_logging_option :
Ddpa_analysis_logging.ddpa_logging_level BatOptParse.Opt.t
* This logging option configures how PDS reachability DOT graphs are
... |
bc56202ac050544af39d0d875b078c3ad3c4167aafd7b29aab07f8fc539639cd | oreillymedia/etudes-for-erlang | patmatch.erl | %% @author J D Eisenberg <>
%% @doc Use pattern matching in a list comprehension.
2013 J D Eisenberg
%% @version 0.1
-module(patmatch).
-export([older_males/0, older_or_male/0]).
@doc Select all males older than 40 from a list of tuples giving
%% name, gender, and age.
-spec(older_males() -> list()).
get_peopl... | null | https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch07-02/patmatch.erl | erlang | @author J D Eisenberg <>
@doc Use pattern matching in a list comprehension.
@version 0.1
name, gender, and age. | 2013 J D Eisenberg
-module(patmatch).
-export([older_males/0, older_or_male/0]).
@doc Select all males older than 40 from a list of tuples giving
-spec(older_males() -> list()).
get_people() ->
[{"Federico", $M, 22}, {"Kim", $F, 45}, {"Hansa", $F, 30},
{"Vu", $M, 47}, {"Cathy", $F, 32}, {"Elias", $M, 50}].... |
2f2108211924ef9d9e9d1766e045184564cb2503cd4e79baa1eb11ca9ebc3415 | axch/pattern-case | auto-compilation.scm | ;;; This file is part of Pattern Case, a Schemely pattern matching
case facility in MIT Scheme .
Copyright 2010 - 2011 .
;;;
;;; Pattern Case is free software; you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation ; eithe... | null | https://raw.githubusercontent.com/axch/pattern-case/95b858442a2e45d2bec915665979659a5e38e1d3/auto-compilation.scm | scheme | This file is part of Pattern Case, a Schemely pattern matching
Pattern Case is free software; you can redistribute it and/or
either version 3 of
Pattern Case is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTIC... | case facility in MIT Scheme .
Copyright 2010 - 2011 .
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Affero General Public
(declare (usual-integrations))
(define (self-relatively thunk)... |
d4d5d01445971148e32ff8a682c7d088fc70360b24c9f0204d5ede2face002bc | lojic/LearningRacket | match_stick_equation.rkt | #lang racket
(require debug/repl)
Inspired by a puzzle using match sticks as segments in a 7 - segment
display , where you 're supposed to move 2 match sticks to form a
valid equation , beginning with 8 - 4 = 61
;;
;; The goal of this program is to compute all valid equations that can
be made with the origina... | null | https://raw.githubusercontent.com/lojic/LearningRacket/a22f04e1cdd4618554ce56301fedf5ed81b65e84/miscellaneous/match_stick_equation.rkt | racket |
The goal of this program is to compute all valid equations that can
--------------------------------------------------------------------------------------------
Expression parser
--------------------------------------------------------------------------------------------
(start input)
(error (λ (a b c d e)
... | #lang racket
(require debug/repl)
Inspired by a puzzle using match sticks as segments in a 7 - segment
display , where you 're supposed to move 2 match sticks to form a
valid equation , beginning with 8 - 4 = 61
be made with the original 22 match sticks .
I 've limited the possible characters to 0 - 9 , + ,... |
5cb519c7e3daf58cfc9038dbc3b9e6ee51b6b0c232de0de125c74391d8510d1c | AccelerateHS/accelerate | Issue409.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
-- Module : Data.Array.Accelerate.Test.NoFib.Issues.Issue409
Copyright : [ 2009 .. 2020 ] The ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Test/NoFib/Issues/Issue409.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
|
Module : Data.Array.Accelerate.Test.NoFib.Issues.Issue409
License : BSD3
Stability : experimental
| # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright : [ 2009 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.Test.NoFib.Issues.Issue409 (
test_issue409
) where
impor... |
0baad82f785c122497ab46e1551b1aa6cd5c4539d59b5f137f8dd70a9b0f10dd | MassD/pearls | boustrophedon_loopless.ml | (*
box_all loopless
*)
First box_tuple
x box y - > ( x box y , rev ( x box y ) )
x box y -> (x box y, rev (x box y))
*)
let rec box_tuple xs (ys, sy) =
match xs with
| [] -> ys, sy
| x::tl ->
let zs, sz = box_tuple tl (sy, ys) in
ys @ [x] @ zs, sz @ [x] @ sy
type 'a multiway_tr... | null | https://raw.githubusercontent.com/MassD/pearls/da73f49ffe61125c1def4f2b3ed339963318dbec/28_loopless/boustrophedon_loopless.ml | ocaml |
box_all loopless
|
First box_tuple
x box y - > ( x box y , rev ( x box y ) )
x box y -> (x box y, rev (x box y))
*)
let rec box_tuple xs (ys, sy) =
match xs with
| [] -> ys, sy
| x::tl ->
let zs, sz = box_tuple tl (sy, ys) in
ys @ [x] @ zs, sz @ [x] @ sy
type 'a multiway_tree = Node of 'a * ('a mul... |
26202754cc1540549bb4bcef3208e2c02347ae4dc613e803b4c6f6afd6656976 | lambdageek/centrinel | Ident.hs | # language FunctionalDependencies #
module Centrinel.Region.Ident where
import qualified Language.C.Data.Ident as Id
-- | C identifiers that may have a region placed on them: either struct tags or typedefs.
--
data RegionIdent = StructTagId !Id.SUERef
| TypedefId !Id.Ident
deriving ... | null | https://raw.githubusercontent.com/lambdageek/centrinel/412b620b77c6cb569811fec845b89d04585c1332/src/Centrinel/Region/Ident.hs | haskell | | C identifiers that may have a region placed on them: either struct tags or typedefs.
| # language FunctionalDependencies #
module Centrinel.Region.Ident where
import qualified Language.C.Data.Ident as Id
data RegionIdent = StructTagId !Id.SUERef
| TypedefId !Id.Ident
deriving (Show, Eq, Ord)
| Monads @m@ that assign region variables @v@ to identifiers @i@
class Mona... |
271d5da7f170e6b5590e3c687aa906353cfeb37ad6cfd9cc800b9d5522e8bbf8 | ninenines/asciideck | asciideck_tables_pass.erl | Copyright ( c ) 2017 - 2018 , < >
%%
%% Permission to use, copy, modify, and/or 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 " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/ninenines/asciideck/e9a597168760eca6cedbe4a5726b1f90b7a6d21b/src/asciideck_tables_pass.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2017 - 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
Asciidoc User Guide 23
and cells are currently ... |
a1f387349b22989251469bdec2ed140e9db85e3b88c0b068ed458a796eaf2d5c | uds-psl/autosubst2 | Main.hs | module Main where
import Autosubst.GenCode
import Autosubst.GenM
import Autosubst.Parser
import Autosubst.Signature
import Autosubst.Types
import Data.Semigroup ((<>))
import Options.Applicative
import System.Directory
import ... | null | https://raw.githubusercontent.com/uds-psl/autosubst2/8e3c6ef6d4f6e915b9ebb6db5ed18d730f00ce4d/app/Main.hs | haskell | cmd argument structure
TODO: Update.
top level combines busniess logic and argument parsing
the actual business logic
writes a file.
if the file already exists, the user is prompted for overwrite permission for each file
the boolean flag is used to force write and don't prompt
remove the file
remove the fil... | module Main where
import Autosubst.GenCode
import Autosubst.GenM
import Autosubst.Parser
import Autosubst.Signature
import Autosubst.Types
import Data.Semigroup ((<>))
import Options.Applicative
import System.Directory
import ... |
db7af4ff4a4e14b7bf04df7a3f3b78a43fd5f50a027610bc7c9ce8f50d555030 | rollacaster/sketches | noise_terrain.cljs | (ns sketches.nature-of-code.introduction.noise-terrain
(:require [quil.core :as q]))
(defn setup []
(q/stroke 127)
(q/no-fill)
(q/rotate-x (/ q/PI 3))
(q/translate (/ (- (q/width)) 2) (/ (- (q/height)) 2))
(let [scale 10
yoff (atom 0.0)
xoff (atom 0.0)
cols (/ (q/width) scale)
... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/introduction/noise_terrain.cljs | clojure | (ns sketches.nature-of-code.introduction.noise-terrain
(:require [quil.core :as q]))
(defn setup []
(q/stroke 127)
(q/no-fill)
(q/rotate-x (/ q/PI 3))
(q/translate (/ (- (q/width)) 2) (/ (- (q/height)) 2))
(let [scale 10
yoff (atom 0.0)
xoff (atom 0.0)
cols (/ (q/width) scale)
... | |
9935b031e84ab2f20a77b502e94afb14af46d22d4f54a5a88ca1576489a12542 | shop-planner/shop3 | prepare-return-values.lisp | (in-package :prepare-return-values)
(declaim (ftype (function
(list &key (:plan-tree (or null top-node)) (:bindings t))
(values list (or top-node null)))
prepare-return-values)
(ftype
(function (tree-node hash-table t)
(values tre... | null | https://raw.githubusercontent.com/shop-planner/shop3/b04d12bdf83e40590fe44bb5c68952f3fd0b5b1d/shop3/explicit-stack-search/prepare-return-values.lisp | lisp | translate dependency links, if present
much simpler if there is no plan tree...
Make a copy of the original plan-tree, using the translation-table
to rewrite the tasks of the primitive nodes, and using the bindings
and the original tasks to rewrite the other tasks.
make a new node and index the copy against the o... | (in-package :prepare-return-values)
(declaim (ftype (function
(list &key (:plan-tree (or null top-node)) (:bindings t))
(values list (or top-node null)))
prepare-return-values)
(ftype
(function (tree-node hash-table t)
(values tre... |
db7ab290ed9123ce4aedf04d1844ed99d5aae1ae4bab3ab3ea11c9d5ae926fbb | hslua/hslua | Path.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : HsLua . Module . Path
Copyright : © 2021 - 2023 : MIT
Maintainer : module to work with file paths .
Module : HsLua.Module.Path
Copyright : © 2021-2023 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <>
Lua module ... | null | https://raw.githubusercontent.com/hslua/hslua/ebbc64c5f2584ca2294ee8bbec8983ec71794000/hslua-module-path/src/HsLua/Module/Path.hs | haskell | # LANGUAGE OverloadedStrings #
* Module
* Fields
* Path manipulation
| The @path@ module specification.
Fields
| Exported fields.
| Wrapper for @'Path.pathSeparator'@.
| Wrapper for @'Path.searchPathSeparator'@.
Functions
| See @Path.takeDirectory@
| See @Path.takeFilename@
| See @Path.isAbsolute@
| Se... | |
Module : HsLua . Module . Path
Copyright : © 2021 - 2023 : MIT
Maintainer : module to work with file paths .
Module : HsLua.Module.Path
Copyright : © 2021-2023 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <>
Lua module to work with file paths.
-}
module ... |
061168083c751118aded6a022f47ad311ab5642d08d4a03b31820cba38c17cbe | lnostdal/SymbolicWeb | core.clj | (ns symbolicweb.core
;;(:require symbolicweb.init)
(:import clojure.lang.Ref
clojure.lang.Keyword
clojure.lang.Fn
clojure.lang.MapEntry
clojure.lang.Atom
clojure.lang.Delay)
(:require [clojure.math.numeric-tower :refer (round)])
(:require clojure.stacktrac... | null | https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/core.clj | clojure | (:require symbolicweb.init)
Faster than Cheshire.
(:require symbolicweb.examples.foundation)
TODO: Session level try/catch here: ((:exception-handler-fn @session) e).
TODO: Production / development modes needed here too. Logging, etc. etc...
TODO: This doesn't check what sort of response the client expects; the "Ac... | (ns symbolicweb.core
(:import clojure.lang.Ref
clojure.lang.Keyword
clojure.lang.Fn
clojure.lang.MapEntry
clojure.lang.Atom
clojure.lang.Delay)
(:require [clojure.math.numeric-tower :refer (round)])
(:require clojure.stacktrace)
(:require [clojure.string :... |
94df6a3ebfc24f6a2c124f30caf43b09784a7d6895d44dff52d13b8cafc7f846 | danieljharvey/mimsa | Typechecker.hs | module Language.Mimsa.Types.Typechecker
( module Language.Mimsa.Types.Typechecker.Scheme,
module Language.Mimsa.Types.Typechecker.Environment,
module Language.Mimsa.Types.Typechecker.Constraint,
module Language.Mimsa.Types.Typechecker.TypeConstructor,
module Language.Mimsa.Types.Typechecker.FoundPath,... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Types/Typechecker.hs | haskell | module Language.Mimsa.Types.Typechecker
( module Language.Mimsa.Types.Typechecker.Scheme,
module Language.Mimsa.Types.Typechecker.Environment,
module Language.Mimsa.Types.Typechecker.Constraint,
module Language.Mimsa.Types.Typechecker.TypeConstructor,
module Language.Mimsa.Types.Typechecker.FoundPath,... | |
9fcb8a0b2646779a1925a4899699e9b751f3d6e84beb97da3fc9819dc248015d | thoughtstem/game-engine | cutscene-util.rkt | #lang racket
(provide cutscene
change-cutscene
change-cutscene-by
page
move-a-sprite
scale-a-sprite
motion-item
;images-or-images?
;string-or-text-frame?
scroll-right
scroll-left
scroll-up
scroll-down
... | null | https://raw.githubusercontent.com/thoughtstem/game-engine/98c4b9e9b8c071818e564ef7efb55465cff487a8/entity-helpers/cutscene-util.rkt | racket | images-or-images?
string-or-text-frame?
"../components/backpack.rkt"
==== SPRITE MOTION FUNCTIONS ====
==== MOTION-ITEM STRUCT ====
===== CUT-SCENE =====
This is basically a mode-lambda/game-engine friendly version of (above ...)
item can be an image, text, sprite, or list of sprites
Now works with sprites!
ignore... | #lang racket
(provide cutscene
change-cutscene
change-cutscene-by
page
move-a-sprite
scale-a-sprite
motion-item
scroll-right
scroll-left
scroll-up
scroll-down
scroll-right-from-center
scroll-left-from-... |
6db9e66a4185deeccb59732b2ea363f8612e5563c201a823a7a25ca4667f2a9e | hasktorch/hasktorch | Extra.hs |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Managed.Type.Extra where
import Foreign.C.String
import Foreign.C.Typ... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Managed/Type/Extra.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Managed.Type.Extra where
import Foreign.C.String
import Foreign.C.Types
import Foreign
import Torch.Inte... |
4bbd141645fa227b24a5a06d88a8c87c597441f41d0732b65c6d03a258eba50f | DavidAlphaFox/aiwiki | srv_aiwiki_page.erl | -module(srv_aiwiki_page).
-export([pages/2,url/2,pagination/3]).
-include_lib("ailib/include/ai_url.hrl").
pages(PageIndex,PageCount)->
Pages = aiwiki_page_model:pagination(PageIndex,PageCount),
lists:map(
fun(M) ->
Page = ai_db_model:fields(M),
PublishedAt = maps:get(published_at,Page),
... | null | https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/service/srv_aiwiki_page.erl | erlang | -module(srv_aiwiki_page).
-export([pages/2,url/2,pagination/3]).
-include_lib("ailib/include/ai_url.hrl").
pages(PageIndex,PageCount)->
Pages = aiwiki_page_model:pagination(PageIndex,PageCount),
lists:map(
fun(M) ->
Page = ai_db_model:fields(M),
PublishedAt = maps:get(published_at,Page),
... | |
c631ce34932167f15913d55cd6be32c0db93a721b2abdd2f237399f855ef1c64 | SHoltzen/dice | Optimization.ml | open Stdlib
module CG = CoreGrammar
module StringMap = Map.Make(String)
open CG
let n = ref 0
let fresh () =
n := !n + 1;
(Format.sprintf "$%d" !n)
type tracker_entry = (bool * bool * float * string * string list)
type tracker = tracker_entry list
type env = CG.expr StringMap.t
let rec print_f (f... | null | https://raw.githubusercontent.com/SHoltzen/dice/83a52ead59f6c7c13c5c0f79dbd89eeb4e4e581a/lib/Optimization.ml | ocaml | Collect flips that need to be replaced
Replace the flips with corresponding variables
Prepare new flip to lift
Lift guard if there's a flip to be lifted within this expression
Lift g to the earliest matching flip that's been listed, which might be one that was just lifted or not, so just check all flips
Conc... | open Stdlib
module CG = CoreGrammar
module StringMap = Map.Make(String)
open CG
let n = ref 0
let fresh () =
n := !n + 1;
(Format.sprintf "$%d" !n)
type tracker_entry = (bool * bool * float * string * string list)
type tracker = tracker_entry list
type env = CG.expr StringMap.t
let rec print_f (f... |
ef4b4bca221dea0e26e3762f0c8af18d6fbed90e32cda26557aff75df57ebc9e | reactiveml/rml | def_types.ml | (**********************************************************************)
(* *)
(* ReactiveML *)
(* *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d3ac141bd9c6e3333b678716166d988ce04b5c80/compiler/typing/def_types.ml | ocaml | ********************************************************************
ReactiveML
... | Copyright 2002 , 2007 . All rights reserved .
version 1.0 .
- theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 )
- Verimag , CNRS Grenoble ( 2005 - 2006 )
- projet , ( 2006 - 2007 ) ... |
941b9ae9ea822cfe6ad08169c8e29092603baa0af6900757adb1d1de2e738dbb | flowyourmoney/malli-ts | ts.cljs | (ns malli-ts.ts
(:require [malli-ts.core :as mt]
[malli.core :as m]
[cljs-bean.core :as b]
["fs" :as fs]))
(defn k [s] (keyword s))
(defn sym [s] (symbol s))
(defn bean [o] (b/bean o))
(defn toClj [o] (b/->clj o))
(comment
(m/validate
[:map [:a int?]]
(toClj #js {"a" 1}... | null | https://raw.githubusercontent.com/flowyourmoney/malli-ts/813345ba6f6daca9a41a28207275b15125eba29d/src/malli_ts/ts.cljs | clojure | (ns malli-ts.ts
(:require [malli-ts.core :as mt]
[malli.core :as m]
[cljs-bean.core :as b]
["fs" :as fs]))
(defn k [s] (keyword s))
(defn sym [s] (symbol s))
(defn bean [o] (b/bean o))
(defn toClj [o] (b/->clj o))
(comment
(m/validate
[:map [:a int?]]
(toClj #js {"a" 1}... | |
73ca6ef312e5f8f7a4434824dafca571e983b977ce033ca0a0f01046e141eceb | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | Lib.hs | {-# LANGUAGE OverloadedStrings #-}
module Lib where
import Data.ByteString.Char8
import Network.HTTP.Client
import OpenAPI
import OpenAPI.Common
lineItemPeriod = InvoiceLineItemPeriod 10 80
checkoutLineItem =
mkPostCheckoutSessionsRequestBodyLineItems'
{ postCheckoutSessionsRequestBodyLineItems'Quantity = Jus... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/5d8f5da48273d006dd0e2cdb6d2425fb6b52f0c5/testing/level2/stripe-api/src/Lib.hs | haskell | # LANGUAGE OverloadedStrings # |
module Lib where
import Data.ByteString.Char8
import Network.HTTP.Client
import OpenAPI
import OpenAPI.Common
lineItemPeriod = InvoiceLineItemPeriod 10 80
checkoutLineItem =
mkPostCheckoutSessionsRequestBodyLineItems'
{ postCheckoutSessionsRequestBodyLineItems'Quantity = Just 4,
postCheckoutSessionsRequ... |
4957500b5c58372efd60dbc9430ee5cc95039dc711a1964ffa693e334486ae29 | l04m33/parenscript-react-examples | ps-compile.lisp | (require :parenscript)
(require :html-entities)
(in-package #:cl-user)
(defpackage #:ps-compile
(:use #:cl)
(:export #:batch-compile))
(in-package #:ps-compile)
(defun batch-compile (package-file ps-dir)
(let* ((ps:*js-target-version* "1.8.5")
(ps-path (pathname ps-dir))
(ps-wild
... | null | https://raw.githubusercontent.com/l04m33/parenscript-react-examples/104063d1b73ef4ed41c04817d8b9bae9a1e0948f/ps-compile.lisp | lisp | (require :parenscript)
(require :html-entities)
(in-package #:cl-user)
(defpackage #:ps-compile
(:use #:cl)
(:export #:batch-compile))
(in-package #:ps-compile)
(defun batch-compile (package-file ps-dir)
(let* ((ps:*js-target-version* "1.8.5")
(ps-path (pathname ps-dir))
(ps-wild
... | |
6bfc82ae8cbac1195bd60d67111639edbc085f93fae4e020ab1c3957b8317ee8 | eslick/cl-registry | patient-editor.lisp | ;; -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil -*-
(in-package :registry)
(registry-proclamations)
(defwidget patient-editor (composite)
((visible-p :accessor visible-p :initform nil)))
(defmethod render-widget-body ((widget patient-editor) &rest args)
(declare (ignore args))
(let* ((user (current-user ... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/clinician-home/patient-editor.lisp | lisp | -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil -*-
a provenance activity
(make-provenance obj :center (center obj))
Returns |
(in-package :registry)
(registry-proclamations)
(defwidget patient-editor (composite)
((visible-p :accessor visible-p :initform nil)))
(defmethod render-widget-body ((widget patient-editor) &rest args)
(declare (ignore args))
(let* ((user (current-user t))
(center (current-center))
(clinici... |
10d76e72a27302e57fe77fd062a8d192b3df0053d70ba4ff50dc25e1beab36d9 | juspay/medea | Type.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Data.Medea.Parser.Spec.Type
( Specification (..),
defaultSpec,
parseSpecification,
)
where
import Data.Medea.Parser.Primitive
( Identifier,
ReservedIdentifier (..),
parseIdentifier,
p... | null | https://raw.githubusercontent.com/juspay/medea/b493dd96f7f8d465ec95d3dafa0da430625c9c87/src/Data/Medea/Parser/Spec/Type.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Data.Medea.Parser.Spec.Type
( Specification (..),
defaultSpec,
parseSpecification,
)
where
import Data.Medea.Parser.Primitive
( Identifier,
ReservedIdentifier (..),
parseIdentifier,
p... | |
5703709d0005fe2fad7e4f97976fe7b0652c02103aa98f2c97f0375363d9c3c4 | bmeurer/ocaml-experimental | typecheck.ml | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/browser/typecheck.ml | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open StdLabels
open Tk
open P... |
c23554f1cdbf9f49944cbb8d93e8e4a1c4e9f5f86ed8d9c1de53a84058e0d764 | Innf107/cobble-compiler | Maybe.hs | module Cobble.Util.Maybe where
import Cobble.Prelude
withDefault :: Maybe a -> a -> a
withDefault = flip fromMaybe
(?.) :: Maybe a -> a -> a
(?.) = withDefault
infix 0 ?.
| null | https://raw.githubusercontent.com/Innf107/cobble-compiler/b1d75e1cb455a8cbdac80057ce77d4fe67198570/src/Cobble/Util/Maybe.hs | haskell | module Cobble.Util.Maybe where
import Cobble.Prelude
withDefault :: Maybe a -> a -> a
withDefault = flip fromMaybe
(?.) :: Maybe a -> a -> a
(?.) = withDefault
infix 0 ?.
| |
476df0a0ad77ca114789431d0e22ed62ddb5db44e21dde8f95af4b04c3d10339 | Nick-Chapman/niz | eval.mli |
module F(X : sig
val image0 : Mem.t
val hide_unimplemented : bool
end) : sig
type t
type save_state [@@deriving sexp]
type callbacks = {
output : string -> unit;
trace : Tracing.step -> unit;
save : save_state -> bool;
restore : unit -> save_state option;
}
val... | null | https://raw.githubusercontent.com/Nick-Chapman/niz/603a437ace7c6babcb08648a98c6ace099e99216/lib/eval.mli | ocaml | None: game executed quit opcode before any user input
None: game executed quit opcode |
module F(X : sig
val image0 : Mem.t
val hide_unimplemented : bool
end) : sig
type t
type save_state [@@deriving sexp]
type callbacks = {
output : string -> unit;
trace : Tracing.step -> unit;
save : save_state -> bool;
restore : unit -> save_state option;
}
val... |
5dd2f9b84761c9de4c6706340a2fbdeb4c4762664fb131e47d96d7bfd74df2af | erlymon/erlymon | em_ywt_protocol.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_hardware/protocols/em_ywt_protocol.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
851d608c91824fe83813353ad9b9c378be97fa3d1ff040b34f041b1e75f3819e | nuprl/gradual-typing-performance | csv.rkt | @Package csv
;;; @Subtitle Comma-Separated Value (CSV) Utilities in Scheme
;;; @HomePage -scheme/
@Author
@Version 0.10
@Date 2010 - 04 - 13
@PLaneT neil / csv:1:6
$ I d : csv.ss , v 1.199 2010/04/13 17:56:20 neilpair Exp $
;;; @legal
;;; Distributed under the same t... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/2htdp/private/csv/csv.rkt | racket | @Subtitle Comma-Separated Value (CSV) Utilities in Scheme
@HomePage -scheme/
@legal
Distributed under the same terms as Racket, by permission.
@end legal
@section Introduction
The @b{csv} Scheme library provides utilities for reading various kinds of
what are commonly known as ``comma-separated value'' (C... | @Package csv
@Author
@Version 0.10
@Date 2010 - 04 - 13
@PLaneT neil / csv:1:6
$ I d : csv.ss , v 1.199 2010/04/13 17:56:20 neilpair Exp $
#lang scheme/base
One of the main uses of this library is to import data from old crusty
@uref{/~oleg / ftp / Scheme / SXML.htm... |
0ceeb5209e0f33e3b2c98e7ca1bc82b83212253c90775facec66d1d497807926 | elarous/O2SN | views.cljs | (ns o2sn.profile.views
(:require [reagent.core :as r]
[re-frame.core :as rf]
["semantic-ui-react" :as ui]
[bidi.bidi :refer [path-for]]
[o2sn.common.routes :refer [routes]]))
(defn infos-segment []
[:div.infos
[:div.img-container
[:img {:src @(rf/subscribe [:p... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/profile/views.cljs | clojure | (ns o2sn.profile.views
(:require [reagent.core :as r]
[re-frame.core :as rf]
["semantic-ui-react" :as ui]
[bidi.bidi :refer [path-for]]
[o2sn.common.routes :refer [routes]]))
(defn infos-segment []
[:div.infos
[:div.img-container
[:img {:src @(rf/subscribe [:p... | |
b32d614415db273572003d8c82326eef8a7c5a2f4c52dc6d6eb6a7ea7d6554d5 | Breezeemr/hitch | cljc_utils.cljc | (ns hitch.cljc-utils
#?(:cljs
(:require-macros [hitch.cljc-utils :refer [if-clj-target defsatisfies]])
:clj
(:import (java.util.concurrent ConcurrentHashMap))))
(defmacro if-clj-target [clj-body cljs-body]
#?(:clj
(if (contains? &env '&env)
`(if (:ns ~'&env) ~cljs-body ~clj-body)
... | null | https://raw.githubusercontent.com/Breezeemr/hitch/79efea3cbf601a56060237fd9add2c0b68024a03/src/hitch/cljc_utils.cljc | clojure | CLJS is already fast
copied and modified from manifold.utils/fast-satisfies
Default case is unreachable, but we need to make sure ConcurrentHashMap is | (ns hitch.cljc-utils
#?(:cljs
(:require-macros [hitch.cljc-utils :refer [if-clj-target defsatisfies]])
:clj
(:import (java.util.concurrent ConcurrentHashMap))))
(defmacro if-clj-target [clj-body cljs-body]
#?(:clj
(if (contains? &env '&env)
`(if (:ns ~'&env) ~cljs-body ~clj-body)
... |
f4d27f8d4caddafa18311120ca8d77b5a5eb04f73faa0254e9e27a293ca2fb4c | sgbj/MaximaSharp | specfn.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/specfn.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
**************... |
(in-package :maxima)
(macsyma-module specfn)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(load-macsyma-macros rzmac)
(load-macsyma-macros mhayat)
(defmacro mnumericalp (arg)
`(or (floatp ,arg) (and (or $numer $float) (integerp ,arg))))
(declare-top (special $zerobern ivars key-vars ... |
82f13120355bdc7b978e6b5cf8e5c13546b7c560721ed207fcb668b5acc1320c | OCADml/OCADml | plane.mli | * Normalized cartesian plane operations facilitating conversion between 2d
and 3d space .
and 3d space. *)
(** Normalized cartesian equation of a plane.
The type {!t} contains the coefficients {b A}, {b B}, {b C}, and {b D},
which describe the cartesian equation of a plane where [Ax + By + Cz = D]. ... | null | https://raw.githubusercontent.com/OCADml/OCADml/f8cd87da86cd5ea4c31ec169c796640ffdc6bdee/lib/plane.mli | ocaml | * Normalized cartesian equation of a plane.
The type {!t} contains the coefficients {b A}, {b B}, {b C}, and {b D},
which describe the cartesian equation of a plane where [Ax + By + Cz = D].
* [to_tup t]
Return the plane [t] as a tuple of its coefficients.
* [of_normal ?point normal]
Create a normalized ... | * Normalized cartesian plane operations facilitating conversion between 2d
and 3d space .
and 3d space. *)
type t
val to_tup : t -> float * float * float * float
* [ to_v4 t ]
Return the plane [ t ] as a 4d vector of coefficients .
Return the plane [t] as a 4d vector of coefficients. *)
val to_v4 : t... |
1ef9ebea200825d6da85a58620b3e497b48752fbf285a9d30276b6b30bd2f191 | ragkousism/Guix-on-Hurd | cvs-download.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2014 Sree < >
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 pu... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/cvs-download.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 , 2016 < >
Copyright © 2014 Sree < >
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 (guix cvs-download)
#:use... |
c4d9712fda100a17ce58aa8d9e59a9a9ba78f02ea20bad08a38c8c9d815a6a95 | pveber/biotk | gLoc.mli | type t = {
chr : string ;
lo : int ;
hi : int ;
} [@@deriving equal, compare, sexp]
val of_string : string -> (t, [> `Parse_error]) result
val of_string_exn : string -> t
val to_string : t -> string
(** String representation of a location, as <chr>:<start>-<end> *)
val range : t -> Range.t
val size : t -> int... | null | https://raw.githubusercontent.com/pveber/biotk/0906a650a324f020c9caa3377233ac3a1f217921/lib/gLoc.mli | ocaml | * String representation of a location, as <chr>:<start>-<end>
* [relative loc x a b] is the location obtained considering [a] and
[b] as relative coordinates inside [loc]
* [zoom l z] is a location of width [z *. float (Location.width l)] | type t = {
chr : string ;
lo : int ;
hi : int ;
} [@@deriving equal, compare, sexp]
val of_string : string -> (t, [> `Parse_error]) result
val of_string_exn : string -> t
val to_string : t -> string
val range : t -> Range.t
val size : t -> int
val strictly_before : t -> t -> bool
val intersects : t -> t -> ... |
529fab696690dfa8ac7c102842f47a8930a247a4e788f9c3a565b2f0135fbe21 | pauleve/pint | pintexport.ml |
open PintTypes
open AutomataNetwork
open An_export
open An_transformers
let make_partial spec (an, ctx) =
let aset = An_input.parse_string An_parser.automata_set spec
in
let aset = SSet.fold (fun a -> ISet.add (resolve_sig_a an a)) aset ISet.empty
in
let an = partial an aset
and ctx = IMap.filter (fun a _... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/pintexport.ml | ocaml |
open PintTypes
open AutomataNetwork
open An_export
open An_transformers
let make_partial spec (an, ctx) =
let aset = An_input.parse_string An_parser.automata_set spec
in
let aset = SSet.fold (fun a -> ISet.add (resolve_sig_a an a)) aset ISet.empty
in
let an = partial an aset
and ctx = IMap.filter (fun a _... | |
78a63c1346043341a6bac9a48ff81ece625f3cc1dd7f04a9049c0c9ec5a5efc6 | yariv/twoorl | following.erl | This file is part of Twoorl .
%%
%% Twoorl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later version.
%%
%% Twoorl is distributed in the ho... | null | https://raw.githubusercontent.com/yariv/twoorl/77b6bea2e29283d09a95d8db131b916e16d2960b/src/components/following.erl | erlang |
Twoorl is free software: you can redistribute it and/or modify
(at your option) any later version.
Twoorl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License f... | This file is part of Twoorl .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
along with . If not , see < / > .
Copyright , 2008
@author < > [ ... |
aef2baefb0bdc49cef8533bcd7abbb3499c436ee19493379ea100253877026a6 | graninas/Functional-Design-and-Architecture | Runtime.hs | module Andromeda.Hardware.Impl.Runtime where
import qualified Andromeda.Hardware.Common as T
import qualified Andromeda.Hardware.Domain as T
import qualified Andromeda.Hardware.Impl.Service as SImpl
import qualified Andromeda.Hardware.Impl.Device.Types as TImpl
import qualified Data.Map as Map
type Devices = Map.... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/a1165441f0dd5f70882dd528d726181c24af3a2c/Second-Edition-Manning-Publications/BookSamples/CH05/Section5p3/src/Andromeda/Hardware/Impl/Runtime.hs | haskell | module Andromeda.Hardware.Impl.Runtime where
import qualified Andromeda.Hardware.Common as T
import qualified Andromeda.Hardware.Domain as T
import qualified Andromeda.Hardware.Impl.Service as SImpl
import qualified Andromeda.Hardware.Impl.Device.Types as TImpl
import qualified Data.Map as Map
type Devices = Map.... | |
4e710d22a0358937b7421184be9071f607f4f59446a057bdadc98f1f08a08549 | JoelSanchez/ventas | debug.cljs | (ns ventas.utils.debug
(:require
[cljs.pprint :as pprint]))
(defn pprint-sub [sub]
[:pre (with-out-str (pprint/pprint @sub))])
| null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/utils/debug.cljs | clojure | (ns ventas.utils.debug
(:require
[cljs.pprint :as pprint]))
(defn pprint-sub [sub]
[:pre (with-out-str (pprint/pprint @sub))])
| |
0b2ecd5490dcce672dab29d3ec6737e25c6f13bf2a2351f5d30c1eb80b685ca7 | ocaml/dune | coq_lib.mli | open Import
(* This file is licensed under The MIT License *)
( c ) MINES ParisTech 2018 - 2019
Written by :
type t
val name : t -> Coq_lib_name.t
val implicit : t -> bool
(** ml libraries *)
val libraries : t -> (Loc.t * Lib.t) list Resolve.t
val src_root : t -> Path.Build.t
val obj_root ... | null | https://raw.githubusercontent.com/ocaml/dune/d6faeac7e9c35cf9e1f53660b12d90631465bbda/src/dune_rules/coq/coq_lib.mli | ocaml | This file is licensed under The MIT License
* ml libraries
* Return the list of dependencies needed for compiling this library | open Import
( c ) MINES ParisTech 2018 - 2019
Written by :
type t
val name : t -> Coq_lib_name.t
val implicit : t -> bool
val libraries : t -> (Loc.t * Lib.t) list Resolve.t
val src_root : t -> Path.Build.t
val obj_root : t -> Path.Build.t
val package : t -> Package.t option
val theories... |
3a3a05ea35228e79fc3bb00b79d286adf9ddae4d282f5880a7e4a6ee8fab5508 | jepsen-io/voltdb | multi_test.clj | (ns jepsen.voltdb.multi-test
(:require [clojure.test :refer :all]
[jepsen.voltdb-test :refer [tarball]]
[jepsen.voltdb.multi :refer :all]
[jepsen.core :as jepsen]))
(defn run [t]
(is (:valid? (:results (jepsen/run! t)))))
(deftest a-test
(loop []
(when (run (multi-test {:... | null | https://raw.githubusercontent.com/jepsen-io/voltdb/7c29d0d6caa29b85143d6942e078d7c0bdb82e35/test/jepsen/voltdb/multi_test.clj | clojure | (ns jepsen.voltdb.multi-test
(:require [clojure.test :refer :all]
[jepsen.voltdb-test :refer [tarball]]
[jepsen.voltdb.multi :refer :all]
[jepsen.core :as jepsen]))
(defn run [t]
(is (:valid? (:results (jepsen/run! t)))))
(deftest a-test
(loop []
(when (run (multi-test {:... | |
c21f2052cdf9408dc6d02279046908cf16de72dba757e8d42cb0f93265af861f | clj-kondo/clj-kondo | set.clj | (ns clj-kondo.impl.types.clojure.set
{:no-doc true})
(def clojure-set
{'union
{:arities {:varargs {:min-arity 0
:args '[{:op :rest
:spec :nilable/set}]
:ret :nilable/set}}}
'intersection
{:arities {:varargs {:args '[:nilable/... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/src/clj_kondo/impl/types/clojure/set.clj | clojure | (ns clj-kondo.impl.types.clojure.set
{:no-doc true})
(def clojure-set
{'union
{:arities {:varargs {:min-arity 0
:args '[{:op :rest
:spec :nilable/set}]
:ret :nilable/set}}}
'intersection
{:arities {:varargs {:args '[:nilable/... | |
f9276d4488f3a535864fe1835e364b02b7cc3e42e24ab9189285bf17ad2d368b | DHSProgram/DHS-Indicators-SPSS | RH_age_period_IR.sps | * Encoding: windows-1252.
*****************************************************************************************************
* Program: RH_age_period_IR.sps
* Purpose: compute the age variable and set the period for the analysis
* Author: Shireen Assaf and translated to SPSS by Ivana Bjelic
* Date last ... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/5de4f2b032646a99fe144a1adeaf09a82d8026a6/Chap09_RH/RH_age_period_IR.sps | scheme | * Encoding: windows-1252.
*****************************************************************************************************
* Program: RH_age_period_IR.sps
* Purpose: compute the age variable and set the period for the analysis
* Author: Shireen Assaf and translated to SPSS by Ivana Bjelic
* Date last ... | |
cb60317818a46b5860b6c6f3203c6832b72e567cfe9dc86475b82286285644da | k-stz/arcsynthesis | vert-position-offset.lisp | (in-package #:arc-3.1)
(defvar *data-directory*
(merge-pathnames #p "3-chapter/data/"
(asdf/system:system-source-directory :arcsynthesis)))
(defvar out *standard-output*) (defvar dbg *debug-io*) (defvar err *error-output*)
(defparameter *vertex-positions* (gl:alloc-gl-array :float 12))
;;vertices followed by... | null | https://raw.githubusercontent.com/k-stz/arcsynthesis/586943e74a88b60bfb9d0e16de42635a0904bf5f/3-chapter/vert-position-offset.lisp | lisp | vertices followed by colors, also this time an equilateral triangle instead of a
buffer object handle
wow, we don't even need *x-offset*, *y-offset* (lol!)
this is sorta cool, it in effect creates a value on the range [0,
fun: substitute with cos,sin,tan and see how it beautifully moves in its patterns!
oh c'mon how... | (in-package #:arc-3.1)
(defvar *data-directory*
(merge-pathnames #p "3-chapter/data/"
(asdf/system:system-source-directory :arcsynthesis)))
(defvar out *standard-output*) (defvar dbg *debug-io*) (defvar err *error-output*)
(defparameter *vertex-positions* (gl:alloc-gl-array :float 12))
isosceles
(defparamete... |
31d31b91b721e792bed445f936de090382e5e4cd0b93c1a7c5728f9a12bd95c0 | mhwombat/som | ListQC.hs | ------------------------------------------------------------------------
-- |
Module : Data . Datamining . Pattern . ListQC
Copyright : ( c ) 2012 - 2022
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- QuickCheck tests.
--
--------------... | null | https://raw.githubusercontent.com/mhwombat/som/8eb201801a5de407fd9df2c9bfc872b0d748e3a1/test/Data/Datamining/Pattern/ListQC.hs | haskell | ----------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
QuickCheck tests.
----------------------------------------------------------------------
| Weights and vectors that are all the same length
| We... | Module : Data . Datamining . Pattern . ListQC
Copyright : ( c ) 2012 - 2022
module Data.Datamining.Pattern.ListQC
(
test,
UnitInterval(FromDouble),
) where
import Data.Datamining.Pattern.List qualified as L
import Data.Datamining.Pattern.Numeric (doubleDiff,
... |
db705f3009f56c8e66dcc1f013bf4feb7d51426cce1c928e4eda4076d8626444 | S8A/htdp-exercises | ex222.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex222) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex222.rkt | racket | about the language level of this file in a form that our tools can easily process.
Constants :.
# of blocks, horizontally
blocks are squares
red squares with black rims
Data definitions :.
(make-tetris Block Landscape)
A Landscape is one of:
– '()
– (cons Block Landscape)
A Block is a structure:
interpr... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex222) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "itunes.rkt"... |
30c28dbb61919ff656ba55293e51a0930b44f2a2cabcebb740721663c5a0f1b3 | ucsd-progsys/dsolve | bfnum.ml | datatype 'a Tree with nat =
E(0) | {sl:nat, sr:nat} T(1+sl+sr) of 'a * 'a Tree(sl) * 'a Tree(sr)
datatype 'a TreeList with (nat, nat) =
Tnil(0,0) | {n:nat,s:nat,s':nat} Tcons(s+s',n+1) of 'a Tree(s) * 'a TreeList(s',n)
fun('a) refTree E = E
| refTree (T (x, a, b)) = T (ref 0, refTree a, refTree b)
withtype {s:n... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/bfnum.ml | ocaml | datatype 'a Tree with nat =
E(0) | {sl:nat, sr:nat} T(1+sl+sr) of 'a * 'a Tree(sl) * 'a Tree(sr)
datatype 'a TreeList with (nat, nat) =
Tnil(0,0) | {n:nat,s:nat,s':nat} Tcons(s+s',n+1) of 'a Tree(s) * 'a TreeList(s',n)
fun('a) refTree E = E
| refTree (T (x, a, b)) = T (ref 0, refTree a, refTree b)
withtype {s:n... | |
76f70e486ddd49bb36556922d1e230fedaa4c6798baacb045daa5ced184504b2 | simingwang/emqx-plugin-kafkav5 | pubkey_ssh.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2011 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/public_key-1.12/src/pubkey_ssh.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2011 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(pubkey_ssh).
-include("public_key.hrl").
-include("pubkey_moduli.hrl").
-export([decode/2, encode/2,
dh_... |
c856f7c1a535bcb66099ab4cfa68f0fef21ac5d81bcecf8f2a77f035b61aa7e1 | ghollisjr/cl-ana | test.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/histogram/test.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
62511c0f4f9e597229b11b13de3b8ce26bbfd5830b74cf114121bfaebe83ee40 | helium/gateway-config | gateway_gatt_char_wifi_remove.erl | -module(gateway_gatt_char_wifi_remove).
-include("gateway_gatt.hrl").
-include("pb/gateway_gatt_char_wifi_remove_pb.hrl").
-behavior(gatt_characteristic).
-export([
init/2,
uuid/1,
flags/1,
write_value/2,
handle_info/2
]).
-record(state, {path :: ebus:object_path()}).
uuid(_) ->
?UUID_GATEW... | null | https://raw.githubusercontent.com/helium/gateway-config/5a98da0d2711a87f67c80ec6ea9f710dbed727ff/src/gateway_gatt_char_wifi_remove.erl | erlang | -module(gateway_gatt_char_wifi_remove).
-include("gateway_gatt.hrl").
-include("pb/gateway_gatt_char_wifi_remove_pb.hrl").
-behavior(gatt_characteristic).
-export([
init/2,
uuid/1,
flags/1,
write_value/2,
handle_info/2
]).
-record(state, {path :: ebus:object_path()}).
uuid(_) ->
?UUID_GATEW... | |
8728059bac8ebbcc5690b1e7c1a5178f17d80b9f1a121f637685c4614395cd51 | diffusionkinetics/open | Types.hs | # LANGUAGE TupleSections #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleContexts #
# LANGUAGE DefaultSignatures #
# LANGUAGE InstanceSigs #
# LANGUAGE OverloadedStrings , ScopedTypeVariables , DeriveGeneric , KindSignatures , DataKinds , TypeApplications , GADTs ,
... | null | https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/youido/lib/Youido/Types.hs | haskell | ------------------------------------------------------------------------
- Code copied from the web-routes library
------------------------------------------------------------------------
| match on a specific string
| match on any string
it's instances all the way down
requestParser = do
form <- requestPars... | # LANGUAGE TupleSections #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleContexts #
# LANGUAGE DefaultSignatures #
# LANGUAGE InstanceSigs #
# LANGUAGE OverloadedStrings , ScopedTypeVariables , DeriveGeneric , KindSignatures , DataKinds , TypeApplications , GADTs ,
... |
164c84c3586453f728d30ba0fb8fb38d2ef437c19e7f8b6c45de3ecf86299276 | erlio/vmq_webhooks | vmq_webhooks_app.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_webhooks/1ffff84f954858b9c183c9e1f3f9b2675955e37f/src/vmq_webhooks_app.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_webhooks_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
vmq... |
41b27a17ffb06d8983db3990a69d15d2c5a17b86861cfda0ce6b1d566490a60a | Helium4Haskell/helium | EnumInt.hs | main = ( take 10 [1..]
, take 10 [1,3..]
, [1,3..10]
, [1..10]
)
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/EnumInt.hs | haskell | main = ( take 10 [1..]
, take 10 [1,3..]
, [1,3..10]
, [1..10]
)
| |
0197c6cf4471b93c5fbad51ad63c2d4a27a6bc591a81acd9271266a6b4f2c37e | symbiont-io/detsys-testkit | Main.hs | module Main where
import qualified TastyDiscover
import Test.Tasty
------------------------------------------------------------------------
main :: IO ()
main = defaultMain =<< TastyDiscover.tests
| null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/test/Main.hs | haskell | ---------------------------------------------------------------------- | module Main where
import qualified TastyDiscover
import Test.Tasty
main :: IO ()
main = defaultMain =<< TastyDiscover.tests
|
2d8fc551f0323fda8692f0cc6e9ec199008cc19e2d439a296ac789f237fae5ec | pfdietz/ansi-test | format-newline.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Nov 27 08:07:16 2004
Contains : Tests of ~<newline >
(def-format-test format.newline.1
(concatenate 'string "~" (string #\Newline) " X")
nil "X")
(def-format-test format.newline.2
(concatenate 'string "A~:" (string #\Newline) " X")
nil "A X")
(... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-newline.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Sat Nov 27 08:07:16 2004
Contains : Tests of ~<newline >
(def-format-test format.newline.1
(concatenate 'string "~" (string #\Newline) " X")
nil "X")
(def-format-test format.newline.2
(concatenate 'string "A~:" (string #\Newline) " X")
nil "A X")
(def-format-test format.n... |
30613dcf3fc46c0c237661bfd612f674bfffb983f50bc023a5149eb5125a14a1 | dmjio/stripe | Invoice.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
-------------------------------------------
-- |
-- Module : Web.Stripe.Invoice
Copyright : ( c ) , 2014
-- Maintainer :
-- Stability : experimental
-- Portabili... | null | https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-core/src/Web/Stripe/Invoice.hs | haskell | -----------------------------------------
|
Module : Web.Stripe.Invoice
Maintainer :
Stability : experimental
Portability : POSIX
@
main :: IO ()
main = do
case result of
(Left stripeError) -> print stripeError
(Right (Customer { customerId = cid })) ->
do result <- stripe config... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
Copyright : ( c ) , 2014
< https:/\/\stripe.com / docs / api#invoices >
{ -\ # LANGUAGE OverloadedStrings \#- }
import Web . Stripe
import Web . Stripe . Customer... |
95c8494a90b4b6a64632230b580eed043db934bd4060e4dca9d891281e669adf | rjnw/sham | mc.rkt | #lang racket
(require sham/md
sham/private/env
sham/llvm/ffi/all
sham/llvm/ir/ast
sham/llvm/ir/env
sham/llvm/jit/env)
(provide (all-defined-out))
(define (initialize-mcjit env #:opt-level [opt-level 1])
(checked-initialize-llvm)
(unless (llvm-env? env)
(error 'sha... | null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-llvm/sham/llvm/jit/mc.rkt | racket | (error 'sham/TODO "external-mapping: ~a\n" uintptr) | #lang racket
(require sham/md
sham/private/env
sham/llvm/ffi/all
sham/llvm/ir/ast
sham/llvm/ir/env
sham/llvm/jit/env)
(provide (all-defined-out))
(define (initialize-mcjit env #:opt-level [opt-level 1])
(checked-initialize-llvm)
(unless (llvm-env? env)
(error 'sha... |
f1f820f61076cdc90a3028df06ebaeb83a78d61ac70ce92fc0afc9e6c68f098e | blarney-lang/blarney | ClockReset.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
|
Module : . Core . ClockReset
Description : Types for clocks and resets
Copyright : ( c ) , 2021
License : MIT
Maintainer :
Stability : experimental
Module : B... | null | https://raw.githubusercontent.com/blarney-lang/blarney/d98bc64331ab60fdd47ab4484b0913be24ca460d/Haskell/Blarney/Core/ClockReset.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeOperators #
Standard imports
Blarney imports |
|
Module : . Core . ClockReset
Description : Types for clocks and resets
Copyright : ( c ) , 2021
License : MIT
Maintainer :
Stability : experimental
Module : Blarney.Core.ClockReset
Description : Types for clocks and resets
Copyright : (c) Matthew Naylor, 2021
License :... |
dc11b13db4732e8e34b12956f69a5d0aaeb6bce9c3bcf65265f391e2d2462d67 | jayunit100/RudolF | readshiftx.clj | (ns ConnjurRV.readshiftx
(:use [clojure.contrib.str-utils2 :only (split-lines)]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; parse-shiftx
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn convert-types
""
[shiftx-map]
{:resid (Integer/parseInt (shiftx-map :resid))
:shift (Floa... | null | https://raw.githubusercontent.com/jayunit100/RudolF/8936bafbb30c65c78b820062dec550ceeea4b3a4/bioclojure/src/ConnjurRV/readshiftx.clj | clojure |
parse-shiftx
ignore header ??
interesting amino acid
just because I feel like (B is not real)
?? are these the right keys??
| (ns ConnjurRV.readshiftx
(:use [clojure.contrib.str-utils2 :only (split-lines)]))
(defn convert-types
""
[shiftx-map]
{:resid (Integer/parseInt (shiftx-map :resid))
:shift (Float/parseFloat (shiftx-map :shift))
:aatype (shiftx-map :aatype)
:atomname (shiftx-map :atomname)})
(defn parse-shiftx
"St... |
bfddad71a38fb05f17fd0dc580f1d7c8150e633d45c4d4d6575a24a6919d864a | composewell/unicode-data | SecuritySpec.hs | # , OverloadedLists #
module Unicode.Char.Identifiers.SecuritySpec
( spec
) where
import Control.Monad (when)
import Data.Foldable (traverse_)
import Unicode.Char.Identifiers.Security
import Test.Hspec
spec :: Spec
spec = do
describe "identifierTypes" do
it "some values" do
let check ts... | null | https://raw.githubusercontent.com/composewell/unicode-data/adbd767e915330613ae36c1db4005c3c894c4c5b/unicode-data-security/test/Unicode/Char/Identifiers/SecuritySpec.hs | haskell | [TODO] more invariants | # , OverloadedLists #
module Unicode.Char.Identifiers.SecuritySpec
( spec
) where
import Control.Monad (when)
import Data.Foldable (traverse_)
import Unicode.Char.Identifiers.Security
import Test.Hspec
spec :: Spec
spec = do
describe "identifierTypes" do
it "some values" do
let check ts... |
904df0dadda745e2e3c4be6f2fd6eae7615407f4db430bab8431c4fb79ec21b7 | chef/chef-server | oc_chef_wm_acl.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
%% ex: ts=4 sw=4 et
@author < >
Copyright 2014 Chef Software , 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 complia... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_acl.erl | erlang | ex: ts=4 sw=4 et
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 permissions and limitations
under the License.
chef_wm beh... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
@author < >
Copyright 2014 Chef Software , 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 ... |
d7cae651e0fa404ad66dfcd6c0968e2122cd67135d3f240b841f591054e9ca4a | ijvcms/chuanqi_dev | player_month_cache.erl | %%%-------------------------------------------------------------------
@author apple
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 30 . 2015 19:19
%%%-------------------------------------------------------------------
-module(player_month_cache).
-include("common.hrl").
-include("cache.hrl").
-exp... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/charge/player_month_cache.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author apple
( C ) 2015 , < COMPANY >
Created : 30 . 2015 19:19
-module(player_month_cache).
-include("common.hrl").
-include("cache.hrl").
-export([
select_row/1,
select_all/1,
insert/1,
delete/1,
update/2
]).
select_row(PlayerId) ->
db_cache_lib:select_row(?DB_PLAYER_MONTH,PlayerId).
select_all(Pl... |
3f58194f213431f19cd41dbf9baf002a4f5063e0e2cac54afda2682d40a636a0 | unisonweb/unison | Sync.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Unison.Share.Sync
( -- ** Get causal hash by path
getCausalHashByPath,
GetCausalHashByPathError (..),
-- ** Push
checkAndSetPush,
CheckAndSetPushError (..),
fastForwardPush,
FastForwardPushError (..),
-- ** Pull
pull,
... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/unison-cli/src/Unison/Share/Sync.hs | haskell | ** Get causal hash by path
** Push
** Pull
----------------------------------------------------------------------------------------------------------------------
Pile of constants
| The maximum number of downloader threads, during a pull.
| The maximum number of push workers at a time. Each push worker reads from... | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Unison.Share.Sync
getCausalHashByPath,
GetCausalHashByPathError (..),
checkAndSetPush,
CheckAndSetPushError (..),
fastForwardPush,
FastForwardPushError (..),
pull,
PullError (..),
)
where
import Control.Concurrent.STM
import ... |
40bc34fbbf8feb7e9ba0a620dda93e2d764e00dd816c27c6deb223823cc14293 | TheBestTvarynka/Lisp-SQL-Parser | stack.lisp |
(defstruct stack
(list '() :type list)
)
(defun stack-push (value stack)
(setf (stack-list stack) (append (list value) (stack-list stack)))
stack
)
(defun stack-pop (stack)
(setf (stack-list stack) (cdr (stack-list stack)))
stack
)
(defun stack-top (stack)
(car (stack-list stack))
)
(defun sta... | null | https://raw.githubusercontent.com/TheBestTvarynka/Lisp-SQL-Parser/d8f1283fc00e394d76e4ac28e434c99d1bee72aa/src/stack/stack.lisp | lisp |
||# |
(defstruct stack
(list '() :type list)
)
(defun stack-push (value stack)
(setf (stack-list stack) (append (list value) (stack-list stack)))
stack
)
(defun stack-pop (stack)
(setf (stack-list stack) (cdr (stack-list stack)))
stack
)
(defun stack-top (stack)
(car (stack-list stack))
)
(defun sta... |
1fa81a342275857d5c91d1030825b5b9c1745325e07df8a1ad92456fa4f9c3cb | kadena-io/chainweb-mining-client | Target.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module: Test.Target
Copyright : Copyright © 2021 Kadena LLC .
License : MIT
Maintainer : < >
-- Stability: experime... | null | https://raw.githubusercontent.com/kadena-io/chainweb-mining-client/e051c1faab0ffb85d7c0d454763e77af2646384d/test/Test/Target.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module: Test.Target
Stability: experimental
internal modules
-------------------------------------------------------------------------- --
-------------------------------------------------------------------------- --
Tests
------------------------------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : Copyright © 2021 Kadena LLC .
License : MIT
Maintainer : < >
TODO
module Test.Target
( tests
) where
import Control.Monad
import Data.Bits
imp... |
713ea1422d888fcdd0f3fe991da393d1b0c1ac02f6434573fe91a2a648dfb88e | Feldspar/feldspar-language | Value.hs | # LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses , OverloadedStrings #
{-# OPTIONS_GHC -w #-}
module Onnx.TensorShapeProto.Dimension.Value where
import Prelude ((+), (/), (++), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
i... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Onnx/Onnx/TensorShapeProto/Dimension/Value.hs | haskell | # OPTIONS_GHC -w # | # LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses , OverloadedStrings #
module Onnx.TensorShapeProto.Dimension.Value where
import Prelude ((+), (/), (++), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified GHC.Gene... |
021c0a9d10c41676f698e1fbb6d1ebf82a6b206a87ec87cea84597a0002e7257 | bobatkey/sott | declarations.ml | let rec process_decls ctxt = function
| [] ->
Ok ()
| `Def (id, ty, tm)::decls ->
(match Checker.is_type ctxt ty with
| Error msg ->
Format.eprintf "@[<v>ERR: Checking '%s''s type: %a@]\n%!"
id
Pprint_error.pp msg;
Error ()
| Ok () ->
let... | null | https://raw.githubusercontent.com/bobatkey/sott/233a5b23982c02d2435d645c7274edfe44fc248d/core/declarations.ml | ocaml | let rec process_decls ctxt = function
| [] ->
Ok ()
| `Def (id, ty, tm)::decls ->
(match Checker.is_type ctxt ty with
| Error msg ->
Format.eprintf "@[<v>ERR: Checking '%s''s type: %a@]\n%!"
id
Pprint_error.pp msg;
Error ()
| Ok () ->
let... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.