_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 |
|---|---|---|---|---|---|---|---|---|
7e17d33006531166cacc8054d87fb412a9d8d823befc69526c7bb5f83815dd51 | macourtney/Conjure | test_model_test_generator.clj | (ns conjure.script.generators.test-model-test-generator
(:use clojure.test
conjure.script.generators.model-test-generator))
(deftest test-usage
(usage)) | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_model/test/conjure/script/generators/test_model_test_generator.clj | clojure | (ns conjure.script.generators.test-model-test-generator
(:use clojure.test
conjure.script.generators.model-test-generator))
(deftest test-usage
(usage)) | |
97da7c1206be83b088aebd2de8583a125f093ab7c042120677c463c2ba7ae836 | clojure/core.typed | csgen_intersection.clj | (ns clojure.core.typed.test.csgen-intersection
(:require [clojure.core.typed.test.test-utils :refer :all]
[clojure.test :refer :all]
[clojure.core.typed.checker.cs-gen :as cgen]
))
(deftest csgen-intersect
(is-tc-e (do
(defprotocol
[[x :variance :co... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/csgen_intersection.clj | clojure | (ns clojure.core.typed.test.csgen-intersection
(:require [clojure.core.typed.test.test-utils :refer :all]
[clojure.test :refer :all]
[clojure.core.typed.checker.cs-gen :as cgen]
))
(deftest csgen-intersect
(is-tc-e (do
(defprotocol
[[x :variance :co... | |
eacbe48d8e2a606ef18a36aa59e919d7c788e578c9361b6ee4f8cf5fe3ac4352 | stephenpascoe/hs-arrow | FloatDataType.hs |
|
Copyright : , and
License : LGPL-2.1
Maintainer : ( )
/No description available in the introspection data./
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria ()
/No description available in the introspection... | null | https://raw.githubusercontent.com/stephenpascoe/hs-arrow/86c7c452a8626b1d69a3cffd277078d455823271/gi-arrow/GI/Arrow/Objects/FloatDataType.hs | haskell | * Exported types
* Methods
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
| Memory-managed wrapper type.
| Type class for types which can be safely cast to `FloatDataType`, for instance with `toFloatDataType`.
# OVERLAPPABLE #
| A convenience alias for `Nothing` :: `Maybe` `FloatDataType`.
method FloatDataType::new
... |
|
Copyright : , and
License : LGPL-2.1
Maintainer : ( )
/No description available in the introspection data./
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria ()
/No description available in the introspection... |
65ad1df0c9c472984aebc438adf8874e6f5ef9f0d825ceaccc5ce0747b1cc56c | ocaml/odoc | find.ml | open Odoc_model.Names
open Component
type module_ = [ `FModule of ModuleName.t * Module.t ]
type module_type = [ `FModuleType of ModuleTypeName.t * ModuleType.t ]
type datatype = [ `FType of TypeName.t * TypeDecl.t ]
type class_ =
[ `FClass of ClassName.t * Class.t
| `FClassType of ClassTypeName.t * ClassType.t... | null | https://raw.githubusercontent.com/ocaml/odoc/d4a8c503da2a1bf87e9b8456b2442443784484ef/src/xref2/find.ml | ocaml | open Odoc_model.Names
open Component
type module_ = [ `FModule of ModuleName.t * Module.t ]
type module_type = [ `FModuleType of ModuleTypeName.t * ModuleType.t ]
type datatype = [ `FType of TypeName.t * TypeDecl.t ]
type class_ =
[ `FClass of ClassName.t * Class.t
| `FClassType of ClassTypeName.t * ClassType.t... | |
c5818d86c002f4c731e9c7954903ea11a32e2e1248bf451be19acb88cf705939 | databrary/databrary | Types.hs | module Model.VolumeState.Types
( VolumeStateKey
, VolumeState(..)
) where
import qualified Data.Aeson as JSON
import qualified Data.Text as T
import Model.Volume.Types
import Model.Id.Types
type VolumeStateKey = T.Text
data VolumeState = VolumeState
{ volumeStateKey :: !VolumeStateKey
, volumeStateValue :... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/VolumeState/Types.hs | haskell | module Model.VolumeState.Types
( VolumeStateKey
, VolumeState(..)
) where
import qualified Data.Aeson as JSON
import qualified Data.Text as T
import Model.Volume.Types
import Model.Id.Types
type VolumeStateKey = T.Text
data VolumeState = VolumeState
{ volumeStateKey :: !VolumeStateKey
, volumeStateValue :... | |
6731afff0f91b9907b74895c82fee1b5df5112d5d79a4439ffe844fa5b420394 | lspitzner/brittany | Test159.hs | import TestJustAbitToLongModuleNameLikeThisOneI
as T
import TestJustShortEnoughModuleNameLikeThisOn as T
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test159.hs | haskell | import TestJustAbitToLongModuleNameLikeThisOneI
as T
import TestJustShortEnoughModuleNameLikeThisOn as T
| |
8432f79cecfdf63f1a7e25b1b952e8bb026b46b0ae39dafefaa591b50bbbb980 | dahlia/seonbi | TextNormalizerSpec.hs | # LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
module Text.Seonbi.Html.TextNormalizerSpec (spec) where
import Control.Monad
import Test.Hspec
import Text.Seonbi.Html.Entity
import Text.Seonbi.Html.Tag
import Text.Seonbi.Html.TagStack
import Text.Seonbi.Html.TextNormalizer
spec :: Spec
spec = do
... | null | https://raw.githubusercontent.com/dahlia/seonbi/08932e53ef8fb4ab1d96406d25ae86aa88942a3d/test/Text/Seonbi/Html/TextNormalizerSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE OverloadedLists #
module Text.Seonbi.Html.TextNormalizerSpec (spec) where
import Control.Monad
import Test.Hspec
import Text.Seonbi.Html.Entity
import Text.Seonbi.Html.Tag
import Text.Seonbi.Html.TagStack
import Text.Seonbi.Html.TextNormalizer
spec :: Spec
spec = do
specify "normalizeText" $
... |
546cf2c74631c2d56c4ab5548deecc5cd91f57d4e173c54b6e31c92cb725e5d3 | tfausak/advent-of-code | 2.hs | -- stack --resolver lts-12.0 script
import qualified Data.IntSet as Set
import qualified Data.IORef as IORef
import qualified System.Exit as Exit
import qualified System.IO as IO
-- This program just keeps track of numbers that it's seen and watches for
-- repeats. As soon as it sees a repeat, it returns the previous ... | null | https://raw.githubusercontent.com/tfausak/advent-of-code/26f0d9726b019ff7b97fa7e0f2f995269b399578/2018/21/2.hs | haskell | stack --resolver lts-12.0 script
This program just keeps track of numbers that it's seen and watches for
repeats. As soon as it sees a repeat, it returns the previous number it saw.
It takes as input the output of the C program embedded below. It's
definitely not a nice solution, but it is *a* solution! | import qualified Data.IntSet as Set
import qualified Data.IORef as IORef
import qualified System.Exit as Exit
import qualified System.IO as IO
main = do
seenRef <- IORef.newIORef Set.empty
lastRef <- IORef.newIORef Nothing
contents <- getContents
flip mapM_ (map read $ lines contents) $ \ number -> do
see... |
6d42bc82be5da3861d9351ffbd905b3ac564210d3c15f225758ef50793b40a0f | dahlia/seonbi | Hanja.hs | # LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NamedFieldPuns #
| This module deals with Chinese characters and Sino - Korean words written in
-- hanja.
module Text.Seonbi.Hanja
* Korean mixed - script ( 國漢文混用 ) transformation
HanjaPhoneticization (..)
,... | null | https://raw.githubusercontent.com/dahlia/seonbi/f9f8e2f216a17d4898f4b90c90a86c39bbc4c632/src/Text/Seonbi/Hanja.hs | haskell | # LANGUAGE OverloadedStrings #
hanja.
* Single character phoneticization
* Word phoneticization
* Word rendering
$setup
>>> import qualified Text.Show.Unicode
>>> :set -interactive-print=Text.Show.Unicode.uprint
letters.
| A function to phoneticize a hanja word.
| A function to render a hanja word. See also ... | # LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
# LANGUAGE NamedFieldPuns #
| This module deals with Chinese characters and Sino - Korean words written in
module Text.Seonbi.Hanja
* Korean mixed - script ( 國漢文混用 ) transformation
HanjaPhoneticization (..)
, def
, phoneticizeHanja
, phoneticize... |
fd0fffaa7977b7f20d77188f28bd6fe704ecebe6a588e12bb4ae530e633651fa | erlyaws/yaws | intercept3.erl | -module(intercept3).
-export([rewrite_request/2, rewrite_response/2]).
-include("../../include/yaws_api.hrl").
rewrite_request(Req, Hdrs) ->
{ok, Req, yaws_api:set_header(Hdrs, accept, "text/plain")}.
rewrite_response(Resp, Hdrs) ->
{ok, Resp, yaws_api:set_header(Hdrs, "X-Test-Interception", "true")}.
| null | https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/testsuite/revproxy_SUITE_data/intercept3.erl | erlang | -module(intercept3).
-export([rewrite_request/2, rewrite_response/2]).
-include("../../include/yaws_api.hrl").
rewrite_request(Req, Hdrs) ->
{ok, Req, yaws_api:set_header(Hdrs, accept, "text/plain")}.
rewrite_response(Resp, Hdrs) ->
{ok, Resp, yaws_api:set_header(Hdrs, "X-Test-Interception", "true")}.
| |
db885eb192070b8b24c42d3bf51d54ad481a805dd8d356eaeeb216777cba5d94 | commercialhaskell/stack | Execute.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE DataKinds #-}
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
-- | Perform a build
module Stack.Build.Execute
( printPlan
, preFetch
, executePlan
-- * Running Setup.hs
, ExecuteEnv
, wi... | null | https://raw.githubusercontent.com/commercialhaskell/stack/7e35041ed27ebc9f3076d201a1c3f42dd04111db/src/Stack/Build/Execute.hs | haskell | # LANGUAGE DataKinds #
| Perform a build
* Running Setup.hs
| Has an executable been built or not?
| Fetch the packages necessary for a build, for example in combination with
a dry run.
| Print a description of build plan for human consumption.
| For a dry run
^ Temporary Setup.hs for simple builds
... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
module Stack.Build.Execute
( printPlan
, preFetch
, executePlan
, ExecuteEnv
, withExecuteEnv
, withSingleContext
, ExcludeTHLoading (..)
, KeepOutputOpen (..)... |
56d3e4e86b01bee64daed7c8493580f2ecaed6d0991b98b74934d182189ebe2c | TyOverby/mono | map_list.ml | open Core
type 'a t = 'a Int63.Map.t [@@deriving sexp, equal, compare, bin_io]
let with_old i ~f =
let old = ref None in
let%map.Incremental a = i in
let b = f ~old:!old a in
old := Some (a, b);
b
;;
exception Needs_rebalance
exception Needs_rebalance_overflow
let of_map
(type res)
?(data_equa... | null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/vendor/janestreet-incr_map/collate/src/map_list.ml | ocaml | Note: this code needs to take integer overflows into account
we found values both above and below the location that we would be inserting into
we found an entry below our value, so add this one on top of it
an overflow occurred
an underflow occurred
I believe this case would represent a bug, since [new_pos] ... | open Core
type 'a t = 'a Int63.Map.t [@@deriving sexp, equal, compare, bin_io]
let with_old i ~f =
let old = ref None in
let%map.Incremental a = i in
let b = f ~old:!old a in
old := Some (a, b);
b
;;
exception Needs_rebalance
exception Needs_rebalance_overflow
let of_map
(type res)
?(data_equa... |
3b6ac83374fffbfcd182a75fdd18df3c018e25ef30e8f75eb815b45ccff96cc2 | ucsd-progsys/nate | datarepr.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/typing/datarepr.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : datarepr.ml , v 1.13 2003/07/... |
83545e4853a91c7784157d527822905e6bc21ada355a2c2054b7bd997068db18 | fakedata-haskell/fakedata | Beer.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.Beer where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Beer.hs | haskell | # LANGUAGE OverloadedStrings #
parseBeerName :: (FromJSON a, Monoid a) => FakerSettings -> Value -> Parser a
beerNameProvider ::
beerNameProvider settings = fetchData settings Beer parseBeerName | # LANGUAGE TemplateHaskell #
module Faker.Provider.Beer where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Provider.TH
... |
54a123afd7b5462cf4228da061466b6de467c5d16879abf6cabf6a09c04ca9a1 | stuartsierra/lazytest | main.clj | (ns lazytest.main
"Command-line test launcher."
(:gen-class)
(:use lazytest.results
lazytest.tracker
lazytest.runner.console
lazytest.report.nested
[clojure.java.io :only (file)]))
(defn -main
"Run with directories as arguments. Runs all tests in those
directories; returns 0 if all tests pass."
[& di... | null | https://raw.githubusercontent.com/stuartsierra/lazytest/3b0f419ce3d6f259d2ab3cfde475fa491a4db23e/modules/lazytest/src/main/clojure/lazytest/main.clj | clojure | returns 0 if all tests pass." | (ns lazytest.main
"Command-line test launcher."
(:gen-class)
(:use lazytest.results
lazytest.tracker
lazytest.runner.console
lazytest.report.nested
[clojure.java.io :only (file)]))
(defn -main
"Run with directories as arguments. Runs all tests in those
[& dirnames]
(let [namespaces ((tracker (map fil... |
ff13c24eab6470f257c5fb6d9ac9588091224b73dbac3f1d9f1e954e9f1f661a | bobzhang/ocaml-book | my_own_syntax.ml |
(** The problem for the toplevel is that you can not find the library
of the parser? Even if you succeed, it may change the hook of toplevel,
not encouraged yet.
*)
open Camlp4.PreCast;
(** Set to Original Parser *)
module MSyntax=
(Camlp4OCamlParser.Make
(Camlp4OCamlRevisedParser.Make
(Camlp4... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/code/my_own_syntax.ml | ocaml | * The problem for the toplevel is that you can not find the library
of the parser? Even if you succeed, it may change the hook of toplevel,
not encouraged yet.
* Set to Original Parser
* Object-oriented paradigm |
open Camlp4.PreCast;
module MSyntax=
(Camlp4OCamlParser.Make
(Camlp4OCamlRevisedParser.Make
(Camlp4.OCamlInitSyntax.Make Ast Gram Quotation)));
* Two styles of printers
module OPrinters = Camlp4.Printers.OCaml.Make(MSyntax);
module RPrinters = Camlp4.Printers.OCamlr.Make(MSyntax);
value parse_exp = M... |
5208d508ed7c72546bbace73610a2cd89aeabc112e5ea1a1d936149b6bc094d8 | nathell/solitaire | core.cljs | (ns solitaire.core
(:require [reagent.dom :as rdom]
[re-frame.core :as rf]
[solitaire.events :as events]
[solitaire.views :as views]
[solitaire.config :as config]
[solitaire.fx :as fx]))
(defn dev-setup []
(when config/debug?
(println "dev mode")))
(... | null | https://raw.githubusercontent.com/nathell/solitaire/02c951d7886aa391b2cea6b49fc6d892dd9c0fa4/src/cljs/solitaire/core.cljs | clojure | (ns solitaire.core
(:require [reagent.dom :as rdom]
[re-frame.core :as rf]
[solitaire.events :as events]
[solitaire.views :as views]
[solitaire.config :as config]
[solitaire.fx :as fx]))
(defn dev-setup []
(when config/debug?
(println "dev mode")))
(... | |
5b77f17c5c991431e3ebf1c1373f283a3c3327db889917495881bfd0b2b9fcea | astrada/ocaml-extjs | ext_container_AbstractContainer.ml | class type t =
object('self)
inherit Ext_Component.t
inherit Ext_Queryable.t
method items : #Ext_util_AbstractMixedCollection.t Js.t Js.prop
method add : _ Js.t -> _ Js.t Js.meth
method afterComponentLayout : Js.number Js.t -> Js.number Js.t -> _ Js.t ->
_ Js.t -> unit Js.meth
method afterLayout : #E... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_container_AbstractContainer.ml | ocaml | class type t =
object('self)
inherit Ext_Component.t
inherit Ext_Queryable.t
method items : #Ext_util_AbstractMixedCollection.t Js.t Js.prop
method add : _ Js.t -> _ Js.t Js.meth
method afterComponentLayout : Js.number Js.t -> Js.number Js.t -> _ Js.t ->
_ Js.t -> unit Js.meth
method afterLayout : #E... | |
f01451e7c9a2bc7728249665bf7dac8169823ee9ebefaf4e18e9902c8f73a9ae | open-company/open-company-storage | import.clj | (ns oc.storage.util.import
"
Commandline client to import data into OpenCompany.
Usage:
lein run -m oc.storage.util.import -- -d ./opt/samples/buff.edn
lein run -m oc.storage.util.import -- -d ./opt/samples/
"
(:require [clojure.string :as s]
[clojure.tools.cli :refer (parse-opts)]
... | null | https://raw.githubusercontent.com/open-company/open-company-storage/ae4bbe6245f8736f3c1813c3048448035aff5815/src/oc/storage/util/import.clj | clojure | ----- Resource import -----
Create the entries
Delete the org if needed
Conflicting org?
Create the org
Create the boards
----- CLI -----
Handle help and error conditions
Get the list of files to import
a dir
Import each file | (ns oc.storage.util.import
"
Commandline client to import data into OpenCompany.
Usage:
lein run -m oc.storage.util.import -- -d ./opt/samples/buff.edn
lein run -m oc.storage.util.import -- -d ./opt/samples/
"
(:require [clojure.string :as s]
[clojure.tools.cli :refer (parse-opts)]
... |
5967ae726c805783e2f9168e70db279586d5c946d4bc0593ad2f53ea8e37c806 | dyzsr/ocaml-selectml | intext.ml | (* TEST
modules = "intextaux.c"
*)
(* Test for output_value / input_value *)
let max_data_depth = 500000
type t = A | B of int | C of float | D of string | E of char
| F of t | G of t * t | H of int * t | I of t * float | J
let longstring =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/lib-marshal/intext.ml | ocaml | TEST
modules = "intextaux.c"
Test for output_value / input_value
Test for really big objects
Test for really deep data structures
Right-leaning
Left-leaning
Test for objects
Test for objects
Test for infix pointers |
let max_data_depth = 500000
type t = A | B of int | C of float | D of string | E of char
| F of t | G of t * t | H of int * t | I of t * float | J
let longstring =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
let verylongstring =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv... |
917219bf15df6b79be9913ef2045d7988152961e0c0c8c3df5ae898d02b34a49 | SimulaVR/godot-haskell | StaticBody.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.StaticBody
(Godot.Core.StaticBody._reload_physics_ch... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/StaticBody.hs | haskell | # NOINLINE bindStaticBody_get_constant_angular_velocity #
| The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
| The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, a... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.StaticBody
(Godot.Core.StaticBody._reload_physics_ch... |
a10edda0c792c6dce85c4eac374c3f716f84b47beff0ec6abad57c08c9903982 | webyrd/probKanren | helpers.scm | (define printg
(lambda (format-str . args)
(lambda (sk fk c)
(let ((args (walk* args (get-s c))))
(apply printf format-str args))
(newline)
(sk fk c))))
(define repeato
(lambda (n f q)
(cond
[(= n 0) (== q '())]
[else
(fresh (x res)
(f x)
(repe... | null | https://raw.githubusercontent.com/webyrd/probKanren/00cd62c8211a8a210099c36be961b8927b298ce8/oldsrc/helpers.scm | scheme | old and busted
(define seq-goalo
(lambda (f ls)
(conj*-aux (map f ls))))
(define map-goalo
(lambda (f ls g)
(conj*-aux (map (lambda (x)
(f x q)) ls))))
(define zipwitho
(lambda (f a b g)
(cond
[(null? a) (== '() g)]
[else
(fresh (x xs)
(f (car a) (car b) res)
... | (define printg
(lambda (format-str . args)
(lambda (sk fk c)
(let ((args (walk* args (get-s c))))
(apply printf format-str args))
(newline)
(sk fk c))))
(define repeato
(lambda (n f q)
(cond
[(= n 0) (== q '())]
[else
(fresh (x res)
(f x)
(repe... |
10915aeddbcfcca746b78e76d76871826e9aba678e80de08dcfbf9229260daa1 | janestreet/redis-async | resp3.mli | * The RESP3 protocol as specified here :
*)
open Core
exception Protocol_error of string
type t =
| String of string
| Error of string
| Int of int
| Null
| Double of float
| Boolean of bool
| Bignum of Bignum.t
| Array of t array
| Map of (t * t) array
| Set of t a... | null | https://raw.githubusercontent.com/janestreet/redis-async/d83ae757362264075be0a12e6eeaa723b012f2a9/src/resp3.mli | ocaml | * The RESP3 protocol as specified here :
*)
open Core
exception Protocol_error of string
type t =
| String of string
| Error of string
| Int of int
| Null
| Double of float
| Boolean of bool
| Bignum of Bignum.t
| Array of t array
| Map of (t * t) array
| Set of t a... | |
6d1f5af9a3ce14a32e1c89023c8d5dfa05b633728445ae4b51394ee205834260 | kelamg/HtDP2e-workthrough | ex364.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex364) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex364.rkt | racket | about the language level of this file in a form that our tools can easily process.
An Xexpr.v2 is (cons Symbol Xe-Body)
An Xe-Body is one of:
- Body
where Body is short for [List-of Xexpr.v2]
(cons Symbol (cons String '()))
A - None of the examples can be represented in Xexpr.v0 as both
have sub-elements ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex364) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
- ( cons [ List - of Atrribute ] Body )
An Attri... |
9bebc21f472e1180e741ab34657b7992c4decaedaa6893f1d73906e1ed272a01 | brianium/clean-todos | action.clj | (ns todos.core.action)
(defn make-action
"Creates a new action"
([type payload]
{::type type
::error? false
::payload payload})
([type]
{::type type
::error? false}))
(defn make-error
"Creates a new error action"
([type payload]
{::type type
::error? true
::payload p... | null | https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/src/todos/core/action.clj | clojure | (ns todos.core.action)
(defn make-action
"Creates a new action"
([type payload]
{::type type
::error? false
::payload payload})
([type]
{::type type
::error? false}))
(defn make-error
"Creates a new error action"
([type payload]
{::type type
::error? true
::payload p... | |
cb73a19972f7a8d3c43ac3371447fa9d7e7cdc030c625e0f195e1f8ebbe38c78 | abyala/advent-2021-clojure | day17.clj | (ns advent-2021-clojure.day17
(:require [advent-2021-clojure.utils :refer [parse-int]]))
(defn parse-input [input]
(->> input
(re-seq #"target area: x=(.*)\.\.(.*), y=(.*)\.\.(.*)")
first rest (map parse-int) vec))
(defn progress [target point]
{:pre [(every? neg-int? (drop 2 target))
(< ... | null | https://raw.githubusercontent.com/abyala/advent-2021-clojure/d7fec45275bcdd41861488535eac523f4a225da7/src/advent_2021_clojure/day17.clj | clojure | (ns advent-2021-clojure.day17
(:require [advent-2021-clojure.utils :refer [parse-int]]))
(defn parse-input [input]
(->> input
(re-seq #"target area: x=(.*)\.\.(.*), y=(.*)\.\.(.*)")
first rest (map parse-int) vec))
(defn progress [target point]
{:pre [(every? neg-int? (drop 2 target))
(< ... | |
ed90b565d6c014e93f7b29aa6b41ed70a4311d16a0f444004b702c0eeba489e7 | gfngfn/otfed | testCaseCmap2.ml |
open! Otfed__Basic
module Intermediate = Otfed__Intermediate
module DecodeCmap = Otfed__DecodeCmap
let marshaled =
TestUtil.make_string_even [
` ipaexm.ttf ` ( offset : 139315 , offset : 136 ) with ` length ` and ` nGroups ` changed to
` 0x0000_0088 = 136 ` and ` 0x0000_000a = 10 ` respectively
`... | null | https://raw.githubusercontent.com/gfngfn/otfed/3c6d8ea0b05fc18a48cb423451da7858bf73d1d0/test/testCaseCmap2.ml | ocaml |
open! Otfed__Basic
module Intermediate = Otfed__Intermediate
module DecodeCmap = Otfed__DecodeCmap
let marshaled =
TestUtil.make_string_even [
` ipaexm.ttf ` ( offset : 139315 , offset : 136 ) with ` length ` and ` nGroups ` changed to
` 0x0000_0088 = 136 ` and ` 0x0000_000a = 10 ` respectively
`... | |
898751ed08e385e35d8c08672cfe406b222007dc648a032b85cfabd3b00df1e6 | viercc/matchable | Unification.hs | |
This module shows how to implement an unification algorithm
generically , using @Matchable@ type class .
This module assumes terms to be unified are represented by
@Free f a@ , where @f@ is some @Matchable@ functor and @a@
is a type for variable .
The relation between matching and unification is prev... | null | https://raw.githubusercontent.com/viercc/matchable/6443555956eb3e0988defdbbbd86dd3f658d8e6a/example/src/Unification.hs | haskell | | Variable to term substitution. Solution of unification is represented
by this type.
| Apply a substitution to a term.
| @(a ==> t)@ is a substitution which replaces @a@ to @t@, and
do not modify other variables.
| Cause of failure in unification algorithm. | |
This module shows how to implement an unification algorithm
generically , using @Matchable@ type class .
This module assumes terms to be unified are represented by
@Free f a@ , where @f@ is some @Matchable@ functor and @a@
is a type for variable .
The relation between matching and unification is prev... |
d2e5008e6af423f44ef801227a08b54a29c5b2428ce223b2391361bbd58eb54e | hmb-ba/protocol | SpecHelper.hs | module SpecHelper
( module Test.Hspec
, module Kafka.Protocol
, module SpecFixtures
) where
import Kafka.Protocol
import SpecFixtures
import Test.Hspec
| null | https://raw.githubusercontent.com/hmb-ba/protocol/3df7ff48051f69651a29111ecc245dfb1660f4b5/test/SpecHelper.hs | haskell | module SpecHelper
( module Test.Hspec
, module Kafka.Protocol
, module SpecFixtures
) where
import Kafka.Protocol
import SpecFixtures
import Test.Hspec
| |
26b422c424d4917ef359ba0e6e6eded82f90b8af9b21e3e0a41537d1deb8e65d | awslabs/s2n-bignum | bignum_bitfield.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_bitfield.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/generic/bignum_bitfield.o";;
***
-------------------------------------------------------------------------
Correctness proof. ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Constant - time bitfield selection from bignum . ... |
883ffca23def97ccc181a2c10093f212f86c2d158c47c5798c031f2de26c3e4b | sbcl/sbcl | macro-policy-test.lisp | (declaim (optimize speed))
(eval-when (:compile-toplevel :execute)
(if (and (boundp '*frob-macro-policy*)
(eq (symbol-value '*frob-macro-policy*) t))
(set-macro-policy '((speed 0))))
RANDOM - EYES is purely a " macro helper " and should never generate efficiency
notes . If all three situations w... | null | https://raw.githubusercontent.com/sbcl/sbcl/bdfad7689352773702a701247f55f84ae15bca89/tests/macro-policy-test.lisp | lisp | an efficiency note regarding the code compiled into the fasl,
but no note about the inefficiency of the in-memory code.
Problem is, that's somewhat difficult to check for in an assertion.
All these macros use generic + which is "inefficient"
Here we're just going to assert that no efficiency note is | (declaim (optimize speed))
(eval-when (:compile-toplevel :execute)
(if (and (boundp '*frob-macro-policy*)
(eq (symbol-value '*frob-macro-policy*) t))
(set-macro-policy '((speed 0))))
RANDOM - EYES is purely a " macro helper " and should never generate efficiency
notes . If all three situations w... |
b1cfa954330c407aa302922590b9b206e1f3ae739ca5ee998cc1afb0955c2178 | alanzplus/EOPL | 2.24.rkt | #lang eopl
(provide bintree)
(provide leaf-node)
(provide interior-node)
(provide bintree-to-list)
(define-datatype bintree bintree?
(leaf-node
(num integer?))
(interior-node
(key symbol?)
(left bintree?)
(right bintree?)))
(define bintree-to-list
(lambda (tree)
(cases bintree tree
(l... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch2/2.24.rkt | racket | #lang eopl
(provide bintree)
(provide leaf-node)
(provide interior-node)
(provide bintree-to-list)
(define-datatype bintree bintree?
(leaf-node
(num integer?))
(interior-node
(key symbol?)
(left bintree?)
(right bintree?)))
(define bintree-to-list
(lambda (tree)
(cases bintree tree
(l... | |
57868e330179dddf2797a20c59a969a885b836115f6a41aa91252f89bd56503c | irastypain/sicp-on-language-racket | exercise_1_42.rkt | #lang racket
Процедура ,
другой
(define (compose f g)
(lambda (x) (f (g x))))
процедуры
(provide compose) | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter01/exercise_1_42.rkt | racket | #lang racket
Процедура ,
другой
(define (compose f g)
(lambda (x) (f (g x))))
процедуры
(provide compose) | |
a57a8d8c19265a8082e15d7c97205e2b352447ce5c66d76624eb027f424a552c | rd--/hsc3 | blitB3Saw.help.hs | -- blitB3Saw
let f = xLine kr 1000 20 10 DoNothing
in X.blitB3Saw ar f 0.99 * 0.1
-- blitB3Saw ; aliasing suddenly appears for very high frequencies
let f = mouseX kr 10 10000 Exponential 0.2
c = mouseY kr 0.01 0.99 Linear 0.2
in X.blitB3Saw ar f c * 0.1
-- blitB3Saw ; comparison
mce2 (saw ar 20) (X.blitB3Saw ar ... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/blitB3Saw.help.hs | haskell | blitB3Saw
blitB3Saw ; aliasing suddenly appears for very high frequencies
blitB3Saw ; comparison | let f = xLine kr 1000 20 10 DoNothing
in X.blitB3Saw ar f 0.99 * 0.1
let f = mouseX kr 10 10000 Exponential 0.2
c = mouseY kr 0.01 0.99 Linear 0.2
in X.blitB3Saw ar f c * 0.1
mce2 (saw ar 20) (X.blitB3Saw ar 20 0.99) * 0.1
|
67be39b0ae9fe40748e4bc9c969766bfee26816502798736b63423c50e049fcd | rems-project/cerberus | string_cabs.ml | open Pp_cabs
(*
let string_of_cabs_type_specifier tspec =
Pp_utils.to_plain_string (pp_cabs_type_specifier tspec)
*)
let string_of_declarator decltor =
"Pp_utils.to_plain_string (pp_declarator decltor)"
let string_of_pointer_declarator decltor =
"Pp_utils.to_plain_string (pp_pointer_declarator decltor)"
| null | https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/ocaml_frontend/pprinters/string_cabs.ml | ocaml |
let string_of_cabs_type_specifier tspec =
Pp_utils.to_plain_string (pp_cabs_type_specifier tspec)
| open Pp_cabs
let string_of_declarator decltor =
"Pp_utils.to_plain_string (pp_declarator decltor)"
let string_of_pointer_declarator decltor =
"Pp_utils.to_plain_string (pp_pointer_declarator decltor)"
|
67cfd121e1f3cadd48fd8d7edd3d9709521bddb817d48c34d01955a05095e58e | arttuka/reagent-material-ui | unfold_less_double_outlined.cljs | (ns reagent-mui.icons.unfold-less-double-outlined
"Imports @mui/icons-material/UnfoldLessDoubleOutlined as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def unfo... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/unfold_less_double_outlined.cljs | clojure | (ns reagent-mui.icons.unfold-less-double-outlined
"Imports @mui/icons-material/UnfoldLessDoubleOutlined as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def unfo... | |
440e8afb4dc69308e73cf242dd8863e59a60f2d9c77cc27e7404f1905b98997c | slepher/astranaut | sample_2.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2020 ,
%%% @doc
%%%
%%% @end
Created : 9 Jul 2020 by < >
%%%-------------------------------------------------------------------
-module(sample_2).
%% API
-export([test/1]).
-mark(mark_01).
%%%====================... | null | https://raw.githubusercontent.com/slepher/astranaut/95445ee8de492ead2cd9d9671095e251e902986b/test/astranaut_SUITE_data/sample_2.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
===================================================================
API
===================================================================
-------------------------... | @author < >
( C ) 2020 ,
Created : 9 Jul 2020 by < >
-module(sample_2).
-export([test/1]).
-mark(mark_01).
test(ok_2)->
test(ok_1);
test(ok_3)->
test_1(ok_3);
test(ok_4)->
test(ok_4, ok_4);
test(_A) ->
ok_2.
test_1(ok_3) ->
ok_3.
test(A, _B) ->
A.
Internal functions
|
37269d7ef23e6bf682c79469cc4920b90ae75b1e389a0ea37237f1cfdadb73ee | FundingCircle/fc4-framework | yaml.clj | (ns fc4.io.yaml
(:require [clojure.java.io :as io :refer [file]]
[clojure.spec.alpha :as s]
[clojure.string :as str :refer [ends-with? includes?]]
[cognitect.anomalies :as anom]
[fc4.integrations.structurizr.express.spec] ; for side-effects
[fc4.integrations... | null | https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/src/fc4/io/yaml.clj | clojure | for side-effects | (ns fc4.io.yaml
(:require [clojure.java.io :as io :refer [file]]
[clojure.spec.alpha :as s]
[clojure.string :as str :refer [ends-with? includes?]]
[cognitect.anomalies :as anom]
[fc4.integrations.structurizr.express.yaml :as se-yaml]
[fc4.io.util :refer [fai... |
361e593800eb6aa6cb7bbc2a0befc696a73a5ede4557aa251561d1e4722a656e | sampou-org/pfad | Code28_TreeAndQueue.hs | module Code28_TreeAndQueue (Queue,Forest,Rose (..)
,insert,remove,empty,isempty
,boxall1,boxall2) where
import Data.List (unfoldr)
import Data.Sequence hiding (null,empty,unfoldr,length,reverse)
import qualified Data.Sequence as S
consList :: [a] -> [[a]] ... | null | https://raw.githubusercontent.com/sampou-org/pfad/3c2e0847bea9eac80672e1fbccb86ca5a6b09415/Code/Code28_TreeAndQueue.hs | haskell | Tree
Queue | module Code28_TreeAndQueue (Queue,Forest,Rose (..)
,insert,remove,empty,isempty
,boxall1,boxall2) where
import Data.List (unfoldr)
import Data.Sequence hiding (null,empty,unfoldr,length,reverse)
import qualified Data.Sequence as S
consList :: [a] -> [[a]] ... |
a9b081c0927c7be952dd0f249b9ab066c14c0cf096d5cceb203121e7588c50dc | mhjort/clj-gatling | timers.clj | (ns clj-gatling.timers
(:require [clojure.core.async.impl.protocols :as impl]
[clojure.core.async.impl.channels :as channels])
(:import [java.util.concurrent DelayQueue Delayed TimeUnit]))
Core.async has a limit of 1024 concurrent limits for waiting a same timeout channel
;;Internally core.async has a ... | null | https://raw.githubusercontent.com/mhjort/clj-gatling/f59f5948d4a90fd5e6b3ecbcd8d779835041dfd7/src/clj_gatling/timers.clj | clojure | Internally core.async has a cache of timeout channels of same value
See:
This is a version of timers.clj where all that caching has removed | (ns clj-gatling.timers
(:require [clojure.core.async.impl.protocols :as impl]
[clojure.core.async.impl.channels :as channels])
(:import [java.util.concurrent DelayQueue Delayed TimeUnit]))
Core.async has a limit of 1024 concurrent limits for waiting a same timeout channel
(set! *warn-on-reflection* tru... |
c3bec7658720a7b1868827a7805c892919aefa151f90d1780daf82b09d6e2337 | ejgallego/coq-serapi | ser_tac2env.ml | open Serlib
open Ltac2_plugin
open Sexplib.Std
open Ppx_hash_lib.Std.Hash.Builtin
open Ppx_compare_lib.Builtin
module Util = Ser_util
module Loc = Ser_loc
module CAst = Ser_cAst
module Names = Ser_names
module Tac2expr = Ser_tac2expr
module WL2 = struct
type raw = Tac2expr.uid CAst.t list * Tac2expr.raw_tacexpr
... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/dd9e3fbf7faaf3bf365fa3eff134641055151a9b/serlib/plugins/ltac2/ser_tac2env.ml | ocaml | open Serlib
open Ltac2_plugin
open Sexplib.Std
open Ppx_hash_lib.Std.Hash.Builtin
open Ppx_compare_lib.Builtin
module Util = Ser_util
module Loc = Ser_loc
module CAst = Ser_cAst
module Names = Ser_names
module Tac2expr = Ser_tac2expr
module WL2 = struct
type raw = Tac2expr.uid CAst.t list * Tac2expr.raw_tacexpr
... | |
55e5efe23e0ebe9508392b77f9e05370e40ae6aa82e23b1a83e86b43453934ea | cldm/cldm | indexed-repository.lisp | (in-package :cldm)
(defvar +index-file-name+ "libraries.idx")
(defclass indexed-cld-repository (cld-repository)
((index-file :initarg :index-file
:initform nil
:accessor index-file)
(index :initform nil
:accessor index)
(search-index-path :initform nil
:accessor... | null | https://raw.githubusercontent.com/cldm/cldm/899f1a92d52245ef0fc84d073ac35c4b0d2e9609/src/repository/indexed-repository.lisp | lisp | Set default index file
Download the index
else, load the index
build the index file
TODO: should we use a hash table instead of list as index??
Do nothing
success
else | (in-package :cldm)
(defvar +index-file-name+ "libraries.idx")
(defclass indexed-cld-repository (cld-repository)
((index-file :initarg :index-file
:initform nil
:accessor index-file)
(index :initform nil
:accessor index)
(search-index-path :initform nil
:accessor... |
94a52775b4be3a9031334f176550b602ab4804825e9bb8e6c49cbc3e4fbd9686 | rjray/advent-2020-clojure | day10bench.clj | (ns advent-of-code.day10bench
(:require [advent-of-code.core :refer [read-input]]
[clojure.string :as str]
[criterium.core :as c]))
(defn add-endpoints [nums]
(concat (cons 0 nums) (list (+ 3 (apply max nums)))))
(def input (->> "day10.txt"
read-input
str/sp... | null | https://raw.githubusercontent.com/rjray/advent-2020-clojure/631b36545ae1efdebd11ca3dd4dca032346e8601/src/advent_of_code/day10bench.clj | clojure | The version I used for solving the problem. Recursion with memoization.
Python code in this reddit comment:
/
Top-down dynamic programming approach, using recursion and memoization. Note
that the Python example of this method in the above link passed an array
memoize around a single-argument function. This will i... | (ns advent-of-code.day10bench
(:require [advent-of-code.core :refer [read-input]]
[clojure.string :as str]
[criterium.core :as c]))
(defn add-endpoints [nums]
(concat (cons 0 nums) (list (+ 3 (apply max nums)))))
(def input (->> "day10.txt"
read-input
str/sp... |
ce0c58289b4b9c4c259f8aecdbee523bf206d2b997dedd50f52d8e15bfe14c96 | carl-eastlund/dracula | test-planet.rkt | #lang scheme
(require "checks.ss"
planet/util)
(provide planet-suite)
(define planet-suite
(test-suite "planet.ss"
(test-suite "this-package-version-symbol"
(test-case "here"
(check-equal? (this-package-version-symbol)
(string->symbol
(format ... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/private/scheme/test/test-planet.rkt | racket | #lang scheme
(require "checks.ss"
planet/util)
(provide planet-suite)
(define planet-suite
(test-suite "planet.ss"
(test-suite "this-package-version-symbol"
(test-case "here"
(check-equal? (this-package-version-symbol)
(string->symbol
(format ... | |
35b92dc7277e1340b72efb265c73dfd549bba83486653fda5682d16b3af87881 | GrammaTech/sel | cl-yaml-project.lisp | (defpackage :software-evolution-library/software/cl-yaml-project
(:nicknames :sel/sw/cl-yaml-project)
(:use
:gt/full
:software-evolution-library
:software-evolution-library/software/project
:software-evolution-library/software/cl-yaml
:software-evolution-library/components/file)
(:shadowing-import-... | null | https://raw.githubusercontent.com/GrammaTech/sel/eda17d2d8cd8d94d3054a8ee4cc6a8d3657ee236/software/cl-yaml-project.lisp | lisp | (defpackage :software-evolution-library/software/cl-yaml-project
(:nicknames :sel/sw/cl-yaml-project)
(:use
:gt/full
:software-evolution-library
:software-evolution-library/software/project
:software-evolution-library/software/cl-yaml
:software-evolution-library/components/file)
(:shadowing-import-... | |
10aedaf7868997a0ce4bbd65a1aac000068a550870ac79a4c92c78c62e97bd55 | wilbowma/scribble-bettergrammar | info.rkt | #lang info
(define build-deps
'("scribble-bettergrammar-lib"
"base"
"scribble-lib"
"racket-doc"
"scribble-doc"
"sexp-diff-doc"))
(define pkg-desc "Documentation for scribble-bettergrammar")
(define pkg-authors '(wilbowma))
(define version "1.6")
(define deps '("base"))
| null | https://raw.githubusercontent.com/wilbowma/scribble-bettergrammar/121e6bea5fc1561c8e2d58f340dabaaf365dbb64/scribble-bettergrammar-doc/info.rkt | racket | #lang info
(define build-deps
'("scribble-bettergrammar-lib"
"base"
"scribble-lib"
"racket-doc"
"scribble-doc"
"sexp-diff-doc"))
(define pkg-desc "Documentation for scribble-bettergrammar")
(define pkg-authors '(wilbowma))
(define version "1.6")
(define deps '("base"))
| |
6520c93d5d5ed038b2053081eb5382d1d0a11a34443ddcf19fb1952235d3fad0 | returntocorp/semgrep | Parse_jsonnet.mli | This should really be in .. /parsing/ but that would lead to circular dependencies
* because we would use Parse_jsonnet_tree_sitter.ml which itself use AST_jsonnet.ml .
* because we would use Parse_jsonnet_tree_sitter.ml which itself use AST_jsonnet.ml.
*)
val parse_program : Common.filename -> AST_jsonnet.pr... | null | https://raw.githubusercontent.com/returntocorp/semgrep/1fe267d6fcda7bc470520ebd892d9202b7333437/libs/ojsonnet/Parse_jsonnet.mli | ocaml | This should really be in .. /parsing/ but that would lead to circular dependencies
* because we would use Parse_jsonnet_tree_sitter.ml which itself use AST_jsonnet.ml .
* because we would use Parse_jsonnet_tree_sitter.ml which itself use AST_jsonnet.ml.
*)
val parse_program : Common.filename -> AST_jsonnet.pr... | |
a4988a4a327b1b74ae8cfcc0fcdd18841ec273f3017bdf8d420995bf7e139def | grin-compiler/ghc-wpc-sample-programs | Styles.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Text . Pandoc . Readers . Docx . . Styles
Copyright : Copyright ( C ) 2014 - 2020 2019 < >
License : GNU GPL , version... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE OverloadedStrings #
Case-insensitive comparisons | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
|
Module : Text . Pandoc . Readers . Docx . . Styles
Copyright : Copyright ( C ) 2014 - 2020 2019 < >
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portabilit... |
63699461a30d9c3562d4c35effc50dff2716983eca37599faadb156ef0af3af6 | erlang/otp | ssh_connection.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/ssh/src/ssh_connection.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2008 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ssh_connection).
-include("ssh.hrl").
-include("ssh_connect.hrl").
-include("ssh_transport.hrl").
-expor... |
764ee4fc14d203a9eb2fb87edd865fc318371142a2abb8bede99f9b6da7f429a | v-kolesnikov/sicp | 2_56.clj | (ns sicp.chapter02.2-56
(:require [sicp.common :as sicp]))
(def eq? =)
(defn =number?
[exp n]
(and (number? exp)
(= exp n)))
(defn variable? [x] (symbol? x))
(defn same-variable? [v1 v2]
(and (variable? v1)
(variable? v2)
(eq? v1 v2)))
(defn make-sum [a1 a2]
(cond (=number? a1 0) a2
... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_56.clj | clojure | (ns sicp.chapter02.2-56
(:require [sicp.common :as sicp]))
(def eq? =)
(defn =number?
[exp n]
(and (number? exp)
(= exp n)))
(defn variable? [x] (symbol? x))
(defn same-variable? [v1 v2]
(and (variable? v1)
(variable? v2)
(eq? v1 v2)))
(defn make-sum [a1 a2]
(cond (=number? a1 0) a2
... | |
46e8b7ce9adf280ed3eda0d2e4f14a531c31059c72a476562b5bb7f4eeb6137e | fogus/trammel | utils.clj | utils.clj -- Contracts programming library for Clojure
by - < >
May 26 , 2010
Copyright ( c ) , 2010 - 2013 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
; Public License 1.0 (-1.0.php)
; which can be found in the file COPYING the root of this
; d... | null | https://raw.githubusercontent.com/fogus/trammel/8d5cd1144af105d8027fab6161191814877331b6/src/trammel/utils.clj | clojure | Public License 1.0 (-1.0.php)
which can be found in the file COPYING the root of this
distribution. By using this software in any fashion, you are
agreeing to be bound by the terms of this license. You must not
remove this notice, or any other, from this software. | utils.clj -- Contracts programming library for Clojure
by - < >
May 26 , 2010
Copyright ( c ) , 2010 - 2013 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns trammel.utils
(:use trammel.factors))
(defmacro ^:private assert-w-message
[check m... |
501654e04382ebbe020cec32679cb153897ead6df38a9024e8372568ea405daa | rmculpepper/binaryio | bytes-bits.rkt | Copyright 2022
SPDX - License - Identifier : Apache-2.0 OR MIT
#lang racket/base
(require "bitvector.rkt")
(provide bytes-bit-length
bytes-bit-set?
bytes-set-bit!
bytes-bits->sbv
bytes-bits->string
string->bytes-bits)
;; ==============================================... | null | https://raw.githubusercontent.com/rmculpepper/binaryio/2802c5b95cb51063f97cabb55a349d472dda5050/binaryio-lib/unchecked/bytes-bits.rkt | racket | ============================================================
Bit index order: Consider the following byte vector:
How is it interpreted as a bit sequence?
Equivalently, how is a bit index interpreted?
of the byte vector.
each byte. The example above is interpreted in each as follows:
bytes-bit-set? : Bytes N... | Copyright 2022
SPDX - License - Identifier : Apache-2.0 OR MIT
#lang racket/base
(require "bitvector.rkt")
(provide bytes-bit-length
bytes-bit-set?
bytes-set-bit!
bytes-bits->sbv
bytes-bits->string
string->bytes-bits)
Bytes
( bytes 1 3 ) = ( bytes # b00000001 ... |
e39e869a2f417a40fa5c6a275486d559ea0a15176126105f0d3212b79aaeff36 | ronxin/stolzen | tags.scm | #lang scheme
(define (attach-tag type-tag contents)
(if (or (eq? type-tag 'scheme-number) (number? contents))
contents
(list type-tag contents)
)
)
(define (type-tag datum)
(cond
((number? datum) 'scheme-number)
((pair? datum) (car datum))
(else
... | null | https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.5/generic-ops/tags.scm | scheme | #lang scheme
(define (attach-tag type-tag contents)
(if (or (eq? type-tag 'scheme-number) (number? contents))
contents
(list type-tag contents)
)
)
(define (type-tag datum)
(cond
((number? datum) 'scheme-number)
((pair? datum) (car datum))
(else
... | |
66f08e745440ab1d619c7be2640302662896a0efca1d8c06e43f24847715877a | basho/riak_kv | riak_kv_ensemble_console.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_ensemble_console.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(... |
487172e1b1550bc87f02b3068ab83630074a95ad9b95b74140ff6299253aedc6 | wardle/hermes | language.clj | Copyright 2020 and Eldrix 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 obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/wardle/hermes/89543143a5cf2de277e359bca4c8848539945cd1/src/com/eldrix/hermes/impl/language.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2020 and Eldrix Ltd
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.eldrix.hermes.impl.language
"SNOMED language and localisation support.
There are four ways to consider locale in SNOMED CT.
1. A crude language label (e.g. \"en\" in each description.
This shoul... |
598d24c22eabd3eabcac574bfc865f7df78327fc60100338b6e9aac9583f9d47 | yzhs/ocamlllvm | typeopt.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/bytecomp/typeopt.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : typeopt.ml 9547 2010 - 01 - 2... |
69717185a885793162c816bbfcdd913286820c0ec55e46c33dc03602b3f52e9a | metaocaml/ber-metaocaml | extension_constructors_errors_test.ml | (* TEST
* expect
*)
type t = ..;;
module M : sig type t += E | F end = struct type t += E | F of int end;;
[%%expect{|
type t = ..
Line 3, characters 37-70:
3 | module M : sig type t += E | F end = struct type t += E | F of int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: S... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules/extension_constructors_errors_test.ml | ocaml | TEST
* expect
|
type t = ..;;
module M : sig type t += E | F end = struct type t += E | F of int end;;
[%%expect{|
type t = ..
Line 3, characters 37-70:
3 | module M : sig type t += E | F end = struct type t += E | F of int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Signature mismatch:
... |
45d571b7f2ab451b1992a49bb01244382792bb0425cca5076169c41bd2d16420 | serokell/servant-util | BooksOpenApi.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
module BooksOpenApi where
import Universum
import Data.Aeson (FromJSON, ToJSON)
import Data.Aeson.TH (defaultOptions, deriveJSON)
import Data.OpenApi (OpenApi, ToParamSchema, ToSchema)
import Fmt (Buildable (..), (+|), (|+))
import qualified Network... | null | https://raw.githubusercontent.com/serokell/servant-util/215c2e08b9896337482aa976bf9b1999ae7014ba/servant-util/examples/BooksOpenApi.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DerivingStrategies #
module BooksOpenApi where
import Universum
import Data.Aeson (FromJSON, ToJSON)
import Data.Aeson.TH (defaultOptions, deriveJSON)
import Data.OpenApi (OpenApi, ToParamSchema, ToSchema)
import Fmt (Buildable (..), (+|), (|+))
import qualified Network.Wai.Handler.Warp as Warp
import Ser... |
0112dabaf34781132fdc15cbd62a77443d83a2aaefc9e1f511f2a764e01a31c0 | Bike/hare | cache.lisp | (in-package #:hare.type)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Cache for types.
It 's convenient for equivalent types to be EQ .
;;;
(defclass type-cache ()
(;; Hash from nonnegative integers to types. Could be a vector...
(%ints :initform (make-hash-table)
:reader type-cache-ints)
;; H... | null | https://raw.githubusercontent.com/Bike/hare/c9173f4b0fd82e79b94196714f8b02b96a823f75/type/cache.lisp | lisp |
Cache for types.
Hash from nonnegative integers to types. Could be a vector...
Hash from types to types for pointing to them.
Hash from lists (return ...params) to function types.
Hash from types to types of arrays of them to them. | (in-package #:hare.type)
It 's convenient for equivalent types to be EQ .
(defclass type-cache ()
(%ints :initform (make-hash-table)
:reader type-cache-ints)
(%pointers :initform (make-hash-table :test #'eq
#+sbcl :weakness #+sbcl :key)
:reader ... |
a666e597d25d7c8fa2786d4ecf4fcf926efac62b63b27a1a661e8e0e209daabe | sellout/haskerwaul | Magma.hs | module Haskerwaul.Law.Homomorphism.Magma where
import Haskerwaul.Bifunctor
import Haskerwaul.Category.Semigroupal
import Haskerwaul.Law
import Haskerwaul.Object
import Haskerwaul.Relation.Equality
-- | This homomorphism covers most properties for a single morphism (except
-- identities). E.g., this is also used for... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Law/Homomorphism/Magma.hs | haskell | | This homomorphism covers most properties for a single morphism (except
identities). E.g., this is also used for semigroup homomorphism. That is,
if we know @a@ is commutative, then this property holding guarantees that
__NB__: This should also be able to test the functor laws. If we specialize
* @c ... | module Haskerwaul.Law.Homomorphism.Magma where
import Haskerwaul.Bifunctor
import Haskerwaul.Category.Semigroupal
import Haskerwaul.Law
import Haskerwaul.Object
import Haskerwaul.Relation.Equality
is commutative in the image of
leaving @a@ and to be morphisms in the source and target
magmaHomomorphi... |
aa2d918604f6cbd603f4fdba16607cb6c67b5bb519f4ad7d6ec2526cc5684aca | Incubaid/arakoon | inifiles.mli |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
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
distribut... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/inifiles/inifiles.mli | ocaml | * This library reads ini format property files
* raised if you ask for a section which doesn't exist
* raised if you ask for an element (attribute) which doesn't exist,
or the element fails to match the validation regex
* raised if a required section is not specified in the config file
* raised if a required el... |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
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
distribut... |
aedcf6d20efcb74a6844be41d2cb56f43000d4542cf05952d56bb949a9249355 | axellang/axel | golden_TypeSignatureSyntax.hs | module TypeSignatureSyntax where
import Axel
import qualified Prelude as AxelRuntime_GHCPrelude
import qualified Axel.Parse.AST as AxelRuntime_AST
import qualified Axel.Sourcemap as AxelRuntime_Sourcemap
main :: () => (IO ())
foo :: () => Int
bar :: (Quux) => ((->) Int ((->) Char Bool)) | null | https://raw.githubusercontent.com/axellang/axel/91f323dac411e4932c9fa45da14acdbfff4af910/test/Axel/Test/Transpilation/syntax/golden_TypeSignatureSyntax.hs | haskell | module TypeSignatureSyntax where
import Axel
import qualified Prelude as AxelRuntime_GHCPrelude
import qualified Axel.Parse.AST as AxelRuntime_AST
import qualified Axel.Sourcemap as AxelRuntime_Sourcemap
main :: () => (IO ())
foo :: () => Int
bar :: (Quux) => ((->) Int ((->) Char Bool)) | |
33da8a8f735c39c0b29b78c78ffafd1b7896e24ca6ff6b4d7c49782423a14902 | derui/okeyfum | okeyfum_keyboard_device.mli | (*
This module provides functions for keyboard device file and manage
uinput device.
*)
module Types = Okeyfum_types
type 'a fd
The type of file descriptor . This type do not have compatibility Unix.fd
type user
type keyboard
(* For phantom type to detect the type of file descriptor *)
val open_with : ?grab... | null | https://raw.githubusercontent.com/derui/okeyfum/bc47c0bea35c00d720dcde0200256a3f2e1312bd/src/okeyfum_keyboard_device.mli | ocaml |
This module provides functions for keyboard device file and manage
uinput device.
For phantom type to detect the type of file descriptor
[read_key fd] read a key from keyboard device. Notice this function is block execution
[write_key fd key] write a key to created user device. | module Types = Okeyfum_types
type 'a fd
The type of file descriptor . This type do not have compatibility Unix.fd
type user
type keyboard
val open_with : ?grab:bool -> dev:string -> f:(user:user fd -> keyboard:keyboard fd -> unit)
-> unit -> unit
[ open_with ? grab ~dev ~f ( ) ] open keyboard device [ dev ] ... |
fa6ab366b4c212161d9a7f4b69fa1a09eb677ae0842b81a6619a8db25bfd7a72 | jackfirth/rebellion | struct-definition-util.rkt | #lang racket/base
(provide
define-struct-field-accessors)
(require (for-syntax racket/base
racket/syntax)
rebellion/type/struct
syntax/parse/define)
;@------------------------------------------------------------------------------
(define-simple-macro
(define-struct-field-ac... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/private/struct-definition-util.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(provide
define-struct-field-accessors)
(require (for-syntax racket/base
racket/syntax)
rebellion/type/struct
syntax/parse/define)
(define-simple-macro
(define-struct-field-accessors struct:id (field:id ...)
#:descriptor descriptor:expr)
#:with (fiel... |
f5ef9eb08e0dfa86cae1cafd3495ea969e7736719c01ae21af3cde4a5955c10f | screenshotbot/screenshotbot-oss | read-repos.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/github/read-repos
(:use #:cl)
(:import-from #:screensh... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/b329838027045402ce3a97566c9bbde31614dbf5/src/screenshotbot/github/read-repos.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/github/read-repos
(:use #:cl)
(:import-from #:screenshotbot/github/access-checks
#:github-api-re... |
8b2283b783871ab7cc7bd82445512b3bcba7b2514e731ded271561c6cb83ca41 | jacquev6/General | List.ml | module Int = struct
include List.Specialize(Int)
module Equa = List.SpecializeEquatable(Int)
module Repr = List.SpecializeRepresentable(Int)
include (Equa: module type of Equa with type t := t)
include (Repr: module type of Repr with type t := t)
end
module Float = struct
include List.Specialize(Float)
... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Specializations/List.ml | ocaml | module Int = struct
include List.Specialize(Int)
module Equa = List.SpecializeEquatable(Int)
module Repr = List.SpecializeRepresentable(Int)
include (Equa: module type of Equa with type t := t)
include (Repr: module type of Repr with type t := t)
end
module Float = struct
include List.Specialize(Float)
... | |
4da5bcf990f08f6e4504a241c278c3847a289130bf48fb4f7c8787806367da7e | runexec/chp | project.clj | (defproject chp "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "1.1.5"]
[hiccup "1.0.3"]
[garden "0.1.0-beta4"]
[korma "0.3.0-RC5"]
[lib-noir "0.6.4"]
... | null | https://raw.githubusercontent.com/runexec/chp/9059399c46fb4106a73631c741f1e557af541a8b/project.clj | clojure | DANGER
MOD | (defproject chp "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "1.1.5"]
[hiccup "1.0.3"]
[garden "0.1.0-beta4"]
[korma "0.3.0-RC5"]
[lib-noir "0.6.4"]
... |
6b7e1272da6ae6b4f400ce056cb918b169fe160c5afb25c95add14e198b6e418 | graphql-erlang/graphql | graphql_context_test.erl | % This test inspired by issue -erlang/graphql/issues/32
-include_lib("eunit/include/eunit.hrl").
-include("types.hrl").
-module(graphql_context_test).
schema() -> ?SCHEMA(#{
query => fun query/0
}).
db_resolver(_,_, #{db := DB}) -> DB.
query() -> ?OBJECT("Query", "", #{
"a" => ?FIELD(?INT, "Db from context", fu... | null | https://raw.githubusercontent.com/graphql-erlang/graphql/feef75d955e3404c3c8e4500b1e2c4d4821c1dc6/src/test/graphql_context_test.erl | erlang | This test inspired by issue -erlang/graphql/issues/32 |
-include_lib("eunit/include/eunit.hrl").
-include("types.hrl").
-module(graphql_context_test).
schema() -> ?SCHEMA(#{
query => fun query/0
}).
db_resolver(_,_, #{db := DB}) -> DB.
query() -> ?OBJECT("Query", "", #{
"a" => ?FIELD(?INT, "Db from context", fun db_resolver/3),
"b" => ?FIELD(fun b/0, "Here context... |
57e1dfa4ba1691e4596b5cc1dabc59042158e48693dc7a46c0fa5beb7e4d0d0d | kyleburton/clj-lfsr | ids.clj | (ns com.github.kyleburton.clj-lfsr.ids
"In-memory id generation showing how to use an LFSR to create
identifiers. There is no state persisted for this implementation, and
no coordnation outside of the single JVM process."
(:require
[com.github.kyleburton.clj-lfsr.core :as lfsr]
[com.github.kyleburton.clj-lfs... | null | https://raw.githubusercontent.com/kyleburton/clj-lfsr/3d37d7116ad8ae565cb9e771659a98a608a4574b/src/com/github/kyleburton/clj_lfsr/ids.clj | clojure | (ns com.github.kyleburton.clj-lfsr.ids
"In-memory id generation showing how to use an LFSR to create
identifiers. There is no state persisted for this implementation, and
no coordnation outside of the single JVM process."
(:require
[com.github.kyleburton.clj-lfsr.core :as lfsr]
[com.github.kyleburton.clj-lfs... | |
48bec83e5bd5c40d690571cd223189fb059a826ff69b22fb0326d8167cd67815 | nh2/hatrace | Internal.hs | module System.Hatrace.Types.Internal
( CIntRepresentable(..)
, hasSetBits
) where
import Data.Bits
import Foreign.C.Types (CInt(..))
-- | Helper type class for int-sized enum-like types
class CIntRepresentable a where
toCInt :: a -> CInt
fromCInt :: CInt -> a
hasSetBits :: CInt -> CInt ... | null | https://raw.githubusercontent.com/nh2/hatrace/7258134d87915f035efd36babc685c80fb1df8cc/src/System/Hatrace/Types/Internal.hs | haskell | | Helper type class for int-sized enum-like types | module System.Hatrace.Types.Internal
( CIntRepresentable(..)
, hasSetBits
) where
import Data.Bits
import Foreign.C.Types (CInt(..))
class CIntRepresentable a where
toCInt :: a -> CInt
fromCInt :: CInt -> a
hasSetBits :: CInt -> CInt -> Bool
hasSetBits value mask = (value .&. mask) == m... |
a34c785a2b4e72a75bb5702f8b43cffb427f4ae4a79938629592f587aa91fc8d | heraldry/heraldicon | hatching.cljs | (ns heraldicon.render.hatching
(:refer-clojure :exclude [or]))
(def spacing 2.5)
(def line-thickness 0.2)
(def ^:private argent
(let [id "hatching-argent"]
[id
(let [width 10]
[:pattern {:id id
:width width
:height width
:pattern-units "userSpa... | null | https://raw.githubusercontent.com/heraldry/heraldicon/7bf4dd4149e1f69c9e4f9a0b6b826f73f532a01d/src/heraldicon/render/hatching.cljs | clojure | tincture
stain
nontraditional | (ns heraldicon.render.hatching
(:refer-clojure :exclude [or]))
(def spacing 2.5)
(def line-thickness 0.2)
(def ^:private argent
(let [id "hatching-argent"]
[id
(let [width 10]
[:pattern {:id id
:width width
:height width
:pattern-units "userSpa... |
2523ccac4bba265b4939c9d639d0a4a917562277148332aa443d315f55637bdb | nvim-treesitter/nvim-treesitter | highlights.scm | ; Preproc
(command (identifier) @preproc)
; Keywords
(keyword) @keyword
; Literals
(number) @number
(float) @float
; Variables
[
(identifier)
(unit)
] @variable
; Comments
(comment) @comment @spell
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ba4ecfe471e0ee1e8a7b0710ce6f74acf0946609/queries/qmldir/highlights.scm | scheme | Preproc
Keywords
Literals
Variables
Comments |
(command (identifier) @preproc)
(keyword) @keyword
(number) @number
(float) @float
[
(identifier)
(unit)
] @variable
(comment) @comment @spell
|
57aceeea43626577a1d9e77bf41ea2afda1afe5cc0977544137476878ba52b6f | ibdknox/crate | core_test.clj | (ns crate.core-test
(:use clojure.test
crate.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1)))) | null | https://raw.githubusercontent.com/ibdknox/crate/ac992fa48e2818918b14a01b7d5fcbefa10ae058/test/crate/core_test.clj | clojure | (ns crate.core-test
(:use clojure.test
crate.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1)))) | |
67b834695dbcadf790b563f31157a8c28bcf519f4ea5abe851b675c11223ab43 | zippy/anansi | droplet.clj | (ns
#^{:author "Eric Harris-Braun"
:doc "Droplet receptor"}
anansi.streamscapes.droplet
(:use [anansi.ceptr]))
(def droplet-def (receptor-def "droplet"
(attributes :id :from :to :channel :envelope :content :matched-grooves)
(manifest [_r id from ... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/src/anansi/streamscapes/droplet.clj | clojure | (ns
#^{:author "Eric Harris-Braun"
:doc "Droplet receptor"}
anansi.streamscapes.droplet
(:use [anansi.ceptr]))
(def droplet-def (receptor-def "droplet"
(attributes :id :from :to :channel :envelope :content :matched-grooves)
(manifest [_r id from ... | |
6155ba6e051c0006424b5a8dc03ca2fc1a45e6336fd040b25ff33d1c3add795f | openmusic-project/OMChroma | 12Ch-1.lisp | (in-package :om)
;;;===================================
SPAT CLASSES
;;;===================================
(defclass! 12Ch-1
(cs-spat-evt)
(
(source-code :initform
(load-buffer-textfile
(get-orc-source (get-orc "12Ch-1"))
'textfile "append")
... | null | https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/om6/cs-events/csound/classes/Panning/12Ch-1.lisp | lisp | ===================================
===================================
=============================================================================
-----------------------------------------------------------------------------
p1 = instrument number
p4 = input (file)
p5 = panning, equal power [Az, degrees]
AFIL =... | (in-package :om)
SPAT CLASSES
(defclass! 12Ch-1
(cs-spat-evt)
(
(source-code :initform
(load-buffer-textfile
(get-orc-source (get-orc "12Ch-1"))
'textfile "append")
:allocation :class :type textfile :accessor source-code)
(numchan :... |
d49d7ad1b38d6e5a0ab3beb2b07b688689dc83b323f94efd610cd192c762f695 | ZHaskell/z-botan | Hash.hs | |
Module : Z.Crypto . Hash
Description : Hash Functions and Checksums
Copyright : , 2021
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
Hash functions are one - way functions , which map data of arbitrary size to a fixed output length . Most of th... | null | https://raw.githubusercontent.com/ZHaskell/z-botan/425669b50c88750a8316d44868b5139ef65b2c5d/Z/Crypto/Hash.hs | haskell | * Hash type
* function interface
* BIO interface
* Internal helper
* re-export
| Available Hashs
this is specified by passing desired byte length.
| An older (and incompatible) variant of SHA-3, but sometimes used. Prefer SHA-3 in new code.
| An old hash function that is now known to be trivially breakable.
I... | |
Module : Z.Crypto . Hash
Description : Hash Functions and Checksums
Copyright : , 2021
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
Hash functions are one - way functions , which map data of arbitrary size to a fixed output length . Most of th... |
c564febfbc34db9e124ab8d4ab47b4826c3854af4c48196ed9b7e4864a78a006 | MyDataFlow/ttalk-server | distributed_helper.erl | -module(distributed_helper).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-import(ejabberd_node_utils, [get_cwd/2,
call_fun/4]).
-compile(export_all).
is_sm_distributed() ->
Backend = escalus_ejabberd:rpc(ejabberd_sm_backend, backend, []),
... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/test/ejabberd_tests/tests/distributed_helper.erl | erlang | -module(distributed_helper).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-import(ejabberd_node_utils, [get_cwd/2,
call_fun/4]).
-compile(export_all).
is_sm_distributed() ->
Backend = escalus_ejabberd:rpc(ejabberd_sm_backend, backend, []),
... | |
99ef3d521c46a327bbc2c02da175ef50396ba76001b15edcd937d6634881d8dd | NetComposer/nkmedia | nkmedia_janus_client.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/janus_backend/nkmedia_janus_client.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nkmedia_janus_client... |
dcea86bc839a550fdd38d6a64c1c2eece77c4d478003215bf89f2f94f51ddf2b | pjotrp/guix | guix-main.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of t... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/emacs/guix-main.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 , 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
" name+version of packages " pairs .
(use-modules
(ice-9 vlist)
(ice-9 match)
(ice-9 po... |
b9f355a8bb265c71c6b530c0692c2f21cc93b6021a6af85380f9bff6f9c20ef0 | Mattiemus/LaneWars | Minions.hs | {-# LANGUAGE Arrows #-}
module Game.Server.Objects.Minions where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Safe
import IdentityList
import Network.Socket
import Data.Maybe
import Numeric.IEEE
import Game.Shared.Types
import Game.Shared.Networking
import Game.Shared.Arrows
import Ga... | null | https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Game/Server/Objects/Minions.hs | haskell | # LANGUAGE Arrows #
|Server-side game object for a minion
^Start position of the minion
^The lane the minion should follow
^The team the minion belongs too
^True if the minion is at the front of the line of minions
Components
Object representation
Components
Movement
Return object state
|Game object of a pro... |
module Game.Server.Objects.Minions where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Safe
import IdentityList
import Network.Socket
import Data.Maybe
import Numeric.IEEE
import Game.Shared.Types
import Game.Shared.Networking
import Game.Shared.Arrows
import Game.Shared.Object
import ... |
ab1b92d22b6cba7deecafa46547f40e37948bfc0aec33059095cf712a34de9e0 | janestreet/bonsai | bonsai_web_ui_notifications.ml | open! Core
open! Bonsai_web
open! Bonsai.Let_syntax
module Style =
[%css
stylesheet
{|
.notification_container {
position: fixed;
bottom: 20px;
right: 20px; }
.notification_container .notification {
color: white;
cursor: pointer;
text-align: right;
}
.notification_container .notif... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/notifications/src/bonsai_web_ui_notifications.ml | ocaml | [render_with_access_to_entire_notification] is just like render, but the [f] rendering
function also has access to the internally meaningful id of the notificaition and also
the data that is known about the notificaiton like when we expect it to closed an also
when it was sent. | open! Core
open! Bonsai_web
open! Bonsai.Let_syntax
module Style =
[%css
stylesheet
{|
.notification_container {
position: fixed;
bottom: 20px;
right: 20px; }
.notification_container .notification {
color: white;
cursor: pointer;
text-align: right;
}
.notification_container .notif... |
7a9205ba9bd7a543594c5165c94d6537b85ad3b466e95ee1f75516bd86b4b927 | codedownio/sandwich | FailureReason.hs | # LANGUAGE CPP #
-- | Pretty printing failure reasons
module Test.Sandwich.Formatters.Print.FailureReason (
printFailureReason
) where
import Control.Exception.Safe
import Control.Monad.Reader
import qualified Data.List as L
import Data.String.Interpolate
import System.IO
import Test.Sandwich.Formatters.Print.C... | null | https://raw.githubusercontent.com/codedownio/sandwich/80c5244a47a29c3ec20d68afec89297e014847b9/sandwich/src/Test/Sandwich/Formatters/Print/FailureReason.hs | haskell | | Pretty printing failure reasons
Just allow the yellow heading to show the pending state
* Pretty printing | # LANGUAGE CPP #
module Test.Sandwich.Formatters.Print.FailureReason (
printFailureReason
) where
import Control.Exception.Safe
import Control.Monad.Reader
import qualified Data.List as L
import Data.String.Interpolate
import System.IO
import Test.Sandwich.Formatters.Print.Color
import Test.Sandwich.Formatters.... |
e17d3c51fcfb3f3ea99c541b6a2bdff2837edaccb88c635e1097f0b292eac79d | charlieg/Sparser | complete.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1991 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
;;;
;;; File: "complete"
;;; Module: "objects;traces:"
Version : February 1991 v1.8.1
(in-package :sparser)
(defparameter *tr... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/traces/complete.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "complete"
Module: "objects;traces:" | copyright ( c ) 1991 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
Version : February 1991 v1.8.1
(in-package :sparser)
(defparameter *trace-completion-hook* nil
"This flag is checked within the various completion routines
and controls announcements of whether t... |
d3645ae01db84fc6751746dac4b456d7076389f425772d2324b9cf28aef6187c | slipstream/SlipStreamServer | service_benchmark_lifecycle_test.clj | (ns com.sixsq.slipstream.ssclj.resources.service-benchmark-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer :all]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]]
[com.sixsq.slipstream.ssclj... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/service_benchmark_lifecycle_test.clj | clojure | will be used to crosscheck with the existing namespaces (above)
it will not exist thus should be rejected
only schema-org and schema-com are valid and existing (see below)
create namespace
anonymous create should fail
anonymous query should also fail
creation rejected because attribute belongs to unknown namespa... | (ns com.sixsq.slipstream.ssclj.resources.service-benchmark-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer :all]
[com.sixsq.slipstream.ssclj.app.params :as p]
[com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]]
[com.sixsq.slipstream.ssclj... |
37536fb0f129ad9afeef9dcbb19428c700d714078e8ed42346215f312a132b33 | apache/couchdb-twig | twig_app.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-twig/7b58ab232f3db5e54d1c81b6965678f87f89ae11/src/twig_app.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(twig_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
twig_sup:start_link().
stop(_State) ->
ok... |
df4adb10e5bfdc675ed330c1ca0847f4f37ae531bd654d653544d55694217691 | Bannerets/camlproto | Loc.mli | open! Base
type position = Lexing.position
[@@deriving show, equal, compare, sexp, hash]
val compare_position : position -> position -> int
val get_pos_info : position -> string * int * int
type t = private {
loc_start: position;
loc_end: position;
}
[@@deriving equal, compare, sexp, hash]
val make : position ... | null | https://raw.githubusercontent.com/Bannerets/camlproto/0b31083b8c0103079ec2881176f63f8cb12abb73/src/tl/lib/Loc.mli | ocaml | open! Base
type position = Lexing.position
[@@deriving show, equal, compare, sexp, hash]
val compare_position : position -> position -> int
val get_pos_info : position -> string * int * int
type t = private {
loc_start: position;
loc_end: position;
}
[@@deriving equal, compare, sexp, hash]
val make : position ... | |
d5904a1b7732e823d60c56cd1388b2953cb7e2588b6c88e847b1d51b684c6777 | nuprl/gradual-typing-performance | lnm-plot.rkt | #lang typed/racket/base
Create L - N / M plots for .rktd files
;;
;; At a high level:
;; Input:
- Raw experimental data ( .rktd )
;; (Optionally a list)
;; Output:
;; - Pict showing an L-N/M plot for the data
;; (Or, a list of such plots)
(provide
lnm-plot
;; Create an L-NM plot based on the given paramet... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/popl-2016/scripts/lnm-plot.rkt | racket |
At a high level:
Input:
(Optionally a list)
Output:
- Pict showing an L-N/M plot for the data
(Or, a list of such plots)
Create an L-NM plot based on the given parameters (see function for params)
Plots the number of acceptable paths.
Acceptable paths have no overhead greater than the cutoff along any poi... | #lang typed/racket/base
Create L - N / M plots for .rktd files
- Raw experimental data ( .rktd )
(provide
lnm-plot
Builds one plot for each given value of L.
path-plot
)
(require
plot/typed/pict
(only-in racket/math exact-floor)
(only-in plot/utils linear-seq)
(only-in racket/math exact-floor exa... |
4464a9eda6c9590b17d4bb2b52adb960c09b41a40313e9a5cb8468e18974991f | PLTools/OCanren | test004.ml | reimplementing module
open OCanren
open Tester
open Printf
open GT
module = struct
module T =
struct
' a t = O | S of ' a with show , gmap
let fmap f x = gmap(t ) f x
end
include T
include Fmap ( T )
type ground = ground T.t
type lnat = lnat t logic
... | null | https://raw.githubusercontent.com/PLTools/OCanren/1ead64bde16b0eb339a6bf790ea871e19bbaccd0/regression/test004.ml | ocaml | normal type
reified
injected
qr | reimplementing module
open OCanren
open Tester
open Printf
open GT
module = struct
module T =
struct
' a t = O | S of ' a with show , gmap
let fmap f x = gmap(t ) f x
end
include T
include Fmap ( T )
type ground = ground T.t
type lnat = lnat t logic
... |
44847c97054bce4bc72e474fe7ba6cfafc5c50b613ce2d0a6e223ce2519d16e7 | lread/test-doc-blocks | test_body_test.clj | (ns lread.test-doc-blocks.impl.test-body-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest testing is]]
[lread.test-doc-blocks.impl.test-body :as sut]))
(defn tbody [& lines]
(str (string/join "\n" lines) "\n"))
(defn tlines [t]
(string/split-lines t))
(defmacro l... | null | https://raw.githubusercontent.com/lread/test-doc-blocks/8b40a1713ccb951f982b0aed46f7aef96efc79e5/test/lread/test_doc_blocks/impl/test_body_test.clj | clojure | TODO: provide some more context in the error
TODO: provide some more context in the error | (ns lread.test-doc-blocks.impl.test-body-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest testing is]]
[lread.test-doc-blocks.impl.test-body :as sut]))
(defn tbody [& lines]
(str (string/join "\n" lines) "\n"))
(defn tlines [t]
(string/split-lines t))
(defmacro l... |
6cb4b0b00dfcfd11a92ebc41a7f38d22284727459767497497c12553c7b768b2 | mirage/irmin | stats.mli |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/834182f7105e76d9aef2ac9a45643b43b02e6ea8/src/irmin-pack/stats.mli | ocaml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | |
150498cd18989e4c38985ac54e6ec1751504177b54cb524cd54008a218bd434a | TyOverby/mono | main.ml | open! Core
open! Bonsai_web
open Vdom
open Tailwind_colors
let gray =
[ gray50
; gray100
; gray200
; gray300
; gray400
; gray500
; gray600
; gray700
; gray800
; gray900
]
;;
let red =
[ red50; red100; red200; red300; red400; red500; red600; red700; red800; red900 ]
;;
let yellow =
[ yellow5... | null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/tailwind_colors/main.ml | ocaml | open! Core
open! Bonsai_web
open Vdom
open Tailwind_colors
let gray =
[ gray50
; gray100
; gray200
; gray300
; gray400
; gray500
; gray600
; gray700
; gray800
; gray900
]
;;
let red =
[ red50; red100; red200; red300; red400; red500; red600; red700; red800; red900 ]
;;
let yellow =
[ yellow5... | |
a7f61a7e7bfbf911eb86b589f5b9156eb51ac5c2c77856006e36981d84b37aef | Viasat/halite | test_lowering.clj | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.transpile.test-lowering
(:require [com.viasat.halite :as halite]
[com.viasat.halite.eval :as eval]
[com.viasat.halite.envs :as envs]
[com.viasat.halite.transpile.lowering :as lowering]
... | null | https://raw.githubusercontent.com/Viasat/halite/1145fdf49b5148acb389dd5100059b0d2ef959e1/test/com/viasat/halite/transpile/test_lowering.clj | clojure | This is a correct output, but not what spec-from-ssa currently produces,
because it refuses to let-bind instance literals that weren't already let-bound.
When the constraint from :ws/D is inlined, it'll
have the form '(if ($value? $no-value) ... true), which should
be simplified in-place to just 'true.
----------... | Copyright ( c ) 2022 Viasat , Inc.
Licensed under the MIT license
(ns com.viasat.halite.transpile.test-lowering
(:require [com.viasat.halite :as halite]
[com.viasat.halite.eval :as eval]
[com.viasat.halite.envs :as envs]
[com.viasat.halite.transpile.lowering :as lowering]
... |
16f424991c8f7d04f2c9d9520a460b6d45b98d1e788799d7e236b1ad571591cc | AccelerationNet/function-cache | packages.lisp | (in-package :common-lisp-user)
(defpackage :function-cache-test
(:documentation "A simple caching layer for functions")
(:use :common-lisp :iterate :function-cache :lisp-unit2))
| null | https://raw.githubusercontent.com/AccelerationNet/function-cache/6a5ada401e57da2c8abf046f582029926e61fce8/test/packages.lisp | lisp | (in-package :common-lisp-user)
(defpackage :function-cache-test
(:documentation "A simple caching layer for functions")
(:use :common-lisp :iterate :function-cache :lisp-unit2))
| |
e0a26b0f2c3f9028dda1573cfe66546b92c1b8253e28d7a33bbe3044e9610651 | ntrocado/cl-collider-examples | 2-1.lisp | The tutorial uses graphical elements from the SuperCollider IDE , like the frequency analyzer . In order to hack in LISP and still have access to these tools , one solution is :
;;;
( a ) open the SuperCollider IDE and run the following code :
;;; (
;;; o = Server.local.options;
;;; o = ServerOptions.new;
... | null | https://raw.githubusercontent.com/ntrocado/cl-collider-examples/67eec426ea45f5423eefd9391d9a7e8ba41f8b51/nick-collins-tutorial/2-1.lisp | lisp |
(
o = Server.local.options;
o = ServerOptions.new;
t.makeWindow;
t.boot;
)
(b) on the LISP side, after loading the cl-collider library, start the server with:
Subtractive Synthesis
Additive Synthesis
or:
Square wave
Triangle wave
| The tutorial uses graphical elements from the SuperCollider IDE , like the frequency analyzer . In order to hack in LISP and still have access to these tools , one solution is :
( a ) open the SuperCollider IDE and run the following code :
(in-package #:sc-user)
(setf *s* (make-external-server "localhost" :por... |
fce906b306962d5adb495fe2ac91801dfbcb54027ee3ac94784986b5f7170c81 | facebook/flow | jsonrpc.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/c660b36f12ba7bd7f5662d708afa3ab6ebfe85de/src/hack_forked/utils/jsonrpc/jsonrpc.ml | ocaml | Wrapper for handling JSON-RPC
Spec:
Practical readbable guide: -server-protocol/blob/master/protocol.md#base-protocol-json-structures
Following fields are decompositions of 'json'...
mandatory for request+notification; empty otherwise
mandatory for request+response
optional for request+notification
opti... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
d616bd3f150260eaca444a94c8d0999462d92019ab479ffd85bfaa7523761abd | andrewthad/sockets | Unconnected.hs | # language BangPatterns #
# language DataKinds #
{-# language DeriveAnyClass #-}
# language DerivingStrategies #
# language DuplicateRecordFields #
# language LambdaCase #
# language MagicHash #
# language NamedFieldPuns #
{-# language ScopedTypeVariables #-}
# language TypeApplications #
# language UnboxedTuples #
--... | null | https://raw.githubusercontent.com/andrewthad/sockets/90d314bd2ec71b248a90da6ad964c679f75cfcca/src/Socket/Datagram/IPv4/Unconnected.hs | haskell | # language DeriveAnyClass #
# language ScopedTypeVariables #
| Internet datagram sockets without a fixed destination.
* Types
* Establish
* Exceptions
^ Address and port to use
^ Local network interface name
^ Address and port to use
We intentionally discard any exceptions thrown by close.
There is simply noth... | # language BangPatterns #
# language DataKinds #
# language DerivingStrategies #
# language DuplicateRecordFields #
# language LambdaCase #
# language MagicHash #
# language NamedFieldPuns #
# language TypeApplications #
# language UnboxedTuples #
module Socket.Datagram.IPv4.Unconnected
Socket(..)
, Family(..)
... |
3e2026cd65273c10615748b7ddadbcde1d535cb7aed2fc5b32396ee39baad99b | jayunit100/RudolF | vizcharts.clj | (ns ConnjurRV.vizcharts
(:use [incanter.charts :only (histogram bar-chart scatter-plot add-lines)])
(:use [incanter.core :only (view)])
(:use [incanter.stats :only (pdf-normal linear-model)]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; module interface
; make-histogram :: [x] -> String -> HistogramPopup... | null | https://raw.githubusercontent.com/jayunit100/RudolF/8936bafbb30c65c78b820062dec550ceeea4b3a4/bioclojure/src/ConnjurRV/vizcharts.clj | clojure |
module interface
make-histogram :: [x] -> String -> HistogramPopup
make-bar-chart :: Map key value -> String -> String -> BarchartPopup
make-double-bar-chart :: Map key (lvalue, rvalue) -> String -> String -> DoubleBarChartPopup
make-scatter-plot :: [(xvalue, yvalue)] -> String -> String -> ... | (ns ConnjurRV.vizcharts
(:use [incanter.charts :only (histogram bar-chart scatter-plot add-lines)])
(:use [incanter.core :only (view)])
(:use [incanter.stats :only (pdf-normal linear-model)]))
(defn make-histogram
"[x] -> String -> HistogramPopup"
[data xlabel]
{ : pre [ ( list ? data ) ( string ? ) ]... |
be11e412c2e255d71b0cb47c056ee053a568861177b308390aa52b56e339acc5 | mallipeddi/erlpop | epop_message.erl | -module(epop_message).
-author("Harish Mallipeddi <>").
%%%---------------------------------------------------------------------
File :
Created : 17 Sep 2008 by
%%% Function: Utility to parse email messages
%%% ====================================================================
The contents of this file a... | null | https://raw.githubusercontent.com/mallipeddi/erlpop/782cf13219edfbb63a07c2428fe2ed3db98ac73f/src/epop_message.erl | erlang | ---------------------------------------------------------------------
Function: Utility to parse email messages
====================================================================
except in compliance with the License. You may obtain a copy of the
License at
basis, WITHOUT WARRANTY OF ANY KIND, either express o... | -module(epop_message).
-author("Harish Mallipeddi <>").
File :
Created : 17 Sep 2008 by
The contents of this file are subject to the Erlang Public License
License , Version 1.1 , ( the " License " ) ; you may not use this file
Software distributed under the License is distributed on an " AS IS "
-expo... |
e892cb1743e55bbfb6c319c03c5eb7231b8ba265f5a2c34bd982929bbf46e32c | evilmartians/foundry | primitive.mli | open Unicode.Std
val exists : string -> bool
val has_side_effects : string -> bool
val invoke : string -> Rt.value list -> Rt.value
| null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/src/core/primitive.mli | ocaml | open Unicode.Std
val exists : string -> bool
val has_side_effects : string -> bool
val invoke : string -> Rt.value list -> Rt.value
| |
6231b612dee4c31070024d858072edbb47ce94ccc9ca8432090a02ad801612ed | hasktorch/hasktorch | T5Spec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
{-# OPTIONS_GHC -v2 #-}
module Torch.GraduallyTyped.NN.Transformer.T5Spec where
import Contr... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/2b70de320c8cf39d97aa1859032e085740f6561e/experimental/gradually-typed/test/Torch/GraduallyTyped/NN/Transformer/T5Spec.hs | haskell | # LANGUAGE GADTs #
# OPTIONS_GHC -v2 #
| Test that the model produces the same logits output as the reference implementation.
@
>>> tokenizer = AutoTokenizer.from_pretrained("t5-small")
>>> model = T5ForConditionalGeneration.from_pretrained("t5-small")
>>> model.eval()
tensor([[[-19.3826, -10.5635, -11.... | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Torch.GraduallyTyped.NN.Transformer.T5Spec where
import Control.Monad.State (evalStateT)
import Data.Singlet... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.