_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 |
|---|---|---|---|---|---|---|---|---|
bfecb4281d425a3eee2c09abfcce4216cd0c32b064a9e86c090e044720b979b1 | cfcs/ocaml-xi-rope | xi_crdt.ml | module type CRDT_element = sig
type t
val equal : t -> t -> bool
val pp : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
end
module CRDT(E: CRDT_element) = struct
type elt = E.t
type author_id = int32 (* a.k.a. vertice "weight" *)
module Author = struct
type t = int32
let pp : t Fmt.t ... | null | https://raw.githubusercontent.com/cfcs/ocaml-xi-rope/052f61d14af11ba0a2306c745cf7a529d1953ee4/lib/xi_crdt.ml | ocaml | a.k.a. vertice "weight"
Int64.max_int TODO
Map of markers -> element
exists solely in t2:
this is NOT topological comparison!
TODO
edges of t1 not in t2
TODO the 'diff' semantics of our stuff differs from that of Set.S, not good.
vertices : unit Markers.t
remove edge e from the graph
check if m has no mo... | module type CRDT_element = sig
type t
val equal : t -> t -> bool
val pp : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
end
module CRDT(E: CRDT_element) = struct
type elt = E.t
module Author = struct
type t = int32
let pp : t Fmt.t = fun ppf t -> Fmt.pf ppf "%ld" t
let equal = Int32... |
455def59d1662c409e03dea105e1728cc67a6da016bc2216f38de651f5671f5e | hammerlab/prohlatype | ints_as_bits.ml | * A utility module where we utilize the bits of an integer .
*
* This is the just the common code that is used in Bitvector .
*
* This is the just the common code that is used in Bitvector.
*)
let width = Sys.word_size - 1
* Index from the least significant bit . We create masks to zero out the most signi... | null | https://raw.githubusercontent.com/hammerlab/prohlatype/3acaf7154f93675fc729971d4c76c2b133e90ce6/src/lib/ints_as_bits.ml | ocaml | * A utility module where we utilize the bits of an integer .
*
* This is the just the common code that is used in Bitvector .
*
* This is the just the common code that is used in Bitvector.
*)
let width = Sys.word_size - 1
* Index from the least significant bit . We create masks to zero out the most signi... | |
8a5eb50bc5b689ffc12c8fae0b2a162f8f32e768c7ab1fb18587b4d337714e28 | ua-parser/uap-clj | core.clj | (ns uap-clj.core
"Core library with entrypoint main function"
(:refer-clojure :exclude [load])
(:require [immuconf.config :as conf :refer [load]]
[uap-clj.conf :refer [base-config
local-config]]
[uap-clj.common :as common :refer :all]
[uap-clj.... | null | https://raw.githubusercontent.com/ua-parser/uap-clj/62ce2aeca0c33444537a5d357a3a24ecce69d0ba/src/uap_clj/core.clj | clojure | For use in production settings where speed may be preferred
in exchange for the tradeoff of increased memory bloat: | (ns uap-clj.core
"Core library with entrypoint main function"
(:refer-clojure :exclude [load])
(:require [immuconf.config :as conf :refer [load]]
[uap-clj.conf :refer [base-config
local-config]]
[uap-clj.common :as common :refer :all]
[uap-clj.... |
11f7bb429c4a25c3d45fae13449ba00ab3980f4734bb028c4858d653c9b7ff2d | clojure-emacs/clojuredocs-export-edn | core.clj | (ns clojuredocs-export-edn.core
(:require
[clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.pprint :as p]))
(def json-url
(or (System/getenv "CLOJUREDOCS_JSON_URL")
"-export.json"))
(def raw-data
(-> json-url
slurp
(json/read-str :key-fn keyword)))
(defn- compact-see-als... | null | https://raw.githubusercontent.com/clojure-emacs/clojuredocs-export-edn/bc0001a190be3698d15410cf90190eae8464d4fb/src/clojuredocs_export_edn/core.clj | clojure | (ns clojuredocs-export-edn.core
(:require
[clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.pprint :as p]))
(def json-url
(or (System/getenv "CLOJUREDOCS_JSON_URL")
"-export.json"))
(def raw-data
(-> json-url
slurp
(json/read-str :key-fn keyword)))
(defn- compact-see-als... | |
9967453bb9d3e2f2de50b486748d0d52ab8db3b213b547e7fcfd05f5e279e7eb | dongcarl/guix | fontutils.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 < >
Copyright © 2014 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 , 2020 < >
Copyright © 2017 < >
Copyright © 2017 < >
Copyright © 2017 Nikita < >
Copyright © 2017 , 2018 , 2020 , 2021 ... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/fontutils.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 < >
Copyright © 2014 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 , 2020 < >
Copyright © 2017 < >
Copyright © 2017 < >
Copyright © 2017 Nikita < >
Copyright © 2017 , 2018 , 2020 , 2021 < >
Copyright © 2018 < >
Copyright © 2018 , 2... |
45c670bde20f940479b66bf7ec2e190e9069d836e2a38f19696e12c3c385db0d | matsen/pplacer | squashfunc.ml | (*
* Inner loop:
* - find minimally distant pair of samples i and j
* - merge them to make k, and normalize
* - remove those pairs from the distance map, then add
* - calcualate distances between i and k and j and k
* - recalculate distances
*
* The main data structures are
* - barkm: the bark map for the cluster... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/squashfunc.ml | ocaml |
* Inner loop:
* - find minimally distant pair of samples i and j
* - merge them to make k, and normalize
* - remove those pairs from the distance map, then add
* - calcualate distances between i and k and j and k
* - recalculate distances
*
* The main data structures are
* - barkm: the bark map for the clusterin... |
open Ppatteries
module type BLOB =
sig
type t
val merge: t -> t -> t
val compare: t -> t -> int
end
module Squash (B: BLOB) =
struct
module OrderedBlob =
struct
type t = B.t
let compare = B.compare
end
module BMap = Map.Make (OrderedBlob)
type cble =
{
... |
831472ec553fb81f87d7f699ca9ef5cc5637feac06bbe907d465318ad7f8317b | input-output-hk/cardano-wallet-legacy | Handlers.hs | module Cardano.Wallet.API.V1.Handlers (handlers) where
import Servant
import Universum
import qualified Cardano.Wallet.API.V1 as V1
import qualified Cardano.Wallet.API.V1.Handlers.Accounts as Accounts
import qualified Cardano.Wallet.API.V1.Handlers.Addresses as Addresses
import qualified Cardano.W... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/API/V1/Handlers.hs | haskell | module Cardano.Wallet.API.V1.Handlers (handlers) where
import Servant
import Universum
import qualified Cardano.Wallet.API.V1 as V1
import qualified Cardano.Wallet.API.V1.Handlers.Accounts as Accounts
import qualified Cardano.Wallet.API.V1.Handlers.Addresses as Addresses
import qualified Cardano.W... | |
b23606423a2f8b53b7ce5e9f7386cb6a70dc0f5ebb557c3016800ae7adf0ae3d | jabber-at/ejabberd | mod_http_fileserver.erl | %%%-------------------------------------------------------------------
%%% File : mod_http_fileserver.erl
Author : < mmirra [ at ] process - one [ dot ] net >
%%% Purpose : Simple file server plugin for embedded ejabberd web server
%%% Created :
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_http_fileserver.erl | erlang | -------------------------------------------------------------------
File : mod_http_fileserver.erl
Purpose : Simple file server plugin for embedded ejabberd web server
Created :
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is dis... | Author : < mmirra [ at ] process - one [ dot ] net >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License alo... |
a4e1f873b1c53738f98089b531a411a420ac4990eff24feb21848fefd1f2c04c | facebook/flow | strictModeSettings.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/789a748ce801e7a25a852c6079395281d9343573/src/common/lints/strictModeSettings.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
1fbbd5739f37ba73103cb73e8b36bc4487549139408ea373d782a7efb751f34b | llvm-hs/llvm-hs-typed | FloatingPointPredicate.hs | -- | This module provides a type-safe variant of "LLVM.AST.FloatingPointPredicate".
-- It is currently a stub
module LLVM.AST.Tagged.FloatingPointPredicate (module LLVM.AST.FloatingPointPredicate) where
import LLVM.AST.FloatingPointPredicate
| null | https://raw.githubusercontent.com/llvm-hs/llvm-hs-typed/efe052cf2a7ac8e6fb8dba1879d75d036f6fcc80/src/LLVM/AST/Tagged/FloatingPointPredicate.hs | haskell | | This module provides a type-safe variant of "LLVM.AST.FloatingPointPredicate".
It is currently a stub | module LLVM.AST.Tagged.FloatingPointPredicate (module LLVM.AST.FloatingPointPredicate) where
import LLVM.AST.FloatingPointPredicate
|
369d8f026a08d33bafb272c4c2b5a50abd44ee0beaf1cd55e9aa15a5ed55fa71 | fossas/fossa-cli | CocoapodsSpec.hs | # LANGUAGE TemplateHaskell #
module Cocoapods.CocoapodsSpec (spec) where
import App.Pathfinder.Types (LicenseAnalyzeProject (licenseAnalyzeProject))
import Data.Text (Text)
import Path (Abs, Dir, File, Path, Rel, mkRelDir, mkRelFile, toFilePath, (</>))
import Path.IO (getCurrentDir)
import Strategy.Cocoapods (Cocoapo... | null | https://raw.githubusercontent.com/fossas/fossa-cli/655961d35782a48cd1aabf99d6c5b0d4ba0edb73/test/Cocoapods/CocoapodsSpec.hs | haskell | # LANGUAGE TemplateHaskell #
module Cocoapods.CocoapodsSpec (spec) where
import App.Pathfinder.Types (LicenseAnalyzeProject (licenseAnalyzeProject))
import Data.Text (Text)
import Path (Abs, Dir, File, Path, Rel, mkRelDir, mkRelFile, toFilePath, (</>))
import Path.IO (getCurrentDir)
import Strategy.Cocoapods (Cocoapo... | |
66deba61a6ca8d189487c660a66b1a7c855f483852fb0eae5a7fd69a43bfad84 | karlhof26/gimp-scheme | cossins_circulaires_02.scm | ; cossins_circulaires.scm
; Download :
;
Copyright ( C ) 2013 samj ( / )
;
; Licence GPL
; Ce fichier est le Script-Fu "cossins_circulaires" pour Gimp.
Ce Script - Fu " cossins_circulaires " est ; vous pouvez le redistribuer ou le modifier suivant les termes de la GNU General Public L... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/2a1258bc3771287f83bd0ae94b6e7341a7bb4371/cossins_circulaires_02.scm | scheme | cossins_circulaires.scm
Download :
Licence GPL
Ce fichier est le Script-Fu "cossins_circulaires" pour Gimp.
vous pouvez le redistribuer ou le modifier suivant les termes de la GNU General Public License
soit la version 3 de la licence , soit ( à ) toute version ultérieure .
Consulte... | Copyright ( C ) 2013 samj ( / )
pas même la à UN OBJECTIF PARTICULIER .
Les résultats sont la somme de 4 mouvements circulaires uniformes . Chaque mouvement circulaire est défini par un rayon , une vitesse de rotation ( fréquence ) , un angle de déphasage , un sens de rotation .
The results are t... |
4c4b79ba9081a3fb48501175ba259358f2ae5a98dc273533af7696b5af76b8cd | sdiehl/paris-fp | JIT.hs | module JIT (
runJIT,
) where
import Protolude
import Data.String (String)
import Data.Int
import Data.Word
import Foreign.Ptr ( FunPtr, castFunPtr )
import Control.Monad.Except
import LLVM.General.Target
import LLVM.General.Context
import LLVM.General.CodeModel
import LLVM.General.Module as Mod
import qualified L... | null | https://raw.githubusercontent.com/sdiehl/paris-fp/d3ab8e0dde9035e17d755355d275ddc3c5bc57e7/src/JIT.hs | haskell | optimization level
code model ( Default )
frame pointer elimination
fast instruction selection
Optimization Passes
runPassManager pm m
Dump assembly code
Return the optimized module | module JIT (
runJIT,
) where
import Protolude
import Data.String (String)
import Data.Int
import Data.Word
import Foreign.Ptr ( FunPtr, castFunPtr )
import Control.Monad.Except
import LLVM.General.Target
import LLVM.General.Context
import LLVM.General.CodeModel
import LLVM.General.Module as Mod
import qualified L... |
414b363051d7d8e6b05c5e52219d79d019e16851fda2da3f3c8a2463822bd632 | thierry-martinez/stdcompat | listLabels.mli | val length : 'a list -> int
val hd : 'a list -> 'a
val compare_lengths : 'a list -> 'b list -> int
val compare_length_with : 'a list -> len:int -> int
val cons : 'a -> 'a list -> 'a list
val tl : 'a list -> 'a list
val nth : 'a list -> int -> 'a
val nth_opt : 'a list -> int -> 'a option
val rev : 'a list -> 'a list
val... | null | https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/4.06/listLabels.mli | ocaml | val length : 'a list -> int
val hd : 'a list -> 'a
val compare_lengths : 'a list -> 'b list -> int
val compare_length_with : 'a list -> len:int -> int
val cons : 'a -> 'a list -> 'a list
val tl : 'a list -> 'a list
val nth : 'a list -> int -> 'a
val nth_opt : 'a list -> int -> 'a option
val rev : 'a list -> 'a list
val... | |
f3c1be2ae118efc4e8bc10a9ecb4f9bf698624d981d1dbe2cef1ec94f5858708 | brendanhay/amazonka | BrowserType.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/Types/BrowserType.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Module : A... |
4a0dbc1cba6c33ea6d802cf9e15be9d51c61c5e2541c90ddc11dc33861e5d630 | stevenvar/OMicroB | qhtbl.mli | using physical equality to compare keys instead of structural equality .
type ('k, 'v) t
val create : unit -> ('k, 'v) t
val put : ('k, 'v) t -> 'k -> 'v -> unit
val mem : ('k, 'v) t -> 'k -> bool
val del : ('k, 'v) t -> 'k -> unit
val find : ('k, 'v) t -> 'k -> 'v
| null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/src/bc2c/qhtbl.mli | ocaml | using physical equality to compare keys instead of structural equality .
type ('k, 'v) t
val create : unit -> ('k, 'v) t
val put : ('k, 'v) t -> 'k -> 'v -> unit
val mem : ('k, 'v) t -> 'k -> bool
val del : ('k, 'v) t -> 'k -> unit
val find : ('k, 'v) t -> 'k -> 'v
| |
0049ab550279699dc41f48d3bf43b38c6c2e29ef02f454f6aa67c785ae4f0847 | LaurentMazare/ocaml-dataframe | basics.ml | open! Base
open! Dataframe
open Df.R.Let_syntax
let col_pi = "pi"
let col_e1 = "e"
let col_e2 = "sum_n 1/n!"
let () =
let pi = Column.of_int_array [| 3; 1; 4; 1; 5; 9; 2; 6; 5 |] in
let e = Column.of_float_array [| 2.; 7.; 1.; 8.; 2.; 8.; 1.; 8.; 2. |] in
let df = Df.create_exn [ col_e1, P e; col_pi, P pi; col_... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-dataframe/89bd3cb4035db505ac516303b04f4de7ffdff0be/examples/basics.ml | ocaml | open! Base
open! Dataframe
open Df.R.Let_syntax
let col_pi = "pi"
let col_e1 = "e"
let col_e2 = "sum_n 1/n!"
let () =
let pi = Column.of_int_array [| 3; 1; 4; 1; 5; 9; 2; 6; 5 |] in
let e = Column.of_float_array [| 2.; 7.; 1.; 8.; 2.; 8.; 1.; 8.; 2. |] in
let df = Df.create_exn [ col_e1, P e; col_pi, P pi; col_... | |
dc0e18faf54e0ddc4b1a6b3830dfceb0b4314e6b863372f7842490ec3749393f | janestreet/core_bench | defaults.mli | * A module internal to [ Core_bench ] . Please look at { ! Bench } .
Many of the default settings are here .
Many of the default settings are here. *)
open! Core
val columns_as_string : string list
val command_columns : Bench_command_column.t list
val display : Ascii_table_kernel.Display.t
val display_as_s... | null | https://raw.githubusercontent.com/janestreet/core_bench/746d2440aa10795f1ef286df64be46e7d4ff768c/internals/defaults.mli | ocaml | * A module internal to [ Core_bench ] . Please look at { ! Bench } .
Many of the default settings are here .
Many of the default settings are here. *)
open! Core
val columns_as_string : string list
val command_columns : Bench_command_column.t list
val display : Ascii_table_kernel.Display.t
val display_as_s... | |
d92b937733d8ed11156bf2503ee437d8b35d92e208a4aef15d429461fc7b6a23 | choptastic/qdate | qdate.erl | % vim: ts=4 sw=4 et
Copyright ( c ) 2013 - 2019
% See LICENSE for licensing information.
%
-module(qdate).
%-compile(export_all).
-export([
start/0,
stop/0
]).
-export([
to_string/1,
to_string/2,
to_string/3,
to_string/4,
to_date/1,
to_date/2,
to_date/3,
to_now/1,
to_n... | null | https://raw.githubusercontent.com/choptastic/qdate/c5971cdcf46a6ce41fc54171a072843127509ae0/src/qdate.erl | erlang | vim: ts=4 sw=4 et
See LICENSE for licensing information.
-compile(export_all).
Exported for API compatibility with ec_date
it may seem odd that we're ensuring it here, and then again
the actual name for the strings for the PHP "T" and "e", so
we extract the Timezone in case ToTZ is actually a timezone key
Then ... | Copyright ( c ) 2013 - 2019
-module(qdate).
-export([
start/0,
stop/0
]).
-export([
to_string/1,
to_string/2,
to_string/3,
to_string/4,
to_date/1,
to_date/2,
to_date/3,
to_now/1,
to_now/2,
to_unixtime/1,
to_unixtime/2,
unixtime/0
]).
-export([
beginnin... |
2b29d8cad8773d9d29d2f8c7c48d35245165fb9952b6eeed1a5e9f064b164ea1 | diogob/postgres-websockets | Broadcast.hs | # LANGUAGE DeriveGeneric #
-- |
Module : PostgresWebsockets . Broadcast
-- Description : Distribute messages from one producer to several consumers.
--
PostgresWebsockets functions to broadcast messages to several listening clients
This module provides a type called Multiplexer .
-- The multiplexer contain... | null | https://raw.githubusercontent.com/diogob/postgres-websockets/040cdde9bf787bcd5d124c1779e7fe6bc548b2d1/src/PostgresWebsockets/Broadcast.hs | haskell | |
Description : Distribute messages from one producer to several consumers.
The multiplexer contains a map of channels and a producer thread.
the database logic is combined.
* Re-exports
| Given a multiplexer derive a type that can be printed for debugging or logging purposes
| Opens a thread that relays messa... | # LANGUAGE DeriveGeneric #
Module : PostgresWebsockets . Broadcast
PostgresWebsockets functions to broadcast messages to several listening clients
This module provides a type called Multiplexer .
This module avoids any database implementation details , it is used by HasqlBroadcast where
module PostgresWe... |
71a82dff3961480f8eaabf2e12ec6253c7f6d7d6fe5f104c31340659d7131d5a | sbcl/sbcl | octets.lisp | ;;;; code for string to octet conversion
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain ... | null | https://raw.githubusercontent.com/sbcl/sbcl/077affa9121970175d78296c41d4793f62d96e13/src/code/octets.lisp | lisp | code for string to octet conversion
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
don't like the idea of trying to do CODE-CHAR #x<big>. Is that a
justified fear? Can we arrange that it... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
FIXME : The stuff is currently # + sb - unicode , because I
a decoding error error ? Or should we just give up on non ... |
51dc69cb0ff214c222af0c074d247499a48debdbb14b443f9f4a78a2777273e9 | elli-lib/elli | elli_tests.erl | -module(elli_tests).
-include_lib("eunit/include/eunit.hrl").
-include("elli.hrl").
-include("elli_test.hrl").
-define(README, "README.md").
-define(VTB(T1, T2, LB, UB),
time_diff_to_micro_seconds(T1, T2) >= LB andalso
time_diff_to_micro_seconds(T1, T2) =< UB).
-ifdef(OTP_RELEASE).
-include_lib("kernel... | null | https://raw.githubusercontent.com/elli-lib/elli/2f2fafb77c67244ba6237ca6b3c7238ff886c478/test/elli_tests.erl | erlang | POST /foo/bar
GET /foo/bar
Integration tests
sizes
timings
check timings
pause between keep-alive requests,
request_start is a timestamp of
sizes
timings
check timings
sizes
timings
sizes
timings
check timings
Send Result of the body
Slow client, sending only the specified byte size every millisecond
... | -module(elli_tests).
-include_lib("eunit/include/eunit.hrl").
-include("elli.hrl").
-include("elli_test.hrl").
-define(README, "README.md").
-define(VTB(T1, T2, LB, UB),
time_diff_to_micro_seconds(T1, T2) >= LB andalso
time_diff_to_micro_seconds(T1, T2) =< UB).
-ifdef(OTP_RELEASE).
-include_lib("kernel... |
382c46716c816e34fd96e4eefeea7665d7423f388902978a19845e508ff11256 | nuvla/api-server | credential_hashed_password_test.cljc | (ns sixsq.nuvla.server.resources.spec.credential-hashed-password-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.credential :as cred]
[sixsq.nuvla.server.resources.spec.credential-hashed-password :as hashed-pwd]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]))... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/credential_hashed_password_test.cljc | clojure | mandatory keywords | (ns sixsq.nuvla.server.resources.spec.credential-hashed-password-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.credential :as cred]
[sixsq.nuvla.server.resources.spec.credential-hashed-password :as hashed-pwd]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]))... |
2b7d2ea5f86028401e3b641c2f7a5975b7462caefc8a58f385678855066bfff8 | opencog/learn | degree.scm | ;
; degree.scm
;
Scripts for graphing the degree .
Used in Diary Part Six .
;
; Loop over left-basis, and bincount:
; support (this is the degree)
; count (this is the "weighted" degree, the degree "with multiplicity")
;
(define (degree-plot LLOBJ NBINS LO HI FILE VALFN WEIFN)
(define lwords (LLOBJ 'left-basis))... | null | https://raw.githubusercontent.com/opencog/learn/7a80197c26b0692548280dda7c6ad56658e09637/learn-lang-diary/utils/degree.scm | scheme |
degree.scm
Loop over left-basis, and bincount:
support (this is the degree)
count (this is the "weighted" degree, the degree "with multiplicity")
For each left-word, the right-support is the "degree" of that node.
Same as above, but uniform x-scale
Same as above, but the counted degree (i.e. "with multiplici... | Scripts for graphing the degree .
Used in Diary Part Six .
(define (degree-plot LLOBJ NBINS LO HI FILE VALFN WEIFN)
(define lwords (LLOBJ 'left-basis))
(define sup-obj (add-support-api LLOBJ))
(define bins (bin-count lwords NBINS VALFN WEIFN LO HI))
(define oport (open-file FILE "w"))
(print-bincounts-tsv... |
f980b8ddb4d08db660d4884da7ad55753f105c7bafdcf7e9046025a57e9f425b | BSeppke/vigracket | impex.rkt | #lang racket
(require vigracket/config)
(require vigracket/carray)
(require vigracket/helpers)
(require scheme/foreign)
(unsafe!)
# # # # # # # # # # # # Getting Dimensions and # of Bands of an image - file # # # # # # # # # # # #
(define vigra_imagewidth_c
(get-ffi-obj 'vigra_imagewidth_c vigracket-dylib-pat... | null | https://raw.githubusercontent.com/BSeppke/vigracket/077734ab5376e6bbf5600eb813225428d02838c0/impex.rkt | racket | #lang racket
(require vigracket/config)
(require vigracket/carray)
(require vigracket/helpers)
(require scheme/foreign)
(unsafe!)
# # # # # # # # # # # # Getting Dimensions and # of Bands of an image - file # # # # # # # # # # # #
(define vigra_imagewidth_c
(get-ffi-obj 'vigra_imagewidth_c vigracket-dylib-pat... | |
c66558b95252f5c8fb0bb3c7d4ae3b04863241bd96f4339268d3c5dd3d5dc739 | samrushing/irken-compiler | f_anno1.scm |
(datatype bool (:true) (:false))
(define (thing:(int -> int) x)
3)
(thing #f)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/f_anno1.scm | scheme |
(datatype bool (:true) (:false))
(define (thing:(int -> int) x)
3)
(thing #f)
| |
40cdd88622cbda153c94ef817e4465328e10cf4da6b6aaa0b4029af68a41ed2a | vseloved/cl-nlp | general.lisp | ( c ) 2013 - 2017 Vsevolod Dyomkin
(in-package #:nlp.tagging)
(named-readtables:in-readtable rutilsx-readtable)
(defgeneric tag (model sent)
(:documentation
"Tag a SENTence with the algorithm specific to MODEL."))
(defclass tagger ()
()
(:documentation
"A tagger adds tags to sentence tokens."))
(def... | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/tagging/general.lisp | lisp | ( c ) 2013 - 2017 Vsevolod Dyomkin
(in-package #:nlp.tagging)
(named-readtables:in-readtable rutilsx-readtable)
(defgeneric tag (model sent)
(:documentation
"Tag a SENTence with the algorithm specific to MODEL."))
(defclass tagger ()
()
(:documentation
"A tagger adds tags to sentence tokens."))
(def... | |
4de4f343a65654de6f974c313882374ee947ed5ed4cbefe97e34cd7af952e642 | benoitc-attic/barrel_tcp | barrel_listener.erl | %%% -*- erlang -*-
%%%
This file is part of barrel released under the MIT license .
%%% See the NOTICE for more information.
-module(barrel_listener).
-behaviour(gen_server).
-export([get_port/1,
info/1, info/2,
set_max_clients/2, get_max_clients/1,
set_nb_acceptors/2, get_nb_acceptors/1,... | null | https://raw.githubusercontent.com/benoitc-attic/barrel_tcp/e689d0f4286b97462e0fda455f87501dc0ef4487/src/barrel_listener.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
internal API
gen_server callbacks
@doc get current port
@doc get all infos
@doc get info for some keys
@doc set max number of concurrent clients
@doc get max number of concurrent clients
@doc set the number of acceptors
@doc get the number of acceptors
@d... | This file is part of barrel released under the MIT license .
-module(barrel_listener).
-behaviour(gen_server).
-export([get_port/1,
info/1, info/2,
set_max_clients/2, get_max_clients/1,
set_nb_acceptors/2, get_nb_acceptors/1,
set_protocol_conf/4, get_protocol_conf/1,
rem... |
e2138923765d4c5c5fa8c2e17c32f633949afcf69540941a6a44208206ca048b | helpshift/hydrox | checks.clj | (ns hydrox.doc.checks
(:require [jai.query :as query]
[rewrite-clj.zip :as source]
[rewrite-clj.node :as node]))
(def directives
#{:article :file :reference :ns
:appendix :chapter
:section :subsection :subsubsection
:image :paragraph :code
:equation :citation})
(defn wrap-m... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/src/hydrox/doc/checks.clj | clojure | (ns hydrox.doc.checks
(:require [jai.query :as query]
[rewrite-clj.zip :as source]
[rewrite-clj.node :as node]))
(def directives
#{:article :file :reference :ns
:appendix :chapter
:section :subsection :subsubsection
:image :paragraph :code
:equation :citation})
(defn wrap-m... | |
61d464577d0b7db80d91255199ba5a15b9e4cf2ff8eedbcacbddce7888a92266 | lucasdicioccio/deptrack-project | DevVM.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Main where
import Control.Monad (forM, void)
import Data.Text (pack)
import Devops.Base (DevOp)
import Devops.Bootstrap.Build
impor... | null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-examples/app/DevVM.hs | haskell | # LANGUAGE OverloadedStrings #
| Assumes a homogeneous env.
| Stages of execution of this application
^ The binary was called (e.g., by a human) on the local-host.
^ The binary was called remotely
------------------------------------------------------------------
prepare callbacks for binary calls
the droplet
th... | # LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Main where
import Control.Monad (forM, void)
import Data.Text (pack)
import Devops.Base (DevOp)
import Devops.Bootstrap.Build
import Devops.Bootstrap.DO
imp... |
837d16ab517a79083229a7aee6db6b47a926d964d8645cf0f4e2dd829bba1e9f | haskell-foundation/foundation | Primitive.hs | -- |
-- Module : Foundation.Primitive
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
--
# LANGUAGE FlexibleInstances #
module Foundation.Primitive
( PrimType(..)
, PrimMonad(..)
-- * endianess
, ByteSwap
, LE(..), toLE, fromLE
... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/Primitive.hs | haskell | |
Module : Foundation.Primitive
License : BSD-style
Stability : experimental
Portability : portable
* endianess
* Integral convertion
* Evaluation
* These
* Block of memory
* Ascii | Maintainer : < >
# LANGUAGE FlexibleInstances #
module Foundation.Primitive
( PrimType(..)
, PrimMonad(..)
, ByteSwap
, LE(..), toLE, fromLE
, BE(..), toBE, fromBE
, IntegralUpsize(..)
, IntegralDownsize(..)
, NormalForm(..)
, force
, deepseq
, These(..)
, Blo... |
deb6c40e2a8e3938c269103a9ab1bc5e3ee4456c8ed909e38399312a76608832 | PDP-10/panda | privob.lsp | ;;; -*-LISP-*-
;;; Standard way to create a private obarray, starting with a copy
;;; of the current (standard) obarray, and adding some new symbols
;;; to be shared between the standard and the new one, and getting
;;; private copies of some (possibly already existing) symbols for
;;; the private obar... | null | https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/maclisp/privob.lsp | lisp | -*-LISP-*-
Standard way to create a private obarray, starting with a copy
of the current (standard) obarray, and adding some new symbols
to be shared between the standard and the new one, and getting
private copies of some (possibly already existing) symbols for
the private obarray. Normally, the ... |
STANDARD - OBARRAY , and PRIVATE - OBARRAY would appear as global
These lines must be done first , before any other actions , so that the
(PROGN (SETQ STANDARD-OBARRAY OBARRAY
PRIVATE-OBARRAY (COND ((BOUNDP 'PRIVATE-OBARRAY) PRIVATE-OBARRAY)
((*ARRAY () 'OBARRAY))))
(AND (OR (NOT... |
473221e5601bc6354a8b1702a0878e27831877ab807d1e21c82d255f4c13dce6 | clash-lang/ghc-typelits-natnormalise | ErrorTests.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StandaloneDeriving #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# L... | null | https://raw.githubusercontent.com/clash-lang/ghc-typelits-natnormalise/f089f6bd91af2038cdc5b60f28d10bc8d1079a23/tests/ErrorTests.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fdefer-type-errors #
# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise # | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
#if __GLASGOW_HASKELL__ >= 805
# LANGUAGE NoStarIsType #
#endif
module ErrorTests where
import Data.Proxy
... |
48164e0d9e0fe4192c12a0c7df23b19a987fd04b86915d518f917ea2f515caeb | FundingCircle/fc4-framework | cloverage.clj | (ns fc4.test-runner.cloverage
"An adapter that enables Cloverage to use this project’s custom test-runner
(which is really just a test-runner-runner that runs eftest with some
specific options)."
(:require [cloverage.coverage :as cov]
[fc4.test-runner.runner :as runner]))
;; This is based on
;; an... | null | https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/test/fc4/test_runner/cloverage.clj | clojure | This is based on
and the structure of the below function, and the comment that precedes it, come from that file.
This is a copy of the clojure.test runner which ships with cloverage | (ns fc4.test-runner.cloverage
"An adapter that enables Cloverage to use this project’s custom test-runner
(which is really just a test-runner-runner that runs eftest with some
specific options)."
(:require [cloverage.coverage :as cov]
[fc4.test-runner.runner :as runner]))
but with clojure.test s... |
56097d886eeaa34198b0df11ea6cbee3772d536729fd8ac9437519542d714f15 | zhuangxm/clj-rpc | user_data.clj | (ns clj-rpc.user-data
(:require [clojure.tools.logging :as logging]
[ring.middleware.session.store :as store]
[clj-rpc.simple-store :as simple-store])
(:import [java.util.concurrent ScheduledThreadPoolExecutor TimeUnit]))
;;user data format
;;data is the actual user data
last - visit is the... | null | https://raw.githubusercontent.com/zhuangxm/clj-rpc/73a2f66b5ed0cce865d102acb49ba229203343ad/src/clj_rpc/user_data.clj | clojure | user data format
data is the actual user data
define the user relate data.
the datas like : {"key" (atom {:data data :last-visit last-visit}) ...}
define user relate token, used for binding to per request
clean the user data that has been expired. | (ns clj-rpc.user-data
(:require [clojure.tools.logging :as logging]
[ring.middleware.session.store :as store]
[clj-rpc.simple-store :as simple-store])
(:import [java.util.concurrent ScheduledThreadPoolExecutor TimeUnit]))
last - visit is the last visited time ( use System / currentTimeMilli... |
994a9255c5f6816d1e93e0afc0e9e641d0becbf0425bed811d5e3f9866026c89 | spell-music/csound-expression | Constants.hs | module Csound.Typed.Constants(
infiniteDur
) where
infiniteDur :: Num a => a
a week
| null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression-typed/src/Csound/Typed/Constants.hs | haskell | module Csound.Typed.Constants(
infiniteDur
) where
infiniteDur :: Num a => a
a week
| |
dbe3105316272c7b5999cef2c12abb5921e3462b3ad34ae4616e2f5e38dd3eef | Dasudian/DSDIN | dsdvm_store_tests.erl | %%%-------------------------------------------------------------------
( C ) 2017 , Dasudian Technologies
%%% @doc Basic tests for dsdvm
%%% @end
%%%-------------------------------------------------------------------
-module(dsdvm_store_tests).
-include_lib("eunit/include/eunit.hrl").
init_test() ->
#{ storag... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdvm/test/dsdvm_store_tests.erl | erlang | -------------------------------------------------------------------
@doc Basic tests for dsdvm
@end
------------------------------------------------------------------- | ( C ) 2017 , Dasudian Technologies
-module(dsdvm_store_tests).
-include_lib("eunit/include/eunit.hrl").
init_test() ->
#{ storage := #{} } = dsdvm_eeevm_store:init(#{}, #{ storage => undef}),
A = 1 bsl 255,
V = 2,
K = <<A:256>>,
Val = <<V:256>>,
#{ storage := #{A := V} } = dsdvm_eeevm_st... |
8e5e5617db18fcd704688e5d09677637482de842d0fc5d66ba35a60573ae2b91 | Bluehouse-Technology/otter | otter_sup.erl | %%%-------------------------------------------------------------------
Licensed to the Apache Software Foundation ( ASF ) under one
%%% or more contributor license agreements. See the NOTICE file
%%% distributed with this work for additional information
%%% regarding copyright ownership. The ASF licenses this file
... | null | https://raw.githubusercontent.com/Bluehouse-Technology/otter/242faffefbb2e15865a9b681b6a5fff2d0580b2b/src/otter_sup.erl | erlang | -------------------------------------------------------------------
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"License"); you may not use this file except in compliance
-2.0
Unle... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
with the License . You may obtain a copy of the License at
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(otter_sup... |
560239720548dfac214dc39e30099e22525f70f2d27098d36b4c52020767b43a | mauny/the-functional-approach-to-programming | games_ane_rouge_pictures.ml |
Dessin du Jeu
#directory "../MLGRAPH.DIR";;
#open "MLgraph";;
#directory "../Util";;
#directory "../Arbres";;
#open "option";;
#open "graph";;
#open "prelude";;
#open "binary_trees";;
#open "sets";;
#open "games";;
#open "games_ane_rouge";;
#infix "o";;
let size = 40.0;;
let interspace = 2.5;;
let ext= 5.0;;
... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Graphes/games_ane_rouge_pictures.ml | ocaml |
Dessin du Jeu
#directory "../MLGRAPH.DIR";;
#open "MLgraph";;
#directory "../Util";;
#directory "../Arbres";;
#open "option";;
#open "graph";;
#open "prelude";;
#open "binary_trees";;
#open "sets";;
#open "games";;
#open "games_ane_rouge";;
#infix "o";;
let size = 40.0;;
let interspace = 2.5;;
let ext= 5.0;;
... | |
f9f352da06bd7bb449c813ee9bbf2fc90512d07755bd266dfa082cc464051821 | travitch/llvm-analysis | UsesOf.hs | module LLVM.Analysis.UsesOf (
UseSummary,
computeUsesOf,
usedBy
) where
import qualified Data.Foldable as F
import Data.HashMap.Strict ( HashMap )
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.Maybe ( fromMaybe )
import LLVM.Analysis
data UseSummary = UseSummary (... | null | https://raw.githubusercontent.com/travitch/llvm-analysis/090c3484650552e620d02c5ddc7885267e04ac62/src/LLVM/Analysis/UsesOf.hs | haskell | | Compute the uses of every value in the 'Module'
This information can be used to answer the query:
which will return all of the Instructions that reference
the provided value @foo@.
Note that this is a simple index. It does not look through bitcasts
at all.
computed for. | module LLVM.Analysis.UsesOf (
UseSummary,
computeUsesOf,
usedBy
) where
import qualified Data.Foldable as F
import Data.HashMap.Strict ( HashMap )
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.Maybe ( fromMaybe )
import LLVM.Analysis
data UseSummary = UseSummary (... |
10edd25a314aff05990d3f3476521f66b8dfa455a94d556fb0b16b79ae529a64 | mwand/eopl3 | top.scm | (module top (lib "eopl.ss" "eopl")
;; top level module. Loads all required pieces.
;; Run the test suite with (run-all).
(require "drscheme-init.scm")
(require "data-structures.scm") ; for expval constructors
(require "lang.scm") ; for scan&parse
(require "interp.scm") ; for valu... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter4/mutable-pairs/top.scm | scheme | top level module. Loads all required pieces.
Run the test suite with (run-all).
for expval constructors
for scan&parse
for value-of-program
for test-list
interface for book test ;;;
interface to test harness ;;;;;;;;;;;;;;;;
run-all : () -> Unspecified
runs all the tests in test-list, comparing the results w... | (module top (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(provide run run-all)
(provide test-all)
(define (test-all)
(run-all))
run : String - > ExpVal
(define run
(lambda (string)
(value-of-program (scan&parse string))))
(define run-all
(lambda ()
(run-t... |
b1c4bc8cb2006e8104aaf3d9f300eca700c6c6ea62de369805a7700ce1d56a9c | edicl/cl-gd | strings.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - GD ; Base : 10 -*-
$ Header : /usr / local / cvsrep / gd / strings.lisp , v 1.24 2009/11/23 17:05:39 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modifi... | null | https://raw.githubusercontent.com/edicl/cl-gd/0e1812a38f93ece0c3b183a92be6e440cecfd7e6/strings.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - GD ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the f... | $ Header : /usr / local / cvsrep / gd / strings.lisp , v 1.24 2009/11/23 17:05:39 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :cl-g... |
9004d7dc47b922767353e64ab4e8e8228d60031a07f888346692d0058ad02547 | ijvcms/chuanqi_dev | gen_fsm2.erl | %%%-------------------------------------------------------------------
@author zhengsiying
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 01 . 九月 2015 下午8:17
%%%-------------------------------------------------------------------
-module(gen_fsm2).
%% API
-export([
cancel_timer/1,
send_event_after/3... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/api/gen_fsm2.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
====================================================================
==========... | @author zhengsiying
( C ) 2015 , < COMPANY >
Created : 01 . 九月 2015 下午8:17
-module(gen_fsm2).
-export([
cancel_timer/1,
send_event_after/3
]).
cancel_timer(Ref) when is_reference(Ref) ->
gen_fsm:cancel_timer(Ref);
cancel_timer(_) ->
ok.
send_event_after(Ref, Time, Event) ->
cancel_timer(Ref),
gen_fsm:s... |
e53d0d2a95b29ff518833e8082c7fe860164f15608a50d1116cec7bd1ce3ca2c | PacktWorkshops/The-Clojure-Workshop | api.clj | (ns packt-clj.fitness.api
(:require
[clojure.edn :as edn]
[compojure.core :refer [context defroutes DELETE GET PUT POST]]
[compojure.route :as route]
[muuntaja.middleware :as middleware]
[packt-clj.fitness.ingest :as ingest]
[packt-clj.fitness.query :as query]
[packt-clj.fitness.schema :as... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter14/Exercise14.06/src/packt_clj/fitness/api.clj | clojure | (ns packt-clj.fitness.api
(:require
[clojure.edn :as edn]
[compojure.core :refer [context defroutes DELETE GET PUT POST]]
[compojure.route :as route]
[muuntaja.middleware :as middleware]
[packt-clj.fitness.ingest :as ingest]
[packt-clj.fitness.query :as query]
[packt-clj.fitness.schema :as... | |
ef7aed697c5a5e6fb6726ff5a2ac58eb308336da1fc71b59011e8b780565be9e | tmfg/mmtis-national-access-point | company.clj | (ns ote.tasks.company
"Scheduled tasks to update company CSVs and stats."
(:require [chime :refer [chime-at]]
[ote.tasks.util :refer [daily-at]]
[clj-time.core :as t]
[clj-time.periodic :refer [periodic-seq]]
[com.stuartsierra.component :as component]
[jee... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/clj/ote/tasks/company.clj | clojure | (ns ote.tasks.company
"Scheduled tasks to update company CSVs and stats."
(:require [chime :refer [chime-at]]
[ote.tasks.util :refer [daily-at]]
[clj-time.core :as t]
[clj-time.periodic :refer [periodic-seq]]
[com.stuartsierra.component :as component]
[jee... | |
58cc583351162a6cb4417972488559a72981f6022658a01927dfd920a059fda6 | onedata/op-worker | dir_stats_test_utils.erl | %%%--------------------------------------------------------------------
@author
( C ) 2011 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
Test utils for dir stats collectin... | null | https://raw.githubusercontent.com/onedata/op-worker/5e8f0155437481fb0cafbab26d887c6fe95a263f/test_distributed/utils/dir_stats_test_utils.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
@end
--------------------------------------------------------------------
API
===================================================================
API
=================... | @author
( C ) 2011 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
Test utils for dir stats collecting .
-module(dir_stats_test_utils).
-author("Michal Wrzeszcz").
-include_lib("ctool/include/test/test_utils.hrl").
-export([disable_stats_counting_ct_posthook/... |
7fd30a8966e20fb1d67a22e99ce1bdb2433a1a5d0218144b4744287546e938c9 | nomeata/haskell-candid | FieldName.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
This module keeps the FieldName type abstract ,
-- to ensure that the field name hash is correct
module Codec.Candid.FieldName
( FieldName
, labledField
, hashedField
, fieldHash
, candidHash
, invertHash
, unescapeFieldName
, escapeF... | null | https://raw.githubusercontent.com/nomeata/haskell-candid/df42f6ceaac8f6d271e4cd33d915a6c6d9f50c7b/src/Codec/Candid/FieldName.hs | haskell | # LANGUAGE OverloadedStrings #
to ensure that the field name hash is correct
^ Extract the raw field hash value
| Create a 'FieldName' from a label
| Create a 'FieldName' from the raw hash
| The inverse of 'escapeFieldName'
| Represent a 'FieldName' (which may be numeric) in contexts where only text
This used i... | # LANGUAGE ScopedTypeVariables #
This module keeps the FieldName type abstract ,
module Codec.Candid.FieldName
( FieldName
, labledField
, hashedField
, fieldHash
, candidHash
, invertHash
, unescapeFieldName
, escapeFieldName
) where
import qualified Data.Text as T
import Prettyprinter
import Data... |
489edb8dc828ee1632a18938374c589943e67280e60f7a3e9802a3c1b1ae9cb9 | ghcjs/jsaddle-dom | CryptoKey.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CryptoKey
(getType, getExtractable, getAlgorithm, getUsages, CryptoKey(..),
gTypeCryptoKey)
where
im... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/CryptoKey.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CryptoKey
(getType, getExtractable, getAlgorithm, getUsages, CryptoKey(..),
gTypeCryptoKey)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegra... |
889207f9e2ff6363c6bf0fd9c6377d856ef48f08d832e2034e38c6ea6d727ff7 | reanimate/reanimate | bug_quad.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
import Reanimate.Morph.Common
import Reanimate.Morph.Linear
main :: IO ()
main = reanimate $ docEnv $ scene $ do
play $ animate $ \t -> morph rawLinear src dst t
where
src... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/bug_quad.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
import Reanimate.Morph.Common
import Reanimate.Morph.Linear
main :: IO ()
main = reanimate $ docEnv $ scene $ do
play $ animate $ \t -> morph rawLinear src dst t
where
src = mkPathString "M 0 0 q 1 1, 2 0 z"... |
6b5b8d88601230967a6b1a8c1930e33752add5fd2188ffa32140ba32fb1518d4 | effectfully-ou/sketches | TF.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE MagicHash #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamili... | null | https://raw.githubusercontent.com/effectfully-ou/sketches/7b512a529292e8c4bce80526b3f2b938f8cc8e60/avoid-overlapping-recursive/src/TF.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module TF where
import GHC.Exts (Proxy#, proxy#)
data N = Z | S N
type family Domain ab whe... |
3ae657aa92f4e46ea830e41eed624240b9d6b0450ea44f7999dab7dc8956eb45 | bmeurer/ocaml-arm | printast.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/parsing/printast.mli | ocaml | *********************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Parsetree;;
open Format;;
... |
bfdcf92c5998cced02db205642a54c0fc5794b3c89d96136893aa3fd963eb505 | cmcl/franklyfrank | typingPatternMatching.ml | (* A small test file for typing pattern matching compilation module. *)
open ErrorHandling
open Lexer
open Lexing
open ListUtils
open MidEvaluator
open EvalComp
open MidTranslate
open MidTree
open MidTyping
open ParseTree
open ParseTreeBuilder
open PatternMatching
open Printf
open Utility
let print_position outx lexb... | null | https://raw.githubusercontent.com/cmcl/franklyfrank/6cc1c4f7377ea2a907675ec0fae9ff32829cec83/mid/typingPatternMatching.ml | ocaml | A small test file for typing pattern matching compilation module.
Make it optional to include the dot at the end of a sentence and
also guard against special cases e.g. line ends in a comment or we
encountered a blank line.
Multi-line comment encountered.
Eat entire comment.
String encountered.
Eat... |
open ErrorHandling
open Lexer
open Lexing
open ListUtils
open MidEvaluator
open EvalComp
open MidTranslate
open MidTree
open MidTyping
open ParseTree
open ParseTreeBuilder
open PatternMatching
open Printf
open Utility
let print_position outx lexbuf =
let pos = lexbuf.lex_curr_p in
fprintf outx "%s:%d:%d" pos.pos_... |
abc9692f27b797c6ab7b81b820f44bf5899874e3a5313bb9f0e9ea3da25f9adc | janestreet/async_unix | async_sys.ml | open Core
open Import
module Unix = Unix_syscalls
let argv = (Sys.argv [@warning "-3"])
let get_argv = Sys.get_argv
let executable_name = Sys_unix.executable_name
let wrap1 f x1 = In_thread.run (fun () -> f x1)
let wrap2 f x1 x2 = In_thread.run (fun () -> f x1 x2)
let when_file_changes
?(time_source = Time_sour... | null | https://raw.githubusercontent.com/janestreet/async_unix/e38241dc5c2ffad9842b0100ffbc44fb7941bfe2/src/async_sys.ml | ocaml | open Core
open Import
module Unix = Unix_syscalls
let argv = (Sys.argv [@warning "-3"])
let get_argv = Sys.get_argv
let executable_name = Sys_unix.executable_name
let wrap1 f x1 = In_thread.run (fun () -> f x1)
let wrap2 f x1 x2 = In_thread.run (fun () -> f x1 x2)
let when_file_changes
?(time_source = Time_sour... | |
31bc63513dfc670d2a350eda866e947ec91a6b6b028fda2b0eec9510e5166e18 | backtracking/mlpost | tree6.ml | open Mlpost
open Tree
let fig =
[
draw ~edge_style:HalfSquare
(node "1"
[ node "2" [ leaf "4"; leaf "5" ]; node "3" [ leaf "6"; leaf "7" ] ]);
]
let _ = Metapost.emit "tree6" fig
| null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/presentations/proval/tree6.ml | ocaml | open Mlpost
open Tree
let fig =
[
draw ~edge_style:HalfSquare
(node "1"
[ node "2" [ leaf "4"; leaf "5" ]; node "3" [ leaf "6"; leaf "7" ] ]);
]
let _ = Metapost.emit "tree6" fig
| |
407e3816857cafdd32ffe88d299eba5e71f77009c93fa23475216aef607101e4 | project-oak/hafnium-verification | CPredicatesOnTwoNodes.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/al/CPredicatesOnTwoNodes.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
a2d5df02d104c07382654fd68f47d9d5ba5f1e81177e4f6c1057daeb967d057d | rescript-lang/rescript-compiler | js_option.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/js_option.ml | ocaml | * Provide utilities for handling `option`.
*
Wraps the given value in `Some()`
```res example
Js.Option.some(1066) == Some(1066)
```
*
Returns `true` if the argument is `Some(value)`; `false` if the argument is
`None`.
* Returns `true` if the argument is `None`; `false` otherwise.
*
If the argument t... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
4efd665c2a0ec4096d358b8ebcdf127505766c8eea5ead951490109902a065f0 | achirkin/vulkan | VK_GGP_frame_token.hs | # OPTIONS_HADDOCK not - home #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MagicHash #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE Strict #-}
{-# LANGUAGE ViewPatterns #-}
module Graphics.Vulkan.Ext.VK_GGP_frame_token
* Vulkan extension : @VK_GGP_frame_token@
-- |
--
-- sup... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_GGP_frame_token.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE Strict #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
author: @GGP@
type: @device@
platform: @ggp@
> #include "vk_platform.h" | # OPTIONS_HADDOCK not - home #
# LANGUAGE PatternSynonyms #
module Graphics.Vulkan.Ext.VK_GGP_frame_token
* Vulkan extension : @VK_GGP_frame_token@
contact : @jfroy@
Extension number : @192@
Required extensions : ' VK_KHR_swapchain ' , ' VK_GGP_stream_descriptor_surface ' .
* * Required extensions : ' VK... |
7d08124d2bcdd2b4720b5a0ac46cebd285ff313a1ff61bfb226cf10e74cb4aca | xsc/ancient-clj | core_test.clj | (ns ancient-clj.core-test
(:require [ancient-clj.core :as ancient]
[ancient-clj.zip :refer [project-clj]]
[ancient-clj.artifact :as artifact]
[rewrite-clj.zip :as z]
[version-clj.core :as v]
[ancient-clj.test
[generators :as test-gen]
... | null | https://raw.githubusercontent.com/xsc/ancient-clj/c34d96553c74ee1909a71e014e54a718933d1dd0/test/ancient_clj/core_test.clj | clojure | ## Helpers
## Tests | (ns ancient-clj.core-test
(:require [ancient-clj.core :as ancient]
[ancient-clj.zip :refer [project-clj]]
[ancient-clj.artifact :as artifact]
[rewrite-clj.zip :as z]
[version-clj.core :as v]
[ancient-clj.test
[generators :as test-gen]
... |
bd922f64f72dfee8a5c872d50bf83079d2a1d7af1fd9e3a00278ab140109e0df | foreverbell/project-euler-solutions | 347.hs | import Common.Numbers.Primes (primesTo)
import Common.List (maximum')
n = 10000000 :: Int
primes = primesTo n :: [Int]
solve :: Int -> Int -> Int
solve p q = maximum' xs
where
ps = p : map (\p0 -> p0 * p) ps
qs = q : map (\q0 -> q0 * q) qs
xs = [ p0 * q0 | p0 <- takeWhile (<= n) ps, q0 <- takeWhile (<=... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/347.hs | haskell | import Common.Numbers.Primes (primesTo)
import Common.List (maximum')
n = 10000000 :: Int
primes = primesTo n :: [Int]
solve :: Int -> Int -> Int
solve p q = maximum' xs
where
ps = p : map (\p0 -> p0 * p) ps
qs = q : map (\q0 -> q0 * q) qs
xs = [ p0 * q0 | p0 <- takeWhile (<= n) ps, q0 <- takeWhile (<=... | |
04bcb9dd7fa9d8b22797076293e0320134f21561c866977f4f9a7e35f439df2d | clojure/core.memoize | deprecation_test.clj | Copyright ( c ) and . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound ... | null | https://raw.githubusercontent.com/clojure/core.memoize/d4dbc66a1ad28b00d5a57741eaee6a76e7b8dc31/src/test/clojure/clojure/core/memoize/deprecation_test.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) and . All rights reserved .
(ns ^{:doc "A memoization library for Clojure."
:author "Michael Fogus"}
clojure.core.memoize.deprecation-test
(:use [clojure.test]
[clojure.core.memoize]
[clojure.core.cache :only [defcache lookup has? hit miss seed ttl-cache-factory]])
(... |
5661c4973ca223d9e92c866a5a9e12c28e5c0b7b71b535ba6e36ec700d0da5cc | stepcut/plugins | Plugin.hs | module Plugin where
data I = I Int
resource = I 1
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/pdynload/should_fail1/Plugin.hs | haskell | module Plugin where
data I = I Int
resource = I 1
| |
f372de6a947d34b620fd6b69d46a684567e923f74f123af08ae920001b34cd23 | clj-kondo/clj-kondo | cache_test.clj | (ns clj-kondo.impl.cache-test
(:require
[clj-kondo.impl.cache :as cache]
[clj-kondo.impl.core :as core-impl]
[clj-kondo.test-utils :refer [lint! make-dirs remove-dir assert-submaps]]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is testing]]))
(def cache-vers... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/d3c39e7f8023c571d102bc7adce483d040348351/test/clj_kondo/impl/cache_test.clj | clojure | populate cache
populate cache
populate cache
populate cache
Scratch | (ns clj-kondo.impl.cache-test
(:require
[clj-kondo.impl.cache :as cache]
[clj-kondo.impl.core :as core-impl]
[clj-kondo.test-utils :refer [lint! make-dirs remove-dir assert-submaps]]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is testing]]))
(def cache-vers... |
03ce5d07083a31a7264f2e36573950f78a48ec9a87869a250df2430a61474b1b | janestreet/vcaml | greetings.mli | include Vcaml_plugin.Persistent.S with type state := unit
| null | https://raw.githubusercontent.com/janestreet/vcaml/64d205c2d6eee4a7e57abd2d452f5979dc6cd797/example/greetings/src/greetings.mli | ocaml | include Vcaml_plugin.Persistent.S with type state := unit
| |
5ffc843e8236595b62ec56840200940766608a4ce37bb77dd6eddfaf6ac2700f | robert-strandh/Second-Climacs | parse.lisp | (cl:in-package #:second-climacs-syntax-common-lisp)
PARSE - AND - CACHE collects Eclector errors in * ERRORS * during
;;; parsing and ADD-CHILDREN adds the resulting ERROR-WADs to the
;;; appropriate nodes in the wad tree.
(defvar *errors*)
Establish a handler which collects READER - ERRORs into * ERRORS * and
;;... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/ac868ae6ba3cd46b8f51c1c2fc5dd398e0f20e6c/Code/Syntax/Common-Lisp/parse.lisp | lisp | parsing and ADD-CHILDREN adds the resulting ERROR-WADs to the
appropriate nodes in the wad tree.
recovers around BODY.
appropriate insertion points for EXTRA-CHILDREN.
positions.
Possibly push some elements of EXTRA-CHILDREN into
range of E is contained in the source range of C.
Nothing has been cached, so call... | (cl:in-package #:second-climacs-syntax-common-lisp)
PARSE - AND - CACHE collects Eclector errors in * ERRORS * during
(defvar *errors*)
Establish a handler which collects READER - ERRORs into * ERRORS * and
(defmacro with-error-recording (() &body body)
`(handler-bind
((reader-error
(lambda (co... |
bf4a33e31f7630ee2ce7e2e3e2496475b388bf4f806c8dc210078b1493800c66 | elnewfie/lslforge | Token.hs | # LANGUAGE PolymorphicComponents , ExistentialQuantification , FlexibleContexts #
-----------------------------------------------------------------------------
-- |
Module : Text . ParserCombinators . . Token
Copyright : ( c ) 1999 - 2001
: ( c ) 2009
-- License : BSD-style (s... | null | https://raw.githubusercontent.com/elnewfie/lslforge/27eb84231c53fffba6bdb0db67bde81c1c12dbb9/lslforge/haskell/src/Text/ParserCombinators/ParsecExtras/Token.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/parsec/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (uses existentially quantified data constructors)
A helper module to parse lexical elements (token... | # LANGUAGE PolymorphicComponents , ExistentialQuantification , FlexibleContexts #
Module : Text . ParserCombinators . . Token
Copyright : ( c ) 1999 - 2001
: ( c ) 2009
module Text.ParserCombinators.ParsecExtras.Token
( LanguageDef (..)
, TokenP... |
8a669d8d98ba5025b9c39f494c7480c3c78f370ed25832aa34d58152bea1df16 | rbkmoney/fistful-server | ff_deposit_status_codec.erl | -module(ff_deposit_status_codec).
-behaviour(ff_codec).
-include_lib("fistful_proto/include/ff_proto_deposit_status_thrift.hrl").
-export([marshal/2]).
-export([unmarshal/2]).
%% API
-spec marshal(ff_codec:type_name(), ff_codec:decoded_value()) -> ff_codec:encoded_value().
marshal(status, pending) ->
{pending,... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_server/src/ff_deposit_status_codec.erl | erlang | API
TESTS | -module(ff_deposit_status_codec).
-behaviour(ff_codec).
-include_lib("fistful_proto/include/ff_proto_deposit_status_thrift.hrl").
-export([marshal/2]).
-export([unmarshal/2]).
-spec marshal(ff_codec:type_name(), ff_codec:decoded_value()) -> ff_codec:encoded_value().
marshal(status, pending) ->
{pending, #dep_s... |
eb724afeda9efe7a35d1c0044cd7fe4b50e86d10d0f2418a6da29d93459404d9 | lrascao/raterl | raterl.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/lrascao/raterl/9c1dddda346a190aa19b6299778479a891a17a9c/src/raterl.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(raterl).
-export([ru... |
9fb123fcf7225d2e5ebba94944292361b7f03fc79dd0ceeb9e7d35af55c3448a | racket/compiler | setup-unit.rkt | #lang racket/base
(require racket/unit setup/setup-core)
(provide setup@)
(define-unit setup@
(import)
(export)
(setup-core))
| null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-lib/setup/setup-unit.rkt | racket | #lang racket/base
(require racket/unit setup/setup-core)
(provide setup@)
(define-unit setup@
(import)
(export)
(setup-core))
| |
7b0429be99b0c2eef89e61fe0f3733cb7fd28eb14a2e63c2dbb94969f222571a | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_cruiserJointAction.lisp | (cl:in-package cruiser_msgs-srv)
(cl:export '(ACTION_NAME-VAL
ACTION_NAME
ACTION_TIME-VAL
ACTION_TIME
RESULT-VAL
RESULT
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/srv/_package_cruiserJointAction.lisp | lisp | (cl:in-package cruiser_msgs-srv)
(cl:export '(ACTION_NAME-VAL
ACTION_NAME
ACTION_TIME-VAL
ACTION_TIME
RESULT-VAL
RESULT
)) | |
8f5813246d55926b4ea691e3461a35e097a6756532dc287e25d71d848338ac8c | ijp/guildhall | pkg-list.scm | (package (unsatisfied-depends (0))
(depends (foo (666))))
;; Local Variables:
scheme - indent - styles : ( ( package 1 ) )
;; End:
| null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/tests/bundle/unsatisfied-depends/pkg-list.scm | scheme | Local Variables:
End: | (package (unsatisfied-depends (0))
(depends (foo (666))))
scheme - indent - styles : ( ( package 1 ) )
|
f3756a97d2c8295b04ada1f0d35e6b37a6f82291fa874a23146327f2d49d207d | camfort/camfort | Op.hs | # OPTIONS_GHC -Wall #
|
The root module for the language of Fortran operators .
" Language . Expression " provides a way of forming expressions from what we call
/operators/ , via ' HFree ' .
For any type constructor @op@ of kind @ ( * - > * ) - > * - > * @ , @'HFree ' op v a@ can
be seen as an /expressio... | null | https://raw.githubusercontent.com/camfort/camfort/3421e85f6fbbcaa6503a266b3fae029a09d2ff24/src/Language/Fortran/Model/Op.hs | haskell | An operator type has two arguments . @t@ is a type constructor used to refer
to expressions . @a@ is the semantic type of the expression formed by the
operator .
Given two int expressions , we may add them . Notice how we refer to
expressions recursively with the type constructor parameter Add : : t Int - > ... | # OPTIONS_GHC -Wall #
|
The root module for the language of Fortran operators .
" Language . Expression " provides a way of forming expressions from what we call
/operators/ , via ' HFree ' .
For any type constructor @op@ of kind @ ( * - > * ) - > * - > * @ , @'HFree ' op v a@ can
be seen as an /expressio... |
089117348afe20b112ace005996fa2a69e385605a9f7efc33f10a6995d33126c | ocaml/dune | filename.mli | (** Represent a path component.
A path component is just a string without a '/' character. *)
include module type of struct
include Stdlib.Filename
end
TODO add invariants and make this abstract or private
type t = string
module Extension : sig
type nonrec t = t
end
val split_extension : t -> string * Ex... | null | https://raw.githubusercontent.com/ocaml/dune/a65ba82ed7576385b1db11b3fe6c178c2f642a65/otherlibs/stdune/src/filename.mli | ocaml | * Represent a path component.
A path component is just a string without a '/' character. |
include module type of struct
include Stdlib.Filename
end
TODO add invariants and make this abstract or private
type t = string
module Extension : sig
type nonrec t = t
end
val split_extension : t -> string * Extension.t
val split_extension_after_dot : t -> string * string
type program_name_kind =
| In_pa... |
0a05f3058e351434bbe89c09323e72d00d9830996a6bcdb2d9d97aa2f2607d55 | dakrone/cld | core.clj | (ns cld.core
(:require [clojure.java.io :refer [resource file]])
(:import (com.cybozu.labs.langdetect Detector DetectorFactory)
(java.util HashMap)))
(defn load-profiles
"Load detection profiles from either a File object or a String path."
[file-or-string]
(DetectorFactory/clear)
(DetectorFactor... | null | https://raw.githubusercontent.com/dakrone/cld/ee6d9149d487ed782270b818e22adec266dd5d41/src/cld/core.clj | clojure | (ns cld.core
(:require [clojure.java.io :refer [resource file]])
(:import (com.cybozu.labs.langdetect Detector DetectorFactory)
(java.util HashMap)))
(defn load-profiles
"Load detection profiles from either a File object or a String path."
[file-or-string]
(DetectorFactory/clear)
(DetectorFactor... | |
b6e6d39a9dde40817a4f988ac193acd6d68ea381bdfb9f8da1fdabd7d7b8b2b9 | static-analysis-engineering/codehawk | bCHInterfaceDictionary.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/418c95f77e6ece464df2ade519f27d95aa0119d6/CodeHawk/CHB/bchlib/bCHInterfaceDictionary.ml | ocaml | The interface dictionary is global to the system.
chutil
bchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
030035ee4167532ce9ca8e5ba29a05ea8e9bfb73629d2b8d52ad64ff8473bdc0 | argp/bap | test.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/tests/test.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
open Form... |
81cc877d7d998fdcc50f07935bbf1120f5fd94ab7aefa04c5a768b80d3c27980 | onlyshk/epmail | smtpd_listener.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 ,
%%% @doc
%%%
%%% @end
Created : 7 Feb 2011 by < >
%%%-------------------------------------------------------------------
-module(smtpd_listener).
-behaviour(gen_server).
-export([start_link/0, stop/0]).
-exp... | null | https://raw.githubusercontent.com/onlyshk/epmail/d08ab8e706a44e5e3287ea4b98490447cfb94448/src/smtpd_listener.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Callback functions
TODO: should be defined in configuration file
terminate server
Hot code change
| @author < >
( C ) 2011 ,
Created : 7 Feb 2011 by < >
-module(smtpd_listener).
-behaviour(gen_server).
-export([start_link/0, stop/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-vsn('0.3').
-author('').
-include_lib("epmail.hrl").
-record(sta... |
e95706df43589ffe01f5255e42e38d4420ba79bee127fbc3f80d8db5e03f8249 | pouyakary/Nota | Identifier.hs |
module Language.BackEnd.Evaluator.Nodes.Identifier ( evalIdentifier ) where
-- ─── IMPORTS ────────────────────────────────────────────────────────────────────
import Data.Map ( Map )
import qualified Data.Map as Map
import Data.Time
import Language.BackEnd.Evaluator.Types
import ... | null | https://raw.githubusercontent.com/pouyakary/Nota/d5e29eca7ea34d72835a9708977fa33c030393d1/source/Language/BackEnd/Evaluator/Nodes/Identifier.hs | haskell | ─── IMPORTS ────────────────────────────────────────────────────────────────────
─── SCOPE PROTOTYPE ────────────────────────────────────────────────────────────
─── CONSTANTS ──────────────────────────────────────────────────────────────────
Nota 's Easter Egg :D
computeTheKarionTime :: IO Double
computeTheKario... |
module Language.BackEnd.Evaluator.Nodes.Identifier ( evalIdentifier ) where
import Data.Map ( Map )
import qualified Data.Map as Map
import Data.Time
import Language.BackEnd.Evaluator.Types
import Language.FrontEnd.AST
import Model
import System.IO.Unsafe
... |
4048271c00657ce1195efe86526da1da48f4c547c081d9b145638cdc226b2dad | binaryage/chromex-sample | popup.cljs | (ns chromex-sample.popup
(:require-macros [chromex.support :refer [runonce]])
(:require [chromex-sample.popup.core :as core]))
(runonce
(core/init!))
| null | https://raw.githubusercontent.com/binaryage/chromex-sample/5d526435dad33cfbac1abd0b6687590bfc63a53a/src/popup/chromex_sample/popup.cljs | clojure | (ns chromex-sample.popup
(:require-macros [chromex.support :refer [runonce]])
(:require [chromex-sample.popup.core :as core]))
(runonce
(core/init!))
| |
87ae8061f0ec7f9f418c6bb8786dcf4ef37e9cb643a283f7493f02e423a04bfc | janestreet/bonsai | main.ml | open! Core
open! Bonsai_web
open Bonsai.Let_syntax
module Form = Bonsai_web_ui_form
module One = struct
type t = { a : string } [@@deriving sexp, sexp_grammar]
end
module Two = struct
type t =
{ a : string
; b : string
}
[@@deriving sexp, sexp_grammar]
end
module Css = [%css stylesheet {|
.notifica... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/form_handle_enter/main.ml | ocaml | open! Core
open! Bonsai_web
open Bonsai.Let_syntax
module Form = Bonsai_web_ui_form
module One = struct
type t = { a : string } [@@deriving sexp, sexp_grammar]
end
module Two = struct
type t =
{ a : string
; b : string
}
[@@deriving sexp, sexp_grammar]
end
module Css = [%css stylesheet {|
.notifica... | |
51f63eb1bae05e370ab1ad6776d577bc324739b04cff4b97f586176435ef0e83 | eareese/htdp-exercises | 202-select-album.rkt | #lang htdp/bsl+
;;---------------------------------------------------------------------------------------------------
Exercise 202 . Design select - album . The function consumes the title of an album and an LTracks . It
;; extracts from the latter the list of tracks that belong to the given album.
(require 2htdp/i... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/202-select-album.rkt | racket | ---------------------------------------------------------------------------------------------------
extracts from the latter the list of tracks that belong to the given album. | #lang htdp/bsl+
Exercise 202 . Design select - album . The function consumes the title of an album and an LTracks . It
(require 2htdp/itunes)
(define ITUNES-LOCATION "itunes.xml")
LTracks
(define itunes-tracks (read-itunes-as-tracks ITUNES-LOCATION))
(define track9
(create-track
"Blue Kentucky Girl"
"Em... |
9a54f668ea652a8a0226cbdd648c9643f4f782d169c3643211bbbc0dadca3b52 | erlangonrails/devdb | riak_kv_js_manager.erl | %% -------------------------------------------------------------------
%%
riak_js_manager : dispatch work to JavaScript VMs
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use th... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/apps/riak_kv/src/riak_kv_js_manager.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | riak_js_manager : dispatch work to JavaScript VMs
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS... |
af164bfb65b7979801ecdfb6340a3f442f98f215dc54fe4f0ae7d6a57bb1f7ff | danhper/evm-analyzer | factDb.mli | open Core
module CI = Datalog_caml_interface
type t
module Rel4: sig
type ('a,'b,'c,'d) t = CI.const * 'a CI.Univ.key * 'b CI.Univ.key * 'c CI.Univ.key * 'd CI.Univ.key
val create: ?k1:'a CI.Univ.key -> ?k2:'b CI.Univ.key -> ?k3:'c CI.Univ.key
-> ?k4:'d CI.Univ.key -> String.t -> ('a,'b,'c,'d) t
v... | null | https://raw.githubusercontent.com/danhper/evm-analyzer/9fb1cf6dc743c2f779973b2f0892047ebbd4e5fd/src/factDb.mli | ocaml | val add_int_rel4: t -> String.t -> (Int.t * Int.t * Int.t * Int.t) -> unit | open Core
module CI = Datalog_caml_interface
type t
module Rel4: sig
type ('a,'b,'c,'d) t = CI.const * 'a CI.Univ.key * 'b CI.Univ.key * 'c CI.Univ.key * 'd CI.Univ.key
val create: ?k1:'a CI.Univ.key -> ?k2:'b CI.Univ.key -> ?k3:'c CI.Univ.key
-> ?k4:'d CI.Univ.key -> String.t -> ('a,'b,'c,'d) t
v... |
b9c146e5c79cf11c5790a425385171b0fad580d6f80d66bdeaca96ca72bf1abf | liebke/avout | internal.clj | (ns avout.locks.internal
(:require [zookeeper :as zk]
[zookeeper.util :as zutil]
[zookeeper.logger :as log])
(:import (java.util.concurrent.locks ReentrantLock)))
(defn unlock-all
"Calls unlock on the given lock for each hold reported by getHoldCount"
([lock]
(dotimes [i (.getHold... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/src/avout/locks/internal.clj | clojure | if no requests in the queue, then exit
when the node-to-watch is nil, the requester is no longer in the queue, then exit
then lock-request-node is the new lock holder, invoke lock-watcher
wait until zookeeper invokes the watcher, which calls notify
if the node-to-watch no longer exists recur to find the next node-... | (ns avout.locks.internal
(:require [zookeeper :as zk]
[zookeeper.util :as zutil]
[zookeeper.logger :as log])
(:import (java.util.concurrent.locks ReentrantLock)))
(defn unlock-all
"Calls unlock on the given lock for each hold reported by getHoldCount"
([lock]
(dotimes [i (.getHold... |
4194d107988ee7ea67ab6676f3d30247c243d4272f3567a1b171a9d6b331c8ea | guicho271828/eazy-documentation | 5template.lisp |
(in-package :eazy-documentation)
(defclass eazy-template (common-html.template:template)
((css-list :type list :initarg :css-list :initform *default-css*)
(font-list :type list :initarg :font-list :initform *default-fonts*)
(js-list :type list :initarg :js-list :initform *default-js*)))
(defmethod common-h... | null | https://raw.githubusercontent.com/guicho271828/eazy-documentation/2f68d45a04a8f1d6776a85abefa5f1b3d1ad4665/src/5template.lisp | lisp | while we could create a complex directory structure, we don't.
<!DOCTYPE html>
<!DOCTYPE html> |
(in-package :eazy-documentation)
(defclass eazy-template (common-html.template:template)
((css-list :type list :initarg :css-list :initform *default-css*)
(font-list :type list :initarg :font-list :initform *default-fonts*)
(js-list :type list :initarg :js-list :initform *default-js*)))
(defmethod common-h... |
3d698d6a7fb876db8c91652c8b9013d88beb5d54dbffd04c61b11b04460cfe75 | alexdong/ansi-common-lisp-exercises | acl-ch9.lisp | 1 . Define a function which takes a list of reals and returns true iff they are in
;; non-decreasing order.
(defun non-decreasing (reals)
(not (apply #'> reals)))
2 . Define a function that takes an integer number of cents and returns 4 values
showing how to make that number out of 25 , 10 , 5 and 1 cent piec... | null | https://raw.githubusercontent.com/alexdong/ansi-common-lisp-exercises/03b05a23027d62e8724177b2c56dd58065c1f18f/acl-ch9.lisp | lisp | non-decreasing order.
smalles number of coins
intersection.
There might be a better (faster? easier?) way to do this, but it seemed reasonable
to just use high school algebra to solve this problem. Wikipedia indicates that
for the general case of n line segments, the problem is more interesting.
calculate slope... | 1 . Define a function which takes a list of reals and returns true iff they are in
(defun non-decreasing (reals)
(not (apply #'> reals)))
2 . Define a function that takes an integer number of cents and returns 4 values
showing how to make that number out of 25 , 10 , 5 and 1 cent pieces , using the
(defun ch... |
600cdb6c51011b8996d77908cd6e162110fcc3a62845e737602b2be50f112321 | wilkerlucio/pathom | graphql2.cljc | (ns com.wsscode.pathom.connect.graphql2
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]
[clojure.walk :as walk]
[com.fulcrologic.guardrails.core :refer [>def >defn >fdef => | <- ?]]
[#?(:clj com.wsscode.async.async-clj
:cljs com.wsscode.async.async-cljs) :refer [let-chan go-... | null | https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/src/com/wsscode/pathom/connect/graphql2.cljc | clojure | fields
interfaces
remove already known keys
remove ident attributes
resolver | (ns com.wsscode.pathom.connect.graphql2
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]
[clojure.walk :as walk]
[com.fulcrologic.guardrails.core :refer [>def >defn >fdef => | <- ?]]
[#?(:clj com.wsscode.async.async-clj
:cljs com.wsscode.async.async-cljs) :refer [let-chan go-... |
f81a3894ba675cdfb685e049d6fcbdef68a627ae9a1fbdf07492c7c922e32036 | hashobject/boot-s3 | core.clj | (ns hashobject.boot-s3.core
(:require [boot.core :as boot]
[hashobject.boot-s3.fs :as fs]
[hashobject.boot-s3.s3 :as s3]
[hashobject.boot-s3.merge :as m]))
(declare capture-file-details)
(declare calculate-deltas)
(declare push-deltas-to-s3)
(declare print-delta-summary)
(declare... | null | https://raw.githubusercontent.com/hashobject/boot-s3/7f9dd89947703070d40e0b95cfa173d3812a7db3/src/hashobject/boot_s3/core.clj | clojure | Private functions
Print Functions | (ns hashobject.boot-s3.core
(:require [boot.core :as boot]
[hashobject.boot-s3.fs :as fs]
[hashobject.boot-s3.s3 :as s3]
[hashobject.boot-s3.merge :as m]))
(declare capture-file-details)
(declare calculate-deltas)
(declare push-deltas-to-s3)
(declare print-delta-summary)
(declare... |
08d7b6cb7d7f792c98fa3e3c791ad1af30e2d4a5a1489843400152be7f8e550b | choptastic/sql_bridge | sql_bridge_epgsql_worker.erl | %% This is largely lifted directly from the poolboy readme.
-module(sql_bridge_epgsql_worker).
-behaviour(poolboy_worker).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-record(state, {conn}).
start_link(Args) ->
gen_... | null | https://raw.githubusercontent.com/choptastic/sql_bridge/020afb6923ce8dec65686c30d789a8e7907b2e58/src/sql_bridge_epgsql_worker.erl | erlang | This is largely lifted directly from the poolboy readme. |
-module(sql_bridge_epgsql_worker).
-behaviour(poolboy_worker).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-record(state, {conn}).
start_link(Args) ->
gen_server:start_link(?MODULE, Args, []).
init(Args) ->
proces... |
a0d4abf109567a2b9d1af6b6be5a98fa3b567e95978712efa0ed5ec4d0743163 | logseq/mldoc | test_export_opml.ml | let default_config : Conf.t =
{ toc = true
; parse_outline_only = false
; heading_number = true
; keep_line_break = false
; format = Conf.Markdown
; heading_to_list = false
; exporting_keep_properties = false
; inline_type_with_pos = false
; inline_skip_macro = false
; export_md_indent_style = Conf.... | null | https://raw.githubusercontent.com/logseq/mldoc/0cdd2909b21ddf022727771fb797111608e973b4/test/test_export_opml.ml | ocaml | let default_config : Conf.t =
{ toc = true
; parse_outline_only = false
; heading_number = true
; keep_line_break = false
; format = Conf.Markdown
; heading_to_list = false
; exporting_keep_properties = false
; inline_type_with_pos = false
; inline_skip_macro = false
; export_md_indent_style = Conf.... | |
ef6b5c8ab7fb9796f7b0b99cbdd010f10880b8a23722ec364585e527b7013d0f | racket/eopl | interp.rkt | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "store.rkt")
(require "scheduler.rkt")
(require "semaphores.rkt")
(provide value-of-program trace-interp)
(define trace-interp (make-parameter #f))
;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;;
value - of - program : Program * Int ... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter5/thread-lang/interp.rkt | racket | the interpreter ;;;;;;;;;;;;;;;;
value-of/k : Exp * Env * Cont -> FinalAnswer
implemented like a macro!
this one, too
apply-cont : Cont * Exp -> FinalAnswer | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "store.rkt")
(require "scheduler.rkt")
(require "semaphores.rkt")
(provide value-of-program trace-interp)
(define trace-interp (make-parameter #f))
value - of - program : Program * Int - > ExpVal
Page : 185
(define value-of-progr... |
dc44756a611873f0d65eb000254116c453a7f4114b9add220d08651027d21b15 | AlacrisIO/legicash-facts | side_chain_server_config.ml | side_chain_server_config -- configuration for the side_chain_server .
TODO :
* make the loading lazy , so we can link this library into some code
without requiring the configuration file to exist and be read .
* move this module to alacris_lib , it does n't belong in legilogic_ethereum
TOD... | null | https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/alacris_lib/side_chain_server_config.ml | ocaml | * TODO: encrypt the damn file!
1e13 wei = 1e-5 ether ~= .24 cent | side_chain_server_config -- configuration for the side_chain_server .
TODO :
* make the loading lazy , so we can link this library into some code
without requiring the configuration file to exist and be read .
* move this module to alacris_lib , it does n't belong in legilogic_ethereum
TOD... |
c844c2834d1140bb2163c7366b8cfe3ab06bace32952c5262f5cc7f8fea94502 | archaelus/tsung | ts_msg_server.erl | This code was developped by IDEALX ( / ) and
%%% contributors (their names can be found in the CONTRIBUTORS file).
Copyright ( C ) 2000 - 2001 IDEALX
%%%
%%% This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free S... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/tsung_controller/ts_msg_server.erl | erlang | contributors (their names can be found in the CONTRIBUTORS file).
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANT... | This code was developped by IDEALX ( / ) and
Copyright ( C ) 2000 - 2001 IDEALX
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU General Public License
Foundation , Inc. ,... |
480aefc320aed04e2ccf743b7d6080f6c6e4af37a8b3d24707a67dad6f52a67c | travelping/ergw | ergw_inet_res.erl | Copyright 2021 Travelping GmbH < >
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_inet_res).
-... | null | https://raw.githubusercontent.com/travelping/ergw/e149b57019046f9c08b99412fbe47078bdec58e8/apps/ergw_core/src/ergw_inet_res.erl | erlang | This program is free software; you can redistribute it and/or
API
gen_server callbacks
===================================================================
API
===================================================================
===================================================================
gen_server callbacks... | Copyright 2021 Travelping GmbH < >
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_inet_res).
-behaviour(gen_server).
-compile({parse_transform, cut}).
-expor... |
edb6f5ae8a3fcae0da252826acce3a18ec234df2e4c699a74b46cf16c4e05138 | ddmcdonald/sparser | moving.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 2011 - 2021 -- all rights reserved
;;;
;;; File: "moving"
Module : " : places : "
version : November 2021
;; Intended for modeling movement in direction or w.r.t. some
;; spatial feature.
initated 8/4/11 . 9/5/11 ad... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/7006a379777acae24f6ae36247aa474cfedad75e/Sparser/code/s/grammar/model/core/places/moving.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "moving"
Intended for modeling movement in direction or w.r.t. some
spatial feature.
in favor of the new one in kinds/movement. 9/26/14 commented out
of an edge former that can compose with auxiliaries. 1/4/16 compiler
nit.
A category generator ... | copyright ( c ) 2011 - 2021 -- all rights reserved
Module : " : places : "
version : November 2021
initated 8/4/11 . 9/5/11 added path - type adjunct . 9/12 Added some more .
9/26 " immediately " . More bits through 10/4/11 . 11/3 added DA rule to
convert a name . the old version of the '... |
c96cbba453aac1e74dce759ce36ad2acf26d7e2fbfaa90afc62a988c2d24f429 | UBTECH-Walker/WalkerSimulationFor2020WAIC | JointResult.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-msg)
// ! \htmlinclude JointResult.msg.html
(cl:defclass <JointResult> (roslisp-msg-protocol:ros-message)
((id
:reader id
:initarg :id
:type cl:string
:initform "")
(stamp
:reader stamp
:initarg :stamp
:type cl:real
:in... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/JointResult.lisp | lisp | Auto-generated. Do not edit! |
(cl:in-package cruiser_msgs-msg)
// ! \htmlinclude JointResult.msg.html
(cl:defclass <JointResult> (roslisp-msg-protocol:ros-message)
((id
:reader id
:initarg :id
:type cl:string
:initform "")
(stamp
:reader stamp
:initarg :stamp
:type cl:real
:initform 0)
(errCode
:read... |
c028a3575a452c0bd028ff688431ebf91b3664c1914fe5141d93cd641128e7ad | morazanm/fsm | input.rkt | #lang racket
(require 2htdp/image 2htdp/universe "posn.rkt" "../globals.rkt")
;; ------- input.rkt -------
;; This file contains the functionality for an input field
;; Export necessary functions/structures
(provide
(struct-out textbox)
draw-textbox
textbox-pressed?
add-text
remove-text
set-active
set-inactiv... | null | https://raw.githubusercontent.com/morazanm/fsm/9cbb0928b38c3c9cd94858eed64d3f3d688a4048/fsm-gui/structs/input.rkt | racket | ------- input.rkt -------
This file contains the functionality for an input field
Export necessary functions/structures
The number to change a color
textbox: A structure that represents a GUI Input box
- width: integer, the width of the textbox
- height: integer, the height of the textbox
- color: (color-struct... | #lang racket
(require 2htdp/image 2htdp/universe "posn.rkt" "../globals.rkt")
(provide
(struct-out textbox)
draw-textbox
textbox-pressed?
add-text
remove-text
set-active
set-inactive
call-proc
make-textbox
is-active?)
- charLength : integer that represents the amount of characters allowed in the text... |
6f6b22d79b56e240246441251753fc644db331c6c8d5c8cd93a84b9e76240f27 | skynet-gh/skylobby | lua.clj | (ns skylobby.lua
(:import
(org.luaj.vm2 LuaValue)
(org.luaj.vm2.lib.jse JsePlatform)))
(set! *warn-on-reflection* true)
(def mocks
"VFS = {}
function VFS.DirList(dir, fileType)
return {}
end
function getfenv()
local t = {}
t[\"mapinfo\"] = {}
return t
end
Spring = {}
function Spring.... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/c7728f6f9d5c0321744b9e2743cb10211725835e/graal/clj/skylobby/lua.clj | clojure | (ns skylobby.lua
(:import
(org.luaj.vm2 LuaValue)
(org.luaj.vm2.lib.jse JsePlatform)))
(set! *warn-on-reflection* true)
(def mocks
"VFS = {}
function VFS.DirList(dir, fileType)
return {}
end
function getfenv()
local t = {}
t[\"mapinfo\"] = {}
return t
end
Spring = {}
function Spring.... | |
7dcac3ce23ea8cad7fca49c3125847704ba0e902727581c54e90b3464edccb57 | alios/clearingstelle | Root.hs | # LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings #
module Handler.Root where
import Foundation
import Prelude
-- This is a handler function for the GET request method on the RootR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
The majority of the code you will writ... | null | https://raw.githubusercontent.com/alios/clearingstelle/bdd8183e1fc65df014545255856a4f516687fc32/Handler/Root.hs | haskell | This is a handler function for the GET request method on the RootR
resource pattern. All of your resource patterns are defined in
config/routes
functions. You can spread them across multiple files if you are so
inclined, or create a single monolithic file. | # LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings #
module Handler.Root where
import Foundation
import Prelude
The majority of the code you will write in Yesod lives in these handler
getRootR :: Handler RepHtml
getRootR = redirect RedirectPermanent $ CheckoutR "pplqfb" |
33ff3e7cd09910d5f61c4d59bac5fb460849dcb43b8a5cf4d59c8e332bc265f8 | anishathalye/knox | emulator-lang.rkt | #lang racket/base
(require
racket/provide
racket/stxparam
(prefix-in @ (combine-in rosette/safe rosutil))
(for-syntax racket/base racket/syntax syntax/parse)
"../emulator.rkt"
(only-in "../semantics/environment.rkt" make-assoc assoc-extend assoc-extend*)
(only-in "../semantics/value.rkt" closure)
(only-in "int... | null | https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/knox/emulator/emulator-lang.rkt | racket | some of the simple builtins from interpreter
struct declaration | #lang racket/base
(require
racket/provide
racket/stxparam
(prefix-in @ (combine-in rosette/safe rosutil))
(for-syntax racket/base racket/syntax syntax/parse)
"../emulator.rkt"
(only-in "../semantics/environment.rkt" make-assoc assoc-extend assoc-extend*)
(only-in "../semantics/value.rkt" closure)
(only-in "int... |
c9b24a0933bf75e9328b768977b4615a1060c443c905207237a945480e44bef2 | haskell-repa/repa | Loop.hs |
module Data.Array.Repa.Series.Prim.Loop where
import Data.Array.Repa.Series.Rate
import Data.Array.Repa.Series.Prim.Utils
import Data.Array.Repa.Series.Prim.Word
import Data.Array.Repa.Series.Vector as V
import Data.Array.Repa.Series.Series as S
import Data.Array.Repa.Series.Ref as Ref
import GHC.Exts
impo... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-series/Data/Array/Repa/Series/Prim/Loop.hs | haskell | Loop combinators -----------------------------------------------------------
| Primitive stateful loop combinator.
# INLINE [1] repa_loop #
| Guard an inner context with a flag.
# INLINE [1] repa_split8 # |
module Data.Array.Repa.Series.Prim.Loop where
import Data.Array.Repa.Series.Rate
import Data.Array.Repa.Series.Prim.Utils
import Data.Array.Repa.Series.Prim.Word
import Data.Array.Repa.Series.Vector as V
import Data.Array.Repa.Series.Series as S
import Data.Array.Repa.Series.Ref as Ref
import GHC.Exts
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.