_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 |
|---|---|---|---|---|---|---|---|---|
3c9756ccc522a6050b3e7c33d0644156a8cda4f10f6438d6b4bb4e772c76b37a | paurkedal/ocaml-cothrift | sample.ml | Copyright ( C ) 2016 < >
*
* 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 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-cothrift/4410e5123ec6b3769c0d046f1abf4a73e9b56a0f/tests/sample.ml | ocaml | Copyright ( C ) 2016 < >
*
* 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 3 of the License , or ( at your
* option ) any later version , with the ... | |
486c8445c6dfa81196efade3891859ba8414770b059d4cb496431b286700ab0b | directrix1/DuplicateBridgeTeamSteele | random-utilities.lisp | (in-package "ACL2")
(include-book "doublecheck" :dir :teachpacks)
(include-book "list-utilities" :dir :teachpacks)
; generate a random permutation of the n-element prefix of xs
; n = natural number
; xs = (x1 x2 x3 ... xm), m >= n
; (random-permutation-of-first-n n xs) = permutation of (x1 x2 ... xm)
(defran... | null | https://raw.githubusercontent.com/directrix1/DuplicateBridgeTeamSteele/0f0d0312569fb1d26d568e2b87d66ac160ac60c3/code/random-utilities.lisp | lisp | generate a random permutation of the n-element prefix of xs
n = natural number
xs = (x1 x2 x3 ... xm), m >= n
(random-permutation-of-first-n n xs) = permutation of (x1 x2 ... xm)
| (in-package "ACL2")
(include-book "doublecheck" :dir :teachpacks)
(include-book "list-utilities" :dir :teachpacks)
(defrandom random-permutation-of-first-n (n xs)
(if (zp n)
nil
(let* ((n-1 (1- n))
(k (random-between 0 n-1))
(br (break-at-nth k xs))
(bf... |
a581ed140728faa02c8a0e2a8c6b63b0a8aec0457da1e8f986b93c7717b679d6 | synrc/nitro | element_meta.erl | -module(element_meta).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#meta.show_if==false -> [<<>>];
render_element(Record) ->
List = [
%global
{<<"accesskey">>, Record#meta.accesskey},
{<<"class">>, Record#meta... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/meta/element_meta.erl | erlang | global
spec | -module(element_meta).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#meta.show_if==false -> [<<>>];
render_element(Record) ->
List = [
{<<"accesskey">>, Record#meta.accesskey},
{<<"class">>, Record#meta.class},
... |
00f65f0241b78ff1304fd9ee4c6360fc963b3a35a57237c3db8f769d4296ac32 | aantron/hyper | ws_nohttp.ml | This file is part of Hyper , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2022
for details, or visit .
Copyright 2022 Anton Bachin *)
let test request =
Test_expect_http.Suite.server request
let%expect_test _ =
Test_expect_http.Suite.ws ~nohttp:true t... | null | https://raw.githubusercontent.com/aantron/hyper/d4f41825bd25b0da48cb75f127257204b46ce76a/test/expect/http/ws_nohttp/ws_nohttp.ml | ocaml | This file is part of Hyper , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2022
for details, or visit .
Copyright 2022 Anton Bachin *)
let test request =
Test_expect_http.Suite.server request
let%expect_test _ =
Test_expect_http.Suite.ws ~nohttp:true t... | |
9d78393b88c8b38e2702582b9f7c6452fc908f3b83714bffadf8f089027fa6a6 | isovector/design-tools | Main.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Main where
import Data.Char hiding (Format, Space)
import qualified Data.Text as T
import Ghci
import Combinators
import KEndo
import Lib
import Text.Pandoc.JSON
import Text.Pandoc.Walk
import DeathNotes
import Text.Pandoc
import System.IO
impo... | null | https://raw.githubusercontent.com/isovector/design-tools/80aa82abf7b4d29d0899409c08c286d5be5f0993/app/Main.hs | haskell | | Epub gets built in the wrong directory so this hack fixes that
from -16.13/xhtml-3000.2.2.1/src/Text-XHtml-Internals.html | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Main where
import Data.Char hiding (Format, Space)
import qualified Data.Text as T
import Ghci
import Combinators
import KEndo
import Lib
import Text.Pandoc.JSON
import Text.Pandoc.Walk
import DeathNotes
import Text.Pandoc
import System.IO
impo... |
ffb2b2e20f74fe2f02efa2906c6992ceb73e92e9b9885140cde1a4f83c4c5c3a | xtdb/core2 | group_by_test.clj | (ns core2.operator.group-by-test
(:require [clojure.test :as t]
[core2.operator.group-by :as group-by]
[core2.test-util :as tu]
[core2.util :as util]
[core2.vector.indirect :as iv]))
(t/use-fixtures :each tu/with-allocator)
(t/deftest test-group-by
(letfn [(run-test... | null | https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/src/test/clojure/core2/operator/group_by_test.clj | clojure | (ns core2.operator.group-by-test
(:require [clojure.test :as t]
[core2.operator.group-by :as group-by]
[core2.test-util :as tu]
[core2.util :as util]
[core2.vector.indirect :as iv]))
(t/use-fixtures :each tu/with-allocator)
(t/deftest test-group-by
(letfn [(run-test... | |
5d0febbde8e8e0c6c00f60d6103891085237f6f419fc889dda2d69350403f899 | OCamlPro/techelson | utils.mli | (** Parsing-related helpers. *)
* Returns what 's after some prefix in a token .
Used to parse macros . First parameter is the prefix , second is the token .
Used to parse macros. First parameter is the prefix, second is the token.
*)
val tail_of_pref : pref:string -> string -> string option
(** Recogni... | null | https://raw.githubusercontent.com/OCamlPro/techelson/932fbf08675cd13d34a07e3b3d77234bdafcf5bc/src/2_parse/utils.mli | ocaml | * Parsing-related helpers.
* Recognizes sequences of characters in a token.
Input function says whether some character is recognized. The function stops parsing
when it returs `None`.
Keeps on parsing as long as it is successful. Returns the tail of the token, the part
that was not parsed.
|
* Returns what 's after some prefix in a token .
Used to parse macros . First parameter is the prefix , second is the token .
Used to parse macros. First parameter is the prefix, second is the token.
*)
val tail_of_pref : pref:string -> string -> string option
val sequence : (char -> 'a option) -> strin... |
386be1ae224a53aa82114d863c3a45f8efbc2cb26478a138075d05e383b4c8a8 | antoniogarrote/levanzo | jsonld_test.clj | (ns levanzo.jsonld-test
(:require [clojure.test :refer :all]
[levanzo.spec.utils :as spec-utils]
[levanzo.jsonld :as jsonld]))
(deftest assoc-if-some-test
(is (= {"@id" ["ho" ""]} (jsonld/assoc-if-some :id "@id" {:id ""} {"@id" "ho"})))
(is (= {"@id" ""} (jsonld/assoc-if-some :id "@id" {:... | null | https://raw.githubusercontent.com/antoniogarrote/levanzo/53a8fa134099b3ad6310bfc3493cc1fb9eb38f2f/test/levanzo/jsonld_test.clj | clojure | (ns levanzo.jsonld-test
(:require [clojure.test :refer :all]
[levanzo.spec.utils :as spec-utils]
[levanzo.jsonld :as jsonld]))
(deftest assoc-if-some-test
(is (= {"@id" ["ho" ""]} (jsonld/assoc-if-some :id "@id" {:id ""} {"@id" "ho"})))
(is (= {"@id" ""} (jsonld/assoc-if-some :id "@id" {:... | |
ec77f77502a03a01d0ddf89c758d848398e5e4a79d12dc1b4246db03e29cb690 | gordonpace/contractLarva | Main.hs | Copyright 2017 and
--
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... | null | https://raw.githubusercontent.com/gordonpace/contractLarva/5a2febd1c9ba4763b30def3a96bb07f2fef8a9dc/src/Main.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2017 and
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Main where
import System.Environment
import System.Exit
import Control.Exception.Base
import System.IO
import System.IO.Error
import Data.List... |
669bd7276750bb54682f3f65fe81de85ecc5e9b8457c646642422775da54fa72 | MercuryTechnologies/moat | BasicNewtypeWithEitherFieldSpec.hs | module BasicNewtypeWithEitherFieldSpec where
import Common
import Moat
import Test.Hspec
import Test.Hspec.Golden
newtype Newtype = Newtype {newtypeField :: Either String Int}
mobileGen
''Newtype
spec :: Spec
spec =
describe "stays golden" $ do
let moduleName = "BasicNewtypeWithEitherFieldSpec"
it "swif... | null | https://raw.githubusercontent.com/MercuryTechnologies/moat/0217e7abe6bb045e5ea4c33d5dae9d636d3e6159/test/BasicNewtypeWithEitherFieldSpec.hs | haskell | module BasicNewtypeWithEitherFieldSpec where
import Common
import Moat
import Test.Hspec
import Test.Hspec.Golden
newtype Newtype = Newtype {newtypeField :: Either String Int}
mobileGen
''Newtype
spec :: Spec
spec =
describe "stays golden" $ do
let moduleName = "BasicNewtypeWithEitherFieldSpec"
it "swif... | |
5d1bd65334d5da29469dc9135d5d9eddb9be996009b8679ff653fd79976dd039 | disteph/cdsat | myTheory.mli | open Top.Specs
type sign
module type API = sig
type datatypes
val init: (sign,datatypes) slot_machine
val clear: unit -> unit
end
include Theory.Type
with type ('t,'v,'a,'s) api = (module API with type datatypes = 't*'v*'a*'s)
| null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/theories.mld/arrays.mld/myTheory.mli | ocaml | open Top.Specs
type sign
module type API = sig
type datatypes
val init: (sign,datatypes) slot_machine
val clear: unit -> unit
end
include Theory.Type
with type ('t,'v,'a,'s) api = (module API with type datatypes = 't*'v*'a*'s)
| |
a30a35ac72544a284989960650b9365f6591ea19483a9b31a827ad1ddb102098 | nasa/Common-Metadata-Repository | errors.clj | (ns cmr.ous.results.errors
(:require
[clojure.set :as set]
[cmr.exchange.common.results.errors :as errors]
[cmr.exchange.common.util :as util]
[cmr.metadata.proxy.results.errors :as metadata-errors]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Error Messages ;;;... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/ous-plugin/src/cmr/ous/results/errors.clj | clojure |
Error Messages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Authorization
OUS - Parameters
OUS - Results | (ns cmr.ous.results.errors
(:require
[clojure.set :as set]
[cmr.exchange.common.results.errors :as errors]
[cmr.exchange.common.util :as util]
[cmr.metadata.proxy.results.errors :as metadata-errors]))
(def no-permissions "You do not have permissions to access that resource.")
(def token-required "An EC... |
b1d9197496b0c5898437ca9d2f6e23bae539031236495cdf5b0e240d6a345bd4 | eWert-Online/OSnap | OSnap_Paths.mli | val get_snapshot_root_path : OSnap_Config.Types.global -> string
val get_base_images_dir : OSnap_Config.Types.global -> string
val get_updated_dir : OSnap_Config.Types.global -> string
val get_diff_dir : OSnap_Config.Types.global -> string
type t =
{ base : string
; updated : string
; diff : string
}
val get ... | null | https://raw.githubusercontent.com/eWert-Online/OSnap/9010a45469ef069fffec2c9d992a7bc0808f04d8/lib/OSnap_Paths/OSnap_Paths.mli | ocaml | val get_snapshot_root_path : OSnap_Config.Types.global -> string
val get_base_images_dir : OSnap_Config.Types.global -> string
val get_updated_dir : OSnap_Config.Types.global -> string
val get_diff_dir : OSnap_Config.Types.global -> string
type t =
{ base : string
; updated : string
; diff : string
}
val get ... | |
5cac003585c1e492779e0a640e495c5bf0558d8d3d0fea2ccef6e38e0bbd035e | disco-lang/disco | Error.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
-----------------------------------------------------------------------------
-- |
-- Module : Disco.Error
-- Copyright : disco team and contributors
-- Maintainer :
--
SPDX - License - Identifier : BSD-3 - Clause
--
Type for collectin... | null | https://raw.githubusercontent.com/disco-lang/disco/dbab27896dd3bdc1165b3adb88608da5a3c2f30e/src/Disco/Error.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Disco.Error
Copyright : disco team and contributors
Maintainer :
and a type for runtime errors.
---------------------------------------------------------------------------
| Module... | # LANGUAGE StandaloneDeriving #
SPDX - License - Identifier : BSD-3 - Clause
Type for collecting all potential Disco errors at the top level ,
module Disco.Error (DiscoError(..), EvalError(..), panic, outputDiscoErrors) where
import Prelude hiding ((<>))
import Text.... |
b5d7ec472c098fbe59cd9436c56a1e8b41f7bfc2c8acee6c27da8ff591313c3f | htmfilho/minimily | signin.clj | (ns minimily.auth.web.ui.signin
(:require [hiccup.form :refer :all]))
(defn signin-content [message]
(form-to [:post "/account/login"]
(when message [:div {:class "alert alert-warning" :role "alert"} message])
[:div {:class "row"}
[:div {:class "col-md-5"}
[:div {:class "form-group"}
... | null | https://raw.githubusercontent.com/htmfilho/minimily/b317b6b67bc79773163f1a6f7c3b46db795ef979/src/minimily/auth/web/ui/signin.clj | clojure | (ns minimily.auth.web.ui.signin
(:require [hiccup.form :refer :all]))
(defn signin-content [message]
(form-to [:post "/account/login"]
(when message [:div {:class "alert alert-warning" :role "alert"} message])
[:div {:class "row"}
[:div {:class "col-md-5"}
[:div {:class "form-group"}
... | |
a693b911ad20a7e42dd539e98d40e1c8f72988da4d3d499fb5c1387e8553331d | LPCIC/matita | mlutil.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2011
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_extraction/mlutil.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
s Exceptions.
S Names operation... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2011
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : mlutil.ml 14786 201... |
b9ac85fcf8911db7d284a8385bd7772ba9f2c7ce5a60a2e7e926aeedae16e125 | inaimathi/cl-notebook | base.lisp | (in-package :cl-notebook)
(defparameter *base-js*
(ps
base.js contains general utilities that might be useful in other JS
;;;; applications too. Nothing notebook-specific here.
(defun now! ()
(chain -date (now)))
;; basic functional stuff
(defun identity (thing) thing)
(defun constantly (t... | null | https://raw.githubusercontent.com/inaimathi/cl-notebook/c9879b2d390c02bfe4ccaf245a342dd346040322/src/ui/http-front-end/base.lisp | lisp | applications too. Nothing notebook-specific here.
basic functional stuff
basic timeout/interval stuff
basic hash/array stuff
object comparison here
and
all keys of a are in b
all keys of b are in a
all keys of a and b have the same values
basic regex stuff
basic type stuff
basic encoding/decoding stuf... | (in-package :cl-notebook)
(defparameter *base-js*
(ps
base.js contains general utilities that might be useful in other JS
(defun now! ()
(chain -date (now)))
(defun identity (thing) thing)
(defun constantly (thing) (lambda () thing))
(defun rest (array) (chain array (slice 1)))
(defu... |
af2c6374b904aefa6b25c1248ebc0748f9fd7110dc4a1ff842684db2ff4b0744 | launchdarkly/erlang-server-sdk | ldclient_http.erl | %%-------------------------------------------------------------------
%% @doc HTTP utilities
@private
%% @end
%%-------------------------------------------------------------------
-module(ldclient_http).
%% API
-export([
uri_parse/1,
is_http_error_code_recoverable/1
]).
-spec port_for_scheme(Port :: undefin... | null | https://raw.githubusercontent.com/launchdarkly/erlang-server-sdk/60947283f7b1853cbd5ef25be56536d772320c74/src/ldclient_http.erl | erlang | -------------------------------------------------------------------
@doc HTTP utilities
@end
-------------------------------------------------------------------
API | @private
-module(ldclient_http).
-export([
uri_parse/1,
is_http_error_code_recoverable/1
]).
-spec port_for_scheme(Port :: undefined | inet:port_number(), Scheme :: atom()) -> inet:port_number().
port_for_scheme(undefined, undefined) ->
80;
port_for_scheme(undefined, Scheme) ->
case Scheme of
... |
23aa61bda3b062fffd9f1f725d26486aba52d474325181593640e04ac64a2c6a | UnixJunkie/consent | mol2.ml |
module At = Atom
module IntSet = BatSet.Int
module S = BatString
let molecule_header = "@<TRIPOS>MOLECULE"
let atoms_header = "@<TRIPOS>ATOM"
let bonds_header = "@<TRIPOS>BOND"
(* parse line just after the molecule name line *)
let read_header l =
try Scanf.sscanf l " %d %d %d %d %d "
(fun nb_atoms nb_bond... | null | https://raw.githubusercontent.com/UnixJunkie/consent/f065ee7ba5a1ae014b5c3a28d0985ba5ad1abda5/src/mol2.ml | ocaml | parse line just after the molecule name line
throw End_of_file once there is no more to read
skip lines until we start to read a new molecule
the line just after is the molecule name
the line after tells how many atoms and bonds there are
skip lines until we start to read atoms
read all atoms
read all bo... |
module At = Atom
module IntSet = BatSet.Int
module S = BatString
let molecule_header = "@<TRIPOS>MOLECULE"
let atoms_header = "@<TRIPOS>ATOM"
let bonds_header = "@<TRIPOS>BOND"
let read_header l =
try Scanf.sscanf l " %d %d %d %d %d "
(fun nb_atoms nb_bonds _ _ _ -> (nb_atoms, nb_bonds))
with _ -> failwi... |
69722dc47511d8055d1e52b137a946cab4391419265a9b35ddf2b1bdf9de9b10 | NCrashed/aeson-injector | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE OverloadedLists #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
module Main where
import Control.Lens hiding ((.=))
import Control.Monad
import Data.Aeson as A
import Data.Aeson.Types (parseEither)
import Data.Aeson.Unit
import Data... | null | https://raw.githubusercontent.com/NCrashed/aeson-injector/2ac0d4eba344afac68d412723ac077d1310da6b8/test/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE OverloadedLists #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
module Main where
import Control.Lens hiding ((.=))
import Control.Monad
import Data.Aeson as A
import Data.Aeson.Types (parseEither)
import Data.Aeson.Unit
import Data.Aeson.WithField
import Data.Monoid... |
d57f79c387c0d3406ced261055cdc3c23fac4dc02aafca02e0357f239022b859 | coccinelle/coccinelle | settings.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/bundles/menhirLib/menhir-20181113/src/settings.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
7576aa40590335c383284ec4d3c161a2dc23c1bad8cd234b2c9ee8a73457a842 | ftomassetti/civs | war.clj | (ns
^{:author ftomassetti}
civs.activities.war)
| null | https://raw.githubusercontent.com/ftomassetti/civs/dc76bfff4241f67d4bc1081de3947a725ea75c39/src/civs/activities/war.clj | clojure | (ns
^{:author ftomassetti}
civs.activities.war)
| |
261494c8bff1f9e4f7c7b4a3fd6cc0a4e5d235fb80ad1009beb4c98d5638321e | google/codeworld | Truth.hs | # LANGUAGE CPP #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
# LANGUAGE MagicHash #
{-# LANGUAGE PackageImports #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoImplicitPrelude #
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ... | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-base/src/Internal/Truth.hs | haskell | # LANGUAGE PackageImports #
If you want to do these things you are a bad person and you should feel bad
| Compares values to see if they are equal.
| Compares values to see if they are not equal.
traverse the object and get the thunks out of it | # LANGUAGE CPP #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoImplicitPrelude #
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you ma... |
aed3b24861033367d0353121d8f2d06a2ee6b3cc37fdf6c8315bdfeaef04e8bc | Dexterminator/clj-templates | component.cljs | (ns clj-templates.components.error-boundary.component
(:require [reagent.core :as r]))
(defn error-boundary [component]
(let [error (r/atom nil)]
(r/create-class
{:component-did-catch (fn [this info e]
(reset! error e))
:reagent-render (fn [component]
... | null | https://raw.githubusercontent.com/Dexterminator/clj-templates/705e652fece2455257e5008c12c712bb9f7802d1/src/cljs/clj_templates/components/error_boundary/component.cljs | clojure | (ns clj-templates.components.error-boundary.component
(:require [reagent.core :as r]))
(defn error-boundary [component]
(let [error (r/atom nil)]
(r/create-class
{:component-did-catch (fn [this info e]
(reset! error e))
:reagent-render (fn [component]
... | |
6b22fdc1e4bd3c5cb33b9f36a45287c8bf62d5f173b947d07dd6aa58f298b729 | fukamachi/mito | migration.lisp | (in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(handler-bind (#+sbcl (warning #'muffle-warning))
(defpackage mito.migration
(:use #:cl))))
(in-package :mito.migration)
(cl-reexport:reexport-from :mito.migration.table)
(cl-reexport:reexport-from :mito.migration.versions)
| null | https://raw.githubusercontent.com/fukamachi/mito/2fbfc8aa6f9e3e8029bf09888c74b9af98dad341/src/migration.lisp | lisp | (in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(handler-bind (#+sbcl (warning #'muffle-warning))
(defpackage mito.migration
(:use #:cl))))
(in-package :mito.migration)
(cl-reexport:reexport-from :mito.migration.table)
(cl-reexport:reexport-from :mito.migration.versions)
| |
92a084b94a657a3de2a1b66cd902884c489957503f23e27cc43781e54325e1a6 | patrickt/effects-benchmarks | Stateful.hs | # LANGUAGE DataKinds , TypeApplications #
module Poly.Stateful where
import Polysemy
import Polysemy.State as State
type StateM = Sem '[State Int]
get :: StateM Int
get = State.get @Int
put :: Int -> StateM ()
put = State.put @Int
runStateful :: Int -> StateM a -> (Int, a)
runStateful n x = run $ State.runState n... | null | https://raw.githubusercontent.com/patrickt/effects-benchmarks/3416436ae9a6de9f2fe9e7a3662c8af5a0be615d/instances/Poly/Stateful.hs | haskell | # LANGUAGE DataKinds , TypeApplications #
module Poly.Stateful where
import Polysemy
import Polysemy.State as State
type StateM = Sem '[State Int]
get :: StateM Int
get = State.get @Int
put :: Int -> StateM ()
put = State.put @Int
runStateful :: Int -> StateM a -> (Int, a)
runStateful n x = run $ State.runState n... | |
0439a7d6a47f8595ad41cd92873a8d7ab698f55169a3648ef0a83716ef1cc076 | naproche/naproche | Rewrite.hs | -- |
Authors : ( 2017 - 2018 )
--
-- Term rewriting: extraction of rules and proof of equlities.
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - incomplete - patterns #
module SAD.Core.Rewrite (
equalityReasoning,
lpoGe
) where
import Data.List
import Data.Set qualified as Set
import Control.Monad... | null | https://raw.githubusercontent.com/naproche/naproche/6284a64b4b84eaa53dd0eb7ecb39737fb9135a0d/src/SAD/Core/Rewrite.hs | haskell | |
Term rewriting: extraction of rules and proof of equlities.
simplification
type to record conditions and intermediate steps during simplification
simplified term must be lighter
finds ALL normalforms and their corresponding simplification paths
check for matching normalforms and output the paths to them
lo... | Authors : ( 2017 - 2018 )
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - incomplete - patterns #
module SAD.Core.Rewrite (
equalityReasoning,
lpoGe
) where
import Data.List
import Data.Set qualified as Set
import Control.Monad.State
import Data.Either
import Control.Monad.Reader
import Data.Text.... |
1aad20d7e2a6c7af37d774964187202d7a6872d941c2b812ca3377e3e11cfce9 | kiselgra/c-mera | cxx.templates.02.lisp | (include <iostream>)
(include <string>)
(using-namespace std)
(template ((typename T) (typename T2))
(function foo ((T a) (T2 b)) -> T
(return (+ a((instantiate static_cast (float)) b)))))
(function main () -> int
(<< cout (foo 1.1f 1) endl)
(return 0))
# # 2.1
| null | https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/cxx.templates.02.lisp | lisp | (include <iostream>)
(include <string>)
(using-namespace std)
(template ((typename T) (typename T2))
(function foo ((T a) (T2 b)) -> T
(return (+ a((instantiate static_cast (float)) b)))))
(function main () -> int
(<< cout (foo 1.1f 1) endl)
(return 0))
# # 2.1
| |
cae42cde72a0c425f0992687b28d4d8549af0ca0820582574959ba7b338e466d | openbadgefactory/salava | block.cljs | (ns salava.social.ui.block
(:require [salava.social.ui.badge-message-modal :refer [badge-message-link]]))
(defn ^:export message_link [message-count badge-id]
[badge-message-link message-count badge-id])
| null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/social/ui/block.cljs | clojure | (ns salava.social.ui.block
(:require [salava.social.ui.badge-message-modal :refer [badge-message-link]]))
(defn ^:export message_link [message-count badge-id]
[badge-message-link message-count badge-id])
| |
30a4097089f5453fc5c12f6ee08345e42d73825900d02b8d24cd2d1fdd861899 | goldfirere/cs380 | Class.hs | # LANGUAGE TypeOperators , TypeInType , GADTs , TypeFamilies ,
UndecidableInstances , AllowAmbiguousTypes , ScopedTypeVariables ,
TypeApplications , StandaloneDeriving #
UndecidableInstances, AllowAmbiguousTypes, ScopedTypeVariables,
TypeApplications, StandaloneDe... | null | https://raw.githubusercontent.com/goldfirere/cs380/a9e2d2e610eb4e9e082cef0559b6e29a6d82a253/17_fin/Class.hs | haskell | = case plus_succ @n' sm of Refl -> case plus_comm sn' sm of Refl -> Refl
toFin :: Int -> Fin n
toVec :: [a] -> Vec n a
badfilter :: (a -> Bool) -> Vec n a -> Vec m a
badfilter _ Nil = Nil | # LANGUAGE TypeOperators , TypeInType , GADTs , TypeFamilies ,
UndecidableInstances , AllowAmbiguousTypes , ScopedTypeVariables ,
TypeApplications , StandaloneDeriving #
UndecidableInstances, AllowAmbiguousTypes, ScopedTypeVariables,
TypeApplications, StandaloneDe... |
76fa559f10060f449db73bbf98b82ccc629475474f6890e02107171f04400087 | adamwalker/sdr-apps | am.hs | # LANGUAGE RecordWildCards #
import Control.Monad.Trans.Except
import Data.Word
import Data.Complex
import Data.Maybe
import Data.Monoid
import Control.Error.Util
import Pipes as P
import Pipes.Prelude as P
import Options.Applicative
import Data.Vector.Storable as VS hiding ((++))
import Data.Ve... | null | https://raw.githubusercontent.com/adamwalker/sdr-apps/b44b9cac4f0ab857d5889141d94ae15aa3025896/am/am.hs | haskell | # LANGUAGE RecordWildCards #
import Control.Monad.Trans.Except
import Data.Word
import Data.Complex
import Data.Maybe
import Data.Monoid
import Control.Error.Util
import Pipes as P
import Pipes.Prelude as P
import Options.Applicative
import Data.Vector.Storable as VS hiding ((++))
import Data.Ve... | |
06b0986e19f5f8bc3efdb09a5ab8ca2825eda33185916d780f01aff64f8d5dc7 | esl/MongooseIM | mongoose_iq.erl | %% @doc Functions to work with iq record.
%%
%%==============================================================================
Copyright 2015 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may o... | null | https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/src/mongoose_iq.erl | erlang | @doc Functions to work with iq record.
==============================================================================
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 WARRAN... | Copyright 2015 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mongoose_iq).
-export([iq_to_sub_el/1,
empty_result_iq/1]).
-export([update_acc_info/1]).
-export([info/1, xmlns/1, comma... |
73e59da4a1e01446fc1fa773e6e6a3aa21f3565985e600adc3bf384455929c94 | gilith/hol-light | products.ml | (* ========================================================================= *)
(* Products of natural numbers and real numbers. *)
(* ========================================================================= *)
prioritize_num();;
(* --------------------------------------------------------... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Library/products.ml | ocaml | =========================================================================
Products of natural numbers and real numbers.
=========================================================================
-------------------------------------------------------------------------
Products over n... |
prioritize_num();;
let nproduct = new_definition
`nproduct = iterate(( * ):num->num->num)`;;
let NPRODUCT_CLAUSES = prove
(`(!f. nproduct {} f = 1) /\
(!x f s. FINITE(s)
==> (nproduct (x INSERT s) f =
if x IN s then nproduct s f else f(x) * nproduct s f))`,
REWRITE_TAC[nproduct;... |
3942ffba73c3fd1882eed751f48d71a0eac31bc052356e1684bfe1660ecfeb5b | cyverse-archive/DiscoveryEnvironmentBackend | config.clj | (ns porklock.config
(:use [slingshot.slingshot :only [try+ throw+]])
(:require [clojure-commons.config :as cc]
[clojure-commons.error-codes :as ce]
[clojure-commons.file-utils :as cf]
[clojure.tools.logging :as log]))
(def ^:private props
"A ref for storing the configuration p... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/tools/filetool/src/porklock/config.clj | clojure | (ns porklock.config
(:use [slingshot.slingshot :only [try+ throw+]])
(:require [clojure-commons.config :as cc]
[clojure-commons.error-codes :as ce]
[clojure-commons.file-utils :as cf]
[clojure.tools.logging :as log]))
(def ^:private props
"A ref for storing the configuration p... | |
d0ca234e6a8cc7a1843f8f5d5cd2ec97d92ecda135235d2037fdf11643fc2115 | eguven/erlsna | aggregate_engagement.erl | -module(aggregate_engagement).
-export([aggregate_engagement/1,add_agent_to_total/3]).
-include("records.hrl").
accumulated values at every timestamp separated be the amount of TimeStep
aggregate_engagement(TimeStep) ->
EndTs = erlang:now(),
AllPids = gatekeeper:all_agents(pid),
AgentPid = lists:nth(ran... | null | https://raw.githubusercontent.com/eguven/erlsna/ec82682db69f29cb0eeef65471773519f0176340/src/aggregate_engagement.erl | erlang | aggregate function to fold over all agents' engagement
add agent's engagement to the accumulated value
skipping times before agents lifetime
add values at equal timepoint
agent done
all done | -module(aggregate_engagement).
-export([aggregate_engagement/1,add_agent_to_total/3]).
-include("records.hrl").
accumulated values at every timestamp separated be the amount of TimeStep
aggregate_engagement(TimeStep) ->
EndTs = erlang:now(),
AllPids = gatekeeper:all_agents(pid),
AgentPid = lists:nth(ran... |
de7417f4521c1e2067cc0a9edc2d374de802b3fc802718f47fe8e07ee11df09a | okuoku/nausicaa | test-irregex-utf8.scm | #!/usr/local/bin/csi -script
(use test extras utils irregex)
(test-begin)
(test-assert (irregex-search "(?u:<..>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.*>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.+>)" "<漢字>"))
(test-assert (not (irregex-search "(?u:<.>)" "<漢字>")))
(test-assert (not (irregex-search "(?u... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/foreign/irregex-0.8.1/test-irregex-utf8.scm | scheme | #!/usr/local/bin/csi -script
(use test extras utils irregex)
(test-begin)
(test-assert (irregex-search "(?u:<..>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.*>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.+>)" "<漢字>"))
(test-assert (not (irregex-search "(?u:<.>)" "<漢字>")))
(test-assert (not (irregex-search "(?u... | |
105678caeb773dbf26d2f62cde55b7d51a9031cb577da924125379c86d3b187c | scheme-live/live | output.scm | #("x") | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/n-array-extra-close/output.scm | scheme | #("x") | |
4c149c87e2737a9741175a6f26eea4d7adb6a986b811846eb2961564e2e8a3fd | rootmos/silly-ml | interpret_tests.ml | open Interpret.I
open Eval
open Core_kernel.Std
let%test_unit "eval empty string" =
[%test_result: value]
(eval "")
~expect:V_unit
let%test_unit "eval 11;;" =
[%test_result: value]
(eval "11;;")
~expect:(V_int 11)
let%test_unit "eval let x = 7 in x;;" =
[%test_result: value]
(eval "let x = 7 in x;;")... | null | https://raw.githubusercontent.com/rootmos/silly-ml/716664a0e81fc354d93b645b4bc017e7f6227c25/src/interpret_tests.ml | ocaml | open Interpret.I
open Eval
open Core_kernel.Std
let%test_unit "eval empty string" =
[%test_result: value]
(eval "")
~expect:V_unit
let%test_unit "eval 11;;" =
[%test_result: value]
(eval "11;;")
~expect:(V_int 11)
let%test_unit "eval let x = 7 in x;;" =
[%test_result: value]
(eval "let x = 7 in x;;")... | |
c31371112d6251acd31d86ea3fadb59b46d2105d26b6bc473dafb81ef14a0c37 | ocaml/ocaml-lsp | lsp_gen.ml | module Typescript = Typescript
module Ocaml = Ocaml
module Cinaps = Cinaps
module Metamodel = Metamodel
let print_ml = Cinaps.print_ml
let print_mli = Cinaps.print_mli
| null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/dabb9118253ee518cc755a31e594940b9f970f3d/lsp/bin/lsp_gen.ml | ocaml | module Typescript = Typescript
module Ocaml = Ocaml
module Cinaps = Cinaps
module Metamodel = Metamodel
let print_ml = Cinaps.print_ml
let print_mli = Cinaps.print_mli
| |
ca55e327f7c5796e6113871c7cd9d9dff488081c047bab217654f4d8a83044c1 | szktty/esca | hir.ml | (* high-level intermediate representation *)
open Core.Std
module Id = struct
type t = {
name : string;
ty : Type.t;
}
end
module Binop = struct
type t =
| Eq
| Ne
| Lt
| Le
| Gt
| Ge
| Add
| Sub
| Mul
| Div
end
module Op = struct
type t =
| Nop
|... | null | https://raw.githubusercontent.com/szktty/esca/11be06b4a9810cdae4ccfd4ce7c5d85597bd1999/src/hir.ml | ocaml | high-level intermediate representation
TODO: type
parameters
TODO: namepath
parameters |
open Core.Std
module Id = struct
type t = {
name : string;
ty : Type.t;
}
end
module Binop = struct
type t =
| Eq
| Ne
| Lt
| Le
| Gt
| Ge
| Add
| Sub
| Mul
| Div
end
module Op = struct
type t =
| Nop
| Import of string * string
| Fundef of fu... |
63b7b1916733540e159d4bfdb9f03cf06c1fc22cfe814f2749d18b21ed422c3e | MyDataFlow/ttalk-server | mod_admin_extra_node.erl | %%%-------------------------------------------------------------------
%%% File : mod_admin_extra_node.erl
Author : > , < >
%%% Purpose : Contributed administrative functions and commands
Created : 10 Aug 2008 by >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2008 ProcessOne
%%%
%%% This program is ... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_admin_extra_node.erl | erlang | -------------------------------------------------------------------
File : mod_admin_extra_node.erl
Purpose : Contributed administrative functions and commands
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hop... | Author : > , < >
Created : 10 Aug 2008 by >
ejabberd , Copyright ( C ) 2002 - 2008 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
F... |
4f1b2461edb513813d3b84b653674287d3f9cb50973cf3b3ba6dbc974886a64a | aaronallen8455/inventory | T13.hs | {-# LANGUAGE RankNTypes #-}
module HieSource.T13 where
t13A :: Monad m => (forall b m'. Monad m => a -> (m' (a -> b), m b)) -> m Int
t13A _ = undefined
t13B :: Monad m => (forall b m'. Monad m => a -> (m b, m' (a -> b))) -> m Int
t13B _ = undefined
| null | https://raw.githubusercontent.com/aaronallen8455/inventory/e16244f2c3b920ec0caffc4b81d236219b78bd91/test/HieSource/T13.hs | haskell | # LANGUAGE RankNTypes # | module HieSource.T13 where
t13A :: Monad m => (forall b m'. Monad m => a -> (m' (a -> b), m b)) -> m Int
t13A _ = undefined
t13B :: Monad m => (forall b m'. Monad m => a -> (m b, m' (a -> b))) -> m Int
t13B _ = undefined
|
67c808021b9a4e362040bca234bf9b2ff4deca02da9b6992fd775df6f946fd3b | racket/db | config.rkt | #lang racket/base
(require racket/class
racket/unit
db/base)
(provide database^
test^
config^
config@)
(define-signature database^
(dbtestname
connect
connect-first-time
dbsys
dbflags
kill-safe?))
(define-signature test^ (test))
(define-signature config^
... | null | https://raw.githubusercontent.com/racket/db/0336d2522a613e76ebf60705cea3be4c237c447e/db-test/tests/db/config.rkt | racket | set-equal? : ('a list) ('a list) -> boolean
----------------------------------------
Flags
Standard flags:
connection = 'postgresql | 'mysql | 'sqlite3 | 'odbc
impl type = 'wire | 'ffi
| 'isdb2 | 'isora (oracle) | 'ismss (MS SQL Server)
Other flags (set in data-source extensions under db:test ... | #lang racket/base
(require racket/class
racket/unit
db/base)
(provide database^
test^
config^
config@)
(define-signature database^
(dbtestname
connect
connect-first-time
dbsys
dbflags
kill-safe?))
(define-signature test^ (test))
(define-signature config^
... |
fa64cb089ea4c60e2d3a2d8916dc2b156e3cdcaeb2f0501131aa86eec8182ffc | spechub/Hets | Disambiguate.hs | |
Module : ./CASL / Disambiguate.hs
Description : disambiguate all names
Copyright : ( c ) , DFKI GmbH 2008
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
Disambiguate all names that are not in the overload ... | null | https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/CASL/Disambiguate.hs | haskell | note that op-type keys are always partial! | |
Module : ./CASL / Disambiguate.hs
Description : disambiguate all names
Copyright : ( c ) , DFKI GmbH 2008
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
Disambiguate all names that are not in the overload ... |
5c7101c41fdf238f5e46e10dffef523942800d8e4baf84cbdfef6f664c810fc0 | rbkmoney/fistful-server | ct_sup.erl | -module(ct_sup).
-export([start/0]).
-export([stop/1]).
%%
-behaviour(supervisor).
-export([init/1]).
%%
-spec start() -> pid().
start() ->
{ok, PID} = supervisor:start_link(?MODULE, []),
true = unlink(PID),
PID.
-spec stop(pid()) -> ok.
stop(Pid) ->
ok = proc_lib:stop(Pid).
%%
-spec init([]) -... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_cth/src/ct_sup.erl | erlang | -module(ct_sup).
-export([start/0]).
-export([stop/1]).
-behaviour(supervisor).
-export([init/1]).
-spec start() -> pid().
start() ->
{ok, PID} = supervisor:start_link(?MODULE, []),
true = unlink(PID),
PID.
-spec stop(pid()) -> ok.
stop(Pid) ->
ok = proc_lib:stop(Pid).
-spec init([]) -> {ok, {s... | |
a33d6e97628b9ba534c192b0a15f212e688bfc0a0fc9a7e3f38d78f19f1ae851 | softlab-ntua/bencherl | class_SodaVendingMachine.erl | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca 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 ) a... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/mock-simulators/soda-test/src/class_SodaVendingMachine.erl | erlang | it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
If not, see </>.
Class modeling a soda vending machine.
Determines what are the mother classes of this class (if any):
parame... | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Sim - Diasca is distributed in the hope tha... |
564ace163a76665f898d00d8b60e0b852159f4dd7cad1ddc11e9760cf9166697 | BinaryAnalysisPlatform/bap-plugins | callstrings.ml | open Core_kernel
open Regular.Std
open Graphlib.Std
open Bap.Std
open Poly
include Self()
module Cfg = Graphs.Cfg
module Cmdline = struct
open Cmdliner
let sink : string list Term.t =
let doc = "emit traceback if symbol matches $(docv)" in
Arg.(value & opt_all string [] &
info ["sink"] ~doc ~doc... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/callstrings/callstrings.ml | ocaml | open Core_kernel
open Regular.Std
open Graphlib.Std
open Bap.Std
open Poly
include Self()
module Cfg = Graphs.Cfg
module Cmdline = struct
open Cmdliner
let sink : string list Term.t =
let doc = "emit traceback if symbol matches $(docv)" in
Arg.(value & opt_all string [] &
info ["sink"] ~doc ~doc... | |
72cc01f3588819aa9f6dfeca8c3951be4d39d0cbea857636fe2f6f5dab83832d | PrecursorApp/precursor | stats.cljs | (ns frontend.stats
(:require [goog.labs.dom.PageVisibilityMonitor]
[frontend.models.chat :as chat-model]
[frontend.models.layer :as layer-model]
[frontend.state :as state]
[frontend.utils :as utils]))
(defn run-time-millis []
(- (.getTime (js/Date.))
(.getTime (... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/stats.cljs | clojure | (ns frontend.stats
(:require [goog.labs.dom.PageVisibilityMonitor]
[frontend.models.chat :as chat-model]
[frontend.models.layer :as layer-model]
[frontend.state :as state]
[frontend.utils :as utils]))
(defn run-time-millis []
(- (.getTime (js/Date.))
(.getTime (... | |
beb801ce4246898abd3d5334a42bf247405eaaa44089f32a365d3405df623b0b | BillHallahan/G2 | M14.hs | {-@ LIQUID "--no-termination" @-}
module M14 (main) where
data List a = Cons a (List a) | Nil
@ main : : List Bool - > Int - > { b : | b } @
main :: List Bool -> Int -> Bool
main xs m | m <= 0 = True
| otherwise =
case while xs m (0, 1) of
(a', j') -> a' >= -m ... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M14.hs | haskell | @ LIQUID "--no-termination" @ |
module M14 (main) where
data List a = Cons a (List a) | Nil
@ main : : List Bool - > Int - > { b : | b } @
main :: List Bool -> Int -> Bool
main xs m | m <= 0 = True
| otherwise =
case while xs m (0, 1) of
(a', j') -> a' >= -m && a' <= m
while :: List Bool -> ... |
755b87ac2b954f7e947105df76ec382695ad15dce14bbe69b011758342117744 | forsyde/forsyde-shallow | PolyArith.hs | -----------------------------------------------------------------------------
-- |
Module : ForSyDe . Shallow . Utility . PolyArith
Copyright : ( c ) ForSyDe Group , KTH 2007 - 2008
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : po... | null | https://raw.githubusercontent.com/forsyde/forsyde-shallow/a0ffc85270fb0cf5f169d031a381b414c677ddae/src/ForSyDe/Shallow/Utility/PolyArith.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : portable
This is the polynomial arithematic library. The arithematic operations include
addition, multiplication, division a... | Module : ForSyDe . Shallow . Utility . PolyArith
Copyright : ( c ) ForSyDe Group , KTH 2007 - 2008
not optimized for multiplication and is O(n2 ) , which could be considered to be
optimized by FFT algorithms later on .
module ForSyDe.Shallow.Utility.PolyArith(
Poly(..),
* Addition , DmMultiplic... |
97096b992cfd043e4dc3739b0903f4cab3b905f77b99e7a4f8f1aa89d5f45f35 | kupl/VeriSmart-public | collectQuery2.ml | open Options
open Lang
open Vlang
open Query
let collect ?(extern_ctx=false) : Global.t -> cfg -> vformula -> Path.t -> Node.t -> query list
= fun global g vf path node ->
let stmt = find_stmt node g in
let re = if !check_re then ReEntrancy.collect_queries ~extern_ctx:extern_ctx global vf path g node else [] in
... | null | https://raw.githubusercontent.com/kupl/VeriSmart-public/99be7ba88b61994f1ed4c0d3a8e6a6db0f790431/src/checker/collectQuery2.ml | ocaml | open Options
open Lang
open Vlang
open Query
let collect ?(extern_ctx=false) : Global.t -> cfg -> vformula -> Path.t -> Node.t -> query list
= fun global g vf path node ->
let stmt = find_stmt node g in
let re = if !check_re then ReEntrancy.collect_queries ~extern_ctx:extern_ctx global vf path g node else [] in
... | |
da5afe245023858bca5a23c2b7b9282ac48a34678cf697568038e806d2f148ea | tek/helic | Fixtures.hs | module Helic.Test.Fixtures where
import qualified Chronos
import Chronos (datetimeToTime)
import Polysemy.Chronos ()
import Polysemy.Time (mkDatetime)
testTime :: Chronos.Time
testTime =
datetimeToTime (mkDatetime 2030 1 1 12 0 0)
| null | https://raw.githubusercontent.com/tek/helic/055b2ffa063936ad4ae6249c9e6e0603482baaa9/packages/helic/test/Helic/Test/Fixtures.hs | haskell | module Helic.Test.Fixtures where
import qualified Chronos
import Chronos (datetimeToTime)
import Polysemy.Chronos ()
import Polysemy.Time (mkDatetime)
testTime :: Chronos.Time
testTime =
datetimeToTime (mkDatetime 2030 1 1 12 0 0)
| |
e39f0787b437ab46d0f40a34dc5185d1cadf20c3a55f6f70d6a9e7c24800f592 | esl/ejabberd_tests | vcard_update.erl | -module(vcard_update).
-compile([export_all]).
-include_lib("exml/include/exml.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-type escalus_client() :: #client{}.
-spec discard_vcard_update(User) -> NDiscarded when
User :: escalus_client(),
NDiscard... | null | https://raw.githubusercontent.com/esl/ejabberd_tests/913fb0a5a8c1ab753eb35c1e1b491e8572633b54/tests/vcard_update.erl | erlang | -module(vcard_update).
-compile([export_all]).
-include_lib("exml/include/exml.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-type escalus_client() :: #client{}.
-spec discard_vcard_update(User) -> NDiscarded when
User :: escalus_client(),
NDiscard... | |
b2fdd6fe8388c7436d5259e7142300f84cd70487fbc0113d72e4944bc84c9d28 | rjray/advent-2020-clojure | day20_test.clj | (ns advent-of-code.day20-test
(:require [clojure.test :refer [deftest testing is]]
[advent-of-code.day20 :refer [part-1 part-2]]
[clojure.java.io :refer [resource]]))
(deftest part1
(let [expected 20899048083289]
(is (= expected (part-1 (slurp (resource "day20-example.txt")))))))
(deft... | null | https://raw.githubusercontent.com/rjray/advent-2020-clojure/631b36545ae1efdebd11ca3dd4dca032346e8601/test/advent_of_code/day20_test.clj | clojure | (ns advent-of-code.day20-test
(:require [clojure.test :refer [deftest testing is]]
[advent-of-code.day20 :refer [part-1 part-2]]
[clojure.java.io :refer [resource]]))
(deftest part1
(let [expected 20899048083289]
(is (= expected (part-1 (slurp (resource "day20-example.txt")))))))
(deft... | |
2a31078f71cbdb7999e91e1effab729e07a7cfb4c69e1058d1e4b91ff70a42d9 | termite-analyser/termite | test_multipc.ml | print_endline "-------------------------------------";;
print_endline (" " ^ Sys.argv.(0));;
print_endline "-------------------------------------";;
open Nts_types;;
open Nts_laure;;
open Debug;;
open Automaton;;
let filename = "nts/multipc.nts";;
let name =
try
let _ = Format.printf "Analyzing %s@." filename... | null | https://raw.githubusercontent.com/termite-analyser/termite/285d92215a28fcce55614f6d04b44886f253a894/tests/test_multipc.ml | ocaml | Get the automaton
Compute the invariants | print_endline "-------------------------------------";;
print_endline (" " ^ Sys.argv.(0));;
print_endline "-------------------------------------";;
open Nts_types;;
open Nts_laure;;
open Debug;;
open Automaton;;
let filename = "nts/multipc.nts";;
let name =
try
let _ = Format.printf "Analyzing %s@." filename... |
95b71d0700ad04304f478af26bb435b3fa1e416b50daac14897e7cef1a9b6c57 | cutsea110/Kestrel | Util.hs | module Kestrel.Helpers.Util
( encodeUrl
, decodeUrl
, ToText(..)
) where
import Prelude
import Codec.Binary.UTF8.String (encodeString, decodeString)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time
import GHC.Int (Int64)
import Network.HTTP.Base (urlEncode, urlDecod... | null | https://raw.githubusercontent.com/cutsea110/Kestrel/9af7f7ab17a15854e21cc6cb25ac922379a97df7/Kestrel/Helpers/Util.hs | haskell | module Kestrel.Helpers.Util
( encodeUrl
, decodeUrl
, ToText(..)
) where
import Prelude
import Codec.Binary.UTF8.String (encodeString, decodeString)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time
import GHC.Int (Int64)
import Network.HTTP.Base (urlEncode, urlDecod... | |
9c4b17ebe6893b92f863f265dd429394ab34b013afea861d606aced8c13a150d | sunlightlabs/parmenides | util_test.clj | (ns parmenides.util-test
(:require
[jordanlewis.data.union-find :refer :all]
[datomic.api :as d :refer [db q]]
[parmenides.util :refer :all]
[parmenides.resolution :refer [attributes dbfn]]
[clojure.pprint :refer [pprint]]))
(defn id-attr-and-cupid [id]
(let [id-id (d/tempid :db.part/db)]
[{:db/... | null | https://raw.githubusercontent.com/sunlightlabs/parmenides/345e705bc01ceafd6388c3b642a0fc02bef5369e/test/parmenides/util_test.clj | clojure | (ns parmenides.util-test
(:require
[jordanlewis.data.union-find :refer :all]
[datomic.api :as d :refer [db q]]
[parmenides.util :refer :all]
[parmenides.resolution :refer [attributes dbfn]]
[clojure.pprint :refer [pprint]]))
(defn id-attr-and-cupid [id]
(let [id-id (d/tempid :db.part/db)]
[{:db/... | |
3b5e7409646dfde1bc63bb1a72b6dbcb736b8f4dd9615e27773fb333c463531a | abdulapopoola/SICPBook | Ex2.63.scm | #lang planet neil/sicp
(define (tree->list-1 tree)
(if (null? tree)
'()
(append
(tree->list-1
(left-branch tree))
(cons (entry tree)
(tree->list-1
(right-branch tree))))))
;; Both produce the same results
This will take the lists and pass them straigh... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.3/Ex2.63.scm | scheme | Both produce the same results
so this is O(N**N ) growth .
This is recursive and will walk through each list every time. This is O(N) growth | #lang planet neil/sicp
(define (tree->list-1 tree)
(if (null? tree)
'()
(append
(tree->list-1
(left-branch tree))
(cons (entry tree)
(tree->list-1
(right-branch tree))))))
(define (tree->list-2 tree)
(define (copy-to-list tree result-list)
(if (n... |
4c265036c44b4069f4a7b0529962880786c71484a23b3b9232b063ae8aad1fc7 | ivanperez-keera/haskanoid | Resources.hs | module Resources where
data ResourceSpec = ResourceSpec
{ fonts :: [FontResource]
, images :: [ImageResource]
, music :: [MusicResource]
, audio :: [AudioResource]
}
type FontResource = Resource
type ImageResource = Resource
type MusicResource = Resource
type AudioResource = Resource
newtype Resource = Reso... | null | https://raw.githubusercontent.com/ivanperez-keera/haskanoid/cb50205bd8e1ec92eae3b689c1e4f3f2c260367d/src/Resources.hs | haskell | module Resources where
data ResourceSpec = ResourceSpec
{ fonts :: [FontResource]
, images :: [ImageResource]
, music :: [MusicResource]
, audio :: [AudioResource]
}
type FontResource = Resource
type ImageResource = Resource
type MusicResource = Resource
type AudioResource = Resource
newtype Resource = Reso... | |
a996787f175e0cb4f529ff465f1fe7fab1b2621553274ba2139dfb53b2407e7e | EMSL-NMR-EPR/Haskell-MFAPipe-Executable | Class.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
-----------------------------------------------------------------------------
-- |
-- Module : Science.Chemistry.IsotopicLabeling.DSL.FromDict.Class
Copyright ... | null | https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/MFAPipe/src/Science/Chemistry/IsotopicLabeling/DSL/FromDict/Class.hs | haskell | ---------------------------------------------------------------------------
|
Module : Science.Chemistry.IsotopicLabeling.DSL.FromDict.Class
License : ECL-2.0 (see the LICENSE file in the distribution)
Maintainer :
Stability : experimental
Portability : portable
This module exports types and ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
Copyright : 2016 - 17 Pacific Northwest National Laboratory
module Science.Chemistry.IsotopicLabeling.DSL.FromDict.Class
( FromDict(..)
, fromDict
) where
import... |
6344f8a2a70439a1596bdc42e87bfd66414f5926d8157ad71e42f249a7276852 | fogfish/typhoon | aura_sensor.erl | %%
%% Copyright 2016 Zalando SE
%%
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
... | null | https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/aura/src/aura_sensor.erl | erlang |
Copyright 2016 Zalando SE
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 Licens... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(aura_sensor).
-behaviour(pipe).
-export([
start_link/2,
init/1,
free/2,
handle/3
]).
@todo : tx rate ( scenario per second and latency )
-define(A, ... |
51bb3cdbea6cb8c255c49969b814ccd5f399c293848821e816eccfedd420cb46 | EligiusSantori/L2Apf | refresh_manor_list.scm | (module system racket/base
(provide game-client-packet/refresh-manor-list)
(require "../../packet.scm")
(define (game-client-packet/refresh-manor-list)
(let ((s (open-output-bytes)))
(begin
(write-byte #xd0 s)
(write-int16 #x08 #f s)
(get-output-bytes s)
)
)
)
)
| null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/client/refresh_manor_list.scm | scheme | (module system racket/base
(provide game-client-packet/refresh-manor-list)
(require "../../packet.scm")
(define (game-client-packet/refresh-manor-list)
(let ((s (open-output-bytes)))
(begin
(write-byte #xd0 s)
(write-int16 #x08 #f s)
(get-output-bytes s)
)
)
)
)
| |
d69ce52186616b38030f0d341e5ced7d94a09eed21b97acdc123e714d341b99e | juspay/atlas | RentalRideBooking.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Storage/Tabular/RideBooking/RentalRideBooking.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | |
8a814acbaa9ca823f75500cd477631a25033733b8c3faee788edd55964c6b22b | LennMars/algorithms_in_OCaml | redBlackTree.ml | open Util
module type OrderedType = sig
type t
val compare : t -> t -> int
end
module Make(Ord : OrderedType) : sig
type elt = Ord.t
type t
val empty : t
val find : elt -> t -> elt
val insert : elt -> t -> t
end =
struct
type color = Red | Black
type elt = Ord.t
type t = Nil | Node of color * elt ... | null | https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/tree/redBlackTree.ml | ocaml | open Util
module type OrderedType = sig
type t
val compare : t -> t -> int
end
module Make(Ord : OrderedType) : sig
type elt = Ord.t
type t
val empty : t
val find : elt -> t -> elt
val insert : elt -> t -> t
end =
struct
type color = Red | Black
type elt = Ord.t
type t = Nil | Node of color * elt ... | |
f0d8b5b5833c7ed33d23518ebbb0179453c61a89a6cdf59ddef493b4bfe399da | adobe/Chronikis | RAST.hs |
Copyright 2019 Adobe . 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 License at
-2.0
Unless required by applicable law or agreed to in writing , sof... | null | https://raw.githubusercontent.com/adobe/Chronikis/b83b9e38341cdc1539fc7625c6355c6fd176d8a3/compiler/src/RAST.hs | haskell | Avoid name clash with any R functions we use
prec -2
prec -2
prec -1
prec -1
prec 0
prec 0
left-associative binary operator
right-associative binary operator |
Copyright 2019 Adobe . 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 License at
-2.0
Unless required by applicable law or agreed to in writing , sof... |
522cd63b7a0171799e2d78f06aa3e29c0c0a4e2385bcb9ea0467624889e6ca88 | songyahui/AlgebraicEffect | fixpoint_infinite0.ml | effect Foo : (unit -> int)
effect Goo : (unit -> int)
let f ()
(*@ requires emp @*)
@ ensures . Q(Foo ( ) ) @
= perform Foo ()
let res_f ()
(*@ requires emp @*)
(*@ ensures Foo^w @*)
=
match (f ()) with
| x -> print_string ("Done1\n"); x
| effect Foo k ->
(match perform Goo () with
... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/programs.t/fixpoint_infinite0.ml | ocaml | @ requires emp @
@ requires emp @
@ ensures Foo^w @ | effect Foo : (unit -> int)
effect Goo : (unit -> int)
let f ()
@ ensures . Q(Foo ( ) ) @
= perform Foo ()
let res_f ()
=
match (f ()) with
| x -> print_string ("Done1\n"); x
| effect Foo k ->
(match perform Goo () with
| x -> () );
print_string ("lallalall\n"); 0
let main =
m... |
47e7ca0f49af2992fb5035997e619831ca977c37724e59745ed4865b7eb37366 | ninenines/cowboy | content_types_accepted_h.erl | %% This module returns something different in
%% content_types_accepted depending on the query string.
-module(content_types_accepted_h).
-export([init/2]).
-export([allowed_methods/2]).
-export([content_types_accepted/2]).
-export([put_multipart_mixed/2]).
-export([put_text_plain/2]).
init(Req, Opts) ->
{cowboy_re... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/handlers/content_types_accepted_h.erl | erlang | This module returns something different in
content_types_accepted depending on the query string. |
-module(content_types_accepted_h).
-export([init/2]).
-export([allowed_methods/2]).
-export([content_types_accepted/2]).
-export([put_multipart_mixed/2]).
-export([put_text_plain/2]).
init(Req, Opts) ->
{cowboy_rest, Req, Opts}.
allowed_methods(Req, State) ->
{[<<"PUT">>], Req, State}.
content_types_accepted(Req... |
ea3ef2c40c7e39976ada17af1e1c3a67719328af7d7abb986526c46cf2446e68 | waldheinz/bling | JuliaAnimation.hs |
import Graphics.Bling.Edsl
import Graphics.Bling.Primitive
import Control.Monad
import System.IO
import Text.Printf
frames :: Int
frames = 1000
w = 640
h = 360
whiteM :: Material
whiteM = mkMatte (const $ fromRGB' 0.5 0.5 0.5) (const 0)
red :: Material
red = mkMatte (const $ fromRGB' 0.7 0.2 0.2) (const 0)
juliaJ... | null | https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/examples/dsl/JuliaAnimation.hs | haskell | add $ mkPointLight (fromRGB' 10 10 10) (mkPoint' 0 5 0)
add $ mkInfiniteAreaLight sky identity |
import Graphics.Bling.Edsl
import Graphics.Bling.Primitive
import Control.Monad
import System.IO
import Text.Printf
frames :: Int
frames = 1000
w = 640
h = 360
whiteM :: Material
whiteM = mkMatte (const $ fromRGB' 0.5 0.5 0.5) (const 0)
red :: Material
red = mkMatte (const $ fromRGB' 0.7 0.2 0.2) (const 0)
juliaJ... |
16a299ef195e3c8a7c673b7bba68c17f8ea204931cfc5fe448fc42a030b029a1 | serokell/blockchain-util | Extra.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
module Snowdrop.Block.Exec.Extra
( BlockExtraH
, Block (..)
, BlkHeaderData
) where
import Universum
import qualified Data.Foldable as F
import Formatting (bprint, (%))
import Snowdrop.Block (BlkStructuralDat... | null | https://raw.githubusercontent.com/serokell/blockchain-util/a6428c6841e7002605a115002f58eff78ff9f128/snowdrop-block-exec/src/Snowdrop/Block/Exec/Extra.hs | haskell | # LANGUAGE DataKinds #
| Block extra header data, parametrized by unified parameter of block configuration @blkType@
| Type, representing a block. | # LANGUAGE AllowAmbiguousTypes #
module Snowdrop.Block.Exec.Extra
( BlockExtraH
, Block (..)
, BlkHeaderData
) where
import Universum
import qualified Data.Foldable as F
import Formatting (bprint, (%))
import Snowdrop.Block (BlkStructuralData, BlockBodyProof, BlockRef)
import ... |
5cea4c5c6a6c3b65f1fd59b03e2e98e61fdc6eaca5c575c11eb03a2c948df1cb | sim642/odep | opam_installed_graph.ml | open OpamTypes
open Common
open Std.Common_syntax
module Opkg = OpamPackage
module Ofml = OpamFormula
module GOper = Graph.Oper.P (G)
let g_of_depends ~st ~env depends =
let {u_installed; u_depends; u_depopts; _} =
OpamSwitchState.universe st ~requested:Opkg.Name.Set.empty Query
in
let fold_all_depends f... | null | https://raw.githubusercontent.com/sim642/odep/5f3c65a97946e6e07e9e4144d533aeb6fe165eaf/src/depgraph/opam_installed_graph.ml | ocaml | open OpamTypes
open Common
open Std.Common_syntax
module Opkg = OpamPackage
module Ofml = OpamFormula
module GOper = Graph.Oper.P (G)
let g_of_depends ~st ~env depends =
let {u_installed; u_depends; u_depopts; _} =
OpamSwitchState.universe st ~requested:Opkg.Name.Set.empty Query
in
let fold_all_depends f... | |
bb08c21c998811f139643c76f3d0474627a7ec5cd4c3d192310e507a4eab0974 | hoelzl/Clicc | cgconst.lisp | ;;;-----------------------------------------------------------------------------
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
;;;-----------------------------------------------------------------------------
Projekt : APPLY - A Practicable And Portable Lisp Implementation
;;; ... | null | https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/cgconst.lisp | lisp | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------------------
Funktion : Codegenerierung
- Arrays
- Strukturen
- Listen
... | Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
Projekt : APPLY - A Practicable And Portable Lisp Implementation
$ Revision : 1.59 $
$ Log : cgconst.lisp , v $
Datenrepräsentation . Sie ist auf 1 für die bisherige Datenrepräsenatation
gesetzt . Die die ... |
f35473baf302d7a9cbe99d743e56971837de8b8799e1cdf3760a66ed9e44cf6a | d-cent/mooncake | activity.clj | (ns mooncake.db.activity
(:require [mooncake.domain.activity :as domain]
[mooncake.db.mongo :as mongo]
[clj-time.coerce :as time-coerce]
[mooncake.config :as config])
(:import org.bson.types.ObjectId))
(def activity-collection "activity")
(def activity-metadata-collection "activ... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src/mooncake/db/activity.clj | clojure | (ns mooncake.db.activity
(:require [mooncake.domain.activity :as domain]
[mooncake.db.mongo :as mongo]
[clj-time.coerce :as time-coerce]
[mooncake.config :as config])
(:import org.bson.types.ObjectId))
(def activity-collection "activity")
(def activity-metadata-collection "activ... | |
d7e81f9d9b9a7f297dc690ce1b18c0f6f7d432e25b4291122fe2badfac15b0dc | rtoy/cmucl | comcom.lisp | ;;; -*- Package: CL-USER -*-
;;;
;;; **********************************************************************
;;;
(ext:file-comment
"$Header: src/tools/comcom.lisp $")
;;;
;;; **********************************************************************
;;;
Loading this file causes the CMUCL compiler to be compiled .
;;;
(i... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tools/comcom.lisp | lisp | -*- Package: CL-USER -*-
**********************************************************************
**********************************************************************
Import so that these types which appear in the globaldb are the same...
(when *load-stuff*
For defstruct description structures.
For COOKIE st... | (ext:file-comment
"$Header: src/tools/comcom.lisp $")
Loading this file causes the CMUCL compiler to be compiled .
(in-package "CL-USER")
#+bootstrap
(copy-packages (cons (c::backend-name c::*target-backend*) '("NEW-ASSEM" "C")))
(defvar *load-stuff*
#+bootstrap t
#-bootstrap (eq c:*backend* c:*native-backend... |
a79468ebbb8c7f9eca644cb54895f81e7d719c30f2c3fe271ab77d87a8a60027 | PUGzera/DATX02-DIT561 | Main.hs | module Main (
main
) where
import qualified Frontend.GHCInterface as GHC
import Frontend.Run (run)
import System.Console.Haskeline
import System.Directory
folderName = "Daison-Frontend"
logName = ".daison_history"
main :: IO ()
main = do
dataPath <- getAppUserDataDirectory folderName
createDirectoryIfMiss... | null | https://raw.githubusercontent.com/PUGzera/DATX02-DIT561/2ef49018616b74901f60255b71dfc7918cf0c16d/src/Main.hs | haskell | module Main (
main
) where
import qualified Frontend.GHCInterface as GHC
import Frontend.Run (run)
import System.Console.Haskeline
import System.Directory
folderName = "Daison-Frontend"
logName = ".daison_history"
main :: IO ()
main = do
dataPath <- getAppUserDataDirectory folderName
createDirectoryIfMiss... | |
82900ff178732cea6910fa0663f9421c9b9ac3fa1bf93f52b11469fa2c7b01df | input-output-hk/cardano-ledger | Rules.hs | module Cardano.Ledger.ShelleyMA.Rules
# DEPRECATED " Use ` Cardano . . Allegra . Rules ` from ' cardano - ledger - allegra ' package instead " #
module Cardano.Ledger.Allegra.Rules,
)
where
import Cardano.Ledger.Allegra.Rules
| null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Rules.hs | haskell | module Cardano.Ledger.ShelleyMA.Rules
# DEPRECATED " Use ` Cardano . . Allegra . Rules ` from ' cardano - ledger - allegra ' package instead " #
module Cardano.Ledger.Allegra.Rules,
)
where
import Cardano.Ledger.Allegra.Rules
| |
f16236614198096192e145cea78c3edd12801cdf40242f18498f339194ead08b | paurkedal/ocaml-prime | prime_int64.ml | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* 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 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-prime/5e527c03190474e7fdc87114c6bc9e8e4ddd0759/lib/prime_int64.ml | ocaml | Cf. | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* 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 3 of the License , or ( at your
* option ) any la... |
e5689758dc5393fd0baf280959f4f022ce445e0e9e76c94228fff2bd987437b0 | 40ants/html2text | link-revealer.lisp | (defpackage #:html2text-test/link-revealer
(:use #:cl
#:rove)
(:import-from #:html2text-link-revealer
#:get-final-url)
(:import-from #:cl-mock
#:answer
#:with-mocks))
(in-package html2text-test/link-revealer)
(deftest test-error-processing
(function-cach... | null | https://raw.githubusercontent.com/40ants/html2text/b5620fdd435df5254a713f3c10bd756632df3dce/t/link-revealer.lisp | lisp | (defpackage #:html2text-test/link-revealer
(:use #:cl
#:rove)
(:import-from #:html2text-link-revealer
#:get-final-url)
(:import-from #:cl-mock
#:answer
#:with-mocks))
(in-package html2text-test/link-revealer)
(deftest test-error-processing
(function-cach... | |
9cf3582bf1786d9fbfd35fd2fc11778fae497005b963724d301e05ce21c3e418 | webyrd/probKanren | test-check.scm | (define-syntax test
(syntax-rules ()
((_ title tested-expression expected-result)
(begin
(printf "Testing ~s\n" title)
(let* ((expected expected-result)
(produced tested-expression))
(or (equal? expected produced)
(printf "Failed: ~a~%Expected: ~a~%Computed: ... | null | https://raw.githubusercontent.com/webyrd/probKanren/00cd62c8211a8a210099c36be961b8927b298ce8/test-check.scm | scheme | (define-syntax test
(syntax-rules ()
((_ title tested-expression expected-result)
(begin
(printf "Testing ~s\n" title)
(let* ((expected expected-result)
(produced tested-expression))
(or (equal? expected produced)
(printf "Failed: ~a~%Expected: ~a~%Computed: ... | |
969ba046f95ad70c34d012056723ab94e0e8684ea38d4832e4d38f35e5239294 | auser/beehive | proxy_handler.erl | %%%-------------------------------------------------------------------
%%% File : proxy_handler.erl
Author :
%%% Description :
%%%
Created : Tue Oct 13 20:24:21 PDT 2009
%%%-------------------------------------------------------------------
-module (proxy_handler).
-include ("router.hrl").
-include ("com... | null | https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive_router/src/proxy_handler.erl | erlang | -------------------------------------------------------------------
File : proxy_handler.erl
Description :
-------------------------------------------------------------------
subdomain of the app to look for
host
port
Backend
client request
time proxy started
client socket
server socket
client listening ... | Author :
Created : Tue Oct 13 20:24:21 PDT 2009
-module (proxy_handler).
-include ("router.hrl").
-include ("common.hrl").
-include ("http.hrl").
-include ("beehive.hrl").
-export ([
start_link/1
]).
-export ([terminate1/2]).
-record(state, {
}).
Compatible with the supervisor behaviour
start_link(C... |
ec3649d37e4a614efc4cac9789047af035c611b24f7812434d81a36bb5f79623 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PaymentFlowsAmountDetailsResourceTip.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema PaymentFlowsAmountDetailsResourceTip
module StripeAPI.Types.PaymentFlowsAmo... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentFlowsAmountDetailsResourceTip.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema PaymentFlowsAmountDetailsResourceTip
| Defines the object schema located at @components.schemas.payment_flows_amount_details_resource_tip@ in the specification.
| amount: Portion of the amount that corresponds to a ... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.PaymentFlowsAmountDetailsResourceTip where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Intern... |
171de9e515d6fed02498e3f9049e8b1f757691914e6f35fe41283e677874f956 | danlentz/cl-btree | loader.lisp | (in-package :common-lisp-user)
;;; Load cl-btree
;;;
;;; This is an utility for a cl-btree developer to load project.
;;; Later there should be possibility to use asdf-install to setup
;;; cl-btree and its dependencies properly for use with other
;;; projects.
;;;
;;; Loader assumes you have all dependent projects ch... | null | https://raw.githubusercontent.com/danlentz/cl-btree/ff422472c4d3e8172d6fae85063eb8c40f18404d/loader.lisp | lisp | Load cl-btree
This is an utility for a cl-btree developer to load project.
Later there should be possibility to use asdf-install to setup
cl-btree and its dependencies properly for use with other
projects.
Loader assumes you have all dependent projects checked out at the
same level as cl-btree and that you ha... | (in-package :common-lisp-user)
< lisp source
< lisp source dir>/cl - wal
(eval-when (:load-toplevel :compile-toplevel :execute)
(defun load-time-dir ()
(make-pathname :directory (pathname-directory *load-pathname*)))
(defun parent-dir (dir)
(make-pathname :directory (butlast (pathname-directory di... |
3338efb45fc0bbecfc0993f49b1fb8536a69e4a9a2e640cda252d8ab640de0da | manetu/temporal-clojure-sdk | signals.clj | Copyright © 2022 , Inc. All rights reserved
(ns ^:no-doc temporal.internal.signals
(:require [taoensso.timbre :as log]
[temporal.internal.utils :as u])
(:import [java.util.concurrent ConcurrentLinkedQueue]
[io.temporal.workflow Workflow DynamicSignalHandler]))
(defn get-ch
^Concurren... | null | https://raw.githubusercontent.com/manetu/temporal-clojure-sdk/fd3dc4c66e143d6bf72abffcaed802ea625c7767/src/temporal/internal/signals.clj | clojure | Copyright © 2022 , Inc. All rights reserved
(ns ^:no-doc temporal.internal.signals
(:require [taoensso.timbre :as log]
[temporal.internal.utils :as u])
(:import [java.util.concurrent ConcurrentLinkedQueue]
[io.temporal.workflow Workflow DynamicSignalHandler]))
(defn get-ch
^Concurren... | |
8a41b7dffd6c8a6bf4c6ab2f23be1669d719b34abb5d596fd79b59d401daca32 | eglaysher/rldev | rc8.ml |
vaconv : ( ) image format
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option ) any late... | null | https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/vaconv/rc8.ml | ocaml | Read header
Create source and destination arrays
Decompress the data
Depalettise the data
Return an internal image representation
Return metadata |
vaconv : ( ) image format
Copyright ( C ) 2006 Haeleth
This program is free software ; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option ) any late... |
2e9cd8d7396eab3250e531749844fc64b46b9215c803332bc22781bef2b39742 | hbr/albatross | common.mli | (** Identity function *)
val identity: 'a -> 'a
(** Module to represent types which cannot be inhabited. *)
module Void:
sig
type t
end
(** Module to represent the [unit] type. *)
module Unit:
sig
type t = unit
end
(** Module to represent the [int] type. *)
module Int:
sig
type t = int
val compare: t -> t ... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/fmlib/basic/common.mli | ocaml | * Identity function
* Module to represent types which cannot be inhabited.
* Module to represent the [unit] type.
* Module to represent the [int] type.
* [is_prefix a b] Is [a] a prefix of [b]?
* [is_suffix a b] Is [a] a suffix of [b]?
* Reverse the string.
* [forall p start beyond]
Do all indices [i] w... | val identity: 'a -> 'a
module Void:
sig
type t
end
module Unit:
sig
type t = unit
end
module Int:
sig
type t = int
val compare: t -> t -> int
val iterate: t -> ('a -> 'a) -> 'a -> 'a
end
module Int_set: Set.S with type elt = Int.t
module Int_map: Finite_map.S with type key = Int.t
module Either:
si... |
9066bdb7c0ef48419b0083a8bf19a5152f14190e5b83fd735ace3ffb005af174 | takikawa/racket-ppa | generic.rkt | #lang racket/base
(require (for-syntax racket/base
racket/local
racket/syntax
syntax/stx
syntax/boundmap)
"generic-methods.rkt"
(only-in racket/private/arity arity-includes?))
(provide define-primitive-generics
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/collects/racket/private/generic.rkt | racket | Converts 0-based index to an ordinal string
compute extra error info for default method
(0-based) pos of the "self" argument, for error reporting purposes;
method signature already checked so self-name is in signature
labels for args
drop restargs if none
arg values
drop restargs if none
only the bad arg
othe... | #lang racket/base
(require (for-syntax racket/base
racket/local
racket/syntax
syntax/stx
syntax/boundmap)
"generic-methods.rkt"
(only-in racket/private/arity arity-includes?))
(provide define-primitive-generics
... |
5a667fe929ea364bfd2663249666de36d78170efcb9cc6203b89f94faa7e0865 | ryanpbrewster/haskell | minesweeper.hs | -- minesweeper.hs
- You will be given an M*N matrix . Each item in this matrix is either a ' * ' or
- a ' . ' . A ' * ' indicates a mine whereas a ' . ' does not . The objective of the
- challenge is to output a M*N matrix where each element contains a number
- ( except the positions which actually contain ... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/minesweeper.hs | haskell | minesweeper.hs
> [ [ 0,1],[1,0 ] ] |
- You will be given an M*N matrix . Each item in this matrix is either a ' * ' or
- a ' . ' . A ' * ' indicates a mine whereas a ' . ' does not . The objective of the
- challenge is to output a M*N matrix where each element contains a number
- ( except the positions which actually contain a mine which will ... |
8b779d44c3cfeb56580d995313e20be6e057a9bcc12c682a5a505166b2d78572 | reborg/clojure-essential-reference | 13.clj | (def s "A drink here and a drink home.")
< 1 >
;; "A beer here and a beer home."
< 2 >
;; "A beer here and a drink home." | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/Commonprogrammingtasks/StringsandRegularExpressions/13.clj | clojure | "A beer here and a beer home."
"A beer here and a drink home." | (def s "A drink here and a drink home.")
< 1 >
< 2 > |
af6618f16eed759614426be8f7dbfa58f7a92434990c9b7837da98910614835d | hopv/MoCHi | parser_wrapper_4.09.ml | # 2 "parser_wrapper_4.09.ml"
open Util
open Asttypes
open Typedtree
open Types
open Syntax
open Term_util
open Type
open Parser_wrapper_common
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
let () = Compmisc.init_path ()
let add_load_path = Load_path.add_dir
let report_error e = ... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/parser_wrapper_4.09.ml | ocaml | TODO: fix to return attribute?
for readable variable names
I don't know why, but the type environment of e is not appropriate for this context | # 2 "parser_wrapper_4.09.ml"
open Util
open Asttypes
open Typedtree
open Types
open Syntax
open Term_util
open Type
open Parser_wrapper_common
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
let () = Compmisc.init_path ()
let add_load_path = Load_path.add_dir
let report_error e = ... |
4d7217ff289192fcb2231b913b33e6027bb2888eb37f5eaf1f5d2a0a5c86f958 | metametadata/aide | core.cljs | (ns app.core
(:require [aide.core :as aide]
[aide.lifetime :as aide-lifetime]
[aide-reagent.core :as aide-reagent]
[reagent.core :as r]
[reagent.ratom :refer [reaction]]))
(enable-console-print!)
(aide/defevent on-increment
[app _]
(swap! (:*model app) update :val... | null | https://raw.githubusercontent.com/metametadata/aide/0828b53503e8c7f54f84e1b140a1d02ad80aff36/examples/counter-reagent/src/app/core.cljs | clojure | App
UI
Start the app (in this example it does nothing)
For easier debugging
Stop the app (in this example it does nothing) | (ns app.core
(:require [aide.core :as aide]
[aide.lifetime :as aide-lifetime]
[aide-reagent.core :as aide-reagent]
[reagent.core :as r]
[reagent.ratom :refer [reaction]]))
(enable-console-print!)
(aide/defevent on-increment
[app _]
(swap! (:*model app) update :val... |
e1e1e406210a94c7014f24120f005f7a224020d173e11cd147ff947371532d67 | khibino/haskell-relational-record | SqlValueExtra.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
-- |
-- Module : Database.HDBC.SqlValueExtra
Copyright : 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
module Database.HDBC.SqlValueExtra
# DEPRECATED " import Database . Relational . HD... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query-HDBC/src/Database/HDBC/SqlValueExtra.hs | haskell | |
Module : Database.HDBC.SqlValueExtra
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
Copyright : 2019
module Database.HDBC.SqlValueExtra
# DEPRECATED " import Database . Relational . HDBC.SqlValueExtra instead of this . " #
() where
import Database.Relational.HDBC.SqlValueExtra ()
|
7cbb1ec4d218487d9df36b185a5757f6814ba7238d5e66dadc4416a83f1384d9 | pascal-knodel/haskell-craft | E'7'16.hs | --
--
--
-----------------
Exercise 7.16 .
-----------------
--
--
--
module E'7'16 where
-- Sorting in descending order:
iSort' :: [Integer] -> [Integer]
iSort' [] = []
iSort' ( integer : remainingIntegers )
= ins' integer (iSort' remainingIntegers)
ins' :: Integer -> [Integer] -> [Integer]
ins' integer ... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'7'16.hs | haskell |
---------------
---------------
Sorting in descending order:
Sorting and removing duplicates: | Exercise 7.16 .
module E'7'16 where
iSort' :: [Integer] -> [Integer]
iSort' [] = []
iSort' ( integer : remainingIntegers )
= ins' integer (iSort' remainingIntegers)
ins' :: Integer -> [Integer] -> [Integer]
ins' integer [] = [integer]
ins' integer ( listInteger : remainingListIntegers )
| integer > li... |
c51588aef50810a67385a6fb3ddbb8986f5dd76262cb3dcead9012f3058defec | Helium4Haskell/Top | SimpleSubstitution.hs | # LANGUAGE UndecidableInstances , FlexibleInstances , MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
----------------------... | null | https://raw.githubusercontent.com/Helium4Haskell/Top/5e900184d6b2ab6d7ce69945287d782252e5ea68/src/Top/Implementation/SimpleSubstitution.hs | haskell | ---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
---------------------------------------------------------------------------
--------------------------------------... | # LANGUAGE UndecidableInstances , FlexibleInstances , MultiParamTypeClasses #
module Top.Implementation.SimpleSubstitution where
import Top.Types
import Top.Implementation.General
import Top.Interface.Substitution
import Top.Interface.TypeInference
import Top.Interface.Basic
import Top.Monad.Select
import Top.Util... |
16e555ba54c813a1bc2c9b82754ff54dbb129036cbf75ddd568f9d68793b4c3a | nebogeo/weavingcodes | wwloomsim2weft.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; weavecoding raspberry pi installation
(synth-init 10 22050)
(clear-colour (vector 1 1 1))
;;(scale (vector 0.5 0.5 0.5))
(rotate (vector 0 -45 0))
(define weft (build-jellyfish 4096))
(define weft2 (build-jellyfish 4096))
(define warp (bui... | null | https://raw.githubusercontent.com/nebogeo/weavingcodes/e305a28a38ef745ca31de3074c8aec3953a72aa2/pattern-matrix/wwloomsim2weft.scm | scheme |
weavecoding raspberry pi installation
(scale (vector 0.5 0.5 0.5))
(trace (addr draft-size))
top corner
vertical connection
bottom corner
top corner
vertical connection
bottom corner
selvedge time?
(trace draft-pos)
(with-primitive
weft2
(parent weft)
(hint-unlit)
(hint-wire)
(texture (load-text... |
(synth-init 10 22050)
(clear-colour (vector 1 1 1))
(rotate (vector 0 -45 0))
(define weft (build-jellyfish 4096))
(define weft2 (build-jellyfish 4096))
(define warp (build-jellyfish 4096))
(define weave-scale (vector 0.2 -0.2 0.2))
(define yarn-b (vector 1 1 1))
(define yarn-a (vector 0.8 0.6 0.2))
(define warp-y... |
b5ba8ca4e9ddb4c4ba9fa37837fd46d4d0689114a63f2ed04bb0cf47e0340158 | lambe-lang/nethra | t02_simple_terms.ml | open Common
open Nethra.Syntax.Source
open Nethra.Toy.Parser
let parser_type0 () =
let open Expression.Impl (Parsec) in
let result =
response render @@ term @@ Parsec.source (Utils.chars_of_string "type")
and expected = (Some "type0", true) in
Alcotest.(check (pair (option string) bool)) "type1" expected r... | null | https://raw.githubusercontent.com/lambe-lang/nethra/d803be8005021b3ee12d45768e90bb95645b226c/test/nethra/toy/s01_parser/t02_simple_terms.ml | ocaml | open Common
open Nethra.Syntax.Source
open Nethra.Toy.Parser
let parser_type0 () =
let open Expression.Impl (Parsec) in
let result =
response render @@ term @@ Parsec.source (Utils.chars_of_string "type")
and expected = (Some "type0", true) in
Alcotest.(check (pair (option string) bool)) "type1" expected r... | |
4af6f02f3210e610630d220dbb147fc32bacc6fcbeea5597bf2ef62b4b831407 | Metaxal/quickscript-extra | sort-lines.rkt | #lang racket/base
(require racket/string
quickscript)
(script-help-string "Sorts the selected lines in (anti-)alphabetical order.")
(define ((sort-selection cmp) selection)
(string-join (sort (string-split selection "\n" #:trim? #t)
cmp)
"\n" #:after-last "\n"))
(define... | null | https://raw.githubusercontent.com/Metaxal/quickscript-extra/526b2eccd9f73ea30bbc013741fdd77f4e2724cf/scripts/sort-lines.rkt | racket | #lang racket/base
(require racket/string
quickscript)
(script-help-string "Sorts the selected lines in (anti-)alphabetical order.")
(define ((sort-selection cmp) selection)
(string-join (sort (string-split selection "\n" #:trim? #t)
cmp)
"\n" #:after-last "\n"))
(define... | |
47aee948f8ee942c7a68a66c5d3f9bf8ce88ac93dd079311be9a716f3a32ac11 | databrary/databrary | Kind.hs | module Model.Kind
( Kinded(..)
) where
import Data.String (IsString)
-- | Types with a self-describing short name for their type
class Kinded a where
kindOf :: IsString s => a -> s
| null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Kind.hs | haskell | | Types with a self-describing short name for their type | module Model.Kind
( Kinded(..)
) where
import Data.String (IsString)
class Kinded a where
kindOf :: IsString s => a -> s
|
6a490fc257c9bdd5c89400e38e142faf0badcb5ef2133b59715a6a54432e0503 | Zeta611/L | monads.ml | module type Monad = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module MonadSyntax (M : Monad) = struct
let ( >>= ) = M.bind
let ( let* ) = M.bind
end
module type Applicative = sig
type 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val product : 'a t -> 'b t -> ('a ... | null | https://raw.githubusercontent.com/Zeta611/L/25a5f646cec1c51c662dd2677acc463ede67a8af/lib/monads.ml | ocaml | module type Monad = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module MonadSyntax (M : Monad) = struct
let ( >>= ) = M.bind
let ( let* ) = M.bind
end
module type Applicative = sig
type 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val product : 'a t -> 'b t -> ('a ... | |
7780022dd90fd18973674668fb2ff6221a42c6891abe01329696e575b837e25a | larcenists/larceny | parse.scm | parse.scm - Sassy 's top level parser
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 ve... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/parse.scm | scheme | 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 PARTICULAR PURPOSE. See t... | parse.scm - Sassy 's top level parser
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 1110... |
9562645503b290f1a6b572cf047c49b5bcea135c8e0170043eb79b817f44e664 | janestreet/base_quickcheck | generator.ml | open! Base
module T : sig
type +'a t
val create : (size:int -> random:Splittable_random.State.t -> 'a) -> 'a t
val generate : 'a t -> size:int -> random:Splittable_random.State.t -> 'a
end = struct
type 'a t = (size:int -> random:Splittable_random.State.t -> 'a) Staged.t
let create f : _ t = Staged.stage f... | null | https://raw.githubusercontent.com/janestreet/base_quickcheck/233d52742aa54eec84b8617f3f2698148116dc34/src/generator.ml | ocaml | guard against overflow
pick a length, weighted low so that most of the size is spent on elements
if there are no elements return an empty array, otherwise return a non-empty array
with the size distributed among the elements
pick an index, weighted low so that we see unbalanced distributions often
permu... | open! Base
module T : sig
type +'a t
val create : (size:int -> random:Splittable_random.State.t -> 'a) -> 'a t
val generate : 'a t -> size:int -> random:Splittable_random.State.t -> 'a
end = struct
type 'a t = (size:int -> random:Splittable_random.State.t -> 'a) Staged.t
let create f : _ t = Staged.stage f... |
079c362759a6272e9f78568a652cbe80901b58d6d2bfd017826cb7d2e61704bb | softek/dynamic-reverse-proxy | dynamic_reverse_proxy_test.cljs | (ns com.softekinc.dynamic-reverse-proxy-test
(:require [cljs.nodejs :as nodejs]
[cljs.test :as t :refer-macros [deftest testing is]]
[com.softekinc.dynamic-reverse-proxy
:refer [url-matches-route? normalize-prefix normalize-path
route-for-url expand-route lo... | null | https://raw.githubusercontent.com/softek/dynamic-reverse-proxy/b6b9b7c52142ac41065c291728f34fa2874faa31/test/com/softekinc/dynamic_reverse_proxy_test.cljs | clojure | same-length strings are compared alphabetically
put it all together
normalization trims the trailing / from route, making the / optional | (ns com.softekinc.dynamic-reverse-proxy-test
(:require [cljs.nodejs :as nodejs]
[cljs.test :as t :refer-macros [deftest testing is]]
[com.softekinc.dynamic-reverse-proxy
:refer [url-matches-route? normalize-prefix normalize-path
route-for-url expand-route lo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.