_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 |
|---|---|---|---|---|---|---|---|---|
5a62a3ff1f59376c3adf5f083b5bf61191c76da801df6e6ea7b1533477cb3e8e | sjl/advent | day-06.lisp | (advent:defpackage* :advent/2016/06)
(in-package :advent/2016/06)
(defun freqs (lines)
(iterate
(for i :from 0 :below (length (first lines)))
(collect (frequencies lines :key (rcurry #'elt i)))))
(defun freq-extrema (predicate freqs)
(_ freqs
alexandria:hash-table-alist
(extrema predicate _ :key... | null | https://raw.githubusercontent.com/sjl/advent/dc3debda9bd1a0570a6ab06919b1af7b285413dc/src/2016/days/day-06.lisp | lisp | Scratch -------------------------------------------------------------------- | (advent:defpackage* :advent/2016/06)
(in-package :advent/2016/06)
(defun freqs (lines)
(iterate
(for i :from 0 :below (length (first lines)))
(collect (frequencies lines :key (rcurry #'elt i)))))
(defun freq-extrema (predicate freqs)
(_ freqs
alexandria:hash-table-alist
(extrema predicate _ :key... |
2bfcec7a018985672308de37571f251b7ad652c87f81064b626bf7a1a6c064c0 | arenadotio/pgx | pgx_test.ml | external reraise : exn -> _ = "%reraise"
module type S = sig
val run_tests : library_name:string -> unit
end
module type ALCOTEST_IO = sig
open Alcotest
type 'a monad
type 'a test_case
val test_case : string -> speed_level -> ('a -> unit monad) -> 'a test_case
val run : string -> (string * unit test_cas... | null | https://raw.githubusercontent.com/arenadotio/pgx/d8eb9a2c922fc1dbe52753d51061a72b64816528/pgx_test/src/pgx_test.ml | ocaml | Postgres adds whitespace to base64 encodings, so we strip it
back out
This hex string should get inserted into the DB as literally "\x0001etc"
This hex string should get double encoded so it makes it into the DB as literally "\x0001etc"
Select a literal string
Select a literal string
Ins... | external reraise : exn -> _ = "%reraise"
module type S = sig
val run_tests : library_name:string -> unit
end
module type ALCOTEST_IO = sig
open Alcotest
type 'a monad
type 'a test_case
val test_case : string -> speed_level -> ('a -> unit monad) -> 'a test_case
val run : string -> (string * unit test_cas... |
fb90c3ff2d3381e1390915936f710b121e94d4782d181de1095555a25b85518f | tfausak/patrol | RequestSpec.hs | # LANGUAGE QuasiQuotes #
module Patrol.Type.RequestSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Patrol.Type.Request as Request
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/RequestSpec.hs | haskell | # LANGUAGE QuasiQuotes #
module Patrol.Type.RequestSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Patrol.Type.Request as Request
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec... | |
2eafdf6bb8842827dd4ba0637021973637c06f5f2b0c0b5a89e19ec7571d49fb | ds-wizard/engine-backend | Detail_PUT.hs | module Wizard.Api.Handler.Locale.Detail_PUT where
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Api.Resource.Locale.LocaleChangeDTO
import Wizard.Api.Resource.Locale.LocaleChangeJM ()
import Wizard.Api.Resource.Locale.Locale... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-wizard/src/Wizard/Api/Handler/Locale/Detail_PUT.hs | haskell | module Wizard.Api.Handler.Locale.Detail_PUT where
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Api.Resource.Locale.LocaleChangeDTO
import Wizard.Api.Resource.Locale.LocaleChangeJM ()
import Wizard.Api.Resource.Locale.Locale... | |
7de39f1b65fdf3fd6b86407259724cf023661cd97757698527d0771f2b4e4ece | bcc32/projecteuler-ocaml | sol_103.mli | open! Core
open! Import
include Solution.S
val is_special : int list -> bool
| null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_103.mli | ocaml | open! Core
open! Import
include Solution.S
val is_special : int list -> bool
| |
49b79df8f20db6668bd11f5041b26b18db2cb2a0cc6661fbc649a57eace67f54 | opencog/opencog | basic.scm | Copyright ( C ) 2016 OpenCog Foundation
;
A simple demo for
;
For more details about , please check :
;
;
;
; Prior to running this, the RelEx parse server needs to be set up,
; so that the `nlp-parse` call succeeds. The directory containing the
; chatbot has detailed instructions on how to do this.
;
; On th... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/examples/microplanning/basic.scm | scheme |
Prior to running this, the RelEx parse server needs to be set up,
so that the `nlp-parse` call succeeds. The directory containing the
chatbot has detailed instructions on how to do this.
On the other hand, if you are running this from the OpenCog docker container,
you can skip this step as the RelEx parse ... | Copyright ( C ) 2016 OpenCog Foundation
A simple demo for
For more details about , please check :
get a " Connection refused " error . For more information :
By default , these two will be added :
(add-to-load-path "/opencog/tests")
(add-to-load-path "../tests")
(add-to-load-path "../../tests")
(use-module... |
9c4fe9c2469b3deafe72c5ab4e9e0229dceca630bb517a93201828dd69fd2aae | zhongwencool/observer_cli | observer_cli_port.erl | -module(observer_cli_port).
-include("observer_cli.hrl").
-export([start/2]).
-spec start(pid(), view_opts()) -> no_return.
start(Port, Opts) ->
#view_opts{port = RefreshMs} = Opts,
RenderPid = spawn_link(fun() ->
?output(?CLEAR),
render_worker(Port, RefreshMs, ?INIT_TIME_REF)
end),
m... | null | https://raw.githubusercontent.com/zhongwencool/observer_cli/baa70569bccc5508e9839e20768540ef3cdca016/src/observer_cli_port.erl | erlang |
Private
| -module(observer_cli_port).
-include("observer_cli.hrl").
-export([start/2]).
-spec start(pid(), view_opts()) -> no_return.
start(Port, Opts) ->
#view_opts{port = RefreshMs} = Opts,
RenderPid = spawn_link(fun() ->
?output(?CLEAR),
render_worker(Port, RefreshMs, ?INIT_TIME_REF)
end),
m... |
85da25f78727be000b9229d8b71cb42d8668513ecd6b11cfda52dc4a73d7f70a | areuu/ilcompiler | program_pp.mli | (** program.proto Pretty Printing *)
* { 2 Formatters }
val pp_instruction_operation : Format.formatter -> Program_types.instruction_operation -> unit
(** [pp_instruction_operation v] formats v *)
val pp_instruction : Format.formatter -> Program_types.instruction -> unit
(** [pp_instruction v] formats v *)
val p... | null | https://raw.githubusercontent.com/areuu/ilcompiler/c6f0bc809fe165947b8c7004dc1ed94414038002/src/proto/program_pp.mli | ocaml | * program.proto Pretty Printing
* [pp_instruction_operation v] formats v
* [pp_instruction v] formats v |
* { 2 Formatters }
val pp_instruction_operation : Format.formatter -> Program_types.instruction_operation -> unit
val pp_instruction : Format.formatter -> Program_types.instruction -> unit
val pp_program : Format.formatter -> Program_types.program -> unit
* [ v ] formats v
|
cd3cb7cbb57414ab3f455466db6db6b2a8e5bed46372ac8d253562cee7515a9b | spurious/sagittarius-scheme-mirror | %3a126.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; srfi/%3a126.scm - R6RS-based hashtables
;;;
Copyright ( c ) 2016 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Red... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a126.scm | scheme | coding : utf-8 ; -*-
srfi/%3a126.scm - R6RS-based hashtables
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list ... | Copyright ( c ) 2016 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (srfi :126)
(export :all)
(import ... |
948942f7643ed5be507ba47ae356a9b1c841404d0b8195b39ea87b267532296e | gfngfn/SATySFi | vm.mli |
open Types
exception ExecError of string
val exec_code : environment -> instruction list -> syntactic_value * environment option
| null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/frontend/bytecomp/vm.mli | ocaml |
open Types
exception ExecError of string
val exec_code : environment -> instruction list -> syntactic_value * environment option
| |
fab225dbb2b0e4b1e5d0a7ba11a717fa3761579f706143f123971f14eb0429f4 | nyu-acsys/drift | indirect00.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c1_COEFFICIENT_1085 = 0
let rec c0_COEFFICIENT_1084 = 0
let id_without_checking_1118 set_flag_id_1092 x_1031 =
let set_flag_id_1092 = true
in
x_1031
let rec id_1030 prev_set_flag_id_1091 x_1031 =
let u =if prev_set_flag_id_10... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/indirect00.ml | ocaml | -:{v:Int | true} |
let rec bot _ = bot ()
let fail _ = assert false
let rec c1_COEFFICIENT_1085 = 0
let rec c0_COEFFICIENT_1084 = 0
let id_without_checking_1118 set_flag_id_1092 x_1031 =
let set_flag_id_1092 = true
in
x_1031
let rec id_1030 prev_set_flag_id_1091 x_1031 =
let u =if prev_set_flag_id_10... |
b1815e3a6e0ac06cdd0b62bbdbdb8673c728c9a4297bd82381108430d2edab55 | michiakig/sicp | ex-1.11.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 1 Section 2 Procedures and the Processes They Generate
Exercise 1.11
(define f-rec
(lambda (n)
(if (< n 3)
n
(+ (f-rec (- n 1))
(* 2 (f-rec (- n 2)))
(* 3 (f-rec (- n 3)))))))
(define f-iter-start
(lambda... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch1/ex-1.11.scm | scheme | Structure and Interpretation of Computer Programs | Chapter 1 Section 2 Procedures and the Processes They Generate
Exercise 1.11
(define f-rec
(lambda (n)
(if (< n 3)
n
(+ (f-rec (- n 1))
(* 2 (f-rec (- n 2)))
(* 3 (f-rec (- n 3)))))))
(define f-iter-start
(lambda (n)
(if (< n 3)
n
(f-iter n 3 0 1 ... |
c1e5a466dee90600778c066f761eb69004d0df8a7e2484463da124502b66707b | erlcloud/erlcloud | erlcloud_cognito_user_pools_tests.erl | -module(erlcloud_cognito_user_pools_tests).
-include_lib("eunit/include/eunit.hrl").
-include("erlcloud_aws.hrl").
%% API
-export([]).
%% define response macros
-define(EHTTPC, erlcloud_httpc).
-define(USER_POOL_ID, <<"testpool">>).
-define(CLIENT_ID, <<"id-1">>).
-define(USERNAME, <<"test.user">>).
-define... | null | https://raw.githubusercontent.com/erlcloud/erlcloud/a080fe22ac0c8625c2506cdb36b12badf5469910/test/erlcloud_cognito_user_pools_tests.erl | erlang | API
define response macros | -module(erlcloud_cognito_user_pools_tests).
-include_lib("eunit/include/eunit.hrl").
-include("erlcloud_aws.hrl").
-export([]).
-define(EHTTPC, erlcloud_httpc).
-define(USER_POOL_ID, <<"testpool">>).
-define(CLIENT_ID, <<"id-1">>).
-define(USERNAME, <<"test.user">>).
-define(LIST_USERS_RESP,
#{<<"Users"... |
7a1f62e37dd15d9be7a2212b4d2e8e8b3da173362beb98c4204d51d226713ddf | joergen7/effi | effi_racket.erl | %% -*- erlang -*-
%%
%% Effi: Erlang foreign function interface
%%
Copyright 2015 - 2019 < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required ... | null | https://raw.githubusercontent.com/joergen7/effi/aac0d5716c322200dd1145cf6bb651f79834bfd5/src/effi_racket.erl | erlang | -*- erlang -*-
Effi: Erlang foreign function interface
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.... | Copyright 2015 - 2019 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2015 - 2019
-module( effi_racket ).
-behaviour( effi ).
-export( [bind_singleton_boolean/2,
bind_singleton_strin... |
55587d9e173002f1550a9f19391164d346ca109de784765dca478aba76d6d727 | scheme-live/live | output.scm | #("") | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/y-string-reservedCharacterInUTF-8-U%2B1BFFF/output.scm | scheme | #("") | |
92237cf559b64fb0d5ec2368d0466c0d5a16c47cab911aa40b826f9e71484bfd | lindig/fit | fit.ml | Christian Lindig < >
*)
open Angstrom
let defer finally = Fun.protect ~finally
* redefine & as bitwise operation , & & is still logical and
let ( & ) = Int.logand
let ( >> ) = Int.shift_right
let fail fmt = Printf.kprintf (fun msg -> fail msg) fmt
let failwith fmt = Printf.kprintf (fun msg -> failwith msg)... | null | https://raw.githubusercontent.com/lindig/fit/00f19073b4e8d3774d85a3b8529087e248974c04/lib/fit.ml | ocaml | * An integer can be signed or unsigned
* position within record - defines purpose
* in bytes
* representation
* A record is composed of fields. A field has a size and type. The
slot is a number that defines its purpose, like heart rate, and
this meaning is assigned in the protocol and not in the binary
... | Christian Lindig < >
*)
open Angstrom
let defer finally = Fun.protect ~finally
* redefine & as bitwise operation , & & is still logical and
let ( & ) = Int.logand
let ( >> ) = Int.shift_right
let fail fmt = Printf.kprintf (fun msg -> fail msg) fmt
let failwith fmt = Printf.kprintf (fun msg -> failwith msg)... |
db7e20261a96a75bff1574706f82022856fa267ffa32e65cb9bdc53af8e875b1 | kandersen/dpc | Raft.hs | {-# LANGUAGE GADTs #-}
module DPC.Examples.Raft where
import DPC.Types
import DPC.Specifications
data S = Actor {
-- Persistent State
_currentTerm :: Int,
_votedFor :: Maybe NodeID,
_log :: [Int],
-- Volatile State
_comittedIndex :: Int,
_lastApplied :: Int,
Volatile State on Leaders
_nextIndex :: [... | null | https://raw.githubusercontent.com/kandersen/dpc/c2d40a4bbbc1a3bd3f1a0b1b827786e76c5b1bb0/examples/DPC/Examples/Raft.hs | haskell | # LANGUAGE GADTs #
Persistent State
Volatile State
---------- > Follower -------------- > Candidate -------------- > Leader
----------> Follower --------------> Candidate --------------> Leader | module DPC.Examples.Raft where
import DPC.Types
import DPC.Specifications
data S = Actor {
_currentTerm :: Int,
_votedFor :: Maybe NodeID,
_log :: [Int],
_comittedIndex :: Int,
_lastApplied :: Int,
Volatile State on Leaders
_nextIndex :: [Int],
_matchIndex :: [Int]
}
| Client NodeID Int
| Clien... |
3a13968f71f21ecf363647ea6030e1ccaca7169d34649152cdedc1a4e937313b | digital-asset/ghc | Rules.hs |
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[CoreRules]{Transformation rules }
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[CoreRules]{Transformation rules}
-}
# LANGUAGE CPP #
-- | Functions for collecting together and applying rewrite rules to a module.
--... | null | https://raw.githubusercontent.com/digital-asset/ghc/95f84b61f4f22570fc78313ecf54b522743a3f41/compiler/specialise/Rules.hs | haskell | | Functions for collecting together and applying rewrite rules to a module.
The 'CoreRule' datatype itself is declared elsewhere.
** Constructing
** Checking rule applications
** Manipulating 'RuleInfo' rules
* Misc. CoreRule helpers
All of it
make does its
make compiles one module after another .
make does it... |
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[CoreRules]{Transformation rules }
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[CoreRules]{Transformation rules}
-}
# LANGUAGE CPP #
module Rules (
emptyRuleBase, mkRuleBase, extendRuleBaseList,
uni... |
613f5369ae9c9b66b1b428c15b0daf8e6ede465292b9d8f8459b00c3a1db3566 | mishadoff/project-euler | problem035.clj | (ns project-euler
(:use [clojure.contrib.lazy-seqs :only (primes)]))
(defn shift [vect n]
(loop [idx n sqnc vect]
(if (zero? idx) sqnc
(recur (dec idx) (concat (rest sqnc) (list (first sqnc)))))))
(defn is-prime? [prime-seq]
(let [prime (bigint (reduce str prime-seq))]
(= (first (drop-while #(< % ... | null | https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem035.clj | clojure | (ns project-euler
(:use [clojure.contrib.lazy-seqs :only (primes)]))
(defn shift [vect n]
(loop [idx n sqnc vect]
(if (zero? idx) sqnc
(recur (dec idx) (concat (rest sqnc) (list (first sqnc)))))))
(defn is-prime? [prime-seq]
(let [prime (bigint (reduce str prime-seq))]
(= (first (drop-while #(< % ... | |
fb5b85990f21f5b9508294707757a1172de381c24b4043ea017ec07d19c3e495 | input-output-hk/cardano-sl | Common.hs | # LANGUAGE ScopedTypeVariables #
-- | Common definitions for peer discovery and subscription workers.
module Pos.Infra.Diffusion.Subscription.Common
( SubscriptionTerminationReason (..)
, subscriptionListeners
, subscriptionListener
, subscriptionListener1
, networkSubscribeTo
, withNetworkS... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/src/Pos/Infra/Diffusion/Subscription/Common.hs | haskell | | Common definitions for peer discovery and subscription workers.
set of peers.
The routes in this bucket will be of a particular form: each of the
| A subscription ends normally (remote shut it down) or exceptionally
(network issues etc.).
depending on the peer's version.
In case there is a synchronous except... | # LANGUAGE ScopedTypeVariables #
module Pos.Infra.Diffusion.Subscription.Common
( SubscriptionTerminationReason (..)
, subscriptionListeners
, subscriptionListener
, subscriptionListener1
, networkSubscribeTo
, withNetworkSubscription
, networkSubscribeTo'
, updatePeersBucket
, ... |
bee055c3e4dcc0c49e84955394c747d5cc1c3f03c6f2aa7a1e11bc329e33824f | WorksHub/client | db.cljs | (ns wh.company.create-job.db
(:require [cljs.spec.alpha :as s]
[clojure.set :as set]
[clojure.string :as str]
[re-frame.db :refer [app-db]]
[wh.common.data :as data]
[wh.common.specs.company :as company-spec]
[wh.common.specs.location]
... | null | https://raw.githubusercontent.com/WorksHub/client/487141af7af90b2cf7cbc76d12e0eff089bf6176/client/src/wh/company/create_job/db.cljs | clojure | if editing, we want expect values to be overwritten
if not editing, we want to reset any previous values | (ns wh.company.create-job.db
(:require [cljs.spec.alpha :as s]
[clojure.set :as set]
[clojure.string :as str]
[re-frame.db :refer [app-db]]
[wh.common.data :as data]
[wh.common.specs.company :as company-spec]
[wh.common.specs.location]
... |
31e61acb9586c40a9d556e5c2188c087f9d87cb2ce616708bb955ee2d8af7c03 | dbuenzli/topkg | doc.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/topkg/a9664aa01fe6464032f984fe425e2fa9e07e3ce3/src-bin/doc.ml | ocaml | ocamlbuild doesn't like Windows paths it seems. Try to do our best here.
no comment
Command line interface | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
6603c1556ed8239d182aa6cf77948c813c6a5428d0b648457ffa03745de118fd | yetanalytics/dl4clj | tree.clj | (ns dl4clj.nn.api.tree
(:import [org.deeplearning4j.nn.layers.feedforward.autoencoder.recursive Tree])
(:require [dl4clj.utils :refer [contains-many?]]))
;; update when tree actually gets updated
(defn get-ancestor
"returns the ancestor of the given tree.
--note see if tree (this) and root are the same thing"... | null | https://raw.githubusercontent.com/yetanalytics/dl4clj/9ef055b2a460f1a6246733713136b981fd322510/src/dl4clj/nn/api/tree.clj | clojure | update when tree actually gets updated
there is also a .getChildren method
figure out how .children and .getChildren differ or if they do | (ns dl4clj.nn.api.tree
(:import [org.deeplearning4j.nn.layers.feedforward.autoencoder.recursive Tree])
(:require [dl4clj.utils :refer [contains-many?]]))
(defn get-ancestor
"returns the ancestor of the given tree.
--note see if tree (this) and root are the same thing"
[& {:keys [tree height root]}]
(.ance... |
53e036debfb621814810736c00685e8ebde143fc2b8b8f3f3494267c0b605cbc | xvw/planet | man.mli | (** Default Manpage *)
val default
: ?other_authors:(string * string * string option) list
-> string
-> Cmdliner.Manpage.block list
| null | https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/glue/man.mli | ocaml | * Default Manpage | val default
: ?other_authors:(string * string * string option) list
-> string
-> Cmdliner.Manpage.block list
|
e4b655feae85be9625a1b6f6a81baf48ff3cee28252501cdc6a70d8cad07bcf0 | emaphis/HtDP2e-solutions | ex109.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 109_finite_sm) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-dec... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/06-Itemizations-Structures/ex109.rkt | racket | about the language level of this file in a form that our tools can easily process.
6.2 Mixing up Worlds
the same size. After encountering the final letter, the color of the
rectangle turns green. If any “bad” key event occurs, the program displays
a red rectangle.
a finite state machine
data defintitions
Expec... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 109_finite_sm) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 6 Itemizations and Structures
Exercises : 10... |
b4b7bf08f7f755fa2e029e3f14b23373e22c01882c5774479ab66ff6e9d3f0b9 | hspec/hspec | BarSpec.hs | module Foo.BarSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "reverse" $ do
it "reverses a list" $ do
reverse [1 :: Int, 2, 3] `shouldBe` [3, 2, 1]
it "gives the original list, if applied twice" $ p... | null | https://raw.githubusercontent.com/hspec/hspec/b48eee41032450123044de82c4c02213813563b1/hspec-discover/example/Foo/BarSpec.hs | haskell | module Foo.BarSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "reverse" $ do
it "reverses a list" $ do
reverse [1 :: Int, 2, 3] `shouldBe` [3, 2, 1]
it "gives the original list, if applied twice" $ p... | |
03318d780e65b2e3019838d7d8b41b099c3aeb53d011a13799ec8e447653096e | tommaisey/aeon | t-exp-rand.help.scm | ;; (t-exp-rand lo hi trig)
;; Generates a random float value in exponential distribution from lo
;; to hi each time the trig signal changes from nonpositive to
;; positive values lo and hi must both have the same sign and be
;; non-zero.
(let* ((t (dust kr 10))
(f (t-exp-rand 300 3000 t)))
(audition (out 0 (... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/noise/t-exp-rand.help.scm | scheme | (t-exp-rand lo hi trig)
Generates a random float value in exponential distribution from lo
to hi each time the trig signal changes from nonpositive to
positive values lo and hi must both have the same sign and be
non-zero. |
(let* ((t (dust kr 10))
(f (t-exp-rand 300 3000 t)))
(audition (out 0 (mul (sin-osc ar f 0) 0.2))))
|
d03288fd3a98eb2150072ca88b08310fc506cd77a740da2442f510e973191784 | yuriy-chumak/ol | arithmetic_complex.scm | ;
(define A 0+1i) ; manually entered numbers
(define B 1+0i)
(print (+ A B))
(print (- A B))
(print (* A B))
(print (/ A B))
(define C (complex 2/7 -3)) ; functional way
(print "real part of " C " is " (car C))
(print "imaginary part of " C " is " (cdr C))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/arithmetic_complex.scm | scheme |
manually entered numbers
functional way |
(define B 1+0i)
(print (+ A B))
(print (- A B))
(print (* A B))
(print (/ A B))
(print "real part of " C " is " (car C))
(print "imaginary part of " C " is " (cdr C))
|
2bda5fc973132e1bb7bd30dae5555fe96534c0f64f1058c12b9977f058692203 | ocaml-multicore/reagents | base_intf.ml | module type S = sig
type ('a, 'b) t
(** The type of a reagent computation which accepts a value of type ['a] and
returns a value of type ['b]. *)
val never : ('a, 'b) t
(** A reagent that is never enabled. *)
val constant : 'a -> ('b, 'a) t
(** [constant v] is a reagent that always returns [v]. *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/reagents/6721db78b21028c807fb13d0af0aaf9407c662b5/lib/base_intf.ml | ocaml | * The type of a reagent computation which accepts a value of type ['a] and
returns a value of type ['b].
* A reagent that is never enabled.
* [constant v] is a reagent that always returns [v].
* [post_commit f] returns a reagent [r] that runs [f r] after the reagent
[r] (or any reagent constructed using ... | module type S = sig
type ('a, 'b) t
val never : ('a, 'b) t
val constant : 'a -> ('b, 'a) t
val post_commit : ('a -> unit) -> ('a, 'a) t
val lift : ('a -> 'b) -> ('a, 'b) t
* [ lift f ] lifts a pure function [ f ] to a reagent . If [ f ] includes
side - effects , then the side - effects may be perf... |
77d4349ab9443372cff598a7a6bf9d5bea61c013e33982fb4ab1068a5e4ac056 | o1-labs/ocamlbyexample | main.ml | open Core
type person = { name: string ; age: int ; human : bool }
[@@deriving show]
let () =
let human_one = { name = "david" ; age = 32 ; human = false } in
printf "%s\n" (show_person human_one) | null | https://raw.githubusercontent.com/o1-labs/ocamlbyexample/aae2cbf2d80b52eda7c2668369074cf420ff4923/book/chapters/libraries/deriving/main.ml | ocaml | open Core
type person = { name: string ; age: int ; human : bool }
[@@deriving show]
let () =
let human_one = { name = "david" ; age = 32 ; human = false } in
printf "%s\n" (show_person human_one) | |
f29e117c242e3e32a73f361828c75dfdcfa79bac0fa5cc3de0b12886dde81134 | bob-cd/bob | errors.clj | ; Copyright 2018- Rahul De
;
Use of this source code is governed by an MIT - style
; license that can be found in the LICENSE file or at
; .
(ns common.errors
(:require
[clojure.data.json :as json]
[langohr.basic :as lb]
[clojure.tools.logging :as log]))
(defn publish-error
[chan message]
(log/error ... | null | https://raw.githubusercontent.com/bob-cd/bob/72ee2dd1c58fbbeff2c63333732eefa260e5d0cf/common/src/common/errors.clj | clojure | Copyright 2018- Rahul De
license that can be found in the LICENSE file or at
.
Default exchange | Use of this source code is governed by an MIT - style
(ns common.errors
(:require
[clojure.data.json :as json]
[langohr.basic :as lb]
[clojure.tools.logging :as log]))
(defn publish-error
[chan message]
(log/error message)
(lb/publish chan
"bob.errors"
(json/write-str {:... |
8a4c18cafc4ad730eaeccd2b6d5eaa8a1140beaab82e47ef5fea5d703877b4fe | cj1128/sicp-review | permutations.scm | Example of " Nesting Mapping "
;; Get permutations of a set
(define (flatmap proc seq)
(fold-right append '() (map proc seq)))
(define (permutations s)
(if (null? s)
(list '())
(flatmap (lambda (x)
(map (lambda (p)
(cons x p))
(permutati... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.2/permutations.scm | scheme | Get permutations of a set | Example of " Nesting Mapping "
(define (flatmap proc seq)
(fold-right append '() (map proc seq)))
(define (permutations s)
(if (null? s)
(list '())
(flatmap (lambda (x)
(map (lambda (p)
(cons x p))
(permutations (remove x s))))
... |
4e824b82fbf310455cb0eb0ef5e2428402aa949be1a372530b94ed260f945eeb | jsquared21/Pragmatic-Programming-Erlang | lib_misc.erl | @author < >
jsquared , Inc. , 2014 .
2014 by jsquared
%% @version 0.1
-module(lib_misc).
-export ([my_spawn/3, my_keep_alive/2, my_spawn/4, running_restarter/0,
restart_each/1, restart_all/1, on_exit/2, keep_alive/2, running/0]).
%-compile(export_all).
%% Ex:13-1.
Write a function my_spawn(Mod , Func , ... | null | https://raw.githubusercontent.com/jsquared21/Pragmatic-Programming-Erlang/f028b4f288785ca6cd4e6bed7e7a03f627efbfb5/Ch_13/lib_misc.erl | erlang | @version 0.1
-compile(export_all).
Ex:13-1.
process dies, a message should be printed saying why the process
died and how long the process lived for before it died.
Solve the previous exercise using the on_exit function shown
earlier in this chapter.
Ex:13-3.
Write a function that creates a registered process... | @author < >
jsquared , Inc. , 2014 .
2014 by jsquared
-module(lib_misc).
-export ([my_spawn/3, my_keep_alive/2, my_spawn/4, running_restarter/0,
restart_each/1, restart_all/1, on_exit/2, keep_alive/2, running/0]).
Write a function my_spawn(Mod , Func , ) that behaves like
spawn(Mod , Func , ) but wi... |
f57cf5eae844b52f56d39d2cd6999d409ce855fa3e9d7e4bcd930564b756d71b | yesodweb/serversession | Core.hs | -- | Core server-side session support.
module Web.ServerSession.Core
( -- * For serversession storage backends
SessionId
, AuthId
, Session(..)
, Storage(..)
, StorageException(..)
, IsSessionData(..)
, DecomposedSession(..)
-- * For serversession frontends
, SessionMap(..)
, State
, create... | null | https://raw.githubusercontent.com/yesodweb/serversession/bcd2b7da843082403fc38786443a14a9b877a59b/serversession/src/Web/ServerSession/Core.hs | haskell | | Core server-side session support.
* For serversession storage backends
* For serversession frontends
** To be re-exported by frontends | module Web.ServerSession.Core
SessionId
, AuthId
, Session(..)
, Storage(..)
, StorageException(..)
, IsSessionData(..)
, DecomposedSession(..)
, SessionMap(..)
, State
, createState
, getCookieName
, getHttpOnlyCookies
, getSecureCookies
, loadSession
, cookieExpires
, saveSession
... |
1725181bd502447213ea5f575895566a9506293df93a8014b48b126b1aa4c002 | LesBoloss-es/sorting | TopDownMergesort.ml | * { 1 Top - Down Mergesort }
This module contains the implementation of Top - Down Mergesort implemented as
part of the experiments in ( Munro & Wild 2018 ) and made available by the
authors at the address :
-optimal-mergesort-code/blob/master/src/wildinter/net/mergesort/TopDownMergesort.java
... | null | https://raw.githubusercontent.com/LesBoloss-es/sorting/7c6cafcb16a43d3cfa917ea735ad7fcddd98e855/src/array/nearly-optimal-mergesort/TopDownMergesort.ml | ocaml | * { 1 Top - Down Mergesort }
This module contains the implementation of Top - Down Mergesort implemented as
part of the experiments in ( Munro & Wild 2018 ) and made available by the
authors at the address :
-optimal-mergesort-code/blob/master/src/wildinter/net/mergesort/TopDownMergesort.java
... | |
c5cb40857ff3de2cc7641986dd05b5f3464c68a21fc50b62da42d80aead4078f | uncomplicate/clojurecl | constants.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/clojurecl/58f8b9dc42a9b7faa526687c836be23cc2b6e7fd/src/clojure/uncomplicate/clojurecl/internal/constants.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE 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 rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.clojurecl.internal.constants
"Defines constants and mappings from/to OpenCL constants.
OpenCL API defines and uses numerous int/long C-style constants as arguments
in functions calls, mostly for configuring various optio... |
ec306326fcbb6b0129ed3c1104c54e43e46f883cfbd3288ed22e5b011e53ebdf | dmvianna/haskellbook | Ch17-Applicative-Ex.hs |
module Apl3 where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
1 . Identity
newtype Identity a = Identity a deriving (Show, Eq)
instance Functor Identity where
fmap f (Identity a) = Identity (f a)
instance Applicative Identit... | null | https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch17-Applicative-Ex.hs | haskell | Test it
Combinations |
module Apl3 where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
1 . Identity
newtype Identity a = Identity a deriving (Show, Eq)
instance Functor Identity where
fmap f (Identity a) = Identity (f a)
instance Applicative Identit... |
6be3699a32b222f9b8650afb45f5b5598f264c65be03d2c6bbb9b49285929c48 | perkss/clojure-kafka-examples | core_test.clj | (ns kafka-streams-example.core-test
(:require [clojure.test :refer :all]
[kafka-streams-example.core :as sut]
[kafka-streams-example.test-support :as support])
(:import org.apache.kafka.common.serialization.Serdes
[org.apache.kafka.streams TopologyTestDriver Topology]))
(deftest ... | null | https://raw.githubusercontent.com/perkss/clojure-kafka-examples/2c1e3d62b768c0c6919ab36b0f05f469b322f3e6/kafka-streams-example/test/kafka_streams_example/core_test.clj | clojure | (ns kafka-streams-example.core-test
(:require [clojure.test :refer :all]
[kafka-streams-example.core :as sut]
[kafka-streams-example.test-support :as support])
(:import org.apache.kafka.common.serialization.Serdes
[org.apache.kafka.streams TopologyTestDriver Topology]))
(deftest ... | |
5feaf90f738231bc138114220f5c77f831251d5778f06483acb0129119e6d33d | futurice/haskell-mega-repo | Internal.hs | {-# LANGUAGE DeriveLift #-}
{-# LANGUAGE OverloadedStrings #-}
module Futurice.CostCenter.Internal (
CostCenterInfo (..),
parseCostCenterCode,
) where
import Data.Aeson.Compat (FromJSON (..), withText)
import Data.Char (isDigit)
import Futurice.Prelude
import Prelude ()
im... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/futurice-tribes/src/Futurice/CostCenter/Internal.hs | haskell | # LANGUAGE DeriveLift #
# LANGUAGE OverloadedStrings # | module Futurice.CostCenter.Internal (
CostCenterInfo (..),
parseCostCenterCode,
) where
import Data.Aeson.Compat (FromJSON (..), withText)
import Data.Char (isDigit)
import Futurice.Prelude
import Prelude ()
import qualified Text.Trifecta as T
data CostCenterInfo = CostCenterInf... |
1793eb88b3487fd590402b0d0032f477f96dfe3b6bae78cc95fd2fd4685a817c | jafingerhut/clojure-benchmarks | fannkuchredux.clj | The Computer Language Benchmarks Game
;; /
;;
contributed by , ported from Java version
(ns fannkuchredux
(:require clojure.string)
(:import [java.util.concurrent.atomic AtomicInteger])
(:gen-class))
(set! *warn-on-reflection* true)
(set! *unchecked-math* true)
(def ^:const NCHUNKS 150)
(def ^AtomicI... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/2017-mar-31-benchmarks-game-site-versions/fannkuchredux.clj | clojure | /
constant
constant
constant
global scope
global scope | The Computer Language Benchmarks Game
contributed by , ported from Java version
(ns fannkuchredux
(:require clojure.string)
(:import [java.util.concurrent.atomic AtomicInteger])
(:gen-class))
(set! *warn-on-reflection* true)
(set! *unchecked-math* true)
(def ^:const NCHUNKS 150)
(def ^AtomicInteger tas... |
d9040cd3327fa5f4d6549541100b4ae17614fc3f0e644ce331a618418e9f6aab | thheller/shadow-grove | atoms.cljs | (ns shadow.grove.ui.atoms
(:require
[shadow.grove.components :as comp]
[shadow.grove.protocols :as gp]
[shadow.grove.ui.util :as util]))
(deftype EnvWatch
[key-to-atom path default
^:mutable the-atom
^:mutable val
^:mutable component-handle]
gp/IHook
(hook-init! [this ch]
(set! compon... | null | https://raw.githubusercontent.com/thheller/shadow-grove/997e5dc1dffb94e91b1ba4e232b824067f4cfede/src/main/shadow/grove/ui/atoms.cljs | clojure | check immediately and only invalidate if actually changed
avoids kicking off too much work
born ready
only gets here if val actually changed
born ready
only gets here if value changed
need to forget about the previous atom
since it was also redefined to be a new atom
so any local update will update the new one... | (ns shadow.grove.ui.atoms
(:require
[shadow.grove.components :as comp]
[shadow.grove.protocols :as gp]
[shadow.grove.ui.util :as util]))
(deftype EnvWatch
[key-to-atom path default
^:mutable the-atom
^:mutable val
^:mutable component-handle]
gp/IHook
(hook-init! [this ch]
(set! compon... |
c0a4e68d154a93cf76135b6c4df4c23d8e0ea18e63b25f9831fb6ae2f1137d61 | hatsugai/Guedra | form.ml | open Csp
open Guedra
type client = {
cwch : win_msg chan;
mutable rb : int rect;
}
type context = {
mutable width : int;
mutable height : int;
mutable inv : event option;
mutable cap : client option;
mutable act : bool;
mutable cact : win_msg chan option;
}
let rec find_client cs ... | null | https://raw.githubusercontent.com/hatsugai/Guedra/592e9b4cff151228735d2c61c337154cde8b5329/src/form.ml | ocaml | send initial size | open Csp
open Guedra
type client = {
cwch : win_msg chan;
mutable rb : int rect;
}
type context = {
mutable width : int;
mutable height : int;
mutable inv : event option;
mutable cap : client option;
mutable act : bool;
mutable cact : win_msg chan option;
}
let rec find_client cs ... |
a0c32c39112dca74b1fc5f9fda7806ca8601757c63e03c9088649b834278401b | themattchan/haskell-tiger | Env.hs | {-# LANGUAGE OverloadedStrings #-}
module Language.Tiger.Env where
import Language.Tiger.Types
import qualified Language.Tiger.Translate as Translate
import qualified Language.Tiger.Temp as Temp
import qualified Language.Tiger.Symtab as Symtab
data EnvEntry
= VarEntry
{ -- access :: Translate.Access
t... | null | https://raw.githubusercontent.com/themattchan/haskell-tiger/cdf439a45e51783b3d2023c261426abdd7cd1067/src/Language/Tiger/Env.hs | haskell | # LANGUAGE OverloadedStrings #
access :: Translate.Access
level :: Translate.Level
, label :: Temp.Label |
module Language.Tiger.Env where
import Language.Tiger.Types
import qualified Language.Tiger.Translate as Translate
import qualified Language.Tiger.Temp as Temp
import qualified Language.Tiger.Symtab as Symtab
data EnvEntry
= VarEntry
ty :: Ty
}
| FunEntry
formals :: [Ty]
, result :: Ty... |
357a73ecdf6b313d0611d9bc63a3e5fcf6cc5786a4624e2cb4363f30294242e6 | chumsley/jwacs | test-cps-transformation.lisp | test-cps-transformation.lisp
;;;
;;; Tests for the cps transformation
;;;
Copyright ( c ) 2005 - 2006
;;; See LICENSE for full licensing details.
;;;
(in-package :jwacs-tests)
;;;; Test categories
(defnote cps "tests for the cps transformation")
;;;; Tests
(deftest cps/factorial/1 :notes cps
(with-fresh-gen... | null | https://raw.githubusercontent.com/chumsley/jwacs/c25adb3bb31fc2dc6e8c8a58346949ee400633d7/tests/test-cps-transformation.lisp | lisp |
Tests for the cps transformation
See LICENSE for full licensing details.
Test categories
Tests
});
});
});
}, 'this will never be seen');
}, 'might see this');
}, 'yes');
}, 'no');
},
},
"))))
}, 'hi');
}, false);"))
};
}, e);
});
... | test-cps-transformation.lisp
Copyright ( c ) 2005 - 2006
(in-package :jwacs-tests)
(defnote cps "tests for the cps transformation")
(deftest cps/factorial/1 :notes cps
(with-fresh-genvar
(test-transform 'cps (parse "
function factorial1(n)
{
if(n == 0)
else
{
... |
f7c016c680f8964fb4c28941ea39797b353e5a99a650696af11a170537e6fc0f | mmontone/erudite | markdown.lisp | (in-package :erudite)
;; @subsubsection Markdown output
(defmethod %format-syntax ((output-type (eql :markdown))
(selector (eql :section))
stream
syntax)
(let ((section-name (second syntax)))
(terpri stream)
(write-string "# " stream)
(write-string section-name stream)
(terpri stre... | null | https://raw.githubusercontent.com/mmontone/erudite/d421f4ed27faa636d5d4d768c4b64274023d63b2/syntax/markdown.lisp | lisp | @subsubsection Markdown output | (in-package :erudite)
(defmethod %format-syntax ((output-type (eql :markdown))
(selector (eql :section))
stream
syntax)
(let ((section-name (second syntax)))
(terpri stream)
(write-string "# " stream)
(write-string section-name stream)
(terpri stream)))
(defmethod %format-syntax (... |
0d628d2722b9482a784e9ccebbadd9a8213010a61ec706f66a6519a4df22eef0 | nubank/ordnungsamt | apply_migrations_test.clj | (ns integration.apply-migrations-test
(:require [cheshire.core :as json]
[clj-github.state-flow-helper :refer [mock-github-flow with-github-client]]
clojure.string
[clojure.test :refer :all]
[integration.aux.data :refer [migrations-dir org repository repository-dir]]
... | null | https://raw.githubusercontent.com/nubank/ordnungsamt/1b9761627e956e4c6e7b9c1e858bc5bedafafa8c/test/integration/integration/apply_migrations_test.clj | clojure | test doesn't have assertions but shouldn't raise an exception | (ns integration.apply-migrations-test
(:require [cheshire.core :as json]
[clj-github.state-flow-helper :refer [mock-github-flow with-github-client]]
clojure.string
[clojure.test :refer :all]
[integration.aux.data :refer [migrations-dir org repository repository-dir]]
... |
75968fd66e7b2204b50a0fa7f689e2fabac20190e3cc4dc039d03ee5f1df211c | thelema/ocaml-community | mutex.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
and , INRI... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/threads/mutex.ml | ocaml | *********************************************************************
OCaml
... | and , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
type t = { mutable locked: bool; mutable waiting: Thr... |
886494f4a54006eb9a10069df00fdaa7b6cc41791d97f4d9183dcb75409d47c6 | shuieryin/wechat_mud | wechat_mud_app.erl | %%%-------------------------------------------------------------------
%%% @author Shuieryin
( C ) 2015 , Shuieryin
%%% @doc
%%%
Wechat mud application start .
%%%
%%% @end
Created : 26 . Aug 2015 11:04 AM
%%%-------------------------------------------------------------------
-module(wechat_mud_app).
-behaviour... | null | https://raw.githubusercontent.com/shuieryin/wechat_mud/b2a9251a9b208fee5cd8c4213759750b95c8b8aa/src/wechat_mud_app.erl | erlang | -------------------------------------------------------------------
@author Shuieryin
@doc
@end
-------------------------------------------------------------------
Application callbacks
===================================================================
Application callbacks
===================================... | ( C ) 2015 , Shuieryin
Wechat mud application start .
Created : 26 . Aug 2015 11:04 AM
-module(wechat_mud_app).
-behaviour(application).
-export([
start/2,
stop/1,
init/2
]).
-record(state, {}).
-spec start(StartType, StartArgs) -> Return when
StartType :: application:start_type(),
Retur... |
4f3382a596f7734f2780b78b6215b58c7c03991bb7e6a32ba33f0dec976fd155 | fulcrologic/semantic-ui-wrapper | ui_visibility.cljc | (ns com.fulcrologic.semantic-ui.behaviors.visibility.ui-visibility
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$Visibility" :as Visibility])))
(def ui-visibility
"Visibility provides a set of callbacks for when a content appears in the viewport.
Props:
... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/behaviors/visibility/ui_visibility.cljc | clojure | (ns com.fulcrologic.semantic-ui.behaviors.visibility.ui-visibility
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$Visibility" :as Visibility])))
(def ui-visibility
"Visibility provides a set of callbacks for when a content appears in the viewport.
Props:
... | |
e5f8ee19bc6483c481bcc3c1b5d96285b8af99ed7f7639febb64e4886795e613 | erlang/otp | raw_file_io.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2017 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/daccb908c6d46bef5b1129fac66e1cdacb5e0568/lib/kernel/src/raw_file_io.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2017 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(raw_file_io).
-export([open/2]).
open(Filename, Modes) ->
ModuleOrder = [{raw_file_io_list, fun match_l... |
06168f2d410ce9fb6a02f23687a109c604a59f86d90f4bba4f8c3c127ff7d08f | hbr/albatross | build_expression.mli | open Alba_core
open Ast
val build:
Expression.t
-> Context.t
-> (Term.t * Term.typ, Build_problem.t) result
val build_definition:
Expression.definition
-> Context.t
-> (Term.t * Term.typ, Build_problem.t) result
val build_named_type:
string Located.t
-> Expression.t
-> Context.... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/albalib/build_expression.mli | ocaml | open Alba_core
open Ast
val build:
Expression.t
-> Context.t
-> (Term.t * Term.typ, Build_problem.t) result
val build_definition:
Expression.definition
-> Context.t
-> (Term.t * Term.typ, Build_problem.t) result
val build_named_type:
string Located.t
-> Expression.t
-> Context.... | |
efe5a7d95adb5865e0db53fa4341bc103fd9f0f23e4c60dd686da166134aafc9 | kanaka/bartender | render.cljs | (ns send.render
(:require [clojure.math.combinatorics :refer [combinations]]
[wend.util :refer [strip-wrap-ahem]]
[send.core :as core]
[send.net :refer [load-edn]]))
(def RED "#f09090")
(def GREEN "#90f090")
(def TAN "#ffffd0")
(defn format-html [html-text]
(-> html-text
... | null | https://raw.githubusercontent.com/kanaka/bartender/4357fde74adb228a3cd3fcc12cae4926da899b4e/src/send/render.cljs | clojure | (prn :base-size base-size :base-value start-value)
(prn :fail-size fail-size :fail-value (get-in slug-log [:fail 0]))
(prn :shrunk-size shrunk-size :shrunk-value (get-in shrink [:smallest 0]))
Δ
--- | (ns send.render
(:require [clojure.math.combinatorics :refer [combinations]]
[wend.util :refer [strip-wrap-ahem]]
[send.core :as core]
[send.net :refer [load-edn]]))
(def RED "#f09090")
(def GREEN "#90f090")
(def TAN "#ffffd0")
(defn format-html [html-text]
(-> html-text
... |
d3e591f61b691a3c8556f90a794a6f7af680fedc6ad29ba6076be514c2c69b70 | coq-community/coqffi | exn.mli | type bar
exception Foo of bar
exception FooBar of int * bool
| null | https://raw.githubusercontent.com/coq-community/coqffi/0e31ff7bcced176afd6233c7825f4bd41ab894ce/examples/src/exn.mli | ocaml | type bar
exception Foo of bar
exception FooBar of int * bool
| |
4da655e7ae92d99affab9bc12174f9533c3b23ba5bd9081cd95591b51e1fa9ae | danielecapo/sfont | bezier.rkt | #lang racket
(require racket/draw
(prefix-in pict: slideshow/pict)
"vec.rkt"
"bounding-box.rkt"
"../../utilities.rkt")
(provide
(contract-out
[bezier/c (-> any/c boolean?)]
[segment/c (-> any/c boolean?)]
[cubic-segment/c (-> any/c boolean?)]
[cubic-bezier/c (-> any/c bo... | null | https://raw.githubusercontent.com/danielecapo/sfont/c854f9734f15f4c7cd4b98e041b8c961faa3eef2/sfont/private/geom/bezier.rkt | racket | Data Definition
The number of nodes should be (+ 1 (* g s)), where s is the numer of segments
a Segment is a Beziers with g + 1 nodes
Example
Bezier -> Boolean
produce a list of nodes that lie on the Cubic Bezier (remove the 'control points')
produce a pair with the end points of the curve or segment
produce th... | #lang racket
(require racket/draw
(prefix-in pict: slideshow/pict)
"vec.rkt"
"bounding-box.rkt"
"../../utilities.rkt")
(provide
(contract-out
[bezier/c (-> any/c boolean?)]
[segment/c (-> any/c boolean?)]
[cubic-segment/c (-> any/c boolean?)]
[cubic-bezier/c (-> any/c bo... |
22915d552209dde031ba53164d837bb5729d3af0240272fab71bbf5900d04d4d | degree9/material-hl | snackbar.cljs | (ns material-hl.snackbar
(:require [hoplon.core :as hl]
[material-hl.core :as core]
[material-hl.button :as btn]
[cljsjs.material-components]))
(defelem snackbar [attr kids]
(let []
(hl/div :snackbar true
(core/assoc-class attr
{:mdc-snackbar true})
kids)... | null | https://raw.githubusercontent.com/degree9/material-hl/01d50358293679c1ee9f65d2aa4f0b91863ea278/src/material_hl/snackbar.cljs | clojure | (ns material-hl.snackbar
(:require [hoplon.core :as hl]
[material-hl.core :as core]
[material-hl.button :as btn]
[cljsjs.material-components]))
(defelem snackbar [attr kids]
(let []
(hl/div :snackbar true
(core/assoc-class attr
{:mdc-snackbar true})
kids)... | |
770da0c33f2a5951f5dc63df2bf4612c8fde238a5c67751457b8e72fdeeb9652 | achirkin/vulkan | VK_EXT_validation_cache.hs | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LA... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_validation_cache.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
author: @GOOGLE@
type: @... | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_EXT_validation_cache
* Vulkan extension :
contact : @Cort Stratton @cdwfs@
module Graphics.Vulkan.Marshal, AHardwareBuffer(),
... |
ee1a37aa0ec0cab11198bcafb4a4983eb942af0d16d4cca7565b5bfe64179669 | pietervdvn/ALGT | Test.hs | module Changer.Test where
import TypeSystem
import Utils.Utils
import Utils.ToString
import TypeSystem.Parser.TypeSystemParser
import Assets
import Data.Either
import Changer.Changes
import Changer.ChangesParser
stfl = parseTypeSystem Assets._Test_STFL_typesystem (Just "Test_STFL")& either (error . show) id
synta... | null | https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/Changer/Test.hs | haskell | -
t' = & rights & toParsable' "\n"
- | module Changer.Test where
import TypeSystem
import Utils.Utils
import Utils.ToString
import TypeSystem.Parser.TypeSystemParser
import Assets
import Data.Either
import Changer.Changes
import Changer.ChangesParser
stfl = parseTypeSystem Assets._Test_STFL_typesystem (Just "Test_STFL")& either (error . show) id
synta... |
9afd6d6be4c40dd32c80e00a79909f75876468480e3b1830839d2c69aa980d73 | acl2/acl2 | svtv-stobj-debug@useless-runes.lsp | (SV::FSM-DEBUG-WRITEPHASES
(1737 44 (:REWRITE LOWER-BOUND-OF-LEN-WHEN-SUBLISTP))
(1617 19 (:REWRITE SUBLISTP-WHEN-PREFIXP))
(1289 76 (:REWRITE PREFIXP-WHEN-EQUAL-LENGTHS))
(700 134 (:DEFINITION LEN))
(647 76 (:REWRITE PREFIXP-WHEN-PREFIXP))
(469 44 (:REWRITE LEN-WHEN-PREFIXP))
(282 6 (:REWRITE VL::VL-PRINTEDLIST... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/centaur/sv/svtv/.sys/svtv-stobj-debug%40useless-runes.lsp | lisp | (SV::FSM-DEBUG-WRITEPHASES
(1737 44 (:REWRITE LOWER-BOUND-OF-LEN-WHEN-SUBLISTP))
(1617 19 (:REWRITE SUBLISTP-WHEN-PREFIXP))
(1289 76 (:REWRITE PREFIXP-WHEN-EQUAL-LENGTHS))
(700 134 (:DEFINITION LEN))
(647 76 (:REWRITE PREFIXP-WHEN-PREFIXP))
(469 44 (:REWRITE LEN-WHEN-PREFIXP))
(282 6 (:REWRITE VL::VL-PRINTEDLIST... | |
dda0a0328eecc772b704f74995dcec4cdca576c083f71fd74bdcb49c4e04ca3c | nh2/network-house | IPv4.hs | module Net.IPv4 where
Internet Protocol
-- reference:
import Data.Char
import Net.Bits
import Net.Utils
import Net.Packet
import Net.PacketParsing
data Addr = Addr !Word8 !Word8 !Word8 !Word8
deriving (Eq,Ord)
loopbackAddr = Addr 127 0 0 1
broadcastAddr a = a `orAddr` complAddr (d... | null | https://raw.githubusercontent.com/nh2/network-house/f31b6af230069f21928aae2b7242eb2c53e4d678/Net/IPv4.hs | haskell | reference:
We don't need numeric operations or shifting...
in bytes
should be zero
should be zero
A quick hack, I haven't read the RFC... /TH
minimum header length
TODO:
includes type & self
4- } -- in units of 4 bytes
let olen = (hl-5)*4 -- length of options and padding
tos <- parse -- t... | module Net.IPv4 where
Internet Protocol
import Data.Char
import Net.Bits
import Net.Utils
import Net.Packet
import Net.PacketParsing
data Addr = Addr !Word8 !Word8 !Word8 !Word8
deriving (Eq,Ord)
loopbackAddr = Addr 127 0 0 1
broadcastAddr a = a `orAddr` complAddr (defaultNetmask a... |
31c5cb358b64e70cf50a8be0d400aa13f4c4abc95bed9ce815bfa0e166ea06ea | gethop-dev/payments.stripe | product_test.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
;; file, You can obtain one at /
(ns dev.gethop.payments.stripe.product-test
(:require [clojure.test :refer :all]
[dev.gethop.payments.core :as core]
[... | null | https://raw.githubusercontent.com/gethop-dev/payments.stripe/2379ba790123d7380ffc397cf4920cbe2936f840/test/dev/gethop/payments/stripe/product_test.clj | clojure | file, You can obtain one at / | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
(ns dev.gethop.payments.stripe.product-test
(:require [clojure.test :refer :all]
[dev.gethop.payments.core :as core]
[dev.gethop.payments.stripe]
... |
263439346b560be5f45ac0b6377bb5d0ff6856b53b8bd54cee97bc0e7ffbd259 | Deep-Symmetry/dysentery | finder.clj | (ns dysentery.finder
"Watches for broadcast traffic to the port where devices announce
their presence, so we can see the addresses (and therefore network
interface) on which DJ Link activity is taking place."
{:author "James Elliott"}
(:require [clojure.math.numeric-tower :as math]
[dysentery.util... | null | https://raw.githubusercontent.com/Deep-Symmetry/dysentery/0460d68a771c68f50c1cb1dcdf184a39d033f0e5/src/dysentery/finder.clj | clojure | Record the newly-seen device
Check packet length
Only IPv4 addresses have broadcast addresses | (ns dysentery.finder
"Watches for broadcast traffic to the port where devices announce
their presence, so we can see the addresses (and therefore network
interface) on which DJ Link activity is taking place."
{:author "James Elliott"}
(:require [clojure.math.numeric-tower :as math]
[dysentery.util... |
3f4df2e7d7be4b31c3d5c405bae3b35b4d8aeec23cfd37ce884f7b46f15249ba | blambo/accelerate-repa | Permute.hs | {-# LANGUAGE TypeOperators, ScopedTypeVariables #-}
import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Repa as Repa
import Data.Array.Accelerate.Interpreter as Interpreter
main :: IO ()
main = do
putStrLn $ Repa.run $
permute comb dftArr perm srcArr
-- comb :: Int -> Int -> Int
comb = (+)
perm... | null | https://raw.githubusercontent.com/blambo/accelerate-repa/5ea4d40ebcca50d5b952e8783a56749cea4431a4/examples/Permute.hs | haskell | # LANGUAGE TypeOperators, ScopedTypeVariables #
comb :: Int -> Int -> Int | import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Repa as Repa
import Data.Array.Accelerate.Interpreter as Interpreter
main :: IO ()
main = do
putStrLn $ Repa.run $
permute comb dftArr perm srcArr
comb = (+)
perm :: Exp (Z:. Int:. Int) -> Exp (Z:. Int)
perm ix = let (Z:.y:.(x :: Exp Int)) = u... |
3805e28cb27e71a3b3c4aa80b5096aa545d3f224008ac2227a65a0563eb94366 | sibylfs/sibylfs_src | checklib_2.mli | (****************************************************************************)
Copyright ( c ) 2013 , 2014 , 2015 , , , ,
( as part of the SibylFS project )
(* *)
(* Permission to use, copy, modify, and/or d... | null | https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/debug/checklib_2.mli | ocaml | **************************************************************************
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright no... | Copyright ( c ) 2013 , 2014 , 2015 , , , ,
( as part of the SibylFS project )
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL
PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER
TORTIOUS ACTION , ARISING OUT OF OR IN CONNE... |
60912f788631bbe3a3e14259d1b90d72f3476f2a89500ea293c3f57854d86537 | conal/shaped-types | RPow.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE TypeFamilies #
#include "Circat/AbsTy.inc"
AbsTyPragmas
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTI... | null | https://raw.githubusercontent.com/conal/shaped-types/3778974bca793fa810195546e0d4362151aa9a6b/src/ShapedTypes/Types/RPow.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
TEMP
TEMP
--------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
Right-associated functor exponentiation
-----------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE TypeFamilies #
#include "Circat/AbsTy.inc"
AbsTyPragmas
# OPTIONS_GHC -Wall #
Module : . Types . RPow
Copyright : ( c ) 2016 Conal Elliott
module ShapedTypes.Types.RPow where
AbsTyImports
import Circat.Rep
... |
3bffc3ae876fd6e32258099006925909e6640633a4ba9780d969641b40692933 | karamaan/karamaan-opaleye | Nullable.hs | {-# LANGUAGE Arrows #-}
module Karamaan.Opaleye.Nullable where
import Karamaan.Opaleye.QueryArr (QueryArr, Query)
import Karamaan.Opaleye.Wire (Wire)
import qualified Karamaan.Opaleye.ExprArr as E
import qualified Karamaan.Opaleye.Wire as Wire
import qualified Karamaan.Opaleye.Operators2 as Op2
import Control.Arrow (... | null | https://raw.githubusercontent.com/karamaan/karamaan-opaleye/2863dc1dba9ea1e810cb0860a9b8de53f50af354/Karamaan/Opaleye/Nullable.hs | haskell | # LANGUAGE Arrows #
synonym to Maybe with its own type, and then the transition to
Nullable will be complete!
This is just used a phantom type in 'Wire's.
It's not actually used for values.
For now just use a type synonym. We will switch to a type later.
Don't use Maybe in Wires in new code!
TODO: perhaps this ... |
module Karamaan.Opaleye.Nullable where
import Karamaan.Opaleye.QueryArr (QueryArr, Query)
import Karamaan.Opaleye.Wire (Wire)
import qualified Karamaan.Opaleye.ExprArr as E
import qualified Karamaan.Opaleye.Wire as Wire
import qualified Karamaan.Opaleye.Operators2 as Op2
import Control.Arrow (arr)
import Database.Has... |
6b720e6e09be1aa0310be661c9a1fc7fd2348cdede05e16b6c61bd6d175c0b81 | mtpearce/idyom | apps.lisp | ;;;; ======================================================================
;;;; File: apps.lisp
Author : < >
;;;; Created: <2005-11-27 16:27:35 marcusp>
Time - stamp : < 2016 - 05 - 25 12:13:04 >
;;;; ======================================================================
(cl:in-package #:apps)
... | null | https://raw.githubusercontent.com/mtpearce/idyom/d0449a978c79f8ded74c509fdfad7c1a253c5a80/apps/apps.lisp | lisp | ======================================================================
File: apps.lisp
Created: <2005-11-27 16:27:35 marcusp>
======================================================================
Paths
All users should define the path *idyom-root* as a 'working
directory' for IDyOM, e.g. using (setq ... | Author : < >
Time - stamp : < 2016 - 05 - 25 12:13:04 >
(cl:in-package #:apps)
(eval-when (:compile-toplevel :load-toplevel :execute)
* root - dir * provides a location for IDyOM 's caches etc .
(defvar *root-dir*
(if (boundp 'common-lisp-user::*idyom-root*)
common-lisp-user::*idyom-root*
... |
dfb83c863c877d84c4d7c1e6fe5105dd34ea148aeb18493af71ea611e2a00af9 | srid/Taut | Import.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE ... | null | https://raw.githubusercontent.com/srid/Taut/75f10c50a391d6e7301f6a26b2c781f0bf76a5c1/backend/src/Backend/Import.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
Create tables
Load JSON data | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Import Slack JSON archive into database
module ... |
5f0dd4af2c21ab2ea0a77c7022297880157324e824407fc53c1f2e0fa2190990 | jgm/gitit2 | Edit.hs | module Network.Gitit2.Handler.Edit (
getEditR,
getRevertR,
postUpdateR,
postCreateR
) where
import Control.Monad (when)
import Data.ByteString.Lazy.UTF8 (toString)
import Data.FileStore as FS
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import ... | null | https://raw.githubusercontent.com/jgm/gitit2/db61eae0e17c356830979747e2899ac5eaad03a5/Network/Gitit2/Handler/Edit.hs | haskell | revert?
contents to put in text box
unless new page, Just id of old version | module Network.Gitit2.Handler.Edit (
getEditR,
getRevertR,
postUpdateR,
postCreateR
) where
import Control.Monad (when)
import Data.ByteString.Lazy.UTF8 (toString)
import Data.FileStore as FS
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import ... |
c0739031438bbb85ba4acff9c439958e2ce40e7544bcd5d133012699a4c9316d | yetanalytics/dl4clj | rocs.clj | (ns dl4clj.eval.api.rocs
(:import [org.deeplearning4j.eval ROCMultiClass ROC])
(:require [clojure.core.match :refer [match]]
[dl4clj.utils :refer [obj-or-code? eval-if-code]]))
(defn calculate-area-under-curve
"Calculate the AUC - Area Under Curve
Utilizes trapezoidal integration internally
:roc... | null | https://raw.githubusercontent.com/yetanalytics/dl4clj/9ef055b2a460f1a6246733713136b981fd322510/src/dl4clj/eval/api/rocs.clj | clojure |
only for multi-class ROCs
| (ns dl4clj.eval.api.rocs
(:import [org.deeplearning4j.eval ROCMultiClass ROC])
(:require [clojure.core.match :refer [match]]
[dl4clj.utils :refer [obj-or-code? eval-if-code]]))
(defn calculate-area-under-curve
"Calculate the AUC - Area Under Curve
Utilizes trapezoidal integration internally
:roc... |
06943ee9a4ef3f26d7ff4c8252a858dd142d9dd675c66aba9f1aea7887af5249 | nyampass/conceit | regex.clj | (ns conceit.commons.regex
(import java.util.regex.Pattern))
(defn regex? [obj]
(instance? Pattern obj))
(defn regex-from-string [s]
(Pattern/compile (Pattern/quote s)))
(defn regex-starts-with [s]
(Pattern/compile (str "^" (Pattern/quote s))))
| null | https://raw.githubusercontent.com/nyampass/conceit/2b8ba8cc3d732fe2f58d320e2aa4ecdd6f3f3be5/conceit-commons/src/conceit/commons/regex.clj | clojure | (ns conceit.commons.regex
(import java.util.regex.Pattern))
(defn regex? [obj]
(instance? Pattern obj))
(defn regex-from-string [s]
(Pattern/compile (Pattern/quote s)))
(defn regex-starts-with [s]
(Pattern/compile (str "^" (Pattern/quote s))))
| |
05d04803bd8fcbdb417c44113e23505a0c24c1d95a5ddc3555ae09cc8d825435 | apache/couchdb-couch | couchdb_mrview_cors_tests.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/test/couchdb_mrview_cors_tests.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couchdb_mrview_cors_tests).
-include_lib("couch/include/couch_eunit.hrl").
-include_lib("couch/include/couch_db.hrl").
-define(DDOC, {[
{<<"... |
9e7e8ff47aff34bebf420f0045c053e85fbbea1b4a6acf78a9fd65590863576f | BitGameEN/bitgamex | mysql.erl | %%% File : mysql.erl
Author : < >
. : MySQL client .
%%%
Created : 4 Aug 2005 by < >
%%%
Copyright ( c ) 2001 - 2004 Kungliga Tekniska H鰃skolan
%%% See the file COPYING
%%%
Modified : 9/12/2006 by < >
%%% Note: Added support for prepared statements,
%%% transactions, better connection pooling... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/lib/mysql/mysql.erl | erlang | File : mysql.erl
See the file COPYING
Note: Added support for prepared statements,
transactions, better connection pooling, more efficient logging
and made other internal enhancements.
moved much of the prepared statement handling code to mysql_conn.erl
and added versioning to prepared statements.
Usa... | Author : < >
. : MySQL client .
Created : 4 Aug 2005 by < >
Copyright ( c ) 2001 - 2004 Kungliga Tekniska H鰃skolan
Modified : 9/12/2006 by < >
Modified : 9/23/2006 Rewrote the transaction handling code to
provide a simpler , - style transaction interface . Also ,
Call one of the start - f... |
8ddcab19711d7c531dbd3a024086d239680d426a200dd70fddf9235f6efcf349 | xvw/preface | indexed_apply.mli | (** Building a {!module:Preface_specs.INDEXED_APPLY} *)
(** {1 Using the minimal definition} *)
* { 2 Using map and apply }
Build a { ! module - type : Preface_specs . APPLY } using
{ ! module - type : Preface_specs . APPLY.WITH_MAP_AND_APPLY } .
Other standard method , using the minimal definitio... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_make/indexed_apply.mli | ocaml | * Building a {!module:Preface_specs.INDEXED_APPLY}
* {1 Using the minimal definition}
* {2 Deriving Operation}
* {2 Deriving Syntax}
* {2 Deriving Infix} |
* { 2 Using map and apply }
Build a { ! module - type : Preface_specs . APPLY } using
{ ! module - type : Preface_specs . APPLY.WITH_MAP_AND_APPLY } .
Other standard method , using the minimal definition of an alt to derive its
full API .
Build a {!module-type:Preface_specs.APPLY} using... |
4e06665132b2ee0c90f9b026f2c19d04b5df262a2c19b0c165537a70cd322240 | cyga/real-world-haskell | Tuple.hs | -- file: ch03/Tuple.hs
third (a, b, c) = c
-- file: ch03/Tuple.hs
complicated (True, a, x:xs, 5) = (a, xs)
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch03/Tuple.hs | haskell | file: ch03/Tuple.hs
file: ch03/Tuple.hs | third (a, b, c) = c
complicated (True, a, x:xs, 5) = (a, xs)
|
ce0f768df8c1ccb1952357cf77ab01edd84c2defc89cb2f7bbd97f99836d7d75 | SKA-ScienceDataProcessor/RC | Cfg.hs | -- |Cfg.hs
--
-- Configuration module (executable names, build specific functions, etc).
--
Copyright ( C ) 2014 Braam Research
module Cfg
( executableName
, timePeriod
, timePeriodPure
, synchronizationPoint
, eventMessage
) where
import Control.Monad
import Control.... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/ddp-erlang-style/cfgs/SIMD/Cfg.hs | haskell | |Cfg.hs
Configuration module (executable names, build specific functions, etc).
|Put measurements about time period into eventlog or do nothing, as in this case.
|Measure time period of pure computation into eventlog or do nothing, as in this case.
Might be too strict on argument.
|Synchronize timings - put int... | Copyright ( C ) 2014 Braam Research
module Cfg
( executableName
, timePeriod
, timePeriodPure
, synchronizationPoint
, eventMessage
) where
import Control.Monad
import Control.Monad.Trans
executableName = "ddp-erlang-style-SIMD"
timePeriod :: MonadIO m => String -> ... |
24deb9f12c7f7cedab24c20a0d9bfd544c01ecf839546ff9c02fffbfb303afea | nasser/magic | api.clj | (ns magic.api
(:refer-clojure :exclude [compile load-file eval])
(:require [magic.analyzer :as ana]
[magic.analyzer.types :refer [tag ast-type]]
[magic.core :as magic]
[magic.util :as u]
[mage.core :as il]
magic.intrinsics
[magic.spells
... | null | https://raw.githubusercontent.com/nasser/magic/48e308d63c546192071b8895abfd450c28fa7983/src/magic/api.clj | clojure | yolo | (ns magic.api
(:refer-clojure :exclude [compile load-file eval])
(:require [magic.analyzer :as ana]
[magic.analyzer.types :refer [tag ast-type]]
[magic.core :as magic]
[magic.util :as u]
[mage.core :as il]
magic.intrinsics
[magic.spells
... |
7bb0ce43b9ff8717468fa78ecafe9b93b3d2ab72071467bfb1f14e77081524ed | opqdonut/haskell-exercises | W1Test.hs | module W1Test where
import Impl.Test
import W1
import Data.List
import Test.QuickCheck hiding ((===))
main = testExs tests
tests = [[]
,[property ex2_double]
,[property ex3_quadruple]
,[property ex4_poly2]
,[property ex5_eeny_even, property ex5_meeny_odd]
,[property ex6_fizzbu... | null | https://raw.githubusercontent.com/opqdonut/haskell-exercises/87be496ccb0125a52386e979c2502fe9695c6498/W1Test.hs | haskell | -- -- -- -- -- | module W1Test where
import Impl.Test
import W1
import Data.List
import Test.QuickCheck hiding ((===))
main = testExs tests
tests = [[]
,[property ex2_double]
,[property ex3_quadruple]
,[property ex4_poly2]
,[property ex5_eeny_even, property ex5_meeny_odd]
,[property ex6_fizzbu... |
0e4b2231f314f400c5af732da2d0364df980d82a6f6926392d7c735ea9f00e58 | CSCfi/rems | blacklist.clj | (ns rems.db.blacklist
(:require [rems.common.util :refer [getx]]
[rems.db.core :as db]
[rems.db.resource :as resource]
[rems.db.users :as users]
[rems.json :as json]
[rems.schema-base :as schema-base]
[schema.coerce :as coerce]
[schem... | null | https://raw.githubusercontent.com/CSCfi/rems/c5d9037e1696bcd0b66987a793770d306dd017a7/src/clj/rems/db/blacklist.clj | clojure | TODO: move computation to db for performance
should be enough to check latest event per user-resource pair | (ns rems.db.blacklist
(:require [rems.common.util :refer [getx]]
[rems.db.core :as db]
[rems.db.resource :as resource]
[rems.db.users :as users]
[rems.json :as json]
[rems.schema-base :as schema-base]
[schema.coerce :as coerce]
[schem... |
d1925b4c983e17d78e4f41e6bd314c23cf5121ff4bdfa26934cd9a8a7478f022 | felipereigosa/mock-mechanics | miscellaneous.clj | (ns mockmechanics.core
(:require [mockmechanics.library.vector :as vector]
[clojure.java.io :as io]))
(declare get-parts-with-type)
(declare get-tail-transform)
(declare get-part-position)
(declare save-version)
(declare undo!)
(declare redo!)
(declare show-hint)
(declare change-mode)
(defn get-function... | null | https://raw.githubusercontent.com/felipereigosa/mock-mechanics/9ec779f2458b08809d6bf76910675266be0674de/src/mockmechanics/miscellaneous.clj | clojure | (ns mockmechanics.core
(:require [mockmechanics.library.vector :as vector]
[clojure.java.io :as io]))
(declare get-parts-with-type)
(declare get-tail-transform)
(declare get-part-position)
(declare save-version)
(declare undo!)
(declare redo!)
(declare show-hint)
(declare change-mode)
(defn get-function... | |
18bdced04eca98fca8d13eb71e7ad082e5baa2a1ceb1b79af5acfa13a2de5690 | expipiplus1/vulkan | MonadFrame.hs | # LANGUAGE OverloadedLists #
module MonadFrame
( F
, runFrame
, liftV
, allocateGlobal
, allocateGlobal_
, frameRefCount
, askFrame
, asksFrame
, finalQueueSubmitFrame
, queueSubmitFrame
) where
import Cleanup
import Control.Monad.IO.Class
import Control.Monad.Trans... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/examples/rays/MonadFrame.hs | haskell | --------------------------------------------------------------
--------------------------------------------------------------
which point the frame-specific resources are collected.
If we have no work on the GPU we can recycle things here and now
Otherwise we need to wait for whatever GPU work we submitted to
compl... | # LANGUAGE OverloadedLists #
module MonadFrame
( F
, runFrame
, liftV
, allocateGlobal
, allocateGlobal_
, frameRefCount
, askFrame
, asksFrame
, finalQueueSubmitFrame
, queueSubmitFrame
) where
import Cleanup
import Control.Monad.IO.Class
import Control.Monad.Trans... |
5a1c9fb28e34117536c0bb2352cbd40dcddc75e95725fa04f5b25ea38138018e | Deaf-Clojurian/sudoku-solver | http_server.clj | (ns sudoku-solver.diplomat.http-server
(:require
[clojure.data.json :as json]
[compojure.core :refer [defroutes GET POST]]
[compojure.route :as route]
[ring.middleware.json :refer [wrap-json-response]]
[ring.util.response :refer [response]]
[sudoku-solver.adapters.solver :as adapters.solver]
[sud... | null | https://raw.githubusercontent.com/Deaf-Clojurian/sudoku-solver/af8589639398971f1b3678ea801232d15536a7ec/src/sudoku_solver/diplomat/http_server.clj | clojure | (ns sudoku-solver.diplomat.http-server
(:require
[clojure.data.json :as json]
[compojure.core :refer [defroutes GET POST]]
[compojure.route :as route]
[ring.middleware.json :refer [wrap-json-response]]
[ring.util.response :refer [response]]
[sudoku-solver.adapters.solver :as adapters.solver]
[sud... | |
b0bdf72c3bb3f97630e7f65e787db0320eed83779ca582ff15302438084fb1f3 | tsoding/HyperNerd | Raffle.hs | # LANGUAGE QuasiQuotes #
{-# LANGUAGE OverloadedStrings #-}
module Bot.Raffle
( raffleCommand
, joinCommand
) where
import Bot.Replies
import qualified Data.Map as M
import Data.Time
import Effect
import Entity
import HyperNerd.Functor
import Property
import Reaction
import Text.InterpolatedString.QM
import Tra... | null | https://raw.githubusercontent.com/tsoding/HyperNerd/5322580483c5c05179bc455a6f94566d398bccdf/src/Bot/Raffle.hs | haskell | # LANGUAGE OverloadedStrings #
TODO(#444): joinUser is not implemented | # LANGUAGE QuasiQuotes #
module Bot.Raffle
( raffleCommand
, joinCommand
) where
import Bot.Replies
import qualified Data.Map as M
import Data.Time
import Effect
import Entity
import HyperNerd.Functor
import Property
import Reaction
import Text.InterpolatedString.QM
import Transport
data Raffle = Raffle
{ ra... |
fc0cae8b1b5b387555ea3eab429a2cd7fc782c2ef90ca75b7dc98bb6e3f150d3 | jamis/rtc-ocaml | TestShape.ml | open OUnit2
open TestAssertions
let test_shape () =
let intersect (shape:RTCShape.t) ?(trail=[]) r : RTCShape.t RTCIntersection.xslist =
match shape.shape with
| RTCShape.TestShape data -> data.ray <- Some r; []
| _ -> failwith "shouldn't ever get here"
in
let normal_at ?(hit=None) (shape:RTCShape.t)... | null | https://raw.githubusercontent.com/jamis/rtc-ocaml/f5ba04e874ef0b54d100cdabfe9a67c2b80a643f/tests/TestShape.ml | ocaml | open OUnit2
open TestAssertions
let test_shape () =
let intersect (shape:RTCShape.t) ?(trail=[]) r : RTCShape.t RTCIntersection.xslist =
match shape.shape with
| RTCShape.TestShape data -> data.ray <- Some r; []
| _ -> failwith "shouldn't ever get here"
in
let normal_at ?(hit=None) (shape:RTCShape.t)... | |
6da7c7941c81469147a2f94a9520ee42ed7a98b870a59ad72c020f41d8d02e35 | dmitryvk/sbcl-win32-threads | vm-typetran.lisp | ;;;; This file contains the implementation specific type
;;;; transformation magic. Basically, the various non-standard
predicates that can be used in TYPEP transformations .
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL sy... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/generic/vm-typetran.lisp | lisp | This file contains the implementation specific type
transformation magic. Basically, the various non-standard
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.
internal predicates
They shoul... | predicates that can be used in TYPEP transformations .
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
(in-package "SB!C")
These type predicates are used to implement... |
a5cdc41dae0b0fb462ea6a367dac1b2cc8b71c733776d750c981f2ac1cec0c38 | draperlaboratory/cbat_tools | test_output.ml | open !Core
open OUnit2
open Bap_wp
open Output
let test_get_model (test_ctx : test_ctxt) : unit =
let ctx = Z3.mk_context [] in
let solver = Z3.Solver.mk_solver ctx None in
let three = Z3.BitVector.mk_numeral ctx "3" 64 in
let four = Z3.BitVector.mk_numeral ctx "4" 64 in
let bvsort = Z3.BitVector.mk_sort c... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/78c665c96b343991cb44bebb8658df6750fb59bd/wp/lib/bap_wp/tests/unit/test_output.ml | ocaml | open !Core
open OUnit2
open Bap_wp
open Output
let test_get_model (test_ctx : test_ctxt) : unit =
let ctx = Z3.mk_context [] in
let solver = Z3.Solver.mk_solver ctx None in
let three = Z3.BitVector.mk_numeral ctx "3" 64 in
let four = Z3.BitVector.mk_numeral ctx "4" 64 in
let bvsort = Z3.BitVector.mk_sort c... | |
4b0f15866897b42898340fd5038b6582cc6629c79314d17a793abf256b1f0189 | spectrum-finance/cardano-dex-sdk-haskell | Combinators.hs | module Common.Throw.Combinators where
import RIO
throwEither :: (MonadThrow f, Exception e) => Either e r -> f r
throwEither (Left err) = throwM err
throwEither (Right value) = pure value
throwMaybe :: (MonadThrow f, Exception e) => e -> Maybe a -> f a
throwMaybe _ (Just value) = pure value
throwMaybe err _ = thr... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-sdk-haskell/ce6cf0e541f27dc1d53e6675f38fad10910812f7/ergo-hs-common/src/Common/Throw/Combinators.hs | haskell | module Common.Throw.Combinators where
import RIO
throwEither :: (MonadThrow f, Exception e) => Either e r -> f r
throwEither (Left err) = throwM err
throwEither (Right value) = pure value
throwMaybe :: (MonadThrow f, Exception e) => e -> Maybe a -> f a
throwMaybe _ (Just value) = pure value
throwMaybe err _ = thr... | |
79e22a8152ec1face03d8c775a1746da65ec4e9a8b595795ace4e8ee83b564e3 | s-expressionists/Cleavir | packages.lisp | (cl:in-package #:common-lisp-user)
(defpackage #:cleavir-conditions
(:use #:common-lisp)
(:shadow #:program-error)
(:export #:program-condition
#:program-error #:program-warning #:program-style-warning)
(:export #:origin)
(:export #:program-note #:note #:muffle-note))
| null | https://raw.githubusercontent.com/s-expressionists/Cleavir/e0293780d356a9d563af9abf9317019f608b4e1d/Conditions/packages.lisp | lisp | (cl:in-package #:common-lisp-user)
(defpackage #:cleavir-conditions
(:use #:common-lisp)
(:shadow #:program-error)
(:export #:program-condition
#:program-error #:program-warning #:program-style-warning)
(:export #:origin)
(:export #:program-note #:note #:muffle-note))
| |
ae284a71fd7d3b677306934952fb320ee65ef270fc873caef40b8a0778696337 | SanderSpies/ocaml-gist | track_definition.ml | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_webworker/merlin_lite/src/analysis/track_definition.ml | ocaml | raises Can't_move
Upon trying the final [synonym_pair], search failure should raise
If cannot find match, continue searching through [rest_synonyms]
TODO: maybe give the option to NOT follow module aliases?
we were looking for a module, we found the right file, we're happy
TODO: retrieve "ocaml.text" floatin... | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
c1b9cf6eaebf932946240c0c266addbb86c344706142bcda83ab4d89947c4fd7 | tek/helic | Agent.hs | -- |Simple Agent Interpreter, Internal
module Helic.Interpreter.Agent where
import Helic.Data.Event (Event)
import Helic.Effect.Agent (Agent (Update))
import Helic.Interpreter (interpreting)
-- |Interpret 'Agent' with an action.
interpretAgent ::
∀ id r .
(Event -> Sem r ()) ->
InterpreterFor (Tagged id Agent) ... | null | https://raw.githubusercontent.com/tek/helic/055b2ffa063936ad4ae6249c9e6e0603482baaa9/packages/helic/lib/Helic/Interpreter/Agent.hs | haskell | |Simple Agent Interpreter, Internal
|Interpret 'Agent' with an action. | module Helic.Interpreter.Agent where
import Helic.Data.Event (Event)
import Helic.Effect.Agent (Agent (Update))
import Helic.Interpreter (interpreting)
interpretAgent ::
∀ id r .
(Event -> Sem r ()) ->
InterpreterFor (Tagged id Agent) r
interpretAgent handle sem =
interpreting (untag sem) \case
Update e -... |
d56caee3f7d73ef6a8953c26a665fc21089b4efe1a366129df94474366cd8711 | Deducteam/zenon_modulo | print.mli | Copyright 2004 INRIA
$ I d : print.mli , v 1.4 2005 - 11 - 05 11:13:17 doligez Exp $
type output = Buff of Buffer.t | Chan of out_channel;;
val expr : output -> Expr.expr -> unit;;
val expr_soft : output -> Expr.expr -> unit;;
val phrase : output -> Phrase.phrase -> unit;;
val hlproof : output -> int -> M... | null | https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/print.mli | ocaml | Copyright 2004 INRIA
$ I d : print.mli , v 1.4 2005 - 11 - 05 11:13:17 doligez Exp $
type output = Buff of Buffer.t | Chan of out_channel;;
val expr : output -> Expr.expr -> unit;;
val expr_soft : output -> Expr.expr -> unit;;
val phrase : output -> Phrase.phrase -> unit;;
val hlproof : output -> int -> M... | |
51379ff250d3bf35d9566e449d2060e0916c585fdb4f4100222039da1a9b5b81 | Frozenlock/bacure | util.clj | (ns bacure.util)
(defn configurable-wait
[{:keys [wait-seconds]
:or {wait-seconds 1}
:as args}]
(Thread/sleep (* 1000 wait-seconds)))
(defmacro mapify
"Given some symbols, construct a map with the symbols as keys, and
the value of the symbols as the map values. For example:
(Let [aa 12]
(ma... | null | https://raw.githubusercontent.com/Frozenlock/bacure/d76ee23a290b8453334e31ed20b87ccb3c1024cb/src/bacure/util.clj | clojure | ================================================================
================================================================
emacs clojure-mode configurations
indentation
font
remove the docstring if missing
arity-1 for all arglists
add an unchanged version of the last arglist | (ns bacure.util)
(defn configurable-wait
[{:keys [wait-seconds]
:or {wait-seconds 1}
:as args}]
(Thread/sleep (* 1000 wait-seconds)))
(defmacro mapify
"Given some symbols, construct a map with the symbols as keys, and
the value of the symbols as the map values. For example:
(Let [aa 12]
(ma... |
99b7b7b06260b10c1e97c8e2597ea27eea9e8d134b9c1f6ba011ddd9c93496ab | bmeurer/ocaml-experimental | rawwidget.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/support/rawwidget.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
4c1ff5d73728b8da1d9da20b2ea468844330c48037477840e653cfcbb7a9f1c8 | luminus-framework/examples | app.cljs | (ns ^:figwheel-no-load swagger-service.app
(:require [swagger-service.core :as core]
[devtools.core :as devtools]))
(enable-console-print!)
(devtools/install!)
(core/init!)
| null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/swagger-service/env/dev/cljs/swagger-service/app.cljs | clojure | (ns ^:figwheel-no-load swagger-service.app
(:require [swagger-service.core :as core]
[devtools.core :as devtools]))
(enable-console-print!)
(devtools/install!)
(core/init!)
| |
13784a94754708eb48bb497ca833654fc17586bbdc2670e14a5d7d19bca7291b | 5HT/ant | Graphic.mli |
open XNum;
type colour =
[ Grey of num
| RGB of num and num and num
| CMYK of num and num and num and num
];
type bezier 'a = ('a * 'a * 'a * 'a * 'a * 'a * 'a * 'a);
type path 'a = list (bezier 'a);
type path_cmd = [ Stroke | Fill | Clip ];
type line_cap = [ Butt | Circle | Square ];
type line_join = [ Mite... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/Graphic.mli | ocaml |
open XNum;
type colour =
[ Grey of num
| RGB of num and num and num
| CMYK of num and num and num and num
];
type bezier 'a = ('a * 'a * 'a * 'a * 'a * 'a * 'a * 'a);
type path 'a = list (bezier 'a);
type path_cmd = [ Stroke | Fill | Clip ];
type line_cap = [ Butt | Circle | Square ];
type line_join = [ Mite... | |
7d254bbb75f9f907d2e8742bf6b1f58353f648b777bb0d3ffa315523f25ecff2 | kmicinski/program-analysis-examples | cesk.rkt | CESK interpreter for the direct - style lambda calculus
#lang racket
(define lit? number?)
(define (expr? e)
(match e
[`(,(? expr? e0) ,(? expr? e1)) #t]
[(? symbol? x) #t]
[(? lit? l) #t]
[`(lambda (,x) ,(? expr? e-body)) #t]
[else #f]))
(define (addr? x) (or (number? x) (equal? x '•)))
(de... | null | https://raw.githubusercontent.com/kmicinski/program-analysis-examples/140e5a3039ba9ddba70dc53fd3c09f3d590997a9/cesk.rkt | racket | Evaluate... | CESK interpreter for the direct - style lambda calculus
#lang racket
(define lit? number?)
(define (expr? e)
(match e
[`(,(? expr? e0) ,(? expr? e1)) #t]
[(? symbol? x) #t]
[(? lit? l) #t]
[`(lambda (,x) ,(? expr? e-body)) #t]
[else #f]))
(define (addr? x) (or (number? x) (equal? x '•)))
(de... |
d3b9daa844be003e6e3800f803bb8920645f48f8a375c38504130d6f2b0f8ab5 | tezos/tezos-mirror | client_simulation_flag.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs < >
Copyright ( c ) 2022 ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/123f067d73d29774537076eab28ffe44e2be6a3b/tezt/tests/client_simulation_flag.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs < >
Copyright ( c ) 2022 Marigold < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT ... |
d329535faa29a7ae776c763a713a09288f76bbe5050ee06dad85506abf7b4a9f | openweb-nl/open-bank-mark | project.clj | (defproject nl.openweb/graphql-endpoint "0.1.0-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:dependencies [[clojurewerkz/money "1.10.0"]
[crypto-password "0.2.1"]
[com.stuartsierra/component "0.4.0"]
[com.walmartlabs/lacinia-pedestal "0.12.0" :exclusions [com.faste... | null | https://raw.githubusercontent.com/openweb-nl/open-bank-mark/786c940dafb39c36fdbcae736fe893af9c00ef17/graphql-endpoint/project.clj | clojure | (defproject nl.openweb/graphql-endpoint "0.1.0-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:dependencies [[clojurewerkz/money "1.10.0"]
[crypto-password "0.2.1"]
[com.stuartsierra/component "0.4.0"]
[com.walmartlabs/lacinia-pedestal "0.12.0" :exclusions [com.faste... | |
914fd6a97692332842011fd6b8b911e5fc41ecd8300755cb736e42a38f97f6a0 | kayhide/wakame | Utils.hs | module Wakame.Utils where
import Prelude
-- |
> > > : kind ! ' [ , Int ] + + ' [ ]
-- '[Bool, Int] ++ '[] :: [*]
-- = '[Bool, Int]
> > > : kind ! ' [ , Int ] + + ' [ , Word ]
' [ Bool , Int ] + + ' [ , Word ] : : [ * ]
= ' [ Bool , Int , , Word ]
type family (++) (a :: [k]) (b :: [k]) :: [k]
type instan... | null | https://raw.githubusercontent.com/kayhide/wakame/4d16ecf2221655300b5db588c2775cfc0b8d92cd/src/Wakame/Utils.hs | haskell | |
'[Bool, Int] ++ '[] :: [*]
= '[Bool, Int]
|
= Bool
| | module Wakame.Utils where
import Prelude
> > > : kind ! ' [ , Int ] + + ' [ ]
> > > : kind ! ' [ , Int ] + + ' [ , Word ]
' [ Bool , Int ] + + ' [ , Word ] : : [ * ]
= ' [ Bool , Int , , Word ]
type family (++) (a :: [k]) (b :: [k]) :: [k]
type instance (++) '[] ys = ys
type instance (++) (x ': xs) ys =... |
784ac01f0362efcd4fa8dfe388609d2ebd6e5ea0cc03cc85dd3989c728950b93 | ocaml-multicore/tezos | baking.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/baking.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
1d7fd50c48db7b7fd2802dfe0e67c514ff3f154a9f2f43d28b448d6d44fb1439 | RefactoringTools/wrangler | wls_code_actions.erl | %%==============================================================================
%% Code Actions: Behaviour and API
%%==============================================================================
-module(wls_code_actions).
%%==============================================================================
%% Callback F... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/e8b0159e136768f81a5ffb6d6d6ddd79ae55b007/src/wls/wls_code_actions.erl | erlang | ==============================================================================
Code Actions: Behaviour and API
==============================================================================
==============================================================================
Callback Functions
==============================... |
-module(wls_code_actions).
-callback title() -> binary().
-callback id() -> action_id().
Initialize the action .
-callback init(els_core:uri(), els_core:range()) -> state().
-callback precondition(els_core:uri(), els_core:range()) -> boolean().
-callback command_args(els_core:uri(), els_core:range(), state()) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.