_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 |
|---|---|---|---|---|---|---|---|---|
43cda04c173ea5a9d4a6db840538639393dc9271c421dafbc66a09de24426f76 | SamB/coq | ccproof.ml | (************************************************************************)
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/contrib/cc/ccproof.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This file uses the (non-compressed)... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Util
open Na... |
e07080a7b0229cebc9d1b9a575e7b91d66e320759c823186dccc07ae28423ea8 | clash-lang/clash-compiler | RecursiveDatatype.hs | module RecursiveDatatype where
import Clash.Prelude
topEntity :: [Bool]
topEntity = [True]
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldfail/RecursiveDatatype.hs | haskell | module RecursiveDatatype where
import Clash.Prelude
topEntity :: [Bool]
topEntity = [True]
| |
51f4e0cf23deadd8d1c72b2d861ce0c8de59af46f902c4f7861c2a64e2b2c00d | nickewing/netz | core.clj | (ns netz.test.core
(:require [netz.core :as netz])
(:use clojure.test
incanter.core))
(def negate-examples-binary
[[[0] [1]]
[[1] [0]]])
(def and-examples-binary
[[[0 0] [0]]
[[1 0] [0]]
[[0 1] [0]]
[[1 1] [1]]])
(def xnor-examples-binary
[[[0 0] [1]]
[[1 0] [0]]
[[0 1] [0]]
[[... | null | https://raw.githubusercontent.com/nickewing/netz/8103cb947f7fea989f12aec5debed7823950ac06/test/netz/test/core.clj | clojure | (ns netz.test.core
(:require [netz.core :as netz])
(:use clojure.test
incanter.core))
(def negate-examples-binary
[[[0] [1]]
[[1] [0]]])
(def and-examples-binary
[[[0 0] [0]]
[[1 0] [0]]
[[0 1] [0]]
[[1 1] [1]]])
(def xnor-examples-binary
[[[0 0] [1]]
[[1 0] [0]]
[[0 1] [0]]
[[... | |
395cde9a1bfd1bf9f37b1ec10a079e15f2ba8c6853f6866616980cb14bc3d85d | rizo/snowflake-os | tarFileSystem.ml |
Tar File System -- kind of similar to Tar File , but without the entire file in memory
type record = { ofs : int; size : int }
module Order = struct
type t = string list
type key = record option
type index = string
let to_index = (fun x -> x)
let from_index = (fun x -> x)
end
module TarFile = Tri... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/tarFileSystem.ml | ocaml | does multiple insertions =( ah well
easier just to have a massive bigarray and fill it all up for now
not sure if this works
no more data |
Tar File System -- kind of similar to Tar File , but without the entire file in memory
type record = { ofs : int; size : int }
module Order = struct
type t = string list
type key = record option
type index = string
let to_index = (fun x -> x)
let from_index = (fun x -> x)
end
module TarFile = Tri... |
da3a9bf78b9cd4483500155b38c8435b5d2928173304d6b99531ecdcd154854f | emilaxelsson/imperative-edsl | Monad.hs | Copyright ( c ) 2016 and after , see package copyright
Copyright ( c ) 2015 ,
--
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain t... | null | https://raw.githubusercontent.com/emilaxelsson/imperative-edsl/5561d7d0bcdb3de279478629a5493810c295e56d/src/Language/C/Monad.hs | haskell |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Red... | Copyright ( c ) 2016 and after , see package copyright
Copyright ( c ) 2015 ,
* Neither the name of nor the names of other
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDI... |
48280cdb765be7acb8535ea9db4e30373fa8ed65a13cda4647a7c56073e28db6 | khibino/haskell-relational-record | Config.hs | module Database.Relational.Schema.MySQLInfo.Config
# DEPRECATED " import config from Database . Relational . Schema . MySQL instead of this module . " #
config,
) where
import Database.Relational.Schema.MySQL.Config (config)
| null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-schemas/src/Database/Relational/Schema/MySQLInfo/Config.hs | haskell | module Database.Relational.Schema.MySQLInfo.Config
# DEPRECATED " import config from Database . Relational . Schema . MySQL instead of this module . " #
config,
) where
import Database.Relational.Schema.MySQL.Config (config)
| |
857f57fb4101658f2add7cb37bf9b9e36b0c0ead76ab6c5351189701a6026b86 | soudy/basically | eval.clj | (ns basically.eval
(:require [basically.expr :refer [exec-expr]]
[basically.lexer :refer [lex]]
[basically.parser :refer [parse]]
[basically.env :as env]
[basically.errors :refer [error-with-env]])
(:import [basically.parser Node Expr FuncCall]
[clojure.lan... | null | https://raw.githubusercontent.com/soudy/basically/739a33f7e97aa3a85080102e8bf160df5d1a98b5/src/basically/eval.clj | clojure | Literal expression
Expression wrapped in a node
Function call expression
Arithmetic expression
Print a newline if we're at the last argument, and it's not a semicolon
format them correctly
If the arguments start with a float or integer, indent by a space
Evaluate next node in if body if there is one and there i... | (ns basically.eval
(:require [basically.expr :refer [exec-expr]]
[basically.lexer :refer [lex]]
[basically.parser :refer [parse]]
[basically.env :as env]
[basically.errors :refer [error-with-env]])
(:import [basically.parser Node Expr FuncCall]
[clojure.lan... |
bbddf4a8c98b0d75357e22168449e5969e7a0de499651ff7c29dd29a206da420 | stchang/macrotypes | stlc+effect.rkt | #lang s-exp macrotypes/typecheck
(extends "stlc+box.rkt" #:except Ref ref deref := #%app λ)
(require (for-syntax racket/set))
;; Simply-Typed Lambda Calculus, plus mutable references
;; Types:
- types from stlc+cons.rkt
;; - Ref constructor
;; Terms:
- terms from stlc+cons.rkt
;; - ref deref :=
(provide (for-synt... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-example/macrotypes/examples/stlc%2Beffect.rkt | racket | Simply-Typed Lambda Calculus, plus mutable references
Types:
- Ref constructor
Terms:
- ref deref := | #lang s-exp macrotypes/typecheck
(extends "stlc+box.rkt" #:except Ref ref deref := #%app λ)
(require (for-syntax racket/set))
- types from stlc+cons.rkt
- terms from stlc+cons.rkt
(provide (for-syntax get-new-effects)
Ref
#%app λ ref deref :=)
(begin-for-syntax
(define (add-news e locs) (syn... |
d987b194107c5890d9d426479e97d405b7da23d2490bae916f9073a80a9fa25e | mfoemmel/erlang-otp | xmerl_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/xmerl/src/xmerl_lib.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2003 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(xmerl_lib).
-export([normalize_c... |
adaf1880008407af0894b73f13e1e46c7260a5ab2aadf946f70d918194450cd1 | avsm/platform | read.mli | val prettify : ?std:bool -> string -> string
(** Combined parser and pretty-printer.
See [to_string] for the role of the optional [std] argument. *)
val compact : ?std:bool -> string -> string
(** Combined parser and printer.
See [to_string] for the role of the optional [std] argument. *)
* { 2 JSON r... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/yojson.1.7.0/lib/read.mli | ocaml | * Combined parser and pretty-printer.
See [to_string] for the role of the optional [std] argument.
* Combined parser and printer.
See [to_string] for the role of the optional [std] argument.
* Exception describing a failure in both finalizer and parsing.
* Read a JSON value from a channel.
See [fro... | val prettify : ?std:bool -> string -> string
val compact : ?std:bool -> string -> string
* { 2 JSON readers }
exception Finally of exn * exn
val from_string :
?buf:Bi_outbuf.t ->
?fname:string ->
?lnum:int ->
string -> t
* Read a JSON value from a string .
@param buf use this buffer at will during p... |
19bf7b25d46fc53f2e9f4adee5e2b79b5e346c67cb2428e883cab1293636c664 | racket/gui | stretching-in-alignment.rkt | (module stretching-in-alignment mzscheme
(require
mred
mzlib/etc
mzlib/class
mrlib/private/aligned-pasteboard/interface
mike-lib/debug
mzlib/list
mzlib/match
(prefix a: "alignment.ss")
mrlib/click-forwarding-editor
mrlib/private/aligned-pasteboard/snip-lib
embedded-gui/aligned-pa... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/embedded-gui/private/tests/stretching-in-alignment.rkt | racket | (module stretching-in-alignment mzscheme
(require
mred
mzlib/etc
mzlib/class
mrlib/private/aligned-pasteboard/interface
mike-lib/debug
mzlib/list
mzlib/match
(prefix a: "alignment.ss")
mrlib/click-forwarding-editor
mrlib/private/aligned-pasteboard/snip-lib
embedded-gui/aligned-pa... | |
d75430425f87554c3330166730b99b436de9e1f508dbb1b154237ddf14958a17 | dinosaure/bob | unikernel.ml | open Lwt.Infix
module Psq =
Psq.Make
(String)
(struct
type t = [ `Bound of string | `Ready ]
let compare a b =
match (a, b) with
| `Bound _, `Ready -> -1
| `Ready, `Bound _ -> 1
| `Bound _, `Bound _ | `Ready, `Ready -> 0
end)
let serve_when_ready :
type t... | null | https://raw.githubusercontent.com/dinosaure/bob/210dce2f3f7bfe1b15472a7d09544b4afbac8ca6/mirage/unikernel.ml | ocaml | open Lwt.Infix
module Psq =
Psq.Make
(String)
(struct
type t = [ `Bound of string | `Ready ]
let compare a b =
match (a, b) with
| `Bound _, `Ready -> -1
| `Ready, `Bound _ -> 1
| `Bound _, `Bound _ | `Ready, `Ready -> 0
end)
let serve_when_ready :
type t... | |
2e8c5c7f4318216acd1fbdbeb4fce973637de656e237a2e6580b5606937d058f | naoiwata/sicp | 2.5.3.scm | ;; @author naoiwata
SICP Chapter2
2.5.3 Example : Symbolic Algebra
;; Arithmetic on polynomials ;;
(define (add-poly p1 p2)
(if (same-variable? (variable p1) (variable p2))
(make-poly (variable p1)
(add-terms (term-list p1)
(term-list p2)))
(error "Polys ... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/pages/2.5.3.scm | scheme | @author naoiwata
Arithmetic on polynomials ;;
internal procedures
representation of poly
representation of terms and term lists
<procedures adjoin-term ...coeff from text below>
continued on next page
<procedures used by add-poly>
<procedures used by mul-poly>
interface to rest of the system
Representing term l... | SICP Chapter2
2.5.3 Example : Symbolic Algebra
(define (add-poly p1 p2)
(if (same-variable? (variable p1) (variable p2))
(make-poly (variable p1)
(add-terms (term-list p1)
(term-list p2)))
(error "Polys not in same var -- ADD-POLY"
(list p1 p... |
6b6d58ccbbaca99029f71f4a10523201578248e3e45e885066a46dff026e45ba | pixlsus/registry.gimp.org_static | hdroberts-cmy-adjust.scm | ;
; cmy-adjust
;
Copyright ( C ) 2010 )
;
; 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 version.
;
; This pr... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/hdroberts-cmy-adjust.scm | scheme |
cmy-adjust
This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or... | Copyright ( C ) 2010 )
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
2011/11/28 F. Collard : 2.7.4 compatibility
(define (cmy-adjust img drawable c_mo... |
2231dd790528851ba28af605d01a5cb93166be104a0f7a9f023e17a3665debd4 | akabe/ocaml-crf | crf_model.ml | --- A library for conditional random field ( CRF ) in OCaml
Copyright ( C ) 2015 < >
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 , o... | null | https://raw.githubusercontent.com/akabe/ocaml-crf/ced26bcce559b1eda307f7a8961ac9e52905882f/lib/crf_model.ml | ocaml | --- A library for conditional random field ( CRF ) in OCaml
Copyright ( C ) 2015 < >
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 , o... | |
561dcc3e6f02b77e31bde3bee5a037fa96e22c99bf202cb51cfca4157f5fbf25 | finnishtransportagency/harja | yleiset_ajastukset.clj | (ns harja.palvelin.ajastetut-tehtavat.yleiset-ajastukset
"Kokoelma pienempiä yleisiä ajastuksia, jotka eivät sovi yhteen isommaksi tarkoitettuun palveluun"
(:require [clojure.java.jdbc :as jdbc]
[com.stuartsierra.component :as component]
[harja.kyselyt.urakat :as urakka-kyselyt]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/b24c8dc4d1c54c5a1e9d9417c7f2d401c4ed1b5d/src/clj/harja/palvelin/ajastetut_tehtavat/yleiset_ajastukset.clj | clojure | (ns harja.palvelin.ajastetut-tehtavat.yleiset-ajastukset
"Kokoelma pienempiä yleisiä ajastuksia, jotka eivät sovi yhteen isommaksi tarkoitettuun palveluun"
(:require [clojure.java.jdbc :as jdbc]
[com.stuartsierra.component :as component]
[harja.kyselyt.urakat :as urakka-kyselyt]
... | |
7ced0c4345a4b5960a19c1c8360df81e1c2929e468c996113721ac1f551dd658 | ranjitjhala/haddock-annot | HaddockDB.hs | -----------------------------------------------------------------------------
-- |
Module : Haddock . Backends .
Copyright : ( c ) 2003
-- License : BSD-like
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
---------------------------------------------------------... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/haddock-2.9.3/src/Haddock/Backends/HaddockDB.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-like
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
--------------------------------------------------------------------... | Module : Haddock . Backends .
Copyright : ( c ) 2003
module Haddock.Backends.HaddockDB (ppDocBook) where
import HaddockTypes
import HaddockUtil
import HsSyn2
import Text . PrettyPrint
import HaddockTypes
import HaddockUtil
import HsSyn2
import Text.PrettyPrint
-}
ppDocBook :: a
ppDocB... |
3725313300c68b73a9cb403aa2ccf23ec054740d2e0f969367010013e65ef74f | ekmett/ekmett.github.com | Object.hs | {-# OPTIONS -fglasgow-exts #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Category.Object
Copyright : 2008
-- License : BSD
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable (class-associated types)
--
T... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/categories/src/Control/Category/Object.hs | haskell | # OPTIONS -fglasgow-exts #
-----------------------------------------------------------------------------------------
|
Module : Control.Category.Object
License : BSD
Stability : experimental
Portability : non-portable (class-associated types)
These are defined in terms of class-associated types rather than func... | Copyright : 2008
Maintainer : < >
This module declares the ' HasTerminalObject ' and ' HasInitialObject ' classes .
Both of these are special cases of the idea of a ( co)limit .
module Control.Category.Object
( HasTerminalObject(..)
, HasInitialObject(..)
) where
import Control.Category
class Ca... |
22d6bd255d2b73e4ac8942fc6d5a54628ca1c449859dc1a2daaf82d17ae1b2bc | Octachron/phantom_algebra | flat_array.mli | type elt = float
type t
val len: t -> int
val get: t -> int -> elt
val set: t -> int -> elt -> unit
val create: int -> t
| null | https://raw.githubusercontent.com/Octachron/phantom_algebra/9733dad74e010642bdd500afe987440558d5608b/src/flat_array.mli | ocaml | type elt = float
type t
val len: t -> int
val get: t -> int -> elt
val set: t -> int -> elt -> unit
val create: int -> t
| |
e7cd0511338584a88b4feb8934573594b62f91a1cc19362546b9abf48f6e52d4 | BoeingX/haskell-programming-from-first-principles | RewriteFunctions.hs | module Monad.ChapterExercises.RewriteFunctions where
Question 1
j :: Monad m => m (m a) -> m a
j m = m >>= id
-- or even j = join
Question 2
l1 :: Monad m => (a -> b) -> m a -> m b
l1 = fmap
Question 3
l2 :: Monad m => (a -> b -> c) -> m a -> m b -> m c
l2 f a b = f <$> a <*> b
-- or even l2 = liftA2
Questi... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/Monad/ChapterExercises/RewriteFunctions.hs | haskell | or even j = join
or even l2 = liftA2 | module Monad.ChapterExercises.RewriteFunctions where
Question 1
j :: Monad m => m (m a) -> m a
j m = m >>= id
Question 2
l1 :: Monad m => (a -> b) -> m a -> m b
l1 = fmap
Question 3
l2 :: Monad m => (a -> b -> c) -> m a -> m b -> m c
l2 f a b = f <$> a <*> b
Question 4
a :: Monad m => m a -> m (a -> b) -> m... |
e054f7d93541532bc7e5268557348f51b8984de9c630714f798dbaa4f2c5baf2 | pixlsus/registry.gimp.org_static | Darla-SaturationFix.scm | ;
Saturation Fix , V2.0
;
AUTHOR : ( ) , ( C ) 2007,2008
;
This plugin was tested with GIMP 2.4
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3 as
published by the Free Software Foundation .
;
; This pr... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/Darla-SaturationFix.scm | scheme |
This program is free software; you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License at for
mor... | Saturation Fix , V2.0
AUTHOR : ( ) , ( C ) 2007,2008
This plugin was tested with GIMP 2.4
it under the terms of the GNU General Public License Version 3 as
published by the Free Software Foundation .
add a copy of the original layer and two 50 % grey layers
set top layer ( copy ) as colour ... |
2a79f9ac69ae678908e672e2132096adda3e5eb2dcd4e7bcf9b46b552c9d0c34 | BinaryAnalysisPlatform/FrontC | reduce.ml | open Cabs
open Gen
(*
** Configuration switches
*)
(* true -> remove continue statements *)
let remove_continue = ref false
(* true -> remove break statements *)
let remove_break = ref false
(* true -> remove non-ending returns *)
let remove_return = ref false
(* switch action *)
type switch_action =
NO (* ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/FrontC/c5b8ab5ce95cb82014a71cef3382f969b0763d6b/calipso/reduce.ml | ocaml |
** Configuration switches
true -> remove continue statements
true -> remove break statements
true -> remove non-ending returns
switch action
don't reduce them
remove all switches
remove them but scan for optimized regular ones
don't reduce which are regulars
statements counters
** Definitions
** ... | open Cabs
open Gen
let remove_continue = ref false
let remove_break = ref false
let remove_return = ref false
type switch_action =
let remove_switch = ref NO
let break_count = ref 0
let continue_count = ref 0
let goto_count = ref 0
let label_count = ref 0
let switch_count = ref 0
let return_count = ref 0
let ca... |
c293261d0f312e0cb02129bef801f7ffc631e55c2ff9db2c335ff14c9829588a | EarnestResearch/yambda | Main.hs | module Main where
import AWS.Lambda.Event.SNS
import AWS.Lambda.Handler
import Control.Monad.Logger
main :: IO ()
main = runStderrLoggingT $ handler echo
echo :: Applicative m => SNSEvent -> m SNSEvent
echo = pure
| null | https://raw.githubusercontent.com/EarnestResearch/yambda/b1f45e42447c08d7da4b3f470bdb849c9ea1b200/examples/sns/Main.hs | haskell | module Main where
import AWS.Lambda.Event.SNS
import AWS.Lambda.Handler
import Control.Monad.Logger
main :: IO ()
main = runStderrLoggingT $ handler echo
echo :: Applicative m => SNSEvent -> m SNSEvent
echo = pure
| |
fc63e6876d3e0b9fe0aa5c7a4b00ff5a6db7a617cc82b8118786ff58d25a9c71 | agj/nendo | spiral.rkt | #lang racket
(require "../src/ale/main.rkt")
(define (spiral length)
(when (> length 0)
(draw-turtle
(forward 10)
(right (* 0.5 length))
(spiral (- length 1)))))
(spiral 1000)
| null | https://raw.githubusercontent.com/agj/nendo/d668ef17349e3336269f7d03e7f71df0f06caa57/examples/spiral.rkt | racket | #lang racket
(require "../src/ale/main.rkt")
(define (spiral length)
(when (> length 0)
(draw-turtle
(forward 10)
(right (* 0.5 length))
(spiral (- length 1)))))
(spiral 1000)
| |
51fe2a339c1c27be212db75696dd3881f5ce4678a04a726954e0a57ee7807fe7 | spwhitton/consfigurator | etc-default.lisp | ;;; Consfigurator -- Lisp declarative configuration management system
Copyright ( C ) 2021 < >
;;; This file 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 , or ( at your option )
;... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/ed8c76f566de8f6c10cdace515b3d076026258f0/src/property/etc-default.lisp | lisp | Consfigurator -- Lisp declarative configuration management system
This file is free software; you can redistribute it and/or modify
either version 3 , or ( at your option )
any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty o... |
Copyright ( C ) 2021 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :consfigurator.property.etc-default)
(named-readtables:in-readtable :consfigurator)
(defpropspec contains :posix
(file &rest pa... |
643faa913e428113348593a7284297576cc5ef24b88c8a8ae42b30d0f3cdbff7 | kind2-mc/kind2 | lustreContext.mli | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you
may not use this file except in compliance with the License . You
may obtain a copy of the License a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/701bdf318852d30ceb5bd7cce7dd1e25fb9c41a4/src/lustre/lustreContext.mli | ocaml | * Context
* Node or function not found, possible forward reference
* Create an initial empty context.
* Sets the flag indicating there are unguarded pre's in the lustre code, and
we need to guard them.
* Resets the flag indicating there are unguarded pre's in the lustre code,
and we need to guard them.
* The value... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you
may not use this file except in compliance with the License . You
may obtain a copy of the License a... |
c7000adeb6b08195015890ede46db90f10bd519692664f9fba363e9808cc3c3c | fjames86/fsocket | netcat.lisp | Copyright ( c ) 2015 < >
This code is licensed under the MIT license .
;;; This file defines a simple function for intercepting and forwarding TCP traffic.
(defpackage #:netcat
(:use #:cl #:fsocket))
(in-package #:netcat)
(defun hd (buffer &key (start 0) end (stream *standard-output*))
"Hexdump output."
... | null | https://raw.githubusercontent.com/fjames86/fsocket/499a0c4e3abe3defdc9b5af765d77f81426fd914/test/netcat.lisp | lisp | This file defines a simple function for intercepting and forwarding TCP traffic.
())
(defun make-listen (fd)
(make-instance 'listen-pollfd
:fd fd
:events (poll-events :pollin)))
())
(defun make-local (fd)
(make-instance 'local-pollfd
:fd fd
:events (poll-events :pollin)))
())
(defun m... | Copyright ( c ) 2015 < >
This code is licensed under the MIT license .
(defpackage #:netcat
(:use #:cl #:fsocket))
(in-package #:netcat)
(defun hd (buffer &key (start 0) end (stream *standard-output*))
"Hexdump output."
(let ((lbuff (make-array 16))
(len (- (or end (length buffer)) start)))
... |
3eb28f7c79b71c96df81ee62429a044c9c39065cdda1c31b85c6dcbc57f75b11 | input-output-hk/cardano-wallet | Checkpoints.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE TypeFamilies #
-- |
Copyright : © 2021
-- License: Apache-2.0
--
-- Data type that represents a collection of checkpoints.
-- Each checkpoints is associated with a 'Slot'.
module Cardano.Wallet.Ch... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/src/Cardano/Wallet/Checkpoints.hs | haskell | |
License: Apache-2.0
Data type that represents a collection of checkpoints.
Each checkpoints is associated with a 'Slot'.
* Checkpoints
* Checkpoint hygiene
------------------------------------------------------------------------------
Checkpoints
------------------------------------------------------------... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE TypeFamilies #
Copyright : © 2021
module Cardano.Wallet.Checkpoints
Checkpoints
, checkpoints
, loadCheckpoints
, fromGenesis
, getLatest
, findNearestPoint
* Delta ty... |
3ee6c9f147b2f54065e64fabadf68cb1c010bab0740c6d750bec2bcfd3b64bee | c4-project/c4f | pp.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus/src/pp.ml | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
09940152c19565b60ebeaf261f84806e22ae670d6229b953de22b3099a8e3035 | conal/Fran | VectorSpaceB.hs | -- Behavior-level vector spaces
module VectorSpaceB where
import BaseTypes
import Behavior
import qualified VectorSpace as VS
infixr 7 *^, ^/, `dot`
infixl 6 ^+^, ^-^
zeroVector :: VS.VectorSpace v => Behavior v
zeroVector = constantB VS.zeroVector
(*^) :: VS.VectorSpace v => Behavior Scalar
... | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/VectorSpaceB.hs | haskell | Behavior-level vector spaces
|
module VectorSpaceB where
import BaseTypes
import Behavior
import qualified VectorSpace as VS
infixr 7 *^, ^/, `dot`
infixl 6 ^+^, ^-^
zeroVector :: VS.VectorSpace v => Behavior v
zeroVector = constantB VS.zeroVector
(*^) :: VS.VectorSpace v => Behavior Scalar
-> Behavior v -> Beha... |
a34d5d92defc0dcfa88b6e0b31f81c99698d05811fe50d170a0b98b368a9e319 | meiersi/blaze-builder | UnboxedAppend.hs | # LANGUAGE CPP , BangPatterns , Rank2Types , MagicHash #
-- |
-- Module : UnboxedAppend
Copyright : ( c ) 2010
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : experimental
Portability : tested on GHC only
--
-- Try using unboxed pointers for the continuation calls to... | null | https://raw.githubusercontent.com/meiersi/blaze-builder/2d8ce308951656ebf0318097989dc1c017dcff83/benchmarks/UnboxedAppend.hs | haskell | |
Module : UnboxedAppend
License : BSD3-style (see LICENSE)
Stability : experimental
Try using unboxed pointers for the continuation calls to make abstract
appends go faster.
FIXME: is this the right module for access to 'Chunks'?
-------------------------------------------------------------------... | # LANGUAGE CPP , BangPatterns , Rank2Types , MagicHash #
Copyright : ( c ) 2010
Maintainer : < >
Portability : tested on GHC only
module UnboxedAppend where
import Foreign
import Foreign.UPtr
import Data.Monoid
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
#ifde... |
fdce5bfd3bee3f003c512775b7e7229897400c8824a21bb74f7ef4cd2d691939 | semilin/layoup | aptsym.lisp |
(MAKE-LAYOUT :NAME "aptsym" :MATRIX
(APPLY #'KEY-MATRIX '("wcdl,.youq" "rsthkpneia" "vbgm'/fjxz"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/aptsym.lisp | lisp |
(MAKE-LAYOUT :NAME "aptsym" :MATRIX
(APPLY #'KEY-MATRIX '("wcdl,.youq" "rsthkpneia" "vbgm'/fjxz"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
f45205cbbaf1259e21f2e1216b8ac36fefa444f1ccf60068335d4317573416a2 | goldfirere/units | TH.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Metrology.TH
Copyright : ( C ) 2014
-- License : BSD-style (see LICENSE)
Maintainer : ( )
-- Stability : experimental
-- Portability : non-portable
--
This module exports functions to... | null | https://raw.githubusercontent.com/goldfirere/units/4941c3b4325783ad3c5b6486231f395279d8511e/units/Data/Metrology/TH.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Metrology.TH
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
---------------------------------------------------------------------------
# OPTIONS_HADDOCK prune #
for i... | Copyright : ( C ) 2014
Maintainer : ( )
This module exports functions to make working with
@units@ a little more convenient .
# LANGUAGE TemplateHaskell , CPP #
module Data.Metrology.TH (
evalType,
declareDimension, declareCanonicalUnit, declareDerivedUnit, declareMonoUnit,
declareConsta... |
0b0dd130906a6e2fae91e1fdde31de36361a0f52c6ab3b361aa8934f9dada90b | tisnik/clojure-examples | logo3.clj | (spit"logo.svg"(str"<svg xmlns='' width='480'
version='1.1' height='480'>"(loop[i 0 R 255 G 255 B 0 o ""](let[r(- 128
i)q(str"fill='rgb("R","G","B")' style='fill-opacity:.06'/>")a(/ i 12.
)b(+ i 80)x(+ 240(* b(Math/cos a)))y(+ 240(* b(Math/sin a)))p(format
"<circle cx='%f' cy='%f' r='%d' "x y r)](if(< i 128)(recur(inc ... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/logos/logo3.clj | clojure | (spit"logo.svg"(str"<svg xmlns='' width='480'
version='1.1' height='480'>"(loop[i 0 R 255 G 255 B 0 o ""](let[r(- 128
i)q(str"fill='rgb("R","G","B")' style='fill-opacity:.06'/>")a(/ i 12.
)b(+ i 80)x(+ 240(* b(Math/cos a)))y(+ 240(* b(Math/sin a)))p(format
"<circle cx='%f' cy='%f' r='%d' "x y r)](if(< i 128)(recur(inc ... | |
1ec723b643c8eb084f50c0896d09e4beaadcb8503cafb12fd31947a935c43c65 | cedlemo/OCaml-GI-ctypes-bindings-generator | DBus_object_manager_client_flags.mli | open Ctypes
type t = None | Do_not_auto_start
type t_list = t list
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val list_of_value:
Unsigned.uint32 -> t_list
val list_to_value:
t_list -> Unsigned.uint32
val t_list_view : t_list typ
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/DBus_object_manager_client_flags.mli | ocaml | open Ctypes
type t = None | Do_not_auto_start
type t_list = t list
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val list_of_value:
Unsigned.uint32 -> t_list
val list_to_value:
t_list -> Unsigned.uint32
val t_list_view : t_list typ
| |
63daae5c4ed8da4f6c0ef51590206ba631e405a784e94668524302adbf9f6b10 | ChrisPenner/charter | Random.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Examples.Random where
import Charts
import Control.Monad.Random
import Data.Traversable
import Data.Aeson
import Control.Concurrent
randomChart :: IO Chart
randomChart = do
rows <- for [1..10] $ \i -> do
a <- randomRIO (0, 1)
... | null | https://raw.githubusercontent.com/ChrisPenner/charter/c2d8c0c6e6654b140e2837f2da76aa972d6ecf32/app/Examples/Random.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
module Examples.Random where
import Charts
import Control.Monad.Random
import Data.Traversable
import Data.Aeson
import Control.Concurrent
randomChart :: IO Chart
randomChart = do
rows <- for [1..10] $ \i -> do
a <- randomRIO (0, 1)
b <- randomRIO (0, ... |
0b58953cff83853b6086ffb23690662637ced11b7857d72e26b6479288aa0aca | music-suite/music-score | Compose.hs |
-- |
Monadic composition .
--
Based on an operator found in /Composing Monads/ by and Duponcheel ( 1993 ) .
--
-- Should be moved to a separate package `control-monad-compose`.
--
module Control.Monad.Compose (
mjoin,
mbind
) where
import Control.Monad
import Data.Set (Set)
import Data.Map (M... | null | https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Control/Monad/Compose.hs | haskell | |
Should be moved to a separate package `control-monad-compose`.
Starts off with m (n (m (n a)))
Sequences inner structure to get m (m (n (n a)))
Folds outer level to get m (n (n a))
Folds inner level to get m (n a) |
Monadic composition .
Based on an operator found in /Composing Monads/ by and Duponcheel ( 1993 ) .
module Control.Monad.Compose (
mjoin,
mbind
) where
import Control.Monad
import Data.Set (Set)
import Data.Map (Map)
import Data.Typeable
import Data.Foldable (Foldable)
import Data.Traversable ... |
60c8237ed0a6c43b2c007726a737d793076be0bbd0e817bd151cf13b7f504143 | clojure-interop/java-jdk | JavaFileManager$Location.clj | (ns javax.tools.JavaFileManager$Location
"Interface for locations of file objects. Used by file managers
to determine where to place or search for file objects."
(:refer-clojure :only [require comment defn ->])
(:import [javax.tools JavaFileManager$Location]))
(defn get-name
"Gets the name of this location.... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.tools/src/javax/tools/JavaFileManager%24Location.clj | clojure | (ns javax.tools.JavaFileManager$Location
"Interface for locations of file objects. Used by file managers
to determine where to place or search for file objects."
(:refer-clojure :only [require comment defn ->])
(:import [javax.tools JavaFileManager$Location]))
(defn get-name
"Gets the name of this location.... | |
cad48116eea49e8825fe59882a54e12dd4ad915c123f0872dfe8e4629b549929 | jochasinga/firma | api_server.ml | open Core
open Async
open Cohttp_async
open Merkle
(* given filename: api_server.ml compile with:
* $ dune build api_server.exe
*)
let handler ~body:_ _sock req =
let uri = Cohttp.Request.uri req in
match Uri.path uri with
| "/test" ->
Uri.get_query_param uri "hello"
|> Option.map ~f:(fun v -> "hello:... | null | https://raw.githubusercontent.com/jochasinga/firma/ec6c55ed8a86b513df026697f8ecae113b7a297c/api_server.ml | ocaml | given filename: api_server.ml compile with:
* $ dune build api_server.exe
| open Core
open Async
open Cohttp_async
open Merkle
let handler ~body:_ _sock req =
let uri = Cohttp.Request.uri req in
match Uri.path uri with
| "/test" ->
Uri.get_query_param uri "hello"
|> Option.map ~f:(fun v -> "hello: " ^ v)
|> Option.value ~default:"No param hello supplied"
|> Server.respo... |
7413e000eaff6a8917d60c1ad210da6f4c8d3e069b6aa3e0e9dcdc8215792f2f | webyrd/n-grams-for-synthesis | cond-expand.scm | ; Implementing SRFI-0 as a Read-Time Application
;
; See
; /~oleg/ftp/Scheme/read-time-apply.txt
; for more details on reader-constructors, read-time applications, and
; their implementation. Refer to SRFI-0, "Feature-based conditional expansion
; construct," for the definition and discussion of 'cond-expand'
-0/srf... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-10/cond-expand.scm | scheme | Implementing SRFI-0 as a Read-Time Application
See
/~oleg/ftp/Scheme/read-time-apply.txt
for more details on reader-constructors, read-time applications, and
their implementation. Refer to SRFI-0, "Feature-based conditional expansion
construct," for the definition and discussion of 'cond-expand'
We assume tha... | -0/srfi-0.html
question ( for example , using various switches or profiles/.rc files , or
Note , contrary to what says , the changes to the reader required to
$ Id$
(##include "read-apply.scm")
(define-reader-ctor 'cond-expand
(lambda clauses
(define (feature-present? id)
(memq id ALL-FEATURES)... |
20f6271b6b611b97c664e05bdcd7f0a07c778c86411d537cd4a6619f7beee959 | argp/bap | batMarshal.ml |
* BatMarshal - Extended marshaling operations
* Copyright ( C ) 1997 * 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batMarshal.ml | ocaml |
* BatMarshal - Extended marshaling operations
* Copyright ( C ) 1997 * 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2... | |
d9adae49175b29416cd5ea9e466f0b3b79e01e8f7e7aa5c8f4b90a45394a7c9f | onaio/milia | async_export_test.cljs | (ns milia.api.async-export-test
(:require-macros [cljs.test :refer (is deftest testing)])
(:require [milia.api.async-export :as async-export]))
(deftest handle-response-test
(testing "handle export-url, on-export-url called, on-stop called"
(let [sample-url ""
response {:status 200
... | null | https://raw.githubusercontent.com/onaio/milia/0f3a7317da9be1caf42f9f6bbcde92558dc274cd/test/cljs/milia/api/async_export_test.cljs | clojure | (ns milia.api.async-export-test
(:require-macros [cljs.test :refer (is deftest testing)])
(:require [milia.api.async-export :as async-export]))
(deftest handle-response-test
(testing "handle export-url, on-export-url called, on-stop called"
(let [sample-url ""
response {:status 200
... | |
d3f1b6faf5eaa5918fc8cd499fb2682964bdeb82f236a5b0d1d2704280dddbff | ddmcdonald/sparser | new-bio-meth.lisp | (in-package :sparser)
;; all mmoved to either academic-bio-methods or bio-methods or medical-taxonomy
| null | https://raw.githubusercontent.com/ddmcdonald/sparser/4bb59f0989152f059f7b008ca4bfd89501bae04c/Sparser/code/s/grammar/model/sl/biology/new-defs/new-bio-meth.lisp | lisp | all mmoved to either academic-bio-methods or bio-methods or medical-taxonomy | (in-package :sparser)
|
a9d44b76e1f58ac72948ab1a7857d21a13c14f11b5d9fff622c0911c9ff9c56e | grin-compiler/grin | GeneralizedUnboxingSpec.hs | # LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns #
module Transformations.Optimising.GeneralizedUnboxingSpec where
import Transformations.Optimising.GeneralizedUnboxing
import Transformations.Names (ExpChanges(..))
import Test.Hspec
import Grin.Grin
import Grin.TH
import Test.Test hiding (newVar)
import Tes... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/Transformations/Optimising/GeneralizedUnboxingSpec.hs | haskell | In this case the vectorisation did not happen.
:: CInt Int
:: CNat Int | # LANGUAGE OverloadedStrings , QuasiQuotes , ViewPatterns #
module Transformations.Optimising.GeneralizedUnboxingSpec where
import Transformations.Optimising.GeneralizedUnboxing
import Transformations.Names (ExpChanges(..))
import Test.Hspec
import Grin.Grin
import Grin.TH
import Test.Test hiding (newVar)
import Tes... |
9cb7617cd257c4564c3331ef319b72125f09d0279da10fa037485718a033a6f4 | spawnfest/eep49ers | io_proto_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2019 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/io_proto_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2009 - 2019 . 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(io_proto_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end... |
978e611f8a5502e9bb2a7c8c6656196932b8c628879f0a4ddaf184c9d91a54f4 | alephcloud/hs-aws-kinesis-client | Kit.hs | Copyright ( c ) 2013 - 2015 PivotCloud , Inc.
--
. . Client . Producer . Kit
--
-- Please feel free to contact us at with any
-- contributions, additions, or other feedback; we would love to hear from
-- you.
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may
-- not use this file ... | null | https://raw.githubusercontent.com/alephcloud/hs-aws-kinesis-client/8ef77b8b7d7e9a840b1c7bd39b44861957580a1c/src/Aws/Kinesis/Client/Producer/Kit.hs | haskell |
Please feel free to contact us at with any
contributions, additions, or other feedback; we would love to hear from
you.
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
WARRANTIES OR COND... | Copyright ( c ) 2013 - 2015 PivotCloud , Inc.
. . Client . Producer . Kit
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
# LANGUAGE PatternSynonyms #
# LANGUAGE UnicodeSyntax #
Module : . . Client... |
9619c7a6c83d740920c4a5a37dbda982f499e422b6fb889ebebc5662de2c151c | kostmo/circleci-failure-tracker | Main.hs | {-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString as B
import Data.Either (fromRight)
import qualified Data.Maybe as Maybe
import Data.Text ... | null | https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/webservice/src/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
import qualified Data.ByteString as B
import Data.Either (fromRight)
import qualified Data.Maybe as Maybe
import Data.Text (Text)
import qualified Data.Text... |
2a158a6eac430179b250c626a61f6b20cb1fffe19004b4b9cfd62b3bab3ef242 | seancorfield/engine | input.clj | copyright ( c ) 2015 - 2016
(ns engine.input
"Engine input is a collection of data sources."
(:require [engine.queryable :as q]))
(defprotocol DataSourceCollection
"Collection of data sources by name."
(find-dsn [this dsn] "Return the datasource or nil.")
(get-dsn [this dsn] "Return the datasource or t... | null | https://raw.githubusercontent.com/seancorfield/engine/aa22468c1e86b123b5bd0d474b9544cedea9502e/src/engine/input.clj | clojure | copyright ( c ) 2015 - 2016
(ns engine.input
"Engine input is a collection of data sources."
(:require [engine.queryable :as q]))
(defprotocol DataSourceCollection
"Collection of data sources by name."
(find-dsn [this dsn] "Return the datasource or nil.")
(get-dsn [this dsn] "Return the datasource or t... | |
8985be0647b171c2640337bcd3631631380337ce4afe47d7dc3255dc54875afd | arrdem/shelving | compile_docs.clj | (ns compile-docs
"A quick hack for rebuilding docs containing manually situated var references."
{:author ["Reid 'arrdem' McKenzie <>"]
:license "-v10.html"
:source ""}
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log])
(:import java.io.Fil... | null | https://raw.githubusercontent.com/arrdem/shelving/27439bfcb2f3438d5b23fcd468360bda491002f1/src/dev/clj/compile_docs.clj | clojure | (ns compile-docs
"A quick hack for rebuilding docs containing manually situated var references."
{:author ["Reid 'arrdem' McKenzie <>"]
:license "-v10.html"
:source ""}
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log])
(:import java.io.Fil... | |
a403ea4726af65179845915108956f0f33915df03c2b862a13626e59ca9e9a77 | jordanthayer/ocaml-search | wastar_histo.ml | *
@author jtd7
@since 2012 - 03 - 31
@author jtd7
@since 2012-03-31
*)
open Lacaml.Impl.D
open Wted_astar_est
let poly_features degree x =
(** [poly_features degree x] get a polynomial feature array. *)
Array.init (degree + 1) (fun d -> x ** (float d))
let compute_poly degree coeffs x =... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/progress_estimate/wastar_histo.ml | ocaml | * [poly_features degree x] get a polynomial feature array. | *
@author jtd7
@since 2012 - 03 - 31
@author jtd7
@since 2012-03-31
*)
open Lacaml.Impl.D
open Wted_astar_est
let poly_features degree x =
Array.init (degree + 1) (fun d -> x ** (float d))
let compute_poly degree coeffs x =
* [ compute_poly ] compute a polynomial in [ x ] given
... |
bb419ed37e2becbe44f52d36612c34800065031e3a32af31c87ca27b0f171c11 | patricoferris/ocaml-multicore-monorepo | caqti_driver_sqlite3.ml | Copyright ( C ) 2017 - -2021 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib-driver/caqti_driver_sqlite3.ml | ocaml | TODO: Check integer ranges? The Int64.to_* functions don't raise.
TODO: Improve parsing.
should not happen | Copyright ( C ) 2017 - -2021 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... |
663b309455b445ab2f26f6cab1ab6956c702a7f2ee9709c3c5d75aa38ff703d7 | JustusAdam/schedule-planner | Serialize.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE UnicodeSyntax #
|
Module : $ Header$
Description : ( de)serializing in- and output
Copyright : ( c ) , 2015
License : LGPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Hold the capeablilities to get and export in- a... | null | https://raw.githubusercontent.com/JustusAdam/schedule-planner/ba501c4c8332b5e11379fb500d867fdc8082d482/src/SchedulePlanner/Serialize.hs | haskell | # LANGUAGE OverloadedStrings #
| How many days a week has
| The caracter width of a single slot in output
|Base structure of the input JSON file
I am so sorry
|
Convert a single 'MappedSchedule' to a JSON 'Value'
|Convert a suitable Map to a JSON Value
|Shorten a subject to something printable
|
Transform a ... | # LANGUAGE UnicodeSyntax #
|
Module : $ Header$
Description : ( de)serializing in- and output
Copyright : ( c ) , 2015
License : LGPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Hold the capeablilities to get and export in- and output data as well as ( de)seri... |
f4d89e22a588977daac3dd0f741d1576cb179a3cb377b0d4b1c431d3cbd844e5 | DavidAlphaFox/egame | tutorial_constants.erl | %%
Autogenerated by Thrift Compiler ( 0.11.0 )
%%
%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
%%
-module(tutorial_constants).
-include("tutorial_types.hrl").
-export([mapconstant/1, mapconstant/2]).
mapconstant("hello") -> "world";
mapconstant("goodnight") -> "moon".
mapconstant("hello", ... | null | https://raw.githubusercontent.com/DavidAlphaFox/egame/b00293964f309eb4f7458d9610a5ec8dd18ea062/src/gen-erl/tutorial_constants.erl | erlang |
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
| Autogenerated by Thrift Compiler ( 0.11.0 )
-module(tutorial_constants).
-include("tutorial_types.hrl").
-export([mapconstant/1, mapconstant/2]).
mapconstant("hello") -> "world";
mapconstant("goodnight") -> "moon".
mapconstant("hello", _) -> "world";
mapconstant("goodnight", _) -> "moon";
mapconstant(_, Default)... |
ba5d57488ecac98345d065420643df6f4938b5b8edfdf9f053055c97c7123fe7 | yogthos/yuggoth | comments.cljs | (ns yuggoth.components.comments
(:require [reagent.core :as reagent :refer [atom]]
[yuggoth.session :as session]
[yuggoth.util
:refer [GET
POST
text
markdown
text-input]]))
(defn example [source &... | null | https://raw.githubusercontent.com/yogthos/yuggoth/901541c5809fb1e77c249f26a3aa5df894c88242/src-cljs/yuggoth/components/comments.cljs | clojure | (ns yuggoth.components.comments
(:require [reagent.core :as reagent :refer [atom]]
[yuggoth.session :as session]
[yuggoth.util
:refer [GET
POST
text
markdown
text-input]]))
(defn example [source &... | |
5470a60f30e1792294efab7c7a195297d752e63c2ed510669e62e7b4c5c418e3 | cutsea110/Kestrel | NoFoundation.hs | module Import.NoFoundation
( module Import
) where
import ClassyPrelude.Yesod as Import hiding (Reader)
import Model as Import
import Settings as Import
import Settings.StaticFiles as Import
import Yesod.Auth as Import
import Yesod.Core.Types as Import (loggerSet... | null | https://raw.githubusercontent.com/cutsea110/Kestrel/9af7f7ab17a15854e21cc6cb25ac922379a97df7/Import/NoFoundation.hs | haskell | module Import.NoFoundation
( module Import
) where
import ClassyPrelude.Yesod as Import hiding (Reader)
import Model as Import
import Settings as Import
import Settings.StaticFiles as Import
import Yesod.Auth as Import
import Yesod.Core.Types as Import (loggerSet... | |
267dd5a5f16adca9192d524c2fe56774e418163ead6b4105af0943a8b77b7936 | ucsd-progsys/liquidhaskell | Test2.hs | {-@ LIQUID "--expect-any-error" @-}
module Test2 () where
import Language.Haskell.Liquid.Prelude
myabs x = if x `gt` 0 then x else 0 `minus` x
n = choose 0
prop_absf =
let zz = (myabs n) `geq` 4 in
liquidAssertB zz
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Test2.hs | haskell | @ LIQUID "--expect-any-error" @ | module Test2 () where
import Language.Haskell.Liquid.Prelude
myabs x = if x `gt` 0 then x else 0 `minus` x
n = choose 0
prop_absf =
let zz = (myabs n) `geq` 4 in
liquidAssertB zz
|
0bed67920e04846b47424a4a1f62d6910f06d4b06c1708f98635427b4c21c076 | ollef/sixten | Data.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module Elaboration.TypeCheck.Data where
import Protolude hiding (typeRep)
import Data.Vector(Vector)
import qualified Data.Vector as Vector
import qualified Builtin.Names as Builtin
import Driver.Query
import Effect
import qua... | null | https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Elaboration/TypeCheck/Data.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: These vars are typechecked twice (in checkAndGeneraliseDefs as the
expected type and here). Can we clean this up?
TODO: Check for escaping type variables and improve error message
-----------------------------------------------------------------------------
Type helpers | # LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
module Elaboration.TypeCheck.Data where
import Protolude hiding (typeRep)
import Data.Vector(Vector)
import qualified Data.Vector as Vector
import qualified Builtin.Names as Builtin
import Driver.Query
import Effect
import qualified Effect.Context as Context
im... |
5cb2071e801ad214ce51eec954118756d7fe715bda6169230dcee4a75c18e8f4 | ekmett/multipass | Pass.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Pass
Copyright : ( C ) 2012 - 2013
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GADTs , Rank2Types )
--
... | null | https://raw.githubusercontent.com/ekmett/multipass/18ce305f7196f9b386472582a2efaaac1d180bc1/Data/Pass.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Pass
License : BSD-style (see the file LICENSE)
Stability : experimental
--------------------------------------------------------------------------
* Evaluation
* Single pass calculations
** Embedding sing... | Copyright : ( C ) 2012 - 2013
Maintainer : < >
Portability : non - portable ( GADTs , Rank2Types )
module Data.Pass
(
Eval(..), (@@)
, Naive(..), (@@@)
, Pass(..)
, Passable(..)
, Step(..)
* Multipass calculations
, Calc(..)
, Calculation(..)
, Prep(..)
, L(..)
, (@#... |
588a9f7d726adc3d5dadc09f935a9f8ad72642b75f6003d113fd347b37529050 | mfp/ocaml-sqlexpr | pa_sql.ml |
open Printf
open Camlp4.PreCast
open Pa_estring
type output_type =
[ `Int | `Text | `Blob | `Float | `Int32 | `Int64 | `Bool]
type input_type = [output_type | `Any]
type no_output_element = [ `Literal of string | `Input of input_type * bool ]
type sql_element =
[ no_output_element
| `Output of no_output_... | null | https://raw.githubusercontent.com/mfp/ocaml-sqlexpr/5b22129a837d43df189bb29aa1d594412075e4f6/src/syntax/pa_sql.ml | ocaml | nullable
complete the `Input sql_element, recognizing the ? that indicates it's
* nullable, if present
read the trailing ? and { after a @x output expression delimiter, then read
* the expression up to the next }
read the output expression up to the trailing '}'. Disallow output
* expressions when parsing the... |
open Printf
open Camlp4.PreCast
open Pa_estring
type output_type =
[ `Int | `Text | `Blob | `Float | `Int32 | `Int64 | `Bool]
type input_type = [output_type | `Any]
type no_output_element = [ `Literal of string | `Input of input_type * bool ]
type sql_element =
[ no_output_element
let collected_statements =... |
dca0b2f7d59a2a6c01cdfab15461e3960d558f2ea4f162ca80febc4b19f6d5e9 | anishathalye/knox | basic.rkt | #lang rosette/safe
(require rackunit
"verilog/counter.rkt"
(only-in "verilog/print-test.rkt" new-zeroed-print_test_s)
rosutil
yosys
(only-in racket/base string-append parameterize regexp-match))
(test-case "basic verification: when enable and reset are not set, value doesn... | null | https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/test/yosys/basic.rkt | racket | display
write | #lang rosette/safe
(require rackunit
"verilog/counter.rkt"
(only-in "verilog/print-test.rkt" new-zeroed-print_test_s)
rosutil
yosys
(only-in racket/base string-append parameterize regexp-match))
(test-case "basic verification: when enable and reset are not set, value doesn... |
7f2854516d6eaf5d173cb0c03129c05e86d5a18f8419c1e7cc1974d93e47db5b | samply/blaze | list.clj | (ns blaze.db.impl.search-param.list
"#list"
(:require
[blaze.coll.core :as coll]
[blaze.db.impl.codec :as codec]
[blaze.db.impl.index.resource-search-param-value :as r-sp-v]
[blaze.db.impl.protocols :as p]
[blaze.db.impl.search-param.special :as special]
[blaze.db.impl.search-param.util :as ... | null | https://raw.githubusercontent.com/samply/blaze/6ef8eff7687513554131819d080fed9aaf531a34/modules/db/src/blaze/db/impl/search_param/list.clj | clojure | (ns blaze.db.impl.search-param.list
"#list"
(:require
[blaze.coll.core :as coll]
[blaze.db.impl.codec :as codec]
[blaze.db.impl.index.resource-search-param-value :as r-sp-v]
[blaze.db.impl.protocols :as p]
[blaze.db.impl.search-param.special :as special]
[blaze.db.impl.search-param.util :as ... | |
af9d36fe66f1e577a0c2e041d60f1f5f2bfcf8eafd914c04009e7a87aad24c6d | LuxLang/lux | reader.clj | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(ns lux.reader
(:require [clojure.string :as string]
clojure.core.match
clojure.core.match.array
[lux.base ... | null | https://raw.githubusercontent.com/LuxLang/lux/91bc060bc498a0d2418198cfcb9dc39636d1d867/lux-bootstrapper/src/lux/reader.clj | clojure | [Tags]
[Utils]
[Exports] | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(ns lux.reader
(:require [clojure.string :as string]
clojure.core.match
clojure.core.match.array
[lux.base ... |
540eb2497eb0bf6b828734613d4be43815d543bebfd543e81bcffafb9f04c855 | srid/neuron | Version.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE NoImplicitPrelude #
module Neuron.Version where
import Data.Tagged (Tagged (..))
import Data.Version (showVersion)
import Neuron.Frontend.Route.Data.Types (NeuronVersion)
import Paths_neuron (version)
import Relude (ToText (toText), ($))
| ... | null | https://raw.githubusercontent.com/srid/neuron/1f127b8343dbe05e057688988b289066df1cdedb/src/Neuron/Version.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
# LANGUAGE NoImplicitPrelude #
module Neuron.Version where
import Data.Tagged (Tagged (..))
import Data.Version (showVersion)
import Neuron.Frontend.Route.Data.Types (NeuronVersion)
import Paths_neuron (version)
import Relude (ToText (toText), ($))
| Neuron cabal library version
neuron... |
3cf1194351109ebbcdf61eb3c14bcebfcbc8b65583eeec9ac8785ffe1f3d96ea | 223kazuki/clj-graphql-server | cors.clj | (ns graphql-server.handler.cors
(:require [integrant.core :as ig]))
(defmethod ig/init-key ::preflight [_ _]
(fn [req] {:status 200}))
| null | https://raw.githubusercontent.com/223kazuki/clj-graphql-server/0994d2bb98cd483dcb1c02a8175766e4fd35c861/src/graphql_server/handler/cors.clj | clojure | (ns graphql-server.handler.cors
(:require [integrant.core :as ig]))
(defmethod ig/init-key ::preflight [_ _]
(fn [req] {:status 200}))
| |
b8817340dd314a743e7b55bf81cddec2e46b4a5e8c7a6dc897246f5393c84f92 | seizans/happiage | Profile.hs | module Handler.Profile where
import Import
-- ProfilePage(新郎新婦紹介ページ)
getProfileR :: Handler RepHtml
getProfileR = do
profileEntities <- runDB $ selectList [] [Asc ProfileOrder]
let profiles = map (\(Entity _ model) -> model) profileEntities
defaultLayout $
$(widgetFile "profile")
| null | https://raw.githubusercontent.com/seizans/happiage/38843c2a8fe3306e4a8e7d85899434c6ed4210d7/src/Handler/Profile.hs | haskell | ProfilePage(新郎新婦紹介ページ) | module Handler.Profile where
import Import
getProfileR :: Handler RepHtml
getProfileR = do
profileEntities <- runDB $ selectList [] [Asc ProfileOrder]
let profiles = map (\(Entity _ model) -> model) profileEntities
defaultLayout $
$(widgetFile "profile")
|
56858e42f9b3b8ee4d96ba674699dcf00dd4369b5dcc274e4f6c12386dd33bb3 | plewto/Cadejo | path.clj | (ns cadejo.util.path
"Provides utilities for filename manipulation"
(:import java.io.File))
(def home-token "~") ; token representing user's home
(def current-directory-token ".")
(def parent-directory-token "..")
token for user 's cadejo directory
(def user-home (System/getProperty "user.home"))
... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/util/path.clj | clojure | token representing user's home
ISSUE: PORTABILITY
configuration directory.
The following assignment ultimately is set to cadejo-directory according
| (ns cadejo.util.path
"Provides utilities for filename manipulation"
(:import java.io.File))
(def current-directory-token ".")
(def parent-directory-token "..")
token for user 's cadejo directory
(def user-home (System/getProperty "user.home"))
cadejo - directory should hold the absolute path to the user 's ... |
218c7f05d446858f25e13bf6ddb6549d4773a2f8bbc8e9402c54b2b698a8f8d9 | aleator/Zettel-hs | ZettelKasten.hs | # LANGUAGE TypeApplications #
# LANGUAGE LambdaCase #
module ZettelKasten where
import Path
import Path.IO
import System.Process.Typed
import qualified Data.HashSet as HashSet
import qualified Data.HashMap.Strict as HashMap
import Data.HashMap.Strict (HashMap)
import ... | null | https://raw.githubusercontent.com/aleator/Zettel-hs/e7c4670689059cdb71eeb852651fc8ae6a8851ab/src/ZettelKasten.hs | haskell | No results, no ctrl-n
ctrl-n
a result
> (fzf .> readProcessStdout)
TODO: Use proper paths
TODO: Raise proper exception
TODO: This could be concurrent
Get link structure out of linked zettels
Find unlinked zettels | # LANGUAGE TypeApplications #
# LANGUAGE LambdaCase #
module ZettelKasten where
import Path
import Path.IO
import System.Process.Typed
import qualified Data.HashSet as HashSet
import qualified Data.HashMap.Strict as HashMap
import Data.HashMap.Strict (HashMap)
import ... |
d3a883a28dd0d0e8ad242752880112e701d7f3eb59ccb1a344af1ed3975d17a1 | Gbury/archsat | eq.mli | This file is free software , part of Archsat . See file " LICENSE " for more details .
(** Base Tactics for equality reasoning
This module defines a good quantity of base tactics
(i.e functions that operate on proof positions)
related to handling equalities and uninterpreted functions. *)
open Proof
*... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/proof/eq.mli | ocaml | * Base Tactics for equality reasoning
This module defines a good quantity of base tactics
(i.e functions that operate on proof positions)
related to handling equalities and uninterpreted functions.
* Allows t prove goals that are of the form [x = x].
* Prove an equality using transitivity with the chains... | This file is free software , part of Archsat . See file " LICENSE " for more details .
open Proof
* { 2 Simple tactics }
val refl : (pos, unit) tactic
val trans : (Term.t * Term.t) list -> (pos, unit) tactic
val replace : eq:((pos, unit) tactic) -> by:Term.t -> Term.t -> (pos, pos) tactic
val subst :
eq:((po... |
4f83fc3719b73b4f61fb7784d04d1a95e9706a5748dd5d514b7194c9b58559ae | janestreet/core | test_string_id.ml | open! Core
open! Import
open! String_id
open! Int.Replace_polymorphic_compare
module Unit_tests_util = struct
let to_bin_str t ~bin_writer_t ~bin_size_t =
let write = bin_writer_t.Bin_prot.Type_class.write in
let size = bin_size_t t in
let buf = Bigstring.create size in
let len = write buf ~pos:0 t i... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_string_id.ml | ocaml | Test [Make_with_validate_without_pretty_printer].
Even integers are the only valid identifiers | open! Core
open! Import
open! String_id
open! Int.Replace_polymorphic_compare
module Unit_tests_util = struct
let to_bin_str t ~bin_writer_t ~bin_size_t =
let write = bin_writer_t.Bin_prot.Type_class.write in
let size = bin_size_t t in
let buf = Bigstring.create size in
let len = write buf ~pos:0 t i... |
ea7f3199ebff7fd2eccbd5080261a7cff6857e4346e52b22a8418b44a69eaa55 | input-output-hk/project-icarus-importer | Configuration.hs | {-# LANGUAGE Rank2Types #-}
-- | Configuration part of block processing.
module Pos.Block.Configuration
( BlockConfiguration (..)
, HasBlockConfiguration
, blockConfiguration
, withBlockConfiguration
-- * Constants mentioned in paper
, networkDiameter
-- * Chain quality
, nonCritical... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/block/src/Pos/Block/Configuration.hs | haskell | # LANGUAGE Rank2Types #
| Configuration part of block processing.
* Constants mentioned in paper
* Chain quality
* Other constants
^ Estimated time for broadcasting messages
^ Numbers of headers put in message in recovery mode.
Chain quality thresholds and other constants to detect
suspicious things.
| If chai... |
module Pos.Block.Configuration
( BlockConfiguration (..)
, HasBlockConfiguration
, blockConfiguration
, withBlockConfiguration
, networkDiameter
, nonCriticalCQBootstrap
, criticalCQBootstrap
, nonCriticalCQ
, criticalCQ
, criticalForkThreshold
, fixedTimeCQ
, fixedTi... |
4abb83ecf18b7997aa30af845f7ab99fae1b3459791ed9081f312e05b96108b5 | ryanpbrewster/haskell | PROB.hs | -- PROB.hs
- Problem
-
- A random string is constructed so that the probability of choosing each subsequent symbol is based on a fixed underlying symbol frequency .
-
- GC - content offers us natural symbol frequencies for constructing random DNA
- strings . If the GC - content is x , then we set the ... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/Rosalind/PROB.hs | haskell | PROB.hs
P(str) = Product[ P(str[i]) ]
The probability is the product of each character's individual probability
They are independent trials
log(P(str))/log(10) = log( Product[ P(str[i]) ] )/log(10)
= Sum[ log(P(str[i]))/log(10) ]
If we're going to be taking the log of P(str) anyways,
we can ... |
- Problem
-
- A random string is constructed so that the probability of choosing each subsequent symbol is based on a fixed underlying symbol frequency .
-
- GC - content offers us natural symbol frequencies for constructing random DNA
- strings . If the GC - content is x , then we set the symbol freq... |
23280d0bdd425601dc4a15a4db1cefa9277b31ef8e2621ffdd3286c0514a0952 | racket/redex | info.rkt | #lang info
(define collection 'multi)
(define deps '("base"
"compiler-lib"
"rackunit-lib"
"redex-gui-lib"
"slideshow-lib"
"math-lib"
"plot-lib"))
(define build-deps '())
(define pkg-desc "PLT Redex examples")
(define pkg-auth... | null | https://raw.githubusercontent.com/racket/redex/5d2626d1c1b3c557ce721228fc5b5c51e5d4e841/redex-examples/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("base"
"compiler-lib"
"rackunit-lib"
"redex-gui-lib"
"slideshow-lib"
"math-lib"
"plot-lib"))
(define build-deps '())
(define pkg-desc "PLT Redex examples")
(define pkg-auth... | |
57dfd843c583d84192eddfd567e1fdb01bd0c8354b754971c86c9ac00279b026 | cmsc430/www | list-vec-empty.rkt | #lang racket
(cons (make-vector 1 '()) '())
| null | https://raw.githubusercontent.com/cmsc430/www/fbd3b5d95a01ce04d23d5b3f9c7798ab7007215c/langs/test-programs/hoax/list-vec-empty.rkt | racket | #lang racket
(cons (make-vector 1 '()) '())
| |
3aa10df78e9c0fadf42d67100af3de6e93ee40a07f084a804d2d618f09a91722 | haskell-opengl/OpenGL | ProgramBinaries.hs | -----------------------------------------------------------------------------
-- |
Module : Graphics . Rendering . OpenGL.GL.Shaders . ProgramBinaries
Copyright : ( c ) 2006 - 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
This module... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/Shaders/ProgramBinaries.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
spec.
---------------------------------------------------------------------------
------------------------------------------------------------------------------ | Module : Graphics . Rendering . OpenGL.GL.Shaders . ProgramBinaries
Copyright : ( c ) 2006 - 2019
Maintainer : < >
This module corresponds to section 7.5 ( Program Binaries ) of the OpenGL 4.4
module Graphics.Rendering.OpenGL.GL.Shaders.ProgramBinaries (
ProgramBinaryFormat(..), progra... |
0b509221d5cfb771e3f5de142960b401cde725c4bb56669c0de26bd9b180cd54 | juspay/atlas | AllocationEvent.hs | # LANGUAGE UndecidableInstances #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or a... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Domain/Types/AllocationEvent.hs | haskell | # LANGUAGE UndecidableInstances #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or a... | |
96f29993cb8caad5d33dfa68410c0067f02e6b57afb8427be01f72bff70b21f5 | ocaml/odoc | root.mli |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/ocaml/odoc/ed60dca7bdc7670953433ba60f63faf008d20a71/src/model/root.mli | ocaml | * A root can be seen as a unique representative of a odoc file.
{{!t}Roots} are used by doc-ock (at the root of every resolved
path/identifier/reference) and present at the beginning of every [.odoc]
file.
not the best place for this but. |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
d829368906ed107231324770e58bda422cdd84d36ae5785139da8dbd427f628d | smart-chain-fr/tokenomia | NonEmpty.hs | {-# LANGUAGE ImportQualifiedPost #-}
module Tokenomia.Common.Data.List.NonEmpty
( prependMaybe
, singleton
, zipWith3
) where
import Data.List.NonEmpty ( NonEmpty((:|)), (<|) )
import Data.List qualified as L ( zipWith3 )
import Prelude hiding ( zipWith3 )
prependMaybe :: Ma... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/eacde8e851a2e107c8a4a09ffe85cabaa4f52953/src/Tokenomia/Common/Data/List/NonEmpty.hs | haskell | # LANGUAGE ImportQualifiedPost # |
module Tokenomia.Common.Data.List.NonEmpty
( prependMaybe
, singleton
, zipWith3
) where
import Data.List.NonEmpty ( NonEmpty((:|)), (<|) )
import Data.List qualified as L ( zipWith3 )
import Prelude hiding ( zipWith3 )
prependMaybe :: Maybe a -> NonEmpty a -> NonEmpty a
prependMaybe... |
9c96bfda4ca1693e33ac29fa9a064e8636b1d012ecdd60dda0deba76f2f1d767 | LuxLang/lux | type.clj | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(ns lux.compiler.cache.type
(:require (clojure [template :refer [do-template]]
[string :as string])
[clojure.c... | null | https://raw.githubusercontent.com/LuxLang/lux/91bc060bc498a0d2418198cfcb9dc39636d1d867/lux-bootstrapper/src/lux/compiler/cache/type.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(ns lux.compiler.cache.type
(:require (clojure [template :refer [do-template]]
[string :as string])
[clojure.c... | |
1f7bccabbc5345d1893939ddc8912b62801416584da215127319a5c695e6f1e6 | inria-parkas/sundialsml | idaFoodWeb_kry_omp.ml |
* -----------------------------------------------------------------
* $ Revision : $
* $ Date : $
* -----------------------------------------------------------------
* Programmer(s ): @ SMU
* -----------------------------------------------------------------
* OCaml port : , , Dec 2016 .
... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ida/C_openmp/idaFoodWeb_kry_omp.ml | ocaml | Problem Constants.
No. of prey (= no. of predators).
MY = number of y mesh points
Coefficient in above eqns. for a
Coefficient in above eqns. for a
Coefficient in above eqns. for a
Coefficient in above eqns. for b
Coefficient in above eqns. for d
Coefficient in above eqns. for d
Coefficient alpha in ... |
* -----------------------------------------------------------------
* $ Revision : $
* $ Date : $
* -----------------------------------------------------------------
* Programmer(s ): @ SMU
* -----------------------------------------------------------------
* OCaml port : , , Dec 2016 .
... |
b65645c3b83aa8e4942c4c83507ba7a1d1b3fdb69cbd87ecb53dad7aca053606 | goldfirere/singletons | TH.hs | # LANGUAGE ExplicitNamespaces #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Singletons.Base.TH
Copyright : ( C ) 2013
-- License : BSD-style (see LICENSE)
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
--... | null | https://raw.githubusercontent.com/goldfirere/singletons/68ce40b1473a6a65eb550318847b57160c86c284/singletons-base/src/Data/Singletons/Base/TH.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Singletons.Base.TH
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
This module contains everything you need to derive your own singletons via
definitions that are like... | # LANGUAGE ExplicitNamespaces #
Copyright : ( C ) 2013
Maintainer :
, exporting both Template Haskell functionality and
module Data.Singletons.Base.TH (
singletons, singletonsOnly, genSingletons,
promote, promoteOnly, genDefunSymbols, genPromotions,
promoteEqInstances, promoteEqInstance,
... |
00e600e37b315a261cb95644f9ec603587fd0634eb6089e0c56fcb2f47c470e5 | swarmpit/swarmpit | authentication.clj | (ns swarmpit.authentication
(:import (clojure.lang ExceptionInfo))
(:require [buddy.auth.backends.token :refer [jws-backend]]
[buddy.auth.middleware :refer [authentication-request]]
[swarmpit.handler :refer [resp-unauthorized]]
[swarmpit.couchdb.client :as cc]))
(defn- authfn
... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/authentication.clj | clojure | User API token removed
User does not exist | (ns swarmpit.authentication
(:import (clojure.lang ExceptionInfo))
(:require [buddy.auth.backends.token :refer [jws-backend]]
[buddy.auth.middleware :refer [authentication-request]]
[swarmpit.handler :refer [resp-unauthorized]]
[swarmpit.couchdb.client :as cc]))
(defn- authfn
... |
15ec8377736f7634a85ee106b42e15da1f649e3a872e2cbb16806231df687b80 | hslua/hslua | Run.hs | |
Module : HsLua . Core . Run
Copyright : © 2007–2012 ;
© 2012–2016 ;
© 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : beta
Portability : non - portable ( depends on GHC )
Helper functions to run ' LuaE ' computations .
Module : H... | null | https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-core/src/HsLua/Core/Run.hs | haskell | point. Exceptions are masked, thus avoiding some issues when using
multiple threads. All exceptions are passed through; error handling
is the responsibility of the caller.
type errors, etc.) are passed through.
# INLINABLE runEither #
garbage collector and has a finalizer attached. This means that the
state does ... | |
Module : HsLua . Core . Run
Copyright : © 2007–2012 ;
© 2012–2016 ;
© 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : beta
Portability : non - portable ( depends on GHC )
Helper functions to run ' LuaE ' computations .
Module : H... |
3afd7d1c967942b72e0009ae6d8fd4108190a3432b35b5d54aced65e15d34a09 | avh4/elm-format | FileTreeTest.hs | module Data.FileTreeTest where
import Elm.Utils ((|>))
import Data.FileTree (FileTree)
import qualified Data.FileTree as FileTree
import Data.Text (Text)
import Test.Hspec
import System.FilePath (pathSeparator)
spec_spec :: Spec
spec_spec =
describe "Data.FileTree" $ do
it "can read and write a file" $ d... | null | https://raw.githubusercontent.com/avh4/elm-format/c255a9fb400e8553930f5f08ab9c473712ffe63f/elm-format-test-lib/test/Data/FileTreeTest.hs | haskell | module Data.FileTreeTest where
import Elm.Utils ((|>))
import Data.FileTree (FileTree)
import qualified Data.FileTree as FileTree
import Data.Text (Text)
import Test.Hspec
import System.FilePath (pathSeparator)
spec_spec :: Spec
spec_spec =
describe "Data.FileTree" $ do
it "can read and write a file" $ d... | |
db16402d5eb4e9a80d003bf1c2c60353a0ee4e8e725db2c01747d95b45468c1a | LexiFi/gen_js_api | fs.mli | [@@@js.scope (Imports.fs, "promises")]
module Dirent : sig
type t = Ojs.t
val t_of_js: Ojs.t -> t
val t_to_js: t -> Ojs.t
val name: t -> string [@@js.get]
val is_file: t -> bool [@@js.call]
val is_directory: t -> bool [@@js.call]
end
module Dir : sig
type t = Ojs.t
val t_of_js: Ojs.t -> t
val t_to_... | null | https://raw.githubusercontent.com/LexiFi/gen_js_api/8d0bf75e0cab1bca74bbfb992cd6dcf47df4af40/node-test/bindings/fs.mli | ocaml | [@@@js.scope (Imports.fs, "promises")]
module Dirent : sig
type t = Ojs.t
val t_of_js: Ojs.t -> t
val t_to_js: t -> Ojs.t
val name: t -> string [@@js.get]
val is_file: t -> bool [@@js.call]
val is_directory: t -> bool [@@js.call]
end
module Dir : sig
type t = Ojs.t
val t_of_js: Ojs.t -> t
val t_to_... | |
6d866271d838f862fda77b86be2f0e351cdbba5dbd79caaacc85dce1ea2d18f0 | plumatic/grab-bag | graph_experimental.clj | (ns plumbing.graph-experimental
(:use plumbing.core)
(:require
[plumbing.fnk.pfnk :as pfnk]
[plumbing.graph :as graph]))
;; TODO: default values that use that
;;
TODO : generate .invokePrim for primitive hinted fns .
;; TODO: version of expose/hide, optional keys, ability to do &/:as, etc.?
;; -- consid... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/src/plumbing/graph_experimental.clj | clojure | TODO: default values that use that
TODO: version of expose/hide, optional keys, ability to do &/:as, etc.?
-- consider requiring hierarchically namespaced optional args, like :foo/bar/baz?
^:inline ^:lift-optional ^:multi ^:when ^:clear / ^:leaf/^:used
TODO: just generate straight-up let using bodies when pos... | (ns plumbing.graph-experimental
(:use plumbing.core)
(:require
[plumbing.fnk.pfnk :as pfnk]
[plumbing.graph :as graph]))
TODO : generate .invokePrim for primitive hinted fns .
TODO : special : : kill value that terminates rest of computation of ( must be clear about subgraph properties )
(defn clear... |
d8ba20e1c27cd2354f87d46e404cf6d79ae499baae61b00133441ee839c21f88 | PureIso/ErlangCodes | factorial_logic.erl | %% Copyright
-module(factorial_logic).
-author("LAB314").
%% ====================================================================
%% API functions
%% ====================================================================
-export([factorial_handler/0]).
%% ================================================================... | null | https://raw.githubusercontent.com/PureIso/ErlangCodes/20066f54079946fcb469dde975d79e8923e8ed96/gen_server/src/factorial_logic.erl | erlang | Copyright
====================================================================
API functions
====================================================================
====================================================================
Private functions
================================================================... | -module(factorial_logic).
-author("LAB314").
-export([factorial_handler/0]).
factorial(Int, Acc)
when Int > 0 ->
factorial(Int-1,Acc * Int);
factorial(0, Acc) ->
Acc.
factorial(Int, Acc, IoDevice)
when Int > 0 ->
io:format(IoDevice, "Current Factorial Log: ~p~n",[Acc]),
factorial(Int-1,Acc * Int,IoDevic... |
0f06696480829aab49f7cdc87e295db3fffad9a083da2ce59d2ba8beefd9a00d | emqx/pulsar-client-erl | pulsar_client_sup.erl | Copyright ( c ) 2013 - 2019 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law... | null | https://raw.githubusercontent.com/emqx/pulsar-client-erl/15261e052d936a7927a21bf522292959ed9ced31/src/pulsar_client_sup.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2013 - 2019 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(pulsar_client_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
-export(... |
01bcb4babbc785ebb12830b28c62ffeab8f67331bea20072a410d4a00cf3ca9a | batterseapower/supercompilation-by-evaluation | Drive.hs | # LANGUAGE ViewPatterns , TupleSections , PatternGuards , BangPatterns #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Supercompile.Drive (supercompile) where
import Supercompile.Match
import Supercompile.Residualise
import Supercompile.Split
import Core.FreeVars
import Core.Renaming
import Core.Syntax
impor... | null | https://raw.githubusercontent.com/batterseapower/supercompilation-by-evaluation/daeb3e12ca8319a5144dd48a763cf7e7825a1999/Supercompile/Drive.hs | haskell |
== Termination ==
Other functions:
This family of functions is the whole reason that I have to thread Tag information throughout the rest of the code:
== The drive loop ==
Name assigned in output program
Abstracted over these variables
Minimum adequate term
Because we don't abstract over top-level free vari... | # LANGUAGE ViewPatterns , TupleSections , PatternGuards , BangPatterns #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Supercompile.Drive (supercompile) where
import Supercompile.Match
import Supercompile.Residualise
import Supercompile.Split
import Core.FreeVars
import Core.Renaming
import Core.Syntax
impor... |
bf6cc01042d18f79c0b581245a60788d901ee42a17e41cd696c59ff925c71a52 | robert-strandh/SICL | case-conversion.lisp | (cl:in-package #:sicl-string)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Functions NSTRING-UPCASE and STRING-UPCASE.
(defun nstring-upcase (string &key (start 0) end)
(with-checked-bounding-indices
((string string) (start start) (end end))
(for-each-relevant-character
... | null | https://raw.githubusercontent.com/robert-strandh/SICL/14fbcf61343a131bf49e0c6ce7bb02ca0611013b/Code/String/case-conversion.lisp | lisp |
Functions NSTRING-UPCASE and STRING-UPCASE.
Functions NSTRING-DOWNCASE and STRING-DOWNCASE.
Functions NSTRING-CAPITALIZE and STRING-CAPITALIZE. | (cl:in-package #:sicl-string)
(defun nstring-upcase (string &key (start 0) end)
(with-checked-bounding-indices
((string string) (start start) (end end))
(for-each-relevant-character
(character string start end)
(setf character (char-upcase character)))
string))
(defun string-upcase (str... |
600edb3e1a9ca8c0b5417e41ca5fd2012079cec04091ec2ecdf4c81540382ae2 | dfinity/motoko | ir.ml | open Mo_types
open Mo_values
type id = string
(* Literals *)
type lit =
| NullLit
| BoolLit of bool
| NatLit of Numerics.Nat.t
| Nat8Lit of Numerics.Nat8.t
| Nat16Lit of Numerics.Nat16.t
| Nat32Lit of Numerics.Nat32.t
| Nat64Lit of Numerics.Nat64.t
| IntLit of Numerics.Int.t
| Int8Lit of Numerics.I... | null | https://raw.githubusercontent.com/dfinity/motoko/ab5b616e99544a6025adf9cae5dd1b3f1b643e7a/src/ir_def/ir.ml | ocaml | Literals
Patterns
wildcard
variable
literal
tuple
object
option
variant
disjunctive
Like id, but with a type attached
Expressions
primitive
variable
literal
assignment
block
conditional
switch
do-while loop
label
async/async*
local promise
promise fulfillment
function
... | open Mo_types
open Mo_values
type id = string
type lit =
| NullLit
| BoolLit of bool
| NatLit of Numerics.Nat.t
| Nat8Lit of Numerics.Nat8.t
| Nat16Lit of Numerics.Nat16.t
| Nat32Lit of Numerics.Nat32.t
| Nat64Lit of Numerics.Nat64.t
| IntLit of Numerics.Int.t
| Int8Lit of Numerics.Int_8.t
| Int1... |
09150b3fdf50fbc5524306ac7c8d683d19214d6896a5bba35873a04d9b15bdc5 | Gbury/dolmen | name.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information. *)
(* Type definition *)
(* ************************************************************************* *)
type t =
| Simple of string
| Indexed of {
basename : string;
indexes : string list;
}
| Qualified of ... | null | https://raw.githubusercontent.com/Gbury/dolmen/21bfd8d221b39dfd72a7938a09a6b2ae85b3c391/src/standard/name.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information.
Type definition
*************************************************************************
Creation functions
*************************************************************************
Std functions
*************************... |
type t =
| Simple of string
| Indexed of {
basename : string;
indexes : string list;
}
| Qualified of {
path : string list;
basename : string;
}
let simple basename =
Simple basename
let indexed basename indexes =
Indexed { basename; indexes; }
let qualified path basena... |
8665cb6d70ef032e742b228a0c6a45995d7f9207f6f8f85f4703bc4de4b79869 | CryptoKami/cryptokami-core | Event.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
|
Module : . Event
Description : JSON log messages
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
This module defines types of JSON log events
and funct... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/networking/src/JsonLog/Event.hs | haskell | # LANGUAGE DeriveFunctor #
| A /typed/ JSON log events.
^ The timestamp.
^ The typed event content.
/untyped/ JSON log events.
| Converts a /typed/- into an /untyped/ event.
| Tries to parse a /typed/ event from an /untyped/ one.
Returns a @'Right'@, containing the typed event, if conversion was successful... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
|
Module : . Event
Description : JSON log messages
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
This module defines types of JSON log events
and functions to work with them .
Seeing as... |
8ca293b5c5155eda7c07581b8ec449b73c58589ae3e5ff737f41162bdd9191e4 | zhongwencool/ecron | ecron_monitor.erl | @private
-module(ecron_monitor).
-behaviour(gen_server).
-export([start_link/2]).
-export([health/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
-include("ecron.hrl").
start_link(Name, Jobs) ->
case ecron_spec:parse_crontab(Jobs, []) of
{ok, [_ | _]} -> gen_server:start_link(Name... | null | https://raw.githubusercontent.com/zhongwencool/ecron/b3c6dce3f607ecccacfbe67ef77fe42facc862ac/src/ecron_monitor.erl | erlang | @private
-module(ecron_monitor).
-behaviour(gen_server).
-export([start_link/2]).
-export([health/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
-include("ecron.hrl").
start_link(Name, Jobs) ->
case ecron_spec:parse_crontab(Jobs, []) of
{ok, [_ | _]} -> gen_server:start_link(Name... | |
8be8901ff848c32fbfe8dbf5943164d469b0d610954814ab3393392b6097ed78 | zoomhub/zoomhub | ConnectInfo.hs | module ZoomHub.Storage.PostgreSQL.ConnectInfo
( ConnectInfo (..),
fromEnv,
connectionString,
defaultConnectInfo,
)
where
import Data.ByteString (ByteString)
import Data.Maybe (fromMaybe)
import Database.PostgreSQL.Simple
( ConnectInfo (..),
defaultConnectInfo,
postgreSQLConnectionString,
)
... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/eb51b6532be53818573237710b29639be6103eb3/src/ZoomHub/Storage/PostgreSQL/ConnectInfo.hs | haskell | module ZoomHub.Storage.PostgreSQL.ConnectInfo
( ConnectInfo (..),
fromEnv,
connectionString,
defaultConnectInfo,
)
where
import Data.ByteString (ByteString)
import Data.Maybe (fromMaybe)
import Database.PostgreSQL.Simple
( ConnectInfo (..),
defaultConnectInfo,
postgreSQLConnectionString,
)
... | |
7d7d90272aaea40981213a5e84970ddf5205546e7cef09b9e61279ef1a11023b | mzp/coq-ide-for-ios | declarations.ml | open Util
open Names
open Term
open Validate
Bytecode
type values
type reloc_table
type to_patch_substituted
(*Retroknowledge *)
type action
type retroknowledge
type engagement = ImpredicativeSet
let val_eng = val_enum "eng" 1
type polymorphic_arity = {
poly_param_levels : Univ.universe option list;
poly_leve... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/checker/declarations.ml | ocaml | Retroknowledge
's like subst
New: younger hyp at top
Rtree.Param
Rtree.Node
Rtree.Rec
********************************************************************
Representation of mutual inductive types in the kernel
Primitive datas
Name of the type: [Ii]
Arity context of [Ii] with parameters: [f... | open Util
open Names
open Term
open Validate
Bytecode
type values
type reloc_table
type to_patch_substituted
type action
type retroknowledge
type engagement = ImpredicativeSet
let val_eng = val_enum "eng" 1
type polymorphic_arity = {
poly_param_levels : Univ.universe option list;
poly_level : Univ.universe;
}... |
8065a6b690207b3f2f9b7ff82de8b63218a90568c4fdb87a36f125d658eba28b | Tritlo/spectacular | TermSearch.hs | {-# LANGUAGE OverloadedStrings #-}
module Application.TermSearch.TermSearch where
import Data.List ( (\\)
, permutations
)
import Data.List.Extra ( nubOrd )
import qu... | null | https://raw.githubusercontent.com/Tritlo/spectacular/00621f4f0f03e5d0afea3c730434a8842e473546/src/Application/TermSearch/TermSearch.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------- Recursive Nodes -----------------------------
------------------------------------------------------... |
module Application.TermSearch.TermSearch where
import Data.List ( (\\)
, permutations
)
import Data.List.Extra ( nubOrd )
import qualified Data.Map ... |
7723f6e2ea7340812f8a4de069699f5bddccf280dfa83417cdf9d8fa717d7a75 | retro/keechma-next-realworld-app | edit_article_button.cljs | (ns app.ui.components.edit-article-button
(:require [keechma.next.helix.core :refer [with-keechma dispatch]]
[keechma.next.helix.lib :refer [defnc]]
[helix.core :as hx :refer [$ <> suspense]]
[helix.dom :as d]
["react" :as react]
["react-dom" :as rdom]
... | null | https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/src/app/ui/components/edit_article_button.cljs | clojure | (ns app.ui.components.edit-article-button
(:require [keechma.next.helix.core :refer [with-keechma dispatch]]
[keechma.next.helix.lib :refer [defnc]]
[helix.core :as hx :refer [$ <> suspense]]
[helix.dom :as d]
["react" :as react]
["react-dom" :as rdom]
... | |
2daaddadead6099a9ca30b1145053c5f855eb7019fc0800f894158bdd728a70d | BoeingX/haskell-programming-from-first-principles | IPV6AddressesSpec.hs | module ParserCombinators.ChapterExercises.IPV6AddressesSpec where
import Control.Applicative
import Data.Word
import Text.Trifecta
import Test.Hspec
import Test.QuickCheck (property)
import ParserCombinators.ChapterExercises.IPV6Addresses
spec :: Spec
spec = do
describe "Test uncollapse" $ do
it "uncollap... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/test/ParserCombinators/ChapterExercises/IPV6AddressesSpec.hs | haskell | module ParserCombinators.ChapterExercises.IPV6AddressesSpec where
import Control.Applicative
import Data.Word
import Text.Trifecta
import Test.Hspec
import Test.QuickCheck (property)
import ParserCombinators.ChapterExercises.IPV6Addresses
spec :: Spec
spec = do
describe "Test uncollapse" $ do
it "uncollap... | |
14b78a8ccd4ac4649e73c1a68cbfb15943f7f549f05b577d301fcb027f20a697 | TrustInSoft/tis-interpreter | partitioning.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/engine/partitioning.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
3e6042b4bc3343bd20aedf12e13cf6da4d2b5489e40bb6aebbeaa09409587f8a | nikodemus/SBCL | mop-30.impure.lisp | ;;;; Standard-instance-access tests and update-protocol abuse
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; ... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/mop-30.impure.lisp | lisp | Standard-instance-access tests and update-protocol abuse
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Sneaky redefinition reorders slots... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package :cl-user)
(load "test-util.lisp")
(defpackage :mop-test-30
(:use :sb-pcl :sb-ext :cl :test-util))
(in-package :mop-test-30)
(defclass foo ()
((bar ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.