_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 |
|---|---|---|---|---|---|---|---|---|
911e6db95f196c3eedaae9a7ea52f27c8521bb0cadee7bdfc6fce266764a46c8 | thierry-martinez/pyast | asdl.ml | include Ast
module Err = Err
let of_lexbuf lexbuf =
try
Parser.module_ Lexer.lexer lexbuf
with Parser.Error ->
Err.syntax (Loc.of_lexbuf lexbuf)
let of_channel ?filename channel =
let lexbuf = Lexing.from_channel channel in
Option.iter (Lexing.set_filename lexbuf) filename;
of_lexbuf lexbuf
let of... | null | https://raw.githubusercontent.com/thierry-martinez/pyast/2400e1a487daf3eadccf3385d39dbfb4cd7f7a8d/asdl/asdl.ml | ocaml | include Ast
module Err = Err
let of_lexbuf lexbuf =
try
Parser.module_ Lexer.lexer lexbuf
with Parser.Error ->
Err.syntax (Loc.of_lexbuf lexbuf)
let of_channel ?filename channel =
let lexbuf = Lexing.from_channel channel in
Option.iter (Lexing.set_filename lexbuf) filename;
of_lexbuf lexbuf
let of... | |
1579c47195b566c8f25601c74e2a469ee53f61dc137519ee1577bc839b77f595 | KestrelInstitute/Specware | Tests.lisp | (test-directories ".")
(test
("Bug 0016 : An incorrect SWPATH produces no error or warning"
:path "/loser/loser/loser"
:output '((:alternatives
"Warning: Directory does not exist: /loser/loser/loser"
"Warning: Directory does not exist: /loser/loser/loser/"
"WARNING: Directory does not exist: ... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0016/Tests.lisp | lisp | (test-directories ".")
(test
("Bug 0016 : An incorrect SWPATH produces no error or warning"
:path "/loser/loser/loser"
:output '((:alternatives
"Warning: Directory does not exist: /loser/loser/loser"
"Warning: Directory does not exist: /loser/loser/loser/"
"WARNING: Directory does not exist: ... | |
21e906d7441be43e84726e49031ae5fe46be45fbebfbc0a4c357ff50279643a1 | tfausak/patrol | GeoSpec.hs | # LANGUAGE QuasiQuotes #
module Patrol.Type.GeoSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Data.Text as Text
import qualified Patrol.Type.Geo as Geo
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.Geo" $ do... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/GeoSpec.hs | haskell | # LANGUAGE QuasiQuotes #
module Patrol.Type.GeoSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Data.Text as Text
import qualified Patrol.Type.Geo as Geo
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.Geo" $ do... | |
cf6c1d04bc67524ce2d8bb6c38d6319abdd7a9204fe36c85e4023ae71cffa75a | eclipse-archived/agent | evals.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright ( c ) 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Pu... | null | https://raw.githubusercontent.com/eclipse-archived/agent/e2ee78050157eba3aa35f52496b590806c6d1d88/fos-agent/evals.ml | ocaml | Evals
Find Correct Plugin
Create Record
* Add UUID for each component
* Fix references with UUIDs
Find Correct Plugin
Create Record
* Add UUID for each component
* Fix references with UUIDs
Find Correct Plugin
Create Record
* Add UUID for eac... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright ( c ) 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Pu... |
a5431e12a941b0be9cb5da74ee987baf6ad9adbbb95835ad5f20bc31ba318ed1 | huangz1990/SICP-answers | test-8-cube.scm | (load "test-manager/load.scm")
(load "8-cube.scm")
(define-each-check
(= (* 3 3 3)
(cube 3))
(= (* 8 8 8)
(cube 8))
)
(run-registered-tests)
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-8-cube.scm | scheme | (load "test-manager/load.scm")
(load "8-cube.scm")
(define-each-check
(= (* 3 3 3)
(cube 3))
(= (* 8 8 8)
(cube 8))
)
(run-registered-tests)
| |
74729cd995efae2aa458247dfb90c5537b6e997852836013e3f30bdafdb828ae | shentufoundation/deepsea | FramesLabelsCintptr.ml | open StmtClinear
open TempModelLow
(** val ftype : ftemps **)
let ftype =
{ f_temps = (Obj.magic StmtClinear.fn_temps); f_args =
(Obj.magic StmtClinear.fn_params) }
| null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/FramesLabelsCintptr.ml | ocaml | * val ftype : ftemps * | open StmtClinear
open TempModelLow
let ftype =
{ f_temps = (Obj.magic StmtClinear.fn_temps); f_args =
(Obj.magic StmtClinear.fn_params) }
|
4f3a7f265a9afc0bf177c51268b78fc6a86f2b921f41e5aad98b8792cdea339e | ocaml-ppx/ppxlib | ast_traverse.mli | * This module provides AST traversal classes , such as maps , iterations , folds ,
etc . on the { ! types .
{ 1 Link to the tutorial }
For a detailed explanation on this module , refer to the { { ! " ast - traversal " }
relevant } part of the manual .
{ 1 API }
etc. on the {!Parse... | null | https://raw.githubusercontent.com/ocaml-ppx/ppxlib/1110af2ea18f351cc3f2ccbee8444bb2a4b257b7/src/ast_traverse.mli | ocaml | * This module provides AST traversal classes , such as maps , iterations , folds ,
etc . on the { ! types .
{ 1 Link to the tutorial }
For a detailed explanation on this module , refer to the { { ! " ast - traversal " }
relevant } part of the manual .
{ 1 API }
etc. on the {!Parse... | |
a5b9b94508993734d8588f761e4f3f3009204eed97f5a4fa4302ab7a21a58c7d | haskus/haskus-system | Frame.hs | # LANGUAGE RecordWildCards #
# LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE BlockArguments #
-- | Frame
--
-- A frame is a picture in memory. Its pixel components may be scattered into
-- different frame buffers though.
module Haskus.System.Linux.Graphics.Fra... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/System/Linux/Graphics/Frame.hs | haskell | | Frame
A frame is a picture in memory. Its pixel components may be scattered into
different frame buffers though.
| Create a frame
| Release a frame
| Indicate dirty parts of a frame source
| Do something for each line of the frame (top to bottom)
| Do something for each column of the frame (left to right)
|... | # LANGUAGE RecordWildCards #
# LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE BlockArguments #
module Haskus.System.Linux.Graphics.Frame
( Frame(..)
, FrameBuffer (..)
, handleCreateFrame
, freeFrame
, dirtyFrame
, SwitchFrameFlag (..)
, Sw... |
b58171e9499ad7e133cbcb738a64fcf4b9fee238ff66f95973dcfb4934a23b30 | gelisam/giggles-is-you | Simulate.hs | {-# LANGUAGE RankNTypes #-}
module Graphics.Gloss.Internals.Interface.Simulate
(simulateWithBackendIO)
where
import Graphics.Gloss.Data.Display
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Data.ViewState
import Graphics.Gloss.Rend... | null | https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Internals/Interface/Simulate.hs | haskell | # LANGUAGE RankNTypes #
^ Initial state of the backend
^ Display mode.
^ Background color.
^ The initial model.
^ A function to convert the model to a picture.
current viewport and the amount of time for this simulation
make the simulation state
make a reference to the initial world
convert the world to a ... |
module Graphics.Gloss.Internals.Interface.Simulate
(simulateWithBackendIO)
where
import Graphics.Gloss.Data.Display
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Data.ViewState
import Graphics.Gloss.Rendering
import Graphics.Gloss.... |
3d45e63c83d43585b04891b7e4a695111d990adfe07e5bb37fb62f9103a19cce | haskell-tools/haskell-tools | PatternImport.hs | # LANGUAGE PatternSynonyms #
module Module.PatternImport where
import Decl.PatternSynonym (pattern Arrow)
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Module/PatternImport.hs | haskell | # LANGUAGE PatternSynonyms #
module Module.PatternImport where
import Decl.PatternSynonym (pattern Arrow)
| |
874cc94562b0bca03b1dd6aa1162e54f8f277ff1fff2b88eed3b613e17979b0e | janestreet/resource_cache | address_config.ml | module Stable = struct
open! Core.Core_stable
module V3 = struct
type t =
{ max_open_connections : int
; cleanup_idle_connection_after : Time_ns.Span.V2.t
; max_connections_per_address : int
; max_connection_reuse : int
; close_idle_connections_when_at_limit : bool
; close_c... | null | https://raw.githubusercontent.com/janestreet/resource_cache/e0693f18ad1c66a822a0487e9385a7240dcac99e/src/address_config.ml | ocaml | module Stable = struct
open! Core.Core_stable
module V3 = struct
type t =
{ max_open_connections : int
; cleanup_idle_connection_after : Time_ns.Span.V2.t
; max_connections_per_address : int
; max_connection_reuse : int
; close_idle_connections_when_at_limit : bool
; close_c... | |
44dc3a360c034242fca7cb05341c2e32ed2eeed84766aec01db7b4426c77a625 | patricoferris/ocaml-multicore-monorepo | caqti_mult.mli | Copyright ( C ) 2017 - -2018 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib/caqti_mult.mli | ocaml | * Row multiplicity. | Copyright ( C ) 2017 - -2018 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... |
a61efa94c5593ae36990a58ebb30c85bce98d61a7d4db4fc2055a7a06b051440 | r-willis/biten | hmac_test.erl | @author
%% @doc tests for hmac erlsha2 wrappers
%% See also
%% <a href="">
Identifiers and Test Vectors for HMAC - SHA *
%% </a>.
-module(hmac_test).
-include_lib("eunit/include/eunit.hrl").
hex_int(Binary) ->
list_to_integer(hmac:hexlify(Binary), 16).
wikipedia_test() ->
?assertMatch(16#fbdb1d... | null | https://raw.githubusercontent.com/r-willis/biten/75b13ea296992f8fa749646b9d7c15c5ef23d94d/apps/erlsha2/test/hmac_test.erl | erlang | @doc tests for hmac erlsha2 wrappers
See also
<a href="">
</a>. | @author
Identifiers and Test Vectors for HMAC - SHA *
-module(hmac_test).
-include_lib("eunit/include/eunit.hrl").
hex_int(Binary) ->
list_to_integer(hmac:hexlify(Binary), 16).
wikipedia_test() ->
?assertMatch(16#fbdb1d1b18aa6c08324b7d64b71fb76370690e1d,
hex_int(hmac:hmac("", ""))... |
e0bba40fe9c8e7676301f02dbf4a3c0f0e38b6461c5c788e6b28daee813b6a1b | 2600hz/kazoo | kazoo_endpoint_app.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
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 /.
%%%
%%% @end... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_endpoint/src/kazoo_endpoint_app.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
==============================================================================
Application callbacks
=================================================... | ( C ) 2010 - 2020 , 2600Hz
@author
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 /.
-module(kazoo_endpoint_app).
-behaviour(application).
-include_lib("kazoo_stdlib/include/kz_types.hr... |
de654f51c18d4c4ba88c69ab73ebc192cb3a3759395f5d3282b1f89fa1b9994c | janestreet/core_unix | command_test_helpers.mli | (** Functions to help test [Command]. *)
open! Core
open! Import
(** [parse_command_line param] returns a function which evaluates [param] against a string
list as if those were the arguments passed to [param]. No shelling out takes place.
However, the [param] is evaluated, and side effects of that evaluation... | null | https://raw.githubusercontent.com/janestreet/core_unix/abfad608bb4ab04d16478a081cc284a88c3b3184/command_test_helpers/src/command_test_helpers.mli | ocaml | * Functions to help test [Command].
* [parse_command_line param] returns a function which evaluates [param] against a string
list as if those were the arguments passed to [param]. No shelling out takes place.
However, the [param] is evaluated, and side effects of that evaluation do occur.
See [validate_co... |
open! Core
open! Import
val parse_command_line
: ?path:string list
-> ?summary:string
-> ?readme:(unit -> string)
-> 'a Command.Param.t
-> (?on_error:(unit -> unit) -> ?on_success:('a -> unit) -> string list -> unit)
Staged.t
val parse_command_line_or_error
: ?path:string list
-> ?summary:stri... |
dbfbcd613b62dd188e131d3beba976fff3a0f2ec20f2b92c6393fdb2a4e1bcae | airalab/hs-web3 | ERC20.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE QuasiQuotes #-}
module ERC20 where
import Network.Ethereum.Con... | null | https://raw.githubusercontent.com/airalab/hs-web3/e6719ae384d2371a342f03afa3634921f4a8cd37/examples/erc20/ERC20.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE QuasiQuotes # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module ERC20 where
import Network.Ethereum.Contract.TH
[abiFrom|ERC20.json|]
|
6a90c8852ea2877d4b718e38273b540fa5eb4ccbff790afa96263cd53fe2c532 | victorvianna/mini-gcc | linear.ml | open X86_64
open Format
exception Error of string
let visited_labels = Hashtbl.create 17
type instr = Code of X86_64.text | Label of Label.t
let code = ref []
let emit l instr = code := Code instr :: Label l :: !code
let emit_wl instr = code := Code instr :: !code
let emit_label l = code := Label l :: !code
let label... | null | https://raw.githubusercontent.com/victorvianna/mini-gcc/04659816d0a1097ae12b57243572fff9e91c0b13/linear.ml | ocaml | open X86_64
open Format
exception Error of string
let visited_labels = Hashtbl.create 17
type instr = Code of X86_64.text | Label of Label.t
let code = ref []
let emit l instr = code := Code instr :: Label l :: !code
let emit_wl instr = code := Code instr :: !code
let emit_label l = code := Label l :: !code
let label... | |
dddd433457478d8a395fb3c8ffed9f487a2b64fe736341402fe67f3070083a6c | kaos/ecapnp | ecapnp_promise_sup.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2014 ,
%%% @doc
%%%
%%% @end
Created : 31 May 2014 by < >
%%%-------------------------------------------------------------------
-module(ecapnp_promise_sup).
-behaviour(supervisor).
%% API
-export([start_link/0, st... | null | https://raw.githubusercontent.com/kaos/ecapnp/f351c07730ba134b41b137dd6a6b93069a0908fc/src/ecapnp_promise_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
=============================================================... | @author < >
( C ) 2014 ,
Created : 31 May 2014 by < >
-module(ecapnp_promise_sup).
-behaviour(supervisor).
-export([start_link/0, start_promise/0, start_promise/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
( ) - > { ok , Pid } | ignore | { error , Error }
start_link() ->
supervisor:sta... |
de2400bb2822c723b08bb64bc3577d29ac1c0e90da9e543a6afdcf59719399e3 | amperity/vault-clj | project.clj | (defproject amperity/vault-clj "1.1.4-SNAPSHOT"
:description "Clojure client for the Vault secret management system."
:url "-clj"
:license {:name "Apache License"
:url "-2.0"}
:deploy-branches ["master"]
:pedantic? :abort
:plugins
[[lein-cloverage "1.2.2"]]
:dependencies
[[org.clojure/c... | null | https://raw.githubusercontent.com/amperity/vault-clj/43ea213822440766df6b1fae4aa1282ab9d65f7e/project.clj | clojure | (defproject amperity/vault-clj "1.1.4-SNAPSHOT"
:description "Clojure client for the Vault secret management system."
:url "-clj"
:license {:name "Apache License"
:url "-2.0"}
:deploy-branches ["master"]
:pedantic? :abort
:plugins
[[lein-cloverage "1.2.2"]]
:dependencies
[[org.clojure/c... | |
4eb71f16c4ce55a4c2b70f0c0e42def8d670cc00af5fd2445fd7f053638b9fa3 | mirage/mirage-tcpip | tcpv4v6_socket.ml |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
* ... | null | https://raw.githubusercontent.com/mirage/mirage-tcpip/805d75c433bb764d8cfa434ffd1411b8704497b2/src/stack-unix/tcpv4v6_socket.ml | ocaml | source ip to bind to
FIXME: we should not ignore the result
TODO cancellation |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
* ... |
fd538b3adafb038912710f6181b2a904d4f807e777b82743b492389a88511167 | nekketsuuu/tapis | constraintsT.ml | module ConstraintsT =
Set.Make
(struct
type t = Type.t * Type.t
let compare = compare
end)
include ConstraintsT
open Sbst
(* sbst : Type.t sbst -> t -> t *)
let sbst (sigma : Type.t sbst) ct =
(*
(*
* Set.map has a bug in OCaml 4.04.0
*
*)
let sbst' (t1, t2) =
(Type.sbst sigma t1, Ty... | null | https://raw.githubusercontent.com/nekketsuuu/tapis/a61ecff95eaf2af27a85290d2a5f99341d28b43c/src/constraintsT.ml | ocaml | sbst : Type.t sbst -> t -> t
(*
* Set.map has a bug in OCaml 4.04.0
*
for debug | module ConstraintsT =
Set.Make
(struct
type t = Type.t * Type.t
let compare = compare
end)
include ConstraintsT
open Sbst
let sbst (sigma : Type.t sbst) ct =
let sbst' (t1, t2) =
(Type.sbst sigma t1, Type.sbst sigma t2)
in
map sbst' ct
*)
let sbst' (t1, t2) ct =
ConstraintsT.add (Type... |
4d99bf59b04c883427eff91ee5c69c4767b7e623cb2bdbb59521b0f1ac80021e | wilbowma/cur | Tactics3.rkt | #lang cur
(require cur/stdlib/sugar
cur/stdlib/equality
cur/ntac/base
cur/ntac/standard
cur/ntac/rewrite
rackunit/turnstile+
"../rackunit-ntac.rkt")
Software Foundations Tactics.v , part 3 of 5
;; copied from Poly-pairs.rkt
(data bool : 0 Type
(true : bool... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/software-foundations/Tactics3.rkt | racket | copied from Poly-pairs.rkt
letter capital "O"
simpl in H ; unneeded
eq
H
eq
H
n = S n-1
plus-n-n-injective CORRECT raw term:
(== nat (S (plus n-1 n-1)) (plus n-1 (S n-1)))
tests inversion of H with non-id base cases
unify does nt find f - equal 's A arg
TODO: support auto-destructing by-intros
prove m = n... | #lang cur
(require cur/stdlib/sugar
cur/stdlib/equality
cur/ntac/base
cur/ntac/standard
cur/ntac/rewrite
rackunit/turnstile+
"../rackunit-ntac.rkt")
Software Foundations Tactics.v , part 3 of 5
(data bool : 0 Type
(true : bool)
(false : bool))
(data... |
07656b1fa34a5f2bb59b46c97d4288f2596f142ac567cd41010fb44be09d11cb | juxt/joplin | project.clj | (defproject joplin.datomic "0.3.12-SNAPSHOT"
:description "Datomic support for Joplin"
:url ""
:scm {:name "git"
:url ""}
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[joplin.core "0.3.12-SNAPSHOT"]
... | null | https://raw.githubusercontent.com/juxt/joplin/d190f883c47b11efafc5154237a80d36af0087d3/joplin.datomic/project.clj | clojure | (defproject joplin.datomic "0.3.12-SNAPSHOT"
:description "Datomic support for Joplin"
:url ""
:scm {:name "git"
:url ""}
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[joplin.core "0.3.12-SNAPSHOT"]
... | |
a4055b632e0c44af3b559282e2f1a82b4ff080a2f903f244d2065d98a2cf6fef | Decentralized-Pictures/T4L3NT | client_baking_scheduling.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_delegate/client_baking_scheduling.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
fa29a0948fd77a7b4c79b42813a7207d5789992958c74146e8444ffae5633edf | circuithub/rel8 | Table.hs | # language AllowAmbiguousTypes #
# language DataKinds #
{-# language FlexibleContexts #-}
# language FlexibleInstances #
# language MultiParamTypeClasses #
# language RankNTypes #
{-# language ScopedTypeVariables #-}
# language StandaloneKindSignatures #
# language TypeApplications #
{-# language TypeFamilies #-}
# lan... | null | https://raw.githubusercontent.com/circuithub/rel8/119c825e552b9ee3728992f545afda61e07d7625/src/Rel8/Generic/Table.hs | haskell | # language FlexibleContexts #
# language ScopedTypeVariables #
# language TypeFamilies #
# language UndecidableInstances #
base
rel8 | # language AllowAmbiguousTypes #
# language DataKinds #
# language FlexibleInstances #
# language MultiParamTypeClasses #
# language RankNTypes #
# language StandaloneKindSignatures #
# language TypeApplications #
# language TypeOperators #
module Rel8.Generic.Table
( GGSerialize, GGColumns, ggfromResult, ggtoResult... |
d336c50b4df18f2acf61644eff60c1cbdb9ba3acb4adb082711e1cf1e1e6d022 | ilyasergey/monadic-cfa | Concrete.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeOperators #
# LANGUAGE ParallelListComp #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE GeneralizedNewtypeDeriving #
-- TODO: get rid of this
-- {-# LANGUAGE UndecidableInstances #-}
module CFA.CPS.... | null | https://raw.githubusercontent.com/ilyasergey/monadic-cfa/caeb9e5375affe9c3cdee0753ae2ba489cdc328a/CFA/CPS/Analysis/Concrete.hs | haskell | # LANGUAGE TypeSynonymInstances #
TODO: get rid of this
{-# LANGUAGE UndecidableInstances #-}
is a monad
Add Garbage Collection | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeOperators #
# LANGUAGE ParallelListComp #
# LANGUAGE GeneralizedNewtypeDeriving #
module CFA.CPS.Analysis.Concrete where
import Data.Map as Map
import Data.Set as Set
import Data.List as List
import D... |
306c52cf0c3768af78a10aeb15ccbb033657882024b90745be02f5736389ab39 | andelf/erlang-proxy | proxy_client_worker.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2013 ,
%%% @doc
%%%
%%% @end
Created : 8 Apr 2013 by < >
%%%-------------------------------------------------------------------
-module(proxy_client_worker).
-behaviour(gen_server).
%% API
-export([start_link/1])... | null | https://raw.githubusercontent.com/andelf/erlang-proxy/d3c6d7ba8825ba7fd438bef5d1e41aa5eae5d872/apps/proxy_client/src/proxy_client_worker.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
---... | @author < >
( C ) 2013 ,
Created : 8 Apr 2013 by < >
-module(proxy_client_worker).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {server_ip,
... |
6a74e5eea436405e687c8cfc4e5430f4930540fcd648fae28439ccd945ed48ea | joinr/spork | fringe.clj | (ns spork.data.fringe
"Stock implementations of the IFringe protocol from spork.protocols.fringe, as
inspired by Bob Sedgewick's Graph Algorithms in C."
(:require [spork.data [priorityq :as pq]
[randq :as rq]]
[spork.protocols [core :as generic]])
(:import [... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/data/fringe.clj | clojure | Now using mutable priority queues for search fringe. This ends up
since we're not using inlined method invokation.
__TODO__ re-evaluate the use of entries as a standard api choice.
Do we really need access to the node weights? Can't we just look them up?
The current scheme is fine if the cost of a weight function is... | (ns spork.data.fringe
"Stock implementations of the IFringe protocol from spork.protocols.fringe, as
inspired by Bob Sedgewick's Graph Algorithms in C."
(:require [spork.data [priorityq :as pq]
[randq :as rq]]
[spork.protocols [core :as generic]])
(:import [... |
340b2b773abec30000450b9a9d379a33d202ddd6201c4956bb26f87f3654f39a | mikera/clojure-utils | hex.clj | (ns mikera.cljutils.hex
"Utilities for handling hexadecimal strings."
(:require [clojure.string :as str])
(:require [mikera.cljutils.text :as text]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(defn hex-string
"Converts an an integer value to a hexadecimal string representing the... | null | https://raw.githubusercontent.com/mikera/clojure-utils/92f7fd7a40c9cf22ab7004a304303e45ea4d4284/src/main/clojure/mikera/cljutils/hex.clj | clojure | (ns mikera.cljutils.hex
"Utilities for handling hexadecimal strings."
(:require [clojure.string :as str])
(:require [mikera.cljutils.text :as text]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(defn hex-string
"Converts an an integer value to a hexadecimal string representing the... | |
b34ea6b1f469190f309459cad4bb68b9d17f354bf0950c614bfc571cc3c16096 | bos/rwh | actions.hs | {-- snippet all --}
str2action :: String -> IO ()
str2action input = putStrLn ("Data: " ++ input)
list2actions :: [String] -> [IO ()]
list2actions = map str2action
numbers :: [Int]
numbers = [1..10]
strings :: [String]
strings = map show numbers
actions :: [IO ()]
actions = list2actions strings
printitall :: IO ()... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch07/actions.hs | haskell | - snippet all -
Take a list of actions, and execute each of them in turn.
- /snippet all - | str2action :: String -> IO ()
str2action input = putStrLn ("Data: " ++ input)
list2actions :: [String] -> [IO ()]
list2actions = map str2action
numbers :: [Int]
numbers = [1..10]
strings :: [String]
strings = map show numbers
actions :: [IO ()]
actions = list2actions strings
printitall :: IO ()
printitall = runall... |
c2661c059161d17aaa982bcfb0fa1bb54bd939733c835c834269c937ed1ffcc0 | johnridesabike/acutis | dagmap.mli | (**************************************************************************)
(* *)
Copyright ( c ) 2022 .
(* *)
This Source Code For... | null | https://raw.githubusercontent.com/johnridesabike/acutis/5c352a4892bee60b9bdc7e60ff57f2ddb950d6e1/lib/dagmap.mli | ocaml | ************************************************************************
****************************... | Copyright ( c ) 2022 .
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 /.
* A utility to help { ! } and { ! Compile } enforce t... |
9da364a2257f10fd0a0398569184b59f32877810c5f35f0d6988ad4219c50eb7 | scrintal/heroicons-reagent | bars_3_bottom_left.cljs | (ns com.scrintal.heroicons.mini.bars-3-bottom-left)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/bars_3_bottom_left.cljs | clojure | (ns com.scrintal.heroicons.mini.bars-3-bottom-left)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm... | |
bc1683348c4804144f3948f1f421894a03c0f69f0113b05003fe58fc73751479 | WorksHub/client | primitives.cljc | (ns wh.common.specs.primitives
(:require [#?(:clj clojure.spec.alpha
:cljs cljs.spec.alpha) :as s]
[clojure.string :as str]
#?(:clj [spec-tools.core :as st])
#?(:clj [clojure.spec.gen.alpha :as gen])
[wh.common.url :as url]))
(defn valid-email? [email]
... | null | https://raw.githubusercontent.com/WorksHub/client/77e4212a69dad049a9e784143915058acd918982/common/src/wh/common/specs/primitives.cljc | clojure | (ns wh.common.specs.primitives
(:require [#?(:clj clojure.spec.alpha
:cljs cljs.spec.alpha) :as s]
[clojure.string :as str]
#?(:clj [spec-tools.core :as st])
#?(:clj [clojure.spec.gen.alpha :as gen])
[wh.common.url :as url]))
(defn valid-email? [email]
... | |
20f7ce64e5edffa59dc409319418753fa90e518f23583a9aa6d5f9e2ba3d9ff0 | keera-studios/keera-hails | HelloWorld.hs | import Data.ReactiveValue
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Reactive
import Graphics.UI.Gtk.Reactive.Gtk2
main = do
-- View
initGUI
window <- windowNew
set window [windowTitle := "Text Entry", containerBorderWidth := 10]
vb <- vBoxNew False 0
containerAdd window vb
txtfield <- entryN... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/demos/keera-hails-demos-gtk/src/HelloWorld.hs | haskell | View
Controller Rules
Run!
Pure controller functions that can be debugged independently | import Data.ReactiveValue
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Reactive
import Graphics.UI.Gtk.Reactive.Gtk2
main = do
initGUI
window <- windowNew
set window [windowTitle := "Text Entry", containerBorderWidth := 10]
vb <- vBoxNew False 0
containerAdd window vb
txtfield <- entryNew
boxPa... |
7a574a15a8de79a4ab01c9092b564f6e6bd57175f2becb30ef52537582b005c2 | dalaing/little-languages | SmallStep.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
module Common.Term.Eval.SmallStep (
SmallStepInput(..)
, HasSmallStepInput(..)
, SmallStepOutput(..)
, HasSmallStepOutput(..)
, mkSmallStep
) where
import Control.Lens.TH (ma... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Common/Term/Eval/SmallStep.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
module Common.Term.Eval.SmallStep (
SmallStepInput(..)
, HasSmallStepInput(..)
, SmallStepOutput(..)
, HasSmallStepOutput(..)
, mkSmallStep
) where
import Control.Lens.TH (ma... | |
387a920a8ea8d1fa3f1e29171034c580f60db6e277924e28abd930e93fbeb8ec | greghendershott/frog | paths.rkt | #lang at-exp racket/base
(require racket/require
net/uri-codec
(multi-in racket/contract (base region))
(multi-in racket (match string))
threading
scribble/srcdoc
(for-doc racket/base
scribble/manual)
"params.rkt"
(multi-in "priv... | null | https://raw.githubusercontent.com/greghendershott/frog/93d8b442c2e619334612b7e2d091e4eb33995021/frog/paths.rkt | racket | For testing, define some root directory
Composition of build-path, expand-user-path, simplify-path, and
path->directory-path.
expand things like ~
factor out things like . and ..
ensure trailing slash
Source directories
some specific source files
Intermediate file directory
Output directories
path-string? -> pa... | #lang at-exp racket/base
(require racket/require
net/uri-codec
(multi-in racket/contract (base region))
(multi-in racket (match string))
threading
scribble/srcdoc
(for-doc racket/base
scribble/manual)
"params.rkt"
(multi-in "priv... |
9dbf8f7ac466affe19d972160ce073e2786e4950aa5e3e94ef88a99172aaec1d | cram-code/cram_core | with-policy.lisp | Copyright ( c ) 2013 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list o... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_language/src/with-policy.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Red... | Copyright ( c ) 2013 , < >
* Neither the name of the Institute for Artificial Intelligence/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
d90fd59287ef33592d5545ebfea6a18ff4437402cace4ae30d28c268c6280081 | mikpe/pdp10-tools | sim_ea_tests.erl | -*- erlang - indent - level : 2 -*-
%%%
simulator for pdp10 - elf
Copyright ( C ) 2020
%%%
This file is part of pdp10 - tools .
%%%
pdp10 - tools is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ,... | null | https://raw.githubusercontent.com/mikpe/pdp10-tools/99216b63317fe5b5ac18f1a0d3c81b464f8b8f40/erlang/apps/sim/test/sim_ea_tests.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
=============================================================================
Test cases for PDP10 Eff... | -*- erlang - indent - level : 2 -*-
simulator for pdp10 - elf
Copyright ( C ) 2020
This file is part of pdp10 - tools .
pdp10 - tools is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either vers... |
dbef6488f4eeb82395b2909bf914f6d267d8f58bda005605f7cd0d73f3876e14 | samply/blaze | util.clj | (ns blaze.interaction.util
(:require
[blaze.anomaly :as ba]
[blaze.db.api :as d]
[blaze.handler.fhir.util :as fhir-util]
[blaze.luid :as luid]
[clojure.string :as str]
[cuerdas.core :as c-str]))
(defn etag->t [etag]
(let [[_ t] (re-find #"W/\"(\d+)\"" etag)]
(some-> t parse-long)))
(... | null | https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/interaction/src/blaze/interaction/util.clj | clojure | (ns blaze.interaction.util
(:require
[blaze.anomaly :as ba]
[blaze.db.api :as d]
[blaze.handler.fhir.util :as fhir-util]
[blaze.luid :as luid]
[clojure.string :as str]
[cuerdas.core :as c-str]))
(defn etag->t [etag]
(let [[_ t] (re-find #"W/\"(\d+)\"" etag)]
(some-> t parse-long)))
(... | |
b61f08e87d143d97b523176efa43c49d7163f5d874938381f6e37ddcc51024c3 | SimonJF/monitored-session-erlang | ssa_gen_server.erl | -module(ssa_gen_server).
-behaviour(gen_server2).
-compile(export_all).
-record(actor_state, {actor_type_name,
monitor_pid,
user_state}).
% This is the behaviour for basic session actors.
The behaviour requires two callbacks :
% * ssactor_init, which returns the initial ... | null | https://raw.githubusercontent.com/SimonJF/monitored-session-erlang/5ec76f327d3d2da4050d4c5a468ac343207f4521/src/behaviours/ssa_gen_server.erl | erlang | This is the behaviour for basic session actors.
* ssactor_init, which returns the initial user state
* ssactor_handle_msg, which handles incoming messages.
The session actor itself has certain bits of internal state, which we
leverage in order to perform monitoring and message routing. This is:
* Conversation... | -module(ssa_gen_server).
-behaviour(gen_server2).
-compile(export_all).
-record(actor_state, {actor_type_name,
monitor_pid,
user_state}).
The behaviour requires two callbacks :
behaviour_info(callbacks) ->
[{ssactor_init,2},
{ssactor_join,4},
{ssactor_hand... |
ae458a40dbfc114203f7d3247aa28e554252bfd1c40e7cadb6ca82af52cf6497 | racket/pkg-build | thread.rkt | #lang racket/base
(provide thread/chunk-output
wait-chunk-output
flush-chunk-output)
;; Run `thunk` in a thread, capturing output to deliver
;; in chunks.
(define (thread/chunk-output thunk)
(define (make-port e?)
(make-output-port (if e?
'stderr/chunked
... | null | https://raw.githubusercontent.com/racket/pkg-build/31fea3651b501e2ad333cf6133527290abd2eed1/private/thread.rkt | racket | Run `thunk` in a thread, capturing output to deliver
in chunks.
----------------------------------------
-------------------------------------------------- | #lang racket/base
(provide thread/chunk-output
wait-chunk-output
flush-chunk-output)
(define (thread/chunk-output thunk)
(define (make-port e?)
(make-output-port (if e?
'stderr/chunked
'stdout/chunked)
always-evt
... |
1f059083be6bc724c8dae4e817b0746bf90e5fc09edac7a39723a235236df27e | ghc/testsuite | TH_bracket3.hs | # LANGUAGE MultiParamTypeClasses #
module TH_bracket3 where
d_class = [d| class Classy a b where
f :: a -> b
instance Classy Int Bool where
f x = if x == 0 then True else False
|]
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/TH_bracket3.hs | haskell | # LANGUAGE MultiParamTypeClasses #
module TH_bracket3 where
d_class = [d| class Classy a b where
f :: a -> b
instance Classy Int Bool where
f x = if x == 0 then True else False
|]
| |
9144260a4a47632ea73266852b90caad50432d68307756153079c4c02224bb80 | YoshikuniJujo/test_haskell | Main.hs | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import System.Environment
import Codec.Picture
import qualified Data.ByteString as BS
import qualified Data.Vector.Storable as V
import Lib
main :: IO ()
main = do
fp : _ <- getArgs
img <- readImageRGB8 fp
print . BS.length .... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/781a95b49ade603c438e021e8a3c1fdd9e9ccc44/other_language/c/opengl/glut/texture/try-raw-format/app/Main.hs | haskell | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import System.Environment
import Codec.Picture
import qualified Data.ByteString as BS
import qualified Data.Vector.Storable as V
import Lib
main :: IO ()
main = do
fp : _ <- getArgs
img <- readImageRGB8 fp
print . BS.length .... | |
47b67a0e995a2aabc68ab7fa84e1cb822f357a3252b10509326fe76c3dca63e6 | novalabsxyz/BEAMCoin | beamcoin.erl | %%%-------------------------------------------------------------------
%% @doc
%% == BEAMCoin ==
%% @end
%%%-------------------------------------------------------------------
-module(beamcoin).
-behaviour(gen_server).
%% hard, but not too hard
-define(LIMIT, math:pow(2, 240)).
-define(SERVER, ?MODULE).
%% ---------... | null | https://raw.githubusercontent.com/novalabsxyz/BEAMCoin/c460bf450fdcc9fb849ff338d077dd9d8271391e/src/beamcoin.erl | erlang | -------------------------------------------------------------------
@doc
== BEAMCoin ==
@end
-------------------------------------------------------------------
hard, but not too hard
------------------------------------------------------------------
API Function Exports
-----------------------------------------... | -module(beamcoin).
-behaviour(gen_server).
-define(LIMIT, math:pow(2, 240)).
-define(SERVER, ?MODULE).
-export([
start_link/1
,genesis/0
,status/1
,get_blocks/3
,spend/1
,connect/1
]).
gen_server Function Exports
-export([
init/1
,handle_call/3
,handle_cast/2
,handle_info/2... |
7ce3cd9e18e4efd5efc6d07f19e201deff539a619115a47dedd9bd8dc28ee697 | FlowerWrong/mblog | bad.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/bad.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
There are lots's of delibeate errors in this file
so ... | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(bad).
foo(1,2) ->
a;
foo(2,3,a) ->
b.
foo(A, B) ->
bar(A, dothis(X), B),
baz(Y, X).
foo() ->
case bar() of
1 ->
X = 1,
Y = 2;
2 ->
X = 3
end,
b(X, Y).
foo() ->... |
e9ee3f7057f03746fb9d009a30a2ad4c064c751a33928dba50c729e3e0794800 | simplegeo/erlang | test_server.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/test_server/src/test_server.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(test_server).
-define(DEFAULT_TIME... |
46be501e5b02280b0ba468f8366bf0a97e7b8ba328e32e000dfc5fe66aefb79d | baconpaul/composition-kit | tonal_theory.clj | (ns composition-kit.music-lib.tonal-theory)
;; A nascent library of concepts like notes and intervals. I used this less composing than I thought I would but it's
;; still handy to have around.
(def ^:priave notes-data
;;(sorted-set-by (map-comparator :octave :notebase :accidental)
(let [accidental-names { -2 "ees... | null | https://raw.githubusercontent.com/baconpaul/composition-kit/fce0addb74a9c30ba06e051d3bca51c5a2b0ce6f/src/composition_kit/music_lib/tonal_theory.clj | clojure | A nascent library of concepts like notes and intervals. I used this less composing than I thought I would but it's
still handy to have around.
(sorted-set-by (map-comparator :octave :notebase :accidental)
A naive implementation, (map #(en-choice (get notes-by-midinote
(+ % (:midinote base)))) scale))) works fine bu... | (ns composition-kit.music-lib.tonal-theory)
(def ^:priave notes-data
(let [accidental-names { -2 "ees" -1 "es" 0 "" 1 "is" 2 "iis" }
offset-from-c { :c 0 :d 2 :e 4 :f 5 :g 7 :a 9 :b 11 }
notelist (for [notebase [ :a :b :c :d :e :f :g ]
accidental [ -2 -1 0 1 2 ]
... |
59694d832021dc293eea784aa437561b0ca6704ad37ef1f2d9eae5cdd32b1641 | JadedCtrl/cl-ipfs-api2 | main.lisp | ;; This file is free software: you can redistribute it and/or modify
it under the terms of version 3 of the GNU General Public License
as published by the Free Software Foundation .
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty o... | null | https://raw.githubusercontent.com/JadedCtrl/cl-ipfs-api2/3ee52c80023bcc662f7d01276ea0a5814bd0011b/main.lisp | lisp | This file is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
only necessar... | it under the terms of version 3 of the GNU General Public License
as published by the Free Software Foundation .
(in-package :cl-ipfs-api2)
(defparameter *api-host* ":5001")
(defparameter *api-root* "/api/v0/")
correlates to the env variable $ IPFS_PATH ,
STRING LIST [: LIST : BOOLEAN : SYMBOL ] → STRING ... |
bf43dd0c1f3dc372aad77aa11ee6e47066d2c8a74a66d39b43d9b8e2086d58e2 | Proxymoron461/chesskell | EnPassantTests.hs | module EnPassantTests where
import Data.Type.Equality ((:~:)(..))
import qualified GHC.TypeLits as TL (Nat)
import Data.Proxy(Proxy(..))
import Data.Type.Nat hiding (SNat(..))
import Test.Hspec
import Test.HUnit.Lang (Assertion, assertFailure)
import Test.ShouldNotTypecheck (shouldNotTypecheck)
import Control.DeepSeq ... | null | https://raw.githubusercontent.com/Proxymoron461/chesskell/fcfdb954ccc760d3689583d7198f0be5da2905a5/chess/test/EnPassantTests.hs | haskell | enPassantTest1 :: True :~: IsSpaceVulnerableToEnPassant WhitePawnFirst (At A Nat4)
enPassantTest1 = Refl
enPassantTest3 :: True :~: IsSpaceVulnerableToEnPassant BlackPawnFirst (At A Nat5)
enPassantTest3 = Refl
enPassantTest4 = Refl
enPassantTest5 :: False :~: IsSpaceVulnerableToEnPassant ((Eval (Move (At A Nat7) ... | module EnPassantTests where
import Data.Type.Equality ((:~:)(..))
import qualified GHC.TypeLits as TL (Nat)
import Data.Proxy(Proxy(..))
import Data.Type.Nat hiding (SNat(..))
import Test.Hspec
import Test.HUnit.Lang (Assertion, assertFailure)
import Test.ShouldNotTypecheck (shouldNotTypecheck)
import Control.DeepSeq ... |
06d00397fb4c6c33fb78d0b9e958ef07c16bafb78c0e90f5820bc90eb3735ce7 | mcna/alexandria | tests.lisp | (in-package :cl-user)
(defpackage :alexandria-tests
(:use :cl :alexandria #+sbcl :sb-rt #-sbcl :rtest)
(:import-from #+sbcl :sb-rt #-sbcl :rtest
#:*compile-tests* #:*expected-failures*))
(in-package :alexandria-tests)
(defun run-tests (&key ((:compiled *compile-tests*)))
(do-tests))
;;;; Array... | null | https://raw.githubusercontent.com/mcna/alexandria/3eacfac87b27654f7ca9eeaf1ce40344b8136b03/tests.lisp | lisp | Arrays
Conditions
Control flow
Definitions
Errors
in this case.
Hash tables
See <>.
outer list was copied.
inner vector wasn't copied.
Functions
Lists
Numbers
uh
Arrays
Sequences
test the compiler macro
Symbols
Type-system
Bindings | (in-package :cl-user)
(defpackage :alexandria-tests
(:use :cl :alexandria #+sbcl :sb-rt #-sbcl :rtest)
(:import-from #+sbcl :sb-rt #-sbcl :rtest
#:*compile-tests* #:*expected-failures*))
(in-package :alexandria-tests)
(defun run-tests (&key ((:compiled *compile-tests*)))
(do-tests))
(deftest ... |
aef7df68cb27becf16f049c8d62d0b516120da9075ac1c0087a1d0ee6847364e | dinosaure/docteur | light.ml |
* Copyright ( c ) 2011 Anil Madhavapeddy < >
* Copyright ( c ) 2012 Citrix Systems Inc
* Copyright ( c ) 2018 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above ... | null | https://raw.githubusercontent.com/dinosaure/docteur/3205a30eafe94c00eab12e981a47264f7a0a76d6/solo5/light.ml | ocaml | not returned by solo5_block_acquire |
* Copyright ( c ) 2011 Anil Madhavapeddy < >
* Copyright ( c ) 2012 Citrix Systems Inc
* Copyright ( c ) 2018 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above ... |
0cdf3f7c9278e842559253afe320dd5db0d5eaf7d0751dddbac4aa6e81c8eb04 | hoplon/demos | core.clj | Copyright ( c ) and . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;;... | null | https://raw.githubusercontent.com/hoplon/demos/50d613892db0624a4f0326c1427d82f5b8e2390f/castra-chat/src/castra/demo/core.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) and . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns demo.core
(:require
[castra.middleware :as castra]
[compojure.core :as c]
[compojure.route :as route]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.defaults :as d]
[ring.util.response :a... |
a854b998da94f5a5aa28aa6fab9a703a836a49424741bf9fa5cf7757af9f0531 | evincarofautumn/kitten | CollectInstantiations.hs | |
Module : Kitten . CollectInstantiations
Description : Generic instantiation collection
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.CollectInstantiations
Description : Generic instantiation collection
Copyrigh... | null | https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/CollectInstantiations.hs | haskell | # LANGUAGE OverloadedStrings #
| In order to support unboxed generics, for every call site of a generic
definition in a program, we produce a specialized instantiation of the
definition with the value-kinded type parameters set to the given type
arguments. This is transitive: if a generic definition calls another g... | |
Module : Kitten . CollectInstantiations
Description : Generic instantiation collection
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.CollectInstantiations
Description : Generic instantiation collection
Copyrigh... |
78bcb0e419724d52ee519a70f07671a2795d2987b51b272fc57e20b45081b4e0 | aryx/xix | main.ml | (*s: yacc/main.ml *)
s : copyright ocamlyacc
*
* Copyright ( C ) 2015
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special excepti... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/yacc/main.ml | ocaml | s: yacc/main.ml
***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Main entry point
**********************************************... | s : copyright ocamlyacc
*
* Copyright ( C ) 2015
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking describ... |
6d9b9468008a0b71826c7411ec06c446c3c2867bfb9e258011e1832a820ef245 | vikram/lisplibraries | text.lisp | Copyright ( c ) 2007 , All Rights Reserved
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/vecto-1.1/text.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form ... | Copyright ( c ) 2007 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
$ I d : , v 1.8 2007/09/21 17:39:36 xach Exp $
(in-package #:vecto)
(defclass font ()
((loader
:initarg :loader
:access... |
09ffdc893f47613e59331e185bac01c6eac2a5a733d332dce6b8d047f0e43985 | input-output-hk/cardano-sl | Logic.hs | | Functions which operate on ] . Business logic of
-- Update System.
module Pos.DB.Update.Poll.Logic
( verifyAndApplyUSPayload
, rollbackUS
, normalizePoll
, refreshPoll
, filterProposalsByThd
-- * Base
, canCreateBlockBV
* resolution
, processGenesisBloc... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/db/src/Pos/DB/Update/Poll/Logic.hs | haskell | Update System.
* Base | | Functions which operate on ] . Business logic of
module Pos.DB.Update.Poll.Logic
( verifyAndApplyUSPayload
, rollbackUS
, normalizePoll
, refreshPoll
, filterProposalsByThd
, canCreateBlockBV
* resolution
, processGenesisBlock
, recordBlockIssuance
... |
c86a890ac1bd8a677d09c9e4f9ba02db06e8fff48b42ffc76dd2f84d50f6da7c | Mzk-Levi/texts | Show.hs | # LANGUAGE TemplateHaskell , FlexibleInstances , IncoherentInstances ,
ScopedTypeVariables , UndecidableInstances , KindSignatures #
ScopedTypeVariables, UndecidableInstances, KindSignatures #-}
--------------------------------------------------------------------------------
-- |
Module : Data . Comp . ... | null | https://raw.githubusercontent.com/Mzk-Levi/texts/34916d6531af9bc39e50b596247ac2017d8cfdc3/compdata-param-master/src/Data/Comp/Param/Multi/Derive/Show.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
------------------------------------------------------------------------------
| Signature printing. An instance @ShowHD f@ gives rise to an instance
@Show (Term f i)@.
covariant arg... | # LANGUAGE TemplateHaskell , FlexibleInstances , IncoherentInstances ,
ScopedTypeVariables , UndecidableInstances , KindSignatures #
ScopedTypeVariables, UndecidableInstances, KindSignatures #-}
Module : Data . Comp . . Multi . Derive . Show
Copyright : ( c ) 2011 ,
Maintainer : < >... |
b82bcf759fe15db71a7ea744ad82f3e781d047d73eb835118ccf59bff4b8e30f | zyrolasting/racket-koans | syntax.rkt | #lang racket/base
(require
rackunit
(for-syntax racket/base syntax/parse)
syntax/macro-testing)
;; `syntax` creates a syntax object
(check-equal? (syntax? (syntax A)) "true")
;; `#'` is short for `syntax`, similar to how `'` is short for `quote`
(check-equal? (syntax? #'A) "true")
;; `syntax-e` extracts the ... | null | https://raw.githubusercontent.com/zyrolasting/racket-koans/09acc058244ed88d7addd434677426cd8580bb3c/koans/syntax.rkt | racket | `syntax` creates a syntax object
`#'` is short for `syntax`, similar to how `'` is short for `quote`
`syntax-e` extracts the datum from a syntax object
`#`` is short for `quasisyntax` and `#,` is short for `unsyntax`
Syntax objects are Racket's internal representation of Racket source code.
When you run Racket o... | #lang racket/base
(require
rackunit
(for-syntax racket/base syntax/parse)
syntax/macro-testing)
(check-equal? (syntax? (syntax A)) "true")
(check-equal? (syntax? #'A) "true")
(check-equal? (syntax-e #'A) 'B)
(define (first-stx stx)
(define x* (syntax-e stx))
(car x*))
(check-equal? (syntax-e (first-stx... |
b29df4dc16b7d9cb9f9d8423ebda5424cc2aecbc1675e58a12bfb2adc3d08407 | logseq/logseq | marker.cljs | (ns frontend.util.marker
"Task (formerly todo) related util fns"
(:require [clojure.string :as string]
[frontend.util :as util]))
(defn marker-pattern [format]
(re-pattern
(str "^" (if (= format :markdown) "(#+\\s+)?" "(\\*+\\s+)?")
"(NOW|LATER|TODO|DOING|DONE|WAITING|WAIT|CANCELED|CANCELL... | null | https://raw.githubusercontent.com/logseq/logseq/e05f28672a3af487a57aa4fff416fb292fd41b3d/src/main/frontend/util/marker.cljs | clojure | failback to markdown | (ns frontend.util.marker
"Task (formerly todo) related util fns"
(:require [clojure.string :as string]
[frontend.util :as util]))
(defn marker-pattern [format]
(re-pattern
(str "^" (if (= format :markdown) "(#+\\s+)?" "(\\*+\\s+)?")
"(NOW|LATER|TODO|DOING|DONE|WAITING|WAIT|CANCELED|CANCELL... |
944d6f2751b0ff811067d46c6f3c6a7a07279841e541bf6c1930d488e25173cc | icicle-lang/icicle-ambiata | Base.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
module Icicle.Sea.FromAvalanche.Base (
SeaString
, takeSeaString
, seaOfChar
, seaOfString
, seaOfEscaped
, seaOfTime
, seaError
, seaError'
, assign
, suf... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Sea/FromAvalanche/Base.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------
| A value that will need be quoted in C.
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
module Icicle.Sea.FromAvalanche.Base (
SeaString
, takeSeaString
, seaOfChar
, seaOfString
, seaOfEscaped
, seaOfTime
, seaError
, seaError'
, assign
, suffix
, tuple
) where
import ... |
87a4a02b1c9ed585436ea8bb838e6300e9d2921258d8ae776910b01b39e00cf6 | NoRedInk/haskell-libraries | Encoding.hs | -- | Turns `Examples` into a `Test`
module Test.Encoding (examplesToTest) where
import qualified Examples
import qualified Expect
import qualified GHC.Stack as Stack
import NriPrelude
import System.FilePath ((</>))
import qualified System.FilePath as FilePath
import Test (Test, test)
import qualified Text
-- | Create... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/90e7a06dc90e2ec10351b4efb631abf5f2aca6d8/nri-test-encoding/src/Test/Encoding.hs | haskell | | Turns `Examples` into a `Test`
| Creates tests for some examples | module Test.Encoding (examplesToTest) where
import qualified Examples
import qualified Expect
import qualified GHC.Stack as Stack
import NriPrelude
import System.FilePath ((</>))
import qualified System.FilePath as FilePath
import Test (Test, test)
import qualified Text
examplesToTest :: Stack.HasCallStack => Text ->... |
be4b3363f1ad2b83b2648cdd5900906eae0b1388a3be771699880cc9a5e2a924 | farr/mcmc-ocaml | asserts.ml | open OUnit
let assert_equal_float ?(epsabs = 1e-8) ?(epsrel = 1e-8) ?(msg = "") =
assert_equal ~msg:msg ~cmp:(cmp_float ~epsabs:epsabs ~epsrel:epsrel) ~printer:string_of_float
let assert_equal_float_array ?(epsabs = 1e-8) ?(epsrel = 1e-8) ?(msg = "assert_equal_float_array") x y =
let n = Array.length x in
a... | null | https://raw.githubusercontent.com/farr/mcmc-ocaml/56e46b8539cb8d6fada2cb09810363adf18f4c60/test/asserts.ml | ocaml | open OUnit
let assert_equal_float ?(epsabs = 1e-8) ?(epsrel = 1e-8) ?(msg = "") =
assert_equal ~msg:msg ~cmp:(cmp_float ~epsabs:epsabs ~epsrel:epsrel) ~printer:string_of_float
let assert_equal_float_array ?(epsabs = 1e-8) ?(epsrel = 1e-8) ?(msg = "assert_equal_float_array") x y =
let n = Array.length x in
a... | |
37ed21d52a1f50fae3d87661e712eae8883cb459c79f84eed8d0c118b242de81 | music-suite/music-suite | Literal.hs | -------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-- |
Copyright : ( c ) 2012
--
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : portable
--
-... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Pitch/Literal.hs | haskell | -----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : portable
Provides overloaded pitch and interval literals. |
Copyright : ( c ) 2012
Maintainer :
module Music.Pitch.Literal
( module Music.Pitch.Literal.Pitch,
module Music.Pitch.Literal.Interval,
)
where
import Music.Pitch.Literal.Interval
import Music.Pitch.Literal.Pitch
|
2dc7599033b09cd867f2d65e488eb45e7dd3b49731b24110f73484c9862f9a89 | hyperfiddle/electric | routes_nested1.clj |
; demo entrypoint
{:hyperfiddle.api/route [:user.demo-entrypoint/hfql-teeshirt-orders],
:user.demo-entrypoint/hfql-teeshirt-orders
{:wip.teeshirt-orders/route [wip.orders-datascript/one-order 10]}}
; teeshirt-orders scope
{:wip.teeshirt-orders/route [wip.orders-datascript/one-order 10]}
(comment
{}
{::demo-e... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2023/routes_nested1.clj | clojure | demo entrypoint
teeshirt-orders scope
what's this?
the state should be able to express branching |
{:hyperfiddle.api/route [:user.demo-entrypoint/hfql-teeshirt-orders],
:user.demo-entrypoint/hfql-teeshirt-orders
{:wip.teeshirt-orders/route [wip.orders-datascript/one-order 10]}}
{:wip.teeshirt-orders/route [wip.orders-datascript/one-order 10]}
(comment
{}
{::demo-entrypoint {}}
{::hello-world {}}
{::sy... |
c43bda86c3f49d07831f45aaefddfc8cb57fcdc72c00dd1873187b8658b80803 | lpgauth/marina | marina_frame.erl | -module(marina_frame).
-include("marina_internal.hrl").
-compile(inline).
-compile({inline_size, 512}).
-export([
decode/1,
encode/1,
pending_size/1
]).
%% public
-spec decode(binary()) -> {binary(), [frame()]}.
decode(Bin) ->
decode(Bin, []).
-spec encode(frame()) -> iolist().
encode(#frame {
... | null | https://raw.githubusercontent.com/lpgauth/marina/2d775c003f58d125bb38e7c953c30c36aebc72c6/src/marina_frame.erl | erlang | public
private | -module(marina_frame).
-include("marina_internal.hrl").
-compile(inline).
-compile({inline_size, 512}).
-export([
decode/1,
encode/1,
pending_size/1
]).
-spec decode(binary()) -> {binary(), [frame()]}.
decode(Bin) ->
decode(Bin, []).
-spec encode(frame()) -> iolist().
encode(#frame {
flags... |
8622555a1138874dada4feea372c9c41f4a8c0dfb93a5598f3d247a35d32f624 | zotonic/zotonic | z_pivot_rsc_task_job.erl | @author < >
2020 - 2022
%% @doc Run a pivot task queue job.
Copyright 2020 - 2022
%%
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/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_core/src/support/z_pivot_rsc_task_job.erl | erlang | @doc Run a pivot task queue job.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for th... | @author < >
2020 - 2022
Copyright 2020 - 2022
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_pivot_rsc_task_job).
-export([
start_task/2,
task_job/2,
maybe_schedule_retry/5,
task_... |
e3a18295039dd348ac29afb7330a580ec59d507bdd2cefc40c4f2dfa0bb621b9 | lambdamusic/The-Musical-Code | 2011-10-turbobrobot-electronica.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2011-10-turborobot-electronica.scm --
;;
;; -r7MX6Q
;;
;; house electronica // made with
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setup:base)
(setup:create-au bass ++zebra 2)
(setup:create-au brass ++zebra 3)
(setup:create-au syn... | null | https://raw.githubusercontent.com/lambdamusic/The-Musical-Code/4c0b578ea5fe4a45d4dad3e53d966e688af04fed/works/2011-10-turbobrobot-electronica.scm | scheme |
-r7MX6Q
house electronica // made with
| 2011-10-turborobot-electronica.scm --
(setup:base)
(setup:create-au bass ++zebra 2)
(setup:create-au brass ++zebra 3)
(setup:create-au synth ++zebra 5)
(patch:load-zebrapatch bass "dl_comb_bass")
(patch:load-zebrapatch brass "bigbrass.patch")
(setup:create-au bat ++battery3 4)
(patch:load-batterypatch bat "static... |
d672d15ea07781ba3d232279d2c5bfda38f76f235ff8609ea6040a1fd5106433 | vert-x/mod-lang-clojure | websocket.clj | Copyright 2013 the original author or authors .
;;
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, sof... | null | https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/api/src/main/clojure/vertx/http/websocket.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | Copyright 2013 the original author or authors .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns vertx.http.websocket
"Provides a set of functions for using http websockets."
(:require [vertx.buffer :as buf]
[vertx.core :as core]
[vertx.http :as http]
... |
c59a6401e7753c906445544fd95eb0c8b94a7f8958a6e10ae7514b1c3a2ec8da | protz/mezzo | TypeErrors.mli | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/TypeErrors.mli | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
open Kind
open TypeCore
type raw_err... |
1838e1df0e0e9c34e29c1a118988b3f022e183eb0002ff7c7c15fe35fe18d294 | devonzuegel/smallworld | db.clj | (ns smallworld.db (:require [clojure.java.io :as io]
[clojure.java.jdbc :as sql] ;
[clojure.pprint :as pp]
[clojure.string :as str]
[clojure.walk :as walk]
[jdbc.pool.c3p0 :as poo... | null | https://raw.githubusercontent.com/devonzuegel/smallworld/49f1bee72681f627bcdd78d067e39157153adbb1/src/smallworld/db.clj | clojure |
this enables the :json type
table names
store all data from Twitter sign up
memoized storage: map of city/country names to coordinates
memoized storage: Twitter access tokens
stores screen_name of the user who the admin is impersonating (for debug only)
TODO: replace this this the ? syntax, which escapes for y... | (ns smallworld.db (:require [clojure.java.io :as io]
[clojure.pprint :as pp]
[clojure.string :as str]
[clojure.walk :as walk]
[jdbc.pool.c3p0 :as pool]
[smallworld.util :as util]))... |
c0eaaaac146c1963c436c1103a86fdc91f27a9cc07bf7e92e883362f229c04a4 | mzp/websocket-ocaml | getHandler.mli | val handle : (Glob.t -> string) -> Handler.t
| null | https://raw.githubusercontent.com/mzp/websocket-ocaml/b584bd20dfe6d95f65bc6e1ba8838b1ecfa8ec0e/webSocket/getHandler.mli | ocaml | val handle : (Glob.t -> string) -> Handler.t
| |
8d91753f3de5ec081aff8270893f417291d1e7c0810d246e9eda406e618ce111 | ejackson/mlapp | gauss_interp.clj | (ns mlapp.gauss-interp
"Try to reproduce 4.3.2.2, figs 4.10"
(:use clojure.test
clojure.core.matrix.protocols
[incanter.charts :only [xy-plot add-points]]
[incanter.core :only [view]])
(:require [clatrix.core :as c]
[clojure.core.matrix :as m]
[clojure.core.matrix... | null | https://raw.githubusercontent.com/ejackson/mlapp/b3613bedd65921dcc4dff561fca79d97c205db9a/src/mlapp/gauss_interp.clj | clojure | Run | (ns mlapp.gauss-interp
"Try to reproduce 4.3.2.2, figs 4.10"
(:use clojure.test
clojure.core.matrix.protocols
[incanter.charts :only [xy-plot add-points]]
[incanter.core :only [view]])
(:require [clatrix.core :as c]
[clojure.core.matrix :as m]
[clojure.core.matrix... |
4507fe573350d9d42c452c0e511d7af2a03d75b13547874066a55aa5bd9d7e8a | OCamlPro/liquidity | liquidNamespace.mli | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidNamespace.mli | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
d2845cab61b3fa67dc4c28dac70e8a83f426b51ab317d1bbfd2708c37b5ca4fe | ocurrent/ocaml-multicore-ci | opam_build.ml | open Obuilder_spec
let host_network = [ "host" ]
let opam_download_cache =
[ Cache.v "opam-archives" ~target:"/home/opam/.opam/download-cache" ]
let run fmt =
let network = host_network in
let cache = opam_download_cache in
Obuilder_spec.run ~network ~cache fmt
let compiler_switch_name_from_commit commit =
... | null | https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/lib/opam_build.ml | ocaml | If the package's directory name doesn't contain a dot then opam will default to
using the last known version, which is usually wrong. In particular, if a multi-project
repostory adds a new package with a constraint "{ =version }" on an existing one,
this will fail because opam will pin the new package as "dev... | open Obuilder_spec
let host_network = [ "host" ]
let opam_download_cache =
[ Cache.v "opam-archives" ~target:"/home/opam/.opam/download-cache" ]
let run fmt =
let network = host_network in
let cache = opam_download_cache in
Obuilder_spec.run ~network ~cache fmt
let compiler_switch_name_from_commit commit =
... |
e0775110d86f30a6d6dc41eebdd86639a6cc7bc8e0ffdb6187e2388e6c89c5dc | mpickering/apply-refact | Naming13.hs | replicateM_ = 1 | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Naming13.hs | haskell | replicateM_ = 1 | |
c26139a9340f3dc57249070ac733eb575aa0419c503c58bd51d7d5901e335b6f | aryx/xix | unix.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_system/unix/unix.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : unix.mli , v 1.27 1997/08/29 15:37:19 xleroy Exp $
type error =
Resource deadlock would occur
I... |
7ab1b42b6aa18a51b67ae879d90bc88423fba42d2fdcade8a285b21b79ece09d | valmirjunior0088/curios | Construct.hs | module WebAssembly.Construct
( MonadConstruct (..)
, importFunc
, importTable
, importMem
, importGlobal
, declareFunc
, declareTable
, declareMem
, declareGlobal
, exportFunc
, exportTable
, exportMem
, exportGlobal
, declareExportFunc
, declareExportTable
, declareExportMem
, declare... | null | https://raw.githubusercontent.com/valmirjunior0088/curios/2ab8cf6f00c93aabb55a3fbfe6abc9a3d31737d0/src/WebAssembly/Construct.hs | haskell | module WebAssembly.Construct
( MonadConstruct (..)
, importFunc
, importTable
, importMem
, importGlobal
, declareFunc
, declareTable
, declareMem
, declareGlobal
, exportFunc
, exportTable
, exportMem
, exportGlobal
, declareExportFunc
, declareExportTable
, declareExportMem
, declare... | |
002118a536eb0a41e5436ca33ab50d4198b64f1ec628d74700c33b6e2c541143 | webyrd/2012-scheme-workshop-quines-paper-code | intro.scm | (load "testcheck.scm")
(load "quinec.scm")
(test-check "intro-1"
(equal? (eval quinec) quinec)
#t)
;;; footnote moved to extending-interpreter.scm
| null | https://raw.githubusercontent.com/webyrd/2012-scheme-workshop-quines-paper-code/3d160707f6ea6f60a08ec271abea1bfdaf63fd41/intro.scm | scheme | footnote moved to extending-interpreter.scm | (load "testcheck.scm")
(load "quinec.scm")
(test-check "intro-1"
(equal? (eval quinec) quinec)
#t)
|
a70c01c019ac563af5cad56db96de2de373f5b4099c2bbfd8a0bf283b0957773 | hexresearch/reflex-material-bootstrap | Input.hs | |
Module : Web . Reflex . Bootstrap . Upload . Input
Description : Reading files with HTML5 File API
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : Portable
TODO : pull request this to reflex - dom - contrib
Module : Web.Reflex.Bootstrap.Upload... | null | https://raw.githubusercontent.com/hexresearch/reflex-material-bootstrap/0dbf56c743f9739b4e1ec7af8a47cdd3062f85f7/src/Web/Reflex/Bootstrap/Upload/Input.hs | haskell | | Additional configuration for upload file input widget
| Default configuration
| Info about file being uploaded
^ Selected file name
^ Example: 'text/plain'
^ Total size of file
^ Getter of file contents, takes start index and end index (not including the end)
| Info about file fully loaded in memory
^ Select... | |
Module : Web . Reflex . Bootstrap . Upload . Input
Description : Reading files with HTML5 File API
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : Portable
TODO : pull request this to reflex - dom - contrib
Module : Web.Reflex.Bootstrap.Upload... |
74159b7163e9d3ed3641da9a7532eedd482b7e5af53a8b5d72f6a525b732ca50 | rntz/moxy | runtime.rkt | #lang racket
(require (for-syntax syntax/parse))
(require "debug.rkt")
(require "util.rkt")
(require "tags.rkt")
(require "values.rkt")
(require "objects.rkt")
(require "lex.rkt") ;for the token tags
(require "env.rkt")
(require "engine.rkt")
(require "core-forms.rkt") ;@vars-var
(req... | null | https://raw.githubusercontent.com/rntz/moxy/18015aed1596ae55658be4ac9eb5cbb3debb1644/runtime.rkt | racket | for the token tags
@vars-var
TODO: variadic #:tag
TODO: string-append, string comparison
convenience
[putWith hash-put-with]
[alter hash-alter]
[map hash-map]
[unions hash-unions]
XXX lists
these all return racket lists
[filterBy pfilter] ;; need to adapt for booleans
take ;; returns a racket list
from pars... | #lang racket
(require (for-syntax syntax/parse))
(require "debug.rkt")
(require "util.rkt")
(require "tags.rkt")
(require "values.rkt")
(require "objects.rkt")
(require "env.rkt")
(require "engine.rkt")
(require "pcomb.rkt")
(require "parse.rkt")
(require "parse-builtins.rkt")
(require (prefix-in q- "quasi.rkt"))
(p... |
4f9ec6de11284eeda38bb3b0033ee197053353331386deab8f1808370dedeaae | dtgoitia/civil-autolisp | 0 - Explode polyline.lsp | (defun c:ep ( / ent_name ptList width )
; Draws individually every single segment of selected polylines
(foreach a (ssnamex (ssget '((-4 . "<OR") (0 . "LWPOLYLINE") (-4 . "OR>"))))
(if (= 'ENAME (type (cadr a)))
(progn
(ExplodeSinglePolyline (cadr a))
(vla-delete (vlax-ename->vla-object (c... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/0%20-%20Explode%20polyline.lsp | lisp | Draws individually every single segment of selected polylines
END progn
END if1
END foreach
End without double messages
v0.3 - 2016.11.14 - All code rewritten
Variables added as local variables not to overlap with other routines.
NOTE: It supports heavy and light polylines.
NOTE: No problem wi... | (defun c:ep ( / ent_name ptList width )
(foreach a (ssnamex (ssget '((-4 . "<OR") (0 . "LWPOLYLINE") (-4 . "OR>"))))
(if (= 'ENAME (type (cadr a)))
(progn
(ExplodeSinglePolyline (cadr a))
(vla-delete (vlax-ename->vla-object (cadr a)))
(princ)
v0.5 - 2016.11.14 - No " Global Width " cas... |
c811e627066ac82068349ef7ff0f73d84c317d27a73fdce2f8ea4d0cf1fd63b8 | awslabs/s2n-bignum | bignum_amontmul.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_amontmul.ml | ocaml | =========================================================================
Almost-Montgomery multiplication of arbitrary bignums.
=========================================================================
arm_MUL X13 X9 X14
arm_ADDS X12 X12 X13
arm_MUL X13 X9 X14
arm_ADDS X12 X12 X13
arm... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
* * * print_literal_from_elf " arm / generic / bignum_amontmul.o " ... |
dba84fddf55e8dca400ed3b607c21cd89df213714323d88ddde7eca18e4cf1c5 | kovtun1/DependenciesGraph | utils.ml | let rec sort list =
match list with
| [] ->
[]
| element :: tl ->
insert element (sort tl)
and insert element_to_insert list =
match list with
| [] ->
[element_to_insert]
| element :: tl ->
if element_to_insert < element then
element_to_insert :: element :: tl
else
element ::... | null | https://raw.githubusercontent.com/kovtun1/DependenciesGraph/cec4d2b7a29746ad7b61d76b3662afd5c39f26ff/utils.ml | ocaml | let rec sort list =
match list with
| [] ->
[]
| element :: tl ->
insert element (sort tl)
and insert element_to_insert list =
match list with
| [] ->
[element_to_insert]
| element :: tl ->
if element_to_insert < element then
element_to_insert :: element :: tl
else
element ::... | |
936cbb6cc2d071b76eda588ef5c22d68bacaca7b28d0a3cc56ca047d45b1e5f5 | nubank/workspaces | core.cljs | (ns nubank.workspaces.ui.core
(:require [fulcro.client.localized-dom :as dom]
[fulcro.client.primitives :as fp]
[goog.object :as gobj]
[nubank.workspaces.lib.local-storage :as local-storage]
[nubank.workspaces.model :as wsm]))
(def color-white "#fff")
(def color-light-... | null | https://raw.githubusercontent.com/nubank/workspaces/c93802388e1d6e1028dda6868d4fece8a2df8ea1/src/nubank/workspaces/ui/core.cljs | clojure | (ns nubank.workspaces.ui.core
(:require [fulcro.client.localized-dom :as dom]
[fulcro.client.primitives :as fp]
[goog.object :as gobj]
[nubank.workspaces.lib.local-storage :as local-storage]
[nubank.workspaces.model :as wsm]))
(def color-white "#fff")
(def color-light-... | |
6dcdaeea32cb80986a00cff6ec607fd0b1e20d762b1396c07afca023d33cf360 | ghc/testsuite | T7697.hs | module T7697 where
f :: Int => Int
f x = x
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/T7697.hs | haskell | module T7697 where
f :: Int => Int
f x = x
| |
8785f560d7dd07d2827016e93dd3f83e54640a8b3eb8d4dc1a56c7545ebf27af | puppetlabs/clj-http-client | gzip_request_test.clj | (ns puppetlabs.http.client.gzip-request-test
(:import (com.puppetlabs.http.client Sync
SimpleRequestOptions
ResponseBodyType
CompressType)
(java.io ByteArrayInputStream FilterInputStream)
... | null | https://raw.githubusercontent.com/puppetlabs/clj-http-client/ec78805007db944b0ef7b4e4212d4969d7d8d0a4/test/puppetlabs/http/client/gzip_request_test.clj | clojure | (ns puppetlabs.http.client.gzip-request-test
(:import (com.puppetlabs.http.client Sync
SimpleRequestOptions
ResponseBodyType
CompressType)
(java.io ByteArrayInputStream FilterInputStream)
... | |
d0a66120afae124ade585cc64421a375e062df3c3ba59d234cfe797c67cc65d3 | geophf/1HaskellADay | Solution.hs | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2017.M09.D26.Solution where
import qualified Codec.Compression.GZip as GZ
import Data.Aeson
import Data.Aeson.Encode.Pretty
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Map (Map)
import qualified Data.... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M09/D26/Solution.hs | haskell | }
with our handy insert statement:
from the above, derive the below:
this looks like an applicative functor definition, but it's weird because
}
reminder to me that this is a compressed archive
-
>>> articles <- extractArticles <$> BL.readFile (dir ++ arts)
-
then let's grab the line that has the raw names listed ... | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2017.M09.D26.Solution where
import qualified Codec.Compression.GZip as GZ
import Data.Aeson
import Data.Aeson.Encode.Pretty
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Map (Map)
import qualified Data.... |
2a28b94e7c3243fc7dc457f38a72d5c1067aed600d078769765b915e0fe3f60d | mitsuji/mssql-simple | Template.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Database.MSSQLServer.Query.Template ( rowTupleQ
, resultSetTupleQ
, rpcResponseSetTupleQ
, rpcOutputSetTuple... | null | https://raw.githubusercontent.com/mitsuji/mssql-simple/0c51facf4b86e9340f81485d493acf33dccf26b1/src/Database/MSSQLServer/Query/Template.hs | haskell | # OPTIONS_HADDOCK hide # | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Database.MSSQLServer.Query.Template ( rowTupleQ
, resultSetTupleQ
, rpcResponseSetTupleQ
, rpcOutputSetTupleQ
... |
dce77829cf43ac8dccb65ce1584f2cb011efaf5b5f297a18c7752fe1b86debf0 | ocamllabs/ocaml-scry | time.ml |
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-scry/3ba35317975fe78dab06cd28822219a0eab7c318/lib/time.ml | ocaml |
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
7b3cd170e5465b4a0f96c596f9e733268a855145fe255ae715c8c7384c822b56 | NorfairKing/template-optparse | OptParseSpec.hs | {-# LANGUAGE OverloadedStrings #-}
-- | = Optparse Tests Template
--
-- This is a template implementation of commands, flags, options, environment variable and configuration file parsing according to best practices.
-- To use this template, follow the instructions below and delete anything you do not need.
--
-- == Li... | null | https://raw.githubusercontent.com/NorfairKing/template-optparse/e30850c9506fe5bc4de8264d0da0e0b06b4b5f31/test/OptParseSpec.hs | haskell | # LANGUAGE OverloadedStrings #
| = Optparse Tests Template
This is a template implementation of commands, flags, options, environment variable and configuration file parsing according to best practices.
To use this template, follow the instructions below and delete anything you do not need.
== License
This temp... |
See -syd.eu/template/NorfairKing/template-optparse for more information .
Copyright ( c ) 2020 .
All Rights Reserved .
in this module we show one test for each of the arguments , environment
module OptParseSpec
( spec,
)
where
import Data.Yaml as Yaml
import qualified Env
import OptParse
import Options... |
9112862872c9990a62efc68abb152a218c7260918cd55df99129c224a226793f | markcox80/lisp-executable | creation-sbcl.lisp | Copyright ( c ) 2011 ,
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;; - Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the fo... | null | https://raw.githubusercontent.com/markcox80/lisp-executable/989b68ed946e1d99e6e65b7383a64ff035e833c7/src/creation-sbcl.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in... | Copyright ( c ) 2011 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
#-:sbcl (error "... |
1e4bb53f4062fbfad937f022dceef38cc9fe987a2d926420f1088de8ed10d3c5 | emqx/emqtt | emqtt_cli.erl | %%-------------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a c... | null | https://raw.githubusercontent.com/emqx/emqtt/662fdbb4994cee5fa1d9ab6397e0a83cd9c3fb70/src/emqtt_cli.erl | erlang | -------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqtt_cli).
-include("emqtt.hrl").
-export([ main/1
]).
-import(proplists, [g... |
4745f6e4efab88b221c796582c616a9ccc9c20ed5743a13f5565a5503926da07 | Palmik/wai-sockjs | Handler.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Network.Sock.Types.Handler
( Handler(..)
) where
------------------------------------------------------------------------------
import qualified Data.ByteString.Lazy as BL (ByteString)
import Data.Proxy
-------------------------------... | null | https://raw.githubusercontent.com/Palmik/wai-sockjs/d1037cb00450a362b7e593a76d6257d06ecb2405/src/Network/Sock/Types/Handler.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------... | # LANGUAGE FlexibleContexts #
module Network.Sock.Types.Handler
( Handler(..)
) where
import qualified Data.ByteString.Lazy as BL (ByteString)
import Data.Proxy
import qualified Network.HTTP.Types as H (ResponseHeaders)
import qualified Network.HTTP.Types.Response as H (IsResponse(..))
import qua... |
96336401adfa1a862a2ecd0ee50d40d342b2fbf7f0394d59aaa6097af023357f | hengchu/tiger-haskell | tigertemp.hs | module TigerTemp
(
Label
, RetLabel
, Temp(..)
)
where
import TigerRegisters
import TigerSymbol
type Label = Symbol
type RetLabel = Label
data Temp = TEMP Int
| SRC Int
| DST Int
| Named Register
deriving (Ord, Eq)
instance Show Temp where
show (TEMP d)... | null | https://raw.githubusercontent.com/hengchu/tiger-haskell/ec6809500c245ea99d2329e8255a67bdb57cf579/src/tigertemp.hs | haskell | module TigerTemp
(
Label
, RetLabel
, Temp(..)
)
where
import TigerRegisters
import TigerSymbol
type Label = Symbol
type RetLabel = Label
data Temp = TEMP Int
| SRC Int
| DST Int
| Named Register
deriving (Ord, Eq)
instance Show Temp where
show (TEMP d)... | |
bd6a7987527348aed13e51242eb454cd96ea61a3fac21b61756a3c617ee5ba61 | tonsky/Heroes | render.cljs | (ns heroes.render
(:require
[goog.object :as go]
[heroes.model :as model]
[clojure.string :as str]
[datascript.core :as ds]
[heroes.core :as core :refer [dim pos]]))
(defonce *images (atom {}))
(defonce *window-dim (atom nil))
(defonce *frame-time (core/clock-window 10))
(declare render!)
(defn imag... | null | https://raw.githubusercontent.com/tonsky/Heroes/341ca22d6d340bedb31c8e7421937a1f07575d26/src/heroes/render.cljs | clojure | (ns heroes.render
(:require
[goog.object :as go]
[heroes.model :as model]
[clojure.string :as str]
[datascript.core :as ds]
[heroes.core :as core :refer [dim pos]]))
(defonce *images (atom {}))
(defonce *window-dim (atom nil))
(defonce *frame-time (core/clock-window 10))
(declare render!)
(defn imag... | |
b1cbfbab7c767c1998e60ddf68b1ca1e6bd0df13dce8f068986486c35e4ef667 | overtone/overtone | flute.clj | (ns overtone.samples.flute
(:use [overtone.core]))
(defn- registered-vibrato-samples [] (registered-assets ::TransverseFluteTenutoVibrato))
(defn- registered-non-vibrato-samples [] (registered-assets ::TransverseFluteTenutoNonVibrato))
(def FREESOUND-VIBRATO-FLUTE-SAMPLES
{154274 :C7 154273 :B6 154272 :A#6 1... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/samples/flute.clj | clojure | (ns overtone.samples.flute
(:use [overtone.core]))
(defn- registered-vibrato-samples [] (registered-assets ::TransverseFluteTenutoVibrato))
(defn- registered-non-vibrato-samples [] (registered-assets ::TransverseFluteTenutoNonVibrato))
(def FREESOUND-VIBRATO-FLUTE-SAMPLES
{154274 :C7 154273 :B6 154272 :A#6 1... | |
098a20346c89db355fe172be5782a063c2a8b62b671a08defd17bbf893713cad | helium/blockchain-etl | blockchain_etl_SUITE.erl | -module('blockchain_etl_SUITE').
-compile([export_all]).
all() -> [].
| null | https://raw.githubusercontent.com/helium/blockchain-etl/2e5f931cb75252d531d4d844035cd57c6e75f38e/test/ct/blockchain_etl_SUITE.erl | erlang | -module('blockchain_etl_SUITE').
-compile([export_all]).
all() -> [].
| |
d8d92310a797ec1595a1a7a59abb19bb1d351edb6201e78d9bc0faf376a9e63a | mejgun/haskell-tdlib | SearchPublicChat.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.SearchPublicChat where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
-- Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/6e10efc37e32dbb9d19bef0241aa1553cf2cdda3/src/TD/Query/SearchPublicChat.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned @username Username to be resolved
| |
module TD.Query.SearchPublicChat where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data SearchPublicChat = SearchPublicChat
username :: Maybe String
}
deriving (Eq)
instance Show SearchPublicChat where
show
SearchPublicChat
{ username = use... |
9670d82a1e0bdc6ae91a41817e17d85b6aa095dd2474650f9ad02da6f07f0ec5 | sulami/spielwiese | 018-maximum-path-sum-I.hs | -- Maximum path sum I
Problem 18
--
-- By starting at the top of the triangle below and moving to adjacent numbers
on the row below , the maximum total from top to bottom is 23 .
--
3
-- 7 4
-- 2 4 6
-- 8 5 9 3
--
That is , 3 + 7 + 4 + 9 = 23 .
--
-- Find the maximum total from top to bottom of the triangle bel... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/018-maximum-path-sum-I.hs | haskell | Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers
7 4
2 4 6
8 5 9 3
Find the maximum total from top to bottom of the triangle below:
and requires a clever method! ;o)
# OPTIONS_GHC -O2 # | Problem 18
on the row below , the maximum total from top to bottom is 23 .
3
That is , 3 + 7 + 4 + 9 = 23 .
NOTE : As there are only 16384 routes , it is possible to solve this problem
by trying every route . However , Problem 67 , is the same challenge with a
triangle containing one - hundred rows ; it c... |
216c62f9e4c864aaedccbf998d575bb724a53971f2d1e4d6f7b8d0edad66e5fe | input-output-hk/plutus-apps | Types.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DerivingVia #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StrictData #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Cardano.ChainIn... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-pab/src/Cardano/ChainIndex/Types.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DerivingVia #
# LANGUAGE OverloadedStrings #
| Starting a node client thread
^ Port number
| Received transaction
^ Blocks
^ Transactions | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE StrictData #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Cardano.ChainIndex.Types where
import Control.Lens (makeLenses)
import Control.Monad.Freer.State
import Data.Aeson (Fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.