_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 |
|---|---|---|---|---|---|---|---|---|
535f1ddcabafaaaca4cc2a8c476adf2e1bc15d14165ead05cfc85ff5cd75bbd1 | spurious/sagittarius-scheme-mirror | %3a6.scm | #!core
(library (srfi :6)
(export
get-output-string
open-input-string
open-output-string)
(import (srfi :6 basic-string-ports))
)
| null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a6.scm | scheme | #!core
(library (srfi :6)
(export
get-output-string
open-input-string
open-output-string)
(import (srfi :6 basic-string-ports))
)
| |
848ee1b388199e1a293068b0d34014d2d69e96bfa8b5d0e7577b5bc014b63796 | Bodigrim/arithmoi | Multiplicative.hs | -- |
Module : Math . . Moduli . Multiplicative
Copyright : ( c ) 2017
Licence : MIT
Maintainer : < >
--
Multiplicative groups of integers modulo m.
--
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
module Math.NumberTheory.Moduli.Multiplicative
( -- * Multiplicative group... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/df789d23341247e9cdb4f690595ea99c89836d09/Math/NumberTheory/Moduli/Multiplicative.hs | haskell | |
* Multiplicative group
* Primitive roots
| This type represents elements of the multiplicative group mod m, i.e.
those elements which are coprime to m. Use @isMultElement@ to construct.
^ Unwrap a residue.
| Attempt to construct a multiplicative group element.
| For elements of the multiplicative group, we ... | Module : Math . . Moduli . Multiplicative
Copyright : ( c ) 2017
Licence : MIT
Maintainer : < >
Multiplicative groups of integers modulo m.
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
module Math.NumberTheory.Moduli.Multiplicative
MultMod
, multElement
, isMultEl... |
cf2036b2bdd0790b8e732fb83f9afdfe9064683ef13a37422e91e334a18391b9 | vmchale/command-line-tweeter | Bench.hs | module Main where
import Criterion.Main
import qualified Data.ByteString as BS
import Text.Megaparsec
import Web.Tweet.Parser
setupEnv :: IO BS.ByteString
setupEnv = BS.readFile "test/data"
setupEnv' :: IO String
setupEnv' = readFile "test/data"
main :: IO ()
main =
defaultMain [
... | null | https://raw.githubusercontent.com/vmchale/command-line-tweeter/53314340c5bc7dda4de78072790c2c36e180c0ca/bench/Bench.hs | haskell | module Main where
import Criterion.Main
import qualified Data.ByteString as BS
import Text.Megaparsec
import Web.Tweet.Parser
setupEnv :: IO BS.ByteString
setupEnv = BS.readFile "test/data"
setupEnv' :: IO String
setupEnv' = readFile "test/data"
main :: IO ()
main =
defaultMain [
... | |
fbb61d8936dc3d64cc77950ef17f9a5d040f88edbd290ece2dc8e9e60d361046 | skanev/playground | 50.scm | SICP exercise 3.50
;
; Complete the following definition, which generalizes stream-map to allow
procedures that take multiple arguments analogous to map in section 2.2.1 ,
footnote 12 .
;
; (define (stream-map proc . argstreams)
; (if (<??> (car argstreams))
; the-empty-stream
; (<??>
; ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/50.scm | scheme |
Complete the following definition, which generalizes stream-map to allow
(define (stream-map proc . argstreams)
(if (<??> (car argstreams))
the-empty-stream
(<??>
(apply proc (map <??> argstreams))
(apply stream-map
(cons proc (map <??> argstreams)))))) | SICP exercise 3.50
procedures that take multiple arguments analogous to map in section 2.2.1 ,
footnote 12 .
(define the-empty-stream empty-stream)
(define stream-null? stream-empty?)
(define stream-car stream-first)
(define stream-cdr stream-rest)
(define (stream-map2 proc . argstreams)
(if (stream-null? (ca... |
24c9772ed795853892ff454907b6afb70343b7d463ea6dddce62775678276b47 | Frama-C/Frama-C-snapshot | server_parameters.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/server/server_parameters.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
ef974b30c2a0424d1d7be2ce836ffd327d0bd1f39c4047e0a6901863de28a256 | KestrelInstitute/Specware | Lisp.lisp | (defpackage :Lisp-Spec)
(in-package :Lisp-Spec)
(defun nil-0 () nil)
(defun |!nil| (x) (declare (ignore x)) nil)
(defun cons-2 (x y) (cons x y))
(defun |!cons| (x) x)
(defun |!car| (x) (car x))
(defun |!cdr| (x) (cdr x))
(defun symbol-2 (pkg name) (intern name (find-package pkg)))
(defun |!symbol| (x) (intern (... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Library/Legacy/Utilities/Handwritten/Lisp/Lisp.lisp | lisp | (defun |!PPRINT| (term) (write-to-string term :pretty t))
This should be in a separate I/O spec.
With Open File | (defpackage :Lisp-Spec)
(in-package :Lisp-Spec)
(defun nil-0 () nil)
(defun |!nil| (x) (declare (ignore x)) nil)
(defun cons-2 (x y) (cons x y))
(defun |!cons| (x) x)
(defun |!car| (x) (car x))
(defun |!cdr| (x) (cdr x))
(defun symbol-2 (pkg name) (intern name (find-package pkg)))
(defun |!symbol| (x) (intern (... |
686b21b2bac53bc26a49384772f0f992cdf86f815df02ada4cf4266147f74641 | tschady/advent-of-code | d11.clj | (ns aoc.2017.d11
(:require [aoc.file-util :as file-util]
[aoc.hex :as hex]))
(def input (first (file-util/read-csv "2017/d11.txt")))
(defn part-1 [input] (hex/distance (hex/walk :flat-top input)))
(defn part-2 [input] (->> input
(reductions (partial hex/step :flat-top) [0 0 0]... | null | https://raw.githubusercontent.com/tschady/advent-of-code/9cd0cbbbbeadd083b9030f21e49ca1ac26aee53a/src/aoc/2017/d11.clj | clojure | (ns aoc.2017.d11
(:require [aoc.file-util :as file-util]
[aoc.hex :as hex]))
(def input (first (file-util/read-csv "2017/d11.txt")))
(defn part-1 [input] (hex/distance (hex/walk :flat-top input)))
(defn part-2 [input] (->> input
(reductions (partial hex/step :flat-top) [0 0 0]... | |
32813368007206c247227f5c547c8a80ef3343c5d1dc3c7335f103f367f00660 | spawngrid/htoad | htoad_transform.erl | -module(htoad_transform).
-export([parse_transform/2]).
-include_lib("htoad/include/stdlib.hrl").
-compile({parse_transform, lager_transform}).
-record(state,{
rules = [],
current_rule = [], %% [] :: atom()
file_requests = [],
options,
absname
}).
-record(co... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/apps/htoad/src/htoad_transform.erl | erlang | [] :: atom() | -module(htoad_transform).
-export([parse_transform/2]).
-include_lib("htoad/include/stdlib.hrl").
-compile({parse_transform, lager_transform}).
-record(state,{
rules = [],
file_requests = [],
options,
absname
}).
-record(context, {module,
function,
... |
4ffad0aae04f2df6d070feac69d4624e0c1e1599404f32ca08e923b6fb29d1e8 | mdsebald/link_blox_app | lblx_test.erl | %%% @doc
BLOCKTYPE
%%% Test
%%% DESCRIPTION
%%% Test block type to support unit tests
%%% LINKS
%%% @end
-module(lblx_test).
-author("Your Name").
-include("../block_state.hrl").
%% ====================================================================
%% API functions
%% ==========================... | null | https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_test.erl | erlang | @doc
Test
DESCRIPTION
Test block type to support unit tests
LINKS
@end
====================================================================
API functions
====================================================================
Merge the block type specific, Config, Input, and Output attributes
wi... | BLOCKTYPE
-module(lblx_test).
-author("Your Name").
-include("../block_state.hrl").
-export([groups/0, version/0]).
-export([create/2, create/4, create/5, upgrade/1, initialize/1, execute/2, delete/1]).
groups() -> [none].
version() -> "0.1.0".
-spec default_configs(BlockName :: block_name(),
... |
69d9de0eb9673a563e54bc637439e9439816a2c3a04d5d2f38b0291724b44dbb | Fresheyeball/Shpadoinkle | CSS.hs | {-# LANGUAGE CPP #-}
# LANGUAGE JavaScriptFFI #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -ddump ... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/ac0cb351042d076741120a9695174f6a9cbe1853/html/Shpadoinkle/Html/TH/CSS.hs | haskell | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell # | # LANGUAGE JavaScriptFFI #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -ddump - splices #
module Shpadoinkle.Html.TH.CSS
( extractNamespace
, textProperty'
) where
import Control.Compactable
import Data.B... |
030c1ca478d6fb8f74dfa9ddaf04e7ec983e876a06203a45c1ca4396a2fbd530 | rmculpepper/crypto | pkey.rkt | Copyright 2018
;;
;; 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 later version.
;;
;; This library is distributed in... | null | https://raw.githubusercontent.com/rmculpepper/crypto/63e131c06d54756c3f36833ad0b700d56d6a75c8/crypto-lib/private/decaf/pkey.rkt | racket |
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
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | Copyright 2018
by the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
#lang racket/base
(require racket/class
"../common/common.rkt"
"../common/pk-co... |
e9dc963ddbff0a009ed036c8e3a31cacc1e4c041a47ad57f724f33a4bfa7607c | axellang/axel | App.hs | module Axel.Eff.App where
import Axel.Prelude
import Axel.Eff.Console (Console, runConsole)
import Axel.Eff.Error (Error, renderError, unsafeRunError)
import Axel.Eff.FileSystem (FileSystem, runFileSystem)
import Axel.Eff.Ghci (Ghci, runGhci)
import Axel.Eff.Log (Log, runLogAsFileSystem)
import Axel.Eff.Process (Proc... | null | https://raw.githubusercontent.com/axellang/axel/8da784ae24406d4328e111b3db13f64dc943f738/src/Axel/Eff/App.hs | haskell | module Axel.Eff.App where
import Axel.Prelude
import Axel.Eff.Console (Console, runConsole)
import Axel.Eff.Error (Error, renderError, unsafeRunError)
import Axel.Eff.FileSystem (FileSystem, runFileSystem)
import Axel.Eff.Ghci (Ghci, runGhci)
import Axel.Eff.Log (Log, runLogAsFileSystem)
import Axel.Eff.Process (Proc... | |
373016c17d1afb7f16792630707dba13aba05561d5f7c1ecc145537849260cc6 | shonfeder/emojitsu | bimap.ml | (** A bidirecitonal map between As and Bs *)
module type S = sig
type t
module A : sig
type key
end
module B : sig
type key
end
val empty : t
val is_empty : t -> bool
val add : A.key -> B.key -> t -> t
module FromA : sig
val mem : A.key -> t -> bool
val find_opt : A.key -> t -> ... | null | https://raw.githubusercontent.com/shonfeder/emojitsu/8581180bb405e8c2989858f61d083f9bdf5b5f81/lib/bimap.ml | ocaml | * A bidirecitonal map between As and Bs
* Asymetric operations from As to Bs | module type S = sig
type t
module A : sig
type key
end
module B : sig
type key
end
val empty : t
val is_empty : t -> bool
val add : A.key -> B.key -> t -> t
module FromA : sig
val mem : A.key -> t -> bool
val find_opt : A.key -> t -> B.key option
end
module FromB : sig
... |
be755b7326920c23b1a05e648502978190b456e0d0b305e884987c9fb7646ae2 | cyverse-archive/DiscoveryEnvironmentBackend | dependencies.clj | {:dependencies [[cheshire "5.0.2"]]}
| null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/databases/de-database-schema/src/main/conversions/dependencies.clj | clojure | {:dependencies [[cheshire "5.0.2"]]}
| |
b9dc783dbf5fbbc052d8410826d7ddf643c97c661ff3cf09e5b5d21a1a2a73cf | Helium4Haskell/helium | MissingSuperClass.hs | class ClassA a
class ClassA a => ClassB a
instance ClassB Int
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClassesStatic/MissingSuperClass.hs | haskell | class ClassA a
class ClassA a => ClassB a
instance ClassB Int
| |
bd619ae6bf637d5503697671fa72c1d6b3d5faed0875a4658a3ef273d6b472a8 | input-output-hk/ouroboros-network | Block.hs | -- | The consensus layer's abstract view of blocks
module Ouroboros.Consensus.Block (module X) where
import Ouroboros.Consensus.Block.Abstract as X
import Ouroboros.Consensus.Block.EBB as X
import Ouroboros.Consensus.Block.Forging as X
import Ouroboros.Consensus.Block.NestedCont... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/Block.hs | haskell | | The consensus layer's abstract view of blocks | module Ouroboros.Consensus.Block (module X) where
import Ouroboros.Consensus.Block.Abstract as X
import Ouroboros.Consensus.Block.EBB as X
import Ouroboros.Consensus.Block.Forging as X
import Ouroboros.Consensus.Block.NestedContent as X
import Ouroboros.Consensus.Block... |
92031d7d99b7e5840af0c609b8e7516037eb76fbd89f9b3856813277cd1cc0d9 | jawline/c8hardcaml | bcd.mli | open! Core
open! Hardcaml
open! Signal
(** An implementation of binary coded decimals by lookup table *)
module I : sig
type 'a t =
{ clock : 'a [@bits 1]
; clear : 'a [@bits 1]
; input : 'a [@bits 8]
}
[@@deriving sexp_of, hardcaml]
end
module O : sig
type 'a t =
{ digit1 : 'a [@bits 4]
... | null | https://raw.githubusercontent.com/jawline/c8hardcaml/03f848c71e334edb212e0694b32491fb3ba54156/src/bcd.mli | ocaml | * An implementation of binary coded decimals by lookup table | open! Core
open! Hardcaml
open! Signal
module I : sig
type 'a t =
{ clock : 'a [@bits 1]
; clear : 'a [@bits 1]
; input : 'a [@bits 8]
}
[@@deriving sexp_of, hardcaml]
end
module O : sig
type 'a t =
{ digit1 : 'a [@bits 4]
; digit2 : 'a [@bits 4]
; digit3 : 'a [@bits 4]
}
[@@d... |
3654949c1f92ffd992b1fe943de6d4167ac5feadae616f0473041ed3ec882639 | elaforge/karya | Lilypond.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Cmd-level support for the lilypond backend.
module Cmd.Lilypond (
-- * derive
derive_block, derive, lookup_key
-- * compile
, Movement, extract_movements, explicit_mo... | null | https://raw.githubusercontent.com/elaforge/karya/89d1651424c35e564138d93424a157ff87457245/Cmd/Lilypond.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Cmd-level support for the lilypond backend.
* derive
* compile
* derive
Make sure a bad block id will fail right away.
| Run a derivation in lilypond context, which will cause certain calls to
behave di... | Copyright 2013
module Cmd.Lilypond (
derive_block, derive, lookup_key
, Movement, extract_movements, explicit_movements
, compile_ly, convert, ly_filename
) where
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Data.Text.Lazy as Lazy
import qualified Data.Text.Lazy.... |
cb65ad35b359e6bd736cd4316336742aa55e0224c9aec86d913edb6a37441fe4 | HouzuoGuo/Aurinko | db_test.clj | (ns Aurinko.db-test
(:require (Aurinko [db :as db] [col :as col] [fs :as fs]))
(:use clojure.test
[clojure.java.io :only [file]]))
(defn all-docs [col]
(let [docs (transient [])]
(col/all col #(conj! docs %))
(persistent! docs)))
(deftest db
(.mkdir (file "db"))
(let [db (db/open "db")]
... | null | https://raw.githubusercontent.com/HouzuoGuo/Aurinko/f24bcab53da45b477d0b842bc4ab9ff1e08f505c/test/Aurinko/db_test.clj | clojure | create collections
use collections
compress collection
repair collection
completely corrupt data
corrupt log file too
open existing database | (ns Aurinko.db-test
(:require (Aurinko [db :as db] [col :as col] [fs :as fs]))
(:use clojure.test
[clojure.java.io :only [file]]))
(defn all-docs [col]
(let [docs (transient [])]
(col/all col #(conj! docs %))
(persistent! docs)))
(deftest db
(.mkdir (file "db"))
(let [db (db/open "db")]
... |
850bf724e1101d31a442b00dfc6ce233676832a9643af44949a4aeaa96b7da50 | s-expressionists/Incless | print-object.lisp | (in-package #:incless-extrinsic)
(defmethod print-object (object stream)
(incless:write-unreadable-object *client* object stream t t nil)
object)
(defmethod print-object ((object array) stream)
(incless-implementation:print-array *client* object stream))
(defmethod print-object ((object bit-vector) stream)
(... | null | https://raw.githubusercontent.com/s-expressionists/Incless/0f4a2b591f621753d691706ae43db5b78bddc9f6/src/extrinsic/print-object.lisp | lisp | (in-package #:incless-extrinsic)
(defmethod print-object (object stream)
(incless:write-unreadable-object *client* object stream t t nil)
object)
(defmethod print-object ((object array) stream)
(incless-implementation:print-array *client* object stream))
(defmethod print-object ((object bit-vector) stream)
(... | |
b5c9bc2c3b807c7278e2023decae28ba1074fa9f9ddb6d4625eef327d5ef4b38 | helium/erlang-libp2p | nat_SUITE.erl | -module(nat_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([
all/0,
init_per_testcase/2,
end_per_testcase/2
]).
-export([
suite/0,
basic/1,
server/1,
renew/1
]).
%%--------------------------------------------------------------------
%... | null | https://raw.githubusercontent.com/helium/erlang-libp2p/070fea4a05e8a9d7e5cd0af1c9c4c4f7a507aaa7/test/nat_SUITE.erl | erlang | --------------------------------------------------------------------
COMMON TEST CALLBACK FUNCTIONS
--------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Running tests for this suite
@end
-------------------------------------... | -module(nat_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([
all/0,
init_per_testcase/2,
end_per_testcase/2
]).
-export([
suite/0,
basic/1,
server/1,
renew/1
]).
suite() ->
[{timetrap,{seconds,200}}].
@public
all() ->
[bas... |
ccd091f70b74798fec4b5cbc3c90b08aeb9915f0de1a6ed4a92c94bb4487d562 | input-output-hk/project-icarus-importer | Genesis.hs | module Test.Infrastructure.Genesis (
GenesisValues(..)
, genesisValues
) where
import Universum
import Data.Maybe (fromJust)
import UTxO.Context
import UTxO.DSL
------------------------------------------------------------------------------
Convenient access to som... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/unit/Test/Infrastructure/Genesis.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
| Initial balance of rich actor 0
| Address of rich actor 0
| Hash of the bootstrap... | module Test.Infrastructure.Genesis (
GenesisValues(..)
, genesisValues
) where
import Universum
import Data.Maybe (fromJust)
import UTxO.Context
import UTxO.DSL
Convenient access to some values in the Cardano genesis block
Convenient access to some values in the... |
b7903c9dd6a4ce58da070a1176c5243eca7bc0b9c7d3dcd02cce1a13ca7867ad | metametadata/aide | core.cljs | (ns app.core
(:require [app.model :as model]
[app.events :as events]
[app.view-model :as view-model]
[app.view :as view]
[aide.core :as aide]
[aide.lifetime :as aide-lifetime]
[aide-history.core :as aide-history]
[aide-reagent.core :a... | null | https://raw.githubusercontent.com/metametadata/aide/0828b53503e8c7f54f84e1b140a1d02ad80aff36/examples/friend-list/src/app/core.cljs | clojure | Token is explicitly blacklisted "just in case"
Persistence is added early because it changes the model
Routing events must fire after model is loaded from local storage
Logging must be last in order to catch all the events | (ns app.core
(:require [app.model :as model]
[app.events :as events]
[app.view-model :as view-model]
[app.view :as view]
[aide.core :as aide]
[aide.lifetime :as aide-lifetime]
[aide-history.core :as aide-history]
[aide-reagent.core :a... |
fdb2ceff083c71717208e99b4482aa7ab33491fa1c4834591ea0a6b5fe8c268b | elastic/eui-cljs | modal.cljs | (ns eui.modal
(:require ["@elastic/eui/lib/components/modal/modal.js" :as eui]))
(def EuiModal eui/EuiModal)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/modal.cljs | clojure | (ns eui.modal
(:require ["@elastic/eui/lib/components/modal/modal.js" :as eui]))
(def EuiModal eui/EuiModal)
| |
797bc1bb629dcd0bb519e2bf9b1b72dc747739aca0915bf2c40509bb342fc869 | PacktWorkshops/The-Clojure-Workshop | data_insertion.clj | (ns packt-clj.exercises.data-insertion
(:require
[clojure.java.jdbc :as jdbc]))
option 1
(defn insert-user
[db]
(jdbc/insert!
db
:app_user
{:first_name "Andre"
:surname "Agassi"
:height 180
:weight 80}))
option 2
(defn insert-user
[db]
(jdbc/insert!
db
:... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter13/Exercise13.04/src/packt_clj/exercises/data_insertion.clj | clojure | (ns packt-clj.exercises.data-insertion
(:require
[clojure.java.jdbc :as jdbc]))
option 1
(defn insert-user
[db]
(jdbc/insert!
db
:app_user
{:first_name "Andre"
:surname "Agassi"
:height 180
:weight 80}))
option 2
(defn insert-user
[db]
(jdbc/insert!
db
:... | |
507826741c04c6132d8f42cc60d0789bbaa9f5f82dfbb0b44de6f01c8a55f7e8 | tamarit/edd | caesar_ok.erl | edd : : test ( ) " ) .
Caesar cypher in Erlang for the rosetta code wiki .
Implemented by
-module(caesar_ok).
-export([main/2,test/0, rot/2]).
rot : rotate by Key places
rot(Char,Key) when (Char >= $A) and (Char =< $Z) or
(Char >= $a) and (Char =< $z) ->
Offset = $A + Char band 32,
... | null | https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/examples/caesar/caesar_ok.erl | erlang | RIGHT
key: normalize key. | edd : : test ( ) " ) .
Caesar cypher in Erlang for the rosetta code wiki .
Implemented by
-module(caesar_ok).
-export([main/2,test/0, rot/2]).
rot : rotate by Key places
rot(Char,Key) when (Char >= $A) and (Char =< $Z) or
(Char >= $a) and (Char =< $z) ->
Offset = $A + Char band 32,
... |
834df43f836862bb510d029dc831588c50613c7a089fef4a33d626a0bd4c1480 | vascokk/rivus_cep | rivus_cep_tcp_listener_sup.erl | %%------------------------------------------------------------------------------
Copyright ( c ) 2014
%%
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 ... | null | https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/src/rivus_cep_tcp_listener_sup.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, eithe... | Copyright ( c ) 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(rivus_cep_tcp_listener_sup).
-behaviour(supervisor).
-export([start_link/2]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link(Host... |
3acf4a578de26c867a14b4af9a263428495c955124d8d9df8c027e415e4cbc2b | metabase/metabase | js_svg.clj | (ns metabase.pulse.render.js-svg
"Functions to render charts as svg strings by using graal's js engine. A bundle is built by `yarn build-static-viz`
which has charting library. This namespace has some wrapper functions to invoke those functions. Interop is very
strange, as the jvm datastructures, not just seriali... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/pulse/render/js_svg.clj | clojure | the bundle path goes through webpack. Changes require a `yarn build-static-viz`
the interface file does not go through webpack. Feel free to quickly change as needed and then re-require this
namespace to redef the `context`.
todo is this thread safe? Should we have a resource pool on top of this? Or create them fre... | (ns metabase.pulse.render.js-svg
"Functions to render charts as svg strings by using graal's js engine. A bundle is built by `yarn build-static-viz`
which has charting library. This namespace has some wrapper functions to invoke those functions. Interop is very
strange, as the jvm datastructures, not just seriali... |
d39416b344938f5e83ff87b258282ea3794919d73a174e6f895bcb1511dfa763 | donaldsonjw/bigloo | apply.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Ast / apply.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Ast/apply.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The apply compilation */
*===========================... | * serrano / prgm / project / bigloo / comptime / Ast / apply.scm * /
* Author : * /
* Creation : Fri Jun 21 09:34:48 1996 * /
* Last change : Mon Nov 14 17:32:00 2011 ( serrano ) * /
(module a... |
3ee6f744fe191a53b300f3a4c94cb6b210ccd96e32ff7adccfdbe24d0d16ad69 | LexiFi/menhir | BoundedBitSet.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/BoundedBitSet.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
e57185e7db13ae0eda7de2fc21d46d5a10f6ce19b40f2dd1c541834233cac4ee | racket/web-server | insta.rkt | #lang racket
(require web-server/servlet
web-server/servlet-env
(for-syntax racket)
(for-syntax syntax/kerncase))
(provide
(all-from-out web-server/servlet)
(except-out (all-from-out racket) #%module-begin)
(rename-out [web-module-begin #%module-begin]))
(define extra-files-path #f)
(de... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/insta/insta.rkt | racket | check-for-def : syntax syntax-list -> void
Expands body-stxs and determines if id-stx is bound therein. | #lang racket
(require web-server/servlet
web-server/servlet-env
(for-syntax racket)
(for-syntax syntax/kerncase))
(provide
(all-from-out web-server/servlet)
(except-out (all-from-out racket) #%module-begin)
(rename-out [web-module-begin #%module-begin]))
(define extra-files-path #f)
(de... |
c4f981ea5c33ae5ff2122600547d2dbc343a7f6f561b8468d1c783c12fe58537 | Opetushallitus/ataru | person_client.clj | (ns ataru.person-service.person-client
(:require
[ataru.cache.cache-service :as cache]
[ataru.cas.client :as cas]
[ataru.config.url-helper :refer [resolve-url]]
[ataru.person-service.person-schema :as person-schema]
[cheshire.core :as json]
[clojure.core.match :refer [match]]
[schema.core :as s]
... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/3e60a49dc2980903c5702fa91e74bb059a4366bd/src/clj/ataru/person_service/person_client.clj | clojure | (ns ataru.person-service.person-client
(:require
[ataru.cache.cache-service :as cache]
[ataru.cas.client :as cas]
[ataru.config.url-helper :refer [resolve-url]]
[ataru.person-service.person-schema :as person-schema]
[cheshire.core :as json]
[clojure.core.match :refer [match]]
[schema.core :as s]
... | |
a1a168bf0eddb6778d4462f521ffb7c8c29c4d0f7f81ff8ed58d1a1d0a8977ac | input-output-hk/cardano-benchmarking | Resources.hs | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Cardano.Unlog.Resources
( ResAccums
, mkResAccums
, updateResAccums
, extractResAccums
, ResDistribProjections
, computeResDistrib
, ResContinuity
, discardObsoleteValues
-- * Re-exports
, Resources(..)
) where
import ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-benchmarking/af05b42df27e2cc7305475cf5c4efa81e7f97540/locli/src/Cardano/Unlog/Resources.hs | haskell | * Re-exports
| Obtain the current values in resource accumulators. | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Cardano.Unlog.Resources
( ResAccums
, mkResAccums
, updateResAccums
, extractResAccums
, ResDistribProjections
, computeResDistrib
, ResContinuity
, discardObsoleteValues
, Resources(..)
) where
import Cardano.Prelude
... |
3f20445be0b032efe8208573c06cbbd05180fed7ff0e1e1801942811075dcc59 | clash-lang/clash-compiler | T1102B.hs | module T1102B where
import Clash.Prelude
import qualified Prelude as P
import Data.List (isInfixOf)
import System.Environment (getArgs)
import System.FilePath ((</>), takeDirectory)
{-# ANN topEntity Synthesize {t_name = "top", t_inputs = [PortName "x"], t_output = PortName "y"} #-}
topEntity
:: Signal System (Int... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/a69ace9d21a6a1a925138588a428ed249d191641/tests/shouldwork/Signal/T1102B.hs | haskell | # ANN topEntity Synthesize {t_name = "top", t_inputs = [PortName "x"], t_output = PortName "y"} #
TODO: Could we remove bitvector noise? | module T1102B where
import Clash.Prelude
import qualified Prelude as P
import Data.List (isInfixOf)
import System.Environment (getArgs)
import System.FilePath ((</>), takeDirectory)
topEntity
:: Signal System (Int, Int, Int, Int, Int)
-> Signal System (Int, Int, Int, Int, Int)
topEntity = bundle . unbundle
asse... |
4d93e06285194579573b34b0a1a825c98cb4495785b5dcac11b1b0ea8ddf3920 | haskell-repa/repa | Main.hs |
import External.Count
import External.Rank
import Internal.Rank
import System.Environment
import System.Exit
import Data.Char
-- | Command-line help.
help :: String
help
= unlines
[ "pagerank -count <LINKS_FILE>"
, " Count the number of pages in a links file."
, ""
, "pagerank [-steps <INT>] -rank-external <LI... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/PageRank/src/Main.hs | haskell | | Command-line help.
| Command line configuration.
| Program mode.
| Count the total number of pages in a links file.
| Run the external algorithm,
given the links and titles files.
| Run the internal algorithm,
given the links and titles files.
| Default program configuration. |
import External.Count
import External.Rank
import Internal.Rank
import System.Environment
import System.Exit
import Data.Char
help :: String
help
= unlines
[ "pagerank -count <LINKS_FILE>"
, " Count the number of pages in a links file."
, ""
, "pagerank [-steps <INT>] -rank-external <LINKS_FILE> <TITLES_FILE>"... |
f3b0bc083dd672f7c47da339d9dede57a23d6bbf0631da62388e5cdd72eabd90 | runtimeverification/haskell-backend | Claim.hs | # LANGUAGE TemplateHaskell #
|
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Reachability.Claim (
Claim (..),
ApplyResult (..),
AppliedRule (..),
retractApplyRemai... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b74e9f8d5b88f4550145abf90d7fb3e69e072963/kore/src/Kore/Reachability/Claim.hs | haskell | * Re-exports
* For Claim implementations
* For JSON-RPC
* For testing
| @Rule claim@ is the type of rule to take a single step toward @claim@.
| 'AppliedRule' represents the rule applied during a rewriting step.
| Extracts all One-Path claims from a verified module.
| 'IndexedModule' containing the definition
... | # LANGUAGE TemplateHaskell #
|
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Reachability.Claim (
Claim (..),
ApplyResult (..),
AppliedRule (..),
retractApplyRemai... |
8ad60afca5fba900ac73d1eb999b604baee629afe0b12546b2bdf52e467694f4 | NorfairKing/the-notes | Code.hs | module Macro.Code where
import Types
import Macro.MetaMacro
minted :: Note -> Note -> Note
minted lang cont = do
packageDep_ "minted"
"\n"
let f = liftL2 $ \lang cont -> TeXEnv "minted" [FixArg lang] $ "\n" <> cont
f lang cont
"\n"
mintinline :: Note -> Note -> Note
mintinli... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Macro/Code.hs | haskell | module Macro.Code where
import Types
import Macro.MetaMacro
minted :: Note -> Note -> Note
minted lang cont = do
packageDep_ "minted"
"\n"
let f = liftL2 $ \lang cont -> TeXEnv "minted" [FixArg lang] $ "\n" <> cont
f lang cont
"\n"
mintinline :: Note -> Note -> Note
mintinli... | |
556b83a9a1812016170bf596238f426ec23177cabe01b698add34f7124fc3eaa | bos/vector-binary-instances | Benchmarks.hs | # LANGUAGE CPP #
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import Test.Tasty.Bench
import qualified Data.ByteString.Lazy as BS
import qualified Data.Vector.Unboxed as U
import Data.Vector.Binary
#if !(MIN_VERSION_bytestring(0,10,0))
import Control.DeepSeq (NFData(..))
import qualified Data... | null | https://raw.githubusercontent.com/bos/vector-binary-instances/20de2771ab2cb03289bb439dba634e24cfda304c/benchmarks/Benchmarks.hs | haskell | A feeble attempt at simulating what will happen if we end up with a situation
where we are unable to specialize to the element type | # LANGUAGE CPP #
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import Test.Tasty.Bench
import qualified Data.ByteString.Lazy as BS
import qualified Data.Vector.Unboxed as U
import Data.Vector.Binary
#if !(MIN_VERSION_bytestring(0,10,0))
import Control.DeepSeq (NFData(..))
import qualified Data... |
80a00468b2d427020f25cc86754afe61349faf1e8c5d0d315f3684302de96e06 | KIZI/sparqlab | cookies.clj | (ns sparqlab.cookies
(:require [clojure.string :as string]))
(def a-year
"One year in seconds"
(* 60 60 24 365))
(def cookie-ns
"sparqlab-exercise-")
(defn set-cookie
[response k value & {:as data}]
(assoc-in response
[:cookies k]
(merge {:max-age a-year
:path ... | null | https://raw.githubusercontent.com/KIZI/sparqlab/33a80b13c0fa0eb9aa0edb294ad0510d2cf52abc/src/clj/sparqlab/cookies.clj | clojure | (ns sparqlab.cookies
(:require [clojure.string :as string]))
(def a-year
"One year in seconds"
(* 60 60 24 365))
(def cookie-ns
"sparqlab-exercise-")
(defn set-cookie
[response k value & {:as data}]
(assoc-in response
[:cookies k]
(merge {:max-age a-year
:path ... | |
5adcda006c95153a511893cc29a0e8d46943867a27738e9a60130074c2317252 | dtenny/cl-sse | server.lisp | ;;;;
Support for sending SSE events .
;;;;
Realistically , if you are familar with SSE protocols you might just do
;;;; `(format out "event: my-event~%data: my-event-data~%~%")`
;;;; and be done with it. However if you are not familiar with the spec and if your data
;;;; is a bit more complicated, then `send-event... | null | https://raw.githubusercontent.com/dtenny/cl-sse/e24b3fc47f48b6d53802e707d55b0292c61474f8/server.lisp | lisp |
`(format out "event: my-event~%data: my-event-data~%~%")`
and be done with it. However if you are not familiar with the spec and if your data
is a bit more complicated, then `send-event!` will arrange to send the inputs
with the correct structure.
The stream must be packaged in a `text/event-stream` Content-Ty... | Support for sending SSE events .
Realistically , if you are familar with SSE protocols you might just do
You must have a UTF-8 output stream .
(defpackage :sse-server
(:use :cl)
(:export :send-comment!
:send-event!)
(:documentation
"Functions to send SSE event data to a stream.
`send-event!`... |
609b8751173889770a57d4517c2f922eba93ee1e7aaf9a02663160e1ef31ca75 | emqx/emqx | emqx_stomp_channel.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 copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 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(emqx_stomp_channel).
-behaviour(emqx_gateway_channel).
-include("src/stomp/include/emq... |
5c3289cc6477b8b545d9b05e4019e06be3cc43b089af1dfaffb5bf5d5618bd63 | msakai/data-interval | Internal.hs | # OPTIONS_GHC -Wall #
# LANGUAGE CPP , DeriveDataTypeable , LambdaCase #
{-# LANGUAGE Safe #-}
#if __GLASGOW_HASKELL__ >= 708
# LANGUAGE RoleAnnotations #
#endif
module Data.IntegerInterval.Internal
( IntegerInterval
, lowerBound
, upperBound
, (<=..<=)
, empty
) where
import Control.DeepSeq
import Data.D... | null | https://raw.githubusercontent.com/msakai/data-interval/8c7596ff71fd2055b006c3bbf8c6765b00ebeabe/src/Data/IntegerInterval/Internal.hs | haskell | # LANGUAGE Safe #
| The intervals (/i.e./ connected and convex subsets) over integers (__Z__).
| Lower endpoint (/i.e./ greatest lower bound) of the interval.
* 'lowerBound' of the empty interval is 'PosInf'.
| Upper endpoint (/i.e./ least upper bound) of the interval.
* 'upperBound' of a right unbounded int... | # OPTIONS_GHC -Wall #
# LANGUAGE CPP , DeriveDataTypeable , LambdaCase #
#if __GLASGOW_HASKELL__ >= 708
# LANGUAGE RoleAnnotations #
#endif
module Data.IntegerInterval.Internal
( IntegerInterval
, lowerBound
, upperBound
, (<=..<=)
, empty
) where
import Control.DeepSeq
import Data.Data
import Data.Extend... |
fbea8f9ea0bb511ba867125f3a3a6802023945d7f59f9e837ff7c27c8665b4e9 | mmcgrana/fleetdb | test_util.clj | (ns fleetdb.test-util
(:use (clj-unit core)))
(defn assert-set= [expected actual]
(let [expected-set (set expected)
actual-set (set actual)]
(assert-truth (= expected-set actual-set)
(format "Expected set %s but got %s." expected-set actual-set))))
| null | https://raw.githubusercontent.com/mmcgrana/fleetdb/563e3ccb9aa436eb88bea1bff4aa010db5838819/test/fleetdb/test_util.clj | clojure | (ns fleetdb.test-util
(:use (clj-unit core)))
(defn assert-set= [expected actual]
(let [expected-set (set expected)
actual-set (set actual)]
(assert-truth (= expected-set actual-set)
(format "Expected set %s but got %s." expected-set actual-set))))
| |
ac13e6a0a052754bc62ff5e48138a6f4d06eb1b2468a2220b2bdffa7cf830059 | homebaseio/datalog-console | client.cljs | (ns datalog-console.client
{:no-doc true}
(:require [reagent.dom :as rdom]
[reagent.core :as r]
[datalog-console.components.schema :as c.schema]
[datalog-console.components.entity :as c.entity]
[datalog-console.components.entities :as c.entities]
[datalog-... | null | https://raw.githubusercontent.com/homebaseio/datalog-console/64bc87e42285ed8e33ac9c9df5c8501796986260/src/main/datalog_console/client.cljs | clojure | (ns datalog-console.client
{:no-doc true}
(:require [reagent.dom :as rdom]
[reagent.core :as r]
[datalog-console.components.schema :as c.schema]
[datalog-console.components.entity :as c.entity]
[datalog-console.components.entities :as c.entities]
[datalog-... | |
9533f499af5aaa3bf0bb502f6811cc9ccf9035f11b974376e6ab43a1705b846f | kit-ty-kate/spdx_licenses | exceptionIDs.ml | (* This file was generated. See dune file. *)
let list = [
"389-exception";
"Autoconf-exception-2.0";
"Autoconf-exception-3.0";
"Bison-exception-2.2";
"Bootloader-exception";
"CLISP-exception-2.0";
"Classpath-exception-2.0";
"DigiRule-FOSS-exception";
"FLTK-exception";
"Fawkes-Runtime-exception";
... | null | https://raw.githubusercontent.com/kit-ty-kate/spdx_licenses/e6842777957c5a55d027b00b21a9d455b9aeae59/src/exceptionIDs.ml | ocaml | This file was generated. See dune file. |
let list = [
"389-exception";
"Autoconf-exception-2.0";
"Autoconf-exception-3.0";
"Bison-exception-2.2";
"Bootloader-exception";
"CLISP-exception-2.0";
"Classpath-exception-2.0";
"DigiRule-FOSS-exception";
"FLTK-exception";
"Fawkes-Runtime-exception";
"Font-exception-2.0";
"GCC-exception-2.0";
... |
3daabba78c8927afbd1dff70ee5c8934042423d2c44eb1839f6f22cb4b1d3220 | Mallku2/lua-redex-model | statsObjStoreTests.rkt | #lang racket
(require redex
"../grammar.rkt"
"../Relations/statsObjStore.rkt")
(define (stats-obj-store-test-suite)
; Table assignment
; Normal assignment
(test-->> stats-obj-store
(term ((((objr 1) ((\{ (\[ 1 \] = 5)
(\[ 2 \] = 6)
... | null | https://raw.githubusercontent.com/Mallku2/lua-redex-model/13a1b8cacbdc72a1b5cb1a1f140f21cc974d71c3/Tests/statsObjStoreTests.rkt | racket | Table assignment
Normal assignment
Trying to index with key nil
E-AlertFieldAssignOverNonTable | #lang racket
(require redex
"../grammar.rkt"
"../Relations/statsObjStore.rkt")
(define (stats-obj-store-test-suite)
(test-->> stats-obj-store
(term ((((objr 1) ((\{ (\[ 1 \] = 5)
(\[ 2 \] = 6)
(\[ 3 \] = 7)
... |
d2c8f185ff78e8283457f09a931d8c350c88d377a1baefc6f1314878dc7015ad | facebook/pyre-check | attributeResolutionTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/8b7feecbcc46939f580c5299233874047cd34a14/source/analysis/test/attributeResolutionTest.ml | ocaml | TODO(T107236583): We should raise an error about the extra `*args`.
TODO(T107236583): We should raise an error about the extra `*args`.
We collect multiple starred arguments under the same `*args` parameter.
TODO(T107236583): We fail to complain about extra `*args`.
TODO(T107236583): We fail to complain about ... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
ac33f898bec674f631063a40c9cee5c38515a65a3b44a9152dc8cba3b9fef007 | Opetushallitus/ataru | clean_old_forms.clj | (ns ataru.virkailija.background-jobs.ataru.virkailija.background-jobs.clean-old-forms)
| null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/clj/ataru/virkailija/background_jobs/ataru/virkailija/background_jobs/clean_old_forms.clj | clojure | (ns ataru.virkailija.background-jobs.ataru.virkailija.background-jobs.clean-old-forms)
| |
bc887042ffeb8823e3ca2034d013ff2438beeaddd6059848f52f86ed520f5312 | UU-ComputerScience/uhc | Minimal2.hs | {- ----------------------------------------------------------------------------------------
-- what : minimal program, with type sig for main
-- expected: all ok
---------------------------------------------------------------------------------------- -}
module Main where
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/Minimal2.hs | haskell | ----------------------------------------------------------------------------------------
-- what : minimal program, with type sig for main
-- expected: all ok
---------------------------------------------------------------------------------------- |
module Main where
main :: IO ()
main = return ()
|
3bafac3e14359a225cbeceb233c5c82ff33a38d9489c8fc0520261400737d214 | reborg/clojure-essential-reference | 8.clj | (require '[criterium.core :refer [quick-bench]])
< 1 >
(loop [v v
res 0.
idx (dec (count v))]
(if (< idx 0)
(Math/sqrt res)
(recur (subvec v 0 idx)
(+ res (Math/pow (peek v) 2))
(dec idx)))))
(let [v (vec (range 1000))]
(quick-bench (norm v)))
Execut... | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Vectors/subvec/8.clj | clojure | < 2 >
<3>
< 4 > | (require '[criterium.core :refer [quick-bench]])
< 1 >
(loop [v v
res 0.
idx (dec (count v))]
(if (< idx 0)
(Math/sqrt res)
(recur (subvec v 0 idx)
(+ res (Math/pow (peek v) 2))
(dec idx)))))
(let [v (vec (range 1000))]
(quick-bench (norm v)))
(loop... |
18299187b505f9b6cd2b79f43aeae7bae924c2d630d2ddf24f089ec2e214709e | fulcrologic/fulcro-rad-kvstore | auto_resolvers.clj | (ns com.example.components.auto-resolvers
(:require
[com.example.model :refer [all-attributes]]
[mount.core :refer [defstate]]
[com.fulcrologic.rad.resolvers :as res]
[com.fulcrologic.rad.database-adapters.key-value.pathom :as kv-pathom]))
(defstate automatic-resolvers
:start
(vec
(concat
... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/f0046c21e386214b42d4621b33dcb3aa1058ad52/src/demo-project/com/example/components/auto_resolvers.clj | clojure | (ns com.example.components.auto-resolvers
(:require
[com.example.model :refer [all-attributes]]
[mount.core :refer [defstate]]
[com.fulcrologic.rad.resolvers :as res]
[com.fulcrologic.rad.database-adapters.key-value.pathom :as kv-pathom]))
(defstate automatic-resolvers
:start
(vec
(concat
... | |
1c084e11b57745ab115e06762d0ba788f680dbcfa84cc10cc6a2a2f87941807e | imandra-ai/ocaml-cimgui | imgui_sdl2_types_f.ml |
module Make(Types : Cstubs_structs.TYPE) = struct
open! Types
open Ctypes_static
type window = [`SDL_Window] abstract
let window : window typ =
abstract ~name:"SDL_Window" ~size:8 ~alignment:8 (* do not use directly *)
type event = [`SDL_Event] abstract
let event : event typ =
abstract ~name:"SDL... | null | https://raw.githubusercontent.com/imandra-ai/ocaml-cimgui/55c71078705099ea60d91630610f6d750fd07abb/src/sys/sdl2/imgui_sdl2_types_f.ml | ocaml | do not use directly
do not use directly |
module Make(Types : Cstubs_structs.TYPE) = struct
open! Types
open Ctypes_static
type window = [`SDL_Window] abstract
let window : window typ =
type event = [`SDL_Event] abstract
let event : event typ =
end
|
429846762b9199be4839975d093f13b5ac64c80d8d1072e3ea869003244804bf | russmatney/ralphie | config.clj | (ns ralphie.config
(:require [ralphie.sh :refer [expand]]))
TODO support some kind of configuration
(defn home-dir [] (expand "~"))
(defn project-dir [] (expand "~/russmatney/ralphie"))
(defn src-dir [] (expand "~/russmatney/ralphie/src"))
(defn local-bin-dir [] (expand "~/.local/bin"))
(defn ralphie-bin-path [... | null | https://raw.githubusercontent.com/russmatney/ralphie/bcae0d3280afc42fd07bb21a31cf0119eff60d09/src/ralphie/config.clj | clojure | (ns ralphie.config
(:require [ralphie.sh :refer [expand]]))
TODO support some kind of configuration
(defn home-dir [] (expand "~"))
(defn project-dir [] (expand "~/russmatney/ralphie"))
(defn src-dir [] (expand "~/russmatney/ralphie/src"))
(defn local-bin-dir [] (expand "~/.local/bin"))
(defn ralphie-bin-path [... | |
3bc9106812c36591bc4638beeefed3d26bbb202ed2fad537aa566ff9e6289144 | fission-codes/fission | BasicAuthData.hs | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Server.Internal.Orphanage.BasicAuthData () where
import Data.Swagger
import Servant.API
import Fission.Prelude
import Fission.Internal.Orphanage.ByteString ()
instance ToJSON BasicAuthData where
toJSON (BasicAuthData... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Internal/Orphanage/BasicAuthData.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Server.Internal.Orphanage.BasicAuthData () where
import Data.Swagger
import Servant.API
import Fission.Prelude
import Fission.Internal.Orphanage.ByteString ()
instance ToJSON BasicAuthData where
toJSON (BasicAuthData... | |
37ac0bc9587dbeb0324b186ec8f6f86651d73b94d11678d8c113e3077c69e4b7 | haskelling/aoc2020 | 17b.hs | import AOC
main = interact $ f . map (map (=='#'))
n = 6
f m = count True $ elems $ mapnbs4N n nbs80 conwayRule False [[m]]
| null | https://raw.githubusercontent.com/haskelling/aoc2020/904d67fb9c0808234dc1d879baee8dcc9bfe128e/17b.hs | haskell | import AOC
main = interact $ f . map (map (=='#'))
n = 6
f m = count True $ elems $ mapnbs4N n nbs80 conwayRule False [[m]]
| |
026c7d1e9ae3e40e7c90dd621cd65cc790b7f802a7f938b35febe82735ff71e8 | acieroid/scala-am | wc.scm | WC -- One of the and benchmarks .
(define inport #f)
(define nl #f)
(define nw #f)
(define nc #f)
(define inword #f)
(define (wcport port)
(let ((x (read-char port)))
(if (eof-object? x)
(begin
(list nl nw nc))
(begin
(set! nc (+ nc 1))
(if (char=? x #\newline... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/gambit/wc.scm | scheme | WC -- One of the and benchmarks .
(define inport #f)
(define nl #f)
(define nw #f)
(define nc #f)
(define inword #f)
(define (wcport port)
(let ((x (read-char port)))
(if (eof-object? x)
(begin
(list nl nw nc))
(begin
(set! nc (+ nc 1))
(if (char=? x #\newline... | |
fda6aaf8059b254688df29a70e6f8f9d2d2b52f64336c75acb8047460d13aa12 | amnh/PCG | TotalEdgeCost.hs | ------------------------------------------------------------------------------
-- |
-- Module : Bio.Graph.PhylogeneticDAG.TotalEdgeCost
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
--
--
------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Graph/PhylogeneticDAG/TotalEdgeCost.hs | haskell | ----------------------------------------------------------------------------
|
Module : Bio.Graph.PhylogeneticDAG.TotalEdgeCost
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# LANGUA... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE BangPatterns #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Bio.Graph.PhylogeneticDAG.TotalEdgeCost
( totalEdgeCosts
) where
import Analysis.Parsimony.Dynamic.DirectOptimization
import Bio.Character.Decor... |
e92368824eed433ef76d4e6315703c8653822a516e8ba97295c34e082e6a0db2 | mario-goulart/awful | session-page.scm | (cond-expand
(chicken-4
(use awful))
(chicken-5
(import (chicken string))
(import awful))
(else
(error "Unsupported CHICKEN version.")))
(define-session-page (main-page-path)
(lambda ()
($session-set! 'foo 'bar)
`((p ,(->string ($session 'foo)))
(p ,(link "no-session" "no-session"))))... | null | https://raw.githubusercontent.com/mario-goulart/awful/990f8c6d727f6242ae1857a12164fe6ffa2e5b7f/tests/session-page.scm | scheme | (cond-expand
(chicken-4
(use awful))
(chicken-5
(import (chicken string))
(import awful))
(else
(error "Unsupported CHICKEN version.")))
(define-session-page (main-page-path)
(lambda ()
($session-set! 'foo 'bar)
`((p ,(->string ($session 'foo)))
(p ,(link "no-session" "no-session"))))... | |
8b98542cdc5fb08b527605dcc29e47348dc904945809e6dcf8549edb7354827e | fulcrologic/fulcro-rad-kvstore | delete_middleware.clj | (ns com.example.components.delete-middleware
(:require
[com.fulcrologic.rad.database-adapters.key-value.pathom :as kv-pathom]))
(def middleware (kv-pathom/wrap-delete))
| null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/f0046c21e386214b42d4621b33dcb3aa1058ad52/src/demo-project/com/example/components/delete_middleware.clj | clojure | (ns com.example.components.delete-middleware
(:require
[com.fulcrologic.rad.database-adapters.key-value.pathom :as kv-pathom]))
(def middleware (kv-pathom/wrap-delete))
| |
c1ca5fc655cf40c22a0a4da0f5b8293866cd9af704c2c4dbf84d62c690b739eb | kjnilsson/ra-toolbox | lock_SUITE.erl | -module(lock_SUITE).
-compile(export_all).
-export([
]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
%%%===================================================================
%%% Common Test callbacks
%%%=================================================================... | null | https://raw.githubusercontent.com/kjnilsson/ra-toolbox/2ef1ea338af3e2ec2e28d0ee7c98a20e124e6059/test/lock_SUITE.erl | erlang | ===================================================================
Common Test callbacks
===================================================================
===================================================================
Test cases
===================================================================
span
spawn ... | -module(lock_SUITE).
-compile(export_all).
-export([
]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() ->
[
{group, tests}
].
all_tests() ->
[
acquire_release,
async_acquire,
async_acquire_disconnect
].
groups() ->
[
... |
a3bddcca0a722ff58961cbd267f62644fa655fe87208e858717ba39bc88047c4 | rtoy/cmucl | boot-21c.lisp | ;;;;
Boot file for changing the fasl file version numbers to 21a .
;;;;
(in-package :c)
(setf lisp::*enable-package-locked-errors* nil)
;;;
Note that BYTE - FASL - FILE - VERSION is a constant .
;;;
( Be sure to change BYTE - FASL - FILE - VERSION in
;;; compiler/byte-comp.lisp to the correct value too!)
;;;
#... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/21b/boot-21c.lisp | lisp |
compiler/byte-comp.lisp to the correct value too!)
Don't check fasl versions in the compiling Lisp because we'll
load files compiled with the new version numbers.
This is here because BYTE-FASL-FILE-VERSION is constant-folded in
OPEN-FASL-FILE. To make the new version number take effect, we
have to redef... | Boot file for changing the fasl file version numbers to 21a .
(in-package :c)
(setf lisp::*enable-package-locked-errors* nil)
Note that BYTE - FASL - FILE - VERSION is a constant .
( Be sure to change BYTE - FASL - FILE - VERSION in
#-cmu21c
(setf (symbol-value 'byte-fasl-file-version) #x21c)
#-cmu21c
(s... |
317ad42d1ee7fc8557c4e8887d46639662e657fc42f8e7bbcd0f907e58b90561 | lnostdal/SymbolicWeb | garbage_collection.clj | (in-ns 'symbolicweb.core)
(defn gc-viewport [^Ref viewport]
(let [viewport-m (ensure viewport)]
This will call the DO - LIFETIME - DEACTIVATION CBs which will disconnect the widgets from their models ( Observables ) .
(detach-lifetime (.lifetime ^WidgetBase (:root-element viewport-m)))
;; Session -/-> Vi... | null | https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/garbage_collection.clj | clojure | Session -/-> Viewport. | (in-ns 'symbolicweb.core)
(defn gc-viewport [^Ref viewport]
(let [viewport-m (ensure viewport)]
This will call the DO - LIFETIME - DEACTIVATION CBs which will disconnect the widgets from their models ( Observables ) .
(detach-lifetime (.lifetime ^WidgetBase (:root-element viewport-m)))
(alter (:viewports... |
3a76c3db181717c4d04db7f5d0e3f20f603f3ecdfabbc871b1bbcdf8f755871c | gregorias/rummikubsolver | Game.hs |
Module : Game
Description : Data and functions for describing and solving a Rummikub game .
Module : Game
Description : Data and functions for describing and solving a Rummikub game.
-}
module Game where
import Control.Applicative
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.State.Class (MonadSta... | null | https://raw.githubusercontent.com/gregorias/rummikubsolver/dc2540f8c0d05a43a65632a797398e41a8269850/src/Game.hs | haskell | | Generate all combinations without repetition of given length.
^ source list
^ size of combinations
^ possible combinations
- Game State |
Module : Game
Description : Data and functions for describing and solving a Rummikub game .
Module : Game
Description : Data and functions for describing and solving a Rummikub game.
-}
module Game where
import Control.Applicative
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.State.Class (MonadSta... |
641fd065f689d44ffb184fc61f24f88397068152667c2eaee0e7b95374502b28 | aryx/lfs | spec.ml | open Common open Commonop
(*****************************************************************************)
(* Abstraction *)
(*****************************************************************************)
type property = Prop of string
type objet = {
id: identity;
content: content;
des... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/TODO/spec.ml | ocaml | ***************************************************************************
Abstraction
***************************************************************************
mean: a |= b ?
---------------------------------------------------------------------------
************************************************************... | open Common open Commonop
type property = Prop of string
type objet = {
id: identity;
content: content;
description: property set;
}
and identity = int
and content = string
type context = {
_P_: property set;
_O_: objet set;
_L_: logic;
}
type formula =
| ... |
0992df6f4a5fd88ec30746351e5a06a0866ff83263eb2a88a644e984163348bf | facebook/pyre-check | emptyStubEnvironment.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/analysis/emptyStubEnvironment.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
1ec28cc6a118f91e53265d9e30c399f9f829fcc5e92129a27530520c816d75db | flodihn/NextGen | mnesia_char.erl | -module(mnesia_char).
-include("char.hrl").
-include_lib("stdlib/include/qlc.hrl").
-export([
init/0,
stop/0,
load/1,
save/4,
get_list/1
]).
-record(char_save, {id, account, name, obj_state}).
init() ->
mnesia:create_schema([node()]),
mnesia:start(),
mnesia:create_table(char_sav... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/CharacterServer/src/mnesia_char.erl | erlang | delete(Q) ->
F = fun() ->
mnesia:delete(Q)
end,
F = fun() -> qlc:e(Q) end,
This is same as:
SELECT id from char_save where account=Account | -module(mnesia_char).
-include("char.hrl").
-include_lib("stdlib/include/qlc.hrl").
-export([
init/0,
stop/0,
load/1,
save/4,
get_list/1
]).
-record(char_save, {id, account, name, obj_state}).
init() ->
mnesia:create_schema([node()]),
mnesia:start(),
mnesia:create_table(char_sav... |
0cf310dac004b78a348d5f9e33612c62ebd5ff847cc3de1aa8970cf69c5139fa | erlang/otp | ssh_cli.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2005 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/ssh/src/ssh_cli.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2005 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
over SSH
-module(ssh_cli).
-behaviour(ssh_server_channel).
-include("ssh.hrl").
-include("ssh_connect.hrl").
-... |
32c4ebdfab25fd4be2b57caa05e297ed8dd99a70f44db020f2a8b5e509bf5a37 | g-andrade/maestro | maestro.erl | % vim: set expandtab softtabstop=2 shiftwidth=4:
-module(maestro).
-export([pick_pool/1,
checkout/1, checkout/2, checkout/3,
transaction/2, transaction/3,
start/1, start/2,
start_link/1, start_link/2,
child_spec/3,
stop/1, status/1,
pool_checkout/1, pool_ch... | null | https://raw.githubusercontent.com/g-andrade/maestro/9427b436d25259739c28e3023b0def18ad90246e/src/maestro.erl | erlang | vim: set expandtab softtabstop=2 shiftwidth=4:
poolboy-inspired interface.
@doc Pick a pool and run a single function in-between a check-out and a check-in.
@doc Pick a pool and run a single function in-between a check-out and a check-in; optional check-out timeout.
"for backwards compatability, pass the pool... | -module(maestro).
-export([pick_pool/1,
checkout/1, checkout/2, checkout/3,
transaction/2, transaction/3,
start/1, start/2,
start_link/1, start_link/2,
child_spec/3,
stop/1, status/1,
pool_checkout/1, pool_checkout/2, pool_checkout/3,
pool_checkin/... |
427fe54701297ac593cecca2190abb71492d48d6e6c88de7fa7a3e2f3a313a87 | susanemcg/pandoc-tufteLaTeX2GitBook | HTML.hs | # LANGUAGE OverloadedStrings , CPP #
# OPTIONS_GHC -fno - warn - deprecations #
Copyright ( C ) 2006 - 2014 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the Li... | null | https://raw.githubusercontent.com/susanemcg/pandoc-tufteLaTeX2GitBook/00c34b4299dd89c4e339e1cde006061918b559ab/pandoc-1.12.4.2/src/Text/Pandoc/Writers/HTML.hs | haskell | ^ List of notes
^ Math is used in document
^ <q> tag is used
^ Syntax highlighting is used
^ Number of current section
Helpers to render HTML with the appropriate function.
| Hard linebreak.
| Convert Pandoc document to Html string.
| Convert Pandoc document to Html structure.
result is (title, authors, date,... | # LANGUAGE OverloadedStrings , CPP #
# OPTIONS_GHC -fno - warn - deprecations #
Copyright ( C ) 2006 - 2014 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the Li... |
33f1a85b73ec7a17b51d26f4f04bc2738cf60f68f9b115304bc1473c538f8c7f | chaoxu/fancy-walks | A.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Dat... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%202011/Qualification%20Round/A.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS... |
b269caab67084e355dc4517bf07c61753f572078a8f734e631494fa1975507f2 | xapi-project/xcp-rrdd | rrdd_plugin.ml |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/lib/plugin/rrdd_plugin.ml | ocaml |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | |
3e519deff6182eb4b95c5062bc9a4b7b7e4d21e2e66fd593013bd5a6a2cbe0e7 | joedevivo/chatterbox | h2_frame_headers.erl | -module(h2_frame_headers).
-include("http2.hrl").
-behaviour(h2_frame).
-export(
[
format/1,
from_frames/1,
new/1,
new/2,
read_binary/2,
to_frames/5,
to_binary/1
]).
-record(headers,
{
priority = undefined :: h2_frame_priority:payload() | undefined,
block_f... | null | https://raw.githubusercontent.com/joedevivo/chatterbox/560f2c71a151716512781f0f6196a8a9ff678852/src/h2_frame_headers.erl | erlang | Break HeadersBin into chunks
Now build frames.
?FLAG_END_HEADERS needs to be set on the last. | -module(h2_frame_headers).
-include("http2.hrl").
-behaviour(h2_frame).
-export(
[
format/1,
from_frames/1,
new/1,
new/2,
read_binary/2,
to_frames/5,
to_binary/1
]).
-record(headers,
{
priority = undefined :: h2_frame_priority:payload() | undefined,
block_f... |
81da96d50c35df1dd04bc8c6f529fe16f3c5107caf49de3608a1e9818551df25 | htm-community/sanity | runner.clj | (ns org.numenta.sanity.comportex.runner
(:require [clojure.core.async :as async :refer [put! <! go go-loop close!]]
[compojure.route :as route]
[org.numenta.sanity.bridge.marshalling :as marshal]
[org.numenta.sanity.comportex.simulation :as simulation]
[org.numenta.sani... | null | https://raw.githubusercontent.com/htm-community/sanity/0eae8a9a1fe732d761f6dd0cff3dba8b24ac5231/src/org/numenta/sanity/comportex/runner.clj | clojure | (ns org.numenta.sanity.comportex.runner
(:require [clojure.core.async :as async :refer [put! <! go go-loop close!]]
[compojure.route :as route]
[org.numenta.sanity.bridge.marshalling :as marshal]
[org.numenta.sanity.comportex.simulation :as simulation]
[org.numenta.sani... | |
8c7f26d914e2f6eb6abfd581b07f9733b9ed689d433b954e1a3e8fa4f014fdfd | p2k/ecoinpool | ecoinpool_coinbaser.erl |
%%
Copyright ( C ) 2011 Patrick " p2k " < >
%%
%% This file is part of ecoinpool.
%%
%% ecoinpool is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option... | null | https://raw.githubusercontent.com/p2k/ecoinpool/01ba76a7ab4b17b60cb0c525786fddef43ea80e1/apps/ecoinpool/src/ecoinpool_coinbaser.erl | erlang |
This file is part of ecoinpool.
ecoinpool is free software: you can redistribute it and/or modify
(at your option) any later version.
ecoinpool 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.... |
Copyright ( C ) 2011 Patrick " p2k " < >
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
-module(ecoinpool_coinbaser).
-include("../ebitcoin/include/b... |
0ea46a300ac4e2935d581d63cd0380b8c2bd28bed7bd7d66a4ad0fe57c0b70d5 | ninenines/cowboy | examples_SUITE.erl | Copyright ( c ) 2016 - 2017 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/ninenines/cowboy/30ee75cea14c1fd63a46093cfb2bb9ad3f844f75/test/examples_SUITE.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2016 - 2017 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(examples_SUITE).
-compile(export_all).
-compi... |
b337978ad1da0996dd2f9599d59fa4f1a96f7bb6ee2e2eb3c5c848af7c7ee1d7 | sol/interpolate | Compat.hs | # LANGUAGE CPP #
module Data.String.Interpolate.Compat (
readMaybe
) where
import Text.Read
#if !MIN_VERSION_base(4,6,0)
import qualified Text.ParserCombinators.ReadP as P
#endif
#if !MIN_VERSION_base(4,6,0)
-- | Parse a string using the 'Read' instance.
Succeeds if there is exactly one valid result .
... | null | https://raw.githubusercontent.com/sol/interpolate/a31cd1322665b10a6d901d6d70dd7bc35b71035d/src/Data/String/Interpolate/Compat.hs | haskell | | Parse a string using the 'Read' instance.
A 'Left' value indicates a parse error.
| Parse a string using the 'Read' instance. | # LANGUAGE CPP #
module Data.String.Interpolate.Compat (
readMaybe
) where
import Text.Read
#if !MIN_VERSION_base(4,6,0)
import qualified Text.ParserCombinators.ReadP as P
#endif
#if !MIN_VERSION_base(4,6,0)
Succeeds if there is exactly one valid result .
readEither :: Read a => String -> Either String... |
547b52299c756163487b62ec7c6a303220a80c73c0a7fa01fdf9ae5f76410081 | clj-kondo/clj-kondo | unused_namespace_test.clj | (ns clj-kondo.unused-namespace-test
(:require
[clj-kondo.core :as clj-kondo]
[clj-kondo.test-utils :refer [lint! assert-submaps assert-submap]]
[clojure.java.io :as io]
[clojure.test :as t :refer [deftest is testing]]))
(deftest unused-namespace-test
(testing "return ns and refer info"
(assert-subm... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/8a1150bf8a3ab95f4d21669930749b5b4511e943/test/clj_kondo/unused_namespace_test.clj | clojure | (ns clj-kondo.unused-namespace-test
(:require
[clj-kondo.core :as clj-kondo]
[clj-kondo.test-utils :refer [lint! assert-submaps assert-submap]]
[clojure.java.io :as io]
[clojure.test :as t :refer [deftest is testing]]))
(deftest unused-namespace-test
(testing "return ns and refer info"
(assert-subm... | |
0363578788d107072bc886278f4b489b45f86d49507a901a0fb6c17833ed4121 | mathematical-systems/clml | dlaset.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlaset.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
85421ea5113f394832a5161dbeb199ad9c64efba3d1dbb1bb5a733b5a1c6f81f | chef/chef-server | chef_wm_darklaunch.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
Copyright 2012 - 2014 Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/chef_wm_darklaunch.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
| -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright 2012 - 2014 Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the ... |
6f5889810615fa14efef1ea480eb6275db5f09818bdcfc6475720b5f91253a5c | bennn/little-book-of-semaphores | 3-8-fifo.rkt | #lang little-book-of-semaphores
(provide fifo%)
(define fifo%
(class object%
(super-new)
(field
[mutex (make-semaphore 1)]
[Q_in '()]
[Q_out '()])
(define/public (push)
(define s (make-semaphore 0))
(with mutex
(set! Q_in (cons s Q_in)))
(wait s))
(defi... | null | https://raw.githubusercontent.com/bennn/little-book-of-semaphores/13dc1690073ae45f5ac7e4e4137d636aae1ef7c9/problems/3-8-fifo.rkt | racket | #lang little-book-of-semaphores
(provide fifo%)
(define fifo%
(class object%
(super-new)
(field
[mutex (make-semaphore 1)]
[Q_in '()]
[Q_out '()])
(define/public (push)
(define s (make-semaphore 0))
(with mutex
(set! Q_in (cons s Q_in)))
(wait s))
(defi... | |
c621360e8b50abc33c66df1d9d4648d2858cd4210660276e44b26c908b764f1e | jasonrudolph/one-rep-max | templates.clj | (ns one.templates
"Contains functions for combining HTML fragments into complete HTML documents."
(:use net.cgrand.enlive-html)
(:import java.io.File))
(defn render
"Given a seq of Enlive nodes, return the corresponding HTML string."
[t]
(apply str (emit* t)))
(declare construct-html)
(defn- html-body [n... | null | https://raw.githubusercontent.com/jasonrudolph/one-rep-max/8bdc8eccd4f36cf91b0dd57b0a378efb1b24f7a3/src/lib/clj/one/templates.clj | clojure | (ns one.templates
"Contains functions for combining HTML fragments into complete HTML documents."
(:use net.cgrand.enlive-html)
(:import java.io.File))
(defn render
"Given a seq of Enlive nodes, return the corresponding HTML string."
[t]
(apply str (emit* t)))
(declare construct-html)
(defn- html-body [n... | |
7e0cf776c3b866224b7474089db7df029b4a2bc079736b8dd2103500d10949eb | pirapira/coq2rust | topconstr.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/interp/topconstr.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Utilities on constr_expr
* Specif... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Loc
open Names
open Cons... |
86b8a6e2a8a3fae79f300ccc22aeaa3fd534cd78f7bd7177f6c2a775849265a0 | pyr/warp | pipeline.clj | (ns warp.pipeline
(:import java.util.concurrent.TimeUnit
java.nio.ByteOrder
io.netty.handler.timeout.ReadTimeoutHandler
io.netty.handler.codec.LengthFieldBasedFrameDecoder
io.netty.handler.codec.LengthFieldPrepender))
(defn read-timeout
[timeout]
(ReadTimeoutHandler. (... | null | https://raw.githubusercontent.com/pyr/warp/c3ee96d90b233a47c1104b4339fed071ec8afe68/src/warp/pipeline.clj | clojure | (ns warp.pipeline
(:import java.util.concurrent.TimeUnit
java.nio.ByteOrder
io.netty.handler.timeout.ReadTimeoutHandler
io.netty.handler.codec.LengthFieldBasedFrameDecoder
io.netty.handler.codec.LengthFieldPrepender))
(defn read-timeout
[timeout]
(ReadTimeoutHandler. (... | |
39fcb14d97d37ef5e22de848409fb3ffcb5f5545da55e211f88ed811fd190b3d | craigl64/clim-ccl | region-arithmetic.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - UTILS ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-utils)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved . "
;;; General region union
(defclas... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/utils/region-arithmetic.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - UTILS ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
General region union
Take the region of maximum dimensionality
General region intersection
Take the region of minumum dimensionality
this looks fishy to me-- wh... |
(in-package :clim-utils)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved . "
(defclass standard-region-union (region-set area)
((regions :type list :initarg :regions)))
(define-constructor make-region-union-1 standard-region-union (regions)
:regions regions)
(defun make-region-un... |
d61d2abef65e83cba20b532483c56a7a096b56c795a5483c5e46c15e3b8ba6be | well-typed-lightbulbs/ocaml-esp32 | variables.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/ocamltest/variables.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Paris
Copyright 2016 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type value = string
type exporter = value -> string
type t = {
variable_name : string;
variable_descript... |
e7d60667b222ce3234c61e275ee186f41ce92fce63bae4e218e7a635409f8d71 | tsloughter/grpcbox | grpcbox_sup.erl | %%%-------------------------------------------------------------------
%% @doc grpcbox top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(grpcbox_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-include("grpcbox.hrl").
-define(SERV... | null | https://raw.githubusercontent.com/tsloughter/grpcbox/49d9275b2bb264e3ecd4c3adee5cf0c03972d496/src/grpcbox_sup.erl | erlang | -------------------------------------------------------------------
@doc grpcbox top level supervisor.
@end
------------------------------------------------------------------- |
-module(grpcbox_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-include("grpcbox.hrl").
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init(_Args) ->
SupFlags = #{strategy => one_for_one,
intensity => 5,
... |
451eca5b58cd21db498aea755d6bfd6244044b6361e5d0b9205e2fa7dabf2eef | hopbit/sonic-pi-snippets | dp_fac_9.sps | # key: dp fac 9
# point_line: 0
# point_index: 0
# --
# DP FAC 8 Let's try to create factories that produces beats with different tempo styles
set_volume! 1
arg = ['Impeach The President', 'moderato']
# arg = ['Funky Drummer','allegro']
# arg = ['Big Beat','presto']
# arg = ['House Beat','moderato']
tempo_factory = S... | null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/temp/dp_fac_9.sps | scheme | # key: dp fac 9
# point_line: 0
# point_index: 0
# --
# DP FAC 8 Let's try to create factories that produces beats with different tempo styles
set_volume! 1
arg = ['Impeach The President', 'moderato']
# arg = ['Funky Drummer','allegro']
# arg = ['Big Beat','presto']
# arg = ['House Beat','moderato']
tempo_factory = S... | |
6db7f727f4ddc0b3f5c1353b0d8a7c8f451a3532966e3f487a5db7f36787d265 | aria42/flare | generic_tensor_ops.clj | (ns flare.generic-tensor-ops
(:require [flare.computation-graph :as cg]
[flare.core :as flare]))
(defrecord ScaleTensorOp []
cg/TensorOp
(ensure-valid?! [this nodes])
(forward-node-pass! [this node]
(let [child-val (-> node :children first :value)
scale (-> node :graph-op :scalar)]
... | null | https://raw.githubusercontent.com/aria42/flare/9c7d90bf7bd876a154e705dd78645eb5c69ae590/src/flare/generic_tensor_ops.clj | clojure | (ns flare.generic-tensor-ops
(:require [flare.computation-graph :as cg]
[flare.core :as flare]))
(defrecord ScaleTensorOp []
cg/TensorOp
(ensure-valid?! [this nodes])
(forward-node-pass! [this node]
(let [child-val (-> node :children first :value)
scale (-> node :graph-op :scalar)]
... | |
af01911c3639cbaa1ee1f249172e5c4e3124d1356ae23574a4eb6a5e00b703ac | GNOME/gimp-tiny-fu | listhome.scm | ; listhome.scm
Sample usage of TinyScheme Extension
; This simple program lists the directory entries on the
; user's home directory.
It uses the following TinyScheme Extension functions :
; Used to get HOME environment variable.
; open-dir-stream
; Used to open directory stream.
; read-dir-e... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/7cd1263e50d5553706fe7e34309d6b8f40c89ab2/ftx/listhome.scm | scheme | listhome.scm
This simple program lists the directory entries on the
user's home directory.
Used to get HOME environment variable.
open-dir-stream
Used to open directory stream.
read-dir-entry
Used to read directory entries.
close-dir-entry
Used at the end, to close directory strea... | Sample usage of TinyScheme Extension
It uses the following TinyScheme Extension functions :
(if (not (defined? 'load-extension))
(begin
(display "TinyScheme has extensions disabled. Enable them!!")
(newline)
(quit)))
load TinyScheme extension
(load-extension "tsx-1.1/tsx")
(if (or
... |
6302534e0046bb97d77f92282dd295840400fefd1ae7fcc896cb498bfd407916 | seizans/happiage | Invitation.hs | module Handler.Invitation where
import Import
import Data.Map (Map, (!))
-- InvitationPage(開催案内ページ)
getInvitationR :: Handler RepHtml
getInvitationR = do
msgs <- getMessages
usersMap <- getUsersMap
let messages = map (mkUsrAndMsg usersMap) msgs
defaultLayout $
$(widgetFile "invitation")
getMe... | null | https://raw.githubusercontent.com/seizans/happiage/38843c2a8fe3306e4a8e7d85899434c6ed4210d7/src/Handler/Invitation.hs | haskell | InvitationPage(開催案内ページ) | module Handler.Invitation where
import Import
import Data.Map (Map, (!))
getInvitationR :: Handler RepHtml
getInvitationR = do
msgs <- getMessages
usersMap <- getUsersMap
let messages = map (mkUsrAndMsg usersMap) msgs
defaultLayout $
$(widgetFile "invitation")
getMessages :: Handler [(Message... |
62cba023fa47e29e25e3757b52bcecd3c3ee7eef10c8355e39d0a89b2bfd590d | nextjournal/clerk | eval_test.clj | (ns nextjournal.clerk.eval-test
(:require [clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[matcher-combinators.test :refer [match?]]
[nextjournal.clerk :as clerk]
[nextjournal.clerk.eval :as eval]
[nextjournal.clerk.parser :as parser]
... | null | https://raw.githubusercontent.com/nextjournal/clerk/c5505f15ee8bb40a967a6a01124cdd5824f8920d/test/nextjournal/clerk/eval_test.clj | clojure | ensure "some-var" is a variable in whatever namespace we're running in | (ns nextjournal.clerk.eval-test
(:require [clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[matcher-combinators.test :refer [match?]]
[nextjournal.clerk :as clerk]
[nextjournal.clerk.eval :as eval]
[nextjournal.clerk.parser :as parser]
... |
af5293bfae65c262de8617fecb6505583795deadd4cebf83930348c952496caf | orbitz/ocaml-protobuf | varint.mli | open Core.Std
type t = Int64.t
type error = [ `Incomplete | `Overflow ]
val of_bitstring : Bitstring.bitstring -> ((t * Bitstring.bitstring), [> error ]) Result.t
val to_bitstring : t -> Bitstring.bitstring
val of_string : string -> ((t * Bitstring.bitstring), [> error ]) Result.t
val to_string : t -> string
| null | https://raw.githubusercontent.com/orbitz/ocaml-protobuf/66228bbde1aba144b5b6b4b016df0d48e8092744/lib/protobuf/varint.mli | ocaml | open Core.Std
type t = Int64.t
type error = [ `Incomplete | `Overflow ]
val of_bitstring : Bitstring.bitstring -> ((t * Bitstring.bitstring), [> error ]) Result.t
val to_bitstring : t -> Bitstring.bitstring
val of_string : string -> ((t * Bitstring.bitstring), [> error ]) Result.t
val to_string : t -> string
| |
44e44f1dc6f78f6cc2143c2ace1ee2ed0aab33a0e0ff3901b7ae1aa38e15fbc7 | pqwy/ocb-stubblr | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "ocb-stubblr" @@ fun c ->
Ok [ Pkg.mllib "src/ocb-stubblr.mllib";
Pkg.mllib "src-topkg/ocb-stubblr-topkg.mllib";
]
| null | https://raw.githubusercontent.com/pqwy/ocb-stubblr/34dcbede6b51327172a0a3d83ebba02843aca249/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "ocb-stubblr" @@ fun c ->
Ok [ Pkg.mllib "src/ocb-stubblr.mllib";
Pkg.mllib "src-topkg/ocb-stubblr-topkg.mllib";
]
| |
e964d8d402370aaa8b124a78624ba24137571f671b417e42aa855dacb3586e22 | S8A/htdp-exercises | ex372.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex372) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex372.rkt | racket | about the language level of this file in a form that our tools can easily process.
.: Data definitions :.
An Xexpr is a list:
– (cons Symbol (cons [List-of Attribute] Body))
where Body is short for [List-of Xexpr]
(cons Symbol (cons String '()))
An XEnum.v1 is one of:
– (cons 'ul [List-of XItem.v1])
– (cons... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex372) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.rkt" "teachpac... |
6730e377171412c5c1f771bd7fb7154e095659df29f30b073125b69970869bd5 | awakesecurity/grpc-mqtt | Session.hs | # LANGUAGE BlockArguments #
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecursiveDo #
# LANGUAGE StandaloneKindSignatures #
-- |
-- Module : Network.GRPC.MQTT.RemoteClient.Session
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see CO... | null | https://raw.githubusercontent.com/awakesecurity/grpc-mqtt/b562fae201c1a030841601efd6d0809f518ac8d2/src/Network/GRPC/MQTT/RemoteClient/Session.hs | haskell | |
Module : Network.GRPC.MQTT.RemoteClient.Session
Stability : stable
@since 1.0.0
* Session
** Logging
** Service Methods
** Topics
** Filters
* Session Handles
** Session Watchdog
* Session Config
* Session Topics
** Topics
----------------------------------------------------------------------... | # LANGUAGE BlockArguments #
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecursiveDo #
# LANGUAGE StandaloneKindSignatures #
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
Portability : non - portable ( GHC extensions )
modu... |
73cb8c236e6c7769c22296eac9638d0f0b612377df12ba4ddfc36d3e0e64242b | racket/games | snipclass.rkt | #lang racket/base
(require racket/gui/base
racket/class)
(provide sc)
(define sc (make-object snip-class%))
(send sc set-classname "card")
(send (get-the-snip-class-list) add sc)
| null | https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/cards/snipclass.rkt | racket | #lang racket/base
(require racket/gui/base
racket/class)
(provide sc)
(define sc (make-object snip-class%))
(send sc set-classname "card")
(send (get-the-snip-class-list) add sc)
| |
4f4fb2da6eb07aa1a317360c238def7093e02af7d64d09c885ac4fff6cbda78b | learnuidev/grok | decks.clj | (ns grok.db.decks
(:require
[datomic.api :as d]
[clojure.spec.alpha :as s]
[clojure.test.check.generators :as gen]
[grok.db.core :refer [conn]]))
Deck Spec
(s/def :deck/id uuid?)
(s/def :deck/title (s/and string? #(seq %)))
(s/def :deck/tags (s/coll-of string? :kind vector? :min-count 1))
(s/def ::de... | null | https://raw.githubusercontent.com/learnuidev/grok/533bcdf2a27fe85e48a5cd477f71cbb5d1799034/src/grok/db/decks.clj | clojure | - Read
passing . after find caluse returns a single item
small typo
- Create
- Update
- Delete | (ns grok.db.decks
(:require
[datomic.api :as d]
[clojure.spec.alpha :as s]
[clojure.test.check.generators :as gen]
[grok.db.core :refer [conn]]))
Deck Spec
(s/def :deck/id uuid?)
(s/def :deck/title (s/and string? #(seq %)))
(s/def :deck/tags (s/coll-of string? :kind vector? :min-count 1))
(s/def ::de... |
a26f20b6800f48a33b64131555779ff3d0adc65ba3bde37651a4ddb2a16bf89c | jmglov/blambda | api.clj | (ns blambda.api
(:require [babashka.deps :refer [clojure]]
[babashka.http-client :as http]
[babashka.fs :as fs]
[babashka.process :refer [shell]]
[blambda.internal :as lib]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.strin... | null | https://raw.githubusercontent.com/jmglov/blambda/5a81ec9d81dcb68b49ffc0efcf4ffc57178043c2/src/blambda/api.clj | clojure | (ns blambda.api
(:require [babashka.deps :refer [clojure]]
[babashka.http-client :as http]
[babashka.fs :as fs]
[babashka.process :refer [shell]]
[blambda.internal :as lib]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.strin... | |
67e9316115c4bb69e14caeaa08bbb33ea0254b4d8fe866db3bcdddc9e17f0ef2 | MarcFontaine/stm32hs | ADC.hs | ----------------------------------------------------------------------------
-- |
-- Module : App.ADC
Copyright : ( c ) 2017
-- License : BSD3
--
Maintainer :
-- Stability : experimental
Portability : GHC - only
--
-- This module shows an example for using the analog digital converter... | null | https://raw.githubusercontent.com/MarcFontaine/stm32hs/d7afeb8f9d83e01c76003f4b199b45044bd4e383/STM32-Zombie/src/App/ADC.hs | haskell | --------------------------------------------------------------------------
|
Module : App.ADC
License : BSD3
Stability : experimental
This module shows an example for using the analog digital converter.
This example turns the STM32 into a small digital storage oscilloscope.
this is buggy the cha... | Copyright : ( c ) 2017
Maintainer :
Portability : GHC - only
The ADC of the STM32 works best in combination with DMA transfers .
Thanks to DMA transfers , one can sample with precise timings
and sampling rate is not limited by the speed of the code .
module App.ADC
where
import Control.Monad... |
558261d5b89f30ce7a4d6df7def0812d0e963afad7551c49e1c9a93826b5cc62 | hazel-el/hazel | Normalize.hs | |
Module : . Normalize
Description : Normalization of TBoxes as preprocessing for completion algorithm
License : GPL-3
Stability : experimental
Portability : unknown
normalization for EL
Module : Hazel.Normalize
Description : Normalization of TBoxes as preprocessing for... | null | https://raw.githubusercontent.com/hazel-el/hazel/0f5d7e0c03d5eebd16f103df8cc05c5408c152f1/Hazel/Normalize.hs | haskell | Rule NF2 in Pushing the EL Envelope
Rule NF2 with the order of conjuncts flipped
Rule NF3
Rule NF5
Rule NF7
remove tautologies
the resulting TBoxes
| |
Module : . Normalize
Description : Normalization of TBoxes as preprocessing for completion algorithm
License : GPL-3
Stability : experimental
Portability : unknown
normalization for EL
Module : Hazel.Normalize
Description : Normalization of TBoxes as preprocessing for... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.