_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 |
|---|---|---|---|---|---|---|---|---|
079f39c9550fb32b2d3d692e4c34487d1d7589b384ac037ff19b06a67e4cabdd | SamB/coq | extraargs.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/tactics/extraargs.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
Spiwack: Primitive for ret... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Tacexpr
open Term
ope... |
b587cff46e9b788daadd193f57b00ba2ba454a46f0f3db158f7a85bf48ce22e3 | Helium4Haskell/helium | TypesToAlignedDocs.hs | {-| Module : TypesToAlignedDocs
License : GPL
Maintainer :
Stability : experimental
Portability : portable
Functions to align and show types.
-}
module Helium.StaticAnalysis.Miscellaneous.TypesToAlignedDocs (qualifiedTypesToAlignedDocs, typesToAlignedDocs) where
import Data... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/src/Helium/StaticAnalysis/Miscellaneous/TypesToAlignedDocs.hs | haskell | | Module : TypesToAlignedDocs
License : GPL
Maintainer :
Stability : experimental
Portability : portable
Functions to align and show types.
let [d1,d2] = typesToAlignedDocs [t1,t2]
showTwoTypes = showTwoTypesSpecial |
module Helium.StaticAnalysis.Miscellaneous.TypesToAlignedDocs (qualifiedTypesToAlignedDocs, typesToAlignedDocs) where
import Data.List ( transpose )
import Top.Types
import Text.PrettyPrint.Leijen
import qualified Text.PrettyPrint.Leijen as PPrint
qualifiedTypesToAlignedDocs :: [QType] -> [PPrint.Doc]
qualifiedT... |
d9ee258d42d280d8cd85442b835ca78b446bf1e93337580bb34ff2dea2004565 | slegrand45/mysql_protocol | mp_auth_switch_request.ml |
type auth_switch_request_packet = {
plugin_name : string;
plugin_data : Bitstring.t
}
let auth_switch_request_packet_to_string p =
Printf.sprintf "plugin_name : %s\nplugin_data : %s\n"
p.plugin_name (Bitstring.string_of_bitstring p.plugin_data)
let auth_switch_request_packet_bits_without_0xFE_prefix bits =... | null | https://raw.githubusercontent.com/slegrand45/mysql_protocol/eb28d33dfbee7b12f88a7f798c2dbb40e1fb1bb0/src/mp_auth_switch_request.ml | ocaml |
type auth_switch_request_packet = {
plugin_name : string;
plugin_data : Bitstring.t
}
let auth_switch_request_packet_to_string p =
Printf.sprintf "plugin_name : %s\nplugin_data : %s\n"
p.plugin_name (Bitstring.string_of_bitstring p.plugin_data)
let auth_switch_request_packet_bits_without_0xFE_prefix bits =... | |
7643b976d401a8070ea21b0a77efd25420f356577f61e36b641815ea3286560a | racket/honu | arithmetic.rkt | #lang racket/base
(require (for-syntax racket/base)
"operator.rkt")
(define-unary+binary-operator add 1 'left +)
(define-unary+binary-operator sub 1 'left -)
(define-binary-operator mult 2 'left *)
(define-binary-operator div 2 'left /)
(define-binary-operator pow 2 'right expt)
(define-binary-operator equals... | null | https://raw.githubusercontent.com/racket/honu/b36b9aeda8be22bf7fda177e831f42ac1a1de79b/honu-parse/arithmetic.rkt | racket | #lang racket/base
(require (for-syntax racket/base)
"operator.rkt")
(define-unary+binary-operator add 1 'left +)
(define-unary+binary-operator sub 1 'left -)
(define-binary-operator mult 2 'left *)
(define-binary-operator div 2 'left /)
(define-binary-operator pow 2 'right expt)
(define-binary-operator equals... | |
7c21d43a141ec14a1531f3faff3729f4516cfa18e09cbf8569a77da2458de1f5 | bobbypriambodo/ocaml-todo-api-example | db.ml | let create_pool () =
match Caqti_lwt.connect_pool ~max_size:10 (Uri.of_string Config.db_connection_url) with
| Ok pool -> pool
| Error err -> failwith (Caqti_error.show err)
| null | https://raw.githubusercontent.com/bobbypriambodo/ocaml-todo-api-example/4b2f660a96b175066fa9cf83e999c45afca2a8dc/src/db.ml | ocaml | let create_pool () =
match Caqti_lwt.connect_pool ~max_size:10 (Uri.of_string Config.db_connection_url) with
| Ok pool -> pool
| Error err -> failwith (Caqti_error.show err)
| |
9c27928a4d81ba6658958745df34827c8b4ee5f4d1f6f22e377419de613b64af | input-output-hk/cardano-sl | Unstructured.hs | -- | Unstructured logging via Pos.Util.Trace: a text message with severity
-- and privacy levels.
module Pos.Util.Trace.Unstructured
( LogItem (..)
, LogPrivacy (..)
, publicLogItem
, privateLogItem
, publicPrivateLogItem
, setupLogging
, logDebug
, logError
, logInfo
, logNo... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/src/Pos/Util/Trace/Unstructured.hs | haskell | | Unstructured logging via Pos.Util.Trace: a text message with severity
and privacy levels.
only to public logs.
only to public logs, not console.
only to private logs.
to public and private logs.
| An unstructured log item.
run at the 'SecretLogLevel'). |
module Pos.Util.Trace.Unstructured
( LogItem (..)
, LogPrivacy (..)
, publicLogItem
, privateLogItem
, publicPrivateLogItem
, setupLogging
, logDebug
, logError
, logInfo
, logNotice
, logWarning
, logDebugP
, logErrorP
, logInfoP
, logNoticeP
, logWa... |
5912722b5809191b852253fff8d42a5fe1d0bffe511482dec1234485ed461fea | cxphoe/SICP-solutions | 3.17.rkt | (define (count-pairs l)
(let ((accessed-list '()))
(define (recur l)
(if (or (not (pair? l))
(memq l accessed-list))
0
(begin (set! accessed-list (cons l accessed-list))
(+ 1
(count-pairs (car l))
(count-pairs (cdr l)... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/3.Changed%20Data/3.17.rkt | racket | (define (count-pairs l)
(let ((accessed-list '()))
(define (recur l)
(if (or (not (pair? l))
(memq l accessed-list))
0
(begin (set! accessed-list (cons l accessed-list))
(+ 1
(count-pairs (car l))
(count-pairs (cdr l)... | |
6759d3422359a2699ac7573c99966f40bbcb6b8c0be475f5465203b551337a8c | dominicfreeston/freeston-dot-me | core.clj | #!/usr/bin/env bb
Copyright ( c ) 2022
Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , merge , ... | null | https://raw.githubusercontent.com/dominicfreeston/freeston-dot-me/083a0e8720b0b752878cec0304903cc5c3c80e7b/src/freeston/core.clj | clojure | Parsing
Posts
Tags
CV
Combine it all
Rendering
| #!/usr/bin/env bb
Copyright ( c ) 2022
Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , merge , ... |
f4e4fc4b4e002431db515b06434e0d8bfbf1c4d99b79fb87db1ab49d65d8bbc2 | mir-ikbch/homtrs | homcomp.ml | open Util
open Printf
type var = int
type term = Var of var | Term of string * term list
let rec pt = function
| Var x ->
if x = -1 then
"[]"
else
string_of_int x
| Term (c, ts) ->
match ts with
| [] -> c
| _ ->
"(" ^ c ^ " " ^ with_space ts ^ ")"
and with_... | null | https://raw.githubusercontent.com/mir-ikbch/homtrs/0fd7251b54b2f809fc111ae8addff6e7dfdc7f19/homcomp.ml | ocaml | * [teq t1 t2] checks if [t1] and [t2] are alpha-equivalent
computing critical pairs | open Util
open Printf
type var = int
type term = Var of var | Term of string * term list
let rec pt = function
| Var x ->
if x = -1 then
"[]"
else
string_of_int x
| Term (c, ts) ->
match ts with
| [] -> c
| _ ->
"(" ^ c ^ " " ^ with_space ts ^ ")"
and with_... |
675d097105d93738dcdd1052be23c0d25f9726846409128e20e644391d80be9f | HunterYIboHu/htdp2-solution | ex271-map-and-or.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-reader.ss" "lang")((modname ex271-map-and-or) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor mixed-... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter3-Abstraction/Section16-Using-Abstraction/ex271-map-and-or.rkt | racket | about the language level of this file in a form that our tools can easily process.
constants
String [List-of String] -> Boolean
determine whether any of the names on the latter are equal to or
an extension of the former.
String -> Boolean
determine whether the given name is equal to or an
extension of the speci... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex271-map-and-or) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor mixed-fraction #f #t none #f () #f)))
(define lon-1 '("Andrew" "Anna" "Ange" "Bob" "Chathirl... |
7688694668990ef31e2700863751e60f17ecf102e7b86a6da3913b23f4d93b14 | dgiot/dgiot | dgiot_task_channel.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/8fc646dacc7f0cb56b27153fe29abaa3cc90d1c5/apps/dgiot_task/src/dgiot_task_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 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_task_channel).
-behavior(dgiot_channelx).
-author("jonhliu").
-include_lib("dgio... |
97ae4ec6c99339bf3a5221b9f002e40225db50c95f6815c5bb95b61c714b990f | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_joint_abnor.lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(JOINTNAME-VAL
JOINTNAME
JOINTINDEX-VAL
JOINTINDEX
ABNORSTATE-VAL
ABNORSTATE
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/_package_joint_abnor.lisp | lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(JOINTNAME-VAL
JOINTNAME
JOINTINDEX-VAL
JOINTINDEX
ABNORSTATE-VAL
ABNORSTATE
)) | |
ea059a2ff8b21da51995f315e2b60df3fd33c3c1ea1170b6597e7d11da3be1c8 | iambrj/imin | interp-Rvec-prime.rkt | #lang racket
(require "interp-Rvec.rkt")
(require "utilities.rkt")
(require (prefix-in runtime-config: "runtime-config.rkt"))
(provide interp-Rvec-prime interp-Rvec-prime-mixin interp-Rvec-prime-class)
(define (interp-Rvec-prime-mixin super-class)
(class super-class
(super-new)
;; The simulated global state... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/interp-Rvec-prime.rkt | racket | The simulated global state of the program
define produces private fields
field is like define but public
after a call to collect we must guarantee there is enough
memory to allocate the requested block of memory
I am only advancing the end of the heap because we
are not reclaiming memory
Find the last address
... | #lang racket
(require "interp-Rvec.rkt")
(require "utilities.rkt")
(require (prefix-in runtime-config: "runtime-config.rkt"))
(provide interp-Rvec-prime interp-Rvec-prime-mixin interp-Rvec-prime-class)
(define (interp-Rvec-prime-mixin super-class)
(class super-class
(super-new)
(define memory (box '()))
... |
18940df43f1db33a9fb7e35bb47e9e244387f0b6f6973f5ce42df2d4948a9c6e | ardumont/haskell-lab | ListManipulation.hs | module ListManipulation where
-- foldl :: (a -> b -> a) -> a -> [b] -> a
-- foldl :: ([[a]] -> b -> [[a]]) -> [[a]] -> [b] -> [[a]]
pack :: Eq a => [a] -> [[a]]
pack list = foldl (\ l e -> case l of
[[]] -> [[e]]
(x:xs):ys -> if x == e then (e:x:xs):ys else [e]:(x:xs):... | null | https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/ListManipulation.hs | haskell | foldl :: (a -> b -> a) -> a -> [b] -> a
foldl :: ([[a]] -> b -> [[a]]) -> [[a]] -> [b] -> [[a]]
*ListManipulation> pack [1,1,1,2,2,3]
[[1,1,1],[2,2],[3]] | module ListManipulation where
pack :: Eq a => [a] -> [[a]]
pack list = foldl (\ l e -> case l of
[[]] -> [[e]]
(x:xs):ys -> if x == e then (e:x:xs):ys else [e]:(x:xs):ys)
[[]] $ reverse list
|
2b987630a6d9c92397ae9056c5e98b77d11b61fd9548be36518ee7819981bbb8 | racket/typed-racket | non-recursive-and-recursive-type-aliases.rkt | #lang typed/racket
;; This test used to fail when the non-recursive type
;; aliases were registered *after* the recursive ones.
;;
Thanks to Havvy from IRC for the test
(define-type magic/int Integer)
(define-type magic/float Flonum)
(define-type magic/str String)
(define-type magic/symbol Symbol)
(define-type magi... | null | https://raw.githubusercontent.com/racket/typed-racket/d65ff8bd7146b15b79f31506f8aca410aed196e4/typed-racket-test/succeed/non-recursive-and-recursive-type-aliases.rkt | racket | This test used to fail when the non-recursive type
aliases were registered *after* the recursive ones.
| #lang typed/racket
Thanks to Havvy from IRC for the test
(define-type magic/int Integer)
(define-type magic/float Flonum)
(define-type magic/str String)
(define-type magic/symbol Symbol)
(define-type magic/map (All (A B) (HashTable A B)))
(define-type magic/invokable (magic/any * -> magic/any))
(define-type magic/a... |
a63e15c592dc6a042b2f62b39098cb9400a85da683b689cb2271785a4c0b3d59 | racket/readline | pread.rkt | #lang racket/base
(require "rktrl.rkt" racket/list racket/file)
;; --------------------------------------------------------------------------
;; Configuration
(define current-prompt (make-parameter #"> "))
(define max-history (make-parameter 100))
(define keep-duplicates (make-parameter #f))
(define keep-bla... | null | https://raw.githubusercontent.com/racket/readline/f2c01b705853dd26c51691a1fc78ee743605c8bd/readline-lib/readline/pread.rkt | racket | --------------------------------------------------------------------------
Configuration
--------------------------------------------------------------------------
Simple namespace-based completion
efficiently convert symbols to byte strings
get a list of byte strings for current bindings, cache last result
----... | #lang racket/base
(require "rktrl.rkt" racket/list racket/file)
(define current-prompt (make-parameter #"> "))
(define max-history (make-parameter 100))
(define keep-duplicates (make-parameter #f))
(define keep-blanks (make-parameter #f))
(provide current-prompt max-history keep-duplicates keep-blanks)
... |
354042fa83afacb2fa338cdca46830b6116da7e9ab7fdece4497f2914d26f162 | kbaird/consensus | three_candidates_test.erl | -module('three_candidates_test').
-author('Kevin C. Baird').
-include_lib("eunit/include/eunit.hrl").
three_candidates_setup() -> ok.
three_candidates_teardown(_) -> ok.
three_candidates_test_() ->
{setup, fun three_candidates_setup/0,
fun three_candidates_teardown/1,
[
... | null | https://raw.githubusercontent.com/kbaird/consensus/37a8e1e502435c8537e5dd3d3dff23bec5b95e2f/test/three_candidates_test.erl | erlang | #Borda_count
#Instant-runoff_voting
PRIVATE FUNCTIONS | -module('three_candidates_test').
-author('Kevin C. Baird').
-include_lib("eunit/include/eunit.hrl").
three_candidates_setup() -> ok.
three_candidates_teardown(_) -> ok.
three_candidates_test_() ->
{setup, fun three_candidates_setup/0,
fun three_candidates_teardown/1,
[
... |
563b1eb6b1af355cdb1fa777b8928e9e2a915b5184189921645267dd7de71ebe | ruhler/smten | Tuple.hs |
# LANGUAGE NoImplicitPrelude #
module Smten.Data.Tuple (module Data.Tuple) where
import Data.Tuple
| null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Data/Tuple.hs | haskell |
# LANGUAGE NoImplicitPrelude #
module Smten.Data.Tuple (module Data.Tuple) where
import Data.Tuple
| |
9085e6e90d48673b079e54787171f3997f9f9a75add41ba2d11e86603c3bbcf7 | ollef/navm-hs | Main.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
module Main where
import Block
import Data.Functor.Identity
import Graph
import Openness
data Instr (i :: OC) (o :: OC) wher... | null | https://raw.githubusercontent.com/ollef/navm-hs/bb39ad501c10288c4426437b48ee7bca2ed9af65/app/Main.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
module Main where
import Block
import Data.Functor.Identity
import Graph
import Openness
data Instr (i :: OC) (o :: OC) where
Init :: String -> Instr 'C 'O
Add :: Instr 'O... |
43586656d9f3a072d22a724a16b0a94daf2f1c6ff156ae28199f038a5f848488 | psholtz/MIT-SICP | exercise1-33.scm | ;;
Exercise 1.33
;;
You can obtain an even more general version of " accumulate " ( exercise 1.32 ) by introducing the notion
;; of a filter on the terms to be combined. That is, combine only those terms derived from values in the
;; range that satisfy a specified condition. The resulting "filtered-accumulate" abs... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.3/mit-scheme/exercise1-33.scm | scheme |
of a filter on the terms to be combined. That is, combine only those terms derived from values in the
range that satisfy a specified condition. The resulting "filtered-accumulate" abstraction takes the
the filter. Write "filtered-accumulate" as a procedure. Show how to express the following using
"filtered-acc... | Exercise 1.33
You can obtain an even more general version of " accumulate " ( exercise 1.32 ) by introducing the notion
same arguments as accumulate , together with an additional predicate of one argument that specifies
First , define the " filtered - accumulate " procedure :
(define (filtered-accumulate combi... |
39ecfd4ded9731931e195aba6fc52b2e6c0743fdfc25d001836c8cb2206a224b | privet-kitty/cl-competitive | circumcenter.lisp | (defpackage :cp/test/circumcenter
(:use :cl :fiveam :cp/circumcenter)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/circumcenter)
(in-suite base-suite)
(test calc-circumcenter
(is (null (calc-circumcenter #c(0 0) #c(1 1) #c(2 2))))
(is (not (null (calc-circumcenter #c(0 0) #c(1 0) #c(1 1)))))... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/circumcenter.lisp | lisp | (defpackage :cp/test/circumcenter
(:use :cl :fiveam :cp/circumcenter)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/circumcenter)
(in-suite base-suite)
(test calc-circumcenter
(is (null (calc-circumcenter #c(0 0) #c(1 1) #c(2 2))))
(is (not (null (calc-circumcenter #c(0 0) #c(1 0) #c(1 1)))))... | |
7326b7039d7be5d33dcca041cbdd591f5341b0644115da3fcccdc930a4156753 | input-output-hk/project-icarus-importer | UtxosTable.hs | {-# LANGUAGE Arrows #-}
module Pos.BlockchainImporter.Tables.UtxosTable
( -- * Data types
UtxoRecord (..)
-- * Getters
, getUtxos
-- * Manipulation
, applyModifierToUtxos
-- * Recovery (use carefully!)
, clearUtxos
) where
import Universum
import qualified Control.Arrow as A
impor... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/blockchain-importer/src/Pos/BlockchainImporter/Tables/UtxosTable.hs | haskell | # LANGUAGE Arrows #
* Data types
* Getters
* Manipulation
* Recovery (use carefully!)
| Returns the utxo stored in the table
| Delete all utxos from table |
module Pos.BlockchainImporter.Tables.UtxosTable
UtxoRecord (..)
, getUtxos
, applyModifierToUtxos
, clearUtxos
) where
import Universum
import qualified Control.Arrow as A
import Data.Maybe (catMaybes)
import Data.Profunctor.Product.TH (makeAdaptorAndInstance)
import qualifi... |
65eaa3c4a69dbd8036aad8d4f97ed98bd59811d664e86f8cb9086914d8baf29a | cfpb/qu | keyword_params.clj | (ns qu.middleware.keyword-params
"Convert param keys to keywords. This replaces
ring.middleware.keyword-params as that does not turn all potential
keys to keywords.")
(defn- keyword-syntax? [s]
(re-matches #"[A-Za-z\.*+!-?$_%&=][A-Za-z0-9\.*+!-?$_%&=#]*" s))
(defn- keyify-params [target]
(cond
(map? tar... | null | https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/src/qu/middleware/keyword_params.clj | clojure | these are left with strings." | (ns qu.middleware.keyword-params
"Convert param keys to keywords. This replaces
ring.middleware.keyword-params as that does not turn all potential
keys to keywords.")
(defn- keyword-syntax? [s]
(re-matches #"[A-Za-z\.*+!-?$_%&=][A-Za-z0-9\.*+!-?$_%&=#]*" s))
(defn- keyify-params [target]
(cond
(map? tar... |
112962a13cd4942de6239ffd84cad505192fb84c8f46d5eb18939ac20f41605c | pirapira/coq2rust | vernacinterp.ml | (************************************************************************)
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/toplevel/vernacinterp.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Interpretation of a vernac command | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Pp
open Errors... |
28317d1d781f4d0876f3020d1495bd451c31c320c4ca23307610bba3589d46af | atgreen/lisp-openshift | scl.lisp | $ I d : scl.lisp 687 2012 - 02 - 27 14:49:55Z ctian $
;;;; $URL: svn-lisp.net/project/usocket/svn/usocket/tags/0.5.5/backend/scl.lisp $
;;;; See LICENSE for licensing information.
(in-package :usocket)
(defparameter +scl-error-map+
(append +unix-errno-condition-map+
+unix-errno-error-map+))
(defun scl... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/usocket-0.5.5/backend/scl.lisp | lisp | $URL: svn-lisp.net/project/usocket/svn/usocket/tags/0.5.5/backend/scl.lisp $
See LICENSE for licensing information.
Sockets and their associated streams are modelled as
different objects. Be sure to close the socket stream
when closing stream-sockets; it makes sure buffers
are flushed and the socket is closed cor... | $ I d : scl.lisp 687 2012 - 02 - 27 14:49:55Z ctian $
(in-package :usocket)
(defparameter +scl-error-map+
(append +unix-errno-condition-map+
+unix-errno-error-map+))
(defun scl-map-socket-error (err &key condition socket)
(let ((usock-err (cdr (assoc err +scl-error-map+ :test #'member))))
(cond ... |
44393edbf9d45f13458232a61a83ce79fc7487a70d02f60d2d74a6aad6729d0d | coq/coq | preferences.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/298fa248adc4284b160c908351011cd3245cb746/ide/coqide/preferences.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
58bc5d8abfbad2c9d23479ac05d12a0f463d23c1f28bffedd526cfd888bb502f | novaframework/nova | nova_plugin_handler.erl | -module(nova_plugin_handler).
-behaviour(cowboy_middleware).
-export([
execute/2
]).
-include_lib("kernel/include/logger.hrl").
execute(Req = #{plugins := Plugins}, Env = #{plugin_state := pre_request}) ->
%% This is a post plugin
PostPlugins = proplists:get_value(post_request, Plugins, []),... | null | https://raw.githubusercontent.com/novaframework/nova/0e83e936149896e879db9a52637b391298cdbb84/src/nova_plugin_handler.erl | erlang | This is a post plugin
Determine which pre-plugin this is
The router could not find any match for us | -module(nova_plugin_handler).
-behaviour(cowboy_middleware).
-export([
execute/2
]).
-include_lib("kernel/include/logger.hrl").
execute(Req = #{plugins := Plugins}, Env = #{plugin_state := pre_request}) ->
PostPlugins = proplists:get_value(post_request, Plugins, []),
run_plugins(PostPlugins,... |
7b65983be7ffc9414876e9311e4b0b1dfd42592657011229c430583cf295cff1 | semilin/layoup | whaarf.lisp |
(MAKE-LAYOUT :NAME "whaarf" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/whaarf.lisp | lisp |
(MAKE-LAYOUT :NAME "whaarf" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | |
dfcafecd9ab87fe73ec161a81164dea25f43fb6ecfc064c8d1a2debd7d94dde8 | acl2/acl2 | proof-support.lisp | PFCS ( Prime Field Constraint System ) Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "PFCS")
(include-book... | null | https://raw.githubusercontent.com/acl2/acl2/ea1669961a650700f6be7befe7c8b61423e4b281/books/kestrel/crypto/pfcs/proof-support.lisp | lisp | PFCS ( Prime Field Constraint System ) Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "PFCS")
(include-book "semantics-deep")
(defxdoc+ proof-support
:parents (prime-field-constraint-systems... | |
3b2e8475684553a4236b29e244d939f9bb6384b0f5a18dfa3e349f897b36685a | metabase/metabase | postgres.clj | (ns metabase.test.data.postgres
"Postgres driver test extensions."
(:require
[metabase.driver.sql.query-processor :as sql.qp]
[metabase.test.data.interface :as tx]
[metabase.test.data.sql :as sql.tx]
[metabase.test.data.sql-jdbc :as sql-jdbc.tx]
[metabase.test.data.sql-jdbc.load-data :as load-data]
... | null | https://raw.githubusercontent.com/metabase/metabase/5a81d35d7498295a18fdacc482229fd7659e271a/test/metabase/test/data/postgres.clj | clojure | TODO - What?
add an additional statement to the front to kill open connections to the DB before dropping | (ns metabase.test.data.postgres
"Postgres driver test extensions."
(:require
[metabase.driver.sql.query-processor :as sql.qp]
[metabase.test.data.interface :as tx]
[metabase.test.data.sql :as sql.tx]
[metabase.test.data.sql-jdbc :as sql-jdbc.tx]
[metabase.test.data.sql-jdbc.load-data :as load-data]
... |
daa7cc21aff06d6d3b076ed04f60de1591e84f6b6b0b754726cbb6eebc93d99d | hkuplg/fcore | BaseTransCFJava.hs | # LANGUAGE FlexibleContexts , TypeOperators , MultiParamTypeClasses , ScopedTypeVariables #
|
Module : BaseTransCFJava
Description : Basic translation of FCore to Java
Copyright : ( c ) 2014—2015 The F2J Project Developers ( given in AUTHORS.txt )
License : BSD3
Maintainer : < >... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/backend/BaseTransCFJava.hs | haskell | translation that does not pre-initialize Closures that are ininitalised in apply() methods of other Closures
Either normal variable or class name
either variable or special case: Lit
needed
translateM this e2
translateM this e3
let appliedBody = body newvars
rBody <- translateM this appliedBody
needed
Needed
... | # LANGUAGE FlexibleContexts , TypeOperators , MultiParamTypeClasses , ScopedTypeVariables #
|
Module : BaseTransCFJava
Description : Basic translation of FCore to Java
Copyright : ( c ) 2014—2015 The F2J Project Developers ( given in AUTHORS.txt )
License : BSD3
Maintainer : < >... |
d07ed33d2c77f2f3fc12a17cda7c2509a14bddc90461113ee590e557b2714a0f | yeller/clojure-miniprofiler | example.clj | (ns clojure-miniprofiler.example
(:use compojure.core
clojure-miniprofiler))
(defn another-slow []
(custom-timing "sql" "query" "SELECT * FROM POSTS"
(do nil)))
(defn slow-fn []
(Thread/sleep 10)
(trace "foo"
(Thread/sleep 10)
(trace "foo1" (Thread/sleep 10))
... | null | https://raw.githubusercontent.com/yeller/clojure-miniprofiler/9bc45de61174e9fa14079a70411906fb44a870c6/dev/clojure_miniprofiler/example.clj | clojure | (ns clojure-miniprofiler.example
(:use compojure.core
clojure-miniprofiler))
(defn another-slow []
(custom-timing "sql" "query" "SELECT * FROM POSTS"
(do nil)))
(defn slow-fn []
(Thread/sleep 10)
(trace "foo"
(Thread/sleep 10)
(trace "foo1" (Thread/sleep 10))
... | |
43c9764f0790be9a7c0b0e16dfe7d04f1f6de47c3f39fbc13bb9471f3105552d | Helium4Haskell/helium | EOFInString.hs | main = " | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/EOFInString.hs | haskell | main = " | |
9bd89b9a2e052195e2380bc92c05681d360369afd3fc3b86bae655de9152eb8a | MLanguage/mlang | bir_instrumentation.ml | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
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 3 of the License , or ( at your option ) any later
... | null | https://raw.githubusercontent.com/MLanguage/mlang/934aac9af1694cd59411947183fbff963e47251f/src/mlang/backend_ir/bir_instrumentation.ml | ocaml | * The result of the code coverage measurement is a map of the successive
definitions of all the non-array variables during interpretation of the
program | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
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 3 of the License , or ( at your option ) any later
... |
08ea7805df6806ddfe47ce9d6b4220de6f862f5a28f2fe1631f7e132d89a99d1 | haskell-tools/haskell-tools | InTupSecElem.hs | # LANGUAGE ParallelListComp ,
TupleSections
#
TupleSections
#-}
module InTupSecElem where
* ParallelListComp , TupleSections *
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/ParallelListCompTest/InTupSecElem.hs | haskell | # LANGUAGE ParallelListComp ,
TupleSections
#
TupleSections
#-}
module InTupSecElem where
* ParallelListComp , TupleSections *
| |
6dd4a0fb334dc348592a8ae47f23e815bbfc0120ba81800e7d92532ab7861f4f | koalaman/pack | pack.hs | Haskell implemention of pack , the early 80s file compression tool still
- supported by gzip .
- By ' koala_man ' Holen , 2017
- supported by gzip.
- By Vidar 'koala_man' Holen, 2017
-}
import qualified Data.ByteString.Lazy as B
import qualified Data.Map.Strict as M
import Control.Monad
import Data.Word... | null | https://raw.githubusercontent.com/koalaman/pack/0bd29ccae2662ef9ae1fabe707d84e4f84b36d53/pack.hs | haskell | Maximum number of bits we can use
encoding with max tree depth constraints.
where the longest path is leftmost.
Pack bits as bytes
Get leaf nodes at each level of the tree
'pack' encodes it minus 2.
Header
File length
Leaf count at each bit length | Haskell implemention of pack , the early 80s file compression tool still
- supported by gzip .
- By ' koala_man ' Holen , 2017
- supported by gzip.
- By Vidar 'koala_man' Holen, 2017
-}
import qualified Data.ByteString.Lazy as B
import qualified Data.Map.Strict as M
import Control.Monad
import Data.Word... |
74f6de845686c8bd031a9e90992d080556c2a7d3bb306c52e715bb4cd5df481d | dhess/hpio | Util.hs | |
Module : System . GPIO.Linux . . Util
Description : Useful low - level Linux @sysfs@ functions
Copyright : ( c ) 2019 ,
License : : < >
Stability : experimental
Portability : non - portable
Useful low - level Linux @sysfs@ functions .
Module : System.GPIO.Linux.Sysfs... | null | https://raw.githubusercontent.com/dhess/hpio/27004ef379db5d35e240222d6ba4cf91da9ec14d/src/System/GPIO/Linux/Sysfs/Util.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE Safe #
* Paths and file names
contents, the attribute files always return their
(ASCII-encoded) value followed by a newline character
will accept their (ASCII-encoded) new value either with or
without a trailing newline character. For consistency (and
for the sake of iso... | |
Module : System . GPIO.Linux . . Util
Description : Useful low - level Linux @sysfs@ functions
Copyright : ( c ) 2019 ,
License : : < >
Stability : experimental
Portability : non - portable
Useful low - level Linux @sysfs@ functions .
Module : System.GPIO.Linux.Sysfs... |
5c14339469c98762431408d0092b3025c42cf0b634cdd60b941638c42608c7cc | UU-ComputerScience/uhc | newtype2.hs | newtype : fail , too many constructors
newtype X a = X a | Y a
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/5/newtype2.hs | haskell | newtype : fail , too many constructors
newtype X a = X a | Y a
| |
157c283c75b8238b625fc52f03725e1bbeae702ea26a2ade0d19270590079edd | input-output-hk/marlowe-cardano | Transaction.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| Generate random transactions for tests .
--
---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/b1b5d77e3fc78caa9fd67106e49c97ebc49438ec/marlowe-test/src/Spec/Marlowe/Plutus/Transaction.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
---------------------------------------------------------------------------
# LANGUAGE RankNTypes #
* Types
* Generation
* Modification
* Conditions
| Create a transaction generator... | License : Apache 2.0
Portability : Portable
| Generate random transactions for tests .
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Spec.Marlowe.Plutus.Transaction
ArbitraryTransaction
, arbitraryPayoutTransaction
, arbitrarySemanticsTransaction
, merkleize
, noModify
... |
4d684e5c9c0be5689102f74c71aa69698377a1affd179d75552f4430c3d21377 | ocaml/ocaml-re | test_re.ml | module L = List
open Re
open OUnit2
open Fort_unit
module List = L
let re_match ?pos ?len r s res =
expect_equal_app
~msg:(str_printer s)
~printer:arr_ofs_printer
id res
(fun () -> Group.all_offset (exec ?pos ?len (compile r) s)) ()
;;
let re_fail ?pos ?len r s =
expect_equal_app
~msg:(str_pri... | null | https://raw.githubusercontent.com/ocaml/ocaml-re/a844d29f7b67480bc8de0c04d700377f7021ccae/lib_test/test_re.ml | ocaml | Substring Extraction
Literal Match
String, line, word
Match semantics
Character set
Predefined character sets - should these be tested exhaustively?
Case modifiers
Fixed bugs | module L = List
open Re
open OUnit2
open Fort_unit
module List = L
let re_match ?pos ?len r s res =
expect_equal_app
~msg:(str_printer s)
~printer:arr_ofs_printer
id res
(fun () -> Group.all_offset (exec ?pos ?len (compile r) s)) ()
;;
let re_fail ?pos ?len r s =
expect_equal_app
~msg:(str_pri... |
35dc8f1c1b65b1f432fa2799b7af78ef43280f27d93fa406f9bec61043655028 | jaspervdj/hakyll | Tests.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Web.Html.RelativizeUrls.Tests
( tests
) where
--------------------------------------------------------------------------------
import Test.Tasty (Test... | null | https://raw.githubusercontent.com/jaspervdj/hakyll/05070e8a2b025a625cca923d9438e4d647075646/tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | module Hakyll.Web.Html.RelativizeUrls.Tests
( tests
) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit ((@=?))
import Hakyll.Web.Html.RelativizeUrls
import TestSuite.Util
tests :: TestTree
tests = testGroup "Hak... |
968d7235f40c7d2a599abc463fd89a07524c2e36cb8bbb24d51d0ea4ecabb167 | rescript-lang/rescript-compiler | cmij_main.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/81a3dc63ca387b2af23fed297db283254ae3ab20/jscomp/cmij/cmij_main.ml | ocaml | TODO: assert its suffixes
prerr_endline (Ext_obj.dump content.package_spec); | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
0e9691ced6b2332e4153b479af46ad37618da3eb2748b994da1795cacc102ac7 | ocaml/oasis | OASISPluginPrintHello.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/examples/plugins/oasis-plugin-print-hello/src/lib/oasis-plugin-print-hello/OASISPluginPrintHello.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
4a3fb5335220b34dc60218876f1fed144cf905b32d6944e4c406871e6ff70584 | ayamada/copy-of-svn.tir.jp | filer.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
;;; ToDo : より良いインターフェースを考える事
;;; ToDo : HTTP/1.1コンプリート
;;; ToDo : HTTP/1.1どこまで実装したか、どの順で実装するかの表を作る事
;;; ToDo : Rangeヘッダのサポート
ToDo : HEADのサポートと、許可されたmethod以外は405 , 501を返すようにする事
ToDo : OPTIONS , TRACE等のサポート
;;;
;;; ToD... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/tcpcgi/tags/0.4.4.2/src/lib/tcpcgi/filer.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
ToDo : より良いインターフェースを考える事
ToDo : HTTP/1.1コンプリート
ToDo : HTTP/1.1どこまで実装したか、どの順で実装するかの表を作る事
ToDo : Rangeヘッダのサポート
ToDo : apacheのmime.types形式のファイルをパーズして使うようにする?
note : 現在のmime-type判別は、pathの拡張子ではなく、実体の拡張子を見ます
and-let*
string-prefix?
cgi-t... | $ Id$
ToDo : HEADのサポートと、許可されたmethod以外は405 , 501を返すようにする事
ToDo : OPTIONS , TRACE等のサポート
(define-module tcpcgi.filer
(use file.util)
(use text.tree)
(use text.html-lite)
(use www.cgi)
(use tcpcgi.errordoc)
(export
<tcpcgi.filer>
make-filer-thunk
*mime-table*
))
(select-module ... |
1721a14e25a80ffa998605c9f1a415b6e16c7cfafa7bddca230b9d2ebc0af073 | clash-lang/clash-compiler | UnsignedZero.hs | module UnsignedZero where
import Clash.Prelude
import Clash.Explicit.Testbench
topEntity
:: Clock System
-> Reset System
-> Signal System (Unsigned 16)
-> Signal System ( Unsigned 17
, Unsigned 17
, Unsigned 17
, Unsigned 16
, Unsig... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Numbers/UnsignedZero.hs | haskell | # NOINLINE topEntity # | module UnsignedZero where
import Clash.Prelude
import Clash.Explicit.Testbench
topEntity
:: Clock System
-> Reset System
-> Signal System (Unsigned 16)
-> Signal System ( Unsigned 17
, Unsigned 17
, Unsigned 17
, Unsigned 16
, Unsig... |
961e581e950b18f0e46b56aa7883451acdc1724cd99bc9e04ab2773e174eb2bc | dschwen/gnucash-reports | psl-budget.scm | ;; -*-scheme-*-
This is a sample guile report generator for GnuCash .
;; It illustrates the basic techniques used to create
new reports for GnuCash .
(define-module (gnucash report psl-budget))
FIXME : delete after we finish modularizing .
(use-modules (gnucash gnc-module))
(use-modules (gnucash gettext))
(use... | null | https://raw.githubusercontent.com/dschwen/gnucash-reports/742edc86ce8f023543d5e997711eb2157b99006a/psl-budget.scm | scheme | -*-scheme-*-
It illustrates the basic techniques used to create
for gnc-build-url
define all option's names so that they are properly defined
(define optname-from-date (N_ "From"))
(define optname-to-date (N_ "To"))
options generator
date interval
(gnc:options-add-date-interval!
options gnc:pagename-general
optn... |
This is a sample guile report generator for GnuCash .
new reports for GnuCash .
(define-module (gnucash report psl-budget))
FIXME : delete after we finish modularizing .
(use-modules (gnucash gnc-module))
(use-modules (gnucash gettext))
(use-modules (gnucash printf))
' debug is deprecated and unused since g... |
15c4dd3342551a3790b39ca81b5d7cf3dd3b7421299bdcd0e4ae9863439c2335 | ethercrow/yi-config | PyflakesMode.hs | {-# language OverloadedStrings #-}
# language LambdaCase #
module PyflakesMode
( pyflakesMode
, exFlakes
, flakes
) where
import Control.Exception
import Control.Monad
import Control.Monad.State (gets)
import Data.Foldable
import Data.Monoid
import qualified Data.Text as T
import qualified Data.Vector... | null | https://raw.githubusercontent.com/ethercrow/yi-config/3530e6ca8e9a598d8c7ddcf7954c66254c2b760d/modules/PyflakesMode.hs | haskell | # language OverloadedStrings # | # language LambdaCase #
module PyflakesMode
( pyflakesMode
, exFlakes
, flakes
) where
import Control.Exception
import Control.Monad
import Control.Monad.State (gets)
import Data.Foldable
import Data.Monoid
import qualified Data.Text as T
import qualified Data.Vector as V
import System.Exit
import Sys... |
b08a349d0e41ddaf913ebc46ca8f718bdf4aa0bf55f936122466210114822df6 | emqx/ecql | ecql_proto_tests.erl | %%%-----------------------------------------------------------------------------
Copyright ( c ) 2015 eMQTT.IO , All Rights Reserved .
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Softwar... | null | https://raw.githubusercontent.com/emqx/ecql/f29d05fb8bdf1167877ec07ef7f0950f6feeab95/test/ecql_proto_tests.erl | erlang | -----------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnishe... | Copyright ( c ) 2015 eMQTT.IO , All Rights Reserved .
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF A... |
fecdb505252a20470787a5551483ff8a551e9f04daf328375c8a9e71d347153a | chaitanyagupta/chronicity | repeater-time.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
;;; repeater-time.lisp
;;; See the LICENSE file for licensing information.
(cl:in-package #:chronicity)
#.(cl-interpol:enable-interpol-syntax)
(defclass repeater-time (repeater)
((current :initform nil)))
(defclass tick ()
((time ... | null | https://raw.githubusercontent.com/chaitanyagupta/chronicity/5841d1548cad0ca6917d8e68933124a5af68f5ec/src/repeaters/repeater-time.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
repeater-time.lisp
See the LICENSE file for licensing information.
Now why would I do that?
Redundant?
Still makes no sense to me
Redundant? |
(cl:in-package #:chronicity)
#.(cl-interpol:enable-interpol-syntax)
(defclass repeater-time (repeater)
((current :initform nil)))
(defclass tick ()
((time :initarg :time :accessor tick-time)
(ambiguousp :initarg :ambiguousp :accessor tick-ambiguousp)))
(defmethod print-object ((x tick) stream)
(print-unr... |
66f15bd52886f090980fc03ca00b945c9e713b6900cea5915f00a60b2fa978ef | icicle-lang/icicle-ambiata | Fusion.hs | -- | Fusing programs together
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE OverloadedStrings #-}
module Icicle.Core.Program.Fusion (
FusionError (..)
, fusePrograms
, fuseMultiple
) where
import Icicle.Common.Base
import Icicle.Common.Type
import Icicle.Core.Program.Program
... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-core/src/Icicle/Core/Program/Fusion.hs | haskell | | Fusing programs together
# LANGUAGE PatternGuards #
# LANGUAGE OverloadedStrings #
generated program has no name clashes.
| Fuse a list of programs together, prefixing each with its name | # LANGUAGE NoImplicitPrelude #
module Icicle.Core.Program.Fusion (
FusionError (..)
, fusePrograms
, fuseMultiple
) where
import Icicle.Common.Base
import Icicle.Common.Type
import Icicle.Core.Program.Program
import Icicle.Core.Program.Subst
import Icicle.Internal.Pretty
import P
import Data.Hashable (Hash... |
a51b746bf730e88bf7d7573175bdcedff552528ab2e7ea6d2922f6a3585cd1ad | geophf/1HaskellADay | Solution.hs | # LANGUAGE OverloadedStrings , ViewPatterns #
module Y2018.M05.D30.Solution where
-
Today we 're going to look at big(ish ) data . What do you do with big(ish ) data ?
Well , 99 % you ignore , AND WE WILL FOLLOW THAT FINE TRADITION TODAY !
Today 's problem . We have a JSON of MASSIVE proporations ( well , a ... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M05/D30/Solution.hs | haskell | }
the JSON is pretty-printed into this file
but, of course, you need a JSON instance to do that:
okay, now put them into your bucket list:
}
maybe use a multimap?
How many articles are in each bucket?
What is the mean time of computing the entities from an article text?
That is: what is the mean of all (time art... | # LANGUAGE OverloadedStrings , ViewPatterns #
module Y2018.M05.D30.Solution where
-
Today we 're going to look at big(ish ) data . What do you do with big(ish ) data ?
Well , 99 % you ignore , AND WE WILL FOLLOW THAT FINE TRADITION TODAY !
Today 's problem . We have a JSON of MASSIVE proporations ( well , a ... |
8325600855112ed7c1e523e88f8048b1df13c77cd656b11385e155923acbe862 | tatut/xtdb-inspector | table.clj | (ns xtdb-inspector.ui.table
"A table component with filtering."
(:require [ripley.html :as h]
[ripley.live.source :as source]
[ripley.live.collection :as collection]
[clojure.string :as str]
[ripley.js :as js]))
(defn- default-filter-fn
"A very simple text filter, ... | null | https://raw.githubusercontent.com/tatut/xtdb-inspector/98533ddfc0f718be147f3a1b6084465f18c89669/src/xtdb_inspector/ui/table.clj | clojure | Compare comparables of the same type | (ns xtdb-inspector.ui.table
"A table component with filtering."
(:require [ripley.html :as h]
[ripley.live.source :as source]
[ripley.live.collection :as collection]
[clojure.string :as str]
[ripley.js :as js]))
(defn- default-filter-fn
"A very simple text filter, ... |
f84585b474ad429ba0afc4be27503b63dc48c942895f7be0ea607b9b3e815561 | BillHallahan/G2 | Interface.hs | {-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module G2.Liquid.Inference.Interface ( inferenceCheck
, inference
, getInitState
, getNameLevels ) where
import G2.Co... | null | https://raw.githubusercontent.com/BillHallahan/G2/0683a633f9dad2cd5066d2515645fa79bb105401/src/G2/Liquid/Inference/Interface.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
Run inference, with an extra, final check of correctness at the end.
Assuming inference is working correctly, this check should neve fail.
We filter them out to avoid an error
r_meas_ex
fc'
^ A list of values to produce results for
^ A default result, in c... | # LANGUAGE TupleSections #
module G2.Liquid.Inference.Interface ( inferenceCheck
, inference
, getInitState
, getNameLevels ) where
import G2.Config.Config as G2
import G2.Data.Timer
import G2.Interface hidi... |
35de5bcc14413f9b4a59f6698f1be9bcce63ea9fd506b5d5018dd6e7e797e7a5 | alexkehayias/chocolatier | project.clj | (defproject chocolatier "0.1.0-SNAPSHOT"
:description "Chocolatier prototype"
:source-paths ["src/clj" "src/cljs"]
:test-paths ["test/clj" "test/cljs"]
:dependencies [[org.clojure/clojure "1.8.0"]
;; Web server
[ring "1.2.0"]
[compojure "1.1.5"]
... | null | https://raw.githubusercontent.com/alexkehayias/chocolatier/6b77c1dbf10ef7ff83d0b5a2ebb9fda39edcde5a/project.clj | clojure | Web server
cljs
Fix for java11 figwheel compatibility issue
Remove runtime assertions
Optimize nested function calls
default and assumes "resources"
default
watch and update CSS
Need this now to get nrepl to work
:nrepl-middleware ["cider.nrepl/cider-middleware"
"refactor-nrepl.middleware/... | (defproject chocolatier "0.1.0-SNAPSHOT"
:description "Chocolatier prototype"
:source-paths ["src/clj" "src/cljs"]
:test-paths ["test/clj" "test/cljs"]
:dependencies [[org.clojure/clojure "1.8.0"]
[ring "1.2.0"]
[compojure "1.1.5"]
[enlive "1.1.1"]
... |
d2742c234ae545c146c867c478869138cdf464d0cd10a3a6c61749c3027a89da | blockfrost/blockfrost-haskell | Addresses.hs | -- | Addresses API endpoints
{-# OPTIONS_HADDOCK hide #-}
module Blockfrost.API.Cardano.Addresses
where
import Servant.API
import Servant.API.Generic
import Blockfrost.Types.Cardano.Addresses
import Blockfrost.Types.Shared
import Blockfrost.Util.Pagination
import Blockfrost.Util.Sorting
data AddressesAPI route =... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/c3812a14a5c0071a17972d9f2ba66ac56ebcbb8a/blockfrost-api/src/Blockfrost/API/Cardano/Addresses.hs | haskell | | Addresses API endpoints
# OPTIONS_HADDOCK hide # |
module Blockfrost.API.Cardano.Addresses
where
import Servant.API
import Servant.API.Generic
import Blockfrost.Types.Cardano.Addresses
import Blockfrost.Types.Shared
import Blockfrost.Util.Pagination
import Blockfrost.Util.Sorting
data AddressesAPI route =
AddressesAPI
{
_addressInfo
:: route
... |
1018e1ed3c9be5b42a66305d5a98652fe048f056e3c7165014d0fa9036a56d29 | distrap/gcodehs | Monad.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Data.GCode.Monad where
import Data.GCode.TH
import Data.GCode.Types
import Data.GCode.RS274.Types
import Data.GCode.RS274 (codeFromName)
import Control.Monad.Trans.Writer.Lazy
import Data.Semigroup hiding ... | null | https://raw.githubusercontent.com/distrap/gcodehs/8a8dbc66445cff4ce832bb56f42ef03b3215e235/src/Data/GCode/Monad.hs | haskell | this gives us someCode and someCode' shortcuts generated from RS274/Types.hs
so we can write
> myP = prog $ do
> move (x 0) | # LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Data.GCode.Monad where
import Data.GCode.TH
import Data.GCode.Types
import Data.GCode.RS274.Types
import Data.GCode.RS274 (codeFromName)
import Control.Monad.Trans.Writer.Lazy
import Data.Semigroup hiding ... |
f97910ca77b7271f0be60f2094557e6d5b27b3b5457679f705debb3c67fcdaba | spurious/sagittarius-scheme-mirror | file.scm | -*- mode : scheme ; coding : utf-8 ; -*-
#!core
(library (scheme file)
(export call-with-input-file call-with-output-file delete-file file-exists?
open-binary-input-file open-binary-output-file open-input-file
open-output-file with-input-from-file with-output-to-file)
(import (except (rnrs)
op... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/scheme/file.scm | scheme | coding : utf-8 ; -*- | #!core
(library (scheme file)
(export call-with-input-file call-with-output-file delete-file file-exists?
open-binary-input-file open-binary-output-file open-input-file
open-output-file with-input-from-file with-output-to-file)
(import (except (rnrs)
open-input-file
open-output-file
... |
e990363eb5f45ddd2524ee0c6695339d52c8802e47e628ce0b601f5334411292 | LeventErkok/sbv | Operations.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Core.Operations
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
-- Constructors and basic operations on symbolic values
----------------------------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/0063fb9385bcf0394c461bb3020938f167998798/Data/SBV/Core/Operations.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.SBV.Core.Operations
License : BSD3
Maintainer:
Stability : experimental
Constructors and basic operations on symbolic values
---------------------------------------------------------------------------
# LANGUAGE Ban... | Copyright : ( c )
module Data.SBV.Core.Operations
(
svTrue, svFalse, svBool
, svInteger, svFloat, svDouble, svFloatingPoint, svReal, svEnumFromThenTo, svString, svChar
, svAsBool, svAsInteger, svNumerator, svDenominator
, svPlus, svTimes, svMinus, svUNeg, svAbs
, svDivide, svQuot, svRem, svQuotRem
... |
39e2f5c15039283500fd4d14fecac10fda1b4ccf5d46c07ece1b79a3166da0d9 | liquidz/clj-jwt | core_test.clj | (ns clj-jwt.core-test
(:require
[clj-jwt.core :refer :all]
[clj-jwt.key :refer [private-key public-key]]
[clj-time.core :refer [date-time plus days now]]
[midje.sweet :refer :all])
(:import
[java.security Security]
[org.bouncycastle.jce.provider BouncyCastleProvider]))
(defn with-bc-prov... | null | https://raw.githubusercontent.com/liquidz/clj-jwt/8a339824504593c417eca508ca31539202108e32/test/clj_jwt/core_test.clj | clojure | (ns clj-jwt.core-test
(:require
[clj-jwt.core :refer :all]
[clj-jwt.key :refer [private-key public-key]]
[clj-time.core :refer [date-time plus days now]]
[midje.sweet :refer :all])
(:import
[java.security Security]
[org.bouncycastle.jce.provider BouncyCastleProvider]))
(defn with-bc-prov... | |
4fac04ce762bd04cd0113ac44d763a18f4d2e5f8a29511fd940763f8a6fc7631 | GregorySchwartz/too-many-cells | Plot.hs | TooManyCells . MakeTree . Plot
Collects the functions pertaining to plotting the clusterings .
Gregory W. Schwartz
Collects the functions pertaining to plotting the clusterings.
-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# L... | null | https://raw.githubusercontent.com/GregorySchwartz/too-many-cells/34b9c9ee5695504824169f44e01d8c3ea2d55546/src/TooManyCells/MakeTree/Plot.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
Remote
Local
| Get the projections and label for a cell.
| Get the projections and label with colors for a cell.
| Plot clusters.
| Plot clusters.
| Plot clusters using outputs from R.
Plot hierarchy.
Plot clustering.
| Plot ranked mo... | TooManyCells . MakeTree . Plot
Collects the functions pertaining to plotting the clusterings .
Gregory W. Schwartz
Collects the functions pertaining to plotting the clusterings.
-}
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #... |
d1502f76abf56c35ac239c3a603e3f59e10ed236b2b158913a664269d6e56ab6 | zyrolasting/polyglot | info.rkt | #lang info
(define collection 'multi)
(define deps '("base" "polyglot-lib" "aws" "unlike-assets-lib" "markdown"))
(define build-deps '("rackunit-lib"))
(define pkg-desc "Tests for polyglot")
(define pkg-authors '(sage))
| null | https://raw.githubusercontent.com/zyrolasting/polyglot/d27ca7fe90fd4ba2a6c5bcd921fce89e72d2c408/polyglot-test/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("base" "polyglot-lib" "aws" "unlike-assets-lib" "markdown"))
(define build-deps '("rackunit-lib"))
(define pkg-desc "Tests for polyglot")
(define pkg-authors '(sage))
| |
1c3815c6b6875178d9fe099e40e495630e1e6ab9f50654a0846f1106c16b7fd4 | kaizhang/bioinformatics-toolkit | Motif.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Bio.Motif
( PWM(..)
, size
, subPWM
, rcPWM
, gcContentPWM
, Motif(..)
, Bkgd(..)
, toPWM
, ic
, scores
, scores'
, score
, optimalScore
, CDF(..)
, cdf
, cdf'
, truncateCDF
... | null | https://raw.githubusercontent.com/kaizhang/bioinformatics-toolkit/89b8d1cdf4fa7b075794c37c070cab8ac27acfaf/bioinformatics-toolkit/src/Bio/Motif.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
* References
$references
^ number of sites used to generate this matrix
| Reverse complementary of PWM.
frequencies.
| Get scores of a long sequences at each position.
| A streaming version of scores.
# INLINE scores' #
| The best possible matching s... |
module Bio.Motif
( PWM(..)
, size
, subPWM
, rcPWM
, gcContentPWM
, Motif(..)
, Bkgd(..)
, toPWM
, ic
, scores
, scores'
, score
, optimalScore
, CDF(..)
, cdf
, cdf'
, truncateCDF
, scoreCDF
, pValueToScore
, pValueToScoreExact
, toIU... |
a6f25fab1c952e3d95d28f21536deac7fa3980e448fc0fea54ea7ad5093b0d68 | jhunt/shout | packages.lisp | (defpackage :shout-test
(:use :cl :prove))
| null | https://raw.githubusercontent.com/jhunt/shout/6b8ec9ac2f967b970dae2d9b45275c7a69c23b30/test/packages.lisp | lisp | (defpackage :shout-test
(:use :cl :prove))
| |
af5f739e3ef7c26539739ecb45b9b06c8398d740a1b3417245b26f7afee2da57 | SimulaVR/simula-godot | Util.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
module Plugin.Util where
import Data.Function ((&))
import Data.Text as T
import Foreign.C (withCStri... | null | https://raw.githubusercontent.com/SimulaVR/simula-godot/31472f967e15ddfaf0878f34522b02920573a74b/addons/godot-haskell-plugin/src/Plugin/Util.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
Extras | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Plugin.Util where
import Data.Function ((&))
import Data.Text as T
import Foreign.C (withCString)
import Godot.Api
import Godot.Gdnative... |
6fc18dd8073a2331ffb45563b1504e7c0ec5ddbe7c9926fd9d9bffd7dcd1bc9f | goldfirere/singletons | NatSymbolReflexive.hs | module NatSymbolReflexive where
import Data.Type.Equality ((:~:)(..))
import GHC.TypeLits
import Prelude.Singletons
test1 :: forall (a :: Natural). Sing a -> (a == a) :~: True
test1 _ = Refl
test2 :: forall (a :: Symbol). Sing a -> (a == a) :~: True
test2 _ = Refl
| null | https://raw.githubusercontent.com/goldfirere/singletons/ad40d2a6392d562509ba572c84f9a335e4cef5f9/singletons-base/tests/compile-and-dump/Singletons/NatSymbolReflexive.hs | haskell | module NatSymbolReflexive where
import Data.Type.Equality ((:~:)(..))
import GHC.TypeLits
import Prelude.Singletons
test1 :: forall (a :: Natural). Sing a -> (a == a) :~: True
test1 _ = Refl
test2 :: forall (a :: Symbol). Sing a -> (a == a) :~: True
test2 _ = Refl
| |
70d403b01866a34c9e348fcf59bbff57d85a3fd5343352ff7e2d52a1d696a3c7 | RefactoringTools/HaRe | QualNames.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module QualNames where
import HsName
import HsIdent
import Data.Maybe(isJust)
class QualNames qn m n | qn -> m n, m n -> qn where
getQualifier :: qn -> Maybe m
getQualified :: ... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/Modules/QualNames.hs | haskell | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module QualNames where
import HsName
import HsIdent
import Data.Maybe(isJust)
class QualNames qn m n | qn -> m n, m n -> qn where
getQualifier :: qn -> Maybe m
getQualified :: ... | |
44aeeb0b6f4bee28aa349a30aa2395201c282a98ca3a5b25838eca1d9d3f30da | haskell-numerics/hmatrix | Instances.hs | # LANGUAGE CPP , FlexibleContexts , UndecidableInstances , FlexibleInstances , ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - missing - signatures #
-----------------------------------------------------------------------------
|
Module : Numeric . LinearAlgebra . T... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs | haskell | ---------------------------------------------------------------------------
shrink any one of the components
shrink any one of the components
a square matrix
a pair of square matrices
a unitary matrix
a complex hermitian or real symmetric matrix
a pair of matrices that can be multiplied | # LANGUAGE CPP , FlexibleContexts , UndecidableInstances , FlexibleInstances , ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - missing - signatures #
|
Module : Numeric . LinearAlgebra . Tests . Instances
Copyright : ( c ) 2008
License : : ... |
fe191510420b171f0a041f15a069ca3b899a30efb60055c23886de862f0da3cd | rd--/hsc3 | jmcc-spe.hs | spe ( jmcc )
let rapf i = allpassN i 0.05 (X.randN 2 0 0.05) 4
src = let t = impulse kr 9 0
e = envGen kr t 0.1 0 1 DoNothing (envPerc 0.1 1)
s = mce [00,03,02,07
,08,32,16,18
,00,12,24,32]
f = midiCps (demand t 0 (dseq dinf s) ... | null | https://raw.githubusercontent.com/rd--/hsc3/d026af0481298418ffbce68953e5babcf6b87cbe/Help/Graph/jmcc-spe.hs | haskell | spe ( jmcc )
let rapf i = allpassN i 0.05 (X.randN 2 0 0.05) 4
src = let t = impulse kr 9 0
e = envGen kr t 0.1 0 1 DoNothing (envPerc 0.1 1)
s = mce [00,03,02,07
,08,32,16,18
,00,12,24,32]
f = midiCps (demand t 0 (dseq dinf s) ... | |
8fe1a29837927ada08a68c104d42a8eec103c04af6d28ce6ad5be9fe1bc67932 | clojure-interop/aws-api | AWSRDSDataAsync.clj | (ns com.amazonaws.services.rdsdata.AWSRDSDataAsync
"Interface for accessing AWS RDS DataService asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Note: Do not directly im... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.rdsdata/src/com/amazonaws/services/rdsdata/AWSRDSDataAsync.clj | clojure | (ns com.amazonaws.services.rdsdata.AWSRDSDataAsync
"Interface for accessing AWS RDS DataService asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Note: Do not directly im... | |
625b139967e0024c22cb707e9c7c1802908f8b3826dd24d27236ab4c64ab0f24 | gethop-dev/payments.stripe | payment_method_test.clj | (ns dev.gethop.payments.stripe.payment-method-test
(:require [clojure.test :refer :all]
[dev.gethop.payments.core :as core]
[dev.gethop.payments.stripe]
[integrant.core :as ig]))
(def ^:const test-config
{:api-key (System/getenv "STRIPE_TEST_API_KEY")})
(def ^:const test-custom... | null | https://raw.githubusercontent.com/gethop-dev/payments.stripe/2379ba790123d7380ffc397cf4920cbe2936f840/test/dev/gethop/payments/stripe/payment_method_test.clj | clojure | (ns dev.gethop.payments.stripe.payment-method-test
(:require [clojure.test :refer :all]
[dev.gethop.payments.core :as core]
[dev.gethop.payments.stripe]
[integrant.core :as ig]))
(def ^:const test-config
{:api-key (System/getenv "STRIPE_TEST_API_KEY")})
(def ^:const test-custom... | |
bc52a2bf5f6bd178dc22d74889bab4242adced8a8da75980b6085b6adee35feb | dcastro/haskell-flatbuffers | Main.hs | module Main where
import DecodeVectors
import Encode
import EncodeVectors
import Criterion.Main
main :: IO ()
main =
defaultMain $
mconcat
[ Encode.groups
, EncodeVectors.groups
, DecodeVectors.groups
]
| null | https://raw.githubusercontent.com/dcastro/haskell-flatbuffers/cea6a75109de109ae906741ee73cbb0f356a8e0d/bench/Main.hs | haskell | module Main where
import DecodeVectors
import Encode
import EncodeVectors
import Criterion.Main
main :: IO ()
main =
defaultMain $
mconcat
[ Encode.groups
, EncodeVectors.groups
, DecodeVectors.groups
]
| |
6e433c4667b33f3c22794fef3ab05e14e216c4f194d1a1626761997bfdc4318f | huangjs/cl | dqwgts.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/dqwgts.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
a40e1a28295f7343da3823690c7238a0ad5384246ab75819cb90af52837367ba | realworldocaml/book | main.ml | open Expect_test_common
open Base
open Ppxlib
open Ast_builder.Default
let lift_location
~loc
({ filename; line_number; line_start; start_pos; end_pos } : File.Location.t)
=
Merlin_helpers.hide_expression
[%expr
({ filename =
Expect_test_common.File.Name.of_string
[%e ... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_expect/src/main.ml | ocaml | Grab a list of all the output expressions
Set to [true] when we see a [%expect_test] extension | open Expect_test_common
open Base
open Ppxlib
open Ast_builder.Default
let lift_location
~loc
({ filename; line_number; line_start; start_pos; end_pos } : File.Location.t)
=
Merlin_helpers.hide_expression
[%expr
({ filename =
Expect_test_common.File.Name.of_string
[%e ... |
a07db13623dc07aafc77f206b3c4252fa9f03730053ae1a3f9b88cf8d3e5c074 | facebookarchive/pfff | export_ast_php.ml | (*s: export_ast_php.ml *)
(*s: Facebook copyright *)
*
* Copyright ( C ) 2009 - 2011 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with th... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/parsing/export_ast_php.ml | ocaml | s: export_ast_php.ml
s: Facebook copyright
e: Facebook copyright
s: json_ast_php.ml
***************************************************************************
Prelude
***************************************************************************
**********************************************************************... |
*
* Copyright ( C ) 2009 - 2011 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file... |
91d7f3e53f8f3afc27bdaa365ff267e7294ae1dc04e40ae636fd065f0a04e338 | djblue/portal | test_runner.cljs | (ns portal.test-runner
(:require [cljs.test :as t]
[clojure.pprint :as pp]
[portal.client.node :as p]
[portal.runtime.bench-cson :as bench]
[portal.runtime.cson-test]
[portal.runtime.fs :as fs]
[portal.runtime.fs-test]
[portal.runtime... | null | https://raw.githubusercontent.com/djblue/portal/3f2fc83941e36332c73ed38a4ac60c893074ab5a/test/portal/test_runner.cljs | clojure | (ns portal.test-runner
(:require [cljs.test :as t]
[clojure.pprint :as pp]
[portal.client.node :as p]
[portal.runtime.bench-cson :as bench]
[portal.runtime.cson-test]
[portal.runtime.fs :as fs]
[portal.runtime.fs-test]
[portal.runtime... | |
d5febb44076e667a24bdf3026f9740601a6a65612ec5f65832dd38844a084405 | nunchaku-inria/nunchaku | TypeMono.ml |
(* This file is free software, part of nunchaku. See file "license" for more details. *)
* { 1 Types }
module TI = TermInner
module Subst = Var.Subst
module Builtin = TI.TyBuiltin
type id = ID.t
type 'a var = 'a Var.t
type 'a printer = Format.formatter -> 'a -> unit
type 'a view =
* Builtin type
| Const of id
... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/TypeMono.ml | ocaml | This file is free software, part of nunchaku. See file "license" for more details.
* [repr t] returns the view of [t] as a type.
precondition: [is_ty t]
raise some exception otherwise
* [as_ty t] returns [Some view] if [is_ty t, repr t = view], and
returns [None] otherwise
* representation that fo... |
* { 1 Types }
module TI = TermInner
module Subst = Var.Subst
module Builtin = TI.TyBuiltin
type id = ID.t
type 'a var = 'a Var.t
type 'a printer = Format.formatter -> 'a -> unit
type 'a view =
* Builtin type
| Const of id
| App of 'a * 'a list
| Arrow of 'a * 'a
* A polymorphic type is a term that respect... |
cf15d86e36030c0f163e32061f215929cfc33f2d8bdadeca142a146e6dca08cf | aaltodsg/instans | sparql-classes.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
;;;
Author : ( )
;;;
(in-package #:instans)
;;; Type conventions:
;;; - All string literals with no lang tag are always converted to xsd-string-value's. That is, no sparql function should ever expect to get an rdf-literal with
;;; t... | null | https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/sparql/sparql-classes.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
Type conventions:
- All string literals with no lang tag are always converted to xsd-string-value's. That is, no sparql function should ever expect to get an rdf-literal with
type = xsd:string or with type = nil and lang = nil
- All number literals are... | Author : ( )
(in-package #:instans)
(defvar *rdf-first*)
(defvar *rdf-rest*)
(defvar *rdf-nil*)
(defvar *rdf-type*)
(defvar *xsd-value-type-descriptors*)
(defvar *rdf-lang-string-iri*)
(defvar *sparql-standard-op-library*)
(defvar *sparql-xsd-op-library*)
(defvar *sparql-ops*)
(defvar *instans-op-library*)
(def... |
50029ba606e3a59bb714fd732efc0de34050f929a6b25c45a0070b2d3d698b39 | nasa/Common-Metadata-Repository | tokens.clj | (ns cmr.transmit.echo.tokens
"Contains functions for working with tokens using the echo-rest api."
(:require
[buddy.core.keys :as buddy-keys]
[buddy.sign.jwt :as jwt]
[cheshire.core :as json]
[clj-time.core :as t]
[clojure.string :as string]
[cmr.common.date-time-parser :as date-time-parser]
[c... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/39625dbee824a8d27644e60921e893fbb9282a2c/transmit-lib/src/cmr/transmit/echo/tokens.clj | clojure | default
Service Temporarily Unavailable
default
Short circuit a lookup when we already know who this is. | (ns cmr.transmit.echo.tokens
"Contains functions for working with tokens using the echo-rest api."
(:require
[buddy.core.keys :as buddy-keys]
[buddy.sign.jwt :as jwt]
[cheshire.core :as json]
[clj-time.core :as t]
[clojure.string :as string]
[cmr.common.date-time-parser :as date-time-parser]
[c... |
03c7c6791e78a5d0420df7fdf9b0c4bfa2dab6e80864fc884534dc76d464e3ba | replikativ/replikativ | core_test.clj | (ns replikativ.core-test
(:require [clojure.test :refer :all]
[clojure.set :as set]
[replikativ.crdt.cdvcs.meta :refer :all]
[konserve.memory :as store]))
TODO navigation
;; move tip along branch/graph (like undo-tree), tagging?
;; Look at the bottom for a complete merging exam... | null | https://raw.githubusercontent.com/replikativ/replikativ/1533a7e43e46bfb70e8c8eb34dc5708e611a478d/test/replikativ/core_test.clj | clojure | move tip along branch/graph (like undo-tree), tagging?
Look at the bottom for a complete merging example.
in kv-store | (ns replikativ.core-test
(:require [clojure.test :refer :all]
[clojure.set :as set]
[replikativ.crdt.cdvcs.meta :refer :all]
[konserve.memory :as store]))
TODO navigation
(def dummy-store {"mail:/1234567" {:commit-graph {1 #{}
... |
0051d8dde823b7af9917cb05bbebdc0c22cfe853ec41012a170775e0014176ba | bennn/dissertation | data.rkt | #lang typed/racket/base
(provide
(struct-out Array)
(struct-out Settable-Array)
(struct-out Mutable-Array))
(struct Array ([shape : (Vectorof Integer)]
[size : Integer]
[strict? : (Boxof Boolean)]
[strict! : (-> Void)]
[unsafe-proc : ... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/synth/typed/data.rkt | racket | #lang typed/racket/base
(provide
(struct-out Array)
(struct-out Settable-Array)
(struct-out Mutable-Array))
(struct Array ([shape : (Vectorof Integer)]
[size : Integer]
[strict? : (Boxof Boolean)]
[strict! : (-> Void)]
[unsafe-proc : ... | |
42c47c9f59857221c62415904094705a022e93ff7f1bc51a9cca2d9f0c162605 | slipstream/SlipStreamServer | external_object_template_generic.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.external-object-template-generic
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.spec.common :as c]
[com.sixsq.slipstream.ssclj.resources.spec.external-object :as eo]
... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/spec/external_object_template_generic.cljc | clojure | Defines the contents of the generic template used in a create resource.
NOTE: The name must match the key defined by the resource, :externalObjectTemplate here. | (ns com.sixsq.slipstream.ssclj.resources.spec.external-object-template-generic
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.spec.common :as c]
[com.sixsq.slipstream.ssclj.resources.spec.external-object :as eo]
... |
29409383785d086ce9dd572d7152d21e4c3371786fdbdd20528a8f051e594d11 | alaricsp/chicken-scheme | test-finalizers-2.scm | test-finalizers-2.scm - test finalizers + GC roots
(use srfi-1)
(define *n* 1000)
(define *count* 0)
#>
static void *
makef(int f, ___scheme_value x)
{
void *r = f ? CHICKEN_new_finalizable_gc_root() : CHICKEN_new_gc_root();
CHICKEN_gc_root_set(r, x);
return r;
}
static void
freef(void *r)
{
CHICKEN_del... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/tests/test-finalizers-2.scm | scheme | test-finalizers-2.scm - test finalizers + GC roots
(use srfi-1)
(define *n* 1000)
(define *count* 0)
#>
static void *
makef(int f, ___scheme_value x)
{
}
static void
freef(void *r)
{
}
<#
(define makef (foreign-lambda c-pointer "makef" bool scheme-object))
(define freef (foreign-lambda void "freef" c-pointer)... | |
0cf935d890c2874e180a555989aba7b1234bf9d58c48ff2b97dfea90545049ee | geophf/1HaskellADay | Exercise.hs | {-# LANGUAGE OverloadedStrings #-}
module Y2017.M12.D22.Exercise where
-
Yesterday we read in JSON then we wrote out a subset of that JSON , today , and
the days following , we 're going to parse that JSON , bit by bit .
-
Yesterday we read in JSON then we wrote out a subset of that JSON, today, and
the days fo... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M12/D22/Exercise.hs | haskell | # LANGUAGE OverloadedStrings #
}
which you can get from cabal
}
redeclare the Packet-type and generalize its rows-type
hint: use tagsoup to help here
What are the htmlBlock and plainText for each of the articles of subset.json? |
module Y2017.M12.D22.Exercise where
-
Yesterday we read in JSON then we wrote out a subset of that JSON , today , and
the days following , we 're going to parse that JSON , bit by bit .
-
Yesterday we read in JSON then we wrote out a subset of that JSON, today, and
the days following, we're going to parse that ... |
173396c700369f94c17ea4a44f8ab39a70e12e8cd02e80cc9fcb8b764852bd80 | niquola/json-schema.clj | jsonpointer_test.clj | (ns json-schema.jsonpointer-test
(:require
[json-schema.core :as sut]
[clojure.test :refer :all]))
;; see -luff-relative-json-pointer-00
(def doc
{:foo [:bar :baz],
:highly {:nested {:objects true}}})
(def table
{[:foo 1] [["0" :baz]
["1/0" :bar]
["2/highly/nested/objects" t... | null | https://raw.githubusercontent.com/niquola/json-schema.clj/85ca313d1b64b0005b4f783c2f58c0a47ec8d009/test/json_schema/jsonpointer_test.clj | clojure | see -luff-relative-json-pointer-00 | (ns json-schema.jsonpointer-test
(:require
[json-schema.core :as sut]
[clojure.test :refer :all]))
(def doc
{:foo [:bar :baz],
:highly {:nested {:objects true}}})
(def table
{[:foo 1] [["0" :baz]
["1/0" :bar]
["2/highly/nested/objects" true]
["0#" ... |
202abe36e582ef5870f74fe40dc00b76d393231f876c78c1303acea9bc8a92ae | webyrd/Barliman | mk.scm | ; Scope object.
; Used to determine whether a branch has occured between variable creation
; and unification to allow the set-var-val! optimization in subst-add. Both variables
; and substitutions will contain a scope. When a substitution flows through a
; conde it is assigned a new scope.
; Creates a new scope that i... | null | https://raw.githubusercontent.com/webyrd/Barliman/c2ede326c32fab3c792da782035b5a5a73b08087/interpreter_experiments/mk/mk.scm | scheme | Scope object.
Used to determine whether a branch has occured between variable creation
and unification to allow the set-var-val! optimization in subst-add. Both variables
and substitutions will contain a scope. When a substitution flows through a
conde it is assigned a new scope.
Creates a new scope that is not s... |
(define new-scope
(lambda ()
(list 'scope)))
(define nonlocal-scope
(list 'non-local-scope))
(define scope-eq? eq?)
idx - unique numeric index for the variable . Used by the trie substitution representation .
(define unbound (list 'unbound))
(define var
(let ((counter -1))
(lambda (scope)
... |
0466cd370352a39e3a992f90c16e65ada442a5fec63ad296face90f004909d55 | kerneis/cpc | simplify.ml |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* Sumit Gulwani < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* me... | null | https://raw.githubusercontent.com/kerneis/cpc/0ca695d25e58dadbd92639162338a06a517875d9/src/ext/simplify.ml | ocaml | Basic expression
Whether to split structs
Whether to simplify inside of Mem
Whether to convert function calls to calls-by-pointer when function address
* has been taken somewhere.
Whether to convert field offsets to offsets by integer.
* This conversion makes the generated code analysis simpler for static so... |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* Sumit Gulwani < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* me... |
017e9f0f21d5ba2df8033ebc59d1819f68aafe9a4fa62d71e7a6ae817b4243bc | flosell/lambdacd-git | end_to_end_test.clj | (ns lambdacd-git.end-to-end-test
(:require [clojure.test :refer :all]
[lambdacd-git.core :as core]
[lambdacd.core :as lambdacd]
[lambdacd.state.core :as lambdacd-state]
[lambdacd-git.example.simple-pipeline :as simple-pipeline]
[lambdacd.steps.manualtrigger ... | null | https://raw.githubusercontent.com/flosell/lambdacd-git/3677c7afc1324bef6eb1c20f66bd83d99a1c54a9/test/lambdacd_git/end_to_end_test.clj | clojure | ======================================================================================================================
macro is inlined, therefore convinces cursive to mark the call location of the check as failed, not the implementation
===============================================================================... | (ns lambdacd-git.end-to-end-test
(:require [clojure.test :refer :all]
[lambdacd-git.core :as core]
[lambdacd.core :as lambdacd]
[lambdacd.state.core :as lambdacd-state]
[lambdacd-git.example.simple-pipeline :as simple-pipeline]
[lambdacd.steps.manualtrigger ... |
490b97fc90095c5798ab0e64a8cb56e24d9323ceb42a0ac1cb6e1c82647fa69a | dasuxullebt/uxul-world | files.lisp | Copyright 2009 - 2011
;; This file declares the constants for loading different files and
;; file-formats.
(in-package :uxul-world)
(defun si (var val)
(setf (symbol-value (intern var)) val))
(defun stretch-image (x y img)
"Resize that file to x times y."
(uxul-world::resize-bmp-blob img x y))
;; (defun ... | null | https://raw.githubusercontent.com/dasuxullebt/uxul-world/f05e44b099e5976411b3ef1f980ec616bd221425/files.lisp | lisp | This file declares the constants for loading different files and
file-formats.
(defun init-bmp-file (file)
"Load an image file into a Variable. Set |filename| (without .png
and path) to a list with all sizes of that image."
(si (pathname-name file)
(with-open-file (in file :element-type '(unsigned-byt... | Copyright 2009 - 2011
(in-package :uxul-world)
(defun si (var val)
(setf (symbol-value (intern var)) val))
(defun stretch-image (x y img)
"Resize that file to x times y."
(uxul-world::resize-bmp-blob img x y))
(defun bmp-p (file)
"Is the file relevant for initialization? So far only .png-files are
rel... |
cf7832e1699950503a98369c34240349e9fed157654c91064c83e297e18d61e8 | racket/compiler | make.rkt | #lang racket/base
(require racket/file
racket/path
racket/system
compiler/find-exe)
(parameterize ((current-directory (find-system-path 'temp-dir)))
(define tmpdir (make-temporary-file "tmp~a" 'directory (current-directory)))
(define tmppath (build-path tmpdir "tmp.rkt"))
(with-output-... | null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/make.rkt | racket | #lang racket/base
(require racket/file
racket/path
racket/system
compiler/find-exe)
(parameterize ((current-directory (find-system-path 'temp-dir)))
(define tmpdir (make-temporary-file "tmp~a" 'directory (current-directory)))
(define tmppath (build-path tmpdir "tmp.rkt"))
(with-output-... | |
72610cf52194868d9438be1c9d143be8093c7f02b84cf633e16d074440b3d6f3 | metosin/schema-tools | coerce_test.cljc | (ns schema-tools.coerce-test
(:require #?@(:clj [[clojure.test :refer [deftest testing is are]]]
:cljs [[cljs.test :as test :refer-macros [deftest testing is are]]
[cljs.reader]
[goog.date.UtcDateTime]])
[clojure.string :as string]
... | null | https://raw.githubusercontent.com/metosin/schema-tools/89a965b1c959982d0f6fa4ef1725b5503d6161fd/test/cljc/schema_tools/coerce_test.cljc | clojure | (ns schema-tools.coerce-test
(:require #?@(:clj [[clojure.test :refer [deftest testing is are]]]
:cljs [[cljs.test :as test :refer-macros [deftest testing is are]]
[cljs.reader]
[goog.date.UtcDateTime]])
[clojure.string :as string]
... | |
02e139c0a8e63d5dfa833779822a08e55304d8a15a19c10fec619c665bf9330b | roboli/clerk | core.clj | (ns clerk.core)
(defmacro defcom-route
"Simplified version of secretary.core/defroute macro."
[route destruct component & [opts]]
`(let [action#
(fn [params#]
(cond
(map? params#)
(let [~(if (vector? destruct)
{:keys destruct}
... | null | https://raw.githubusercontent.com/roboli/clerk/110c8f2477b4f32eae8ed26b04e9e56aef000ecf/src/clj/clerk/core.clj | clojure | (ns clerk.core)
(defmacro defcom-route
"Simplified version of secretary.core/defroute macro."
[route destruct component & [opts]]
`(let [action#
(fn [params#]
(cond
(map? params#)
(let [~(if (vector? destruct)
{:keys destruct}
... | |
463a118d0ae363ab28f511ec4eb514e998f1172d514df8ebc87699b815231b0c | gklijs/bkes-demo | events.cljs | (ns nl.openweb.bank.events
(:require [re-frame.core :as re-frame]
[re-graph.core :as re-graph]
[nl.openweb.bank.transactions :refer [get-dispatches]]
[nl.openweb.bank.db :as db]))
(re-frame/reg-event-db
::initialize-db
(fn [_ _]
db/default-db))
(re-frame/reg-event-db
::... | null | https://raw.githubusercontent.com/gklijs/bkes-demo/43d78683b41c2c8a1d06ab9fe4e6bea0c67cf16b/frontend/src/cljs/nl/openweb/bank/events.cljs | clojure | (ns nl.openweb.bank.events
(:require [re-frame.core :as re-frame]
[re-graph.core :as re-graph]
[nl.openweb.bank.transactions :refer [get-dispatches]]
[nl.openweb.bank.db :as db]))
(re-frame/reg-event-db
::initialize-db
(fn [_ _]
db/default-db))
(re-frame/reg-event-db
::... | |
34c3350b9439cacef10aee0e1764213febe3020edc401e773f6d2e2ebf76d22c | dizzyd/retest | long_test_custom_timeout_rt.erl | -module(long_test_custom_timeout_rt).
-include_lib("eunit/include/eunit.hrl").
files() -> [].
run(_Dir) ->
ok = timer:sleep(60000).
| null | https://raw.githubusercontent.com/dizzyd/retest/6b33038bd4df4aab1dc15bb59076512ba8fbb113/test/retest_SUITE_data/long_test_custom_timeout/long_test_custom_timeout_rt.erl | erlang | -module(long_test_custom_timeout_rt).
-include_lib("eunit/include/eunit.hrl").
files() -> [].
run(_Dir) ->
ok = timer:sleep(60000).
| |
197e2eddcc56148f9f07077f6cbcf988af6d5e9c7242be3925cf59d2e995db77 | Mathnerd314/stroscot | Run.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE RecordWildCards, ScopedTypeVariables, PatternGuards #-}
# LANGUAGE ConstraintKinds , TupleSections , ViewPatterns #
# LANGUAGE TypeFamilies , NamedFieldPuns #
module Development.Shake.Internal.Core.Run(
RunState,
open,
reset,
run,
shakeRunAfter,
liveFilesSta... | null | https://raw.githubusercontent.com/Mathnerd314/stroscot/08b4cb638369a71e1e52fce5710a11e235e9e120/src/shake/Run.hs | haskell | # LANGUAGE RecordWildCards, ScopedTypeVariables, PatternGuards #
-------------------------------------------------------------------
MAKE
Prepare for a fresh run by changing Result to Loaded
shouldn't ever happen, but Loaded is least worst
timings are a bit delicate, we want to make sure we clear them before we lea... | # LANGUAGE LambdaCase #
# LANGUAGE ConstraintKinds , TupleSections , ViewPatterns #
# LANGUAGE TypeFamilies , NamedFieldPuns #
module Development.Shake.Internal.Core.Run(
RunState,
open,
reset,
run,
shakeRunAfter,
liveFilesState,
profileState,
errorsState
) where
import Control.Exc... |
e9cdca53f51838261b85f9f3c49f2d863dd9c4c633844b98a49c6bfd1a7ac63b | VoyagerInnovations/esmpp | esmpp_pdu.erl | %% @doc SMPP PDU Helper
%%
This module constructs and parses SMPP PDUs to and from octet formats
-module(esmpp_pdu).
%% Main exports
-export([
bind/2,
enquire_link/1,
submit_sm/2,
deliver_sm_resp/1,
unbind/1
]).
%% Internally exposed
-export([
pad2/1,
pad4/1,
iodata_to_cstring/2
]).
-include("const... | null | https://raw.githubusercontent.com/VoyagerInnovations/esmpp/708875621f6456a93a3002612423fd68d85ffe82/src/esmpp_pdu.erl | erlang | @doc SMPP PDU Helper
Main exports
Internally exposed
@doc Encode a submit_sm PDU from a sequence number and a submit_sm record
----------------------------------------------------------------------------
internal - but exposed nonetheless
-------------------------------------------------------------------------... | This module constructs and parses SMPP PDUs to and from octet formats
-module(esmpp_pdu).
-export([
bind/2,
enquire_link/1,
submit_sm/2,
deliver_sm_resp/1,
unbind/1
]).
-export([
pad2/1,
pad4/1,
iodata_to_cstring/2
]).
-include("constants.hrl").
-include("types.hrl").
-include("commands.hrl").
@... |
e8a420ae00ad312a4aeced6ab221fa046442c5c4bb25fcf5783271d71863db55 | rixed/ramen | RamenConsts.ml | module N = RamenName
Number of seconds we keep cached factors after new tuples have been
* produced ( seconds ):
* produced (seconds): *)
let cache_factors_ttl = 30.
(* Prefix to use before all parameter names in the environment: *)
let param_envvar_prefix = "param_"
(* Prefix to use before all experiment name... | null | https://raw.githubusercontent.com/rixed/ramen/68f7946a0e7044225d56969eb7de2b54ddbea60a/src/RamenConsts.ml | ocaml | Prefix to use before all parameter names in the environment:
Prefix to use before all experiment names in the environment:
Lifespan of files caching each factor possible values:
FIXME: configurable?
Used to name factor possible value files in absence of event times:
From time to time every workers compute th... | module N = RamenName
Number of seconds we keep cached factors after new tuples have been
* produced ( seconds ):
* produced (seconds): *)
let cache_factors_ttl = 30.
let param_envvar_prefix = "param_"
let exp_envvar_prefix = "experiment_"
let end_of_times = 5017590000.
let min_delay_between_full_out_measure... |
7c843e7916828633c7d9a2763824c863eea2445df4630d2baa3520de3d090f3b | kupl/MicSE | advanced_trxpath_refuter.ml | exception Error of string
open Lib
let _ =
try
let _ = Utils.Log.app (fun m -> m "MicSE naive trxpath refuter Start") in
let (cfg, res) = ExecFlow.refuter_trxpath_featurediff_run None in
let _ =
Utils.Log.app (fun m ->
m "Final-Report : %s" (Res.string_of_res cfg res)
)
... | null | https://raw.githubusercontent.com/kupl/MicSE/7d21c5ce454bbacc028da0ef7cf54c5f4dc661e0/cmd/advanced_trxpath_refuter.ml | ocaml | exception Error of string
open Lib
let _ =
try
let _ = Utils.Log.app (fun m -> m "MicSE naive trxpath refuter Start") in
let (cfg, res) = ExecFlow.refuter_trxpath_featurediff_run None in
let _ =
Utils.Log.app (fun m ->
m "Final-Report : %s" (Res.string_of_res cfg res)
)
... | |
b3a62c81bacf3defdd8ae5664a5d811c04526e3c69916b2bbd6ed07ff9aedf36 | scicloj/clojure-data-cookbook | 1_1_welcome.clj | (ns chapter-1-intro.1-1-welcome)
| null | https://raw.githubusercontent.com/scicloj/clojure-data-cookbook/c404af1bc8dd71906c5170d4705a74a860ac3d87/book/chapter_1_intro/1_1_welcome.clj | clojure | (ns chapter-1-intro.1-1-welcome)
| |
9392f1dacacf43a031bb8c7021c56343cc390bfb7720f7820d2d6457508b89d1 | nnichols/nature | genetic_operators_test.cljc | (ns nature.genetic-operators-test
(:require [clojure.spec.alpha :as csa]
[nature.spec :as s]
[nature.genetic-operators :as go]
[nature.initialization-operators :as io]
[nature.population-presets :as pp]
#? (:clj [clojure.test :refer [deftest is testing]])
... | null | https://raw.githubusercontent.com/nnichols/nature/6cc1e9f0627b330245602773313b8c60630d3330/test/nature/genetic_operators_test.cljc | clojure | (ns nature.genetic-operators-test
(:require [clojure.spec.alpha :as csa]
[nature.spec :as s]
[nature.genetic-operators :as go]
[nature.initialization-operators :as io]
[nature.population-presets :as pp]
#? (:clj [clojure.test :refer [deftest is testing]])
... | |
cea02287b92000f0c229cf4b5c2b1c4a60d9c342a59150b646fb6b890583a34a | willijar/LENS | value-propagation.lisp | Value Propoagation application for WSN
Copyright ( C ) 2014 Dr.
Author : Dr. < >
;; Keywords:
;;; Copying:
This file is part of Lisp Educational Network Simulator ( LENS )
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as... | null | https://raw.githubusercontent.com/willijar/LENS/646bc4ca5d4add3fa7e0728f14128e96240a9f36/networks/wsn/application/value-propagation.lisp | lisp | Keywords:
Copying:
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
LENS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Gen... | Value Propoagation application for WSN
Copyright ( C ) 2014 Dr.
Author : Dr. < >
This file is part of Lisp Educational Network Simulator ( LENS )
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.