_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 |
|---|---|---|---|---|---|---|---|---|
a799626dee7be3976bdb5e0cac4da50ee79b79d9cf1091e8eb97806346ec068b | babashka/nbb | example.cljs | ;; This script demonstrates use of tinyhttp with a logging middleware
(ns example
(:require ["@tinyhttp/app" :as app]
["@tinyhttp/logger" :as logger]))
(def app (app/App.))
(-> app
(.use (logger/logger))
(.get "/" (fn [_req res]
(.send res "<h1>Hello world</h1>")))
(.get "/pa... | null | https://raw.githubusercontent.com/babashka/nbb/10ea0d40c3e0963888683a4935c94eb02a643a93/examples/tinyhttp/example.cljs | clojure | This script demonstrates use of tinyhttp with a logging middleware | (ns example
(:require ["@tinyhttp/app" :as app]
["@tinyhttp/logger" :as logger]))
(def app (app/App.))
(-> app
(.use (logger/logger))
(.get "/" (fn [_req res]
(.send res "<h1>Hello world</h1>")))
(.get "/page/:page/" (fn [req res]
(-> res
... |
e0e29da98b82423394e03728eeb3976de8ae76e766edddd416d726d224118a1c | esl/MongooseIM | accounts_SUITE.erl | -module(accounts_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("exml/include/exml.hrl").
-import(distributed_helper, ... | null | https://raw.githubusercontent.com/esl/MongooseIM/ed87b58fa159af1fb613d76e3c26ea085aad16f5/big_tests/tests/accounts_SUITE.erl | erlang | --------------------------------------------------------------------
Suite configuration
--------------------------------------------------------------------
seconds
--------------------------------------------------------------------
--------------------------------------------------------------------
Use a configu... | -module(accounts_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("exml/include/exml.hrl").
-import(distributed_helper, ... |
f3ae1bb31e8976c920a132335476bc182abd79c6f8e84c7f3e8f6eba4e7734f3 | imandra-ai/ocaml-opentelemetry | gen.ml | let atomic_before_412 =
{|
type 'a t = {mutable x: 'a}
let[@inline] make x = {x}
let[@inline] get {x} = x
let[@inline] set r x = r.x <- x
let[@inline never] exchange r x =
(* critical section *)
let y = r.x in
r.x <- x;
(* end critical section *)
y
let[@inline never] compare_and_set ... | null | https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/0fb530125a3ce4e7e1d23ddadb40ca25e84b27a1/src/atomic/gen.ml | ocaml | critical section
end critical section
critical section | let atomic_before_412 =
{|
type 'a t = {mutable x: 'a}
let[@inline] make x = {x}
let[@inline] get {x} = x
let[@inline] set r x = r.x <- x
let[@inline never] exchange r x =
let y = r.x in
r.x <- x;
y
let[@inline never] compare_and_set r seen v =
if r.x == seen then (
r.x <- v;
... |
5d46b9dd1a535ac525dd2859247a953851d688343d8b7323f3d383db99648905 | Chris00/fftw-ocaml | fftw3_utils.ml | open Printf
* { 2 Helper funs }
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
***********************************************************************)
(* specialized for speed *)
let min i j = if (i:int) < j then i else ... | null | https://raw.githubusercontent.com/Chris00/fftw-ocaml/0474c42f38d5f375b6187dc089b34c56ec0e76dd/src/fftw3_utils.ml | ocaml | specialized for speed
* Return a string showing the content of the array
Create matrix with default value
This module perform some checks on the dimensions and howmany
specifications that depend on the layout but not on the
precision.
The arrays of dimensions are always arranged from the slow
varyin... | open Printf
* { 2 Helper funs }
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
***********************************************************************)
let min i j = if (i:int) < j then i else j
module List =
struct
in... |
8938055dbc6dfa8c9405fbee42df1e4b1c0bff5a91cfdbe17f3ec9097cc1a6dc | danhper/evm-analyzer | tracer.ml | open Core
open TracerTypes
type t = {
contract_address: String.t;
tx_hash: String.t;
block_number: Int.t;
taggers: Tagger.t List.t List.t;
}
let create ~block_number ~tx_hash ~taggers contract_address =
{ contract_address; taggers; tx_hash; block_number; }
let log ~debug ~env trace =
let open Trace in
... | null | https://raw.githubusercontent.com/danhper/evm-analyzer/9fb1cf6dc743c2f779973b2f0892047ebbd4e5fd/src/tracer.ml | ocaml | open Core
open TracerTypes
type t = {
contract_address: String.t;
tx_hash: String.t;
block_number: Int.t;
taggers: Tagger.t List.t List.t;
}
let create ~block_number ~tx_hash ~taggers contract_address =
{ contract_address; taggers; tx_hash; block_number; }
let log ~debug ~env trace =
let open Trace in
... | |
e2547ea7c71302a9e04374f111736232b8161dde1c13c495847360b02f30e95d | flambard/CLERIC | handshake-tests.lisp | (in-package :cleric-test)
(in-suite handshake)
(test name-message
(is (typep
(with-input-from-sequence
(in (with-output-to-sequence (out)
(write-message out (make-name-message 5 0 ""))))
(read-name-message in))
'name))
)
(test status-message
(is (typep
... | null | https://raw.githubusercontent.com/flambard/CLERIC/12bc9a37cd273c48f670c68e91bf4d4db3441ecb/test/handshake-tests.lisp | lisp | (in-package :cleric-test)
(in-suite handshake)
(test name-message
(is (typep
(with-input-from-sequence
(in (with-output-to-sequence (out)
(write-message out (make-name-message 5 0 ""))))
(read-name-message in))
'name))
)
(test status-message
(is (typep
... | |
f594e8e776141c7e2c770fa33dfaeb8eb3e4012e56b44b2fea17aa6b8a1b75f7 | snoyberg/githash | Example.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Main where
import Prelude (String, concat, error, otherwise, show)
import GitHash
panic :: String -> a
panic msg = error panicMsg
where panicMsg =
concat [ "[panic ", giBranch gi, "@", giHash gi
, " (", giCommitDate gi, ")"... | null | https://raw.githubusercontent.com/snoyberg/githash/bec020faa0d5219a7b75b8183c28c2d34497e57f/Example.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Main where
import Prelude (String, concat, error, otherwise, show)
import GitHash
panic :: String -> a
panic msg = error panicMsg
where panicMsg =
concat [ "[panic ", giBranch gi, "@", giHash gi
, " (", giCommitDate gi, ")"... | |
575c9b29741fa87a100fa5ac81d0352dc5e6b4d84dd272b5c31e68a2aae10b4b | sgbj/MaximaSharp | gderiv.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.221 2010/05/26 19:25:52 "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.204 2010/02/23 05:21:30 "
" f2cl6.l , v 1.48 2008/08/... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/colnew/lisp/gderiv.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.221 2010/05/26 19:25:52 "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.204 2010/02/23 05:21:30 "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rtoy Exp $ "
" ... |
e257acf918b82f4c4003bf5cd8c2a78409d9c1af389cc07966f345b60ed33efa | tolysz/ghcjs-stack | Types.hs | # LANGUAGE DeriveGeneric #
-----------------------------------------------------------------------------
-- |
Module : Distribution . Client . Init . Types
Copyright : ( c ) , 2009
-- License : BSD-like
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Some ... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/Distribution/Client/Init/Types.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-like
Maintainer :
Stability : provisional
Portability : portable
Some types used by the 'cabal init' command.
---------------------------------------------------------------------------
portions of a .cab... | # LANGUAGE DeriveGeneric #
Module : Distribution . Client . Init . Types
Copyright : ( c ) , 2009
module Distribution.Client.Init.Types where
import Distribution.Simple.Setup
( Flag(..) )
import Distribution.Compat.Semigroup
import Distribution.Version
import Distribution.Verbosity
import qual... |
cd46ee2fe3c4710f5ca93f4b04c7b5a5cc547004d623debe1824faf63bce75f0 | ocaml/ocaml | test.ml | (* TEST
modules = "stubs.c"
include runtime_events
*)
external start_runtime_events : unit -> unit = "start_runtime_events"
external get_event_counts : unit -> (int * int) = "get_event_counts"
let () =
start_runtime_events ();
for a = 0 to 2 do
ignore(Sys.opaque_identity(ref 42));
Gc.compact (... | null | https://raw.githubusercontent.com/ocaml/ocaml/ab544472480452e600eebf1f072970d5b71d7fb2/testsuite/tests/lib-runtime-events/test.ml | ocaml | TEST
modules = "stubs.c"
include runtime_events
Now test we can pause/resume while we're doing things |
external start_runtime_events : unit -> unit = "start_runtime_events"
external get_event_counts : unit -> (int * int) = "get_event_counts"
let () =
start_runtime_events ();
for a = 0 to 2 do
ignore(Sys.opaque_identity(ref 42));
Gc.compact ()
done;
let (minors, majors) = get_event_count... |
04473e9148cae29531b889577716032c0a2fa07e42b3aab7b3472e48dddfe9c7 | ferd/erlang-history | group_history.erl | -module(group_history).
-export([load/0, add/1]).
-define(DEFAULT_HIST_FILE, ".erlang-hist").
-define(DEFAULT_HIST_SIZE, 500).
-define(TABLE, shell_group_hist).
-define(DEFAULT_AUTOSAVE, 500).
-define(DEFAULT_DROP, []).
%% History is node-based, but history of many jobs on a single node
%% are mixed in together.
-rec... | null | https://raw.githubusercontent.com/ferd/erlang-history/3d74dbc36f942dec3981e44a39454257ada71d37/src/3.2/group_history.erl | erlang | History is node-based, but history of many jobs on a single node
are mixed in together.
PUBLIC
Loads the shell history from memory. This function should only be
called from group:server/3 to inject itself in the previous commands
stack.
We cannot repair the table automatically. The current process
is handling o... | -module(group_history).
-export([load/0, add/1]).
-define(DEFAULT_HIST_FILE, ".erlang-hist").
-define(DEFAULT_HIST_SIZE, 500).
-define(TABLE, shell_group_hist).
-define(DEFAULT_AUTOSAVE, 500).
-define(DEFAULT_DROP, []).
-record(opts, {hist=true, hist_file, hist_size}).
load() ->
case opts() of
#opts{hist... |
ccd90d82d9f5113f385f2a643aa2315b16740a29a1119a511bcac43367c02ca3 | abooij/sudbury | Wayland.hs |
Copyright © 2014 Intel Corporation
Copyright © 2016 - 2017 to use , copy , modify , distribute , and sell this software and its
documentation for any purpose is hereby granted without fee , provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permissio... | null | https://raw.githubusercontent.com/abooij/sudbury/a9ab559728487d78469db73ecf516d145b6c21ec/Graphics/Sudbury/Socket/Wayland.hs | haskell | # LANGUAGE CPP #
fd
bufsize
fds
n_fds
bytes sent
fd
bufsize
fds
fdbufsize
n_fds
bytes received |
Copyright © 2014 Intel Corporation
Copyright © 2016 - 2017 to use , copy , modify , distribute , and sell this software and its
documentation for any purpose is hereby granted without fee , provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permissio... |
358569cafdcfba4671e58cf8aeadca13b53279cfac7536f07d863e542473b019 | votinginfoproject/data-processor | election_administration_test.clj | (ns vip.data-processor.validation.v5.election-administration-test
(:require [vip.data-processor.validation.v5.election-administration :as v5.election-admin]
[clojure.test :refer :all]
[vip.data-processor.test-helpers :refer :all]
[vip.data-processor.db.postgres :as psql]
... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/election_administration_test.clj | clojure | (ns vip.data-processor.validation.v5.election-administration-test
(:require [vip.data-processor.validation.v5.election-administration :as v5.election-admin]
[clojure.test :refer :all]
[vip.data-processor.test-helpers :refer :all]
[vip.data-processor.db.postgres :as psql]
... | |
02f8a7e86477fc16a0cd3f7088536a45928ba471ae2eba4bda9d99fb563440ed | ucsd-progsys/dsolve | array_size.ml | let x y = size y in x [|1;2;3|];;
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/array_size.ml | ocaml | let x y = size y in x [|1;2;3|];;
| |
0a6887e16a06726233e6c5414d4ff2e587c187dc0dc3b1e7d1781ebfe3cb31f4 | day8/re-frame-tracer | core.cljs | (ns re-frame-tracer.core
(:require [clojure.walk :refer [prewalk walk]]
[clairvoyant.core :refer [ITraceEnter ITraceError ITraceExit]]))
(defn tracer
[& {:keys [color tag] :as options}]
(let [pr-val (fn pr-val [x] x)
log-binding (fn [form init]
(.groupCollapsed js/consol... | null | https://raw.githubusercontent.com/day8/re-frame-tracer/e3314c3fd3f90aca10ea1a357523942791f7c2e3/src/re_frame_tracer/core.cljs | clojure | (ns re-frame-tracer.core
(:require [clojure.walk :refer [prewalk walk]]
[clairvoyant.core :refer [ITraceEnter ITraceError ITraceExit]]))
(defn tracer
[& {:keys [color tag] :as options}]
(let [pr-val (fn pr-val [x] x)
log-binding (fn [form init]
(.groupCollapsed js/consol... | |
b795a92726df97258b073e0a9fcfa283b19bc8390618abca8cc40639f379c59f | tweag/ormolu | dollar-chains-2.hs | module Main where
foo =
bar $
do 1
$
quux
abc =
a1 $
a2 $ do
3
cde =
b1
$ b2
$ b3 $ \c ->
putStrLn "foo"
| null | https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/infix/dollar-chains-2.hs | haskell | module Main where
foo =
bar $
do 1
$
quux
abc =
a1 $
a2 $ do
3
cde =
b1
$ b2
$ b3 $ \c ->
putStrLn "foo"
| |
865f64668f862fd20a2eb1b7728c0eb717bf49dbb81507481676b48563374604 | YoshikuniJujo/test_haskell | TryClassSwizzle.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances #
{-# LANGUAGE StandaloneDeriving, DeriveGeneric #-}
# OPTIONS_GHC -Wall -fno - warn - tabs -fno - warn - orphans #
module TryClassSwizzle where
import qualified... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/9e7c265cb7f1d6b71e17d5ee87fd5d491070b959/features/generics/try-generics/src/TryClassSwizzle.hs | haskell | # LANGUAGE StandaloneDeriving, DeriveGeneric # | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wall -fno - warn - tabs -fno - warn - orphans #
module TryClassSwizzle where
import qualified GHC.Generics as G
import Data.List
import Swizzle... |
ce19c0e757237f2d09b3362608769d019403b39e3a72679456a9d985092ff2c4 | google/lisp-koans | contemplate.lisp | Copyright 2013 Google 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, software
distrib... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/contemplate.lisp | lisp |
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... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :cl-user)
Though Clozure / CCL runs lisp - koans on the command line using
meditate on the koans within the CCL IDE .
( The : hemlock is used to distiguish between ccl commandline and the IDE )
#+(and... |
783c22bc05e25543bec3ee88288795e63bd1af127d95ae89b928458b67c0b370 | fakedata-haskell/fakedata | Zelda.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Faker.Game.Zelda where
import Data.Text
import Faker
import Faker.Internal
import Faker.Provider.Zelda
import Faker.TH
$(generateFakeField "zelda" "games")
$(generateFakeField "zelda" "characters")
$(generateFakeField "zelda" "locations")
$(ge... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Game/Zelda.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Game.Zelda where
import Data.Text
import Faker
import Faker.Internal
import Faker.Provider.Zelda
import Faker.TH
$(generateFakeField "zelda" "games")
$(generateFakeField "zelda" "characters")
$(generateFakeField "zelda" "locations")
$(generateFakeField "zelda" "items")
|
54f55abb6adb5c0de4c9d22067805d5c67d7a696f1f520177d83376c263ab48d | GaloisInc/daedalus | GUID.hs | # Language GeneralizedNewtypeDeriving , DeriveGeneric , DeriveLift #
module Daedalus.GUID (GUID
, invalidGUID
, firstValidGUID
, succGUID
, getNextGUID
, mkGUIDState
, mkGUIDState'
... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/d02dda2e149ffa0e7bcca59cddc4991b875006e4/daedalus-utils/src/Daedalus/GUID.hs | haskell | Used before we have resolved scope | # Language GeneralizedNewtypeDeriving , DeriveGeneric , DeriveLift #
module Daedalus.GUID (GUID
, invalidGUID
, firstValidGUID
, succGUID
, getNextGUID
, mkGUIDState
, mkGUIDState'
... |
b31da05eb5266718b1646d84a2534bdebdf8145fbc8fc4fd1cc3297015e43212 | rkallos/canal | canal_utils.erl | -module(canal_utils).
-include("include/canal_internal.hrl").
-export([
error_msg/1,
error_msg/2,
getopt/1,
info_msg/1,
info_msg/2,
warning_msg/1,
warning_msg/2
]).
-spec error_msg(string()) -> ok.
error_msg(Msg) ->
error_logger:error_msg(Msg).
-spec error_msg(string(), list()) -> ... | null | https://raw.githubusercontent.com/rkallos/canal/b1456e81615e986b04fd6727302972c55e10ad80/src/canal_utils.erl | erlang | private | -module(canal_utils).
-include("include/canal_internal.hrl").
-export([
error_msg/1,
error_msg/2,
getopt/1,
info_msg/1,
info_msg/2,
warning_msg/1,
warning_msg/2
]).
-spec error_msg(string()) -> ok.
error_msg(Msg) ->
error_logger:error_msg(Msg).
-spec error_msg(string(), list()) -> ... |
6507e05b24464f89bf2daec87f6f9a3c4cc546c2c3331fecb69c2ea97298b6fb | hammerlab/coclobas | biokepi_machine.ml |
#use "topfind";;
#thread
#require "coclobas.ketrew_backend,biokepi";;
open Nonstd
module String = Sosa.Native_string
let (//) = Filename.concat
let env_exn s =
try Sys.getenv s with _ ->
ksprintf failwith "Missing environment variable %S" s
let work_dir =
env_exn "BIOKEPI_WORK_DIR"
let install_tools_path =... | null | https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/tools/docker/biokepi_machine.ml | ocaml |
#use "topfind";;
#thread
#require "coclobas.ketrew_backend,biokepi";;
open Nonstd
module String = Sosa.Native_string
let (//) = Filename.concat
let env_exn s =
try Sys.getenv s with _ ->
ksprintf failwith "Missing environment variable %S" s
let work_dir =
env_exn "BIOKEPI_WORK_DIR"
let install_tools_path =... | |
374e64f589f53cbcf97c52baff4c618e9d7db32b7fdfee9c07a698aa579bc925 | madgen/temporalog | AST.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE KindSignatures #
# LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ScopedTypeVariables #
... | null | https://raw.githubusercontent.com/madgen/temporalog/3896a5fcaa10a5a943ea2cee0b87baa97682f7af/src/Language/Temporalog/AST.hs | haskell | # LANGUAGE GADTs #
-----------------------------------------------------------------------------
Utility functions
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Pretty printing related instances
-------------... | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE KindSignatures #
# LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ScopedTypeVariables #
module Language.Tempora... |
90a65d6cf908d1e7378f9c90e00cc005c65b503bea643693d9204eac36a30435 | vbmithr/ocaml-websocket | wscat.ml | open Core
open Async
open Websocket_async
let () = Logs.set_reporter (Logs_async_reporter.reporter ())
let client protocol extensions uri =
let host = Option.value_exn ~message:"no host in uri" Uri.(host uri) in
let port =
match (Uri.port uri, Uri_services.tcp_port_of_uri uri) with
| Some p, _ -> p
| ... | null | https://raw.githubusercontent.com/vbmithr/ocaml-websocket/3edc21aab7ced4c70313875a453dc9b03425ea13/async/wscat.ml | ocaml | Immediately echo and pass this last message to the user | open Core
open Async
open Websocket_async
let () = Logs.set_reporter (Logs_async_reporter.reporter ())
let client protocol extensions uri =
let host = Option.value_exn ~message:"no host in uri" Uri.(host uri) in
let port =
match (Uri.port uri, Uri_services.tcp_port_of_uri uri) with
| Some p, _ -> p
| ... |
562304c4e47720c2f2dbb9092caa4c9f2021f9d560ad5c6a8fb36e3aa66e90fc | cryptosense/ppx_factory | factory.mli | open Ppxlib
(** Structure generator *)
val from_str_type_decl : (structure, rec_flag * type_declaration list) Deriving.Generator.t
(** Signature generator *)
val from_sig_type_decl : (signature, rec_flag * type_declaration list) Deriving.Generator.t
(** Return the name of the factory function derived from a type wit... | null | https://raw.githubusercontent.com/cryptosense/ppx_factory/d7cad104e64e700540a2195459ae484dc099ccf3/lib/factory.mli | ocaml | * Structure generator
* Signature generator
* Return the name of the factory function derived from a type with the given name.
* Return the name of the factory derived from a type with a given [type_name] and for the
constructor with [constructor_name].
| open Ppxlib
val from_str_type_decl : (structure, rec_flag * type_declaration list) Deriving.Generator.t
val from_sig_type_decl : (signature, rec_flag * type_declaration list) Deriving.Generator.t
val _name_from_type_name : string -> string
val _name_from_type_and_constructor_name : type_name: string -> constructor_... |
cee46df5a4a909dfdd5115a2ce255c4738653d20ab8d686e4b9bf5ce54cc6465 | ostinelli/ram | ram_benchmark.erl | %% ==========================================================================================================
Ram - A distributed KV store for Erlang and Elixir .
%%
The MIT License ( MIT )
%%
Copyright ( c ) 2021 - 2022 < > .
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%... | null | https://raw.githubusercontent.com/ostinelli/ram/001e2695b94ac4b63ff4716be8221f1d8ce9545a/test/ram_benchmark.erl | erlang | ==========================================================================================================
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, s... | Ram - A distributed KV store for Erlang and Elixir .
The MIT License ( MIT )
Copyright ( c ) 2021 - 2022 < > .
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Sof... |
4a0a52f12d5d2278a0f4066a8da38636506c4e34578be4f7a36c4eac19ef0881 | GaloisInc/llvm-verifier | Grammar.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE PatternGuards #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ViewPatterns #
|
Module : $ Header$
Description : Symbolic execution tests
License : BSD3
Stability : provisional
Point - of - contact : acfoltzer
Module... | null | https://raw.githubusercontent.com/GaloisInc/llvm-verifier/d97ee6d2e731f48db833cc451326e737e1e39963/src/Verifier/LLVM/Debugger/Grammar.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE Rank2Types #
----------------------------------------------------------------------
----------------------------------------------------------------------
List utilities
| @strictNonemptyPrefixes l@ returns non-empty strict prefixes of @l@.
-----------------------------------------------... | # LANGUAGE KindSignatures #
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
|
Module : $ Header$
Description : Symbolic execution tests
License : BSD3
Stability : provisional
Point - of - contact : acfoltzer
Module : $Header$
Description : Symbolic e... |
d528f5c664c0baa9a002bf69e8d95a50061a11ba028322aa97ca98eabcc9df61 | racket/htdp | itunes.rkt | #lang racket
(provide (all-from-out 2htdp/itunes))
(require 2htdp/itunes)
| null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/teachpack/2htdp/itunes.rkt | racket | #lang racket
(provide (all-from-out 2htdp/itunes))
(require 2htdp/itunes)
| |
01e7fcdb1222659c966949be07d9600ea0f74be4e896808974a5235ac0d0e790 | solita/mnt-teet | material_ui.cljs | (ns teet.ui.material-ui
(:refer-clojure :exclude [List])
(:require [goog.object :as gobj]
reagent.core
;; Require all MaterialUI components with "mui-" prefix
;; the define-mui-components will adapt them and provide
;; wrapper functions that can be used directly from... | null | https://raw.githubusercontent.com/solita/mnt-teet/19cc416f222d5079d5df63add1fa90620122de85/app/frontend/src/cljs/teet/ui/material_ui.cljs | clojure | Require all MaterialUI components with "mui-" prefix
the define-mui-components will adapt them and provide
wrapper functions that can be used directly from reagent
Cards
Listing
Form
Common utility components
Data display
Icon
Tabs
Table
Dialogs and modals
Snackbar
Badge
Labs components | (ns teet.ui.material-ui
(:refer-clojure :exclude [List])
(:require [goog.object :as gobj]
reagent.core
["@material-ui/core/Card" :as mui-Card]
["@material-ui/core/CardActionArea" :as mui-CardActionArea]
["@material-ui/core/CardActions" :as mui-CardActions]
... |
d00e93b6e8f91f56dd2d5fef477d931ac2ff027c539a4b1b1155d276013883b8 | tazjin/democrify | Queue.hs | # LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE OverloadedStrings #-}
{-| This module contains the queue. -}
module Queue where
import Acid
import Control.Applicative ((<$>))
import Control.Concurrent
import Control.Monad (forM, forM_)
import... | null | https://raw.githubusercontent.com/tazjin/democrify/44d839428f881dff488d2e152ddb828dfd308dde/Democrify/Queue.hs | haskell | # LANGUAGE OverloadedStrings #
| This module contains the queue.
|This function runs an Acid Query and retrieves the state from the global IORef
|This function runs an Acid Update and retrieves the state from the global IORef
|Shuffles the play queue through a weird combination of things :(
|Gracefully shut... | # LANGUAGE ForeignFunctionInterface #
module Queue where
import Acid
import Control.Applicative ((<$>))
import Control.Concurrent
import Control.Monad (forM, forM_)
import Control.Monad.IO.Class (liftIO)
import Data.Acid
impor... |
92b83d70416fea80a826702600e5b2ce11a50dac9b09d5963c51331fdf8c01b5 | Perry961002/SICP | exe4.75.scm | ; s是否只有一个元素
(define (singleton-stream? s)
(and (not (stream-null? s))
(stream-null? (cdr s))))
(define (uniquely-asserted pattern frame-stream)
(stream-flatmap
(lambda (frame)
(let ((stream (qeval pattern
(singleton-stream frame))))
... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/exercise/exe4.75.scm | scheme | s是否只有一个元素 | (define (singleton-stream? s)
(and (not (stream-null? s))
(stream-null? (cdr s))))
(define (uniquely-asserted pattern frame-stream)
(stream-flatmap
(lambda (frame)
(let ((stream (qeval pattern
(singleton-stream frame))))
(if (singlet... |
94ce3400f69f8d97461ec195230fbd84631e01b116a956abf9936af691c77061 | fendor/hsimport | SymbolTest44.hs | {-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
import Control.Applicative
(r, t, z)
import Ugah.Blub
( a
, b
, c
)
import Data.Text (Text(..))
f :: Int -> Int
f = (+ 3)
r :: Int -> Int
r =
| null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/inputFiles/SymbolTest44.hs | haskell | # Language PatternGuards # | module Blub
( blub
, foo
, bar
) where
import Control.Applicative
(r, t, z)
import Ugah.Blub
( a
, b
, c
)
import Data.Text (Text(..))
f :: Int -> Int
f = (+ 3)
r :: Int -> Int
r =
|
9942c6b668c2cea872ea680e01ade7d565a8cbae9d5733efd0eef3177a065f95 | 39aldo39/klfc | JsonComments.hs | # LANGUAGE UnicodeSyntax , NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module JsonComments
( removeJsonComments
) where
import BasePrelude
import Prelude.Unicode
import qualified Data.ByteString.Lazy.Char8 as BL
-- Preserve line numbers
removeJsonComments ∷ BL.ByteString → BL.ByteString
removeJso... | null | https://raw.githubusercontent.com/39aldo39/klfc/83908c54c955b9c160b999bc8f0892401ba4adbf/src/JsonComments.hs | haskell | # LANGUAGE OverloadedStrings #
Preserve line numbers | # LANGUAGE UnicodeSyntax , NoImplicitPrelude #
module JsonComments
( removeJsonComments
) where
import BasePrelude
import Prelude.Unicode
import qualified Data.ByteString.Lazy.Char8 as BL
removeJsonComments ∷ BL.ByteString → BL.ByteString
removeJsonComments = BL.unlines ∘ map removeJsonComment ∘ BL.lines
r... |
699dfdd82f1f3e2ccebad87e7e870d7bc76cb824136226757a4484e260767508 | borgeby/jarl | generator.clj | (ns test.compliance.generator
"Generates compliance test files for both Clojure and ClojureScript"
(:require [clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as str]
[jarl.builtins.registry :as registry]
[z... | null | https://raw.githubusercontent.com/borgeby/jarl/3783e3a383aadb74a123a6accc72d290451c9be5/core/src/test/clj/test/compliance/generator.clj | clojure | This does not seem terribly important at the moment.
does not seem terribly important, ignoring for now
while BigInt isn't supported in ClojureScript right now, we could make this work if we're explicit... not sure
that want all math operations to use BigInt though
cljs / javascript implementation not limited in t... | (ns test.compliance.generator
"Generates compliance test files for both Clojure and ClojureScript"
(:require [clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as str]
[jarl.builtins.registry :as registry]
[z... |
4c265d522be6c02ba3ba9764270c4d05c03470eb3f0cd7908244a4fe62cda179 | xh4/web-toolkit | package.lisp | (in-package :cl-user)
(defpackage :vendor
(:nicknames :wt.vendor)
(:use :cl)
(:export :install))
| null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/package.lisp | lisp | (in-package :cl-user)
(defpackage :vendor
(:nicknames :wt.vendor)
(:use :cl)
(:export :install))
| |
3a85bbe2036350698222fcfeebe675bfb06844746c7aef61b9132b3996c0f5d0 | RolfRolles/PandemicML | CFGBuild.mli | exception IndirectJump of int32
module type Language = sig
type t
val disasm : int32 -> t * ASMUtil.cfsuccessors
val disasm_ex : int32 -> int32 -> t * ASMUtil.cfsuccessors * int32
end
module type S = sig
type lang
module C : CFG.CFG with type language = lang list
val merge_singleton_vertices : C.G.t -> C.... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Graph/CFGBuild.mli | ocaml | exception IndirectJump of int32
module type Language = sig
type t
val disasm : int32 -> t * ASMUtil.cfsuccessors
val disasm_ex : int32 -> int32 -> t * ASMUtil.cfsuccessors * int32
end
module type S = sig
type lang
module C : CFG.CFG with type language = lang list
val merge_singleton_vertices : C.G.t -> C.... | |
aa275e8a54af44cd9575179dc493ec7b644ae760ca9eb82ecc1dc17a5b556c3c | returntocorp/ocaml-tree-sitter-core | Backtrack_matcher.ml | (*
A backtracking regular expression matcher.
It promises to be simple and fast on simple regular expressions,
but with an exponential asymptotic cost.
*)
open Printf
let debug = false
module Make (Token : Matcher.Token) : Matcher.Matcher
with type token_kind = Token.kind
and type token = Token.t =
st... | null | https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/28f750bb894ea4c0a7f6b911e568ab9d731cc0b5/src/run/lib/Backtrack_matcher.ml | ocaml |
A backtracking regular expression matcher.
It promises to be simple and fast on simple regular expressions,
but with an exponential asymptotic cost.
Local type aliases for use in type annotations
Match an expression against the beginning of the input sequence and match
the rest of the input seq... |
open Printf
let debug = false
module Make (Token : Matcher.Token) : Matcher.Matcher
with type token_kind = Token.kind
and type token = Token.t =
struct
open Matcher
type token_kind = Token.kind
type token = Token.t
let show_exp = Matcher.Exp.show Token.show_kind
let show_capture = Matcher.Capture.sh... |
ca28962d3524474030f4e0fa25bac0a32d1c21f778d789ff2b7487f95c132b61 | sol/aeson-qq | Person.hs | # LANGUAGE OverloadedStrings , DeriveGeneric #
module Person where
import GHC.Generics
import Data.Aeson
data Person = Person {
name :: String
, age :: Int
} deriving (Eq, Show, Generic)
instance ToJSON Person
| null | https://raw.githubusercontent.com/sol/aeson-qq/3b5acf994cb7ee452eb58a4733b21b7eca53132f/test/Person.hs | haskell | # LANGUAGE OverloadedStrings , DeriveGeneric #
module Person where
import GHC.Generics
import Data.Aeson
data Person = Person {
name :: String
, age :: Int
} deriving (Eq, Show, Generic)
instance ToJSON Person
| |
7a9640d63ab31429dbab68bfe67001cf30179ef229990d6395356d7a073fe383 | krcz/zygote | c-syntax-render.rkt | #lang typed/racket
(require "c-syntax-defs.rkt")
(require threading)
(provide (all-defined-out))
(define-type token (U Symbol String integer-literal))
(struct Renderer
([output : Output-Port]
[needs-separation? : Boolean])
#:transparent)
(: ro-one (-> Renderer token Renderer))
(define (ro-one r t) (let*-val... | null | https://raw.githubusercontent.com/krcz/zygote/1f6298f0a73fd0320bc3ba5abe5f00a805fed8fc/noizy/c-syntax-render.rkt | racket | #lang typed/racket
(require "c-syntax-defs.rkt")
(require threading)
(provide (all-defined-out))
(define-type token (U Symbol String integer-literal))
(struct Renderer
([output : Output-Port]
[needs-separation? : Boolean])
#:transparent)
(: ro-one (-> Renderer token Renderer))
(define (ro-one r t) (let*-val... | |
642ed8cdd304ec92b31374381200c2f0e40ea97e8da651c27d0c3146cd2a158f | CryptoKami/cryptokami-core | PureSpec.hs | | Specification for Pos . . . Toss . Pure
module Test.Pos.Ssc.Toss.PureSpec
( spec
) where
import Universum
import qualified Crypto.Random as Rand
import Data.Default (def)
import Test.Hspec (Spec, describ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/test/Test/Pos/Ssc/Toss/PureSpec.hs | haskell | | Type synonym used for convenience. This quintuple is used to pass the randomness | | Specification for Pos . . . Toss . Pure
module Test.Pos.Ssc.Toss.PureSpec
( spec
) where
import Universum
import qualified Crypto.Random as Rand
import Data.Default (def)
import Test.Hspec (Spec, describ... |
a237a5dad5de102a65155bb9d04f839d9aade554881267a45d61f7c1fba6d22d | backtracking/astro | main.ml |
open Format
open Astro
open Lib
open Arg
let soleil_o = ref false
let lune_o = ref false
let planetes_o = ref false
let date_o = ref ""
let _ = parse [ "-s", Set soleil_o, "coordonnées Soleil";
"-l", Set lune_o, "coordonnées Lune";
"-p", Set planetes_o, "coordonnées planètes";
"-d", String ((:=) date_o), "da... | null | https://raw.githubusercontent.com/backtracking/astro/adb8020b8a56692f3d2b50d26dce2ccc442c6f39/main.ml | ocaml |
open Format
open Astro
open Lib
open Arg
let soleil_o = ref false
let lune_o = ref false
let planetes_o = ref false
let date_o = ref ""
let _ = parse [ "-s", Set soleil_o, "coordonnées Soleil";
"-l", Set lune_o, "coordonnées Lune";
"-p", Set planetes_o, "coordonnées planètes";
"-d", String ((:=) date_o), "da... | |
ca1925a2d9112640e7c1e69a2355dc06b6c475f15e91ac71b936c9608cf83f96 | gabebw/haskell-upenn-cs194 | Ring.hs | -- Define a class of mathematical rings
-- See also (mathematics)
module Ring where
-- You can optionally include a list of symbols after an import statement
-- to say exactly what you're importing from the other module. This is sometimes
-- useful for documentation, and to avoid name clashes between modules.
impo... | null | https://raw.githubusercontent.com/gabebw/haskell-upenn-cs194/94a27807de77df43f38ad8d044666548e9c849d4/fall-2014/hw5-typeclasses/Ring.hs | haskell | Define a class of mathematical rings
See also (mathematics)
You can optionally include a list of symbols after an import statement
to say exactly what you're importing from the other module. This is sometimes
useful for documentation, and to avoid name clashes between modules.
additive identity
additive inverse
... |
module Ring where
import Control.Arrow ( first )
import Data.Maybe ( listToMaybe )
class Ring a where
class Parsable a where
parse :: String -> Maybe (a, String)
instance Ring Integer where
addId = 0
addInv = negate
mulId = 1
add = (+)
mul = (*)
instance Parsable Integer where
parse = listToM... |
e7d4eab2bdce1b816a8dbf004a3915f46d7a7e452046c492936f98821d686e50 | openbadgefactory/salava | db.clj | (ns salava.social.db
(:require [yesql.core :refer [defqueries]]
[clojure.set :refer [rename-keys]]
[clojure.java.jdbc :as jdbc]
[salava.core.helper :refer [dump]]
[slingshot.slingshot :refer :all]
[salava.core.util :as util :refer [get-db plugin-fun get-plug... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/social/db.clj | clojure | STREAM ;;
(assoc-in [key :count] (inc (get-in current [key :count ] 0)))
MESSAGES ;; | (ns salava.social.db
(:require [yesql.core :refer [defqueries]]
[clojure.set :refer [rename-keys]]
[clojure.java.jdbc :as jdbc]
[salava.core.helper :refer [dump]]
[slingshot.slingshot :refer :all]
[salava.core.util :as util :refer [get-db plugin-fun get-plug... |
69bb4d285639d2cc34131c1093306972c9241727a8f1e7ee02506a42cf55ad78 | Enecuum/Node | NetworkSpec.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DuplicateRecordFields #
module Enecuum.Tests.Integration.NetworkSpec where
--
import Enecuum.Prelude
import qualified Enecuum.Language as L
import Test.Hspec
import Test.Hspec.Contrib.HUnit ... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/spec/Enecuum/Tests/Integration/NetworkSpec.hs | haskell | # LANGUAGE DeriveAnyClass #
Tests disabled
This functionality is not supported!
, TestLabel "fail udp connecting to nonexistent address." (testConnectToNonexistentAddress D.Udp 5008)
This functionality is not supported!
loger1
loger2 <- Rt.createLoggerRuntime I.consoleLoggerC... | # LANGUAGE DuplicateRecordFields #
module Enecuum.Tests.Integration.NetworkSpec where
import Enecuum.Prelude
import qualified Enecuum.Language as L
import Test.Hspec
import Test.Hspec.Contrib.HUnit (fromHUnitTest)
import ... |
ba4db8c016c096440a153fc9d2b8aa4ac869609aa7998cd6b24e183ae54f7e10 | ryanpbrewster/haskell | P040Test.hs | module Problems.P040Test
( case_040_main
) where
import Problems.P040
import Test.Tasty.Discover (Assertion, (@?=))
case_040_main :: Assertion
case_040_main = solve @?= "210"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P040Test.hs | haskell | module Problems.P040Test
( case_040_main
) where
import Problems.P040
import Test.Tasty.Discover (Assertion, (@?=))
case_040_main :: Assertion
case_040_main = solve @?= "210"
| |
953069c0c6d2cdfb61931d4d806277c30102e6fb5a05989ca06d908434940f53 | RRethy/nvim-treesitter-textsubjects | textsubjects-container-outer.scm | (([
(function_declaration)
(lexical_declaration)
(class_declaration)
(method_definition)
] @_start @_end)
(#make-range! "range" @_start @_end))
| null | https://raw.githubusercontent.com/RRethy/nvim-treesitter-textsubjects/30c5aecd3b30d2f7d4d019c91b599b3df8c0b370/queries/javascript/textsubjects-container-outer.scm | scheme | (([
(function_declaration)
(lexical_declaration)
(class_declaration)
(method_definition)
] @_start @_end)
(#make-range! "range" @_start @_end))
| |
d637c6f88ec393f39ce3bedfa4c6470e703fcb5dc17edd82ef4bdcdc2ed5712f | janestreet/universe | pdu_impl.mli | include Pdu_intf.S with module IO := Netsnmp_io_impl
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/netsnmp/src/raw_monad/pdu_impl.mli | ocaml | include Pdu_intf.S with module IO := Netsnmp_io_impl
| |
65b0e545d562e02312c69ba674d320f5d56aa803013ca2779dc036636dcc8282 | anmonteiro/lumo | core.cljs | (ns instrument.core
"The entry point of this program"
(:require [cljs.spec.test.alpha :as stest]))
(stest/instrument)
(defn -main
[& args]
(println "Hello world!")
(process.exit 0))
(set! *main-cli-fn* `-main)
| null | https://raw.githubusercontent.com/anmonteiro/lumo/6709c9f1b7b342c8108e6ed6e034e19dc786f00b/src/test/cljs_build/instrument/core.cljs | clojure | (ns instrument.core
"The entry point of this program"
(:require [cljs.spec.test.alpha :as stest]))
(stest/instrument)
(defn -main
[& args]
(println "Hello world!")
(process.exit 0))
(set! *main-cli-fn* `-main)
| |
f92ca7d22b131b5ce10332503307a8ea815fd5c9c1efe699de44d249c7e12bea | jhidding/chez-glfw | events.scm | (library (glfw events)
(export event? event-type event-time
mouse-button-event? mouse-button-event-button mouse-button-event-action
mouse-move-event? mouse-move-event-x mouse-move-event-y
key-event? key-event-key key-event-scancode key-event-action key-event-mods
resize-event? ... | null | https://raw.githubusercontent.com/jhidding/chez-glfw/fe53b5d8915c1c0b9f6a07446a0399a430d09851/glfw/events.scm | scheme | Event queue ================================================================== | (library (glfw events)
(export event? event-type event-time
mouse-button-event? mouse-button-event-button mouse-button-event-action
mouse-move-event? mouse-move-event-x mouse-move-event-y
key-event? key-event-key key-event-scancode key-event-action key-event-mods
resize-event? ... |
ed036cb35989f8f2741d2efaf0d3dbab08beb20d96f9341cbdfc8f6087b0fb06 | yallop/ocaml-ctypes | test_errno.ml |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open OUnit2
open Ctypes
let... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-foreign-errno/test_errno.ml | ocaml |
Call close() with a bogus file descriptor and check that an exception
is raised.
udpate environment |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open OUnit2
open Ctypes
let... |
84c0124a309e3e2ca7059f1410c556d55a986b0bc1a284fab784dcd028311064 | ocaml/dune | main.ml | open! Stdune
open Import
let all : _ Cmdliner.Cmd.t list =
let terms =
[ Installed_libraries.command
; External_lib_deps.command
; Build_cmd.build
; Build_cmd.runtest
; Build_cmd.fmt
; command_alias Build_cmd.runtest Build_cmd.runtest_term "test"
; Clean.command
; Install_uninstall.in... | null | https://raw.githubusercontent.com/ocaml/dune/3eaf83cd678009c586a0a506bc4755a3896be0f8/bin/main.ml | ocaml | Short reminders for the most used and useful commands | open! Stdune
open Import
let all : _ Cmdliner.Cmd.t list =
let terms =
[ Installed_libraries.command
; External_lib_deps.command
; Build_cmd.build
; Build_cmd.runtest
; Build_cmd.fmt
; command_alias Build_cmd.runtest Build_cmd.runtest_term "test"
; Clean.command
; Install_uninstall.in... |
340985c2c125e5b5afe90789c76665b56d426512be19071dbe252dcd762d0506 | shop-planner/shop3 | p10.lisp | (in-package :shop-openstacks)
#.(make-problem 'OS-SEQUENCEDSTRIPS-P20_1 'OPENSTACKS-SEQUENCEDSTRIPS-ADL-INCLUDED '((NEXT-COUNT
N0
N1)
... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/openstacks-adl/p10.lisp | lisp | (in-package :shop-openstacks)
#.(make-problem 'OS-SEQUENCEDSTRIPS-P20_1 'OPENSTACKS-SEQUENCEDSTRIPS-ADL-INCLUDED '((NEXT-COUNT
N0
N1)
... | |
84a5dbf785f407db56aab4f11837a34b963a06bf0ee4af8e64c97f9db2e5df8f | NoRedInk/haskell-libraries | List.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - redundant - constraints #
-- | A simple Redis library providing high level access to Redis features we
use here at NoRedInk
--
As with our Ruby Redis access , we enforce working within a " namespace " .
module Redis.List
( -... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/8a0ea7e1a80fc711810e5d225328826ac82393ea/nri-redis/src/Redis/List.hs | haskell | # LANGUAGE RankNTypes #
| A simple Redis library providing high level access to Redis features we
* Creating a redis handler
* Creating a redis API
* Creating redis queries
* Running Redis queries
| a API type can be used to enforce a mapping of keys to values.
without an API type, it can be easy to naiively se... | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - redundant - constraints #
use here at NoRedInk
As with our Ruby Redis access , we enforce working within a " namespace " .
module Redis.List
Real.handler,
Real.handlerAutoExtendExpire,
Internal.Handler,
Internal.HandlerAutoExtendExpire,
... |
b6fcf719b3fe8d055dd01b82ad7dcf3d51dbb1516e359d4ca59770138d34d538 | hexlet-codebattle/battle_asserts | cube_sum.clj | (ns battle-asserts.issues.cube-sum
(:require [clojure.test.check.generators :as gen]))
(def level :elementary)
(def tags ["math"])
(def description
{:en "Calculate sum of cubes in array from 1 to `n`."
:ru "Рассчитайте сумму кубов в массиве от 1 до `n`."})
(def signature
{:input [{:argument-name "num" :typ... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/51a10801cac8cc09f82252bdcaaf8d0def6eabb1/src/battle_asserts/issues/cube_sum.clj | clojure | (ns battle-asserts.issues.cube-sum
(:require [clojure.test.check.generators :as gen]))
(def level :elementary)
(def tags ["math"])
(def description
{:en "Calculate sum of cubes in array from 1 to `n`."
:ru "Рассчитайте сумму кубов в массиве от 1 до `n`."})
(def signature
{:input [{:argument-name "num" :typ... | |
8b133c5bd08e727010a97421cd3198171f0019a523305b7381a866e59f130ac9 | ohua-dev/ohua-core | Seq.hs | |
Module : $ Header$
Description : Implementation for basic tail recrusion support .
Copyright : ( c ) , 2017 . All Rights Reserved .
License : EPL-1.0
Maintainer : ,
Stability : experimental
Portability : portable
This source code is licensed under the terms described in the as... | null | https://raw.githubusercontent.com/ohua-dev/ohua-core/8fe0ee90f4a1aea0c5bfabe922b290fed668a7da/core/src/Ohua/ALang/Passes/Seq.hs | haskell | post traversal optimization
return $
[ohualang|
let $var:ctrl = ohua.lang/seqFun $var:dep in
let result = $expr:expr' in
result
|] | |
Module : $ Header$
Description : Implementation for basic tail recrusion support .
Copyright : ( c ) , 2017 . All Rights Reserved .
License : EPL-1.0
Maintainer : ,
Stability : experimental
Portability : portable
This source code is licensed under the terms described in the as... |
37dda189e6f0a273710de77e4a2974befcc973e106dff85bf691bf77531c4b36 | RefactoringTools/HaRe | HsKindPretty.hs | -- Pretty printing for the K functor --
module HsKindPretty where
import PrettyPrint
import HsKindStruct
import PrettySymbols
instance Printable x => Printable (K x) where
ppi (Kfun k1 k2) = wrap k1 <> rarrow <> k2
ppi k = wrap k
wrap Kstar = star
wrap Kpred = moon
wrap Kprop = kw "P"... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/AST/HsKindPretty.hs | haskell | Pretty printing for the K functor -- |
module HsKindPretty where
import PrettyPrint
import HsKindStruct
import PrettySymbols
instance Printable x => Printable (K x) where
ppi (Kfun k1 k2) = wrap k1 <> rarrow <> k2
ppi k = wrap k
wrap Kstar = star
wrap Kpred = moon
wrap Kprop = kw "P"
wrap k = parens (ppi k)
|
25879732a880a298a2ba7e973de00a4ddd5983d4b0450218be4ac877b16741d0 | mput/sicp-solutions | 1_23.test.rkt | #lang racket
(require rackunit/text-ui)
(require rackunit "../solutions/1_23.rkt")
(define better-prime?-test
(test-suite
"Test for (better-prime?)"
(test-case
"Tests for truzy"
(check-true (better-prime? 7))
(check-true (better-prime? 199))
(check-true (better-prime? 900307)))
(tes... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/tests/1_23.test.rkt | racket | #lang racket
(require rackunit/text-ui)
(require rackunit "../solutions/1_23.rkt")
(define better-prime?-test
(test-suite
"Test for (better-prime?)"
(test-case
"Tests for truzy"
(check-true (better-prime? 7))
(check-true (better-prime? 199))
(check-true (better-prime? 900307)))
(tes... | |
6cbae0dcfa213b708bccbb232d95e9d446a530547336ae7a7fc9e5b29d975c1a | hdgarrood/qq-literals | Spec.hs | # LANGUAGE QuasiQuotes #
import Spec.Example (uri)
import Network.URI (URI(..))
main :: IO ()
main = do
let exampleDotCom = [uri||]
putStrLn ("scheme: " ++ uriScheme exampleDotCom)
putStrLn ("authority: " ++ show (uriAuthority exampleDotCom))
putStrLn ("path: " ++ uriPath exampleDotCom)
| null | https://raw.githubusercontent.com/hdgarrood/qq-literals/19f3dfae03623b6ea6898096c1e6fa4cf1e749bb/test/Spec.hs | haskell | # LANGUAGE QuasiQuotes #
import Spec.Example (uri)
import Network.URI (URI(..))
main :: IO ()
main = do
let exampleDotCom = [uri||]
putStrLn ("scheme: " ++ uriScheme exampleDotCom)
putStrLn ("authority: " ++ show (uriAuthority exampleDotCom))
putStrLn ("path: " ++ uriPath exampleDotCom)
| |
bfbb5af71c4f986ecffeb55112328c3a629e66bbda7455896bccb1140bf8fcd6 | GaloisInc/daedalus | Layout.hs | {-# Language OverloadedStrings #-}
module Daedalus.Parser.Layout where
import Daedalus.Parser.Tokens
import AlexTools
virtual :: Token -> Lexeme Token -> Lexeme Token
virtual t l = l { lexemeToken = t, lexemeText = "" }
layout :: [Lexeme Token] -> [Lexeme Token]
layout tokIn = go False [] (error "Last token") tokIn
... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/036a79404cb2cac266aa54dd9820280616724c33/src/Daedalus/Parser/Layout.hs | haskell | # Language OverloadedStrings # | module Daedalus.Parser.Layout where
import Daedalus.Parser.Tokens
import AlexTools
virtual :: Token -> Lexeme Token -> Lexeme Token
virtual t l = l { lexemeToken = t, lexemeText = "" }
layout :: [Lexeme Token] -> [Lexeme Token]
layout tokIn = go False [] (error "Last token") tokIn
where
dbg = [ trace ( show ( le... |
587b30b5414415cbc6543b99bd68ac89b6ca63c96ebee7f53591e59ed7661a84 | magnusjonsson/unitc | Unit.hs | module Unit where
import Prelude hiding (div, recip)
import Data.Ratio
import Data.List as List
import Data.Map.Strict as Map
type Q = Ratio Integer
newtype Unit = Unit (Map String Q)
deriving (Eq)
nonzero :: Q -> Maybe Q
nonzero 0 = Nothing
nonzero x = Just x
one :: Unit
one = Unit Map.empty
fundamental ... | null | https://raw.githubusercontent.com/magnusjonsson/unitc/9b837d87b9ea4ebc430b1c5572346818080b7e49/app/Unit.hs | haskell | module Unit where
import Prelude hiding (div, recip)
import Data.Ratio
import Data.List as List
import Data.Map.Strict as Map
type Q = Ratio Integer
newtype Unit = Unit (Map String Q)
deriving (Eq)
nonzero :: Q -> Maybe Q
nonzero 0 = Nothing
nonzero x = Just x
one :: Unit
one = Unit Map.empty
fundamental ... | |
69fe7eadcf6710c60d52a38b97b8295440ded063138c46a97abbe6e6c9225af1 | openbadgefactory/salava | handler.clj | (ns salava.core.handler
(:import (java.io FileNotFoundException))
(:require [clojure.tools.logging :as log]
[compojure.api.sweet :refer :all]
[compojure.route :as route]
[salava.core.session :refer [wrap-app-session]]
[salava.core.util :refer [get-base-path get-data-d... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/core/handler.clj | clojure | Disabled for OAuth2 custom redirect_uri schemes | (ns salava.core.handler
(:import (java.io FileNotFoundException))
(:require [clojure.tools.logging :as log]
[compojure.api.sweet :refer :all]
[compojure.route :as route]
[salava.core.session :refer [wrap-app-session]]
[salava.core.util :refer [get-base-path get-data-d... |
3ea0fb95005de40381a327190fcca4729447809a7a8534b88e79bec7aab278bf | patricoferris/ocaml-multicore-monorepo | test_date.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The ptime programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % --------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ptime/test/test_date.ml | ocaml | Check year bounds
Check month bounds
1700 is not leap
2100 is not leap | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The ptime programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % --------------------------------------------------------------------------... |
17769c358abaf4ad0967ddd9994a44f530c03ba09927fa05b2a043e2fd3eab20 | GaloisInc/HaNS | Packet.hs | # LANGUAGE RecordWildCards #
module Tests.IP4.Packet where
import Tests.Ethernet (arbitraryMac)
import Tests.Network (arbitraryProtocol)
import Tests.Utils (encodeDecodeIdentity,showReadIdentity)
import Hans.IP4.Packet
import Hans.Lens
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Shor... | null | https://raw.githubusercontent.com/GaloisInc/HaNS/2af19397dbb4f828192f896b223ed2b77dd9a055/tests/Tests/IP4/Packet.hs | haskell | --------------------------------------------------
checksum processing is validated by a different property
available
set the members of the ip4Fragment_ field on the final header
Packet Properties ----------------------------------------------------------- | # LANGUAGE RecordWildCards #
module Tests.IP4.Packet where
import Tests.Ethernet (arbitraryMac)
import Tests.Network (arbitraryProtocol)
import Tests.Utils (encodeDecodeIdentity,showReadIdentity)
import Hans.IP4.Packet
import Hans.Lens
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Shor... |
78042bdbd9e063ce2de828f89fcd0d3957af3b39967a32c5b0d2ffdf84314c6a | marcoonroad/hieroglyphs | bench.ml | open Core_bench.Bench
module Command = Core.Command
let suite = Hiero.suite @ Rsa_pss.suite @ Secp.suite
let _ = Command.run (make_command suite)
| null | https://raw.githubusercontent.com/marcoonroad/hieroglyphs/03050bcf78b2871591752a696a16587989065163/test/bench/bench.ml | ocaml | open Core_bench.Bench
module Command = Core.Command
let suite = Hiero.suite @ Rsa_pss.suite @ Secp.suite
let _ = Command.run (make_command suite)
| |
7587995b71ddfdbb4a9a9226bd2146ddf626d98eadf68b1f322e5ae6af040f7e | processone/ejabberd | mod_push_opt.erl | %% Generated automatically
%% DO NOT EDIT: run `make options` instead
-module(mod_push_opt).
-export([cache_life_time/1]).
-export([cache_missed/1]).
-export([cache_size/1]).
-export([db_type/1]).
-export([include_body/1]).
-export([include_sender/1]).
-export([use_cache/1]).
-spec cache_life_time(gen_mod:opts() | g... | null | https://raw.githubusercontent.com/processone/ejabberd/b860a25c82515ba51b044e13ea4e040e3b9bbc41/src/mod_push_opt.erl | erlang | Generated automatically
DO NOT EDIT: run `make options` instead |
-module(mod_push_opt).
-export([cache_life_time/1]).
-export([cache_missed/1]).
-export([cache_size/1]).
-export([db_type/1]).
-export([include_body/1]).
-export([include_sender/1]).
-export([use_cache/1]).
-spec cache_life_time(gen_mod:opts() | global | binary()) -> 'infinity' | pos_integer().
cache_life_time(Opts)... |
6126784d56f4ddbf890b87ba9ad4b5e4e6854b3d6df75bdc5cb7be6f29db1831 | simplegeo/erlang | typer_info.erl | -*- erlang - indent - level : 2 -*-
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should hav... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/typer/src/typer_info.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | -*- erlang - indent - level : 2 -*-
Copyright Ericsson AB 2006 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-mod... |
52c3f1a3a407ac7c1fd95d14eeaacca2ccaff2abf4f7e04a262b3e4dfc28f280 | NaaS/motto | crisp_type_annotation.ml |
Serialisation - related annotations for types in
, Cambridge University Computer Lab , March 2015
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Serialisation-related annotations for types in Crisp
Nik Sultana, Cambridge University Computer Lab, March 2015
Use... | null | https://raw.githubusercontent.com/NaaS/motto/8ff3eba534be816d861dcfced93b68d593a12e2b/syntax/crisp_type_annotation.ml | ocaml | NOTE we allow the annotation to talk about a value that won't be used in
the program -- but that will be represented in the input (and whose
value is preserved in the output.)
By this I mean things like anonymous field names that have type
annotations -- being anonymous, we cannot read, use,... |
Serialisation - related annotations for types in
, Cambridge University Computer Lab , March 2015
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Serialisation-related annotations for types in Crisp
Nik Sultana, Cambridge University Computer Lab, March 2015
Use... |
97202bfc50f53c88b899f07a5c58d39015812f403542810f5d0b785e58b1761d | cucapra/diospyros | backend-utils.rkt | #lang rosette
(require "../c-ast.rkt")
(provide suppress-git-info
git-info-comment)
; Suppress the git information header
(define suppress-git-info (make-parameter #f))
; Return the non-error string output of a system command
(define (get-command-output cmd)
(with-output-to-string (lambda () (system cmd)... | null | https://raw.githubusercontent.com/cucapra/diospyros/5c9fb6d3bda40d7bb395546aaefc78e6813b729f/src/backend/backend-utils.rkt | racket | Suppress the git information header
Return the non-error string output of a system command
Get the current git revision
Check the current git status
Produce git info (revision and status) as a C-style block comment | #lang rosette
(require "../c-ast.rkt")
(provide suppress-git-info
git-info-comment)
(define suppress-git-info (make-parameter #f))
(define (get-command-output cmd)
(with-output-to-string (lambda () (system cmd))))
(define (get-git-revision)
(get-command-output "git rev-parse --short HEAD"))
(define (... |
b64c7f56c907d4957e09602d27661a500fc6489670ede429b9426859f63a683a | ghc/packages-haskeline | DumbTerm.hs | module System.Console.Haskeline.Backend.DumbTerm where
import System.Console.Haskeline.Backend.Posix
import System.Console.Haskeline.Backend.WCWidth
import System.Console.Haskeline.Term
import System.Console.Haskeline.LineState
import System.Console.Haskeline.Monads as Monads
import System.IO
import Control.Applicati... | null | https://raw.githubusercontent.com/ghc/packages-haskeline/5f16b76168f13c6413413386efc44fb1152048d5/System/Console/Haskeline/Backend/DumbTerm.hs | haskell | TODO:
-- Put "<" and ">" at end of term if scrolls off.
-- Have a margin at the ends
^ # of visible chars to left of cursor
Things we can assume a dumb terminal knows how to do
Don't want to print in the last column, as that may wrap to the next line.
we haven't moved outside the margins
no change
moved left
m... | module System.Console.Haskeline.Backend.DumbTerm where
import System.Console.Haskeline.Backend.Posix
import System.Console.Haskeline.Backend.WCWidth
import System.Console.Haskeline.Term
import System.Console.Haskeline.LineState
import System.Console.Haskeline.Monads as Monads
import System.IO
import Control.Applicati... |
f0a563bdd5fb87c7bf704c6001dd00b41ca1fba9f7e5038305648cd1003bbef0 | Beluga-lang/Beluga | version.ml | * Gets the version of from the dune-build.info library .
let get () =
match Build_info.V1.version () with
| None -> "n/a"
| Some v -> Build_info.V1.Version.to_string v
| null | https://raw.githubusercontent.com/Beluga-lang/Beluga/1d39095c99dc255d972a339d447dc04286d8c13f/src/beluga/version.ml | ocaml | * Gets the version of from the dune-build.info library .
let get () =
match Build_info.V1.version () with
| None -> "n/a"
| Some v -> Build_info.V1.Version.to_string v
| |
2f75fde2db97f1452f086d695c7ecffd90508a4e902fde28868b1bdaa4997442 | MyDataFlow/ttalk-server | cow_http.erl | Copyright ( c ) 2013 - 2014 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowlib/src/cow_http.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2013 - 2014 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cow_http).
@todo parse_request_line
-expor... |
fcf9e4425cae6b5d582a536e1f7b3d33c6a99ab6a15db60d6653c6376838aaf9 | mtolly/onyxite-customs | Freetar.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE OverloadedRecordDot #-}
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
module Onyx.Import.Freetar where
import Control.Monad.Codec
import Control.... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Import/Freetar.hs | haskell | # LANGUAGE NoFieldSelectors #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE StrictData #
TODO HammerOnAllowed
just assuming | # LANGUAGE DuplicateRecordFields #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
module Onyx.Import.Freetar where
import Control.Monad.Codec
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Reader (runReaderT)
import qualified Da... |
9e3c250608f593f400d3df15b2e71f4c78ab777fe18e81c25fd5b059060f54bb | grin-compiler/ghc-wpc-sample-programs | Main.hs | |
Module : . REPL
Description : Main function to decide ' mode of use .
License : : The Idris Community .
Module : Idris.REPL
Description : Main function to decide Idris' mode of use.
License : BSD3
Maintainer : The Idris Community.
-}
module Idris.Main
( idrisMain
, idris
, ru... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Main.hs | haskell | Set default optimisations
Now set/unset specifically chosen optimisations
if we have the --bytecode flag, drop into the bytecode assembler
Check if listed packages are actually installed
clearOrigPats
| Invoke as if from command line. It is an error if there are
unresolved totality problems.
| Run the ... | |
Module : . REPL
Description : Main function to decide ' mode of use .
License : : The Idris Community .
Module : Idris.REPL
Description : Main function to decide Idris' mode of use.
License : BSD3
Maintainer : The Idris Community.
-}
module Idris.Main
( idrisMain
, idris
, ru... |
a4bfe367668c38ccd893556286713be40530cfa3c9dbd794afa381837b985fd1 | EFanZh/EOPL-Exercises | exercise-1.24-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-1.24.rkt")
(check-false (every? number? '(a b c 3 e)))
(check-true (every? number? '(1 2 3 5 4)))
(check-true (every? number? '()))
| null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-1.24-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-1.24.rkt")
(check-false (every? number? '(a b c 3 e)))
(check-true (every? number? '(1 2 3 5 4)))
(check-true (every? number? '()))
| |
60f2224e40af733bbbc4fd36991ed8d69ccb323e77ebe0c7585b75844627958f | sellout/haskerwaul | Lax.hs | # language UndecidableSuperClasses #
module Haskerwaul.Functor.Closed.Lax
( module Haskerwaul.Functor.Closed.Lax
-- * extended modules
, module Haskerwaul.Functor
) where
import Data.Proxy (Proxy)
import Haskerwaul.Category.Monoidal.Closed
import Haskerwaul.Functor
-- | [nLab](+functor)
class (Clo... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Functor/Closed/Lax.hs | haskell | * extended modules
| [nLab](+functor)
-- | Every `LaxMonoidalFunctor` between `ClosedMonoidalCategories` gives rise to
-- a `LaxClosedFunctor`.
instance ( ClosedMonoidalCategory c
LaxClosedFunctor c d f where | # language UndecidableSuperClasses #
module Haskerwaul.Functor.Closed.Lax
( module Haskerwaul.Functor.Closed.Lax
, module Haskerwaul.Functor
) where
import Data.Proxy (Proxy)
import Haskerwaul.Category.Monoidal.Closed
import Haskerwaul.Functor
class (ClosedCategory c, ClosedCategory d, Functor c d f... |
598990cc471477621cf125d4f6ce945196bc8c16bbd1972722c2f8afe986710b | clckwrks/clckwrks | Monad.hs | # LANGUAGE CPP , DeriveDataTypeable , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleInstances , TypeSynonymInstances , FlexibleContexts , TypeFamilies , RankNTypes , RecordWildCards , ScopedTypeVariables , UndecidableInstances , OverloadedStrings , TemplateHaskell #
module Clckwrks.Monad
( Clck
,... | null | https://raw.githubusercontent.com/clckwrks/clckwrks/a0e3f5e29b24cdb2cc63f8b662cc457384d7104a/Clckwrks/Monad.hs | haskell | , markupToContent
import HSP.ServerPartT ()
imported so that instances are scope even though we do not use them here
imported so that instances are scope even though we do not use them here
----------------------------------------------------------------------------
Theme
-------------------------... | # LANGUAGE CPP , DeriveDataTypeable , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleInstances , TypeSynonymInstances , FlexibleContexts , TypeFamilies , RankNTypes , RecordWildCards , ScopedTypeVariables , UndecidableInstances , OverloadedStrings , TemplateHaskell #
module Clckwrks.Monad
( Clck
,... |
0d8c96d89f28c172197bb9acaef596d0d5af4377b615adec1b6c7749e2f37bfd | magnars/zombie-clj | prep_test.clj | (ns zombieclj.prep-test
(:require [zombieclj.prep :refer :all]
[zombieclj.game :refer [create-game reveal-tile tick]]
[midje.sweet :refer :all]))
(fact
"Concealed tiles have no faces"
(->> (create-game)
prep
:tiles
(map #(dissoc % :id))) => (repeat 16 {}))
(fact
"Reveal... | null | https://raw.githubusercontent.com/magnars/zombie-clj/822820967a3e046f334e37bd3a4ecdc283c3e66b/test/zombieclj/prep_test.clj | clojure | (ns zombieclj.prep-test
(:require [zombieclj.prep :refer :all]
[zombieclj.game :refer [create-game reveal-tile tick]]
[midje.sweet :refer :all]))
(fact
"Concealed tiles have no faces"
(->> (create-game)
prep
:tiles
(map #(dissoc % :id))) => (repeat 16 {}))
(fact
"Reveal... | |
392f5b08a00c4d8f515f5d1535efae1c2e9811199e97d1fa3f6215b15ace5b7f | picty/parsifal | enum-11.ml | enum test (8, Exception) =
| 0 -> A, "First constructor A"
| 1 -> B, "BBB"
| 2 -> C
| 3 -> D
| null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/syntax/unit/enum-11.ml | ocaml | enum test (8, Exception) =
| 0 -> A, "First constructor A"
| 1 -> B, "BBB"
| 2 -> C
| 3 -> D
| |
3d9a91dd19b891d18200a1c2e0529fc21f999e81d6fc0199063f11e24221fef4 | spurious/chibi-scheme-mirror | system-tests.scm |
(cond-expand
(modules (import (chibi system) (only (chibi test) test-begin test test-end)))
(else #f))
(test-begin "system")
(test #t (user? (user-information (current-user-id))))
(test #f (user? #f))
(test #f (user? (list #f)))
(test #t (string? (user-name (user-information (current-user-id)))))
(test #t (string?... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/system-tests.scm | scheme | stress test user-name |
(cond-expand
(modules (import (chibi system) (only (chibi test) test-begin test test-end)))
(else #f))
(test-begin "system")
(test #t (user? (user-information (current-user-id))))
(test #f (user? #f))
(test #f (user? (list #f)))
(test #t (string? (user-name (user-information (current-user-id)))))
(test #t (string?... |
c3fdef5b0d778c3f01b3eaa4d8b8c7c2237ece62ac5cb6c465b5486d939334e8 | 8c6794b6/guile-tjit | t-make-long-long-immediate-01.scm | ;; Nested loop containing `make-long-long-immediate'.
(define (loop1 n)
(let lp ((n n) (acc '()))
(if (= n 0)
acc
(lp (- n 1) (cons 2305843009213693951 acc)))))
(define (loop2 n)
(let lp ((n n) (acc '()))
(if (= n 0)
acc
(lp (- n 1) (cons (loop1 n) acc)))))
(loop2 50)
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-make-long-long-immediate-01.scm | scheme | Nested loop containing `make-long-long-immediate'. |
(define (loop1 n)
(let lp ((n n) (acc '()))
(if (= n 0)
acc
(lp (- n 1) (cons 2305843009213693951 acc)))))
(define (loop2 n)
(let lp ((n n) (acc '()))
(if (= n 0)
acc
(lp (- n 1) (cons (loop1 n) acc)))))
(loop2 50)
|
d959e09cd8c6717fc4ccabb2e1e57b599ea22e4836b3260eebbd2e193086ff13 | danoctavian/bit-smuggler | Main.hs | module Main where
import Prelude as P
import Data.Torrent
import Data.ByteString as BS
import Data.ByteString.Char8 as BSC
import Data.ByteString.Lazy as BSL
import Control.Applicative
import System.Environment
import Control.Monad.Trans.Resource
import Data.Conduit
import Data.Conduit.Binary
import Network.BitSmugg... | null | https://raw.githubusercontent.com/danoctavian/bit-smuggler/4385ed67f1fec4ed441832fc9a119de632b796aa/BitSmuggler/bit-smuggler-app/Main.hs | haskell | currently tiny commandline app to run some manual tests
runRealDemoServer
runRealDemoClient
seed, size, filename
responds to it | module Main where
import Prelude as P
import Data.Torrent
import Data.ByteString as BS
import Data.ByteString.Char8 as BSC
import Data.ByteString.Lazy as BSL
import Control.Applicative
import System.Environment
import Control.Monad.Trans.Resource
import Data.Conduit
import Data.Conduit.Binary
import Network.BitSmugg... |
4953d4daefa0e4c65b2bcc0665074e24748c46c1c06b7f5c1af57f8e9ca213da | lazamar/nix-package-versions | DatabaseSpec.hs | module DatabaseSpec (spec) where
import App.Main (run)
import Control.Monad.SQL (MonadSQLT)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Log2 (runLoggerT, discard)
import Data.Time.Calendar (Day(ModifiedJulianDay))
import Nix.Revision (Revision(..), Package(..), Channel(..), RevisionPackages)
i... | null | https://raw.githubusercontent.com/lazamar/nix-package-versions/3b2caa78b7e130619818e5afa8b549b23377ac30/test/DatabaseSpec.hs | haskell | | Create a temporary database file and connect to it to perform tests.
We can add the same thing over and over again and we won't get duplicates
Even though the packages have the same name,
because they point to revisions with different commits
they only appear in the respective revision search | module DatabaseSpec (spec) where
import App.Main (run)
import Control.Monad.SQL (MonadSQLT)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Log2 (runLoggerT, discard)
import Data.Time.Calendar (Day(ModifiedJulianDay))
import Nix.Revision (Revision(..), Package(..), Channel(..), RevisionPackages)
i... |
633dca6eb724f4ef2918edb3ca8be0dbe2551b888839ab262c50bdaad59d8e11 | exercism/babashka | run_length_encoding_test.clj | (ns run-length-encoding-test
(:require [clojure.test :refer :all]
[run-length-encoding :as rle]))
;;Tests for run-length-encoding exercise
(deftest encode-empty-string
(testing "encode an empty string"
(is (= (rle/run-length-encode "") ""))))
(deftest encode-single-characters-without-count
(tes... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/run-length-encoding/test/run_length_encoding_test.clj | clojure | Tests for run-length-encoding exercise | (ns run-length-encoding-test
(:require [clojure.test :refer :all]
[run-length-encoding :as rle]))
(deftest encode-empty-string
(testing "encode an empty string"
(is (= (rle/run-length-encode "") ""))))
(deftest encode-single-characters-without-count
(testing "encode single characters without co... |
5e3361a76cb0113e9b8c00669c91df806945a039fe94a36e2b67bc3dbf5987e8 | 0install/0install | basedir.mli | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
(** XDG Base Directory support, for locating caches, configuration, etc *)
open Common
type basedirs = {
data: filepath list;
cache: filepath list;
config: filepath list;
}
(** Get con... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/basedir.mli | ocaml | * XDG Base Directory support, for locating caches, configuration, etc
* Get configuration using [ZEROINSTALL_PORTABLE_BASE] (if set), or the platform default,
* modified by any [XDG_*] variables which are set.
* [save_path system relpath search_path] creates the directory [List.hd search_path +/ relpath] (and
* any... | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Common
type basedirs = {
data: filepath list;
cache: filepath list;
config: filepath list;
}
val get_default_config : #system -> basedirs
* [ load_first system relpath search_pat... |
62628de006548203f128eec564cfd16c011aca23e1fbdc752ab85abb84713a3f | seckcoder/iu_c311 | lang.rkt | #lang racket
(require "../../base/utils.rkt")
(provide parse
parse-exp
parse-decl
parse-ty
Program
(all-from-out 'Type)
(all-from-out 'Decl)
(all-from-out 'Exp)
)
; parser for kyo
(module Type racket
(provide (prefix-out t: (all-defined-out))... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/compiler/kyo/lang.rkt | racket | parser for kyo
no type
any type
a placeholder; used for recursive types
rand and return
t is a type-id, it refers to some unknown type
f is e:fun
return (list type value)
(struct fun (v body) #:transparent)
function value | #lang racket
(require "../../base/utils.rkt")
(provide parse
parse-exp
parse-decl
parse-ty
Program
(all-from-out 'Type)
(all-from-out 'Decl)
(all-from-out 'Exp)
)
(module Type racket
(provide (prefix-out t: (all-defined-out)))
(struct Int (... |
8f46cc66a8100d8832a20dc1fc6eb95d788a5c3b8e9ba49af81bdb1a4bbacdba | Decentralized-Pictures/T4L3NT | test_gas_costs.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_112_Pt4FJEL6/lib_protocol/test/test_gas_costs.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
6b83a3830159c727bd8dedc498efb657c1a9911491132e4338154263b8b84220 | district0x/district-registry | ds_auth.cljs | (ns district-registry.server.contract.ds-auth
(:require [district.server.smart-contracts :as smart-contracts]))
(defn owner [contract-key]
(smart-contracts/contract-call contract-key :owner))
(defn authority [contract-key]
(smart-contracts/contract-call contract-key :authority))
| null | https://raw.githubusercontent.com/district0x/district-registry/c2dcf7978d2243a773165b18e7a76632d8ad724e/src/district_registry/server/contract/ds_auth.cljs | clojure | (ns district-registry.server.contract.ds-auth
(:require [district.server.smart-contracts :as smart-contracts]))
(defn owner [contract-key]
(smart-contracts/contract-call contract-key :owner))
(defn authority [contract-key]
(smart-contracts/contract-call contract-key :authority))
| |
ee26f64c524fee572079bb8b2e7a4e2dcb8daf4c8ccb6487ac837b81bb316d05 | input-output-hk/project-icarus-importer | ServerBench.hs | module Bench.Pos.BlockchainImporter.ServerBench
( runTimeBenchmark
, runSpaceBenchmark
) where
import Universum
import Criterion.Main (bench, defaultConfig, defaultMainWith, nfIO)
import Criterion.Types (Config (..))
import Weigh (io, mainWith)
import Tes... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/blockchain-importer/bench/Bench/Pos/BlockchainImporter/ServerBench.hs | haskell | --------------------------------------------------------------
Mocked functions
--------------------------------------------------------------
| @getBlocksTotal@ function for benchmarks.
Postgres db is not mocked as it's never used
| This is used to generate the test environment. We don't do this while benchmarking... | module Bench.Pos.BlockchainImporter.ServerBench
( runTimeBenchmark
, runSpaceBenchmark
) where
import Universum
import Criterion.Main (bench, defaultConfig, defaultMainWith, nfIO)
import Criterion.Types (Config (..))
import Weigh (io, mainWith)
import Tes... |
f456daa0b7a1ed9e3b7c969c220a31ef3b80fd73845f0c3fcbc9ad6f42d0419f | adaliu-gh/htdp | 5-graphical editor.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname |5-graphical editor|) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeat... | null | https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/1-7%20Fixed-Size%20Data/5-graphical%20editor.rkt | racket | about the language level of this file in a form that our tools can easily process.
An Editor is a structure:
interpretation (make-editor s t) describes an editor
whose visible text is (string-appedn s t) with
the cursor displayed between s and t
---------------------
Auxiliary functions:
---------------------
ed... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname |5-graphical editor|) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
(de... |
0fca3155bd12607f0c15b99d6d8c790e56b8ed83ca875df9ba8c4d39db9e7820 | dom96/SimpleIRC | CoreSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
module CoreSpec (main, spec) where
import Control.Concurrent
import Test.HUnit
import Test.Hspec.Monadic
import Test.Hspec.HUnit()
import qualified Data.Knob as K
import qualified Data.Map as ... | null | https://raw.githubusercontent.com/dom96/SimpleIRC/ee5ab54fcff9ae974458a9394a2484709724e9dc/tests/CoreSpec.hs | haskell | # LANGUAGE OverloadedStrings #
Other info
it took to do so | # OPTIONS_GHC -fno - warn - missing - signatures #
module CoreSpec (main, spec) where
import Control.Concurrent
import Test.HUnit
import Test.Hspec.Monadic
import Test.Hspec.HUnit()
import qualified Data.Knob as K
import qualified Data.Map as Map
import System.IO
impo... |
bf4038f147df7b5f4bed88408c33f844aee85e2022704397d0cce3a2a3c7403c | juspay/atlas | Handler.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/API/Parking/Quotes/Handler.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
88d1cb5eb70d1167bb7261f6b70ab72aa47e4f6490c0d19d2a70e2e939b154f1 | xvw/preface | bind.mli | * A [ Bind ] allow to sequences operations that are dependent from one to
another , in contrast to { ! module : Applicative } , which executes a series of
independent actions . It is a Monad without [ return ] operation .
another, in contrast to {!module:Applicative}, which executes a series of
inde... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_specs/bind.mli | ocaml | * Minimal definition using [bind].
* The type held by the [Bind].
* Minimal definition using [map] and [join].
* The type held by the [Bind].
* Minimal definition using [compose_left_to_right].
* The type held by the [Bind].
* Minimal definition using [map] and [bind].
* The type held by the [Bind].
* Minimal d... | * A [ Bind ] allow to sequences operations that are dependent from one to
another , in contrast to { ! module : Applicative } , which executes a series of
independent actions . It is a Monad without [ return ] operation .
another, in contrast to {!module:Applicative}, which executes a series of
inde... |
cf1adebb5abba8695742caa84dbcc8ff66256647b5ed14c0021bc5b08e05e033 | kind2-mc/kind2 | fileId.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2018 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/utils/fileId.ml | ocaml | Total order on identifiers | This file is part of the Kind 2 model checker .
Copyright ( c ) 2018 by the Board of Trustees of the University of Iowa
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 a... |
9eda9a38003f4f17591ecec3fc46986211a4b6f2b9a68007430cef5a4f869b20 | zotonic/zotonic | controller_admin_mailing_status.erl | @author < >
2011
%% @doc Mailing status/control page
Copyright 2011
%%
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 ... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_mailinglist/src/controllers/controller_admin_mailing_status.erl | erlang | @doc Mailing status/control page
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 th... | @author < >
2011
Copyright 2011
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(controller_admin_mailing_status).
-author("Arjan Scherpenisse <>").
-export([
service_available/1,
resource_exis... |
6ab5b7f07a806e3a242d7b842aaec8219166adde76c705c1f43e59450914a3bb | logicmoo/wam_common_lisp | cpl.lisp | -*-Mode : LISP ; Package : PCL ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of derivative w... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/cpl.lisp | lisp | Package : PCL ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export control laws.
warra... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
5e8fa408e474f28105a64c4fbed40c405b987f3a2a8ca8db85c116fc64e473e1 | dgiot/dgiot | modbus_tcp.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_modbus/src/modbus/modbus_tcp.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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(modbus_tcp).
-author("jonhl").
-define(consumer(ChannelId), <<"modbus_consumer_", Chan... |
062bce04384aa6fe3a30195baaf65265122797117dd074a9ec7fcff66fbd80bd | tisnik/clojure-examples | details.clj | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/kafka-describe-cluster/target/default/classes",
:de... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/ad495c2443e542269cf4784fd5cfa62787cdff98/kafka-describe-cluster/doc/details.clj | clojure | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/kafka-describe-cluster/target/default/classes",
:de... | |
a4a7bc1ed099020805cbd414a275b80b45e419c445d390f186680c5bb9408fcc | markostanimirovic/re-action | post_index.cljs | (ns blog.posts.post-index
(:require [blog.posts.resource :as resource]
[re-action.router :as router]
[re-action.core :as re-action]
[re-streamer.core :refer [subscribe]]))
;; === Presentational Components ===
(defn- header [search update-search create]
[:div.card-header.page-he... | null | https://raw.githubusercontent.com/markostanimirovic/re-action/d6cb33d9ac73bedeac4f09996c2c741d21bda7ba/examples/blog/src/blog/posts/post_index.cljs | clojure | === Presentational Components ===
=== Facade ===
=== Container Component === | (ns blog.posts.post-index
(:require [blog.posts.resource :as resource]
[re-action.router :as router]
[re-action.core :as re-action]
[re-streamer.core :refer [subscribe]]))
(defn- header [search update-search create]
[:div.card-header.page-header
[:div.page-title [:h5 "Posts"... |
62a85385f7d8446ff451dae989d963c50c525425d2d4992535baafd40fd3e25b | clojure-interop/google-cloud-clients | ConfigServiceV2Stub.clj | (ns com.google.cloud.logging.v2.stub.ConfigServiceV2Stub
"Base stub class for Stackdriver Logging API.
This class is for advanced usage and reflects the underlying API directly."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.logging.v2.stub ConfigServiceV2Stub]))
(defn ->config-s... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.logging/src/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.clj | clojure | (ns com.google.cloud.logging.v2.stub.ConfigServiceV2Stub
"Base stub class for Stackdriver Logging API.
This class is for advanced usage and reflects the underlying API directly."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.logging.v2.stub ConfigServiceV2Stub]))
(defn ->config-s... | |
ca80d571b55173b43938e258f9c5d5824f49ac28d673e887d6d7af8d0b7e67e1 | EduardoRFS/youtube-channel | lexer.ml | open Sedlexing.Utf8
open Parser
exception Invalid_token
let whitespace = [%sedlex.regexp? Plus (' ' | '\n' | '\t')]
let lower_alpha = [%sedlex.regexp? 'a' .. 'z']
let number = [%sedlex.regexp? '0' .. '9']
let ident = [%sedlex.regexp? lower_alpha, Star (lower_alpha | number | '_')]
let int = [%sedlex.regexp? Plus ... | null | https://raw.githubusercontent.com/EduardoRFS/youtube-channel/941601eabd919edada81660ba6f7eff5ab15cccc/13-parser-for-kids-in-ocaml-with-menhir/code/lexer.ml | ocaml | open Sedlexing.Utf8
open Parser
exception Invalid_token
let whitespace = [%sedlex.regexp? Plus (' ' | '\n' | '\t')]
let lower_alpha = [%sedlex.regexp? 'a' .. 'z']
let number = [%sedlex.regexp? '0' .. '9']
let ident = [%sedlex.regexp? lower_alpha, Star (lower_alpha | number | '_')]
let int = [%sedlex.regexp? Plus ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.