_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 |
|---|---|---|---|---|---|---|---|---|
0c14324c04d932cf770b5cde33abfb7a319037d7f128436628d94f388f9e5814 | GaloisInc/tower | Types.hs | --
Render AADL source text from Ivory data types . Compound types are always
-- placed in their own package, TYPES.aadl.
--
( c ) 2014 Galois , Inc.
--
module Tower.AADL.Render.Types
( NS(..)
, renderTypeNS
, defType
, defineTypes
) where
import Data.List
import Text.PrettyPrint.L... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/src/Tower/AADL/Render/Types.hs | haskell |
placed in their own package, TYPES.aadl.
------------------------------------------------------------------------------
| A base type?
| A defined (compound) type?
What namespace is the caller in?
| Render the *use* of a type, and namespace if true.
| Render the *use* of a type.
-------------------------------... | Render AADL source text from Ivory data types . Compound types are always
( c ) 2014 Galois , Inc.
module Tower.AADL.Render.Types
( NS(..)
, renderTypeNS
, defType
, defineTypes
) where
import Data.List
import Text.PrettyPrint.Leijen
import qualified Ivory.Language.Array as... |
ba3c4c1477d814bca91d38020d5906e6e3d0a89c43b909cdcf8f4e33915fa1a2 | yamadapc/haskell-hspec-setup | SetupSpec.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
module Test.Hspec.SetupSpec
where
import Control.Exception
import "cryptohash" Crypto.Hash
import qualified Data.ByteString.Char8 as ByteString (pack)
import Data.Maybe
import Data.Monoid
import La... | null | https://raw.githubusercontent.com/yamadapc/haskell-hspec-setup/caccc2a173c225a3c7485dea2860cc904712cd4d/test/Test/Hspec/SetupSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
| Builds the image defined in this EDockerfileM block by writting it to a
temporary file
print mimg
print (Just [imgPre, imgHash])
| Runs the image with the tag passed-in
$ do
let img = newProjectImage >> cmd "hspec-setup"
... | module Test.Hspec.SetupSpec
where
import Control.Exception
import "cryptohash" Crypto.Hash
import qualified Data.ByteString.Char8 as ByteString (pack)
import Data.Maybe
import Data.Monoid
import Language.Dockerfile
import System.Directory
import S... |
8a4245cd973daf539553f5297acb1251e96755756ed1644705f588fc63efd2f2 | morphismtech/squeal | Table.hs | |
Module : Squeal . PostgreSQL.Definition . Table
Description : create , drop and alter tables
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
create , drop and alter tables
Module: Squeal.PostgreSQL.Definition.Table
Description: create, drop and alter tables
Copyright: (c) Eitan Chatav... | null | https://raw.githubusercontent.com/morphismtech/squeal/f25c3052bcecebe5e88ee95143c4ae446c24ca85/squeal-postgresql/src/Squeal/PostgreSQL/Definition/Table.hs | haskell | * Create
* Drop
* Alter
** Constraints
** Columns
$setup
>>> import Squeal.PostgreSQL
^ the name of the table to add
^ the names and datatype of each column
^ constraints that must hold for the table
^ the name of the table to add
^ the names and datatype of each column
^ constraints that must hold for the... | |
Module : Squeal . PostgreSQL.Definition . Table
Description : create , drop and alter tables
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
create , drop and alter tables
Module: Squeal.PostgreSQL.Definition.Table
Description: create, drop and alter tables
Copyright: (c) Eitan Chatav... |
040f554c52c993fb729a58adc5ddfd72fb5c7e5f852252421eeb5be00a9413f9 | fogfish/typhoon | aura_ingress_sup.erl | %%
%% Copyright 2015 Zalando SE
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/aura/src/aura_ingress_sup.erl | erlang |
Copyright 2015 Zalando SE
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 Licens... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(aura_ingress_sup).
-behaviour(supervisor).
-author('').
-export([
start_link/0, init/1
]).
-define(CHILD(Type, I), {I, {I, start_link, []}, perman... |
8978c980ddc319ed15da05c860a79d6277b3c48282ec9bd436925d483c2d8a98 | webyrd/miniKanren-with-symbolic-constraints | mk.scm | 28 November 02014 WEB
;;;
;;; * Fixed missing unquote before E in 'drop-Y-b/c-dup-var'
;;;
;;; * Updated 'rem-xx-from-d' to check against other constraints after
;;; unification, in order to remove redundant disequality constraints
subsumed by absento constraints .
newer version : Sept. 18 2013 ( with eigens )
... | null | https://raw.githubusercontent.com/webyrd/miniKanren-with-symbolic-constraints/364d6b9968ea260f111f58fa275f071bc6239e05/mk.scm | scheme |
* Fixed missing unquote before E in 'drop-Y-b/c-dup-var'
* Updated 'rem-xx-from-d' to check against other constraints after
unification, in order to remove redundant disequality constraints
E = (e* . x*)*, where e* is a list of eigens and x* is a list of variables.
Each e in e* is checked for any of its eigens b... | 28 November 02014 WEB
subsumed by absento constraints .
newer version : Sept. 18 2013 ( with eigens )
, , and
abandons E , if it succeeds . If there is no failure by then , there were no eigen
(define empty-c '(() () () () () () ()))
(define eigen-tag (vector 'eigen-tag))
(define-syntax inc
(syn... |
c4fdf9e1f8d5ba82c90247c5d3d50c5e4d16f58f77b457d5e075116182bcdb20 | hasufell/hpath | CopyFileOverwriteSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Posix.RawFilePath.Directory.CopyFileOverwriteSpec where
import Test.Hspec
import "hpath-directory" System.Posix.RawFilePath.Directory
import System.Posix.RawFilePath.Directory.Errors
import System.IO.Error
(
ioeGetErrorType
)
import GHC.IO.Exception
(
IO... | null | https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/CopyFileOverwriteSpec.hs | haskell | # LANGUAGE OverloadedStrings #
successes --
posix failures --
custom failures -- |
module System.Posix.RawFilePath.Directory.CopyFileOverwriteSpec where
import Test.Hspec
import "hpath-directory" System.Posix.RawFilePath.Directory
import System.Posix.RawFilePath.Directory.Errors
import System.IO.Error
(
ioeGetErrorType
)
import GHC.IO.Exception
(
IOErrorType(..)
)
import System.Exi... |
9b9e124432b0d389c6c84111503c48d0db5f4ae9615530d0adbedb881a0e1770 | naoiwata/sicp | q-1.20.scm | ;;
;; @author naoiwata
SICP Chapter1
;; q-1.20
;;
;(add-load-path "." :relative)
;(load "lib.scm")
(define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
(print (gcd 28 16))
4
; in normal order evaluation
(gcd 206 40)
# f , (= 40 0 )
206
(gcd 40 (remainder 206 40)))
# f , (= 6 0 )
40
(gcd ... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter1/q-1.20.scm | scheme |
@author naoiwata
q-1.20
(add-load-path "." :relative)
(load "lib.scm")
in normal order evaluation
- > 7 counts
in applicative order evaluation
#f
#f
#f
#f
#t
ref : -125-greatest-common-divisors.html
END | SICP Chapter1
(define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
(print (gcd 28 16))
4
(gcd 206 40)
# f , (= 40 0 )
206
(gcd 40 (remainder 206 40)))
# f , (= 6 0 )
40
(gcd (remainder 206 40) (remainder 40 (remainder 206 40))))
# f , (= 4 0 )
(remainder 206 40)
(gcd (remainder 40... |
c84bc147a3a7f8a0c7f32f274fb7ef7cd4520c278ac22cbebccd28ad3b3f171f | chenyukang/eopl | data-structures.scm | (module data-structures (lib "eopl.ss" "eopl")
(require "lang.scm") ; for expression?
(require "store.scm") ; for reference?
(require "classes.scm") ; for object?
(provide (all-defined)) ; too many things to list
;;;;;;;;;;;;;;;; expressed ... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter9/typed-oo/data-structures.scm | scheme | for expression?
for reference?
for object?
too many things to list
expressed values ;;;;;;;;;;;;;;;;
an expressed value is either a number, a boolean, a procval, or a
reference.
extractors:
procedures ;;;;;;;;;;;;;;;;
env->list : Env -> List
used for pretty-printing and debugging
expval->printab... | (module data-structures (lib "eopl.ss" "eopl")
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?))
(ref-val
(ref reference?))
(obj-val
(obj object?))
(list-val
(l (list-of ex... |
3eb153649aced6cbdf50c83993c339dbe5089b2e0c8b0e4d3a078b64a18c18f3 | russell/cl-git | references.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*-
;; cl-git is a Common Lisp interface to git repositories.
Copyright ( C ) 2011 - 2022 < >
;;
;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
as published by the Free ... | null | https://raw.githubusercontent.com/russell/cl-git/ab58b1dcf34649899085e9df95962ef1c9d902c3/src/references.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 -*-
cl-git is a Common Lisp interface to git repositories.
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;... |
Copyright ( C ) 2011 - 2022 < >
as published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
(in-package #:cl-git)
(define-foreign-type reference (git-object)
nil
(:simple-pa... |
d433f518821c8de53ec1e2818c197f66a91065f9cae02b060eed1f7f8c76c5c8 | wilkerlucio/wsscode-async | coll.cljc | (ns com.wsscode.async.coll
"Collection helpers for async operations."
(:require
[#?(:clj com.wsscode.async.async-clj
:cljs com.wsscode.async.async-cljs)
:refer [go-promise <? <?maybe <!maybe]]
[com.wsscode.misc.coll :as coll]))
(defn reduce-async
"Like reduce, but when some iteration item r... | null | https://raw.githubusercontent.com/wilkerlucio/wsscode-async/163b1cf5c9963d4c798aed4018461abdee754a1d/src/com/wsscode/async/coll.cljc | clojure | (ns com.wsscode.async.coll
"Collection helpers for async operations."
(:require
[#?(:clj com.wsscode.async.async-clj
:cljs com.wsscode.async.async-cljs)
:refer [go-promise <? <?maybe <!maybe]]
[com.wsscode.misc.coll :as coll]))
(defn reduce-async
"Like reduce, but when some iteration item r... | |
20e066b8cf89f963a6f214facf48ffd78a917658cce34a3bf8a946087cd8ab0f | jepsen-io/voltdb | dirty_read.clj | (ns jepsen.voltdb.dirty-read
"Searches for dirty reads. We're targeting cases where VoltDB allows an
unreplicated write to be visible to local reads *before* it's fully
replicated. Because VoltDB currently allows stale reads, we can't use a
normal read to verify that a transaction actually failed to commit. Ins... | null | https://raw.githubusercontent.com/jepsen-io/voltdb/7c29d0d6caa29b85143d6942e078d7c0bdb82e35/src/jepsen/voltdb/dirty_read.clj | clojure | Create table
")
")
breather
All strong reads had darn well better be equal
What did we write last?
A vector of in-flight writes on each node.
lazy init of in-flight state
thread index
node index
Record the in-progress write
Remaining processes try to read the most recent write | (ns jepsen.voltdb.dirty-read
"Searches for dirty reads. We're targeting cases where VoltDB allows an
unreplicated write to be visible to local reads *before* it's fully
replicated. Because VoltDB currently allows stale reads, we can't use a
normal read to verify that a transaction actually failed to commit. Ins... |
f1a58e9d09f864f79c13a10c786e53e1a2460b8de8d4d4a0ab06d33abab9dc28 | imitator-model-checker/imitator | AlgoNZCUB.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
*
* Module description : Non - zenoness emptiness check using CUB transformation ( synthesizes valuat... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoNZCUB.mli | ocaml | **********************************************************
Modules
**********************************************************
**********************************************************
Class definition
**********************************************************
*******************************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
*
* Module description : Non - zenoness emptiness check using CUB transformation ( synthesizes valuat... |
0865d227c67fdf2ebab5855ea5af0194354dd01875c54b5d27e252cf9882c0eb | khibino/haskell-relational-record | KeyTest.hs | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DataKinds , DeriveGeneric #
module KeyTest where
import GHC.Generics (Generic)
import PgTestDataSource (defineTable)
$(defineTable []
"EXAMPLE2" "keyTest" [''Generic])
| null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/examples/HDBC/PostgreSQL/example/2/KeyTest.hs | haskell | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DataKinds , DeriveGeneric #
module KeyTest where
import GHC.Generics (Generic)
import PgTestDataSource (defineTable)
$(defineTable []
"EXAMPLE2" "keyTest" [''Generic])
| |
481454dc3434b7aac44014b691880efcfe17859230e369ebdedc1ae244769964 | ermine/kombain | myocamlbuild.ml | OASIS_START
(* DO NOT EDIT (digest: fab6565252cd68b7ffde3ae4cafdb806) *)
module OASISGettext = struct
# 21 "/usr/home/ermine/projects/ocaml/src/oasis.git/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
... | null | https://raw.githubusercontent.com/ermine/kombain/07f643c892b0b9c2ef08d67428bb9125d5251f82/myocamlbuild.ml | ocaml | DO NOT EDIT (digest: fab6565252cd68b7ffde3ae4cafdb806)
these functions are not really officially exported
this lists all supported packages
this is supposed to list available syntaxes, but I don't know how to do it.
ocamlfind command
by using Before_options one let command line options have an higher priorit... | OASIS_START
module OASISGettext = struct
# 21 "/usr/home/ermine/projects/ocaml/src/oasis.git/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
fmt2^^""
l... |
94fb442c309118b40088b46430396c23c00375e710af62eb4be82d5e161c4f1a | clash-lang/clash-prelude | BitRepresentation.hs | |
Copyright : ( C ) 2018 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Using /ANN/ pragma 's you can tell the Clash compiler to use a custom
bit representation for a data type . See @DataReprAnn@ for documentation .
Copyright : (C) 2018, Google Inc.
License : ... | null | https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Annotations/BitRepresentation.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveLift #
# LANGUAGE TemplateHaskell #
* Data structures to express a custom bit representation
* Convenience type synonyms for Integer
* Functions
| Lift values inside of 'TH.Q' to a Template Haskell expression
template haskell more difficult. Please uncomm... | |
Copyright : ( C ) 2018 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Using /ANN/ pragma 's you can tell the Clash compiler to use a custom
bit representation for a data type . See @DataReprAnn@ for documentation .
Copyright : (C) 2018, Google Inc.
License : ... |
bf65083c920607117a9ea52afebd1f34bb6d686593cf23f8451d97dd7c793e20 | jaredly/reepl | core.cljs | (ns reepl.core
(:require [re-frame.core :refer [dispatch
dispatch-sync
subscribe]]
[clojure.string :as str]
[cljs.reader]
[cljs.tools.reader]
[reagent.core :as r]
[reepl.code-mirror :as c... | null | https://raw.githubusercontent.com/jaredly/reepl/96a8979c574b3979a7aeeed27e57a2ec4d357350/src/reepl/core.cljs | clojure | :font-weight :bold
:cursor :pointer TODO make these clickable
TODO these should probably go inside code-mirror.cljs? They are really
TODO if the cursor is inside a list, and the function doesn't have enought
arguments yet, then return false | (ns reepl.core
(:require [re-frame.core :refer [dispatch
dispatch-sync
subscribe]]
[clojure.string :as str]
[cljs.reader]
[cljs.tools.reader]
[reagent.core :as r]
[reepl.code-mirror :as c... |
98d040449d86cd0b9a72524210832960765a2447f647538562dac45f0c3b06e6 | gregtatcam/imaplet-lwt | imaplet_lmtp.ml |
* Copyright ( c ) 2013 - 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... | null | https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/servers/imaplet_lmtp.ml | ocaml | sending "special" local append on unix socket
* BYE |
* Copyright ( c ) 2013 - 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... |
e3ec08fc8429ceba24620966baa87f9fc06432669bc6e0a28d19e9e2a2f861b0 | cwgoes/haskell-abci | Main.hs | module Main where
import Control.Concurrent
import Control.Lens
import qualified Data.Binary as B
import qualified Data.Binary.Get as B
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.Text as T
import ... | null | https://raw.githubusercontent.com/cwgoes/haskell-abci/96c093ea6d5c2055da0e7021890fe2a71a9c46dc/app/Main.hs | haskell | module Main where
import Control.Concurrent
import Control.Lens
import qualified Data.Binary as B
import qualified Data.Binary.Get as B
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.Text as T
import ... | |
9c1e544839fdff21642021b9ca9fd899371a1ab6699c889bdbb2b2a798f8044b | markwoodhall/clova | core.cljc | (ns clova.core
"The core namespace contains all of the built in validators and the
defvalidator macro.
The only other public functions are
- `validation-set`
- `validate`
- `valid?`
- `results`
- `as-validator`
You can view more information in the [readme] ().
There are also example validation sc... | null | https://raw.githubusercontent.com/markwoodhall/clova/6d57f84b3203782d2ce9f8b33b42a6ba341ed4b5/src/clova/core.cljc | clojure | (ns clova.core
"The core namespace contains all of the built in validators and the
defvalidator macro.
The only other public functions are
- `validation-set`
- `validate`
- `valid?`
- `results`
- `as-validator`
You can view more information in the [readme] ().
There are also example validation sc... | |
d01752f1c33c9d64df7847ab5098d04627904cfcfef2e1373dd1c302ab457295 | webyrd/2012-scheme-workshop-quines-paper-code | appendixD.scm | (define c->S (lambda (c) (car c)))
(define c->D (lambda (c) (cadr c)))
(define c->A (lambda (c) (caddr c)))
(define c->T (lambda (c) (cadddr c)))
(define empty-c '(() () () ()))
(define-syntax lambdag@
(syntax-rules (:)
((_ (c) e) (lambda (c) e))
((_ (c : S D A T) e)
(lambda (c)
(let ((S (c->... | null | https://raw.githubusercontent.com/webyrd/2012-scheme-workshop-quines-paper-code/3d160707f6ea6f60a08ec271abea1bfdaf63fd41/appendixD.scm | scheme | (define c->S (lambda (c) (car c)))
(define c->D (lambda (c) (cadr c)))
(define c->A (lambda (c) (caddr c)))
(define c->T (lambda (c) (cadddr c)))
(define empty-c '(() () () ()))
(define-syntax lambdag@
(syntax-rules (:)
((_ (c) e) (lambda (c) e))
((_ (c : S D A T) e)
(lambda (c)
(let ((S (c->... | |
933e15757b0b6a135d0d3624429fe78a5627e1147430f9a4d441d2d05ebff6c4 | rtoy/ansi-cl-tests | print-ratios.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Mar 1 22:03:58 2004
;;;; Contains: Tests for printing ratios
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(deftest print.ratios.random
(loop for i from 1 to 1000
for numbits = (1+ (random 40))
for bound = (ash 1 numbits)
... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/print-ratios.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for printing ratios | Author :
Created : Mon Mar 1 22:03:58 2004
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(deftest print.ratios.random
(loop for i from 1 to 1000
for numbits = (1+ (random 40))
for bound = (ash 1 numbits)
for num = (- (random (+ bound bound)) bound)
for deno... |
c3e9b811ef8a92064a2795b8104b51e99a519f613651cb0603ed73355d84c846 | ott-lang/ott | main.ml | open Test_phantom_ast
module Lexer = Test_phantom_lexer
module Parser = Test_phantom_parser
module PP = Test_phantom_parser_pp
let rec pp_term t : string =
match t with
| T_var x - > Printf.sprintf " % s " x
| T_lam ( x , t ) - > Printf.sprintf " \\%s . % s " x ( pp_term t )
| T_app ... | null | https://raw.githubusercontent.com/ott-lang/ott/038131721750d73f1e201a9575df7ede42639165/tests/menhir_tests/test_phantom/main.ml | ocaml | Run the parser on this line of input.
Attempt to read one line. | open Test_phantom_ast
module Lexer = Test_phantom_lexer
module Parser = Test_phantom_parser
module PP = Test_phantom_parser_pp
let rec pp_term t : string =
match t with
| T_var x - > Printf.sprintf " % s " x
| T_lam ( x , t ) - > Printf.sprintf " \\%s . % s " x ( pp_term t )
| T_app ... |
b7e5f4ae38468a0ff6f13487f7a520fe57e45d684aafab99067fe545429c7b09 | ollef/navm-hs | ArrayBuilder.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE BlockArguments #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
# LANGUAGE OverloadedRecordDot #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnboxedTuples #
# LANGUAGE NoFieldSelectors #
module ArrayBuilder where
import Control.Monad... | null | https://raw.githubusercontent.com/ollef/navm-hs/e710d581bce7f94142a3b054295a9104fec99039/src/ArrayBuilder.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes # | # LANGUAGE BlockArguments #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
# LANGUAGE OverloadedRecordDot #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnboxedTuples #
# LANGUAGE NoFieldSelectors #
module ArrayBuilder where
import Control.Monad
import Control.Monad.Primitive (unsafeIOToPrim, unsafePri... |
46a483ecaaaf45fbf14743f3d48ab5d56d7187473b88dd04e6723f5438b02d7d | racket/draw | svg-dc.rkt | #lang racket/base
(require racket/class
"syntax.rkt"
"../unsafe/cairo.rkt"
"dc.rkt"
"local.rkt"
"page-dc.rkt"
"write-bytes.rkt")
(provide svg-dc%)
(define dc-backend%
(class default-dc-backend%
(init [(init-w width)]
[(init-h height)]
[(i... | null | https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/private/svg-dc.rkt | racket | #lang racket/base
(require racket/class
"syntax.rkt"
"../unsafe/cairo.rkt"
"dc.rkt"
"local.rkt"
"page-dc.rkt"
"write-bytes.rkt")
(provide svg-dc%)
(define dc-backend%
(class default-dc-backend%
(init [(init-w width)]
[(init-h height)]
[(i... | |
643135052706ce748cc260572163a5ebed7b94a21b6af1faefdc743cdc258637 | PEZ/rich4clojure | problem_092.clj | (ns rich4clojure.hard.problem-092
(:require [hyperfiddle.rcf :refer [tests]]))
;; = Read Roman numerals =
;; By 4Clojure user: amalloy
;; Difficulty: Hard
;; Tags: [strings math]
;;
Roman numerals are easy to recognize , but not everyone
;; knows all the rules necessary to work with them. Write
a function to pa... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/28ea575ede8677f3a97437a646cdb3376a28ebc9/src/rich4clojure/hard/problem_092.clj | clojure | = Read Roman numerals =
By 4Clojure user: amalloy
Difficulty: Hard
Tags: [strings math]
knows all the rules necessary to work with them. Write
the number it represents.
You can assume that the input will be well-formed, in
upper-case, and follow the subtractive principle. You
don't need to handle any num... | (ns rich4clojure.hard.problem-092
(:require [hyperfiddle.rcf :refer [tests]]))
Roman numerals are easy to recognize , but not everyone
a function to parse a Roman - numeral string and return
( 3999 ) , the largest number representable with ordinary
(def __ :tests-will-fail)
(comment
)
(tests
14 := (_... |
60a1c5a03f32c38dec575dd41dfa99ff779ea582afe917633413aceaf91f53b6 | JHU-PL-Lab/jaylang | map_map.ml | let rec map x =
if x=0 then x else 1 + map (x-1)
let main n =
assert(map (map n) = n)
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/map_map.ml | ocaml | let rec map x =
if x=0 then x else 1 + map (x-1)
let main n =
assert(map (map n) = n)
| |
6f9333024a6eec6197d45fc4c6b82a24e77ece129783124b6151e7e39f4d2a13 | nokia/web-assembly-self-certifying-compilation-framework | benchmark_runner.ml | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Wasm
open Source
open Script_types
open Func_types
open Proof_types
open... | null | https://raw.githubusercontent.com/nokia/web-assembly-self-certifying-compilation-framework/8c31df0bd7d2d94cfbc22089944f5cabb3a61158/src/compiler/main/benchmark_runner.ml | ocaml | A lot of this would be a re-implementation of what is in passes, but with timing marks
Run passes on a single file
Run pass on a single func, timed
Run the passes
If the instr graphs are different, we do something about it
Convert if applicable
Run passes on a single module, timed
Run passes on a single ... | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Wasm
open Source
open Script_types
open Func_types
open Proof_types
open... |
4815da499cfb605600daf89ae84f0bb6d9a83b3cd796b4ae363567d19b299d14 | erlangonrails/devdb | delegate.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/rabbitmq-server-1.8.0/src/delegate.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
All Rights Reserved.
Contributor(s): __________________________... | The contents of this file are subject to the Mozilla 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 "
The Original Code is RabbitMQ .
The Initial Developers of the Original Code are LShift Ltd ,... |
f9584843ba98ba6789504801bdcd92bec3a42f2ff15c7ad776ea435994b97efe | jeffreyrosenbluth/wallpaper | Wallpaper.hs | # LANGUAGE ScopedTypeVariables #
module Main where
import Portrait
import Types
import Data.Yaml (ParseException, decodeFileEither)
import System.Environment
main :: IO ()
main = do
[yamlFile] <- getArgs
(wp :: Either ParseException Wallpaper) <- decodeFileEither... | null | https://raw.githubusercontent.com/jeffreyrosenbluth/wallpaper/b3c78025e7dff46a409830751ec8bbc22ba9d84f/app/Wallpaper.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Main where
import Portrait
import Types
import Data.Yaml (ParseException, decodeFileEither)
import System.Environment
main :: IO ()
main = do
[yamlFile] <- getArgs
(wp :: Either ParseException Wallpaper) <- decodeFileEither... | |
d5b0da53d5248836155f89afd3ca4b0d3046dab12ce6557696efb6f97fa95255 | mauny/the-functional-approach-to-programming | MLgraph.ml |
* $ I d : MLgraph.mlp , v 1.1 1997/08/14 11:34:25
*
* $Id: MLgraph.mlp,v 1.1 1997/08/14 11:34:25 emmanuel Exp $
*
*)
#open "prelude";;
#open "geometry";;
#open "paint";;
#open "frames";;
#open "sketches";;
#open "bitmaps";;
#open "fonts";;
#open "texts";;
#open "graphics_defaults";;
#open "p... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/MLgraph.ml | ocaml | BEGIN PRELUDE
END PRELUDE
END GEOMETRY
BEGIN PAINT
END PAINT
BEGIN FRAMES
END FRAMES
BEGIN SKETCHES
END SKETCHES
END BITMAPS
BEGIN FONTS
END FONTS
BEGIN TEXTS
END TEXTS
let ( default_graphic_state) =default_graphic_state ;;
BEGIN PICTURES
let ( picture_color) =picture_color;;
END PICTURES... |
* $ I d : MLgraph.mlp , v 1.1 1997/08/14 11:34:25
*
* $Id: MLgraph.mlp,v 1.1 1997/08/14 11:34:25 emmanuel Exp $
*
*)
#open "prelude";;
#open "geometry";;
#open "paint";;
#open "frames";;
#open "sketches";;
#open "bitmaps";;
#open "fonts";;
#open "texts";;
#open "graphics_defaults";;
#open "p... |
d2aa23ce394c6a428e93668c3be227fc4ac7160610e42713914670e4145e9c61 | italia/docs-italia-comandi-conversione | pandoc-to-sphinx.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Main where
import Text.Pandoc
import Text.Pandoc.JSON()
import Text.Pandoc.Options()
import Text.Pandoc.Pretty()
import Data.Text()
import Data.String (IsString(..))
import Text.Pandoc.Walk (query, walk)
import Text.Pandoc.Class (runIOorExplode)
import... | null | https://raw.githubusercontent.com/italia/docs-italia-comandi-conversione/3b8faea24bbb8e51e43fbdbb05e2684018111576/src/pandoc-to-sphinx.hs | haskell | # LANGUAGE OverloadedStrings #
the core logic goes through @splitWrite@ -> @split@ -> etcetera
split the sections and write the different parts. This contains the
custom logic for writing the different parts of a multi-level
document, while the common logic related to splitting a file into
sections is provided by ... | # LANGUAGE QuasiQuotes #
module Main where
import Text.Pandoc
import Text.Pandoc.JSON()
import Text.Pandoc.Options()
import Text.Pandoc.Pretty()
import Data.Text()
import Data.String (IsString(..))
import Text.Pandoc.Walk (query, walk)
import Text.Pandoc.Class (runIOorExplode)
import Text.Pandoc.Shared (stringify)
imp... |
49e8cef34485ac4cb2c30d62709bf10a7f7c216ac28e45ab715682502338f8b1 | michaelklishin/neocons | passwords.clj | (ns clojurewerkz.neocons.rest.passwords
(:require [cheshire.core :as json]
[clojurewerkz.neocons.rest :as nr]
[clojurewerkz.support.http.statuses :refer [success?]])
(:gen-class))
(defn change-password
[uri username old-password new-password]
(let [{:keys [status body]} (n... | null | https://raw.githubusercontent.com/michaelklishin/neocons/30f30e95686a01f7a34082600bc1221877c2acbd/src/clojure/clojurewerkz/neocons/rest/passwords.clj | clojure | (ns clojurewerkz.neocons.rest.passwords
(:require [cheshire.core :as json]
[clojurewerkz.neocons.rest :as nr]
[clojurewerkz.support.http.statuses :refer [success?]])
(:gen-class))
(defn change-password
[uri username old-password new-password]
(let [{:keys [status body]} (n... | |
77cfb82286858917e9e1960a8375ef61f8e658376e9b3c5db6f4912b1f101134 | anoma/juvix | Lexer.hs | module Juvix.Compiler.Asm.Translation.FromSource.Lexer
( module Juvix.Compiler.Asm.Translation.FromSource.Lexer,
module Juvix.Parser.Lexer,
module Juvix.Compiler.Asm.Keywords,
)
where
import Juvix.Compiler.Asm.Keywords
import Juvix.Parser.Lexer
import Juvix.Prelude
import Text.Megaparsec as P hiding (sepBy... | null | https://raw.githubusercontent.com/anoma/juvix/88ab62235378f669799e3112603277dca00e58c6/src/Juvix/Compiler/Asm/Translation/FromSource/Lexer.hs | haskell | module Juvix.Compiler.Asm.Translation.FromSource.Lexer
( module Juvix.Compiler.Asm.Translation.FromSource.Lexer,
module Juvix.Parser.Lexer,
module Juvix.Compiler.Asm.Keywords,
)
where
import Juvix.Compiler.Asm.Keywords
import Juvix.Parser.Lexer
import Juvix.Prelude
import Text.Megaparsec as P hiding (sepBy... | |
c8b0dbb85f4a6f0b89b184cd85510f3d3373b801c3b5d858bb9463bb8341ed08 | runtimeverification/haskell-backend | Evaluator.hs | |
Module : . Rewrite . Function . Evaluator
Description : Evaluates functions in a pattern .
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
Stability : experimental
Portability : portable
Module : Kore.Rewrite.Function.Evaluator
Des... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/93a705112305a2d7e084e98dca93ec33e0d661d5/kore/src/Kore/Rewrite/Function/Evaluator.hs | haskell | | Evaluates functions on an application pattern.
Then add a function,
memoize :: Evaluator.Self state -> Memo.Self state -> Evaluator.Self state
to add memoization to a function evaluator.
| The predicate from the configuration
| Aggregated children predicate and substitution.
| The pattern to be evaluated
If... | |
Module : . Rewrite . Function . Evaluator
Description : Evaluates functions in a pattern .
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
Stability : experimental
Portability : portable
Module : Kore.Rewrite.Function.Evaluator
Des... |
8326601c95d5cbed3916eb1c4e1d20cb2b6796f0ba20e00716145519aa136829 | logseq/logseq | block.cljs | (ns frontend.format.block
"Block code needed by app but not graph-parser"
(:require [cljs-time.format :as tf]
[clojure.string :as string]
[frontend.config :as config]
[frontend.date :as date]
[frontend.db :as db]
[frontend.format :as format]
[f... | null | https://raw.githubusercontent.com/logseq/logseq/a4a5758afcb59436301f704b88638153ff1352aa/src/main/frontend/format/block.cljs | clojure | (ns frontend.format.block
"Block code needed by app but not graph-parser"
(:require [cljs-time.format :as tf]
[clojure.string :as string]
[frontend.config :as config]
[frontend.date :as date]
[frontend.db :as db]
[frontend.format :as format]
[f... | |
e89a91c81351843a8758541dcbf448b0680691b496d61dc316a35cc7e0c99d0e | bennn/zordoz | zo-string.rkt | #lang racket/base
;; Convert a zo struct to a more readable string representation.
;; Uses predicates to guess which struct we have, then convert the known
;; fields to strings.
;; Printing a field recursively is potentially expensive,
;; so we wrap the computation in a thunk.
;; The macro `lcons` makes thunk creatio... | null | https://raw.githubusercontent.com/bennn/zordoz/00f68d7e00fbf271a95c3f120a2d9fe5b598b7e9/private/zo-string.rkt | racket | Convert a zo struct to a more readable string representation.
Uses predicates to guess which struct we have, then convert the known
fields to strings.
Printing a field recursively is potentially expensive,
so we wrap the computation in a thunk.
The macro `lcons` makes thunk creation a little prettier.
The functi... | #lang racket/base
(provide
zo->string
zo->spec
specof spec/c
)
(require
compiler/zo-structs
racket/contract
racket/match
(only-in racket/string string-join)
(for-syntax racket/base racket/syntax)
(only-in zordoz/private/dispatch-table make-table)
)
(define spec/c
(recursive-contract
(co... |
cf9ca7872a8d530d15cedd8f067a9a1e8fb89d84d021957cee5c3e703290b7a7 | fractalide/fractalide | hyperflow.rkt | #lang racket/base
(require fractalide/modules/rkt/rkt-fbp/fvm)
(require fractalide/modules/rkt/rkt-fbp/agent)
(require fractalide/modules/rkt/rkt-fbp/def)
(require fractalide/modules/rkt/rkt-fbp/scheduler)
(require (prefix-in graph: fractalide/modules/rkt/rkt-fbp/graph))
(module+ main
(call-with-new-fvm-and-schedul... | null | https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/hyperflow.rkt | racket | #lang racket/base
(require fractalide/modules/rkt/rkt-fbp/fvm)
(require fractalide/modules/rkt/rkt-fbp/agent)
(require fractalide/modules/rkt/rkt-fbp/def)
(require fractalide/modules/rkt/rkt-fbp/scheduler)
(require (prefix-in graph: fractalide/modules/rkt/rkt-fbp/graph))
(module+ main
(call-with-new-fvm-and-schedul... | |
b475b3537039aaaf52b23c2076039d11d7135b1f3706510ec2a1ca35831d5de2 | soulomoon/SICP | Exercise 2.58-1.scm | Exercise 2.58 : Suppose we want to modify the differentiation program so that it works with ordinary mathematical notation , in which + and * are infix rather than prefix operators . Since the differentiation program is defined in terms of abstract data , we can modify it to work with different representations of exp... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.58-1.scm | scheme | The problem becomes substantially harder if we allow standard algebraic notation, such as (x + 3 * (x + y + 2)), which drops unnecessary parentheses and assumes that multiplication is done before addition. Can you design appropriate predicates, selectors, and constructors for this notation such that our derivative pro... | Exercise 2.58 : Suppose we want to modify the differentiation program so that it works with ordinary mathematical notation , in which + and * are infix rather than prefix operators . Since the differentiation program is defined in terms of abstract data , we can modify it to work with different representations of exp... |
6ae56a4bfcda687587c951eb3bf0c8f5502ff7e5f0d9e13a7ddd29629d18a069 | MastodonC/kixi.stats | core.cljc | (ns kixi.stats.core
(:require [kixi.stats.digest :as digest]
[kixi.stats.distribution :as d]
[kixi.stats.estimate :as e]
[kixi.stats.math :refer [sq sqrt pow root infinity negative-infinity infinite?]]
[kixi.stats.protocols :as p]
[kixi.stats.test :as t]
... | null | https://raw.githubusercontent.com/MastodonC/kixi.stats/7dbc5fd7873e9a4dc9ddb7a8b8da1d04935a8701/src/kixi/stats/core.cljc | clojure | Residual | (ns kixi.stats.core
(:require [kixi.stats.digest :as digest]
[kixi.stats.distribution :as d]
[kixi.stats.estimate :as e]
[kixi.stats.math :refer [sq sqrt pow root infinity negative-infinity infinite?]]
[kixi.stats.protocols :as p]
[kixi.stats.test :as t]
... |
557edebf83dd1673c3200508112e8cfa5cc7d12fa2615a33e44b97688c1e3ce1 | janestreet/universe | zstandard.ml | open Core
open! Ctypes
module Raw = Zstd_bindings.C (Zstd_generated)
exception Error of string
exception Content_size_unknown
exception Content_size_error
exception Not_enough_capacity of int
exception Decompressed_size_exceeds_max_int of Int64.t
let raise_on_error (t : Unsigned.Size_t.t) =
if Unsigned.UInt.to_int ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/zstandard/src/zstandard.ml | ocaml | This is the magic number ZSTD_FRAMEHEADERSIZE_MAX | open Core
open! Ctypes
module Raw = Zstd_bindings.C (Zstd_generated)
exception Error of string
exception Content_size_unknown
exception Content_size_error
exception Not_enough_capacity of int
exception Decompressed_size_exceeds_max_int of Int64.t
let raise_on_error (t : Unsigned.Size_t.t) =
if Unsigned.UInt.to_int ... |
848672a77354a88b83b7e5dd2d30bd03185544017bda1f6d9c4aad9abe0c3d51 | esl/MongooseIM | mongoose_graphql_errors.erl | %% @doc Implements callbacks that format custom errors returned from resolvers or crashes.
%% In addition, it can format each type of error that occurred in any graphql
%% or mongoose_graphql phase.
%% @end
-module(mongoose_graphql_errors).
-export([format_error/1, err/2, crash/2]).
-ignore_xref([format_error/1, err/... | null | https://raw.githubusercontent.com/esl/MongooseIM/c863ca0a6109c782577a63e00510f634ca31d831/src/graphql/mongoose_graphql_errors.erl | erlang | @doc Implements callbacks that format custom errors returned from resolvers or crashes.
In addition, it can format each type of error that occurred in any graphql
or mongoose_graphql phase.
@end
callback invoked when resolver returns error tuple
callback invoked when resolver crashes
@doc Format error that occur... | -module(mongoose_graphql_errors).
-export([format_error/1, err/2, crash/2]).
-ignore_xref([format_error/1, err/2, crash/2]).
-include("mongoose_graphql_types.hrl").
-include("mongoose_logger.hrl").
-type err_msg() :: #{message := binary(), extensions => map(), path => list()}.
-spec err(map(), term()) -> err_msg()... |
ba00dfcc400bc9314a0b1811c135a3a822d0b53ec131ec3acd568eaf64e1b5e7 | nuvla/ui | views_infra_services.cljs | (ns sixsq.nuvla.ui.deployment-dialog.views-infra-services
(:require [re-frame.core :refer [dispatch subscribe]]
[sixsq.nuvla.ui.clouds-detail.views :as clouds-detail]
[sixsq.nuvla.ui.credentials.subs :as creds-subs]
[sixsq.nuvla.ui.deployment-dialog.events :as events]
[... | null | https://raw.githubusercontent.com/nuvla/ui/4ca093e5d643bfe8df0beecdedb2b08d1bd9814d/code/src/cljs/sixsq/nuvla/ui/deployment_dialog/views_infra_services.cljs | clojure | (ns sixsq.nuvla.ui.deployment-dialog.views-infra-services
(:require [re-frame.core :refer [dispatch subscribe]]
[sixsq.nuvla.ui.clouds-detail.views :as clouds-detail]
[sixsq.nuvla.ui.credentials.subs :as creds-subs]
[sixsq.nuvla.ui.deployment-dialog.events :as events]
[... | |
33de40ef540fa1b524121c57230c5cd628c2b8f4549acebeee5e8352d9e08ebe | xapi-project/xen-api | xapi_host_helpers.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/6c2aadbb44166b389a3bd956c8a6af5787003d68/ocaml/xapi/xapi_host_helpers.ml | ocaml | * Common code between the fake and real servers for dealing with Hosts.
* @group Host Management
for host_operation_to_string
* Returns a table of operations -> API error options (None if the operation would be ok)
reboot, shutdown and apply_updates cannot run concurrently
The host must be disabled before reboo... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
3f9e075f6f8c0038b07dfd5c1f5966549f562f8e674d4024bc748e709e7a4b4b | kind2-mc/kind2 | termLib.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/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/terms/termLib.mli | ocaml |
type invariants = Term.t list
type model = (Var.t * Term.t) list
type path = (StateVar.t * Term.t list) list
type property = (string * Term.t)
type properties = property list
type cex = (property list * path)
type cexs = cex list
* A feature of a logic fragment for terms
* Quantifiers
* Equality over uninterpreted ... | 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... |
f15ea138401918adda1fb288313008d8a56bdf4e695c9dbb93a9ad0631872873 | defaultxr/cl-collider-tutorial | envfollow.lisp |
(in-package #:sc)
(defugen (env-follow "EnvFollow")
(&optional (in 0.0) (decaycoeff 0.99) (mul 1.0) (add 0.0))
((:ar (madd (multinew new 'pure-ugen in decaycoeff) mul add))
(:kr (madd (multinew new 'pure-ugen in decaycoeff) mul add))))
| null | https://raw.githubusercontent.com/defaultxr/cl-collider-tutorial/266ae3e6aaa16d35695266ec884c30626fc8e38d/cl-collider/ugens/extras/envfollow.lisp | lisp |
(in-package #:sc)
(defugen (env-follow "EnvFollow")
(&optional (in 0.0) (decaycoeff 0.99) (mul 1.0) (add 0.0))
((:ar (madd (multinew new 'pure-ugen in decaycoeff) mul add))
(:kr (madd (multinew new 'pure-ugen in decaycoeff) mul add))))
| |
6deed881ce926f72c7e298adda64c7ba7101393a17e36f88caae9d747529d847 | lspitzner/brittany | Test145.hs | import safe Data.List as L
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test145.hs | haskell | import safe Data.List as L
| |
518bac5a572ccede268cd2a98394c5bf64b7fc0106e813dc9ad9a60f0a466087 | rbkmoney/fistful-server | ff_withdrawal_session_eventsink_publisher.erl | -module(ff_withdrawal_session_eventsink_publisher).
-behaviour(ff_eventsink_publisher).
-export([publish_events/1]).
-include_lib("fistful_proto/include/ff_proto_withdrawal_session_thrift.hrl").
-include_lib("mg_proto/include/mg_proto_state_processing_thrift.hrl").
-type event() :: ff_eventsink_publisher:event(ff_w... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_server/src/ff_withdrawal_session_eventsink_publisher.erl | erlang |
Internals
Internals | -module(ff_withdrawal_session_eventsink_publisher).
-behaviour(ff_eventsink_publisher).
-export([publish_events/1]).
-include_lib("fistful_proto/include/ff_proto_withdrawal_session_thrift.hrl").
-include_lib("mg_proto/include/mg_proto_state_processing_thrift.hrl").
-type event() :: ff_eventsink_publisher:event(ff_w... |
28637c3f77e4039d7d83057c2ef035308c16b6abdf5a318d1dcafd6024e2fa0a | serokell/ariadne | Request.hs | module Ariadne.UI.Qt.Widgets.Dialogs.Request
( RequestAccounts(..)
, Request
, startRequest
, addNewAddress
) where
import Data.Bits
import qualified Data.Text as T
import Graphics.UI.Qtah.Core.Types
(QtLayoutDirection(..), alignHCenter, alignRight, alignVCenter)
import Graphics.UI.Qtah.Signal (connect_)
... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ui/qt-lib/src/Ariadne/UI/Qt/Widgets/Dialogs/Request.hs | haskell | This is needed to put the icon right of the text | module Ariadne.UI.Qt.Widgets.Dialogs.Request
( RequestAccounts(..)
, Request
, startRequest
, addNewAddress
) where
import Data.Bits
import qualified Data.Text as T
import Graphics.UI.Qtah.Core.Types
(QtLayoutDirection(..), alignHCenter, alignRight, alignVCenter)
import Graphics.UI.Qtah.Signal (connect_)
... |
7cee06b5e74b8dfe2c4cdc57799042e9c06b3d749bea0edb41239c44704384d1 | jrh13/hol-light | primitive.ml | (* ========================================================================= *)
(* Existence of primitive roots modulo certain numbers. *)
(* ========================================================================= *)
needs "Library/integer.ml";;
needs "Library/isum.ml";;
needs "Library/binomial.... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Library/primitive.ml | ocaml | =========================================================================
Existence of primitive roots modulo certain numbers.
=========================================================================
-------------------------------------------------------------------------
Some lemmas con... |
needs "Library/integer.ml";;
needs "Library/isum.ml";;
needs "Library/binomial.ml";;
needs "Library/pocklington.ml";;
needs "Library/multiplicative.ml";;
let DIVIDES_BINOM_PRIME = prove
(`!n p. prime p /\ 0 < n /\ n < p ==> p divides binom(p,n)`,
REPEAT STRIP_TAC THEN
MP_TAC(AP_TERM `(divides) p` (SPECL [`p - n... |
0070a678c79e58efecd0cc17a0efa9302a16c15b15a5f6edb43d87808041043d | gilith/hol-light | binomial.ml | (* ========================================================================= *)
(* Binomial coefficients and the binomial theorem. *)
(* ========================================================================= *)
prioritize_num();;
(* --------------------------------------------------------... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Library/binomial.ml | ocaml | =========================================================================
Binomial coefficients and the binomial theorem.
=========================================================================
-------------------------------------------------------------------------
Binomial coeffi... |
prioritize_num();;
let binom = define
`(!n. binom(n,0) = 1) /\
(!k. binom(0,SUC(k)) = 0) /\
(!n k. binom(SUC(n),SUC(k)) = binom(n,SUC(k)) + binom(n,k))`;;
let BINOM_0 = prove
(`!n. binom(0,n) = if n = 0 then 1 else 0`,
INDUCT_TAC THEN REWRITE_TAC[binom; NOT_SUC]);;
let BINOM_LT = prove
(`!n k. n < k ==... |
583647c95b7830487b5d0bcbd89019d95fef80c385fc691f7cdabd2f21893fd1 | mfoemmel/erlang-otp | wxFilePickerCtrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 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/wx/src/gen/wxFilePickerCtrl.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 2008 - 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 "
@type ( ) . An object reference , The... |
a4f171e93f0cd8d5e0a4a464a7ad94eb975ff6705efd38ef4c35264459c6553c | IndianRoboticsOrganization/ArimaTTS | ssn_hts_demo_tokenizer_eng.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/IndianRoboticsOrganization/ArimaTTS/7377dca466306e2e6b90a063427273142cd50616/tamil/festvox/ssn_hts_demo_tokenizer_eng.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | Tokenizer for US English ( standard in festival distribution )
None required for English
(define (ssn_hts_demo::token_to_words token name)
"(cmu_us_awb::token_to_words token name)
Specific token to word rules for the voice cmu_us_awb. Returns a list
of words that expand given token with name."
(cond
(eng... |
78d46fb1d3762870b7532abae2028b49da3ec5f9d067861ff69cf08abcab4a59 | webyrd/mediKanren | transform-generic.rkt | #lang racket/base
(provide transform-generic)
;; transform-node-and-edge is a pair (transform-node . transform-edge) containing
;; - a transform node function/procedure (transform-node-jsonl or transform-node-tsv)
;; - a transform edge function/procedure (transform-edge-jsonl or transform-edge-tsv)
(define transform... | null | https://raw.githubusercontent.com/webyrd/mediKanren/1ad7e751f12b267428850407359b557528d907ae/medikanren2/neo/neo-data-import/transform-2tsv-to-4tsv-kgs/transform-generic.rkt | racket | transform-node-and-edge is a pair (transform-node . transform-edge) containing
- a transform node function/procedure (transform-node-jsonl or transform-node-tsv)
- a transform edge function/procedure (transform-edge-jsonl or transform-edge-tsv)
--- nodes ---
--- edges --- | #lang racket/base
(provide transform-generic)
(define transform-generic
(lambda (import-directory-path
export-directory-path
nodes-import-file-name
edges-import-file-name
export-base-file-name
transform-node-and-edge)
(define node-export-file-name
... |
0d430dce36fd53cd73c519e8916a75a51e35f5ad566d3c7a9501e64c3690a9bb | incoherentsoftware/defect-process | Manager.hs | module Player.SecondarySkill.Manager
( module Player.SecondarySkill.Manager.Types
, mkSecondarySkillManager
, thinkSecondarySkillManager
, updateSecondarySkillManager
, giveSecondarySkillManagerSkill
, clearSecondarySkillManagerSkill
, secondarySkillManagerNeutralSlotType
, secondarySkil... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/4ce836f8996f5d5be050b6fe3a79c42a7ae7caa8/src/Player/SecondarySkill/Manager.hs | haskell | module Player.SecondarySkill.Manager
( module Player.SecondarySkill.Manager.Types
, mkSecondarySkillManager
, thinkSecondarySkillManager
, updateSecondarySkillManager
, giveSecondarySkillManagerSkill
, clearSecondarySkillManagerSkill
, secondarySkillManagerNeutralSlotType
, secondarySkil... | |
fd15a68ae46c734bf53e5fb1fa527791579b0f6708d5f36bc5f0121ad13e051f | samrushing/irken-compiler | t_cmp.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/string.scm")
(printf (cmp-repr (magic-cmp "thing1" "thing2")) "\n")
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t_cmp.scm | scheme | -*- Mode: Irken -*- |
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/string.scm")
(printf (cmp-repr (magic-cmp "thing1" "thing2")) "\n")
|
4ad1a0179e38bb88c32fa252d2f606f275c972e97ff70ee6a8f49507e54f6c29 | johnwhitington/camlpdf | pdfcrypt.mli | (** Decrypting PDF files *)
* Note that encryption depends on fixed object and generation numbers : do n't
change these ( for example by calling [ Pdf.remove_unreferenced ] on the PDF )
before writing .
Encryption support is part of the [ Pdfwrite ] module , since files are encrypted when they 're written .
cha... | null | https://raw.githubusercontent.com/johnwhitington/camlpdf/df9320a8f3dd8b78329faeb1a9a103a30c847d3f/pdfcrypt.mli | ocaml | * Decrypting PDF files
* If this is set, various debug is produced on standard output. On startup, is set to false
Permissions.
* Decrypt a PDF document, given the user password, returning the permissions
under which the document was encrypted.
* Decrypt a PDF document, given the owner password.
* Is a PDF encryp... |
* Note that encryption depends on fixed object and generation numbers : do n't
change these ( for example by calling [ Pdf.remove_unreferenced ] on the PDF )
before writing .
Encryption support is part of the [ Pdfwrite ] module , since files are encrypted when they 're written .
change these (for example by ca... |
cf35b2a6bb37567a3b4dfd36ee6ee2fcf90a0794bff486aeb5e2bd938e8c162f | enaeher/contrail | within_test_namespace.clj | (ns contrail.within-test-namespace)
(defn test-fn-1 [f]
(f))
| null | https://raw.githubusercontent.com/enaeher/contrail/5903ba625e97312c8b83cb1b5baafdf51afc9178/test/contrail/within_test_namespace.clj | clojure | (ns contrail.within-test-namespace)
(defn test-fn-1 [f]
(f))
| |
bcca6bf9459869d71df76aadcf95c9fa958eca7d094226ac7f1d7492acf9eb2a | marcoheisig/Typo | ntype-union.lisp | (in-package #:typo.ntype)
(defmethod ntype-union
((ntype1 ntype)
(ntype2 ntype))
(multiple-value-bind (p1 p1-precise-p)
(ntype-primitive-ntype ntype1)
(multiple-value-bind (p2 p2-precise-p)
(ntype-primitive-ntype ntype2)
(multiple-value-bind (union union-precise-p)
(primiti... | null | https://raw.githubusercontent.com/marcoheisig/Typo/303e21c38b1773f7d6f87eeb7f03617c286c4a44/code/ntype/ntype-union.lisp | lisp | Array Ntype Union | (in-package #:typo.ntype)
(defmethod ntype-union
((ntype1 ntype)
(ntype2 ntype))
(multiple-value-bind (p1 p1-precise-p)
(ntype-primitive-ntype ntype1)
(multiple-value-bind (p2 p2-precise-p)
(ntype-primitive-ntype ntype2)
(multiple-value-bind (union union-precise-p)
(primiti... |
639a235f9ee4f4efef47118f81cffcc007a998015d9afc3c8a43a3873609f389 | quoll/life | mathsops.cljc | (ns clojure.core.matrix.impl.mathsops
#?(:cljs (:require-macros [clojure.core.matrix.impl.mathsops :refer [def-mop def-mops]])))
;; data structure for code generation of maths operations
;; format is (<symbol> <java.lang.Math equivalent>)
(defn ^double to-degrees*
[^double x]
#?(:clj (Math/toDegrees x)
:cl... | null | https://raw.githubusercontent.com/quoll/life/f6647351990c076bc3e699989ba32293ea009314/docs/cljs/out/clojure/core/matrix/impl/mathsops.cljc | clojure | data structure for code generation of maths operations
format is (<symbol> <java.lang.Math equivalent>) | (ns clojure.core.matrix.impl.mathsops
#?(:cljs (:require-macros [clojure.core.matrix.impl.mathsops :refer [def-mop def-mops]])))
(defn ^double to-degrees*
[^double x]
#?(:clj (Math/toDegrees x)
:cljs (/ (* x 180.0) Math/PI)))
(defn ^double to-radians*
[^double x]
#?(:clj (Math/toRadians x)
:cljs ... |
66dec4fdb87ea4fc73bb7f843349b00df57619788ad201012a2f9decf6a25b40 | OpenC2-org/ocas | send_response.erl | @author
( C ) 2017 , sFractal Consulting LLC
%%%
-module(send_response).
%%%-------------------------------------------------------------------
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following condition... | null | https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/send_response.erl | erlang |
-------------------------------------------------------------------
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... | @author
( C ) 2017 , sFractal Consulting LLC
-module(send_response).
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR... |
7ed95bdf5004ee93ba633c59f8f92129b6489a2d4a145d585eb78f7afefad441 | higherkindness/mu-haskell | Schemaless.hs | # language AllowAmbiguousTypes #
# language DataKinds #
# language FlexibleContexts #
# language FlexibleInstances #
# language GADTs #
# language MultiParamTypeClasses #
# language PolyKinds #
{-# language ScopedTypeVariables #-}
{-# language StandaloneDerivin... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/core/schema/src/Mu/Schema/Interpretation/Schemaless.hs | haskell | # language ScopedTypeVariables #
# language StandaloneDeriving #
|
Description : Terms without an associated schema
In the edges of your application it's useful to
consider terms for which a type-level schema has
not yet been applied. Think of receiving a JSON
document: you can parse it but checking the schema
is... | # language AllowAmbiguousTypes #
# language DataKinds #
# language FlexibleContexts #
# language FlexibleInstances #
# language GADTs #
# language MultiParamTypeClasses #
# language PolyKinds #
# language TypeApplications #
# language TypeOperators ... |
df4b8b86fc0bf412b45d495e076f4dc0bf8d8164c02ca9af5889218e7cc3cbf5 | NalaGinrut/artanis | oht.scm | -*- indent - tabs - mode : nil ; coding : utf-8 -*-
;; Copyright (C) 2014,2015,2016,2017,2018
" Mu Lei " known as " NalaGinrut " < >
Artanis is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License and GNU
Lesser General Public License publishe... | null | https://raw.githubusercontent.com/NalaGinrut/artanis/3412d6eb5b46fde71b0965598ba085bacc2a6c12/artanis/oht.scm | scheme | coding : utf-8 -*-
Copyright (C) 2014,2015,2016,2017,2018
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License and GNU Lesser General Public License
for more details.
and GNU Lesser Gener... | " Mu Lei " known as " NalaGinrut " < >
Artanis is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License and GNU
Lesser General Public License published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
A... |
fa41d40cefd1e810a682e2f569fa6c62307eb1bb98dccde523946ea4cd811480 | ZHaskell/z-data | Base.hs | |
Module : Z.Data . Text . Base
Description : Unicode text processing
Copyright : ( c ) , 2017 - 2018
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
A ' Text ' wrap a ' Bytes ' which will be interpreted using UTF-8 encoding . User should always us... | null | https://raw.githubusercontent.com/ZHaskell/z-data/e18b5f2a70d919cac54b25cf02a1daac0ebc5401/Z/Data/Text/Base.hs | haskell | * Text type
* Building text
* Basic creating
* Conversion between list
* Conversion between codepoint vector
* Basic interface
** Special folds
** Text display width
** normalization
** Case conversion
$case
** Unicode category
** Collate
* Re-exports
* Constants
** Locale
** Category
* Misc
^ Extra... | |
Module : Z.Data . Text . Base
Description : Unicode text processing
Copyright : ( c ) , 2017 - 2018
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
A ' Text ' wrap a ' Bytes ' which will be interpreted using UTF-8 encoding . User should always us... |
9ad26168dae28b5ca8ce72674fef4b1e08a3025de0284121e5f8ebc438c889f4 | Feldspar/feldspar-language | ArrayOps.hs | --
Copyright ( c ) 2020 , ERICSSON AB
-- 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... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Compiler/Imperative/ArrayOps.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.
* Redi... | Copyright ( c ) 2020 , ERICSSON AB
* Neither the name of the ERICSSON AB nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIG... |
4f94b8f36dc60b841e2a8f38b977cdade814e535ecde84d81e61bee8d3e04ad0 | brandonbloom/wabt-clj | values.clj | (ns wabt-clj.values)
(defn name? [x]
;;TODO: Tighter validation.
(string? x))
(defn id? [x]
(and (simple-symbol? x)
(= (first (str x)) \$)))
(defn value? [x]
(or (integer? x)
(float? x)
(string? x) ; Includes names.
(id? x)))
(defn u32? [x]
(and (integer? x)
TODO : check .
(defn... | null | https://raw.githubusercontent.com/brandonbloom/wabt-clj/45b80fb05fc49d52ab117a699e9c56582a7078b3/src/wabt_clj/values.clj | clojure | TODO: Tighter validation.
Includes names.
TODO: check min/max
TODO: check min/max
TODO: check min/max
TODO: check min/max | (ns wabt-clj.values)
(defn name? [x]
(string? x))
(defn id? [x]
(and (simple-symbol? x)
(= (first (str x)) \$)))
(defn value? [x]
(or (integer? x)
(float? x)
(id? x)))
(defn u32? [x]
(and (integer? x)
TODO : check .
(defn u64? [x]
(and (integer? x)
TODO : check .
(defn i32? [x]
(de... |
9b99605f0992da45ec32d85d703dbfe1f299cdad58b40ecc67b84dd0fca4e5f2 | uim/uim | event.scm | ;;; event.scm: Event definitions
;;;
Copyright ( c ) 2004 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of source code must retain the... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/event.scm | scheme | event.scm: Event definitions
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following... | Copyright ( c ) 2004 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
00d505de989b2d8dbecf917e5b77104f2d06145dd2d74078ca9f45c5db591c04 | robstewart57/rdf4h | TurtleTest.hs | {-# LANGUAGE OverloadedStrings #-}
module W3C.TurtleTest
( testsParsec
, testsAttoparsec
, mfBaseURITurtle
) where
import Test.Tasty
import qualified Test.Tasty.HUnit as TU
import Data.Semigroup ((<>))
import Data.Maybe (fromJust)
import qualified Data.Text as T
import W3C.Manifest
import W3C.W3CAssertions
... | null | https://raw.githubusercontent.com/robstewart57/rdf4h/22538a916ec35ad1c46f9946ca66efed24d95c75/testsuite/tests/W3C/TurtleTest.hs | haskell | # LANGUAGE OverloadedStrings #
[NOTE] Was previously: / |
module W3C.TurtleTest
( testsParsec
, testsAttoparsec
, mfBaseURITurtle
) where
import Test.Tasty
import qualified Test.Tasty.HUnit as TU
import Data.Semigroup ((<>))
import Data.Maybe (fromJust)
import qualified Data.Text as T
import W3C.Manifest
import W3C.W3CAssertions
import Data.RDF.Types
import Data.... |
83c3ed253187c0a704a1e352eafe929fa0d285e1d26bce699c43a6120612f7a9 | mariari/Misc-Lisp-Scripts | HW8.lisp | (ql:quickload "cl-plplot")
(defparameter *a* 3)
(defpackage #:plot
(:nicknames #:pl)
(:use #:cl-plplot
#:common-lisp))
(defun range (max &optional (min 0) (step 1))
(loop for x from min to max by step
collect x))
(in-package #:plot)
(defun generate-x (number)
(let* ((curr (* *a* (/ (random 1000... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Class/probability/HW8.lisp | lisp | (ql:quickload "cl-plplot")
(defparameter *a* 3)
(defpackage #:plot
(:nicknames #:pl)
(:use #:cl-plplot
#:common-lisp))
(defun range (max &optional (min 0) (step 1))
(loop for x from min to max by step
collect x))
(in-package #:plot)
(defun generate-x (number)
(let* ((curr (* *a* (/ (random 1000... | |
1b80aaa14d11a9b25cde77dd2a4c749769b6ff43437e8d30bd43a9b788874f6a | dcavar/schemeNLP | countbigrams4.scm | ":"; exec mzscheme -r $0 "$@"
;;; ----------------------------------------------------
;;; Filename: countbigrams4.ss
Author : < >
;;;
( C ) 2006 by
;;;
;;; This code is published under the restrictive GPL!
;;; Please find the text of the GPL here:
;;;
;;;
;;; It is free for use, change, etc. as long as ... | null | https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/countbigrams4.scm | scheme | exec mzscheme -r $0 "$@"
----------------------------------------------------
Filename: countbigrams4.ss
This code is published under the restrictive GPL!
Please find the text of the GPL here:
It is free for use, change, etc. as long as the copyright
note above is included in any modified version of the co... |
Author : < >
( C ) 2006 by
1 . The text file is loaded into memory .
2 . The text is tokenized , i.e. converted into a list of tokens .
3 . Two adjacent tokens are placed into a hash - table as keys , the value
4 . The hash - table is converted into a list of key - value tuples .
5 . The key - va... |
57f6f70dd7fbe77935361df78cec7bec1b137107c98db51a6e5aa4b55052ec56 | slipstream/SlipStreamServer | callback_email_validation.clj | (ns com.sixsq.slipstream.ssclj.resources.callback-email-validation
(:require
[clojure.tools.logging :as log]
[com.sixsq.slipstream.db.impl :as db]
[com.sixsq.slipstream.ssclj.resources.callback :as callback]
[com.sixsq.slipstream.ssclj.resources.common.crud :as crud]
[com.sixsq.slipstream.ssclj.re... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/resources/callback_email_validation.clj | clojure | (ns com.sixsq.slipstream.ssclj.resources.callback-email-validation
(:require
[clojure.tools.logging :as log]
[com.sixsq.slipstream.db.impl :as db]
[com.sixsq.slipstream.ssclj.resources.callback :as callback]
[com.sixsq.slipstream.ssclj.resources.common.crud :as crud]
[com.sixsq.slipstream.ssclj.re... | |
366eaf08057f21255438cad5fc8eaa1d236e501b43218bf8014f853fb8e9107e | ghcjs/jsaddle-dom | SVGLengthList.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGLengthList
(clear, initialize, initialize_, getItem, getItem_,
insertItemBefore, insertItemBefore_, repl... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGLengthList.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGLengthList
(clear, initialize, initialize_, getItem, getItem_,
insertItemBefore, insertItemBefore_, replaceItem, replaceItem_,
removeItem, removeItem_, appendItem, appendItem_, getNumberOfItems,
... |
40f5e71354f3fc6f7b7d0831ec8a05bc0499d1ee1b2f708f855a34a58bf68723 | edalorzo/learning-clojure | function_argument_evaluation.clj | (ns learn.macros.basics.function-argument-evaluation)
(comment
(defn print-with-asterisks [printable-argument]
(println "******")
(println printable-argument)
(println "******"))) | null | https://raw.githubusercontent.com/edalorzo/learning-clojure/b5db63d8e783767a85af19ccb8dbf4d4e0f53d62/src/learn/macros/basics/function_argument_evaluation.clj | clojure | (ns learn.macros.basics.function-argument-evaluation)
(comment
(defn print-with-asterisks [printable-argument]
(println "******")
(println printable-argument)
(println "******"))) | |
2b86901dfca8784eb5932518c8ddfee9896cbbf681756b4d560722ed23ddb2f9 | wfnuser/sicp-solutions | e3-56.scm | (define S (cons-stream 1 (merge (scale-stream S 2) (merge (scale-steam S 3) (scale-stream S 5))))) | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch3/e3-56.scm | scheme | (define S (cons-stream 1 (merge (scale-stream S 2) (merge (scale-steam S 3) (scale-stream S 5))))) | |
30182cac58e1f35708ab33e0346ef5a669c4e83959708075608119b0edbf9a3d | bmeurer/ocaml-rbtrees | myocamlbuild.ml | OASIS_START
(* DO NOT EDIT (digest: 355f8746f6e2fa5246e9e19298d60eff) *)
module OASISGettext = struct
# 21 "/opt/local/var/macports/build/_Users_bmeurer_Desktop_Projects_MacPorts_ports_devel_caml-oasis/caml-oasis/work/oasis-0.2.0/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
l... | null | https://raw.githubusercontent.com/bmeurer/ocaml-rbtrees/06c879da5b009025e65b9cbe9a36405bcf301f35/myocamlbuild.ml | ocaml | DO NOT EDIT (digest: 355f8746f6e2fa5246e9e19298d60eff)
these functions are not really officially exported
this lists all supported packages
this is supposed to list available syntaxes, but I don't know how to do it.
ocamlfind command
by using Before_options one let command line options have an higher priorit... | OASIS_START
module OASISGettext = struct
# 21 "/opt/local/var/macports/build/_Users_bmeurer_Desktop_Projects_MacPorts_ports_devel_caml-oasis/caml-oasis/work/oasis-0.2.0/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_... |
3d350d92104f107264f03ef5538bc9a092a7e6368a02441d072e81e69c68a386 | patrickt/possession | Amount.hs | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
-- Various numeric quantities.
module Data.Amount (
Amount (..),
Hearing (..),
) where
import Dhall qualified
import Numeric.Natural
import System.Random.MWC.... | null | https://raw.githubusercontent.com/patrickt/possession/24f7607ebfce3c10e8aae620cf70aafc5fa43e5a/src/Data/Amount.hs | haskell | Various numeric quantities.
'coerce' isn't smart enough to let us derive this instance with the above
newtype declaration. | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Data.Amount (
Amount (..),
Hearing (..),
) where
import Dhall qualified
import Numeric.Natural
import System.Random.MWC.Exts (Variate (..))
import Data... |
e07695690903e2eae868ac09b60b7f3c07d50ee6dcf473f01455b8450a9621de | NorfairKing/really-safe-money | Currency.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE PolyKinds #
module Money.Currency
( IsCurrencyType (..),
Currency (..),
)
where
import Control.DeepSeq
import Data.Data
import Data.Validity
import Data.Word
import GHC.Generics (Generic)
-- | Class of type-level currencies
--
-- For e... | null | https://raw.githubusercontent.com/NorfairKing/really-safe-money/2a578865958c7b35d14ebae604cb02c7c81c26dd/really-safe-money/src/Money/Currency.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Class of type-level currencies
For example:
@
data USD
instance Currency USD where
data BTC
instance Currency BTC where
@
| Term-level currency | # LANGUAGE DeriveGeneric #
# LANGUAGE PolyKinds #
module Money.Currency
( IsCurrencyType (..),
Currency (..),
)
where
import Control.DeepSeq
import Data.Data
import Data.Validity
import Data.Word
import GHC.Generics (Generic)
deriving ( Generic , )
quantisationFactor Proxy = 100
deriving ( Generic... |
1632683dee45d8534ec17a11140f90bf1b40bc680c5eb0f010cd340b5c893b09 | sneerteam/sneer | udp_test.clj | (ns sneer.networking.udp-test
(:require [midje.sweet :refer [fact]]
[sneer.networking.udp :refer [start-udp-server]]
[sneer.test-util :refer :all]
[clojure.core.async :refer [chan >!! close!]])
(:import [java.net InetSocketAddress]))
( do ( require ' midje.repl ) ( midje.repl/... | null | https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/test/clojure/sneer/networking/udp_test.clj | clojure | (ns sneer.networking.udp-test
(:require [midje.sweet :refer [fact]]
[sneer.networking.udp :refer [start-udp-server]]
[sneer.test-util :refer :all]
[clojure.core.async :refer [chan >!! close!]])
(:import [java.net InetSocketAddress]))
( do ( require ' midje.repl ) ( midje.repl/... | |
d44600842009bb4a5cef599c15833de40821cd5d044528064bf8c76a93c133b5 | typedclojure/typedclojure | constant_lifter.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/cljc.analyzer/src/typed/cljc/analyzer/passes/constant_lifter.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns typed.cljc.analyzer.passes.constant-lifter
(:require [typed.cljc.analyzer :as common]
[typed.cljc.analyzer.utils :refer [const-val]]))
(defmulti constant-lift
"If the node represents a collection with no metadata, and every item of that
colle... |
ee9f967c0d6960231b743af7a7243668c9d1608231f3c6590a7276e689a47cdb | typedclojure/typedclojure | unsafe.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/3aa381a764df3cc39dc0a312a1d9823eb6b7c564/typed/clj.runtime/src/clojure/core/typed/unsafe.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:no-doc clojure.core.typed.unsafe)
(defmacro ignore-with-unchecked-cast
"Assumes the form is well typed and annotates it with the provided
type without verifying."
[form ty]
form)
|
744d052a0849b7064d5a5a9029b103cef608e31598c58ea3ea53e391287e3b6e | dapphub/dapptools | TTYCenteredList.hs | module EVM.TTYCenteredList where
-- Hard fork of brick's List that centers the currently highlighted line.
import Control.Lens
import Data.Maybe (fromMaybe)
import Brick.Types
import Brick.Widgets.Core
import Brick.Widgets.List
import qualified Data.Vector as V
-- | Turn a list state value into a widget given an i... | null | https://raw.githubusercontent.com/dapphub/dapptools/beaaeb6a6ad1cde22989bd088b10bdd06718b73f/src/hevm/src/EVM/TTYCenteredList.hs | haskell | Hard fork of brick's List that centers the currently highlighted line.
| Turn a list state value into a widget given an item drawing
function.
^ Rendering function, True for the selected element
^ Whether the list has focus
^ The List to be rendered
^ rendered widget
The number of items to show is the available... | module EVM.TTYCenteredList where
import Control.Lens
import Data.Maybe (fromMaybe)
import Brick.Types
import Brick.Widgets.Core
import Brick.Widgets.List
import qualified Data.Vector as V
renderList :: (Ord n, Show n)
=> (Bool -> e -> Widget n)
-> Bool
-> List n e
-> Wid... |
6a6566d3012bf4998914490188b292c2540cd3bb6469ebf0f3800c7806639549 | reagent-project/reagent-cookbook | core.cljs | (ns google-street-view.core
(:require
[reagent.dom :as rdom]
[reagent.core :as reagent]))
(def base-url
"=")
(defn address-url [street city]
(str street ", " city))
(defn street-view-url [street city]
(str base-url
(address-url street city)))
(def app-state (reagent/atom {:street "24 ... | null | https://raw.githubusercontent.com/reagent-project/reagent-cookbook/ccda91a74377098d27e2707c306a0187243cb290/recipes/google-street-view/src/cljs/google_street_view/core.cljs | clojure | (ns google-street-view.core
(:require
[reagent.dom :as rdom]
[reagent.core :as reagent]))
(def base-url
"=")
(defn address-url [street city]
(str street ", " city))
(defn street-view-url [street city]
(str base-url
(address-url street city)))
(def app-state (reagent/atom {:street "24 ... | |
b6020781026dca86c0f88a4cae78947eda42dd9f10ae7c0d77972b81a77f7a36 | NaaS/motto | resource_types.ml |
Resources that can be used during runtime , to store data and interact with
the environment .
, Cambridge University Computer Lab , June 2016
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Resources that can be used during runtime, to store data and interact with... | null | https://raw.githubusercontent.com/NaaS/motto/8ff3eba534be816d861dcfced93b68d593a12e2b/runtime/resource_types.ml | ocaml | Normally the result consists of an expression
This is interpreted relative to the device or context.
It might mean that there's nothing to be received on a
channel. This value indicates transient and non-erroneous states.
NOTE instead of polling for availability, could add a parameter indicating
... |
Resources that can be used during runtime , to store data and interact with
the environment .
, Cambridge University Computer Lab , June 2016
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Resources that can be used during runtime, to store data and interact with... |
d2381e3125b5e8f3c74130e6804a7750af83badb8c0e326720d24fb3d3662f5a | mfikes/fifth-postulate | ns223.cljs | (ns fifth-postulate.ns223)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns223.cljs | clojure | (ns fifth-postulate.ns223)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
51b02fc074d75eaec7322f590600ee818af6cbe4ef8629fd0d558053976f4954 | morgenthum/lambda-heights | Serialize.hs | # LANGUAGE LambdaCase #
module LambdaHeights.Serialize where
import Codec.Serialise
import Control.Concurrent.STM.TChan
import Control.Monad.STM
import qualified Data.ByteString.Lazy as BS
import qualified Data.ByteString.Lazy.Char8 as BS8
import System.Directory
type Source m a = m (Maybe a)
type Target m a = a ->... | null | https://raw.githubusercontent.com/morgenthum/lambda-heights/0a86ead23e8c223ba2672fa314666a06eb669fe2/lambda-heights/src/LambdaHeights/Serialize.hs | haskell | | Loops a serialization from a source to a target.
| Reads atomically from a channel.
| Serializes to a file and separates with "/".
| Deserializes a "/"-separated sequence of serializations from a file. | # LANGUAGE LambdaCase #
module LambdaHeights.Serialize where
import Codec.Serialise
import Control.Concurrent.STM.TChan
import Control.Monad.STM
import qualified Data.ByteString.Lazy as BS
import qualified Data.ByteString.Lazy.Char8 as BS8
import System.Directory
type Source m a = m (Maybe a)
type Target m a = a ->... |
545ecc228766b4d5dd0161d52f6fb0b265dd7659222c1f8dc0000912aee29dc5 | KingoftheHomeless/in-other-words | BaseControl.hs | # LANGUAGE DerivingVia , MagicHash #
module Control.Effect.BaseControl
( -- * Effects
BaseControl
-- * Actions
, withLowerToBase
, gainBaseControl
-- * Interpretations
, runBaseControl
, baseControlToFinal
-- * MonadBaseControl
, MonadBaseControl(..)
, control
-- * Threading utilitie... | null | https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/3cf67959aaab7b3ceccbabe338ef304e621ebd1b/src/Control/Effect/BaseControl.hs | haskell | * Effects
* Actions
* Interpretations
* MonadBaseControl
* Threading utilities
* Combinators for 'Algebra's
Intended to be used for custom 'Carrier' instances when
* Carriers
| Gain access to a function that allows for lowering @m@ to the
This is less versatile, but easier to use than 'gainBaseControl'.
# IN... | # LANGUAGE DerivingVia , MagicHash #
module Control.Effect.BaseControl
BaseControl
, withLowerToBase
, gainBaseControl
, runBaseControl
, baseControlToFinal
, MonadBaseControl(..)
, control
, threadBaseControlViaClass
, threadBaseControlViaUnlift
defining ' algPrims ' .
, powerAlgBaseContro... |
42c513c502e20bf80b17f031ce626545f7c5df728abe30a3b78d0365bf7c4574 | avsm/platform | lexer.mli | type input = {
file : string;
offset_to_location : int -> Odoc_model.Location_.point;
warnings : Odoc_model.Error.warning_accumulator;
lexbuf : Lexing.lexbuf;
}
val token : input -> Lexing.lexbuf -> Token.t Odoc_model.Location_.with_location
| null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/odoc.1.4.2/src/parser/lexer.mli | ocaml | type input = {
file : string;
offset_to_location : int -> Odoc_model.Location_.point;
warnings : Odoc_model.Error.warning_accumulator;
lexbuf : Lexing.lexbuf;
}
val token : input -> Lexing.lexbuf -> Token.t Odoc_model.Location_.with_location
| |
d9927731a3e9edd6ebbef749d643c4d2543ba9230c835dee36914a973c44c682 | jaminalder/staticart | sketch_2.clj | (ns staticart.sketch-2
(:require [quil.core :as q :include-macros true]
[staticart.draw :as d]
[staticart.noise :as noise]
[staticart.settings :refer [settings]]))
(defn draw []
(d/background 360)
(d/stroke 0)
#_(noise/noise-image 6 0.01)
(noise/noise-image-turb 6 0.01 #(*... | null | https://raw.githubusercontent.com/jaminalder/staticart/079ac3e526a03a7f3f95b8981d3ee3d797f2e865/src/staticart/sketch_2.clj | clojure | (ns staticart.sketch-2
(:require [quil.core :as q :include-macros true]
[staticart.draw :as d]
[staticart.noise :as noise]
[staticart.settings :refer [settings]]))
(defn draw []
(d/background 360)
(d/stroke 0)
#_(noise/noise-image 6 0.01)
(noise/noise-image-turb 6 0.01 #(*... | |
20692c0a4d56b3fdbaef5b21206de20ee4848a5f9ff41bc5dc279d5acaeff94a | NorfairKing/the-notes | Basics.hs | module Relations.Basics where
import Notes
import Logic.FirstOrderLogic.Macro
import Logic.PropositionalLogic.Macro
import NumberTheory.Macro
import Sets.CarthesianProduct.Terms
import Relations.Basics.Macro
import Relations.Basics.Terms
basicDef... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Relations/Basics.hs | haskell | module Relations.Basics where
import Notes
import Logic.FirstOrderLogic.Macro
import Logic.PropositionalLogic.Macro
import NumberTheory.Macro
import Sets.CarthesianProduct.Terms
import Relations.Basics.Macro
import Relations.Basics.Terms
basicDef... | |
951c126b100257f2d88b46a774eea9feab7dae28421a0a41b01cffaba5897d06 | jarmitage/jarmlib | StreamOrbits.hs | -- Stream default orbits
:{
let p1 = p 1 . (|< orbit 0)
p2 = p 2 . (|< orbit 1)
p3 = p 3 . (|< orbit 2)
p4 = p 4 . (|< orbit 3)
p5 = p 5 . (|< orbit 4)
p6 = p 6 . (|< orbit 5)
p7 = p 7 . (|< orbit 6)
p8 = p 8 . (|< orbit 7)
p9 = p 9 . (|< orbit 8)
p10 = p 10 . (|< orbit 9)
... | null | https://raw.githubusercontent.com/jarmitage/jarmlib/853f6d18ab32630397be91ea89846d55e59e3d70/tidal/stream/StreamOrbits.hs | haskell | Stream default orbits | :{
let p1 = p 1 . (|< orbit 0)
p2 = p 2 . (|< orbit 1)
p3 = p 3 . (|< orbit 2)
p4 = p 4 . (|< orbit 3)
p5 = p 5 . (|< orbit 4)
p6 = p 6 . (|< orbit 5)
p7 = p 7 . (|< orbit 6)
p8 = p 8 . (|< orbit 7)
p9 = p 9 . (|< orbit 8)
p10 = p 10 . (|< orbit 9)
p11 = p 11 . (|< orbit... |
b89e43a8f52fd8394c9c11d9e29a07572d1d212ebd168693dcbc41c49c074c01 | rabbitmq/credentials-obfuscation | credentials_obfuscation_sup.erl | 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 /.
%%
Copyright ( c ) 2019 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(credentials_obfuscation_sup).
-behaviour... | null | https://raw.githubusercontent.com/rabbitmq/credentials-obfuscation/27eddb1b1d0fade5ac020ab3f22c4ffa62861085/src/credentials_obfuscation_sup.erl | erlang |
API
Supervisor callbacks
===================================================================
API functions
===================================================================
===================================================================
Supervisor callbacks
==============================================... | 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 /.
Copyright ( c ) 2019 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(credentials_obfuscation_sup).
-behaviour(super... |
c197a6456fd807b7e98ce935ac2d18c61cace9d82628ec7ffba753cd4e3d77af | int28h/HaskellTasks | 0037.hs |
Определим тип фигур Shape :
data Shape = Circle Double | Rectangle Double Double
У него два конструктора : Circle r — окружность радиуса r , и Rectangle a b — сторон a и b.
Реализуйте функцию area , уже определена в стандартной библиотеке .
Определим тип фигур Shape:
data Shape = Circle Double | ... | null | https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0037.hs | haskell |
Определим тип фигур Shape :
data Shape = Circle Double | Rectangle Double Double
У него два конструктора : Circle r — окружность радиуса r , и Rectangle a b — сторон a и b.
Реализуйте функцию area , уже определена в стандартной библиотеке .
Определим тип фигур Shape:
data Shape = Circle Double | ... | |
a797a3ae3aa8e1fcd23f84b47d93229f55b431a1a2895d539aec3da26bc91fb9 | monadbobo/ocaml-core | with_return.mli | belongs in Common , but moved here to avoid circular dependencies
type 'a return = private { return : 'b. 'a -> 'b }
val with_return : ('a return -> 'a) -> 'a
| null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/with_return.mli | ocaml | belongs in Common , but moved here to avoid circular dependencies
type 'a return = private { return : 'b. 'a -> 'b }
val with_return : ('a return -> 'a) -> 'a
| |
a6fd31dae4620edb5504fd19f6be6d7fb6365853d4ee6aaeb79211cded8a6027 | enaeher/contrail | core.clj | (ns contrail.core
"The main namespace for Contrail."
(:require [clojure.pprint :as pprint]
[contrail.within :as within]
[contrail.persistent-advice :as advice]
[richelieu.core :as richelieu]))
(def ^:dynamic *trace-out*
"Trace output will be sent to this writer, if bound, othe... | null | https://raw.githubusercontent.com/enaeher/contrail/5903ba625e97312c8b83cb1b5baafdf51afc9178/src/contrail/core.clj | clojure | Necessary to avoid a race condition where we've called
untrace, which alters the var root to remove the trace, but
an unrealized sequence still maintains a reference to the
traced function. | (ns contrail.core
"The main namespace for Contrail."
(:require [clojure.pprint :as pprint]
[contrail.within :as within]
[contrail.persistent-advice :as advice]
[richelieu.core :as richelieu]))
(def ^:dynamic *trace-out*
"Trace output will be sent to this writer, if bound, othe... |
a006a7c568ef73fb0e3fd46fdc0e689548fa71fa73b30c3529cfd5c965362b2b | nwf/dyna | Class.hs | ---------------------------------------------------------------------------
-- | Self-contained, recursive automata, parametric in ply functor.
--
Automata parameterised by functor F can be expected to behave as maps
-- from labels to F-structure over labels. That is, they are labeled
descriptions of fixed points ... | null | https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/XXX/Automata/Class.hs | haskell | -------------------------------------------------------------------------
| Self-contained, recursive automata, parametric in ply functor.
from labels to F-structure over labels. That is, they are labeled
labeling strategy in use inside an automaton from the user of the
representation.
Note that particular auto... | Automata parameterised by functor F can be expected to behave as maps
descriptions of fixed points of F. This interface hides the actual
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wall #
module Dyna.XXX.Automata.Class where
import qualified Data.Traversable as T
imp... |
ba396c9c5b79f579e78ff1acdc7765b8ceeaa252017e87ad60d94f6a2d23f9ab | cyga/real-world-haskell | ApplicativeParsec.hs | file : ch16 / ApplicativeParsec.hs
module ApplicativeParsec
(
module Control.Applicative
, module Text.ParserCombinators.Parsec
) where
import Control.Applicative
import Control.Monad (MonadPlus(..), ap)
-- Hide a few names that are provided by Applicative.
import Text.ParserCombinators.Parsec hidi... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch16/ApplicativeParsec.hs | haskell | Hide a few names that are provided by Applicative. | file : ch16 / ApplicativeParsec.hs
module ApplicativeParsec
(
module Control.Applicative
, module Text.ParserCombinators.Parsec
) where
import Control.Applicative
import Control.Monad (MonadPlus(..), ap)
import Text.ParserCombinators.Parsec hiding (many, optional, (<|>))
The Applicative instance... |
97147d0f410b50588e08e41d781908e6bfd092139a35556f8eb2cd5040ee2d20 | nchataing/caml-migrate-floatarray | refactor.mli | (******************************************************************)
Copyright ( C ) 2020 - 2021 . All rights reserved .
(* *)
(* This software may be modified and distributed under the terms *)
of the BSD license . See the LICENSE file for details... | null | https://raw.githubusercontent.com/nchataing/caml-migrate-floatarray/9e7bb55ba7a801f20cdd9ce7701f0bb0200c1459/src/refactor.mli | ocaml | ****************************************************************
This software may be modified and distributed under the terms
**************************************************************** | Copyright ( C ) 2020 - 2021 . All rights reserved .
of the BSD license . See the LICENSE file for details .
val refactor : use_get_set:string option -> string -> string -> unit
|
43e3722f174f309111fa0983be24b00359f499f449ae1cf2490e07753d1cec19 | moby/vpnkit | sig.ml | module type READ_INTO = sig
type flow
type error
val read_into: flow -> Cstruct.t ->
(unit Mirage_flow.or_eof, error) result Lwt.t
(** Completely fills the given buffer with data from [fd] *)
end
module type FLOW_CLIENT = sig
include Mirage_flow_combinators.SHUTDOWNABLE
type address
val connect:... | null | https://raw.githubusercontent.com/moby/vpnkit/6039eac025e0740e530f2ff11f57d6d990d1c4a1/src/hostnet/sig.ml | ocaml | * Completely fills the given buffer with data from [fd]
* [connect address] creates a connection to [address] and returns
he connected flow.
A server bound to some address
* Create a server from a file descriptor bound to a Unix domain socket
by some other process and passed to us.
* Bind a server to... | module type READ_INTO = sig
type flow
type error
val read_into: flow -> Cstruct.t ->
(unit Mirage_flow.or_eof, error) result Lwt.t
end
module type FLOW_CLIENT = sig
include Mirage_flow_combinators.SHUTDOWNABLE
type address
val connect: ?read_buffer_size:int -> address ->
(flow, [`Msg of string])... |
f10e5e3abb12602686b160833be9128892da92aae563fc1b87911b602b7070be | yoonka/charreada | charreada_app.erl | Copyright ( c ) 2013 ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%%
%% Redistributions of source code must retain the above copyright notice,
%% this list of conditions and the follo... | null | https://raw.githubusercontent.com/yoonka/charreada/34ea687754ce695104251bbaacfe4ce96bae6676/src/charreada_app.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in bina... | Copyright ( c ) 2013 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , O... |
8d24051cec73eec4ea9fdcfc726233e6b156108951bf1681676ffa4f06206c00 | RyanGlScott/text-show | FixedSpec.hs | |
Module : Spec . Data . FixedSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ test for ' Fixed ' values .
Module: Spec.Data.FixedSpec
Copyright: (C) 2014-2017 Ryan Scott
Licens... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Spec/Data/FixedSpec.hs | haskell | | Verifies 'showFixed' and 'showbFixed' generate the same output. | |
Module : Spec . Data . FixedSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ test for ' Fixed ' values .
Module: Spec.Data.FixedSpec
Copyright: (C) 2014-2017 Ryan Scott
Licens... |
467eed1b8214aeca87c08324bfa59f6b26aea9eb13c4d705ea566a09f8add79c | armedbear/abcl | test-jeannie.lisp | Jeannie is not in Quicklisp : see < file : install - jeannie.bash >
But we possibly need to install dependencies from Quicklisp
(ql:quickload :jeannie)
(time
(asdf:test-system :jeannie))
| null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/ci/test-jeannie.lisp | lisp | Jeannie is not in Quicklisp : see < file : install - jeannie.bash >
But we possibly need to install dependencies from Quicklisp
(ql:quickload :jeannie)
(time
(asdf:test-system :jeannie))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.