_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 |
|---|---|---|---|---|---|---|---|---|
7845daaed2612dcf330e193f186affaaa1ca67ac05186c093a2764b2bdfeea72 | bootstrapworld/curr | save-source.rkt | (module
save-source
scheme
(require lang/prim
racket/bool
rackunit
(for-syntax racket/base))
(provide define/save-source)
(provide-higher-order-primitive procedure-name (fn))
(provide-higher-order-primitive procedure-source (fn))
(provide set-evaluates-to-string!)
(pro... | null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/blank-course/resources/source-files/Teachpacks/save-source.rkt | racket | procedure-name : Function -> Symbol
procedure-source : Function -> Code
any->string : any number of any kind of thing -> string
Make string representations of each input, and concatenate
them into a single string.
for ease of testing:
e : String -> String
Transform every instance of "»" in the expected string ... | (module
save-source
scheme
(require lang/prim
racket/bool
rackunit
(for-syntax racket/base))
(provide define/save-source)
(provide-higher-order-primitive procedure-name (fn))
(provide-higher-order-primitive procedure-source (fn))
(provide set-evaluates-to-string!)
(pro... |
d6c6d6074916f3450bed8591c598025a2bb836ce66c1bc5f0feedd684a0dfaf4 | larcenists/larceny | main.scm | ; main.scm - Sassy's main
Copyright ( C ) 2005
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
; Thi... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/main.scm | scheme | main.scm - Sassy's main
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library 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 P... | Copyright ( C ) 2005
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
Sunnyside , NY 11104
see file COPYING in the top of Sass... |
cb3edb34617ac776655c5cc1daa898b18ebfba7dda65c104056021de334aef57 | prikhi/xmonad-config | Theme.hs | # LANGUAGE LambdaCase #
module Theme where
import XMonad (X, Window, withWindowSet, cfgDir, asks, directories)
import XMonad.Hooks.DynamicLog (PP(..), xmobarColor, pad, xmobarPP)
import XMonad.Layout.IndependentScreens (unmarshallW)
import XMonad.Util.NamedWindows (getName)
import Data.List (intercalate)
import Flow
... | null | https://raw.githubusercontent.com/prikhi/xmonad-config/5ace56c7873ad25324addf426438d696df9926c5/src/Theme.hs | haskell | {{{ COLORS
}}}
{{{ BORDERS
}}}
{{{ PROMPT
}}}
Colors
Icons
Pretty Printers
| An xmobar Pretty Printer that Displays Every Window on a Workspace.
Drops the digit & underscore prefixes generated by `IndependentScreens`.
| Similar to the `focusedScreenPP` but with every window title de-emphasized.
}}} | # LANGUAGE LambdaCase #
module Theme where
import XMonad (X, Window, withWindowSet, cfgDir, asks, directories)
import XMonad.Hooks.DynamicLog (PP(..), xmobarColor, pad, xmobarPP)
import XMonad.Layout.IndependentScreens (unmarshallW)
import XMonad.Util.NamedWindows (getName)
import Data.List (intercalate)
import Flow
... |
8c6d6bff9a48f8c308ad9bda61452b37395385addcd18dc717b406214af5449d | duo-lang/duo-lang | Program.hs | module Parser.Program
( declarationP
, moduleP
, moduleNameP
, returnP
, xtorDeclP
, xtorSignatureP
) where
import Control.Monad (void)
import Data.Maybe qualified
import Text.Megaparsec hiding (State)
import Text.Megaparsec.Char (eol)
import Parser.Common
import Parser.Definition
import Parser.Kinds
im... | null | https://raw.githubusercontent.com/duo-lang/duo-lang/8a907dfaa22183246f7397e9d6096c457bb79809/duo-lang-parser/src/Parser/Program.hs | haskell | -------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Import Declaration
------------------------------------------------------------... | module Parser.Program
( declarationP
, moduleP
, moduleNameP
, returnP
, xtorDeclP
, xtorSignatureP
) where
import Control.Monad (void)
import Data.Maybe qualified
import Text.Megaparsec hiding (State)
import Text.Megaparsec.Char (eol)
import Parser.Common
import Parser.Definition
import Parser.Kinds
im... |
e9525226912ff94e51ac96bfeed2f8fb7854889b43b2dd26e63dee0512d7e13c | sbocq/predicat | project.clj | (defproject predicat "0.2.2"
:description "A Clojure library to compose predicate/validation functions"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:plugins [[lein-codox "0.9.4" :exclusions [org.clojure/clojure]]]
:scm {:name "... | null | https://raw.githubusercontent.com/sbocq/predicat/cd9bee2205fef075f40452aa3e8d4cecc8415f57/project.clj | clojure | (defproject predicat "0.2.2"
:description "A Clojure library to compose predicate/validation functions"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:plugins [[lein-codox "0.9.4" :exclusions [org.clojure/clojure]]]
:scm {:name "... | |
cf59e5494de0151f3c91aaf3649a7d0108e43655e3d871879459e44125b550c2 | nikodemus/SBCL | deadline.impure.lisp | (in-package :cl-user)
(use-package :test-util)
(defmacro assert-timeout (form)
(let ((ok (gensym "OK")))
`(let ((,ok ',ok))
(unless (eq ,ok
(handler-case ,form
(timeout ()
,ok)))
(error "No timeout from form:~% ~S" ',form)))))
(def... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/deadline.impure.lisp | lisp | (in-package :cl-user)
(use-package :test-util)
(defmacro assert-timeout (form)
(let ((ok (gensym "OK")))
`(let ((,ok ',ok))
(unless (eq ,ok
(handler-case ,form
(timeout ()
,ok)))
(error "No timeout from form:~% ~S" ',form)))))
(def... | |
ec5b14f2e62f8f58d2cb493b19490c4fe7d4fa4de95f410a8a7e9c53ae5b1047 | TheClimateCorporation/lemur | command_line_test.clj | Copyright 2012 The Climate Corporation
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;you may not use this file except in compliance with the License.
;You may obtain a copy of the License at
;
; -2.0
;
;Unless required by applicable law or agreed to in writing, software
distributed under t... | null | https://raw.githubusercontent.com/TheClimateCorporation/lemur/00eb21b6f534ceefe354ab89042826188d156991/src/test/clj/lemur/command_line_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissio... | Copyright 2012 The Climate Corporation
distributed under the License is distributed on an " AS IS " BASIS ,
(ns lemur.command-line-test
(:use
lemur.command-line
clojure.test
lemur.common
midje.sweet)
(:require [com.climate.yaml :as yaml]))
(defn- ^{:default-doc "f1 dd"} f1 [] "f1")
(deftest test-... |
2fc719ec7763fe8033e27dbe092c3cdfdc30ae8889b21884f6804c2f7553408b | AdaCore/why3 | eliminate_unknown_types.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/transform/eliminate_unknown_types.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Term
open Decl
open Theory
open Ty
let debug = Debug.register_info_flag "eliminate_unknown_types"
~... |
3af82d62cf769572fe652f9c69865338cb148db7757f06d80ee2acb01a7c4e40 | rpeszek/typed-encoding | SomeEnc.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE RankNTypes #-}
-- |
This module defines ' SomeEnc ' - existentially quantified version of @Enc@
-- and basic combinators.
--
This construction is common to more dependently typed but is
isomorphic to ' Data . ... | null | https://raw.githubusercontent.com/rpeszek/typed-encoding/441f9f3bbf849f485f82eae66402ee2fd7b47a34/src/Examples/TypedEncoding/SomeEnc.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
|
and basic combinators.
as example.
$setup
>>> import qualified Data.Text as T
|
@since 0.2.0.0
|
|
>>> let enctest = unsafeSetPayload () "hello" :: Enc '["TEST"] () T.Text
|
>>> let tst = unsafeCheckedEnc ["TEST"] () "test"
>>> displ $ checkedToSome ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE AllowAmbiguousTypes #
This module defines ' SomeEnc ' - existentially quantified version of @Enc@
This construction is common to more dependently typed but is
isomorphic to ' Data . . Common . Types . CheckedEnc . CheckedEnc ' .
Post v0.4 /typed - encoding/ suppo... |
eff9b8546f69fbf37a7a68a7faf403bb537c3d9e2254a1bb9ca983b23f97885a | returntocorp/ocaml-tree-sitter-core | Indent.mli | (*
Simple, functional pretty-printer.
Code is presented as a tree of lines and blocks, which is then
printed with the correct indentation.
This produces a lot of whitespace but it's easy to maintain,
and the output and be passed through a dedicated reformatter such
as refmt if needed.
Usage:
... | null | https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/3ed014873a0eed91fe7a0e6eb32bed29efa91dfa/src/gen/lib/Indent.mli | ocaml |
Simple, functional pretty-printer.
Code is presented as a tree of lines and blocks, which is then
printed with the correct indentation.
This produces a lot of whitespace but it's easy to maintain,
and the output and be passed through a dedicated reformatter such
as refmt if needed.
Usage:
o... |
module Types : sig
type node =
| Line of string
single line of output . May be collapsed with other lines
it 's a member of a group .
it's a member of a group. *)
| Block of node list
| Inline of node list
| Space
guarantees the presence of at least one whitespace character
... |
86efc87ff32a4acc2b9096e58253cea9bc745d0fc479fe1e12cc67522d993524 | edsko/ChinesePodAPI | V2.hs | {-# LANGUAGE OverloadedStrings #-}
module Servant.ChinesePod.Vocab.V2 (
Vocab(..)
, Skipped(..)
, Lesson(..)
, Word(..)
, Level(..)
, extractVocab
, loadVocab
-- * Re-exports
, V3Id(..)
) where
import Prelude hiding (Word)
import Data.Bifunctor (second)
import Data.Binary (Binary, decodeFile)
i... | null | https://raw.githubusercontent.com/edsko/ChinesePodAPI/f77ebfd55286316c4a54c42c195d5a51b4a0e4cd/src/Servant/ChinesePod/Vocab/V2.hs | haskell | # LANGUAGE OverloadedStrings #
* Re-exports
| Supplemental vocabulary that appears somewhere in the dialogue
| Supplemental vocabulary that does not appear in the dialogue
------------------------------------------------------------------------------
Constructing from full lesson content
--------------------------... | module Servant.ChinesePod.Vocab.V2 (
Vocab(..)
, Skipped(..)
, Lesson(..)
, Word(..)
, Level(..)
, extractVocab
, loadVocab
, V3Id(..)
) where
import Prelude hiding (Word)
import Data.Bifunctor (second)
import Data.Binary (Binary, decodeFile)
import Data.Binary.Orphans ()
import Data.Data (Data)
im... |
c86d0d1c7e679e554885c58aad006bf8fb96ae90e7ac4b206712b57fe907f76d | Eonblast/Trinity | server_SUITE.erl | %%%-------------------------------------------------------------------
File : eonbeam / dev/3 / d_servertest / test / server_SUITE.erl
Descr : complete skeleton of a Common Test test suite
Author :
Source : Erlang docs ' small suite sample '
www.erlang.org/doc/apps/common_test/exam... | null | https://raw.githubusercontent.com/Eonblast/Trinity/15bcc0fa0997d7dd360f1542493e63208645bd88/d_servertest/test/server_SUITE.erl | erlang | -------------------------------------------------------------------
Adapted : 06/14/2011 hd
Requires : Erlang 14B (prior may not have ct_run)
-------------------------------------------------------------------
Run: eonbeam/dev/3/d_servertest/3_common_test.sh
-------------------------------------------------------... | File : eonbeam / dev/3 / d_servertest / test / server_SUITE.erl
Descr : complete skeleton of a Common Test test suite
Author :
Source : Erlang docs ' small suite sample '
www.erlang.org/doc/apps/common_test/example_chapter.html
Or : ct_run -pa . -dir test ( from eonbeam / dev/3 /... |
281bd95393937cc657a06e76f4bcdb2e4f0cb244f12c1a0f8dcad4d62a004c4c | nedap/formatting-stack | wrong_indent.clj | (ns wrong-indent)
(def x
[
1
3 4
3])
| null | https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/test-resources/wrong_indent.clj | clojure | (ns wrong-indent)
(def x
[
1
3 4
3])
| |
6ba2e13ab5e5f310fdc68bf40de60b32b17cf42848143daeb6fd9eb322b13cf4 | mrossini-ethz/physical-quantities | unit-factor.lisp | (in-package :pq)
;; Unit factor structure
(defstruct (unit-factor (:conc-name uf-) (:constructor make-uf (unit power)))
(unit "" :type string)
(power 0 :type integer))
(export '(uf-unit uf-power))
(defun uf-pow (unit-factor power)
;; Raises the unit factor to the given power
(make-uf (uf-unit unit-factor) (*... | null | https://raw.githubusercontent.com/mrossini-ethz/physical-quantities/348827f0632eb5bd14b378dab4e47bb6e3102f70/unit-factor.lisp | lisp | Unit factor structure
Raises the unit factor to the given power | (in-package :pq)
(defstruct (unit-factor (:conc-name uf-) (:constructor make-uf (unit power)))
(unit "" :type string)
(power 0 :type integer))
(export '(uf-unit uf-power))
(defun uf-pow (unit-factor power)
(make-uf (uf-unit unit-factor) (* (uf-power unit-factor) power)))
(defun uf-equal (a b)
Tests for equa... |
4408130e1a5500ae5c1c5281cc03f5698c5d4ca3ea0aad534aae1088b8b27764 | lambdacube3d/lambdacube-edsl | LC_T_PrimFun.hs | module LC_T_PrimFun where
import Data.Int
import Data.Word
import LC_G_LinearAlgebraTypes
import LC_T_Sampler
import LC_T_APIType
data PrimFun freq sig where
Vec / Mat ( de)construction
PrimTupToV2 :: IsComponent a => PrimFun freq (a:+:a:+:ZZ -> V2 a)... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/lambdacube-core/tmp/sandbox/lambdacube-unified-input/LC_T_PrimFun.hs | haskell | Arithmetic Functions (componentwise)
Bit-wise Functions
Logic Functions
Angle and Trigonometry Functions
Exponential Functions
Common Functions
Geometric Functions
Vector and Scalar Relational Functions
Fragment Processing Functions
Noise Functions
Texture Lookup Functions
hint: modeled as functions with un... | module LC_T_PrimFun where
import Data.Int
import Data.Word
import LC_G_LinearAlgebraTypes
import LC_T_Sampler
import LC_T_APIType
data PrimFun freq sig where
Vec / Mat ( de)construction
PrimTupToV2 :: IsComponent a => PrimFun freq (a:+:a:+:ZZ -> V2 a)... |
4cecd04f05742d96ef76442cba1586570b8e29f882b54ff84f802ab7430e0e41 | Convex-Dev/convex-web | command_test.clj | (ns convex-web.command-test
(:require
[clojure.test :refer [deftest is testing use-fixtures]]
[ring.mock.request :as mock]
[convex-web.specs]
[convex-web.command :as c]
[convex-web.convex :as convex]
[convex-web.system :as sys]
[convex-web.encoding :as encoding]
[convex-web.web-server... | null | https://raw.githubusercontent.com/Convex-Dev/convex-web/08531fceaf1d92829837a543c962ae2038bf094a/src/test/clojure/convex_web/command_test.clj | clojure | Defaults to datafy. | (ns convex-web.command-test
(:require
[clojure.test :refer [deftest is testing use-fixtures]]
[ring.mock.request :as mock]
[convex-web.specs]
[convex-web.command :as c]
[convex-web.convex :as convex]
[convex-web.system :as sys]
[convex-web.encoding :as encoding]
[convex-web.web-server... |
f5798de6d7f4fe86e47a837afa2dc1105c13cbaf8bb51952e747a3af920585cd | larrychristensen/orcpub | user.clj | (ns user
(:require [figwheel-sidecar.repl-api :as f]
[com.stuartsierra.component :as component]
[datomic.api :as datomic]
[orcpub.routes :as r]
[orcpub.system :as s]
[orcpub.db.schema :as schema]))
user is a namespace that the Clojure runtime looks for an... | null | https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/dev/user.clj | clojure | loads if its available
You can place helper functions in here. This is great for starting
and stopping your webserver and other development services
You have to ensure that the libraries you :require are listed in your dependencies
Once you start down this path
you will probably want to look at
tools.namespace
... | (ns user
(:require [figwheel-sidecar.repl-api :as f]
[com.stuartsierra.component :as component]
[datomic.api :as datomic]
[orcpub.routes :as r]
[orcpub.system :as s]
[orcpub.db.schema :as schema]))
user is a namespace that the Clojure runtime looks for an... |
2afbfa971ab9493fdcba0cb9572eb886a516d1b7b8bc5a8195b5414ab8ca48e3 | imrehg/ypsilon | bitmap.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk bitmap)
(export gdk_bitmap_create_from_data)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x11-2.... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/bitmap.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk bitmap)
(export gdk_bitmap_create_from_data)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x11-2.... |
4fe0bb5e04690a5f294bd50725dfd8f6ec1fa8cf450948e146bbf171b17d4738 | rfkm/zou | cljs.clj | (ns zou.ext.cljs
(:require [zou.cljs.figwheel :as fig]
[zou.framework.container :as container]
[zou.framework.core :as core]
[zou.framework.ext-helper :as ext]
[zou.logging :as log])
(:import zou.cljs.figwheel.Figwheel))
(defn- find-figwheel-system []
(for [[_ c] (... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/cljs-devel/src/zou/ext/cljs.clj | clojure | (ns zou.ext.cljs
(:require [zou.cljs.figwheel :as fig]
[zou.framework.container :as container]
[zou.framework.core :as core]
[zou.framework.ext-helper :as ext]
[zou.logging :as log])
(:import zou.cljs.figwheel.Figwheel))
(defn- find-figwheel-system []
(for [[_ c] (... | |
03135de87c8ce9b1706d3d5e0a20c82eda98d6499dd4a06bb7e800f8a1c53ee3 | glebec/haskell-programming-allen-moronuki | 00-scratch.hs | # OPTIONS_GHC -W #
module ScratchCh8 where
| null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/08-recursion/00-scratch.hs | haskell | # OPTIONS_GHC -W #
module ScratchCh8 where
| |
6e56f2bb380613e57a9a5d197a33f8f0af5d5c0bf6a4c7ab91b91f136616940c | cloverage/cloverage | dummy_sample.clj | (ns cloverage.sample.dummy-sample
"This namespace is necessary for redundancy.
It allows us to check whether regexs in combination with path parameters work.")
(defn dummy-function
[& args]
(println "Hello, World!"))
| null | https://raw.githubusercontent.com/cloverage/cloverage/3b9718e9c80f84ba5882139376a07f8a67f14062/cloverage/dev-resources/cloverage/sample/dummy_sample.clj | clojure | (ns cloverage.sample.dummy-sample
"This namespace is necessary for redundancy.
It allows us to check whether regexs in combination with path parameters work.")
(defn dummy-function
[& args]
(println "Hello, World!"))
| |
5c174e7578e5d62285d6f3d433be2b4c79d5c10d63b53409f2585da6fce74979 | spawnfest/eep49ers | eprof_suite_test.erl | ` ` Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under the License is distribut... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/eprof_SUITE_data/eprof_suite_test.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 permi... | ` ` Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
The Initial Developer of the Original Code is Ericsson Utvecklings AB .
Portions created by Ericsson are Copyright 1999 ,
" Priority Queues and the STL " by in Dr.... |
5a80cc0b3cd05ed7f03a8c21f24cf7d8ed787975b35c930402b358a3c366cf7e | dvingo/dv.fulcro-template | server.clj | (ns {{namespace}}.server.server
(:require
[clojure.pprint :refer [pprint]]
[io.pedestal.http :as http]
[mount.core :refer [defstate]]
[{{namespace}}.server.config :refer [config]]
[{{namespace}}.server.service :as service]
[{{namespace}}.server.xtdb-node]
[taoensso.timbre :as log])
(:imp... | null | https://raw.githubusercontent.com/dvingo/dv.fulcro-template/f7f207c8833af7e7a14532a29864e8f3556cfb89/resources/clj/new/dv.fulcro_template/src/main/app/server/server.clj | clojure | (ns {{namespace}}.server.server
(:require
[clojure.pprint :refer [pprint]]
[io.pedestal.http :as http]
[mount.core :refer [defstate]]
[{{namespace}}.server.config :refer [config]]
[{{namespace}}.server.service :as service]
[{{namespace}}.server.xtdb-node]
[taoensso.timbre :as log])
(:imp... | |
9152470279463c8b038a37862b601a0a05941d6fc676a9cad2c4fa790dd3751d | xxyzz/SICP | Exercise_3_52.rkt | #lang racket/base
(require racket/stream)
(define (stream-enumerate-interval low high)
(if (> low high)
empty-stream
(stream-cons
low
(stream-enumerate-interval (+ low 1) high))))
(define (display-stream s)
(stream-for-each displayln s))
(define sum 0)
(define (accum x) (set! sum (+ x s... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.5_Streams/Exercise_3_52.rkt | racket | -ex-3.52 | #lang racket/base
(require racket/stream)
(define (stream-enumerate-interval low high)
(if (> low high)
empty-stream
(stream-cons
low
(stream-enumerate-interval (+ low 1) high))))
(define (display-stream s)
(stream-for-each displayln s))
(define sum 0)
(define (accum x) (set! sum (+ x s... |
b73c3a96ed503709a84444d3ec0a8ea7e6afd518372a49329080354d0345f5ed | shayne-fletcher/zen | fold.ml |
The problem given is to express ` ` fold_left ` ` entirely in terms of
` ` fold_right ` ` . For example , an attempted solution like
: :
let fold_left f e s =
List.rev ( fold_right ( fun a acc - > f acc a ) e ( List.rev s ) )
is inadmissiable because it relies on ` ` List.rev ` ` a... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/fold/fold.ml | ocaml | ...something... |
The problem given is to express ` ` fold_left ` ` entirely in terms of
` ` fold_right ` ` . For example , an attempted solution like
: :
let fold_left f e s =
List.rev ( fold_right ( fun a acc - > f acc a ) e ( List.rev s ) )
is inadmissiable because it relies on ` ` List.rev ` ` a... |
589ea826fa562b2562d319530c38101049cfbe716739788541ea6c881e29f644 | melange-re/melange | ast_typ_uncurry.ml | Copyright ( C ) 2020 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/frontend/ast_typ_uncurry.ml | ocaml | Ext_list.init arity (fun i -> Typ.var ~loc (method_name ^ string_of_int i))
no need to error for optional here,
since we can not make it
TODO: still error out for external?
Maybe no need to error on optional at all
it just does not make sense
| Copyright ( C ) 2020 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... |
b149e1482cc4a00291b4782c2a0720e9ec8671972a72414213187b44383f8db9 | incoherentsoftware/defect-process | Types.hs | module Player.Weapon.Manager.Types
( WeaponManager(..)
) where
import Player.Weapon.Types
import Util
data WeaponManager = WeaponManager
{ _weapons :: [Some Weapon]
}
| null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Player/Weapon/Manager/Types.hs | haskell | module Player.Weapon.Manager.Types
( WeaponManager(..)
) where
import Player.Weapon.Types
import Util
data WeaponManager = WeaponManager
{ _weapons :: [Some Weapon]
}
| |
02ac920303d3e497c04add7a63b63c9153760d968155f4e84df3f070d52a7d28 | mysema/lein-dbmaintain | update_db.clj | (ns leiningen.update-db
(:use leiningen.dbmaintain))
(defn update-db
[project & args]
(let [factory (get-mainfactory project)]
(.updateDatabase (.createDbMaintainer factory) false)))
| null | https://raw.githubusercontent.com/mysema/lein-dbmaintain/99a5798f54cccbfc0d47baadd3d3acdf807ba8ff/src/leiningen/update_db.clj | clojure | (ns leiningen.update-db
(:use leiningen.dbmaintain))
(defn update-db
[project & args]
(let [factory (get-mainfactory project)]
(.updateDatabase (.createDbMaintainer factory) false)))
| |
0e44ed169b1c5db5f389d0731269788db2d8f4db8d2430efb9bfa81226502322 | channable/icepeak | MetricsServer.hs | {-# LANGUAGE OverloadedStrings #-}
module MetricsServer where
import Data.Function ((&))
import qualified Data.Text as Text
import qualified Network.Wai.Handler.Warp as Warp
import qualified Network.Wai.Middleware.Prometheus as PrometheusWai
import ... | null | https://raw.githubusercontent.com/channable/icepeak/46eaa1cad65a97adad87a1b36cbec5d98fffd0b9/server/src/MetricsServer.hs | haskell | # LANGUAGE OverloadedStrings # | module MetricsServer where
import Data.Function ((&))
import qualified Data.Text as Text
import qualified Network.Wai.Handler.Warp as Warp
import qualified Network.Wai.Middleware.Prometheus as PrometheusWai
import Config ... |
e26eac53b7c2f00c0288a103aa9009a96aff7b7b62bf133330b124ca0a46635f | oofp/Beseder | DataRes.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Resources/State/DataRes.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
type family SupportedRequestsFam (st :: *) :: [*]
type SetData' = forall a. SetData a | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE PolyKinds ... |
36bdd99f16de41dbd8bd1719220cd08fb506a1ee401968129c04a963b70ac073 | janestreet/bonsai | messages_panel.ml | open! Core
open! Async_kernel
open! Bonsai_web
open Bonsai.Let_syntax
open Bonsai_chat_common
module Style = [%css stylesheet {|
.messages_list {
flex: 1;
}
|}]
let view_message { Message.room = _; author; contents } =
Vdom.Node.div [ Vdom.Node.textf "%s: %s" author contents ]
;;
let component ~messages ~c... | null | https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/examples/rpc_chat/client/src/messages_panel.ml | ocaml | open! Core
open! Async_kernel
open! Bonsai_web
open Bonsai.Let_syntax
open Bonsai_chat_common
module Style = [%css stylesheet {|
.messages_list {
flex: 1;
}
|}]
let view_message { Message.room = _; author; contents } =
Vdom.Node.div [ Vdom.Node.textf "%s: %s" author contents ]
;;
let component ~messages ~c... | |
c50c11815dbf3f4d31921cf90b19fcdc34bbda5a34fe968b48d719eb18f646a3 | privet-kitty/cl-competitive | compile-time-increase-space.lisp | #-swank
(eval-when (:compile-toplevel)
(unless (member :child-sbcl *features*)
(quit
:recklessly-p t
:unix-status
(process-exit-code
(run-program *runtime-pathname*
`("--control-stack-size" "256MB"
"--noinform" "--disable-ldb" "--lose-on-corruption" "--... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/non-module/compile-time-increase-space.lisp | lisp | #-swank
(eval-when (:compile-toplevel)
(unless (member :child-sbcl *features*)
(quit
:recklessly-p t
:unix-status
(process-exit-code
(run-program *runtime-pathname*
`("--control-stack-size" "256MB"
"--noinform" "--disable-ldb" "--lose-on-corruption" "--... | |
ad9466ae9fabdfe4950826f31ec2d9a2e795282b23576f763f1323505da245f9 | ajkavanagh/vimwiki-publishing-system | Ginger.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedType... | null | https://raw.githubusercontent.com/ajkavanagh/vimwiki-publishing-system/c358ea03bcdb576ce4a7a4e42ac38ba5e1816c7b/src/Effect/Ginger.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
@Sem r@ monad. They ar standardised here, so t... | # LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fplugin = Polysemy . Plugin #
module Effect.Ginger
where
import TextShow
import Data.Text (Text)
import Colog.Polysemy (Log)
import Poly... |
ac263408d407be34e7a9e4c49ad32c5ee8da8015e52920f55f0a21a1c24e5496 | tari3x/csec-modex | syms.mli | open Sym
open Exp
open Common
open Typing
(** The set of functions that we are turning into abstract symbols during
translation to PV/CV. *)
CR - soon : looks like you can do all of the typing first , so that
Fun_type_ctx.t can be wrapped into .
Fun_type_ctx.t can be wrapped into Syms.
*)
(**
[par... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/src/symtrace/syms.mli | ocaml | * The set of functions that we are turning into abstract symbols during
translation to PV/CV.
*
[parser(encoder) = result]
The symbols in a pair returned by functions below are ordered.
Does all the necessary computations.
Assumes that all syms are type-safe. | open Sym
open Exp
open Common
open Typing
CR - soon : looks like you can do all of the typing first , so that
Fun_type_ctx.t can be wrapped into .
Fun_type_ctx.t can be wrapped into Syms.
*)
module Parsing_eq : sig
type t =
parser is a keyword in ?
; c : bfun
; i : int
}
val to_strin... |
46ed81e257078d2cb60379f9105355aa45a04ac877ead8f0efd42d0bdb954241 | facebook/infer | Timings.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/b1284587e56d95c81ebdd856894563c335fffa83/infer/src/base/Timings.mli | ocaml | * Data structure to collect timing percentile informations on all {!Timeable.t} elements
* register a new timing measurement |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
29540fa10a954084eb69b04a19c257727db0b8f29ff9a0b58df24afaa3fde080 | iu-parfunc/verified-instances | Inj.hs | {-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--automatic-instances=liquidinstances" @-}
module Data.VerifiedOrd.Instances.Inj (vordInj, leqFrom) where
import Data.Inj
import Data.VerifiableConstraint
import Data.VerifiedEq
import Data.VerifiedEq.Instances
import Data.VerifiedOrd
import Language.Haskell.Liquid.Pr... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/src/Data/VerifiedOrd/Instances/Inj.hs | haskell | @ LIQUID "--higherorder" @
@ LIQUID "--automatic-instances=liquidinstances" @
@ axiomatize leqFrom @ |
module Data.VerifiedOrd.Instances.Inj (vordInj, leqFrom) where
import Data.Inj
import Data.VerifiableConstraint
import Data.VerifiedEq
import Data.VerifiedEq.Instances
import Data.VerifiedOrd
import Language.Haskell.Liquid.ProofCombinators
leqFrom :: (a -> a -> Bool)
-> (b -> a)
-> (b -> b -> Bool)
l... |
ebc74c36e1c4678af5be105813acfbbe195e8139c8ac4493a8ab02d8fe019cc6 | jaspervdj/hakyll | Tests.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Core.Routes.Tests
( tests
) where
--------------------------------------------------------------------------------
import Data.Maybe (fromMaybe)
import ... | null | https://raw.githubusercontent.com/jaspervdj/hakyll/af9e29b5456c105dc948bc46c93e989a650b5ed1/tests/Hakyll/Core/Routes/Tests.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | module Hakyll.Core.Routes.Tests
( tests
) where
import Data.Maybe (fromMaybe)
import Hakyll.Core.Identifier
import Hakyll.Core.Metadata
import Hakyll.Core.Routes
import System.FilePath ((</>), normalise)
import Test.Tasty ... |
08c9657ea15d2f01954a3c39bb91be107d49ac3ff21ce1562c6cb1bab5a15f1d | reach-sh/reach-lang | Texty.hs | module Reach.Texty
( Doc (..)
, render
, Pretty
, pretty
, prettyl
, (<+>)
, emptyDoc
, viaShow
, vsep
, hcat
, hsep
, nest
, concatWith --- XXX remove
, punctuate
, enclose
, surround
, squotes
, dquotes
, parens
, braces
, brackets
, angles
, hardline
, semi
, comma
... | null | https://raw.githubusercontent.com/reach-sh/reach-lang/c62a9e7f34338db76ec8a915e889ad9182b57bba/hs/src/Reach/Texty.hs | haskell | - XXX remove
# OVERLAPS #
# OVERLAPS #
# OVERLAPPABLE # | module Reach.Texty
( Doc (..)
, render
, Pretty
, pretty
, prettyl
, (<+>)
, emptyDoc
, viaShow
, vsep
, hcat
, hsep
, nest
, punctuate
, enclose
, surround
, squotes
, dquotes
, parens
, braces
, brackets
, angles
, hardline
, semi
, comma
, space
, render_obj
, co... |
e75a852362bf43e63ebd9084aa3fe9149a05e52ee40c631795cefbdabe731e28 | modular-macros/ocaml-macros | primitive.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/typing/primitive.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type boxed_integer = Pnativeint | Pint32 | Pint64
type native_repr =
| Same_as_ocaml_repr
| Unboxed... |
2d2ca5e1697870223c4ce617016acfa9d7156e2d92166bd1cec269a3397a2dc2 | MLstate/opalang | s3Warnings.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/s3Warnings.mli | ocaml | *
<!> Read carrefully the documentation.
This module is not meant to define any wclass.
It is simply a regroupement of all warnings we want
to be available in the binary opa.exe version S3
We could have define it directly in main.ml,
but this would have lead to have too much commit on the
main. (w... |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
314a1f63462faa0fe73546a0164004894f2297d457bdd3a1de21cc80165cb302 | racket/compiler | embed-me16.rkt | #lang racket/base
;; a `main' submodule:
(module main racket/base
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 16.\n"))
#:exists 'append))
| null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/embed/embed-me16.rkt | racket | a `main' submodule: | #lang racket/base
(module main racket/base
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 16.\n"))
#:exists 'append))
|
12442514cc0da901d0b0b9e33510d0b4a6ddc6c0c7994d7f79dad2a99201ab74 | hiroshi-unno/coar | evaluator.ml | open Core
open Common.Ext
open LogicOld
let size_threshold = 3
let count_threshold = 1
let prod_threshold = 16
eval_term : Term.t - > Value.t
let rec eval_term = let open Term in function
| Var _ -> failwith "Any term variables should be removed before evaluating formula."
| FunApp (FVar (ident, _), ts, _) a... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/ast/evaluator.ml | ocaml | val eval_pred: pred_sym -> Term.t list -> bool
val eval_atom: Atom.t -> bool
including T_int.int, T_real.Real
handled with simplify_atom_neg
val simplify_atom: Atom.t -> Formula.t
adhoc simplification rules
ToDo
cons x y = tl z
ToDo: check if this is correct | open Core
open Common.Ext
open LogicOld
let size_threshold = 3
let count_threshold = 1
let prod_threshold = 16
eval_term : Term.t - > Value.t
let rec eval_term = let open Term in function
| Var _ -> failwith "Any term variables should be removed before evaluating formula."
| FunApp (FVar (ident, _), ts, _) a... |
1b87caec3121fbdae1cca2794242228a44af86da6ce41f02c56df4eb3a62615a | AccelerateHS/accelerate-llvm | Map.hs | # LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
-- Module : Data.Array.Accelerate.LLVM.PTX.CodeGen.Map
Copyright : [ 2014 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/57136bfc67f0da8ea0a0aba0172397a2e92d3378/accelerate-llvm-ptx/src/Data/Array/Accelerate/LLVM/PTX/CodeGen/Map.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Data.Array.Accelerate.LLVM.PTX.CodeGen.Map
License : BSD3
Stability : experimental
accelerate
Apply a unary function to each element of an array. Each thread processes
multiple elements, striding the array by the grid size.
| # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright : [ 2014 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.PTX.CodeGen.Map
where
import Data.Array.Accelerate.R... |
c7d50151842f1ac7117e927977f9f583eab50ae7418922d8ac76d254c6c8449a | bcc32/advent-of-code | dir_intf.ml | open! Core
open! Import
type nesw =
[ `N
| `E
| `S
| `W
]
[@@deriving sexp_of]
type diag =
[ `NE
| `SE
| `SW
| `NW
]
[@@deriving sexp_of]
module type S = sig
(** Represents a compass direction. *)
type _ t [@@deriving sexp_of]
* Represents a single grid square movement . Might be diagonal ... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2020/lattice/dir_intf.ml | ocaml | * Represents a compass direction. | open! Core
open! Import
type nesw =
[ `N
| `E
| `S
| `W
]
[@@deriving sexp_of]
type diag =
[ `NE
| `SE
| `SW
| `NW
]
[@@deriving sexp_of]
module type S = sig
type _ t [@@deriving sexp_of]
* Represents a single grid square movement . Might be diagonal , in which
case the distance is a... |
c24ab14bb8d1fe821430fabecf4a60ea091ed5bafcab25d100f6952b3c9869b9 | binaryage/cljs-oops | project.clj | (def clojurescript-version (or (System/getenv "CANARY_CLOJURESCRIPT_VERSION") "1.11.4"))
(def required-deps
[['binaryage/env-config "0.2.2"]])
(def provided-deps
[['org.clojure/clojure "1.10.3" :scope "provided"]
['org.clojure/clojurescript clojurescript-version :scope "provided"]])
(def test-deps
[['environ "... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/83eb1ad489b8730b4faaf7ed3927af083cf96410/project.clj | clojure | this is just for IntelliJ + Cursive to play well
! to overcome default jar/pom behaviour, our :dependencies replacement would be ignored for some reason | (def clojurescript-version (or (System/getenv "CANARY_CLOJURESCRIPT_VERSION") "1.11.4"))
(def required-deps
[['binaryage/env-config "0.2.2"]])
(def provided-deps
[['org.clojure/clojure "1.10.3" :scope "provided"]
['org.clojure/clojurescript clojurescript-version :scope "provided"]])
(def test-deps
[['environ "... |
5e47551b4804921b328aa1ffdcd25b6669443ccaa061de59b2afa45f8eb32b2f | p2pcollab/ocaml-p2p | s.ml |
(** TAC protocol configuration parameters *)
module type CONFIG = sig
* Trust weight in the range [ 0.0 , 2.0 ] .
* Influences the importance of trust vs similarity in the scoring of nodes :
* [ sim^(e-2 ) * trust^e ] , where
* - [ sim ] is the similarity metric of the node ,
* - [ trust ] is the ... | null | https://raw.githubusercontent.com/p2pcollab/ocaml-p2p/121e86efff0e6edd7c498d17bf4cab7787991888/lib/p2p-tac/s.ml | ocaml | * TAC protocol configuration parameters
* Minimum trust required for a node to be considered for merging into the view |
module type CONFIG = sig
* Trust weight in the range [ 0.0 , 2.0 ] .
* Influences the importance of trust vs similarity in the scoring of nodes :
* [ sim^(e-2 ) * trust^e ] , where
* - [ sim ] is the similarity metric of the node ,
* - [ trust ] is the trust value assigned to the node ,
* - [... |
f332066554424cbb8f8441a14e20f4846e7d9a364af7aba34c0a30559cfe8553 | chebert/schemeish | sicp-digital-circuits.lisp | (cl:defpackage #:sicp-digital-circuits
(:use :schemeish))
(in-package #:sicp-digital-circuits)
(install-syntax!)
(defvar *the-agenda*)
(define (make-agenda (current-time 0) (segments ()))
(define (make-time-segment time queue)
(cons time queue))
(define (segment-time s) (car s))
(define (segment-queue s... | null | https://raw.githubusercontent.com/chebert/schemeish/93ea08b17e6d8876f086e1a34a21b538174b2c39/examples/sicp-digital-circuits.lisp | lisp | => :OK | (cl:defpackage #:sicp-digital-circuits
(:use :schemeish))
(in-package #:sicp-digital-circuits)
(install-syntax!)
(defvar *the-agenda*)
(define (make-agenda (current-time 0) (segments ()))
(define (make-time-segment time queue)
(cons time queue))
(define (segment-time s) (car s))
(define (segment-queue s... |
8414934f70f624d3394fa0c817d653db70507271f13c86bcd1b15b5eafee6b9d | s9gf4ult/type-fun | Constraint.hs | module TypeFun.Constraint
( AllSatisfy
) where
import GHC.Exts
-- | Apply constraint for each element of list
type family AllSatisfy (c :: k -> Constraint) (s :: [k]) :: Constraint where
AllSatisfy c '[] = ()
AllSatisfy c (a ': as) = (c a, AllSatisfy c as)
| null | https://raw.githubusercontent.com/s9gf4ult/type-fun/a90d4b7ce421b50705df84752fe4185cd63932e2/src/TypeFun/Constraint.hs | haskell | | Apply constraint for each element of list | module TypeFun.Constraint
( AllSatisfy
) where
import GHC.Exts
type family AllSatisfy (c :: k -> Constraint) (s :: [k]) :: Constraint where
AllSatisfy c '[] = ()
AllSatisfy c (a ': as) = (c a, AllSatisfy c as)
|
e733a2ea75198aaefd47144d8090ae64ceab9fb393052f6cdf944b8a158c83da | CloudI/CloudI | symb_statem.erl | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
%%% -------------------------------------------------------------------
Copyright 2010 - 2018 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it a... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/test/symb_statem.erl | erlang | -------------------------------------------------------------------
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITN... | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
Copyright 2010 - 2018 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Licens... |
83461f5504e990681ef0d96751cb11ab7c89bd48aee72f9ce7837a0aa22c2f49 | parapluu/Concuerror | unsupported_exit.erl | -module(unsupported_exit).
-export([scenarios/0]).
-export([exceptional/0]).
-export([test/0]).
scenarios() ->
[{test, inf, dpor, crash}].
test() ->
try
erlang:monitor_node(node(), false)
catch
_:_ -> ok
end.
exceptional() ->
fun(_Expected, Actual) ->
String =
... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/unsupported_exit.erl | erlang | -module(unsupported_exit).
-export([scenarios/0]).
-export([exceptional/0]).
-export([test/0]).
scenarios() ->
[{test, inf, dpor, crash}].
test() ->
try
erlang:monitor_node(node(), false)
catch
_:_ -> ok
end.
exceptional() ->
fun(_Expected, Actual) ->
String =
... | |
c40a27e17b02a51510bcd7a7be2e88404e15516b4402f78e432b066de598b753 | janestreet/merlin-jst | label.ml | type t = { foo : int }
let foo = 5
let x = { foo }
(* introducing a syntax error, just to see. *)
let foo = 5 in
let x = { foo }
| null | https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/tests/test-dirs/locate/context-detection/cd-label.t/label.ml | ocaml | introducing a syntax error, just to see. | type t = { foo : int }
let foo = 5
let x = { foo }
let foo = 5 in
let x = { foo }
|
1f4c776cce2b7ac569d8d35fe15f4acdf4d296efbb8ac99c2ca6d20984e6bbab | mirage/cactus | syscalls.ml | module Int63 = Optint.Int63
type int63 = Int63.t
external pread_int : Unix.file_descr -> int -> bytes -> int -> int -> int = "caml_index_pread_int"
external pread_int64 : Unix.file_descr -> int64 -> bytes -> int -> int -> int
= "caml_index_pread_int64"
let pread : fd:_ -> fd_offset:int63 -> _ =
match Int63.is_i... | null | https://raw.githubusercontent.com/mirage/cactus/3eb2a4abee79bf8f20de5b4b12a57c3421c3e2fe/src/syscalls.ml | ocaml | module Int63 = Optint.Int63
type int63 = Int63.t
external pread_int : Unix.file_descr -> int -> bytes -> int -> int -> int = "caml_index_pread_int"
external pread_int64 : Unix.file_descr -> int64 -> bytes -> int -> int -> int
= "caml_index_pread_int64"
let pread : fd:_ -> fd_offset:int63 -> _ =
match Int63.is_i... | |
68ccb622f60e6d1d9b661970865bb6ae4293ab4afb7e569a634329a290677a98 | mhkoji/Senn | win-server-tcp-hachee.lisp | (defpackage :senn.bin.win-server
(:use :cl)
(:export :run))
(in-package :senn.bin.win-server)
(defun start-server (make-ime-fn)
(senn-ipc.server.tcp:start-server
(lambda (client)
(let ((ime (funcall make-ime-fn)))
(labels ((handle (req)
(senn.win.server:handle-request ime req)))
... | null | https://raw.githubusercontent.com/mhkoji/Senn/5304b003be3333957f5556ab29d5500ecb25de9a/senn/src/bin/win-server-tcp-hachee.lisp | lisp | (defpackage :senn.bin.win-server
(:use :cl)
(:export :run))
(in-package :senn.bin.win-server)
(defun start-server (make-ime-fn)
(senn-ipc.server.tcp:start-server
(lambda (client)
(let ((ime (funcall make-ime-fn)))
(labels ((handle (req)
(senn.win.server:handle-request ime req)))
... | |
f00ed8ad15e67b744f666799e397947dcb29c812686458d42500703c81bcc735 | grin-compiler/ghc-wpc-sample-programs | Metadata.hs | # LANGUAGE RelaxedPolyRec #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Text . Pandoc . Readers . Metadata
Copyright : Copyright ( C ) 2006 - 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Readers/Metadata.hs | haskell | # LANGUAGE OverloadedStrings #
Note: a standard quoted or unquoted YAML value will
not end in a newline, but a "block" set off with
`|` or `>` will. | # LANGUAGE RelaxedPolyRec #
# LANGUAGE ScopedTypeVariables #
|
Module : Text . Pandoc . Readers . Metadata
Copyright : Copyright ( C ) 2006 - 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
YAML / JS... |
4701c7939bf7f77913ec7026db71a82c47edca914a8b22aa2ced4daec434fea1 | apache/couchdb-erlfdb | erlfdb_03_transaction_options_test.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-erlfdb/0fa8eac025253c56ddacfe0e0420d4d3ac5e9768/test/erlfdb_03_transaction_options_test.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(erlfdb_03_transaction_options_test).
-include_lib("eunit/include/eunit.hrl").
get_approximate_tx_size_test() ->
Db1 = erlfdb_util:get_test_db(... |
169ccc96d50679a5168b6662001d3b02157376701da8228aa36222508759e97a | chenyukang/eopl | 35.scm | (load "../libs/init.scm")
(define leaf (lambda (n) n))
(define leaf? number?)
(define interior-node list)
(define interior-node? list?)
(define left cadr)
(define right caddr)
(define number-leaves
(lambda (bt)
(car (number-leaves-from bt 0))))
(define number-leaves-from
(lambda (bt n)
(cond
((null... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch1/35.scm | scheme | (load "../libs/init.scm")
(define leaf (lambda (n) n))
(define leaf? number?)
(define interior-node list)
(define interior-node? list?)
(define left cadr)
(define right caddr)
(define number-leaves
(lambda (bt)
(car (number-leaves-from bt 0))))
(define number-leaves-from
(lambda (bt n)
(cond
((null... | |
ece2587ae7dc8369a1343919808773bd8f13022ebe983dc6fa54c1f7dc108fe0 | TheLortex/mirage-monorepo | bench_mutex.ml | open Eio.Std
let v = ref 0
let run_sender ~iters_per_thread mutex =
for _ = 1 to iters_per_thread do
Eio.Mutex.lock mutex;
let x = !v in
v := x + 1;
Fiber.yield ();
assert (!v = x + 1);
v := x;
Eio.Mutex.unlock mutex;
done
let run_bench ~domain_mgr ~clock ~use_domains ~iters_per_threa... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/bench/bench_mutex.ml | ocaml | open Eio.Std
let v = ref 0
let run_sender ~iters_per_thread mutex =
for _ = 1 to iters_per_thread do
Eio.Mutex.lock mutex;
let x = !v in
v := x + 1;
Fiber.yield ();
assert (!v = x + 1);
v := x;
Eio.Mutex.unlock mutex;
done
let run_bench ~domain_mgr ~clock ~use_domains ~iters_per_threa... | |
41551ac54996638e00f0daa5e25f02c59b65bc4e3b17222513445e3064d1b2d8 | Opetushallitus/ataru | browser_tests.clj | (ns ataru.browser-tests
(:require [clojure.string :refer [split]]
[clojure.java.shell :refer [sh]]
[speclj.core :refer :all]
[com.stuartsierra.component :as component]
[ataru.test-utils :as utils]
[ataru.virkailija.virkailija-system :as virkailija-system]
... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/1f63b48743f88233d556f2d0008053625e18b046/spec/ataru/browser_tests.clj | clojure | (ns ataru.browser-tests
(:require [clojure.string :refer [split]]
[clojure.java.shell :refer [sh]]
[speclj.core :refer :all]
[com.stuartsierra.component :as component]
[ataru.test-utils :as utils]
[ataru.virkailija.virkailija-system :as virkailija-system]
... | |
dbd864d9302abb6468a82d8795b870dde83d2c517ca7a194f94744eb7ea19703 | 7max/log4cl | self-logger.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
Copyright ( c ) 2012 , . All rights reserved .
;;;
This file is licensed to You under the Apache License , Version 2.0
( the " License " ) ; you may not use this file except in compliance
with the License . You may obtain a copy of the Li... | null | https://raw.githubusercontent.com/7max/log4cl/d6293f9f1b6b8871b0a4417c4bb22afb9910b97f/src/self-logger.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
you may not use this file except in compliance
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
lim... | Copyright ( c ) 2012 , . All rights reserved .
This file is licensed to You under the Apache License , Version 2.0
with the License . You may obtain a copy of the License at
distributed under the License is distributed on an " AS IS " BASIS ,
(cl:in-package #:log4cl)
(defvar *self-log-config* '(:sane :war... |
3285b3293d56e9186024611f04b3d161ae138955de8918bb88d80843133bd5b5 | plumatic/grab-bag | core_test.clj | (ns service.core-test
(:use clojure.test plumbing.core plumbing.test)
(:require
[schema.core :as s]
[plumbing.graph :as graph]
[plumbing.resource :as resource]
[crane.config :as config]
[store.bucket :as bucket]
[web.fnhouse :as fnhouse]
[web.server :as server]
[service.builtin-resources :as... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/service/test/service/core_test.clj | clojure | (ns service.core-test
(:use clojure.test plumbing.core plumbing.test)
(:require
[schema.core :as s]
[plumbing.graph :as graph]
[plumbing.resource :as resource]
[crane.config :as config]
[store.bucket :as bucket]
[web.fnhouse :as fnhouse]
[web.server :as server]
[service.builtin-resources :as... | |
43aba49d407283643d353368574e2a7923bc6d8368d38d6eb1d444610c7b8c6b | logicmoo/wam_common_lisp | list-functions.lisp |
(in-package :pcl)
(defvar *defun-list* nil)
(defvar *defmethod-list* nil)
(defvar *defmacro-list* nil)
(defvar *defgeneric-list* nil)
(defvar *proclaim-list* nil)
(defun list-functions (&optional print-p)
(let ((eof '(eof))
(*package* *package*))
(setq *defun-list* nil
*defmethod-list* nil
*defmacro-lis... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/list-functions.lisp | lisp |
(in-package :pcl)
(defvar *defun-list* nil)
(defvar *defmethod-list* nil)
(defvar *defmacro-list* nil)
(defvar *defgeneric-list* nil)
(defvar *proclaim-list* nil)
(defun list-functions (&optional print-p)
(let ((eof '(eof))
(*package* *package*))
(setq *defun-list* nil
*defmethod-list* nil
*defmacro-lis... | |
8013143b485eb99a435b30321a9c71e3ae6fc5ed409e718253354338f1896dbb | robrix/starlight | Integration.hs | # LANGUAGE DataKinds #
# LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Starlight.Integratio... | null | https://raw.githubusercontent.com/robrix/starlight/ad80ab74dc2eedbb52a75ac8ce507661d32f488e/src/Starlight/Integration.hs | haskell | # LANGUAGE OverloadedStrings #
FIXME: do something clever, more generative
FIXME: do something smarter than ray-sphere intersection.
FIXME: motivate this from the laser intensity or w/e
we don’t have to do anything here because whether or not a character is firing is derived from its actions
FIXME: face *near* the... | # LANGUAGE DataKinds #
# LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Starlight.Integration
( integration
, inertia
, gravity... |
386a8184920d87bd5ad92b17740a96d34f52e9384760702b005d8ec99ab75b80 | xvw/preface | comonad.ml | module Core_via_map_and_duplicate
(Req : Preface_specs.Comonad.WITH_MAP_AND_DUPLICATE) =
struct
type 'a t = 'a Req.t
include (
Indexed_comonad.Core_via_map_and_duplicate (struct
type ('a, 'index) t = 'a Req.t
include (
Req :
Preface_specs.Comonad.WITH_MAP_AND_DUPLICATE
... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_make/comonad.ml | ocaml | module Core_via_map_and_duplicate
(Req : Preface_specs.Comonad.WITH_MAP_AND_DUPLICATE) =
struct
type 'a t = 'a Req.t
include (
Indexed_comonad.Core_via_map_and_duplicate (struct
type ('a, 'index) t = 'a Req.t
include (
Req :
Preface_specs.Comonad.WITH_MAP_AND_DUPLICATE
... | |
21781a7ad4afa811d7b7c3ee47e9da91b2597c32c1b1e2e7607aecd0c083a93a | dizzyd/erlang-mysql-driver | mysql_test.erl | file : mysql_test.erl
author : ( )
%% for license see COPYING
-module(mysql_test).
-compile(export_all).
test() ->
compile:file("/usr/local/lib/erlang/lib/mysql/mysql.erl"),
compile:file("/usr/local/lib/erlang/lib/mysql/mysql_conn.erl"),
Start the MySQL dispatcher and create the first connection... | null | https://raw.githubusercontent.com/dizzyd/erlang-mysql-driver/051f22e1cbe130061b43273a14217c659e6b860d/test/mysql_test.erl | erlang | for license see COPYING
to the database. 'p1' is the connection pool identifier.
Execute a query (using a binary)
Register a prepared statement
Execute the prepared statement | file : mysql_test.erl
author : ( )
-module(mysql_test).
-compile(export_all).
test() ->
compile:file("/usr/local/lib/erlang/lib/mysql/mysql.erl"),
compile:file("/usr/local/lib/erlang/lib/mysql/mysql_conn.erl"),
Start the MySQL dispatcher and create the first connection
mysql:start_link(p1, "... |
e9d55d71e9d38b2488bd7c9df3b8c69e2d061c35fd893da18475adb5710d0d20 | tomjaguarpaw/haskell-opaleye | Sql.hs | # LANGUAGE FlexibleContexts , ScopedTypeVariables #
module Opaleye.Sql (
-- * Showing SQL
showSql,
showSqlUnopt,
-- * Explicit versions
showSqlExplicit,
showSqlUnoptExplicit,
) where
import qualified Opaleye.Internal.Unpackspec as U
import qualified Opaleye.Internal.Print as Pr
import qualified Opaleye.... | null | https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/456191c2a452c1d3fca7761ec303e22694a192d3/src/Opaleye/Sql.hs | haskell | * Showing SQL
* Explicit versions
rows.
Example type specialization:
@
showSql :: Select (Field a, Field b) -> Maybe String
@
product type @Foo@:
@
showSql :: Select (Foo (Field a) (Field b) (Field c)) -> Maybe String
@ | # LANGUAGE FlexibleContexts , ScopedTypeVariables #
module Opaleye.Sql (
showSql,
showSqlUnopt,
showSqlExplicit,
showSqlUnoptExplicit,
) where
import qualified Opaleye.Internal.Unpackspec as U
import qualified Opaleye.Internal.Print as Pr
import qualified Opaleye.Internal.Optimize as Op
import Opa... |
e542f2fa633ab931bcaedca126902884153721cb3b4995ae219b6f6807f8712c | portkey-cloud/edn-to-cfn | project.clj | (defproject edn-to-cfn "20180420-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0"]
[expound "0.5.0"]
[cheshire "5.8.0"]
[org.jsoup/jsoup "1.11.3"]]
:source-paths ["src"])
| null | https://raw.githubusercontent.com/portkey-cloud/edn-to-cfn/7a3d247d35b7c4988c9b55634d03a008b87a2449/project.clj | clojure | (defproject edn-to-cfn "20180420-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0"]
[expound "0.5.0"]
[cheshire "5.8.0"]
[org.jsoup/jsoup "1.11.3"]]
:source-paths ["src"])
| |
f3536443fab2dd2703a0c5390cb7eb34ee48da35d99ff180cdd9aa701474d950 | fission-codes/fission | Types.hs | module Fission.CLI.PubSub.Secure.Connection.Types (Connection (..)) where
import qualified Fission.CLI.PubSub.Class as Insecure
data Connection m cipher = Connection
{ conn :: Insecure.Connection m
, key :: cipher
}
| null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-cli/library/Fission/CLI/PubSub/Secure/Connection/Types.hs | haskell | module Fission.CLI.PubSub.Secure.Connection.Types (Connection (..)) where
import qualified Fission.CLI.PubSub.Class as Insecure
data Connection m cipher = Connection
{ conn :: Insecure.Connection m
, key :: cipher
}
| |
a943179d001ae0e5b5aea9d4f8a969dbce355513ff3ac397e96b52021df1930d | active-group/sqlosure | northwind_examples_test.clj | (ns sqlosure.northwind-examples-test
(:require [active.clojure.monad :refer [monadic]]
[clojure.java.jdbc :as jdbc]
[clojure.test :refer :all]
[sqlosure.core :refer :all]
[sqlosure.backend :as backend]
[sqlosure.type :as type]
[sqlosure.type-impl... | null | https://raw.githubusercontent.com/active-group/sqlosure/3cd74e90df4f3c49c841a1a75941acc7444c4bfb/test/sqlosure/northwind_examples_test.clj | clojure | TABLE DEFINITIONS.
Customers
Employees
For the sake of showing how to overwrite the default implementations of
the type coercion from/to sql, we overwrite doubles to be interpreted
Reify double
Reify nullable double
Examples taken from here: -exercises/northwind/products-table-exercises/ | (ns sqlosure.northwind-examples-test
(:require [active.clojure.monad :refer [monadic]]
[clojure.java.jdbc :as jdbc]
[clojure.test :refer :all]
[sqlosure.core :refer :all]
[sqlosure.backend :as backend]
[sqlosure.type :as type]
[sqlosure.type-impl... |
70a4259bc69faabe02f2c3a3d0b1c15d8404a73a424b24b1d7fb68662eb21e2a | zkincaid/duet | quantifier.mli | open Syntax
open Interpretation
(** Satisfiability via strategy improvement *)
val simsat : 'a context -> 'a formula -> [ `Sat | `Unsat | `Unknown ]
(** Satisfiability via strategy improvement, forwards version *)
val simsat_forward : 'a context -> 'a formula -> [ `Sat
... | null | https://raw.githubusercontent.com/zkincaid/duet/d204e01acc3662477abe664e8c24ce4e8abc73e9/srk/src/quantifier.mli | ocaml | * Satisfiability via strategy improvement
* Satisfiability via strategy improvement, forwards version
* Alternating quantifier optimization
* Quantifier eliminiation via model-based projection
* Model-based projection. If [dnf] option is set, convert to
disjunctive normal form.
* Over-approximtate model-based ... | open Syntax
open Interpretation
val simsat : 'a context -> 'a formula -> [ `Sat | `Unsat | `Unknown ]
val simsat_forward : 'a context -> 'a formula -> [ `Sat
| `Unsat
| `Unknown ]
val maximize : 'a context -> 'a formula... |
0128ef665df3e5765abca5713f7791838a4f142f5f1fd58c0714d0856bc4a343 | smimram/funk | serial.ml | (* TODO: see *)
let kprintf f = Funk.kprintf "Serial" f
let port_addr = [|0x3f8; 0x2f8; 0x3e8; 0x2e8|]
(** Line Status Register. *)
let offs_lsr = 5
exception Invalid_port
exception No_data
(* TODO: use IRQs *)
let get_byte port =
if Funk.inb (port_addr.(port) + offs_lsr) land... | null | https://raw.githubusercontent.com/smimram/funk/88328dd9087c9097b1bfe2cf5394ba99fa631934/src/drivers/serial.ml | ocaml | TODO: see
* Line Status Register.
TODO: use IRQs
Turn off interrupts.
Set PIC.
Interrupt when data has been received. |
let kprintf f = Funk.kprintf "Serial" f
let port_addr = [|0x3f8; 0x2f8; 0x3e8; 0x2e8|]
let offs_lsr = 5
exception Invalid_port
exception No_data
let get_byte port =
if Funk.inb (port_addr.(port) + offs_lsr) land 0x01 <> 0x01 then
raise No_data
else
Funk.inb port_addr.... |
35ecab466b93c734eb582901c36b6083cec36755348c7adc8dd02d3b247354b4 | scheme-live/live | output.scm | ((asd . "sdf")) | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/y-object-basic/output.scm | scheme | ((asd . "sdf")) | |
c05d841398ca52bfadb8421689d3a9497769484f7053b5e5ff799a640f3480db | dhammikamare/Learn-OCaml | mid_complexez.ml | let complex_sum (x1, y1) (x2, y2) =
(x1+.x2, y1+.y2);;
let complex_mul (x1, y1) (x2, y2) =
(x1*.x2-.y1*.y2, x1*.y2+.y1*.x2);;
let exp_z (x, y) imax =
let rec loop i tnp ez =
if i = imax then ez
else
let zt = (x/.(float)i, y/.(float)i) in
let tn = complex_mul zt tnp in
loop (i+1) tn (complex_sum... | null | https://raw.githubusercontent.com/dhammikamare/Learn-OCaml/2d4e3da38ee86cd7477964ffb8756a8483260322/exams/2014%20fall/mid_complexez.ml | ocaml | test | let complex_sum (x1, y1) (x2, y2) =
(x1+.x2, y1+.y2);;
let complex_mul (x1, y1) (x2, y2) =
(x1*.x2-.y1*.y2, x1*.y2+.y1*.x2);;
let exp_z (x, y) imax =
let rec loop i tnp ez =
if i = imax then ez
else
let zt = (x/.(float)i, y/.(float)i) in
let tn = complex_mul zt tnp in
loop (i+1) tn (complex_sum... |
d840261ea0bf39bca89b9b8ec17ce783cf21025a6b0eaa5ce47fe76a5a657ae2 | jlouis/safetyvalve | sv_queue_eqc.erl | %% THE SIMPLEST POSSIBLE CASE
%%
When writing EQC test cases , begin by thinking in * microscopic *
test cases . That is , go for the smallest possible test case first
%% and then extend it. In our case, we have an extremely degenerate queue:
%%
* The concurrency level on the queue is 1 .
%% * The queue size is K... | null | https://raw.githubusercontent.com/jlouis/safetyvalve/c8235c6ca1deffeccdbba9dd74263408ed56594a/eqc_test/sv_queue_eqc.erl | erlang | THE SIMPLEST POSSIBLE CASE
and then extend it. In our case, we have an extremely degenerate queue:
* The queue size is K, so there are between 0 and K workers waiting
in the queue
The postconditions we want to check are:
So if we spawn a new process when the queue is full, we expect that
new spawn to be de... | When writing EQC test cases , begin by thinking in * microscopic *
test cases . That is , go for the smallest possible test case first
* The concurrency level on the queue is 1 .
* The poll rate of the queue is 1 and maximum token count is 1 .
* The concurrency level in the SUT is * never * more than 1 .
* ... |
d7db326c40b47c33e406ef79bf824510736c607f4164e1fa3eae2f88ef1c0a49 | rossberg/wasm | memory.ml |
* ( c ) 2015
* (c) 2015 Andreas Rossberg
*)
open Bigarray
type address = int
type alignment = Aligned | Unaligned
type mem_type =
| SInt8Mem | SInt16Mem | SInt32Mem | SInt64Mem
| UInt8Mem | UInt16Mem | UInt32Mem | UInt64Mem
| Float32Mem | Float64Mem
type memory = (int, int8_unsigned_elt, c_layout) Ar... | null | https://raw.githubusercontent.com/rossberg/wasm/c2dda7e0e703ef27426494d1696b2129895ba735/src/memory.ml | ocaml |
* ( c ) 2015
* (c) 2015 Andreas Rossberg
*)
open Bigarray
type address = int
type alignment = Aligned | Unaligned
type mem_type =
| SInt8Mem | SInt16Mem | SInt32Mem | SInt64Mem
| UInt8Mem | UInt16Mem | UInt32Mem | UInt64Mem
| Float32Mem | Float64Mem
type memory = (int, int8_unsigned_elt, c_layout) Ar... | |
dbc1350b63cce8d9e09a329a94e1d7c1dc695b48cd6a06eabcaaf888d56fcef3 | snowleopard/hadrian | Clean.hs | module Rules.Clean (clean, cleanSourceTree, cleanRules) where
import qualified System.Directory as IO
import Base
clean :: Action ()
clean = do
putBuild "| Removing Hadrian files..."
cleanSourceTree
path <- buildRoot
putBuild $ "| Remove directory " ++ path ++ " (after build completes)"
runAfter $... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Rules/Clean.hs | haskell | since we can't delete the Shake database while Shake is running
Clean all temporary fs files copied by configure into the source folder | module Rules.Clean (clean, cleanSourceTree, cleanRules) where
import qualified System.Directory as IO
import Base
clean :: Action ()
clean = do
putBuild "| Removing Hadrian files..."
cleanSourceTree
path <- buildRoot
putBuild $ "| Remove directory " ++ path ++ " (after build completes)"
putSuccess... |
a1aa042e093913bb9fbfa7eb70630c076c692b3f14a8e5a2760a18aae51d90a4 | hiroshi-unno/coar | polyhedron.ml | open Core
open Common.Ext
open Ast
open Ast.LogicOld
open PCSatCommon
let make n seeds =
Set.Poly.fold ~init:(Set.Poly.singleton (n, [])) seeds ~f:(fun acc (x, _, t) ->
Set.Poly.union_list
[acc;
Set.concat_map acc ~f:(fun (n, xts) ->
Set.Poly.of_list @@ List.init n ~f:(fun i -> n ... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/qualifier/polyhedron.ml | ocaml | open Core
open Common.Ext
open Ast
open Ast.LogicOld
open PCSatCommon
let make n seeds =
Set.Poly.fold ~init:(Set.Poly.singleton (n, [])) seeds ~f:(fun acc (x, _, t) ->
Set.Poly.union_list
[acc;
Set.concat_map acc ~f:(fun (n, xts) ->
Set.Poly.of_list @@ List.init n ~f:(fun i -> n ... | |
e6e36f668220949088a3693e70cd1587f78955bfac78db62244da2d1c686bbd5 | scmlab/gcl | ExNondet.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
module GCL.Exec.ExNondet where
import Control.Arrow ( (***) )
import Control.Monad.Except
import Control.Monad.State hiding ( guard )
import GHC.Base ( Alternative(..) )
import ... | null | https://raw.githubusercontent.com/scmlab/gcl/482c20888ab3ba6f4cf0cc57fd9792d60b0bbf2e/src/GCL/Exec/ExNondet.hs | haskell | run a program by
runExNondet (execProg program) prelude
later? | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
module GCL.Exec.ExNondet where
import Control.Arrow ( (***) )
import Control.Monad.Except
import Control.Monad.State hiding ( guard )
import GHC.Base ( Alternative(..) )
import ... |
4f901f1ea8860f13abc0beb313de5f212c389c46629d33673721675666aff83a | cil-project/cil | ccl.mli |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code mu... | null | https://raw.githubusercontent.com/cil-project/cil/936b04103eb573f320c6badf280e8bb17f6e7b26/src/ext/ccl/ccl.mli | ocaml |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code mu... | |
98364fddc305ff23b822323fa4be9bca5c18e1d9d9359300b99e740f2dc0267c | basho/riak_core | bg_manager_tests.erl | -module(bg_manager_tests).
-compile([export_all, nowarn_export_all]).
-include_lib("riak_core_bg_manager.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-define(BG_MGR, riak_core_bg_manager).
-define(TIMEOUT, 3000). %% blocking resource timeout
bg_mgr_test_() ->
{timeout, 60000, %% Seconds to fin... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/test/bg_manager_tests.erl | erlang | blocking resource timeout
Seconds to finish all of the tests
uses non-linking start.
cleanup
Tests
Trying to set the rate on a token of the wrong type looks
like an unregistered token.
Same for locks.
Don't allow get_token(Lock)
Don't allow get_lock(Token)
bg_manager_eqc:get_token('B') -> ok
bg_manager_eqc:... | -module(bg_manager_tests).
-compile([export_all, nowarn_export_all]).
-include_lib("riak_core_bg_manager.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-define(BG_MGR, riak_core_bg_manager).
bg_mgr_test_() ->
{setup, fun() ->
end,
fun(_) ->
kill_bg_mgr(),
fun(_) -... |
f9e635c33bf854871e93ee69b613edda7bb5ce05848ff5c54ddfd0d9a686f013 | sigscale/5g-ngap | ngap_endpoint_sup_sup.erl | %%% ngap_endpoint_sup_sup.erl
%%% vim: ts=3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2020 SigScale Global Inc.
%%% @end
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 ... | null | https://raw.githubusercontent.com/sigscale/5g-ngap/e4de7891a757d9587314d02f9e5598d51f8e7f5a/src/ngap_endpoint_sup_sup.erl | erlang | ngap_endpoint_sup_sup.erl
vim: ts=3
@end
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 Lice... | 2020 SigScale Global Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ngap_endpoint_sup_sup).
-copyright('Copyright (c) 2020 SigScale Global Inc.').
-behaviour(supervisor).
-export([init/1]).
-spec init(Arg... |
21d18ed266a2876543ad63e3120bf128e900cfdec9d20a3a29d126b191cd96e8 | platbox/epgsql_utils | epgsql_utils_supervisor2.erl | This file is a copy of supervisor.erl from the R16B Erlang / OTP
%% distribution, with the following modifications:
%%
1 ) the module name is
%%
2 ) a find_child/2 utility function has been added
%%
3 ) Added an ' intrinsic ' restart type . Like the transient type , this
%% type means the child should only ... | null | https://raw.githubusercontent.com/platbox/epgsql_utils/98b9915b18050e60dd4f1a119d4b754b7184b034/src/epgsql_utils_supervisor2.erl | erlang | distribution, with the following modifications:
type means the child should only be restarted if the child exits
abnormally. Unlike the transient type, if the child exits
normally, the supervisor itself also exits normally. If the
child is a supervisor and it exits normally (i.e. with reason of
... | This file is a copy of supervisor.erl from the R16B Erlang / OTP
1 ) the module name is
2 ) a find_child/2 utility function has been added
3 ) Added an ' intrinsic ' restart type . Like the transient type , this
4 ) child specifications can contain , as the restart type , a tuple
where Delay > = 0 ( see... |
5661526416ddbcb56021e4c3247685b3b97d8e05dd7c1bef5944723339f47b26 | nikita-volkov/domain | TypeCentricDoc.hs | module Domain.YamlUnscrambler.TypeCentricDoc
where
import Domain.Prelude
import Domain.Models.TypeCentricDoc
import YamlUnscrambler
import qualified Domain.Attoparsec.TypeString as TypeStringAttoparsec
import qualified Domain.Attoparsec.General as GeneralAttoparsec
import qualified Control.Foldl as Fold
import qualifi... | null | https://raw.githubusercontent.com/nikita-volkov/domain/c6c7ed12879b486ffa5a6b431d5abbe34e9ff2bd/library/Domain/YamlUnscrambler/TypeCentricDoc.hs | haskell | * Scalar
-----------------------
* Mapping
----------------------- | module Domain.YamlUnscrambler.TypeCentricDoc
where
import Domain.Prelude
import Domain.Models.TypeCentricDoc
import YamlUnscrambler
import qualified Domain.Attoparsec.TypeString as TypeStringAttoparsec
import qualified Domain.Attoparsec.General as GeneralAttoparsec
import qualified Control.Foldl as Fold
import qualifi... |
65062a9bf80236f6d54f9da64cca839606d8ac8091a0a307349e20121ff71444 | mtomas/clojurescript-reagent-pexeso | dev.clj | (ns react-cljs-blogpost.dev
(:require [cemerick.piggieback :as piggieback]
[weasel.repl.websocket :as weasel]
[leiningen.core.main :as lein]))
(defn browser-repl []
(piggieback/cljs-repl :repl-env (weasel/repl-env :ip "127.0.0.1" :port 9001)))
(defn start-figwheel []
(future
(print "... | null | https://raw.githubusercontent.com/mtomas/clojurescript-reagent-pexeso/4af25eba7556e2c41102d43ea7792a86f1b79504/env/dev/clj/react_cljs_blogpost/dev.clj | clojure | (ns react-cljs-blogpost.dev
(:require [cemerick.piggieback :as piggieback]
[weasel.repl.websocket :as weasel]
[leiningen.core.main :as lein]))
(defn browser-repl []
(piggieback/cljs-repl :repl-env (weasel/repl-env :ip "127.0.0.1" :port 9001)))
(defn start-figwheel []
(future
(print "... | |
b57f75b4fd5f774bcb9475425474a4d72428515673a886aefef96ce619170de8 | noir-clojure/cljs-template | main.cljs | (ns {{name}}.client.main
(:require [noir.cljs.client.watcher :as watcher]
[clojure.browser.repl :as repl]
[crate.core :as crate])
(:use [jayq.core :only [$ append]])
(:use-macros [crate.def-macros :only [defpartial]]))
;;************************************************
;; Dev stuff
;;****... | null | https://raw.githubusercontent.com/noir-clojure/cljs-template/09e8fdf89854f1bb9d852d7c0916cbd96c22c79c/src/leiningen/new/cljs_template/main.cljs | clojure | ************************************************
Dev stuff
************************************************
(repl/connect ":9000/repl")
************************************************
Code
************************************************ | (ns {{name}}.client.main
(:require [noir.cljs.client.watcher :as watcher]
[clojure.browser.repl :as repl]
[crate.core :as crate])
(:use [jayq.core :only [$ append]])
(:use-macros [crate.def-macros :only [defpartial]]))
(watcher/init)
(def $content ($ :#content))
(defpartial up-and-run... |
7df5d24ba6cb6a1d5df289fc8c6afab571fe1ab0d7484ea1dd4793c3d3f6ebbd | informatimago/lisp | guess-the-cat.lisp | (defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.GUESS-THE-CAT"
(:use "COMMON-LISP")
(:nicknames "GUESS-THE-CAT")
(:export "MAIN")
(:documentation "
"))
(in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.GUESS-THE-CAT")
(defparameter *box-count* 5)
(defvar *debug* nil)
(defun explanations ()
(format t "
Catch the Ca... | null | https://raw.githubusercontent.com/informatimago/lisp/71dab5e7471ffbf75c2d34635bbcf7eb5c5acfc4/small-cl-pgms/guess-the-cat.lisp | lisp | (defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.GUESS-THE-CAT"
(:use "COMMON-LISP")
(:nicknames "GUESS-THE-CAT")
(:export "MAIN")
(:documentation "
"))
(in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.GUESS-THE-CAT")
(defparameter *box-count* 5)
(defvar *debug* nil)
(defun explanations ()
(format t "
Catch the Ca... | |
646352f806031b5d4869bd000f9bdfccc5d975000f080b233991c4870a872f72 | vyorkin/tiger | testsuite.ml | let () =
let suite = Suite.(load all) in
Alcotest.run "Tiger" suite
| null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter7/test/testsuite.ml | ocaml | let () =
let suite = Suite.(load all) in
Alcotest.run "Tiger" suite
| |
59c0e48d85ec7e2adcbf26c0f6c07fd6b28c44f54900b28adf3d083ba3f626a8 | mzp/coq-for-ipad | gc.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/stdlib/gc.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Para , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : gc.ml 10315 2010 - 04 - 27 07:5... |
41629498b73f04994fd85441917ed6958283199d077d2e56860d0a46a666969f | robert-strandh/Clobber | clobber.lisp | (cl:in-package #:clobber)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Transaction log.
;;;
;;; Transactions can be any object. They are logged to the stream by
;;; using the serialization defined below. Typically, an application
;;; would either use a list (<function-name> <arg> ..... | null | https://raw.githubusercontent.com/robert-strandh/Clobber/212721c24a8bb792714314ba52dfe818641f2e98/clobber.lisp | lisp |
Transaction log.
Transactions can be any object. They are logged to the stream by
using the serialization defined below. Typically, an application
would either use a list (<function-name> <arg> ... <arg>) or an
instance of STANDARD-OBJECT as a transaction. The application
itself is responsible for what to d... | (cl:in-package #:clobber)
(defclass transaction-log ()
(%log-streami
:initarg :log-stream
:reader log-stream)
(%object-id-table
:initarg :object-id-table
:reader object-id-table)
(%next-object-id
:initarg :next-object-id
:accessor next-object-id)))
(defgeneric serialize (object tran... |
983157007fdde78a6b08f941ec4d99cd26f3ad303180b69278b24354b3f76d74 | mirage/alcotest | alcotest_engine.mli |
* Copyright ( c ) 2013 - 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/src/alcotest-engine/alcotest_engine.mli | ocaml | * [Alcotest_engine] provides a platform-independent test framework.
The main building blocks and combinators are defined here. These can be used
to defined tests. The platform-specific runners for these tests are in
[alcotest], [alcotest-lwt], [alcotest-async] and [alcotest-mirage].
* {1 Assert functions}... |
* Copyright ( c ) 2013 - 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
c95372e706772304d7dec360f2aa4c445ba21fc2f94ef016a5a69ba2474a9391 | ardumont/haskell-lab | io.hs | import Data.Maybe
maybeRead :: Read a => String -> Maybe a
maybeRead s = case reads s of
[(x,"")] -> Just x
_ -> Nothing
getListFromString :: String -> Maybe [Integer]
getListFromString str = maybeRead $ "[" ++ str ++ "]"
askUser :: IO [Integer]
askUser =
putStrLn... | null | https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/io.hs | haskell | import Data.Maybe
maybeRead :: Read a => String -> Maybe a
maybeRead s = case reads s of
[(x,"")] -> Just x
_ -> Nothing
getListFromString :: String -> Maybe [Integer]
getListFromString str = maybeRead $ "[" ++ str ++ "]"
askUser :: IO [Integer]
askUser =
putStrLn... | |
0beccb0a298c17a7080b2e2933ea5aba716bd1d24e6db2a63953a6134c39ad63 | mwand/5010-examples | 11-2-squares.rkt | #lang racket
11-2-squares.rkt
;; adds squares ("s")
11-1-flashing-balls.rkt :
extends 10 - 6 - push - model by adding a flashing ball ( " f " )
(require rackunit)
(require 2htdp/universe)
(require 2htdp/image)
(require "extras.rkt")
start with ( run framerate ) . Typically : ( run 0.25 )
;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/11-2-squares.rkt | racket | adds squares ("s")
CONSTANTS
Data Definitions
A Widget is an object whose class implements Widget<%>
INTERFACES
-> Void
GIVEN: no arguments
EFFECT: updates this world to its state after a tick
Integer Integer MouseEvent-> Void
GIVEN: a location
EFFECT: updates this world to the state that should follow th... | #lang racket
11-2-squares.rkt
11-1-flashing-balls.rkt :
extends 10 - 6 - push - model by adding a flashing ball ( " f " )
(require rackunit)
(require 2htdp/universe)
(require 2htdp/image)
(require "extras.rkt")
start with ( run framerate ) . Typically : ( run 0.25 )
(define CANVAS-WIDTH 400)
(define C... |
c9de033137ea94b8ade5c18a1f451f94b9323b61e52496bec2b4bf9ce8f85b65 | realworldocaml/examples | basic_md5_with_default_file.ml | open Core.Std
let get_inchan = function
| "-" -> In_channel.stdin
| filename -> In_channel.create ~binary:true filename
let do_hash filename () =
let open Cryptokit in
get_inchan filename
|> hash_channel (Hash.md5 ())
|> transform_string (Hexa.encode ())
|> print_endline
let command =
Command.ba... | null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/command-line-parsing/basic_md5_with_default_file.ml | ocaml | open Core.Std
let get_inchan = function
| "-" -> In_channel.stdin
| filename -> In_channel.create ~binary:true filename
let do_hash filename () =
let open Cryptokit in
get_inchan filename
|> hash_channel (Hash.md5 ())
|> transform_string (Hexa.encode ())
|> print_endline
let command =
Command.ba... | |
42a8c8fe8da985f551ffdba1c57db2b57676520ec3b64114dee70f9d55386c27 | ekmett/structs | Internal.hs | # LANGUAGE CPP #
{-# LANGUAGE GADTs #-}
# LANGUAGE Unsafe #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE MagicHash #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ViewPatterns #
# LANGUAGE UnboxedTuples #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE Flexi... | null | https://raw.githubusercontent.com/ekmett/structs/f03e630754380b39ef0f08bf3e8c1d59d68d8ab6/src/Data/Struct/Internal.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE DeriveAnyClass #
# LANGUAGE ConstraintKinds #
# LANGUAGE TypeInType #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
---------... | # LANGUAGE CPP #
# LANGUAGE Unsafe #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE MagicHash #
# LANGUAGE ViewPatterns #
# LANGUAGE UnboxedTuples #
# LANGUAGE PatternSynonyms #
# LANGUAGE FlexibleContexts #
# LANGUAGE DefaultSignatures #
#if __GLASGOW_HASKELL__ < 806
#endif
# OPTIONS_HADDOCK not - home #
... |
c5c7b756e1a3b606d7834f5ca0d7d4d33342769d989f46ef81436d06dab88a26 | backtracking/ocamlgraph | xDot.mli | (**************************************************************************)
(* *)
(* This file is part of OcamlGraph. *)
(* *)
Copyright... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/xDot.mli | ocaml | ************************************************************************
This file is part of OcamlGraph.
... | Copyright ( C ) 2009 - 2010
CEA ( Commissariat � l' � )
Lesser General Public License as published by the Free Software
Foundation , version 2.1 , with a linking exception .
( ) ... |
15c5e3e42021aa9457297ac1010f876075caf548504d03968fc9f8a00a25322c | clojure/clojurescript | hash_map_test.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs/cljs/hash_map_test.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
run... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.hash-map-test
(:refer-clojure :exclude [iter])
(:require [cljs.test :refer-macros [deftest testing is]]))
(defn iter->set
"Return a set of elements in iterator"
[iter]
(loop [entries #{} iter iter]
(if (.hasNe... |
cb3b79bd2dca0f2c6fa9c0436c378e0aa9f73f2ccb49746b020b85db9a8524a8 | mnemonic-no/act-scio | addressvalidator_test.clj | (ns scio-back.addressvalidator-test
(:require [clojure.test :refer :all]
[scio-back.addressvalidator :refer :all]))
(deftest test-ipv6
(testing "Verify form 1"
(is (= true (ipv6-form-1? "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789")))
(is (= true (ipv6-form-1? "2001:DB8:0:0:8:800:200C:417A")))
... | null | https://raw.githubusercontent.com/mnemonic-no/act-scio/bd2e2ccfa54c8a102748d37c79c1292abb63522b/test/scio_back/addressvalidator_test.clj | clojure | (ns scio-back.addressvalidator-test
(:require [clojure.test :refer :all]
[scio-back.addressvalidator :refer :all]))
(deftest test-ipv6
(testing "Verify form 1"
(is (= true (ipv6-form-1? "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789")))
(is (= true (ipv6-form-1? "2001:DB8:0:0:8:800:200C:417A")))
... | |
c0678c16d688fb01bd10c5999354c2ab8f26189d560f7cabb868fbfbd52aa2c5 | SimulaVR/godot-haskell | AudioEffectPitchShift.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.AudioEffectPitchShift
(Godot.Core.AudioEffectPitchSh... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/AudioEffectPitchShift.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.AudioEffectPitchShift
(Godot.Core.AudioEffectPitchSh... | |
12667465232a40dc458688a055cfad35c933ca180213c31c5845d596c4d62eae | andrejbauer/clerical | name.ml | type ident = string
| null | https://raw.githubusercontent.com/andrejbauer/clerical/6916f1de50f812921fe187bdaec830e06f4dcde8/src/name.ml | ocaml | type ident = string
| |
d9b625ae0b2c0e348fdea2d74fe97c9d645121c446ce4f1ce8dc339d5ea246a1 | nd/bird | 10.2.3.hs | data Term = Con Int | Div Term Term | Count
newtype St a = MkSt (State -> (a, State))
type State = Int
instance Monad St where
return x = MkSt f where f s = (x, s)
p >>= q = MkSt f
where f s = apply (q x) s'
where (x, s') = apply p s
tick :: St ()
tick = MkSt f w... | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch10/10.2.3.hs | haskell | data Term = Con Int | Div Term Term | Count
newtype St a = MkSt (State -> (a, State))
type State = Int
instance Monad St where
return x = MkSt f where f s = (x, s)
p >>= q = MkSt f
where f s = apply (q x) s'
where (x, s') = apply p s
tick :: St ()
tick = MkSt f w... | |
b04f77d5392662a83321e98dc4512fb7b97e6349629792ee054d224698f93332 | finnishtransportagency/harja | tiemerkinnan_kustannusyhteenveto_test.clj | (ns harja.palvelin.raportointi.tiemerkinnan-kustannusyhteenveto-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.toimenpidekoodit :refer :all]
[harja.palvelin.palvelut.urakat :refer :all]
[harja.pa... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/2c57878728baee103c056f28f9dd41001357222d/test/clj/harja/palvelin/raportointi/tiemerkinnan_kustannusyhteenveto_test.clj | clojure | "))
"))
"))
"))
")) ; Ei aikavälillä
")
")
"))
"))
"))
työ
Poistettuun työ , ei näy raportilla
Suunnitelma
"))
"))
"))
")) ; Ei aikavälillä
Poistettu
arvonmuutokset
"))
"))
"))
indeksit
"))
Sakot
"))
"))
"))
"))
"))
"))
"))
"))
Bonukset
"))
"))
"))
"))
"))
"))
"))
")))) | (ns harja.palvelin.raportointi.tiemerkinnan-kustannusyhteenveto-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.toimenpidekoodit :refer :all]
[harja.palvelin.palvelut.urakat :refer :all]
[harja.pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.