_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 |
|---|---|---|---|---|---|---|---|---|
53f4fb1032d1901fedceef24c3dbcfe5aeea28ca47cc7fc1fd63a82886ddec36 | stan-dev/stanc3 | Numbering.mli | *
This module translates the locations of statements into
an array of messages used in the C++ for providing locations in the
code when an error occurs , and replaces the locations in the MIR tree
with indices into said array .
It also numbers calls to [ map_rect ] for registration .
This module translat... | null | https://raw.githubusercontent.com/stan-dev/stanc3/c983e15ea9062515e39659cd46c5c68f0862da8f/src/stan_math_backend/Numbering.mli | ocaml | *
This module translates the locations of statements into
an array of messages used in the C++ for providing locations in the
code when an error occurs , and replaces the locations in the MIR tree
with indices into said array .
It also numbers calls to [ map_rect ] for registration .
This module translat... | |
de8b6340b3b04008de137d15e598069058f6939609bdc0fdbd3ed13ef1fc143d | nikomatsakis/a-mir-formality | wf--struct-fields.rkt | #lang racket
(require redex/reduction-semantics
"../../util.rkt"
"../prove.rkt"
"../grammar.rkt"
)
;; Various tests that check the requirements that where clauses be well-formed.
(module+ test
(redex-let*
formality-rust
struct Foo<'a , T > where T : ' a { r : & ' a T }
... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/71be4d5c4bd5e91d326277eaedd19a7abe3ac76a/racket-src/rust/test/wf--struct-fields.rkt | racket | Various tests that check the requirements that where clauses be well-formed.
ERROR, because we don't model outlives inference | #lang racket
(require redex/reduction-semantics
"../../util.rkt"
"../prove.rkt"
"../grammar.rkt"
)
(module+ test
(redex-let*
formality-rust
struct Foo<'a , T > where T : ' a { r : & ' a T }
Rust/AdtDecl_Foo (term (struct Foo[(lifetime a) (type T)]
... |
efbea97624c9357eb050e75c66099ddacefb74e41e2a4365d0c51175c186a0d4 | minio/minio-hs | Test.hs | --
MinIO Haskell SDK , ( C ) 2017 MinIO , Inc.
--
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, softw... | null | https://raw.githubusercontent.com/minio/minio-hs/bdac380c77a699e640c411dd04d99acff5bdd646/test/Network/Minio/Utils/Test.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | MinIO Haskell SDK , ( C ) 2017 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Network.Minio.Utils.Test
( limitedMapConcurrentlyTests,
)
where
import Network.Minio.Utils
import Test.Tasty
import Te... |
e0f55902c687feb5d8b5983ce9408f9b69f36e35292dd32ddb83ee885e518047 | janestreet/memtrace | memprof_tracer.ml | type t =
{ mutable locked : bool;
mutable locked_ext : bool;
mutable failed : bool;
mutable stopped : bool;
report_exn : exn -> unit;
trace : Trace.Writer.t;
ext_sampler : Geometric_sampler.t; }
let curr_active_tracer : t option ref = ref None
let active_tracer () = !curr_active_tracer
let ... | null | https://raw.githubusercontent.com/janestreet/memtrace/918dcededf1ed9a21ccc2b5ccacc20c23050037d/src/memprof_tracer.ml | ocaml | round up to an integer number of words | type t =
{ mutable locked : bool;
mutable locked_ext : bool;
mutable failed : bool;
mutable stopped : bool;
report_exn : exn -> unit;
trace : Trace.Writer.t;
ext_sampler : Geometric_sampler.t; }
let curr_active_tracer : t option ref = ref None
let active_tracer () = !curr_active_tracer
let ... |
7b2b0fcd77a3156cf7510f68dc0b4c9311fe5eb60f57db36f1e0448fb78230f1 | connerirwin/musfix | Error.hs | module Language.Synquid.Error (
Pos (..),
SourcePos,
sourceLine,
sourceColumn,
sourceName,
noPos,
ErrorKind (..),
ErrorMessage (..),
) where
import Text.PrettyPrint.ANSI.Leijen
import Text.Parsec.Pos
-- | Anything with a source position attached
data Pos a = Pos {
position :: SourceP... | null | https://raw.githubusercontent.com/connerirwin/musfix/97edf67693d6ee3ea7dc234b20db560af92d95c3/src/Language/Synquid/Error.hs | haskell | | Anything with a source position attached
| Dummy source position
| module Language.Synquid.Error (
Pos (..),
SourcePos,
sourceLine,
sourceColumn,
sourceName,
noPos,
ErrorKind (..),
ErrorMessage (..),
) where
import Text.PrettyPrint.ANSI.Leijen
import Text.Parsec.Pos
data Pos a = Pos {
position :: SourcePos,
node :: a
}
instance (Eq a) => Eq (P... |
2b87350196577ad9f0c1eeb36776523c13df649a26e9d7f7ee04f942fdcb380b | webyrd/n-grams-for-synthesis | implementation.scm | Copyright ( C ) ( 2016 ) . All Rights Reserved .
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;; restriction, including without limitation the rights to use, copy,
... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-147/srfi/147/implementation.scm | scheme | Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do so, subject to the following conditions:
... | Copyright ( C ) ( 2016 ) . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K... |
3cc5a06cea5cb70d1db83ccee95ca0285516893dd5fe0a2ffdb20903970c8b58 | francescoc/scalabilitywitherlangotp | freq_overload.erl | -module(freq_overload).
-export([start_link/0, add/2, delete/2]).
-export([no_frequency/0, frequency_available/0, frequency_denied/0]).
start_link() ->
case gen_event:start_link({local, ?MODULE}) of
{ok, Pid} ->
add(counters, {}),
add(logger, {file, "log"}),
{ok, Pid};
Error ->
Error
end.... | null | https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch9/bsc-1.0/src/freq_overload.erl | erlang | -module(freq_overload).
-export([start_link/0, add/2, delete/2]).
-export([no_frequency/0, frequency_available/0, frequency_denied/0]).
start_link() ->
case gen_event:start_link({local, ?MODULE}) of
{ok, Pid} ->
add(counters, {}),
add(logger, {file, "log"}),
{ok, Pid};
Error ->
Error
end.... | |
d7391c77e9710bcb01585c56efc25a0e9ae3ffb6ca9b5b0e139e7c6f42de5958 | purescript/purescript | Literals.hs | -- |
-- The core functional representation for literal values.
--
module Language.PureScript.AST.Literals where
import Prelude
import Language.PureScript.PSString (PSString)
-- |
Data type for literal values . Parameterised so it can be used for Exprs and
-- Binders.
--
data Literal a
-- |
-- A numeric literal
... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/AST/Literals.hs | haskell | |
The core functional representation for literal values.
|
Binders.
|
A numeric literal
|
A string literal
|
A character literal
|
A boolean literal
|
An array literal
|
An object literal
| module Language.PureScript.AST.Literals where
import Prelude
import Language.PureScript.PSString (PSString)
Data type for literal values . Parameterised so it can be used for Exprs and
data Literal a
= NumericLiteral (Either Integer Double)
| StringLiteral PSString
| CharLiteral Char
| BooleanLiteral Bool
... |
450366a5d0b64fab11aabde9288f292258f6c3c8c3dba14b3189215618812093 | realworldocaml/book | dtemp.mli | (** Temp directory used by dune processes *)
open Import
(** This returns a build path, but we don't rely on that *)
val file : prefix:string -> suffix:string -> Path.t
(** Add the temp env var to the environment passed or return the initial
environment with the temp var added. *)
val add_to_env : Env.t -> Env.t... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/dtemp.mli | ocaml | * Temp directory used by dune processes
* This returns a build path, but we don't rely on that
* Add the temp env var to the environment passed or return the initial
environment with the temp var added.
* Destroy the temporary file or directory |
open Import
val file : prefix:string -> suffix:string -> Path.t
val add_to_env : Env.t -> Env.t
val destroy : Temp.what -> Path.t -> unit
|
ba47f0051703401bb9f765f81c2afd7cadb85dfe289ae2d5f216cea2e4f3d5e9 | jrclogic/SMCDEL | S5.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables #
module SMCDEL.Symbolic.S5 where
import Control.Arrow (first,second,(***))
import Data.Char (isSpace)
import Data.Dynamic
import Data.HasCacBDD hiding (Top,Bot)
import Data.HasCacBDD.Visuals
import Data.List ((\\),delete,dropWhileEnd,intercal... | null | https://raw.githubusercontent.com/jrclogic/SMCDEL/700611d21036c0562b7a4d8f3c32e0d8f03a58f5/src/SMCDEL/Symbolic/S5.hs | haskell | vocabulary
state law
observational variables
... that satisfy actualsBdd
... and a precondition.
unpointed structures can be updated with anything
addProps
addLaw
changeLaw
addObs
| shift addprops to ensure that props and newprops are disjoint:
apply the shifting to addlaw, changelaw and eventObs:
the actu... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables #
module SMCDEL.Symbolic.S5 where
import Control.Arrow (first,second,(***))
import Data.Char (isSpace)
import Data.Dynamic
import Data.HasCacBDD hiding (Top,Bot)
import Data.HasCacBDD.Visuals
import Data.List ((\\),delete,dropWhileEnd,intercal... |
9a434831423f015a34475a77da9bfd7dc4cc983b82ec77c653d4d97b2b34a9be | dmitryvk/sbcl-win32-threads | cpl.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
This software is derived from software originally released by Xerox
;;;; Corporation. Copyright and release statements follow. Later modifications
;;;; to the software are in the public domain and are provided with
;;;; absol... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/pcl/cpl.lisp | lisp | more information.
Corporation. Copyright and release statements follow. Later modifications
to the software are in the public domain and are provided with
absolutely no warranty. See the COPYING and CREDITS files for more
information.
All rights reserved.
Use and copying of this software and preparation of der... | This software is part of the SBCL system . See the README file for
This software is derived from software originally released by Xerox
copyright information from original PCL sources :
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
derivative works must comply with all applicabl... |
e82164dd09bb838d4f1b2aea4301870bdf996c54bad20c6e2124da4e2c8053ae | alesya-h/live-components | deps.clj | (ns app.build.deps
(:require [boot.core :as boot]))
(println "Defining deps.")
(def deps
{:build
'[[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[org.clojure/tools.namespace "0.2.11"]
[org.clojure/tools.reader "0.10.0-alpha3"]
[org.clojure/tools.macro "0.1.5"]
[o... | null | https://raw.githubusercontent.com/alesya-h/live-components/8ca7f9dcabaa452a67bb18d24a8661e8de83aecc/examples/todomvc/src/app/build/deps.clj | clojure | ui | (ns app.build.deps
(:require [boot.core :as boot]))
(println "Defining deps.")
(def deps
{:build
'[[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[org.clojure/tools.namespace "0.2.11"]
[org.clojure/tools.reader "0.10.0-alpha3"]
[org.clojure/tools.macro "0.1.5"]
[o... |
d70dc7780bd2130a81c5b943c72067f1e52c667b517d17c45b6d11d88a34675d | KingoftheHomeless/in-other-words | Select.hs | module Control.Effect.Select
( -- * Effect
Select(..)
-- * Actions
, select
-- * Interpretations
, runSelect
-- * Carriers
, SelectC
) where
import Control.Effect.Internal.Select
| null | https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/9c864c81beb4fdf71d363b6962db5c90275c57ef/src/Control/Effect/Select.hs | haskell | * Effect
* Actions
* Interpretations
* Carriers | module Control.Effect.Select
Select(..)
, select
, runSelect
, SelectC
) where
import Control.Effect.Internal.Select
|
b544a048fe4b19f32793009c1e444187b2783842df016b84884679d5f116e963 | tmattio/omigrate | cmd_create.ml | let run ~dir ~name =
let () =
if Sys.file_exists dir && Sys.is_directory dir then ()
else Unix.mkdir dir 0o755
in
let tm = Unix.gmtime (Unix.time ()) in
let date =
Printf.sprintf "%d%02d%02d%02d%02d%02d" (1900 + tm.Unix.tm_year)
(1 + tm.Unix.tm_mon) tm.Unix.tm_mday tm.Unix.tm_hour tm.Unix.tm_m... | null | https://raw.githubusercontent.com/tmattio/omigrate/367156a507fdf014c817f7fea38ec8d8808a1be9/bin/commands/cmd_create.ml | ocaml | Command line interface | let run ~dir ~name =
let () =
if Sys.file_exists dir && Sys.is_directory dir then ()
else Unix.mkdir dir 0o755
in
let tm = Unix.gmtime (Unix.time ()) in
let date =
Printf.sprintf "%d%02d%02d%02d%02d%02d" (1900 + tm.Unix.tm_year)
(1 + tm.Unix.tm_mon) tm.Unix.tm_mday tm.Unix.tm_hour tm.Unix.tm_m... |
5830465c2251a8cc43f328fd4f702d2a418893757feb1d99c703df47c3f05c71 | sordina/churros | Unagi.hs | # LANGUAGE TypeFamilies #
# LANGUAGE BlockArguments #
-- | Chan Transport Instance.
module Control.Churro.Transport.Unagi where
import Control.Churro.Types
import Control.Churro.Prelude
import Control.Concurrent.Chan.Unagi
import Data.Void
data Unagi a
instance Transport Unagi where
data In Unagi a = Cha... | null | https://raw.githubusercontent.com/sordina/churros/240416d736f19d4740570d7c3cf91e51038a0649/src/Control/Churro/Transport/Unagi.hs | haskell | | Chan Transport Instance.
| # LANGUAGE TypeFamilies #
# LANGUAGE BlockArguments #
module Control.Churro.Transport.Unagi where
import Control.Churro.Types
import Control.Churro.Prelude
import Control.Concurrent.Chan.Unagi
import Data.Void
data Unagi a
instance Transport Unagi where
data In Unagi a = ChanIn (InChan a)
data Out ... |
5494f85a8684b2c0b07b66d1aee1135a31346e94b061c1a52a5f26eaa8144a35 | goderich/aoc2020 | day08.rkt | #lang racket
For today 's solution we will pull the data / either
library ( also by ) in order to classify
the two kinds of outcomes we can get .
(require data/either)
First , we read in the instructions . The operation
;; and number on each line are stored in a cons cell.
(define (parse-instruction instr)
... | null | https://raw.githubusercontent.com/goderich/aoc2020/99a7bef6eaaba3950f146e9aad3ab624dbf7daad/day08.rkt | racket | and number on each line are stored in a cons cell.
The instructions themselves are read into a hash map,
with line numbers as keys, for fast access.
This is where the magic happens. This function is
generalized for both parts of the puzzle.
The embedded `loop` function does all the work,
while the `run-instructi... | #lang racket
For today 's solution we will pull the data / either
library ( also by ) in order to classify
the two kinds of outcomes we can get .
(require data/either)
First , we read in the instructions . The operation
(define (parse-instruction instr)
(match-define (list op num) (string-split instr))
... |
9f4ed6e0bd5d67a144549435315155b87f7114c748fa7e98c462888c71910c5a | auser/beehive | rest_server_sup.erl | %%%-------------------------------------------------------------------
%%% File : beehive_sup.erl
Author :
%%% Description :
%%%
Created : Sun Oct 25 13:09:07 PDT 2009
%%%-------------------------------------------------------------------
-module (rest_server_sup).
-include ("beehive.hrl").
-behaviour(su... | null | https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/src/bh_rest/rest_server_sup.erl | erlang | -------------------------------------------------------------------
File : beehive_sup.erl
Description :
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
=============================... | Author :
Created : Sun Oct 25 13:09:07 PDT 2009
-module (rest_server_sup).
-include ("beehive.hrl").
-behaviour(supervisor).
-compile([verbose, report_errors, report_warnings, trace, debug_info]).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000,... |
39898fac65fe7437aa89de2a460f36765e54e5d21687dea8b5986f36171b7a3e | philschonholzer/co2db | Controller.hs | module Application.Helper.Controller where
import qualified Config
import IHP.Controller.Context
import IHP.Controller.Redirect
import IHP.ControllerPrelude
ensureisAdminUser :: (HasField "email" model Text, ?context :: ControllerContext, HasPath action) => model -> action -> IO ()
ensureisAdminUser currentUser actio... | null | https://raw.githubusercontent.com/philschonholzer/co2db/6155d0f238b3ec8dad55f26c1aa007dbec7ec28c/Application/Helper/Controller.hs | haskell | module Application.Helper.Controller where
import qualified Config
import IHP.Controller.Context
import IHP.Controller.Redirect
import IHP.ControllerPrelude
ensureisAdminUser :: (HasField "email" model Text, ?context :: ControllerContext, HasPath action) => model -> action -> IO ()
ensureisAdminUser currentUser actio... | |
6180f2aa6fb6abe3ded2a87296db5322ff7ac4f0f7f7a5f25fa27a9b5bcb41d6 | g-andrade/stacktrace_compat | test_module.erl | Copyright ( c ) 2018 - 2021
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, publish, di... | null | https://raw.githubusercontent.com/g-andrade/stacktrace_compat/349a093fe795a3e33f1f7f15a65247fb77e46b80/test/test_module.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright not... | Copyright ( c ) 2018 - 2021
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
43b1c69b5ae5d92bde6d92057cdcb05421fc0a65c65ee8f2bff232da5c59cd96 | active-group/reacl | xpath.cljs | (ns reacl2.test-util.xpath
"An xpath is basically a convenient and compositional way to define
a filter function on nodes in a virtual DOM tree, resp. the React
test renderer tree, roughly based on a 'path' through the tree.
The functions [[select]], [[select-all]], [[select-one]]
and [[contains?]] apply tha... | null | https://raw.githubusercontent.com/active-group/reacl/946e85a946d9659706b8875f9d1d2a7e0da55592/src/reacl2/test_util/xpath.cljs | clojure | Idea: an xpath is a concatenated sequence of selectors (>> sel1 sel2 ...) that can be
applied to a list of nodes, where each selector maps that list to a
new list of nodes. Nodes can be components (reacl class instances)
or virtual dom nodes, as well as the app-state, local-state or the
argments vector of componen... | (ns reacl2.test-util.xpath
"An xpath is basically a convenient and compositional way to define
a filter function on nodes in a virtual DOM tree, resp. the React
test renderer tree, roughly based on a 'path' through the tree.
The functions [[select]], [[select-all]], [[select-one]]
and [[contains?]] apply tha... |
06f5d9626462ad9d0a18bad5a7226feb1dec993dc5cc9a9652ab7f770d7dbe23 | basho/riak_core | riak_core_node_worker_pool.erl | %%
Copyright ( c ) 2007 - 2011 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 obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless requi... | null | https://raw.githubusercontent.com/basho/riak_core/abbcca3cfb7da10798d8fc169043955638d4d9db/src/riak_core_node_worker_pool.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 permissions and limitations
under the License.
----------------------------... | Copyright ( c ) 2007 - 2011 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
... |
626e2fb71a155da54b418f2d77ab5519a12529453f7466bdf167a1ca127eca27 | avsm/mirage-duniverse | out_channel.mli | * An output channel for doing blocking writes to destinations like files and sockets .
Note that an [ Out_channel.t ] is a custom block with a finalizer , and so is allocated
directly to the major heap . Creating a lot of out_channels can result in many major
collections and poor performance .
... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/stdio/src/out_channel.mli | ocaml | * defaults to [true]
* defaults to [false]
* defaults to [false]
* [close_no_err] tries to flush and close [t]. It does not raise.
* OCaml's internal Marshal format
* Outputs a list of lines, each terminated by a newline character
* Formatted printing to an out channel. This is the same as [Printf.sprintf] except... | * An output channel for doing blocking writes to destinations like files and sockets .
Note that an [ Out_channel.t ] is a custom block with a finalizer , and so is allocated
directly to the major heap . Creating a lot of out_channels can result in many major
collections and poor performance .
... |
6fefe4d58ef66f5e4a7f35d4ca60ecf353d9e58fb0684ce1e74a00e885f0e0f2 | reiddraper/sumo | internal.clj | ;; -------------------------------------------------------------------
Copyright ( c ) 2011 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 obtai... | null | https://raw.githubusercontent.com/reiddraper/sumo/bd330f14483bfdc7ccb9dbdc3f60266b8e1d95f4/src/sumo/internal.clj | clojure | -------------------------------------------------------------------
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 permission... | Copyright ( c ) 2011 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
(ns sum... |
fcaef383408a42c6241c40f0ca9707093fb1b3a739a7aae62f3a01940e7ea95c | cyverse-archive/DiscoveryEnvironmentBackend | oauth.clj | (ns metadactyl.routes.domain.oauth
(:use [common-swagger-api.schema :only [describe]])
(:require [schema.core :as s]))
(s/defschema OAuthCallbackResponse
{:state_info (describe String "Arbitrary state information required by the UI.")})
| null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/routes/domain/oauth.clj | clojure | (ns metadactyl.routes.domain.oauth
(:use [common-swagger-api.schema :only [describe]])
(:require [schema.core :as s]))
(s/defschema OAuthCallbackResponse
{:state_info (describe String "Arbitrary state information required by the UI.")})
| |
e1c87b9839bdf1d5fe69f2f84b666d948d555e6549f5d494de3252840dd547f0 | flipstone/orville | Pagination.hs | module Database.Orville.PostgreSQL.Pagination
( Pagination(..)
, buildPagination
) where
import Data.Maybe (maybeToList)
import Safe (lastMay)
import Database.Orville.PostgreSQL.Internal.MappendCompat ((<>))
import Database.Orville.PostgreSQL.Internal.Monad (MonadOrville)
import Database.Orville.PostgreSQL.Inte... | null | https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/src/Database/Orville/PostgreSQL/Pagination.hs | haskell | module Database.Orville.PostgreSQL.Pagination
( Pagination(..)
, buildPagination
) where
import Data.Maybe (maybeToList)
import Safe (lastMay)
import Database.Orville.PostgreSQL.Internal.MappendCompat ((<>))
import Database.Orville.PostgreSQL.Internal.Monad (MonadOrville)
import Database.Orville.PostgreSQL.Inte... | |
806b67d4d4a1018e9cb328555c5258ee28f66f760b97072bcea04c9ac0190386 | seckcoder/course-compiler | r2_17.rkt | (if (and 1 #t) 42 777)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r2_17.rkt | racket | (if (and 1 #t) 42 777)
| |
84eb5c0a37fc9171a4e3c6d424ebc5717ffb3b1e76a99c8a1204ad3883bd2559 | ndpar/erlang | myring.erl | %%
%% In the shell type:
%%
1 > timer : tc(myring , start , [ 100000 ] ) .
2 > timer : tc(myring , start , [ 1000000 ] ) .
3 > timer : tc(myring , start , [ 10000000 ] ) .
%%
-module(myring).
-export([start/1, start_proc/2]).
start(Num) ->
start_proc(Num, self()).
start_proc(0, Pid) ->
Pid ! ok;
start_... | null | https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/myring.erl | erlang |
In the shell type:
| 1 > timer : tc(myring , start , [ 100000 ] ) .
2 > timer : tc(myring , start , [ 1000000 ] ) .
3 > timer : tc(myring , start , [ 10000000 ] ) .
-module(myring).
-export([start/1, start_proc/2]).
start(Num) ->
start_proc(Num, self()).
start_proc(0, Pid) ->
Pid ! ok;
start_proc(Num, Pid) ->
NPid = sp... |
d86a97ecadffb5a62ccac922aa95e11e589577aa497341345f10618494347e46 | ghcjs/ghcjs | word2Float32.hs | # LANGUAGE MagicHash #
module Main (main) where
import GHC.Exts (Double(D#), Float(F#), word2Double#, word2Float#)
main :: IO ()
main = do
print (D# (word2Double# 0##))
4294967295 is 2 ^ 32 - 1 , the largest 32 - bit integer , and can be
stored in a 64 - bit IEEE floating - point value without loss of
-- ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/codeGen/word2Float32.hs | haskell | precision.
precision | # LANGUAGE MagicHash #
module Main (main) where
import GHC.Exts (Double(D#), Float(F#), word2Double#, word2Float#)
main :: IO ()
main = do
print (D# (word2Double# 0##))
4294967295 is 2 ^ 32 - 1 , the largest 32 - bit integer , and can be
stored in a 64 - bit IEEE floating - point value without loss of
pri... |
9ee6c916a7627ec215a08594db67bf52c879c627a44bb266590aaa3b496783ba | biocaml/biocaml | lines.mli | (** Manipulate the lines of a file. *)
type item = Line.t [@@deriving sexp]
module MakeIO (Future : Future.S) : sig
open Future
val read : Reader.t -> item Pipe.Reader.t
val write : Writer.t -> item Pipe.Reader.t -> unit Deferred.t
val write_file :
?perm:int -> ?append:bool -> string -> item Pipe.Reader... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/lines.mli | ocaml | * Manipulate the lines of a file.
* Get a stream of lines out of an input-channel.
* Get a stream of lines out a string
* Write a stream of lines to an output-channel.
* Buffer used to parse strings into lines.
* The buffer handle.
* The exception thrown by [next_line_exn].
* Make a new empty buffer. The optiona... |
type item = Line.t [@@deriving sexp]
module MakeIO (Future : Future.S) : sig
open Future
val read : Reader.t -> item Pipe.Reader.t
val write : Writer.t -> item Pipe.Reader.t -> unit Deferred.t
val write_file :
?perm:int -> ?append:bool -> string -> item Pipe.Reader.t -> unit Deferred.t
end
include modu... |
4290aac07ba613bbb1881b33cbc1b7d3b4d0921eefcb1a3c9717f7e201da71c5 | cedlemo/OCaml-GI-ctypes-bindings-generator | Popover_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Popover_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Popover_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Popover_private"
| |
fa109375af51966570a590b22d219df8e3e89c907caf5e6db42957ec059b6901 | hyperledger-labs/fabric-chaincode-ocaml | core.ml | include C.Type
include C.Function
module CI = Cstubs_internals
external grpc_stubs_wrap_GRPC_SLICE_START_PTR : _ CI.fatptr -> CI.voidp
= "grpc_stubs_wrap_GRPC_SLICE_START_PTR"
let grpc_slice_start_ptr x15 =
let (CI.CPointer x18) = Ctypes.addr x15 in
let x17 = x18 in
CI.make_ptr Ctypes.char (grpc_stubs_wrap_GR... | null | https://raw.githubusercontent.com/hyperledger-labs/fabric-chaincode-ocaml/bef9008ce8a20fb5155a855dc860f9062340b829/grpc/core.ml | ocaml | include C.Type
include C.Function
module CI = Cstubs_internals
external grpc_stubs_wrap_GRPC_SLICE_START_PTR : _ CI.fatptr -> CI.voidp
= "grpc_stubs_wrap_GRPC_SLICE_START_PTR"
let grpc_slice_start_ptr x15 =
let (CI.CPointer x18) = Ctypes.addr x15 in
let x17 = x18 in
CI.make_ptr Ctypes.char (grpc_stubs_wrap_GR... | |
8da75c38241ef3675d91218faefd4179365350c19510b233be89127e11569c67 | softwarelanguageslab/maf | safe_send.scm | From
(letrec ((server-actor (actor "server" (state)
(message (x p)
(send p state state)
(become server-actor state))
(state (x) (become server-actor state))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/contracts/soter/safe_send.scm | scheme | From
(letrec ((server-actor (actor "server" (state)
(message (x p)
(send p state state)
(become server-actor state))
(state (x) (become server-actor state))
... | |
cc7a11110a7f02f3246653f8c662ad2f09629e3ae63409b2bf514f9b6f610f15 | amnh/poy5 | characSpec.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/characSpec.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
0bf847389aab71a62e00aba0c921d210680502d4d43206f9d2d88c3f491f6da0 | YoshikuniJujo/test_haskell | Misc.hs | # LANGUAGE ImportQualifiedPost #
# LANGUAGE TupleSections #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Misc (nil, cstrToText) where
import Foreign.Ptr
import Foreign.Storable
import Foreign.C.String
import Data.Text qualified as Txt
import Data.Text.Foreign qualified as Txt
nil :: Maybe (t ())
nil = ... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/15afdbb493c3e789da345eeac12c626eb4af9186/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Misc.hs | haskell | # LANGUAGE ImportQualifiedPost #
# LANGUAGE TupleSections #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Misc (nil, cstrToText) where
import Foreign.Ptr
import Foreign.Storable
import Foreign.C.String
import Data.Text qualified as Txt
import Data.Text.Foreign qualified as Txt
nil :: Maybe (t ())
nil = ... | |
21bf7d273c84d03f450e1381a0b48bbde97b20e049d791b8565fdebfed6b4059 | hiroshi-unno/coar | fold_right.ml | (*
USED: PEPM2013 as fold_right
*)
let rec fold_right (f:int->int->int) xs acc =
match xs with
[] -> acc
| x::xs' -> f x (fold_right f xs' acc)
let rec make_list n =
if n < 0
then []
else n :: make_list (n-1)
let add x y = x + y
let main n m =
let xs = make_list n in
assert (fold_right add xs m ... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/fold_right.ml | ocaml |
USED: PEPM2013 as fold_right
|
let rec fold_right (f:int->int->int) xs acc =
match xs with
[] -> acc
| x::xs' -> f x (fold_right f xs' acc)
let rec make_list n =
if n < 0
then []
else n :: make_list (n-1)
let add x y = x + y
let main n m =
let xs = make_list n in
assert (fold_right add xs m >= m)
[@@@assert "typeof(main) <: ... |
87faaec5d4bdf0fa61e197e16701425b9ee7509e51e10b70b2b584be161d13a1 | nuscr/nuscr | fstarcodegen.mli | * Generate F * code from EFSM with variable annotations
val gen_code : Efsm.state * Efsm.t -> string
| null | https://raw.githubusercontent.com/nuscr/nuscr/02a8a8dab8338ab295963360845dcb09433795ed/lib/codegen/fstar/fstarcodegen.mli | ocaml | * Generate F * code from EFSM with variable annotations
val gen_code : Efsm.state * Efsm.t -> string
| |
cf9acbbd952104399225ef49ab6e554e15fe02d731d215c46a85a1ebf23d99b3 | ghcjs/ghcjs-dom | MediaSource.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.MediaSource
(js_newMediaSource, newMediaSource, js_addSourceBuffer,
addSourceBu... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaSource.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/MediaSource Mozilla MediaSource documentation>
| <-US/docs/Web/API/MediaSource.isTypeSupported Mozilla MediaSource.isTypeSupported documentation>
| <-US/docs/Web/API/MediaSource.isTypeSupported Mozilla ... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.MediaSource
(js_newMediaSource, newMediaSource, js_addSourceBuffer,
addSourceBuffer, addSourceBuffer_, js_removeSourceBuffer,
removeSourceBuffer, js_endOfStream, endOfStr... |
8ae3d9f08867f2a8a4e31370f2fe324971b76ad1a0ebe2e75d357098b75c0a9a | wickedchicken/ocaml_skeleton | tests.ml | open OUnit;;
open Calc;;
let test1 () = assert_equal (Calc.add 0 0) 0;;
let test2 () = assert_equal (Calc.add 1 2) 3;;
(* make sure to add your tests to the suite! *)
let suite =
"suite">:::
["test1">:: test1;
"test2">:: test2;]
;;
let _ =
run_test_tt_main suite
;;
| null | https://raw.githubusercontent.com/wickedchicken/ocaml_skeleton/cea682c7d9dafc54dc4ec269e0dea770e83a0bd3/tests/tests.ml | ocaml | make sure to add your tests to the suite! | open OUnit;;
open Calc;;
let test1 () = assert_equal (Calc.add 0 0) 0;;
let test2 () = assert_equal (Calc.add 1 2) 3;;
let suite =
"suite">:::
["test1">:: test1;
"test2">:: test2;]
;;
let _ =
run_test_tt_main suite
;;
|
4ccb73e2225bac4888f8af19daf8ed4f07b495ea4d1eab2054263909d92389eb | kivra/mechanus_fsm | act_match_par.erl | -module(act_match_par).
-behaviour(mechanus_action).
-export([perform/1]).
-include_lib("mechanus_fsm/include/mechanus.hrl").
perform(_) ->
#result{events=[s2_rand:pick([ #event{name=match_par_yes}
, #event{name=match_par_no}
])]}.
| null | https://raw.githubusercontent.com/kivra/mechanus_fsm/e7dfcd5d4b7d5d1843b746b76f9e11ad9dadaeec/test/act_match_par.erl | erlang | -module(act_match_par).
-behaviour(mechanus_action).
-export([perform/1]).
-include_lib("mechanus_fsm/include/mechanus.hrl").
perform(_) ->
#result{events=[s2_rand:pick([ #event{name=match_par_yes}
, #event{name=match_par_no}
])]}.
| |
eca5a1fee55c9ad32eddabf0273b71bfe07881ee29d79ea411bc99950eec1e97 | spawnfest/eep49ers | ssh_connection_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssh/test/ssh_connection_SUITE.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 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ssh_connection_SUITE).
-include_lib("common_test/include/ct.hrl").
-include("ssh_connect.hrl").
-include("s... |
1675840427632399fb8500b85316819d7fe2ca28e0a699f1026e906a12c8622b | jacekschae/learn-reitit-course-files | core_test.clj | (ns cheffy.core-test
(:require [clojure.test :refer :all]
[cheffy.server :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/22-create-recipe/test/cheffy/core_test.clj | clojure | (ns cheffy.core-test
(:require [clojure.test :refer :all]
[cheffy.server :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
0d01b7c133f0a7db105c4112b378cb684fe1032d6a8325c35116e9c59c72e03c | dmitryvk/sbcl-win32-threads | assertoid.lisp | the ASSERTOID macro , asserting something with added generality
;;;; to help in regression tests
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch afte... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/assertoid.lisp | lisp | to help in regression tests
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
COMPILE/FUNCALL). EXTRA-OPTIMIZATIONS is a list of lists of
ex... | the ASSERTOID macro , asserting something with added generality
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(cl:defpackage "ASSERTOID"
(:use "CL")
(:export "GRAB-CONDITION" "RAISES-ERROR?" "IS" "ASSERTOID"... |
129ed4f2620fda55cfe365a82b3ca51a710fd1d57c28ed557955f006b1195491 | plclub/lngen | CoqLNOutputCombinators.hs | | This module defines a collection of combinators for looping over
nonterminals and metavariables , as well as for assembling output
for Coq .
nonterminals and metavariables, as well as for assembling output
for Coq. -}
module CoqLNOutputCombinators where
import Control.Monad.State
import Text.Print... | null | https://raw.githubusercontent.com/plclub/lngen/a244593025af398f4ce854b48ad7e2cc3435d3bd/src/CoqLNOutputCombinators.hs | haskell | -----------------------------------------------------------------------
* Generating text for lemmas
Flag indicating what sort of @Rewrite@ hint to generate.
Flag indicating whether to generate @hide@ directives for @coqdoc@.
Basic combinator for generating the text of a lemma declaration.
Resolve hint?
Rew... | | This module defines a collection of combinators for looping over
nonterminals and metavariables , as well as for assembling output
for Coq .
nonterminals and metavariables, as well as for assembling output
for Coq. -}
module CoqLNOutputCombinators where
import Control.Monad.State
import Text.Print... |
3ee068e8f84541e1560199181c163c0e8f299bad5bb4a49e0fef7019cd06ed60 | babashka/babashka | core_test.cljc | (ns better-cond.core-test
(:refer-clojure :exclude [cond if-let when-let if-some when-some])
(:require [better-cond.core :refer [cond]]
[clojure.test :refer [deftest are]]))
(deftest better-cond
(are [x y] (= x y)
2 (cond (even? 3) 5
(odd? 3) 2)
2 (cond (even? 3) 5
:el... | null | https://raw.githubusercontent.com/babashka/babashka/3a30a11c1feae0b383399ba85b04347d9b28ed3e/test-resources/lib_tests/better_cond/core_test.cljc | clojure | (ns better-cond.core-test
(:refer-clojure :exclude [cond if-let when-let if-some when-some])
(:require [better-cond.core :refer [cond]]
[clojure.test :refer [deftest are]]))
(deftest better-cond
(are [x y] (= x y)
2 (cond (even? 3) 5
(odd? 3) 2)
2 (cond (even? 3) 5
:el... | |
b2036d1bcc21af7b396c1c2d8f7cb6cca7317f06bda72aceac33eb0033e3e968 | lambe-lang/nethra | term.mli | val free_vars :
string list -> 'a Nethra_lang_ast.Term.t -> ('a option * string) list
| null | https://raw.githubusercontent.com/lambe-lang/nethra/2ac839aa086a683d8e15abfa2f042b53875af36b/lib/nethra/lang/system/s01_normalize/term.mli | ocaml | val free_vars :
string list -> 'a Nethra_lang_ast.Term.t -> ('a option * string) list
| |
4dd9272841466b7709a641684399970cc8609138cfbcd1d7e22db60fe1955deb | brendanhay/gogol | Patch.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-healthcare/gen/Gogol/Healthcare/Projects/Locations/Datasets/ConsentStores/Patch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates the specified consent store.
* Resource
** Constructing a Request
'HealthcareProjectsLocationsDatasetsConsentStoresPatch' request conforms to.
| Updates the specified consent store.
/See:/ 'newHealthcareProjectsLoca... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
1bd0323ec764621974ead20b328485d6cd28be7614c54ef1d2e27787e93e071f | nuty/rapider | info.rkt | #lang info
(define collection 'multi)
(define deps '("rapider-lib" "base"))
(define implies '("rapider-lib"))
(define version "0.1")
(define pkg-desc "web scraping micro-framework")
(define pkg-authors '(rosso)) | null | https://raw.githubusercontent.com/nuty/rapider/f167aa91522788e70affd49e8f350cd055dba3c4/rapider/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("rapider-lib" "base"))
(define implies '("rapider-lib"))
(define version "0.1")
(define pkg-desc "web scraping micro-framework")
(define pkg-authors '(rosso)) | |
dd567ae8d430a12382b82e25be946a1457e6e0aebca0dcf5ed97e2a00f0b20d9 | aristidb/aws | Main.hs | -- ------------------------------------------------------ --
Copyright © 2014 AlephCloud Systems , Inc.
-- ------------------------------------------------------ --
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleContexts #
-- |
-... | null | https://raw.githubusercontent.com/aristidb/aws/a19741b4ee3d0f36f85c9d3680806f75834f636c/tests/Sqs/Main.hs | haskell | ------------------------------------------------------ --
------------------------------------------------------ --
# LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
|
Module: Main
License: BSD3
Stability: experimental
Tests for Haskell SQS bindings
------------------------------------------------------------... | Copyright © 2014 AlephCloud Systems , Inc.
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
Copyright : Copyright © 2014 AlephCloud Systems , Inc.
Maintainer : < >
module Main
( main
) where
import Aws
import Aws.Core
import qualified Aws.Sqs as SQS
import Control.Arr... |
1f5b8419183e360620ddc6056c7ff72f6092da241a99e74954963151ea1cbfe5 | input-output-hk/cardano-wallet-legacy | NonEmptyMap.hs | {-# LANGUAGE DeriveTraversable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
| Maps with at least one key .
module Cardano.Wallet.Kernel.Util.NonEmptyMap
( NonEmptyMap
, fromMap
, toMap
, singleton
, toNEList
, toDescNEList
, findMin
, findMax
) where
import Univ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/Kernel/Util/NonEmptyMap.hs | haskell | # LANGUAGE DeriveTraversable # | # LANGUAGE GeneralizedNewtypeDeriving #
| Maps with at least one key .
module Cardano.Wallet.Kernel.Util.NonEmptyMap
( NonEmptyMap
, fromMap
, toMap
, singleton
, toNEList
, toDescNEList
, findMin
, findMax
) where
import Universum
import Data.Coerce
import ... |
5eac4bd398b3874788b17a1ea06416e11c0984117a183639764d219eeb95c605 | yakaz/yamerl | ex_5.9_directive_indicator.erl | -module('ex_5.9_directive_indicator').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
19,
true,
[],
0,
20,
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_5.9_directive_indicator.erl | erlang | -module('ex_5.9_directive_indicator').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
19,
true,
[],
0,
20,
... | |
001e4df00c28af94a902c9d944b2325f7edc0c6a11f43dfdb4cba84c87a60a3a | Ptival/chick | Test.hs | {-# LANGUAGE OverloadedStrings #-}
module Parsing.Test
( main,
unitTests,
)
where
import Bound . Name
import Data.Maybe (isJust)
import Parsing (parseMaybeTerm)
-- import Term.Term
import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.HUnit (testCase, (@?))
group :: String
group = "Parsing... | null | https://raw.githubusercontent.com/Ptival/chick/7ea82b57021c6c0715aedb441683c5490056f152/backend/test/Parsing/Test.hs | haskell | # LANGUAGE OverloadedStrings #
import Term.Term
testingBinders :: IO ()
testingBinders = do
let Just v = parseMaybeTerm "bar"
let Just ( Pi α τ1 bτ2 ) = parseMaybeTerm " ∀ ( foo : ) , bar "
print bτ2 |
module Parsing.Test
( main,
unitTests,
)
where
import Bound . Name
import Data.Maybe (isJust)
import Parsing (parseMaybeTerm)
import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.HUnit (testCase, (@?))
group :: String
group = "Parsing"
testParses :: String -> Bool
testParses = isJust . p... |
8fd9f87290c647c0a803a1fc74f01eee8122794bc234b865e6122aa6e0ae9adc | zotonic/zotonic | twitter_poller.erl | @author < >
2018 - 2022 Driebit BV
@doc Task queue handler for Twitter polls
%% @todo Split all poll actions into separate jobs
Copyright 2018 - 2022 Driebit BV
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% ... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_twitter/src/support/twitter_poller.erl | erlang | @todo Split all poll actions into separate jobs
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... | @author < >
2018 - 2022 Driebit BV
@doc Task queue handler for Twitter polls
Copyright 2018 - 2022 Driebit BV
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(twitter_poller).
-export([
poll/1,
p... |
9ed8b48ac026783da3bcf084c32be0bafb384ffae0b234eb6755df1baa7a81ec | patperry/hs-linear-algebra | STBase.hs | {-# LANGUAGE Rank2Types, DeriveDataTypeable #-}
{-# OPTIONS_HADDOCK hide #-}
# OPTIONS_GHC -fno - warn - unused - imports #
-----------------------------------------------------------------------------
-- |
Module : Numeric . LinearAlgebra . Vector . STBase
Copyright : Copyright ( c ) 2010 , < >
-- Licens... | null | https://raw.githubusercontent.com/patperry/hs-linear-algebra/887939175e03687b12eabe2fce5904b494242a1a/lib/Numeric/LinearAlgebra/Vector/STBase.hs | haskell | # LANGUAGE Rank2Types, DeriveDataTypeable #
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
License : BSD3
Stability : asinerimental
| Mutable vectors in the 'ST' monad.
| Mutable vectors in the 'IO' monad. Note that 'IO' operations
aren't directly supp... | # OPTIONS_GHC -fno - warn - unused - imports #
Module : Numeric . LinearAlgebra . Vector . STBase
Copyright : Copyright ( c ) 2010 , < >
Maintainer : < >
module Numeric.LinearAlgebra.Vector.STBase (
STVector,
IOVector,
RVector(..),
create,
freeze,
new_,
new,
... |
2d6f70267a7995739f410e401cdaf25f456219b4f4472c0ec6078eb777218ed8 | luminus-framework/guestbook | handler.clj | (ns guestbook.handler
(:require [compojure.core :refer [routes wrap-routes]]
[guestbook.layout :refer [error-page]]
[guestbook.routes.home :refer [home-routes]]
[compojure.route :as route]
[guestbook.env :refer [defaults]]
[mount.core :as mount]
... | null | https://raw.githubusercontent.com/luminus-framework/guestbook/c0e4c05cd6b1a59602c7699266d11f56adbec197/src/clj/guestbook/handler.clj | clojure | (ns guestbook.handler
(:require [compojure.core :refer [routes wrap-routes]]
[guestbook.layout :refer [error-page]]
[guestbook.routes.home :refer [home-routes]]
[compojure.route :as route]
[guestbook.env :refer [defaults]]
[mount.core :as mount]
... | |
9b2fea40639d124326b5ce40831e8b56b0bfa5fcc3f30652bbaa92e07586a279 | cabalism/hpack-dhall | HLint.hs | module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "library"
, "exe"
, "test-suite-hlint"
, "test-suite-golden"
-- WARNING: HLint turns off QuasiQuotes even if turned on in
default - extensions in the c... | null | https://raw.githubusercontent.com/cabalism/hpack-dhall/4a332c9b6366fb2b9c5db969de851590de6366e4/test-suite-hlint/HLint.hs | haskell | WARNING: HLint turns off QuasiQuotes even if turned on in
SEE: | module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "library"
, "exe"
, "test-suite-hlint"
, "test-suite-golden"
default - extensions in the cabal file , # 55 .
, "-XQuasiQuotes"
]
main :: IO ()
mai... |
195949d232e9bcf49ef11e64f232e21769f53179ca7ce82a3557f832df3666a9 | ebresafegaga/tina | eff.ml |
effect Add : int * int - > int
let comp ( ) =
let a = perform @@ Add ( 5 , 6 ) in
let b = perform @@ Add ( 2 , 2 ) in
a + b
let ( ) =
let result =
match comp ( ) with
| v - > v
| effect ( Add ( a , b ) ) k - > continue k ( a+b )
in
print_int result
effect Add : int *... | null | https://raw.githubusercontent.com/ebresafegaga/tina/66fa8daa66c0c6e65260bbea3e8e2ddcc2f9d2d0/eff.ml | ocaml |
effect Add : int * int - > int
let comp ( ) =
let a = perform @@ Add ( 5 , 6 ) in
let b = perform @@ Add ( 2 , 2 ) in
a + b
let ( ) =
let result =
match comp ( ) with
| v - > v
| effect ( Add ( a , b ) ) k - > continue k ( a+b )
in
print_int result
effect Add : int *... | |
5a651f62422cc4f473ab2c6f0397e555f6a95e66b95e8d90af5ac7d279c5af6c | mukul-rathi/bolt | good_simple_capability_classes.ml | open Core
open Print_parsed_ast
let%expect_test "Simple linear class" =
print_parsed_ast
"
class Foo {
capability linear Bar;
var int f : Bar;
int id (int x): Bar { x}
}
void main(){
let x = new Foo();
x.f:= x.id(5)
}
" ;
[%expect
{|
Program
└──Cla... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/parsing/good_simple_capability_classes.ml | ocaml | open Core
open Print_parsed_ast
let%expect_test "Simple linear class" =
print_parsed_ast
"
class Foo {
capability linear Bar;
var int f : Bar;
int id (int x): Bar { x}
}
void main(){
let x = new Foo();
x.f:= x.id(5)
}
" ;
[%expect
{|
Program
└──Cla... | |
fc3bbd7018809c1ae090f15ca86ee3f63032bac32eb17af46970dca4553ebe1c | wellposed/numerical | Mutable.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleCont... | null | https://raw.githubusercontent.com/wellposed/numerical/bf61926a854586b9707b88798887d7a72beeed13/src/Numerical/Array/Mutable.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
,module Numerical.Array.Layout
import qualified Numerical.Array.DenseLayout as L
import GHC.Prim(Constraint)
import Numerical.Array.Range
import Numerical.Array.Locality
For now we're going to just crib the vector... | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE CPP #
# LANGUAGE FunctionalDependencies #
module Numerical.Array.Mutable(
MArray(..)
,Array(..... |
67e75660073f8f314bfe23d4c0250fc8c00e9e3e9403e493b0f53720ebfdb408 | NorfairKing/really-safe-money | Codec.hs | {-# LANGUAGE OverloadedStrings #-}
module Money.Account.Codec where
import Autodocodec
import Money.Account (Account)
import qualified Money.Account as Account
import Text.Read (readMaybe)
-- | A 'JSONCodec' for 'Account' which encodes amounts as a JSON String that contains a decimal number which represents the mini... | null | https://raw.githubusercontent.com/NorfairKing/really-safe-money/ac7319e45fc242547d01f624824958ba217d3e67/really-safe-money-autodocodec/src/Money/Account/Codec.hs | haskell | # LANGUAGE OverloadedStrings #
| A 'JSONCodec' for 'Account' which encodes amounts as a JSON String that contains a decimal number which represents the minimal quantisations of the 'Account'
WARNING: This codec does not protect you against deserialising an account in
a different currency than the account that was s... |
module Money.Account.Codec where
import Autodocodec
import Money.Account (Account)
import qualified Money.Account as Account
import Text.Read (readMaybe)
accountCodecViaString :: JSONCodec Account
accountCodecViaString = bimapCodec f g stringCodec <?> "Account"
where
f :: String -> Either String Account
f ... |
90864033f7ed06dd2f56a2c133d089a3cb074005e7283931be3d0a001f58a775 | patrickgombert/erlang-koans | about_list_comprehensions_test.erl | -module(about_list_comprehensions_test).
-include_lib("eunit/include/eunit.hrl").
representing_a_list_test() ->
?assert(about_list_comprehensions:representing_a_list()).
mapping_a_function_test() ->
?assert(about_list_comprehensions:mapping_a_function()).
applying_a_filter_test() ->
?assert(about_list_co... | null | https://raw.githubusercontent.com/patrickgombert/erlang-koans/d80032d99b6ee3537e585ea02b743fe681fad8cf/test/about_list_comprehensions_test.erl | erlang | -module(about_list_comprehensions_test).
-include_lib("eunit/include/eunit.hrl").
representing_a_list_test() ->
?assert(about_list_comprehensions:representing_a_list()).
mapping_a_function_test() ->
?assert(about_list_comprehensions:mapping_a_function()).
applying_a_filter_test() ->
?assert(about_list_co... | |
46390a27dff9301664ee5593e970acb6323b13e7a5f669a1ba03ddf508fd7212 | avsm/mirage-duniverse | icmpv4_socket.mli | include Mirage_protocols_lwt.ICMPV4
val connect : unit -> t io
val listen : t -> ipaddr -> (buffer -> unit io) -> unit io
(** [listen t addr fn] attempts to create an unprivileged listener on IP address [addr].
When a packet is received, the callback [fn] will be called in a fresh background
thread. The call... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/src/stack-unix/icmpv4_socket.mli | ocaml | * [listen t addr fn] attempts to create an unprivileged listener on IP address [addr].
When a packet is received, the callback [fn] will be called in a fresh background
thread. The callback will be provided a buffer containing an IP datagram with an
ICMP payload inside.
The thread returned by [listen]... | include Mirage_protocols_lwt.ICMPV4
val connect : unit -> t io
val listen : t -> ipaddr -> (buffer -> unit io) -> unit io
|
9f1b9d541c23db3ae507ccbb60b7065b137b098a9b809df41ea5fc93c2a8a972 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PortalCustomerUpdate.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the types generated from the schema PortalCustomerUpdate
module StripeAPI.Types.PortalCustomerUpdate where
impo... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PortalCustomerUpdate.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| allowed_updates: The types of customer updates that are supported. When empty, customers are not updateable.
| enabled: Whether the feature is enabled.
| 'portalCustomerUpdateAllowedUpdates'
| 'portalCustomerUpdateEnabled'
| This case is used if the value en... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema PortalCustomerUpdate
module StripeAPI.Types.PortalCustomerUpdate where
import qualified Control.Monad.Fail
import qualified Data.Aeson
imp... |
f0ca475a27b0197873067c9ce762cfd5d8ea277323a12f49593384c802eb0f25 | facebook/flow | renameMapper.mli |
* 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/b43df23064c535f0d30581d0ae635e5cf172ea75/src/services/references/renameMapper.mli | ocaml |
* 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... | |
c355cdee23d68fe0a3a359c9e4023c986317a68a144a9390cdfaf38d63ea309a | phillord/tawny-owl | repl_test.clj | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2013 , 2017 , Newcastle University
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , eithe... | null | https://raw.githubusercontent.com/phillord/tawny-owl/331e14b838a42adebbd325f80f60830fa0915d76/test/tawny/repl_test.clj | clojure | This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2013 , 2017 , Newcastle University
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Pu... |
8205986af524655046fabed42041fa9cb0e33532e143b9dc40156893da383934 | janestreet/krb | client_cred_cache.ml | open! Core
open Async
open Import
type t =
| Single_cache of Internal.Cred_cache.t
| Double_cache of
{ memory_cache : Internal.Cred_cache.t
; default_cache : Internal.Cred_cache.t
}
[@@deriving sexp_of]
let cred_cache = function
| Single_cache cache -> cache
| Double_cache { memory_cache; de... | null | https://raw.githubusercontent.com/janestreet/krb/96feb2c8721bc0e33e87fd4ed7c0839d3b0f51f8/src/client_cred_cache.ml | ocaml | The [Client_cred_cache] wrapper does nothing. Just call [get_credentials].
Save this ticket into the memory cache | open! Core
open Async
open Import
type t =
| Single_cache of Internal.Cred_cache.t
| Double_cache of
{ memory_cache : Internal.Cred_cache.t
; default_cache : Internal.Cred_cache.t
}
[@@deriving sexp_of]
let cred_cache = function
| Single_cache cache -> cache
| Double_cache { memory_cache; de... |
4d5235420150f2c187a2015ab7ca70a9417802af9270aebb08c4915dd7018160 | yurug/ocaml4.04.0-copatterns | uchar.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/stdlib/uchar.ml | ocaml | ************************************************************************
OCaml
... |
Copyright 2014 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let err_no_pred = "U+0000 has no predecessor"
let err_no_succ = "U+10FFFF has no successor"
let err_not_sv i = ... |
6c176a550b7bad5ad97b32e851d518ae79f6052d3a7296410bf69b37f1dabea6 | LuisThiamNye/chic | layout.clj | Licensed under Apache License 2.0 ( -2.0 )
;; Adapted from
( commit 4deed5195a61511c348c0799db118c5c25d73c04 )
(ns chic.ui.layout
(:require
[taoensso.encore :as enc]
[io.github.humbleui.profile :as profile]
[proteus :refer [let-mutable]]
[chic.util :as util]
[better-cond.core :refer [cond] :renam... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/ui/layout.clj | clojure | Adapted from
(prn left top right bottom cs left' right' top' bottom')
closures do not expose mutable references but rather the object at the time of closure creation
(.close fill-track)
(.close fill-thumb) | Licensed under Apache License 2.0 ( -2.0 )
( commit 4deed5195a61511c348c0799db118c5c25d73c04 )
(ns chic.ui.layout
(:require
[taoensso.encore :as enc]
[io.github.humbleui.profile :as profile]
[proteus :refer [let-mutable]]
[chic.util :as util]
[better-cond.core :refer [cond] :rename {cond cond+}]
... |
4eeea306c62294a306786794f53b6e6407affa3deeec1973853a0419c40920cc | cgrand/enliven | html_test.clj | (ns enliven.html-test
(:use clojure.test)
(:refer-clojure :exclude [class])
(:require
[enliven.html :as h :refer [static-template content class
append prepend style]]
[enliven.html.jsoup :as jsoup]
[enliven.core.locs :as loc]
[enliven.core.lenses :as lens]))
(deftest s... | null | https://raw.githubusercontent.com/cgrand/enliven/f40d91bd3ba1b9523ea743cd541bd98e298e2e62/test/enliven/html_test.clj | clojure | '><&\"'</span>"] | (ns enliven.html-test
(:use clojure.test)
(:refer-clojure :exclude [class])
(:require
[enliven.html :as h :refer [static-template content class
append prepend style]]
[enliven.html.jsoup :as jsoup]
[enliven.core.locs :as loc]
[enliven.core.lenses :as lens]))
(deftest s... |
1bb295ab0f2392384dd45929accaf51a998b0ea5706860bc975ec00b73e4fae5 | muoncore/photon | stream_test.clj | (ns photon.stream-test
(:require [clojure.test :refer :all]
[clojure.core.async :refer [go-loop go <! >! chan buffer <!! close!]]
[ring.mock.request :as mock]
[com.stuartsierra.component :as component]
[photon.core :as core]
[clojure.tools.logging :as log]
... | null | https://raw.githubusercontent.com/muoncore/photon/622e664f8712de32b9a3c6f3ce2d5e445f31d8b4/test/photon/stream_test.clj | clojure | (ns photon.stream-test
(:require [clojure.test :refer :all]
[clojure.core.async :refer [go-loop go <! >! chan buffer <!! close!]]
[ring.mock.request :as mock]
[com.stuartsierra.component :as component]
[photon.core :as core]
[clojure.tools.logging :as log]
... | |
4f1f99bb194383583eb9f08c9dc3157ddd5fb1183e22f0af548df090fce2bc13 | Incubaid/rsync-demo | rsync.ml |
type action =
| Match of int * int
| Miss of Buffer.t
| Start of int
| Stop
let output_action oc = function
| Match (b,e) ->
Io.write_byte oc 1;
Io.write_int oc b;
Io.write_int oc e
| Miss b ->
Io.write_byte oc 2;
Io.write_string oc (Buffer.contents b)
| Start s ->
Io.w... | null | https://raw.githubusercontent.com/Incubaid/rsync-demo/d2587974dbb35e3838679cc5e0d19dabd42a8ac7/rsync.ml | ocaml |
type action =
| Match of int * int
| Miss of Buffer.t
| Start of int
| Stop
let output_action oc = function
| Match (b,e) ->
Io.write_byte oc 1;
Io.write_int oc b;
Io.write_int oc e
| Miss b ->
Io.write_byte oc 2;
Io.write_string oc (Buffer.contents b)
| Start s ->
Io.w... | |
9e38c28113398bd2a62b4934877a91fdface7a49a255b9bcc296712780176ec1 | xtdb/xtdb | tx_test.clj | (ns xtdb.tx-test
(:require [clojure.java.io :as io]
[clojure.string :as string]
[clojure.test :as t]
[clojure.tools.logging.impl :as log-impl]
[xtdb.fixtures.kv :as fkv]
[xtdb.tx.event :as xte]
[xtdb.api :as xt]
[xtdb.bus :as bus]
... | null | https://raw.githubusercontent.com/xtdb/xtdb/32361297e9a15fc569ac694c8bd7951b4f52aa0a/test/test/xtdb/tx_test.clj | clojure | TODO: This is a large, useful, test that exercises many parts, but
might be better split up.
we have to index these manually because the new evict API won't allow docs
with the legacy valid-time range
pairs
[[value vt ?end-vt] ...]
re-instates the previous value at the end of the range
delete a range
override ... | (ns xtdb.tx-test
(:require [clojure.java.io :as io]
[clojure.string :as string]
[clojure.test :as t]
[clojure.tools.logging.impl :as log-impl]
[xtdb.fixtures.kv :as fkv]
[xtdb.tx.event :as xte]
[xtdb.api :as xt]
[xtdb.bus :as bus]
... |
251716181a2d46d67599f0b6d76f9bc1a25bf6f13e4ccac663e7fb3154647300 | dvcrn/proton | core.cljs | (ns proton.layers.lang.ruby.core
(:require [proton.lib.helpers :as helpers])
(:use [proton.layers.base :only [init-layer! get-initial-config get-packages describe-mode register-layer-dependencies]]))
(defmethod init-layer! :lang/ruby
[_ {:keys [config layers]}]
(helpers/console! "init" :lang/ruby)
(register-... | null | https://raw.githubusercontent.com/dvcrn/proton/427d83ffdb61d84a04e3d30032b792a9cfbfc53f/src/cljs/proton/layers/lang/ruby/core.cljs | clojure | (ns proton.layers.lang.ruby.core
(:require [proton.lib.helpers :as helpers])
(:use [proton.layers.base :only [init-layer! get-initial-config get-packages describe-mode register-layer-dependencies]]))
(defmethod init-layer! :lang/ruby
[_ {:keys [config layers]}]
(helpers/console! "init" :lang/ruby)
(register-... | |
59bdb4fc62c62890977b604f5db8fc3ffb53dea7c0d713974e41f91fff46f33c | mfikes/bocko | core.cljc | (ns bocko.core)
(def ^:private ^:const width 40)
(def ^:private ^:const height 40)
(def ^:private ^:const pixel-width 28)
(def ^:private ^:const pixel-height 16)
(def ^:private clear-color :black)
(def ^:private default-color :white)
(def ^:private clear-screen (vec (repeat height (vec (repeat width clear-color)))))
... | null | https://raw.githubusercontent.com/mfikes/bocko/2889b2529d7549d56e1000900d996b47fa2da0eb/src/bocko/core.cljc | clojure | (ns bocko.core)
(def ^:private ^:const width 40)
(def ^:private ^:const height 40)
(def ^:private ^:const pixel-width 28)
(def ^:private ^:const pixel-height 16)
(def ^:private clear-color :black)
(def ^:private default-color :white)
(def ^:private clear-screen (vec (repeat height (vec (repeat width clear-color)))))
... | |
ba04c1ef822689d1fc040f2040723c7aabbec8f22fdd2be88b6acb32060ffa0d | haskell/haskell-language-server | Main.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TypeOperators #-}
module Main ( main ) where
import Data.Either (rights)
import qualified Data.Text as T
import qualified Ide.Plugin.ExplicitFields as... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/b83ceb4f7d63433190a66f7ac4190c722a5b165b/plugins/hls-explicit-record-fields-plugin/test/Main.hs | haskell | # LANGUAGE TypeOperators # | # LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
module Main ( main ) where
import Data.Either (rights)
import qualified Data.Text as T
import qualified Ide.Plugin.ExplicitFields as ExplicitFields
import System... |
f776e00796f95f1bee1a2a1f5456455bc32db4b333759bc9cf8e34c753042bf8 | vii/teepeedee2 | byte-vector.lisp | (in-package #:tpd2.lib)
(defmacro with-pointer-to-vector-data ((ptr lisp-vector) &body body)
(check-symbols ptr)
(once-only (lisp-vector)
(with-unique-names (tmp real-vector offset cffi-ptr)
`(let ((,tmp))
(multiple-value-bind
(,real-vector ,offset)
(array-displacemen... | null | https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/lib/byte-vector.lisp | lisp | could be improved not to duplicate the clauses code and to handle non-constant forms much better | (in-package #:tpd2.lib)
(defmacro with-pointer-to-vector-data ((ptr lisp-vector) &body body)
(check-symbols ptr)
(once-only (lisp-vector)
(with-unique-names (tmp real-vector offset cffi-ptr)
`(let ((,tmp))
(multiple-value-bind
(,real-vector ,offset)
(array-displacemen... |
6dc23b2d2ff860f22fdb3e26d87d17f1079b9f922ff0b4d3ca5933d2b01a9cb5 | jyh/metaprl | filter_summary.mli |
* This module defines an interface for saving information about
* modules . We record information about each module interface ,
* to be used in the definition of the module and in submodules .
*
*
* ----------------------------------------------------------------
*
* This file is part of MetaP... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/filter/base/filter_summary.mli | ocaml | ***********************************************************************
* TYPES *
***********************************************************************
* A module_base contains information about a collection of modules.
* A module_info contains information about a specific module.
*
* Pair it with a ... |
* This module defines an interface for saving information about
* modules . We record information about each module interface ,
* to be used in the definition of the module and in submodules .
*
*
* ----------------------------------------------------------------
*
* This file is part of MetaP... |
1a2a76ca1435ae123619ae6064ba187b6e7531d1255869742893fc4ba62ecfa0 | uw-unsat/leanette-popl22-artifact | validator.rkt | #lang rosette
(require "inst.rkt" "machine.rkt" "memory-rosette.rkt" "queue-rosette.rkt" "special.rkt"
"ops-rosette.rkt")
(provide validator% sym-input get-rand-func)
;; min & max are inclusive.
(define (sym-input #:min [min #f] #:max [max #f] #:const [const #f])
(cond
[const const]
[else
(def... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/greenthumb/validator.rkt | racket | min & max are inclusive.
(current-solver (new kodkod%))
Default: no assumption
(pretty-display "interpret spec")
(pretty-display "done interpret spec")
Adjust machine config. Specifially, increase memory size if necessary.
encoded concrete code
config: machine config
(pretty-display `(state ,state))
(pretty-displa... | #lang rosette
(require "inst.rkt" "machine.rkt" "memory-rosette.rkt" "queue-rosette.rkt" "special.rkt"
"ops-rosette.rkt")
(provide validator% sym-input get-rand-func)
(define (sym-input #:min [min #f] #:max [max #f] #:const [const #f])
(cond
[const const]
[else
(define-symbolic* input integer?... |
9e98caba31d0dff1963a4e3a9b7acdcc9ed73dfed3c09d8db1db558e4f37d24a | pixlsus/registry.gimp.org_static | two-strip-technicolor.scm | ; Two-Strip Technicolor effect
; From www.gimpforphotos.com
Adapted to script - fu by < >
;
;
(define (script-fu-two-strip-technicolor Image Drawable MergeDown Normalize)
(let*
( ; define variables
(RedColor '(255 0 0))
(CyanColor '(0 255 255))
(RedLayer (car (gimp-layer-copy Drawabl... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/two-strip-technicolor.scm | scheme | Two-Strip Technicolor effect
From www.gimpforphotos.com
define variables
Finally register our script with script-fu.
| Adapted to script - fu by < >
(define (script-fu-two-strip-technicolor Image Drawable MergeDown Normalize)
(let*
(RedColor '(255 0 0))
(CyanColor '(0 255 255))
(RedLayer (car (gimp-layer-copy Drawable TRUE)) )
(CyanLayer (car (gimp-layer-copy Drawable TRUE)) )
(RedFill (car (gimp-lay... |
a48590ed6a3d820e0a8280b0124f8bd5d7c3241668ab9f5b61720750207cc5a4 | tweag/asterius | T9810.hs | main = do
NOTE : the ` abs ` is to compensate for WAY = optllvm
having a positive sign for 0/0
putStrLn "## Double ##"
print $ idRational ( 1/0 :: Double)
print $ idRational (-1/0 :: Double)
print $ abs $ idRational ( 0/0 :: Double)
print $ idReencode ( 1/0 :: Double)
print $ idReenco... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/numeric/T9810.hs | haskell | main = do
NOTE : the ` abs ` is to compensate for WAY = optllvm
having a positive sign for 0/0
putStrLn "## Double ##"
print $ idRational ( 1/0 :: Double)
print $ idRational (-1/0 :: Double)
print $ abs $ idRational ( 0/0 :: Double)
print $ idReencode ( 1/0 :: Double)
print $ idReenco... | |
894a42be257de5d639b92014b77f00e30e95603b17ea35f682b8c82deb442e65 | andrewthad/colonnade | Encode.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_HADDOCK not - home #
# OPTIONS_GHC -Wall -fno - warn - unused - imports -fno - ... | null | https://raw.githubusercontent.com/andrewthad/colonnade/3d9fd928bc118fb40075601db4858863bbd5203a/colonnade/src/Colonnade/Encode.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Most users of this library do not need this module. The functions
here are used to build functions that apply a 'Colonnade'
to a collection of values, building a table from them. Ultimately,
to data will have roughly the following type:
@reflex-dom-colonnade@... | # LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_HADDOCK not - home #
# OPTIONS_GHC -Wall -fno - warn - unused - imports -fno - warn - unticked - promoted - constructors #
a ... |
866ce665332bd9b2b2341161ea833dda22ef9e0b567126e006ef437e95128971 | thheller/shadow-cljs | test.clj | (ns shadow.build.test
(:require [shadow.build.api :as build-api]
[shadow.build.node :as node]
[shadow.build.data :as data]))
(defn setup-runner [state test-namespaces]
(let [deps
(into ['cljs.core 'cljs.test] test-namespaces)
test-runner-ns
'shadow.test-runner
... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/build/test.clj | clojure | FIXME: turn this into generic helper functions so they work for browser tests as well
return unmodified state, otherwise previous module information and config is lost
return unmodified state! | (ns shadow.build.test
(:require [shadow.build.api :as build-api]
[shadow.build.node :as node]
[shadow.build.data :as data]))
(defn setup-runner [state test-namespaces]
(let [deps
(into ['cljs.core 'cljs.test] test-namespaces)
test-runner-ns
'shadow.test-runner
... |
3b60b83578185489ce5cc988b1ae6dc06b61437afe195f33403e494129806ae7 | juxt/apex | parameters_test.clj | Copyright © 2020 , JUXT LTD .
(ns juxt.apex.alpha.params.parameters-test
(:require
[clojure.test :refer [deftest is are testing]]
[juxt.apex.alpha.params.parameters
:refer [process-path-parameters
process-query-string]]
[ring.util.codec :as codec]))
;; Formatting
;; Taken from /#paramete... | null | https://raw.githubusercontent.com/juxt/apex/cb4c0016d817ebb03d4f84e572ca71edd84ed79d/modules/params/test/juxt/apex/alpha/params/parameters_test.clj | clojure | Formatting
Taken from /#parameterObject
Simple Scenarios
the structure and syntax of the parameter."
TODO: Test performance with criterium
TODO: Attempt to improve performance
-a-url-query-parameter-valid-if-it-has-no-value
when a parameter appears, even though empty, it is
considered to indiciate 'true'
any ... | Copyright © 2020 , JUXT LTD .
(ns juxt.apex.alpha.params.parameters-test
(:require
[clojure.test :refer [deftest is are testing]]
[juxt.apex.alpha.params.parameters
:refer [process-path-parameters
process-query-string]]
[ring.util.codec :as codec]))
(def style-test-data
[{:style "matri... |
32c429a4580a256472a6b3aff761944d021f7aae832075a5651b85f7f497c4fb | janestreet/memtrace_viewer_with_deps | keyboard_event_handler.mli | open Virtual_dom
(** A [Keyboard_event_handler.t] is a collections of actions (commands and disabled keys)
that can be used to handle keyboard events and to produce help text.
*)
module Condition : sig
* A [ Condition.t ] is a condition based on a keyboard event ( which importantly includes
the event 's f... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incr_dom_keyboard/src/keyboard_event_handler.mli | ocaml | * A [Keyboard_event_handler.t] is a collections of actions (commands and disabled keys)
that can be used to handle keyboard events and to produce help text.
* [has_input_target] returns true if the event target is an input
* [has_text_input_target] returns true if the event target is a text input or textarea
... | open Virtual_dom
module Condition : sig
* A [ Condition.t ] is a condition based on a keyboard event ( which importantly includes
the event 's focus ) . This is intended to be used in keyboard event handlers that
look at the keyboard event to determine whether or not to take a certain action .
... |
c172152c16e506c56e36a3252db306e40e1112c44b8b146b3209f70b20c76287 | sids/nerchuko | train.clj | (ns nerchuko.examples.spambase.train
(:gen-class)
(:use nerchuko.examples.spambase.helpers)
(:use [nerchuko helpers classification feature-selection])
(:use clojure.contrib.command-line))
(defn -main [& args]
(with-command-line (if (seq args) args ["--help"])
"Build a model from the spambase.data file.
... | null | https://raw.githubusercontent.com/sids/nerchuko/8aa56497dd8e93e868713dd542667a56215522fb/src/nerchuko/examples/spambase/train.clj | clojure | each of them is treated | (ns nerchuko.examples.spambase.train
(:gen-class)
(:use nerchuko.examples.spambase.helpers)
(:use [nerchuko helpers classification feature-selection])
(:use clojure.contrib.command-line))
(defn -main [& args]
(with-command-line (if (seq args) args ["--help"])
"Build a model from the spambase.data file.
... |
31fe4ce76dc902162ff6260006ff54a71569ef5d2ee6eb63e1b2279ccc6119c0 | ocaml/dune | string.mli | type t = string
include module type of struct
include StringLabels
end
with type t := t
val equal : t -> t -> bool
val compare : t -> t -> Ordering.t
val hash : t -> int
val to_dyn : t -> Dyn.t
val break : t -> pos:int -> t * t
val is_empty : t -> bool
val of_list : char list -> t
val is_prefix : t -> ... | null | https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/string.mli | ocaml | * These only change ASCII characters
* Return the length of the longest string in the list
CR-someday aalekseyev: this function is not great: barely anything "needs
escaping according to OCaml lexing conventions", so the condition for
whether to add the quote characters ends up being quite arbitrary.
* Prod... | type t = string
include module type of struct
include StringLabels
end
with type t := t
val equal : t -> t -> bool
val compare : t -> t -> Ordering.t
val hash : t -> int
val to_dyn : t -> Dyn.t
val break : t -> pos:int -> t * t
val is_empty : t -> bool
val of_list : char list -> t
val is_prefix : t -> ... |
95736310d5f0669aacd465ecc744fbecef2f6f24110fa591ba194cca4fa80be7 | janestreet/async_kernel | execution_context.mli | * The context in which an Async job runs .
open! Core
open! Import
type t = Types.Execution_context.t =
{ monitor : Monitor0.t
; priority : Priority.t
; local_storage : Univ_map.t
; backtrace_history : Backtrace.t list
}
[@@deriving fields, sexp_of]
include Invariant.S with type t := t
val main : t
val c... | null | https://raw.githubusercontent.com/janestreet/async_kernel/9575c63faac6c2d6af20f0f21ec535401f310296/src/execution_context.mli | ocaml | * The context in which an Async job runs .
open! Core
open! Import
type t = Types.Execution_context.t =
{ monitor : Monitor0.t
; priority : Priority.t
; local_storage : Univ_map.t
; backtrace_history : Backtrace.t list
}
[@@deriving fields, sexp_of]
include Invariant.S with type t := t
val main : t
val c... | |
3190205053b6063d32da6580446faeca8e49107ea84517bde749ebcd56678978 | MLstate/opalang | opaCheck.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opalang/opaCheck.ml | ocaml | ************************************************************
Before adding a function here please READ MLI INSTRUCTIONS
************************************************************ |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
3579ae2e07f725e81c70482d54f4bd35bf175570d0ced60dd4228ab787967671 | kazu-yamamoto/http2 | ServerSpec.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module ServerSpec (spec) where
import Control.Concurrent
import qualified Control.Exception as E
import Data.ByteString.Builder (byteString)
import Network.HTTP.Types
import Network.Run.TCP
import System.Exit
import System.Process.Typed
import Test.Hspe... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/test2/ServerSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns # |
module ServerSpec (spec) where
import Control.Concurrent
import qualified Control.Exception as E
import Data.ByteString.Builder (byteString)
import Network.HTTP.Types
import Network.Run.TCP
import System.Exit
import System.Process.Typed
import Test.Hspec
import Network.HTTP2.Server
port :: String
port = "8080"
hos... |
cd00ef4726c73fe1455cfc8c36be813c0a39e6969a08a50b92ec21994d1a53fa | cedlemo/OCaml-GObject-Introspection | Value_info.ml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection 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 o... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/lib/Value_info.ml | ocaml | TODO : check that the info can be casted to a valueinfo ? |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection 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 o... |
56a7578a6e9542dbe81055b5672a57a6503cb38b8fbf533f0022721cb7f0398d | HaskellEmbedded/data-stm32 | Family.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Data.STM32.Family where
import GHC.Generics (Generic)
import Text.Read (readMaybe)
import Data.Serialize
import Data.Attoparsec.ByteString.Char8
import Data.Maybe
import Data.Foldable
data Family =
F0
| F1
| F2
... | null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/src/Data/STM32/Family.hs | haskell | # LANGUAGE OverloadedStrings #
L4S L4R
convert STM32xyz to Family | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module Data.STM32.Family where
import GHC.Generics (Generic)
import Text.Read (readMaybe)
import Data.Serialize
import Data.Attoparsec.ByteString.Char8
import Data.Maybe
import Data.Foldable
data Family =
F0
| F1
| F2
| F3
| F4
| F7
| H7
| L0
... |
2c7b3875adf30ac880ee035a67ceda62966d91d09089667d65a40cb97980301e | bvaugon/ocapic | stacks.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/goblet/stacks.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Types
let nb = 3
type t = goblet list array
let create color =
let stk = [ { color = color ; size = Big };
{ color = color ; size = Medium };
{... |
99836427edce17815374dfb7822bd9d1a4e0077f1859b5d4caf54355cab4449e | AeneasVerif/aeneas | InterpreterLoops.ml | module T = Types
module PV = PrimitiveValues
module V = Values
module E = Expressions
module C = Contexts
module Subst = Substitute
module A = LlbcAst
module L = Logging
open ValuesUtils
module Inv = Invariants
module S = SynthesizeSymbolic
open Cps
open InterpreterUtils
open InterpreterLoopsCore
open InterpreterLoopsM... | null | https://raw.githubusercontent.com/AeneasVerif/aeneas/1535b37ae84ddb1d2679c19b8fcc734351e5ce5d/compiler/InterpreterLoops.ml | ocaml | * The local logger
* Evaluate a loop in concrete mode
We need a loop id for the [LoopReturn]. In practice it won't be used
(it is useful only for the symbolic execution
Break out of the loop by calling the continuation
Re-evaluate the loop body
Continue to an outer loop
We can't get there: this is only ... | module T = Types
module PV = PrimitiveValues
module V = Values
module E = Expressions
module C = Contexts
module Subst = Substitute
module A = LlbcAst
module L = Logging
open ValuesUtils
module Inv = Invariants
module S = SynthesizeSymbolic
open Cps
open InterpreterUtils
open InterpreterLoopsCore
open InterpreterLoopsM... |
3d5ce68030e9669cb4fe9a0b7fd46ab5f0971d3033a08b9a40e90b3eec208ba3 | msfm2018/Online-Service | client_handle.erl | -module(client_handle).
-behaviour(gen_server).
-include("common.hrl").
-compile(export_all).
-define(SERVER, ?MODULE).
-record(state, {
is_websocket = false,
websocket_binary = <<>>,
data_list = [],
call_back,
socket
}).
-define(WEBSOCKET_CONNECT_STATE, 1).
-define(WEBSOCKET_CONNECTED_STATE, 2).
start(O... | null | https://raw.githubusercontent.com/msfm2018/Online-Service/281c2db795f09c7e4dc6768d08d35bbe83350670/src/core/tcp/client_handle.erl | erlang | 发送文本给Client
主要面向用户,转发时调用其他socket发送,出现发送失败等,繁忙所以马上stop
client handle
websocket
wc handle
handle wc data
===================================================================
===================================================================
websocket 先处理第一条数据 发握手
utils:log(["Callback",CallBack]),
[javascript... | -module(client_handle).
-behaviour(gen_server).
-include("common.hrl").
-compile(export_all).
-define(SERVER, ?MODULE).
-record(state, {
is_websocket = false,
websocket_binary = <<>>,
data_list = [],
call_back,
socket
}).
-define(WEBSOCKET_CONNECT_STATE, 1).
-define(WEBSOCKET_CONNECTED_STATE, 2).
start(O... |
6bae4b4abd115c9c6f474584a74f06d49d65e3742f3270dda63931ae0051bed0 | binsec/haunted | rel_expr.mli | (** Module representing relational expressions
[Rel e e'] is the type for relational expression
[Simple e] is the type for non-relational expressions
*)
type proj_t = Left | Right | Value
type 'a relational = Rel of 'a * 'a | Simple of 'a
exception Should_not_be_relational of string
type 'a t
type rel_memory ... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/relse/rel_expr.mli | ocaml | * Module representing relational expressions
[Rel e e'] is the type for relational expression
[Simple e] is the type for non-relational expressions
* [is_relational expr] Returns [true] if [expr] is a relational expression and
[false] if it is a simple expression
* [deduplicate r_expr] turns the relationa... | type proj_t = Left | Right | Value
type 'a relational = Rel of 'a * 'a | Simple of 'a
exception Should_not_be_relational of string
type 'a t
type rel_memory = Formula.ax_term t
type rel_pc = Formula.bl_term t
type rel_bv = Formula.bv_term t
val is_relational : 'a t -> bool
val get_value : 'a t -> 'a relational
val ... |
e9d2ecc61f1a87b53cb0bea77d4bb11dfa3c6f8aeac51dc955c5c358d1daa7ae | ds-wizard/engine-backend | Aeson.hs | module Shared.Util.Aeson where
import Data.Aeson
import qualified Data.Aeson.KeyMap as KM
import Data.String (fromString)
import qualified Data.Text as T
import GHC.Generics
import Shared.Util.Reflection (HasConstructor, constructorName)
import Shared.Util.String (stripSuffixIfExists)
jsonOptions :: Options
jsonOpti... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/8f2fadd4a0dae84eb1f5f09230c4c5b58ac3e18d/engine-shared/src/Shared/Util/Aeson.hs | haskell | ---------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------- | module Shared.Util.Aeson where
import Data.Aeson
import qualified Data.Aeson.KeyMap as KM
import Data.String (fromString)
import qualified Data.Text as T
import GHC.Generics
import Shared.Util.Reflection (HasConstructor, constructorName)
import Shared.Util.String (stripSuffixIfExists)
jsonOptions :: Options
jsonOpti... |
c3308a528653c0cacd1790bda6d5e2144860edef36d951acfb46eeac8bbea2a9 | martinsumner/leveled | leveled_runner.erl | %% -------- RUNNER ---------
%%
%% A bookie's runner would traditionally allow remote actors to place bets
%% via the runner. In this case the runner will allow a remote actor to
%% have query access to the ledger or journal. Runners provide a snapshot of
%% the book for querying the backend.
%%
Runners impleme... | null | https://raw.githubusercontent.com/martinsumner/leveled/a033e280e67931582cc9625993268db126abb4ff/src/leveled_runner.erl | erlang | -------- RUNNER ---------
A bookie's runner would traditionally allow remote actors to place bets
via the runner. In this case the runner will allow a remote actor to
have query access to the ledger or journal. Runners provide a snapshot of
the book for querying the backend.
{async, Runner}. Runner is ju... | Runners implement the { async , Folder } within backends - returning an
Runner may make the snapshot at the point it is called , or the snapshot can
be generated and encapsulated within the function ( known as ) .
Runners which view only the Ledger ( the view of the state ) may
have a CheckPresence bool... |
b79390be5bade1109d90ddaf42ad7ff270904b6e57d3b66ed1c3c24d0f1c193b | TGOlson/blockchain | Mining.hs | module Integration.Mining
( mineTestChain
) where
import qualified Control.Concurrent.Async as Async
import qualified Control.Concurrent.MVar as MVar
import Control.Monad (forM, void)
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy as Lazy
impo... | null | https://raw.githubusercontent.com/TGOlson/blockchain/da53ad888589b5a2f3fd2c53c33a399fefb48ab1/test/Integration/Mining.hs | haskell | TODO: bad interface to find diff. Exported interface should just take blockchain. | module Integration.Mining
( mineTestChain
) where
import qualified Control.Concurrent.Async as Async
import qualified Control.Concurrent.MVar as MVar
import Control.Monad (forM, void)
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy as Lazy
impo... |
87e130dea91113c9214a3ca1ef005570390b5557190afaf2260ac16154e5482b | openweb-nl/kafka-graphql-examples | viz.clj | (ns nl.openweb.graphql-endpoint.viz
(:require [nl.openweb.graphql-endpoint.system :as system]
[com.walmartlabs.system-viz :refer [visualize-system]]))
(defn -main
[]
(visualize-system (system/new-system) {:format :png})
(System/exit 0))
| null | https://raw.githubusercontent.com/openweb-nl/kafka-graphql-examples/a404a265b5b0f13968a24d00c6494981063937fe/graphql-endpoint/src/nl/openweb/graphql_endpoint/viz.clj | clojure | (ns nl.openweb.graphql-endpoint.viz
(:require [nl.openweb.graphql-endpoint.system :as system]
[com.walmartlabs.system-viz :refer [visualize-system]]))
(defn -main
[]
(visualize-system (system/new-system) {:format :png})
(System/exit 0))
| |
80f0797189669fef377c35ae2be504d6a0b9515317db3e00824e50f86d18fe3e | mtgred/netrunner | deck_status.cljs | (ns nr.deck-status
(:require
[jinteki.validator :refer [calculate-deck-status trusted-deck-status]]
[nr.translations :refer [tr tr-format]]
[nr.utils :refer [slug->format]]
[clojure.string :as str]))
(defn- build-deck-status-label [deck-status violation-details?]
[:div.status-tooltip.blue-shade
... | null | https://raw.githubusercontent.com/mtgred/netrunner/b3e1a5574dd73063116a11d50d740a79b5717d00/src/cljs/nr/deck_status.cljs | clojure | (ns nr.deck-status
(:require
[jinteki.validator :refer [calculate-deck-status trusted-deck-status]]
[nr.translations :refer [tr tr-format]]
[nr.utils :refer [slug->format]]
[clojure.string :as str]))
(defn- build-deck-status-label [deck-status violation-details?]
[:div.status-tooltip.blue-shade
... | |
00da6da6a3748525d81f14f87f530fb4672a972013963ba4e1672502ce2897ab | K1D77A/validate-list | package.lisp | (defpackage #:validate-list/tests
(:use #:cl #:validate-list #:lisp-unit)
(:nicknames #:v-l-tests))
| null | https://raw.githubusercontent.com/K1D77A/validate-list/223b89469c49b382cfabf2add9c27951728c81c0/tests/package.lisp | lisp | (defpackage #:validate-list/tests
(:use #:cl #:validate-list #:lisp-unit)
(:nicknames #:v-l-tests))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.