_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 |
|---|---|---|---|---|---|---|---|---|
b9dc94c028d1d79a93ae701a2cb86300d3776fff66db8352801a2e94a6176272 | sacerdot/CovidMonitoring | utils.erl | -module(utils).
-export([sleep/1, set_subtract/2, get_random/2, make_probability/1, check_service/1]).
sleep(T) ->
receive after T -> ok end.
L1 -- L2
set_subtract(L1, L2) ->
lists:filter(fun(X) -> not lists:member(X, L2) end, L1).
get_random(L, N) ->
F = fun(_, _, 0, Result) -> Result;
(_, [], _, Result... | null | https://raw.githubusercontent.com/sacerdot/CovidMonitoring/fe969cd51869bbe6479da509c9a6ab21d43e6d11/BartoliniFapohundaGuerra/src/utils.erl | erlang | -module(utils).
-export([sleep/1, set_subtract/2, get_random/2, make_probability/1, check_service/1]).
sleep(T) ->
receive after T -> ok end.
L1 -- L2
set_subtract(L1, L2) ->
lists:filter(fun(X) -> not lists:member(X, L2) end, L1).
get_random(L, N) ->
F = fun(_, _, 0, Result) -> Result;
(_, [], _, Result... | |
55f777cb80836ad179c456c63eb06d587d15beaeb7eadc4ffa822e58740bba51 | nfrisby/coxswain | T9999.hs | Possible GHC bug ?
--
Yes , indeed :
# LANGUAGE TypeFamilyDependencies #
import Data.Proxy (Proxy(Proxy))
type family T (a :: *) = (r :: *) | r -> a where
f :: ( T a ~ T b ) => a -> b
f x = x
| null | https://raw.githubusercontent.com/nfrisby/coxswain/bfd5777964a5b4ba64e1bcc4cf18df1c9d8fc558/coxswain/test/ill-typed/T9999.hs | haskell | Possible GHC bug ?
Yes , indeed :
# LANGUAGE TypeFamilyDependencies #
import Data.Proxy (Proxy(Proxy))
type family T (a :: *) = (r :: *) | r -> a where
f :: ( T a ~ T b ) => a -> b
f x = x
| |
5cb5e6562032462e1b5415f6336c7a4d983bbdca241c642e2aa60b8090ab1c7e | mfp/ocsiblog | run_tests.ml | Copyright ( C ) 2009 < >
open OUnit
let tests = "All tests" >:::
[
Test_simple_markup.tests;
]
let () =
ignore (run_test_tt_main tests)
| null | https://raw.githubusercontent.com/mfp/ocsiblog/e5048a971f3e4289855214418338ac032f11ea4c/run_tests.ml | ocaml | Copyright ( C ) 2009 < >
open OUnit
let tests = "All tests" >:::
[
Test_simple_markup.tests;
]
let () =
ignore (run_test_tt_main tests)
| |
01009cc6f0a903467d0c51980d73e5106869772fcfd8820f1b17ac2205c5b09c | ufo5260987423/scheme-langserver | test-shrinker.sps | #!/usr/bin/env scheme-script
-*- mode : scheme ; coding : utf-8 -*- ! #
Copyright ( c ) 2022 WANG
SPDX - License - Identifier : MIT
#!r6rs
(import
( rnrs ( 6 ) )
(chezscheme)
(srfi :64 testing)
(scheme-langserver virtual-file-system file-node)
(scheme-langserver analysis workspace)
(sche... | null | https://raw.githubusercontent.com/ufo5260987423/scheme-langserver/1d76523142a7b963a18bcb54fc71a9b52edcaa52/tests/analysis/dependency/test-shrinker.sps | scheme | coding : utf-8 -*- ! # | #!/usr/bin/env scheme-script
Copyright ( c ) 2022 WANG
SPDX - License - Identifier : MIT
#!r6rs
(import
( rnrs ( 6 ) )
(chezscheme)
(srfi :64 testing)
(scheme-langserver virtual-file-system file-node)
(scheme-langserver analysis workspace)
(scheme-langserver analysis package-manager akku)
... |
92402f97c40d92d99d87863c2b9dc89e7c768cea347664b55db9787e08164827 | fadbadml-dev/FADBADml | interval.ml | (**************************************************************************)
(* *)
(* FADBADml *)
(* *)
... | null | https://raw.githubusercontent.com/fadbadml-dev/FADBADml/bd5668433b8ad297aa70e91a032953d55923b533/example/reachability/interval.ml | ocaml | ************************************************************************
FADBADml
... | OCaml port by and
Based on FADBAD++ , written by and
Copyright 2019 - 2020
This file is distributed under the terms of the CeCILL - C license .
type scalar = float
type elt =
{
min: scalar;
max: scalar;
}... |
ab610a335ee61ece123795865b1830e72d814372c3efe03e27bd835c0eb900db | ComputerAidedLL/click-and-collect | parse_sequent.ml | let ll_parse sequent_as_string =
Ll_parser.main Ll_lexer.token (Lexing.from_string sequent_as_string);;
let except_syntax_error parse_method s =
try parse_method s
with t when Printexc.to_string t = "Parsing.Parse_error"
|| Printexc.to_string t = "(Failure \"lexing: empty token\")" ->
`Assoc [(... | null | https://raw.githubusercontent.com/ComputerAidedLL/click-and-collect/c1e882a496aaec054a05164ada6fc1056dd8ec18/parse_sequent.ml | ocaml | let ll_parse sequent_as_string =
Ll_parser.main Ll_lexer.token (Lexing.from_string sequent_as_string);;
let except_syntax_error parse_method s =
try parse_method s
with t when Printexc.to_string t = "Parsing.Parse_error"
|| Printexc.to_string t = "(Failure \"lexing: empty token\")" ->
`Assoc [(... | |
811be2679529caa23564bee7145949ef713430b5189e4f02e10c5130d8cb42a0 | bobot/FetedelascienceINRIAsaclay | expose.ml | (* Generate the graphics for the talk *)
open Rubik
module D = Display_base
(* Left associative *)
let ( >> ) c m = Cubie.mul c (Cubie.move(Move.make m))
let geom = { D.geom with D.width = 1.; height = 1. }
let save fname ?(geom=geom) cube =
let fh = open_out ("expose-" ^ fname ^ ".tex") in
D.cube_tikz fh ~geo... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/expose.ml | ocaml | Generate the graphics for the talk
Left associative
Local Variables:
End: |
open Rubik
module D = Display_base
let ( >> ) c m = Cubie.mul c (Cubie.move(Move.make m))
let geom = { D.geom with D.width = 1.; height = 1. }
let save fname ?(geom=geom) cube =
let fh = open_out ("expose-" ^ fname ^ ".tex") in
D.cube_tikz fh ~geom cube;
close_out fh
let () =
save "id" Cubie.id;
save ... |
ece1a8781c1d17a8f015dd05161ccaace78006b16307bd658fb214c14531b2cd | huiyaozheng/Mirage-zmq | config.ml | open Mirage
let main = foreign ~packages:[package "mirage-zmq"] "Local_lat.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "local_lat" [
main $ stack
]
| null | https://raw.githubusercontent.com/huiyaozheng/Mirage-zmq/af288a3378a7c357bd5646a3abf4fd5ae777369b/perf/libzmq/local/unikernel_lat/config.ml | ocaml | open Mirage
let main = foreign ~packages:[package "mirage-zmq"] "Local_lat.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "local_lat" [
main $ stack
]
| |
46452fb0938bdedd8957c9888d1db0b4d4279a424561c63f3fd73529d845dde0 | IBM-Watson/kale | cloud_foundry_test.clj | ;;
( C ) Copyright IBM Corp. 2016 All Rights Reserved .
;;
(ns kale.cloud-foundry-test
(:require [kale.cloud-foundry :as cf]
[kale.cloud-foundry-constants :refer :all]
[kale.common :refer [set-language prompt-user new-line]]
[org.httpkit.fake :refer [with-fake-http]]
... | null | https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/test/kale/cloud_foundry_test.clj | clojure | ( C ) Copyright IBM Corp. 2016 All Rights Reserved .
(ns kale.cloud-foundry-test
(:require [kale.cloud-foundry :as cf]
[kale.cloud-foundry-constants :refer :all]
[kale.common :refer [set-language prompt-user new-line]]
[org.httpkit.fake :refer [with-fake-http]]
[ches... | |
fa65d8165c3b8cc2de72661708162a17478d69717099e410cc6b0c3475e40020 | threatgrid/ctim | sorting_test.cljc | (ns ctim.domain.sorting-test
(:require [clj-momo.lib.clj-time.core :as time]
[clj-momo.lib.clj-time.coerce :as time-coerce]
[ctim.domain.sorting :as sut]
#?(:clj [clojure.test :refer [deftest is testing]]
:cljs [cljs.test :refer-macros [deftest is testing]])))
(deft... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/test/ctim/domain/sorting_test.cljc | clojure | This one is expired based on mocked 'now'
Expired one comes last
This one is expired based on mocked 'now'
JS dates of the same instant are still not equal, so
convert them back to strings for equality check
Expired one comes last | (ns ctim.domain.sorting-test
(:require [clj-momo.lib.clj-time.core :as time]
[clj-momo.lib.clj-time.coerce :as time-coerce]
[ctim.domain.sorting :as sut]
#?(:clj [clojure.test :refer [deftest is testing]]
:cljs [cljs.test :refer-macros [deftest is testing]])))
(deft... |
51834470bbc2f88078ac407b0cb1a977ae036f4433522eecaedb568ffd9b27cc | ocamllabs/ocaml-modular-implicits | class_2.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Ga... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/letrec/class_2.ml | ocaml | *********************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2012 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
class test =
let rec f = print_endline "... |
f58c740ad4c5d5b766c0c6013a90771d08837bd9f742616c05fd755156e8d857 | kupl/LearnML | patch.ml | let rec isUniq (lst : 'a list) m : bool =
match lst with
| [] -> true
| hd :: tl -> if hd = m then false else isUniq tl m
let rec __s3 (__s4 : 'b list) __s5 : bool =
match __s4 with
| [] -> false
| __s11 :: __s12 -> if __s11 = __s5 then true else __s3 __s12 __s5
let rec __s6 (__s7 : 'b list) (__s8 : 'b ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/uniq/sub12/patch.ml | ocaml | let rec isUniq (lst : 'a list) m : bool =
match lst with
| [] -> true
| hd :: tl -> if hd = m then false else isUniq tl m
let rec __s3 (__s4 : 'b list) __s5 : bool =
match __s4 with
| [] -> false
| __s11 :: __s12 -> if __s11 = __s5 then true else __s3 __s12 __s5
let rec __s6 (__s7 : 'b list) (__s8 : 'b ... | |
a1a2b787c95b98761ab579834d554e9a5593045cb43624e4596cac348868a1a1 | EFanZh/EOPL-Exercises | exercise-1.29.rkt | #lang eopl
Exercise 1.29 [ ★ ★ ] ( sort ) returns a list of the elements of loi in ascending order .
;;
> ( sort ' ( 8 2 5 2 3 ) )
;; (2 2 3 5 8)
(define get-run
(lambda (loi)
(let ([head1 (car loi)]
[tail1 (cdr loi)])
(if (null? tail1)
(cons loi '())
(let ([head... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-1.29.rkt | racket |
(2 2 3 5 8) | #lang eopl
Exercise 1.29 [ ★ ★ ] ( sort ) returns a list of the elements of loi in ascending order .
> ( sort ' ( 8 2 5 2 3 ) )
(define get-run
(lambda (loi)
(let ([head1 (car loi)]
[tail1 (cdr loi)])
(if (null? tail1)
(cons loi '())
(let ([head2 (car tail1)])
... |
6a1d193a162d2246f8d2cd325b29696f00cab12e9cb29c37566880b7565faa67 | spurious/chibi-scheme-mirror | hash-tests.scm |
(cond-expand
(modules (import (srfi 1) (srfi 69) (chibi test)))
(else #f))
(test-begin "hash")
(define-syntax test-lset-eq?
(syntax-rules ()
((test-lset= . args)
(test-equal (lambda (a b) (lset= eq? a b)) . args))))
(define-syntax test-lset-equal?
(syntax-rules ()
((test-lset-equal? . args)
... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/hash-tests.scm | scheme | remove an element
remove a non-existing element
overwrite an existing element
walk and fold
copy
merge
alist->hash-table
update
string keys
string-ci keys
Exception values - this works because the return value from the
primitives is a cell, and we use the cdr opcode to retrieve the
stress test |
(cond-expand
(modules (import (srfi 1) (srfi 69) (chibi test)))
(else #f))
(test-begin "hash")
(define-syntax test-lset-eq?
(syntax-rules ()
((test-lset= . args)
(test-equal (lambda (a b) (lset= eq? a b)) . args))))
(define-syntax test-lset-equal?
(syntax-rules ()
((test-lset-equal? . args)
... |
3ce910a416142eda84c122b302364fb8bfdf1943aba8aae2e708813640446e1f | rwmjones/guestfs-tools | append_line.mli | virt - customize
* Copyright ( C ) 2016 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later v... | null | https://raw.githubusercontent.com/rwmjones/guestfs-tools/3a498512f58bc431db490e96cdb712b19389bda4/customize/append_line.mli | ocaml | * append_line [g root file line] appends a single line to a text file. | virt - customize
* Copyright ( C ) 2016 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later v... |
0e54684f6ace44815145250fe9b5d62afa5317303bf5f075f1e785434f497edf | helmutkian/cl-wasm-runtime | memory-example.lisp | (defvar *memory-wat*
"(module
(type $mem_size_t (func (result i32)))
(type $get_at_t (func (param i32) (result i32)))
(type $set_at_t (func (param i32) (param i32)))
(memory $mem 1)
(func $get_at (type $get_at_t) (param $idx i32) (result i32)
(i32.load (local.get $idx)))
(func $set_at ... | null | https://raw.githubusercontent.com/helmutkian/cl-wasm-runtime/283dc86fee11191d3a32a6116cc0cb4207e5dc3e/examples/memory-example.lisp | lisp | (defvar *memory-wat*
"(module
(type $mem_size_t (func (result i32)))
(type $get_at_t (func (param i32) (result i32)))
(type $set_at_t (func (param i32) (param i32)))
(memory $mem 1)
(func $get_at (type $get_at_t) (param $idx i32) (result i32)
(i32.load (local.get $idx)))
(func $set_at ... | |
515236e092f1cf31046bb7e13c3721ab4f2f7fd7e36b80d84c84d8208f805b0b | inanna-malick/merkle-schemes | Orphans.hs | -- FIXME: can I remove this?
# LANGUAGE IncoherentInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.Aeson.Orphans where
--------------------------------------------
import Data.Aeson
--------------------------------------------
import Util.RecursionSchemes
-----------------------------... | null | https://raw.githubusercontent.com/inanna-malick/merkle-schemes/4eac64f4df12ea7d1d1f3bb34010424db19e0a9e/merkle-schemes/src/Data/Aeson/Orphans.hs | haskell | FIXME: can I remove this?
------------------------------------------
------------------------------------------
------------------------------------------
FIXME: orphans, but these should exist | # LANGUAGE IncoherentInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.Aeson.Orphans where
import Data.Aeson
import Util.RecursionSchemes
instance (ToJSON1 f, ToJSON a) => ToJSON (f a) where
toJSON = liftToJSON toJSON toJSONList
instance (FromJSON1 f, FromJSON a) => FromJSON (f a) ... |
5d134fe9e48f802c006aaac7334d485db6be7fc5f0f324a26febdd7033ed5837 | msakai/toysolver | TextUtil.hs | {-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE BangPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : ToySolver.Internal.TextUtil
Copyright : ( c ) 2012 - 2014
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
--... | null | https://raw.githubusercontent.com/msakai/toysolver/5dc84559c2ec782b2247febe529e4abd0971d1d3/src/ToySolver/Internal/TextUtil.hs | haskell | # OPTIONS_HADDOCK show-extensions #
# LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
Module : ToySolver.Internal.TextUtil
License : BSD-style
Maintainer :
Stability : provisional
Portability : non-portable
---------------------------------... | Copyright : ( c ) 2012 - 2014
module ToySolver.Internal.TextUtil
( readInt
, readUnsignedInteger
) where
import Control.Exception
import Data.Word
# INLINABLE readInt #
readInt :: String -> Int
readInt ('-':str) = - readUnsignedInt str
readInt str = readUnsignedInt str
readUnsignedInt :: String -> Int... |
985203257fb0995177f548aae339999bb5bfa391de0aa8acaa7ab0aef5429cd3 | tek/polysemy-hasql | LookupPartialTest.hs | module Polysemy.Hasql.Test.Tree.LookupPartialTest where
import Polysemy.Db.Kind.Data.Tree (PrimTree, ProdRoot, ProdTree)
import Polysemy.Db.Tree.Lookup (lookupNames)
import Polysemy.Db.Tree.Partial (PartialTree, field, partially, (++>))
import Polysemy.Test (UnitTest, runTestAuto, (===))
data Sub1 =
Sub1 {
int ... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/test/Polysemy/Hasql/Test/Tree/LookupPartialTest.hs | haskell | module Polysemy.Hasql.Test.Tree.LookupPartialTest where
import Polysemy.Db.Kind.Data.Tree (PrimTree, ProdRoot, ProdTree)
import Polysemy.Db.Tree.Lookup (lookupNames)
import Polysemy.Db.Tree.Partial (PartialTree, field, partially, (++>))
import Polysemy.Test (UnitTest, runTestAuto, (===))
data Sub1 =
Sub1 {
int ... | |
c3be9d7fae71785c4a77353a67e618bdea64a8dd1a2d7a1a34279749feb38ed5 | shuieryin/wechat_mud | csv_to_object.erl | %%%-------------------------------------------------------------------
@author shuieryin
( C ) 2015 , Shuieryin
%%% @doc
%%%
%%% Converts csv files to object configs according to function
%%% provided from caller.
%%%
%%% @end
Created : 04 . Nov 2015 9:13 PM
%%%---------------------------------------------------... | null | https://raw.githubusercontent.com/shuieryin/wechat_mud/b2a9251a9b208fee5cd8c4213759750b95c8b8aa/src/common/csv_to_object.erl | erlang | -------------------------------------------------------------------
@doc
Converts csv files to object configs according to function
provided from caller.
@end
-------------------------------------------------------------------
API
generic atom
generic term
generic atom
generic tuple
generic atom
===========... | @author shuieryin
( C ) 2015 , Shuieryin
Created : 04 . Nov 2015 9:13 PM
-module(csv_to_object).
-author("shuieryin").
-export([
traverse_merge_files/4,
traverse_files/3,
traverse_files/4,
parse_file/2,
parse_file/3,
convert_priv_paths/1
]).
-define(FILE_EXTENSION, ".csv").
-define(NAME... |
70b6bf6908ba4e3a6cdd9ef572cdbf645e12fe9151cbdbd4ec57e8008526f4d1 | adaliu-gh/htdp | 10-175.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 10-175) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f... | null | https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/8-13%20Arbitrarily%20Large%20Data/10-175.rkt | racket | about the language level of this file in a form that our tools can easily process.
(make-wc Number Number Number) where letters represents the number of 1Strings
the words represents the number of words
the lines represents the number of line in a given file
String -> Wc
counts the number of letters, words, and l... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 10-175) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/batch-io)
(define-struct wc [letters words lines]... |
2d1c98c0dc6aa00b3642e3be13fdabbe93ccf6574c9e23ae9a796ad0a9b64bc3 | gedge-platform/gedge-platform | exometer_slide.erl | %% This file is a copy of exometer_slide.erl from ,
%% with the following modifications:
%%
1 ) The elements are tuples of numbers
%%
2 ) Only one element for each expected interval point is added , intermediate values
are discarded . Thus , if we have a window of 60s and interval of 5s , at max 12 elements
%%... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management_agent/src/exometer_slide.erl | erlang | This file is a copy of exometer_slide.erl from ,
with the following modifications:
are stored.
on the given intervals. Elements on each window are added to the closest interval point.
-------------------------------------------------------------------
-----------------------------------------------... | 1 ) The elements are tuples of numbers
2 ) Only one element for each expected interval point is added , intermediate values
are discarded . Thus , if we have a window of 60s and interval of 5s , at max 12 elements
3 ) Additions can be provided as increments to the last value stored
4 ) sum/1 implements the... |
0915ec13ebe11ee341f24c20262b55e4b8cdb0db700caa2b108bad5bfc034a17 | alx741/graphite | Generation.hs | # LANGUAGE ScopedTypeVariables #
module Data.Graph.Generation
(
* – Rényi model
erdosRenyi
, erdosRenyiU
, erdosRenyiD
-- * General Random graphs
, rndGraph
, rndGraph'
-- * Random adjacency matrix
, rndAdjacencyMatrix
) where
import Control.Monad (replicateM)
import Dat... | null | https://raw.githubusercontent.com/alx741/graphite/c911d7dae2c17d20c70ad9b7da1a1f7b142cbb9a/src/Data/Graph/Generation.hs | haskell | * General Random graphs
* Random adjacency matrix
| Generate a random graph for all the vertices of type /v/ in the list,
random edge attributes in /e/ within given bounds, and some existing
| Same as 'rndGraph' but uses attributeless edges
| Generate a random adjacency matrix
| Insert and edge between vertices... | # LANGUAGE ScopedTypeVariables #
module Data.Graph.Generation
(
* – Rényi model
erdosRenyi
, erdosRenyiU
, erdosRenyiD
, rndGraph
, rndGraph'
, rndAdjacencyMatrix
) where
import Control.Monad (replicateM)
import Data.List (foldl')
import System.Random
import Data.Hashable
... |
42df630f398c6d7788ff890399239a295f1fa19f9ced26286dbe824e587a621d | jaspervdj/hakyll | Tests.hs | --------------------------------------------------------------------------------
module Hakyll.Web.Html.Tests
( tests
) where
--------------------------------------------------------------------------------
import Data.Char (toUpper)
import Test.Tasty (TestTree, testGroup)
imp... | null | https://raw.githubusercontent.com/jaspervdj/hakyll/05070e8a2b025a625cca923d9438e4d647075646/tests/Hakyll/Web/Html/Tests.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Ass... | module Hakyll.Web.Html.Tests
( tests
) where
import Data.Char (toUpper)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit ((@=?))
import qualified Text.HTML.TagSoup as TS
import Hakyll.Web.Html
import TestSuite.Util
... |
140387c2f1a54722594882add369f4810142888826ab71949f05f357ba22bf23 | uhc/uhc | Plugin.hs | {-
A Plugin holds all info required for parsing from and formatting to a particular text format.
-}
-------------------------------------------------------------------------
-- Plugin structure
-------------------------------------------------------------------------
module Plugin
( Plugin(..), defaultPlugin
, Pl... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/text2text/Plugin.hs | haskell |
A Plugin holds all info required for parsing from and formatting to a particular text format.
-----------------------------------------------------------------------
Plugin structure
-----------------------------------------------------------------------
--------------------------------------------------------------... |
module Plugin
( Plugin(..), defaultPlugin
, PluginMp
)
where
import qualified Data.Map as Map
import UU.Parsing
import qualified EH.Util.FastSeq as Seq
import Common
import Text
import Text.Parser.Common
data Plugin
= Plugin
has a parser ( Maybe can not be used because parser type can not be type par... |
4e5dd8dbb7f67f72ad661d56fdc06897586afb4afb805572a303a2fce53c681f | LuisThiamNye/chic | svg.clj | (ns chic.ui.svg
(:require
[io.github.humbleui.core :as hui :refer [deftype+]]
[io.github.humbleui.protocols :as huip :refer [IComponent]])
(:import
[io.github.humbleui.skija Canvas Data]
(io.github.humbleui.skija.svg SVGLengthContext SVGDOM SVGSVG SVGLengthType)
[io.github.humbleui.types IPoint Point... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/ui/svg.clj | clojure | (ns chic.ui.svg
(:require
[io.github.humbleui.core :as hui :refer [deftype+]]
[io.github.humbleui.protocols :as huip :refer [IComponent]])
(:import
[io.github.humbleui.skija Canvas Data]
(io.github.humbleui.skija.svg SVGLengthContext SVGDOM SVGSVG SVGLengthType)
[io.github.humbleui.types IPoint Point... | |
b9b455aace2e3e8c03bc72e39f816bb868fb01ae7129647fed684c60ca7be7cf | SKA-ScienceDataProcessor/RC | ddp-in-memory-cuda.hs | # LANGUAGE TemplateHaskell #
module Main(main) where
import DNA.Channel.File (readDataMMap)
import DNA
import DDP
import DDP_Slice_CUDA
----------------------------------------------------------------
-- Distributed dot product
--
-- Note that actors which do not spawn actors on other nodes do not
-- receive CAD.
-... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS2/dna-programs/ddp-in-memory-cuda.hs | haskell | --------------------------------------------------------------
Distributed dot product
Note that actors which do not spawn actors on other nodes do not
receive CAD.
--------------------------------------------------------------
| Actor for calculating dot product
Show configuration | # LANGUAGE TemplateHaskell #
module Main(main) where
import DNA.Channel.File (readDataMMap)
import DNA
import DDP
import DDP_Slice_CUDA
ddpCollector :: CollectActor Double Double
ddpCollector = collectActor
(\s a -> return $! s + a)
(return 0)
(return)
remotable [ 'ddpCollector
]
ddpDotProd... |
29c89cded809fb892cf2c704bc091f56b392712b15b17661ee952879c0985bd1 | mbenke/zpf2013 | SimpleCheck2.hs | module SimpleCheck1 where
import System.Random
( StdGen -- :: *
: : IO StdGen
, Random(..) -- class
: : ( RandomGen g , Random a ) = > ( a , a ) - > g - > ( a , g )
, split -- :: RandomGen g => g -> (g, g)
rozdziela argument na
instance RandomGen StdGen
)
import Data.List( group, ... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Slides/13QC/SimpleCheck2.hs | haskell | :: *
class
:: RandomGen g => g -> (g, g)
* Arbitrary
Driver
configEvery ntests (arguments result) | module SimpleCheck1 where
import System.Random
: : IO StdGen
: : ( RandomGen g , Random a ) = > ( a , a ) - > g - > ( a , g )
rozdziela argument na
instance RandomGen StdGen
)
import Data.List( group, sort, intersperse )
import Control.Monad( liftM2, liftM3, liftM4 )
infix 1 ` classify `
newtype... |
1237c9d86a72319ef98209af8109848f233e5b22c7b95822615fcde8507de335 | yuriy-chumak/ol | loops-infinite.scm | ;
actually ca n't test because this is infinite task , so just do this one time
(let loop ()
(print "SPAM")
#|(loop)|#)
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/loops-infinite.scm | scheme |
(loop) |
actually ca n't test because this is infinite task , so just do this one time
(let loop ()
(print "SPAM")
|
6cef7f9cb3f60c143a8db72492a7597fab9e39836acaa1470e1f24b0f538fca7 | marick/fp-oo | t_pattern_text.clj | (ns sources.t-pattern-text
(:use midje.sweet))
(load-file "sources/pattern-text.clj")
(fact
(add-points [1 2] [3 4]) => [4 6]
(add-points-2 [1 2] [3 4]) => [4 6])
(fact
(factorial 0) => 1
(factorial 1) => 1
(factorial 5) => 120
(factorial-2 0) => 1
(factorial-2 1) => 1
(factorial-2 5) => 120
(... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/test/sources/t_pattern_text.clj | clojure | (ns sources.t-pattern-text
(:use midje.sweet))
(load-file "sources/pattern-text.clj")
(fact
(add-points [1 2] [3 4]) => [4 6]
(add-points-2 [1 2] [3 4]) => [4 6])
(fact
(factorial 0) => 1
(factorial 1) => 1
(factorial 5) => 120
(factorial-2 0) => 1
(factorial-2 1) => 1
(factorial-2 5) => 120
(... | |
ffac158b7eeac8ecd6f98abbfa105f39cc0f2d18aabc4b6219b6540a9da36b95 | hasura/graphql-data-specification | Definition.hs | module Schema.Model.Type.SelectionSetAggregate.Definition
( definition,
)
where
import DDL qualified
import Language.GraphQL.Draft.Syntax as GraphQL
import Schema.Context
import Schema.Model.Type.SelectionSetAggregate.Name (name)
import Schema.NamingConvention
definition ::
DDL.ModelDTO ->
Generate (GraphQL.O... | null | https://raw.githubusercontent.com/hasura/graphql-data-specification/b82b899a7d015c810a571d31322619aff2154b81/tooling/lib/Schema/Model/Type/SelectionSetAggregate/Definition.hs | haskell | module Schema.Model.Type.SelectionSetAggregate.Definition
( definition,
)
where
import DDL qualified
import Language.GraphQL.Draft.Syntax as GraphQL
import Schema.Context
import Schema.Model.Type.SelectionSetAggregate.Name (name)
import Schema.NamingConvention
definition ::
DDL.ModelDTO ->
Generate (GraphQL.O... | |
19ef1d0866cc5abc5becee8ead94dd40d00005562077f164d24a0e7abd310810 | ocaml/ocaml | build_as_type.ml | (* TEST
* expect
*)
let f = function
| ([] : int list) as x -> x
| _ :: _ -> assert false;;
[%%expect{|
val f : int list -> int list = <fun>
|}]
let f =
let f' = function
| ([] : 'a list) as x -> x
| _ :: _ -> assert false
in
f', f';;
[%%expect{|
val f : ('a list -> 'a list) * ('a list -> 'a list... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-misc/build_as_type.ml | ocaml | TEST
* expect
This should be flagged as non-exhaustive: because of the constraint [x]
is of type [t].
Make sure *all* the constraints are respected:
This should be flagged as non-exhaustive: because of the constraint [x]
is of type [t].
This should be flagged as non-exhaustive: because of the ... |
let f = function
| ([] : int list) as x -> x
| _ :: _ -> assert false;;
[%%expect{|
val f : int list -> int list = <fun>
|}]
let f =
let f' = function
| ([] : 'a list) as x -> x
| _ :: _ -> assert false
in
f', f';;
[%%expect{|
val f : ('a list -> 'a list) * ('a list -> 'a list) = (<fun>, <fun>)
|}]
... |
42996e98f3b68f41cdb410f7daa327f6c87c9bde660da3deb410fed62b33466d | AccelerationNet/symbol-munger | symbol-munger.lisp | (defpackage :symbol-munger
(:use :cl :cl-user :iter)
(:export :normalize-capitalization-and-spacing
:english->lisp-symbol
:english->lisp-name
:english->keyword
:english->camel-case
:english->studly-case
:english->underscores
:lisp->english
:lisp->keyword
:lisp->camel-case
... | null | https://raw.githubusercontent.com/AccelerationNet/symbol-munger/e96558e8315b8eef3822be713354787b2348b25e/symbol-munger.lisp | lisp | Check and enforce our assumptions
the last char we wrote was some kind of separator
handle capital letters as word-separators
in-place will not work
need to have a separator
dont start a string with a sep
put separators before new words
never reintern nil
never reintern nil
these are flattened so if nil it wi... | (defpackage :symbol-munger
(:use :cl :cl-user :iter)
(:export :normalize-capitalization-and-spacing
:english->lisp-symbol
:english->lisp-name
:english->keyword
:english->camel-case
:english->studly-case
:english->underscores
:lisp->english
:lisp->keyword
:lisp->camel-case
... |
7590fe96dc8ddd4493e409baac74b98a6789b9e6b16541771695c4493af9c445 | Torvaney/flow-solver | sat.clj | (ns flow-solver.sat
(:require [clojure.math.combinatorics :as combo]
[rolling-stones.core :as sat]
[ubergraph.core :as uber]))
(defn get-graph-colours
[g]
(->> g :attrs vals (map :color) distinct))
(defn get-node-colour
[g node]
(-> g :attrs (get node) :color))
(defn edge->sat
... | null | https://raw.githubusercontent.com/Torvaney/flow-solver/e215f93a293a493eb193fde52d27fa4ff88bf191/src/flow_solver/sat.clj | clojure | (ns flow-solver.sat
(:require [clojure.math.combinatorics :as combo]
[rolling-stones.core :as sat]
[ubergraph.core :as uber]))
(defn get-graph-colours
[g]
(->> g :attrs vals (map :color) distinct))
(defn get-node-colour
[g node]
(-> g :attrs (get node) :color))
(defn edge->sat
... | |
85d9005b320610f15b59b48b00f85c48779f46b878626bfa26b5ae968bf8c974 | dwayne/eopl3 | env.rkt | #lang eopl
(require "./parser.rkt")
(provide
;; Build
empty-env
extend-env
extend-env-rec
;; Query
env?
apply-env
identifier? identifier=?)
(define-datatype env env?
[empty]
[extend
(var identifier?)
(val any?)
(saved-env env?)]
[extend-rec
(p-names (list-of identifier?))
(b-vars (lis... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/EXPLICIT-REFS-4.12/env.rkt | racket | Build
Query | #lang eopl
(require "./parser.rkt")
(provide
empty-env
extend-env
extend-env-rec
env?
apply-env
identifier? identifier=?)
(define-datatype env env?
[empty]
[extend
(var identifier?)
(val any?)
(saved-env env?)]
[extend-rec
(p-names (list-of identifier?))
(b-vars (list-of identifier?))
... |
74070b22fbc9c03145b534a692ed8d70a85d1f65216c24bfceb5fb9be2dd0571 | algoriffic/lsa4solr | hierarchical_clustering.clj | (ns lsa4solr.hierarchical-clustering
(:use [lsa4solr mahout-matrix dendrogram])
(:require [clojure [zip :as z]])
(:require [clojure.contrib
[combinatorics :as combine]
[zip-filter :as zf]
[seq-utils :as seq-utils]])
(:import (org.apache.mahout.math SparseMatrix
RandomAccessSparseVecto... | null | https://raw.githubusercontent.com/algoriffic/lsa4solr/93231caff612d0a0bf3c418523385af674adae4e/src/lsa4solr/hierarchical_clustering.clj | clojure | (ns lsa4solr.hierarchical-clustering
(:use [lsa4solr mahout-matrix dendrogram])
(:require [clojure [zip :as z]])
(:require [clojure.contrib
[combinatorics :as combine]
[zip-filter :as zf]
[seq-utils :as seq-utils]])
(:import (org.apache.mahout.math SparseMatrix
RandomAccessSparseVecto... | |
9b57bfd8bfe3e8015ad92095870db0d3c74bc86abcd4bb47bb12576d5fedf4a1 | stuhlmueller/jschurch | index.html.scm | (html-doctype)
(html
(head
(title "BiwaScheme : Scheme interpreter for browsers")
(meta :http-equiv "Content-Type"
:content "text/html; charset=utf-8" )
(link :href "css/screen.css" :rel "stylesheet" :type "text/css")
(link :href "css/jquery.terminal.css" :rel "stylesheet" :type "text/css")... | null | https://raw.githubusercontent.com/stuhlmueller/jschurch/58a94802ba987c92cb81e556341f86dba66a8fd1/external/biwascheme/website/index.html.scm | scheme | </font>
/script></font>") | (html-doctype)
(html
(head
(title "BiwaScheme : Scheme interpreter for browsers")
(meta :http-equiv "Content-Type"
:content "text/html; charset=utf-8" )
(link :href "css/screen.css" :rel "stylesheet" :type "text/css")
(link :href "css/jquery.terminal.css" :rel "stylesheet" :type "text/css")... |
0f48a4b1a67dbaf32a26c1db28839f1121d36dd0b0e692aa75f8d3ed27625df9 | catseye/Emmental | HasteMain.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Haste.DOM (withElems, getValue, setProp)
import Haste.Events (onEvent, MouseEvent(Click))
import Haste.Foreign (ffi)
import Language.Emmental (emmentalWithIO)
getCh :: IO Char
getCh = ffi "(function() {var i=document.getElementById('prog-input'); var s=i.... | null | https://raw.githubusercontent.com/catseye/Emmental/98f5c00f3d04adf557644f9fc5ebaf600a1f8458/src/HasteMain.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import Haste.DOM (withElems, getValue, setProp)
import Haste.Events (onEvent, MouseEvent(Click))
import Haste.Foreign (ffi)
import Language.Emmental (emmentalWithIO)
getCh :: IO Char
getCh = ffi "(function() {var i=document.getElementById('prog-input'); var s=i.value; i.value=s.substring(1); retu... |
0d5959f35977fe3fcd814aca3d25ae0865faf44b4dc32a664fcd28e18cf12cd4 | acl2/acl2 | boot-strap-pass-2-a.lisp | ACL2 Version 8.5 -- A Computational Logic for Applicative Common Lisp
Copyright ( C ) 2023 , Regents of the University of Texas
This version of ACL2 is a descendent of ACL2 Version 1.9 , Copyright
( C ) 1997 Computational Logic , Inc. See the documentation topic NOTE-2 - 0 .
; This program is free software;... | null | https://raw.githubusercontent.com/acl2/acl2/65a46d5c1128cbecb9903bfee4192bb5daf7c036/boot-strap-pass-2-a.lisp | lisp | This program is free software; you can redistribute it and/or modify
it under the terms of the LICENSE file distributed with ACL2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See... | ACL2 Version 8.5 -- A Computational Logic for Applicative Common Lisp
Copyright ( C ) 2023 , Regents of the University of Texas
This version of ACL2 is a descendent of ACL2 Version 1.9 , Copyright
( C ) 1997 Computational Logic , Inc. See the documentation topic NOTE-2 - 0 .
Written by : ... |
1e20129470381ed8ee87a24b0f0dd3b41135c83b90fb79aa6d201f8daee43709 | ruisb/LambdaPi | Parser.hs | module LambdaPi.Parser where
import LambdaPi.Types
import LambdaPi.Functions
import Interpreter.Types
import Data.List
-- parser imports
import Text.ParserCombinators.Parsec hiding (parse, State)
import qualified Text.ParserCombinators.Parsec as P
import Text.ParserCombinators.Parsec.Token
import Text.ParserCombinato... | null | https://raw.githubusercontent.com/ruisb/LambdaPi/e8aea47b7098407f6ec3abb8ad65ac0c70729bf8/LambdaPi/Parser.hs | haskell | parser imports
-----------------------------------------------------------------------------
Parse the core language.
-----------------------------------------------------------------------------
data declaration.
name of the data
name of the var
name of the data
reserved lambdaPi "." | module LambdaPi.Parser where
import LambdaPi.Types
import LambdaPi.Functions
import Interpreter.Types
import Data.List
import Text.ParserCombinators.Parsec hiding (parse, State)
import qualified Text.ParserCombinators.Parsec as P
import Text.ParserCombinators.Parsec.Token
import Text.ParserCombinators.Parsec.Language... |
b754219cb3f6a73ed05f5d0e2fe487607b1dcd72ab3983a1e09c41703a1bd9b6 | clojure-interop/java-jdk | BasicIconFactory.clj | (ns javax.swing.plaf.basic.BasicIconFactory
"Factory object that can vend Icons appropriate for the basic L & F.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications run... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/basic/BasicIconFactory.clj | clojure | (ns javax.swing.plaf.basic.BasicIconFactory
"Factory object that can vend Icons appropriate for the basic L & F.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications run... | |
3fed10a9fd52d246c993ca948ba35e85075909a49ddb3ad1c6ec9e1f00ef2a78 | MyDataFlow/ttalk-server | ct_expand.erl | 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 may obtain a copy of the License at
%%%
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARR... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/parse_trans/src/ct_expand.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.
Contributor(s): ______________________________________.
--------------------------... | 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 "
The Original Code is exprecs-0.2 .
The Initial Developer of the Original Code is Ericsson AB .
Po... |
bd5f5cac7f3bb94db4f43ea6b0731a23b6cf3c0f660e13167bfd8a4daf85bb43 | fimad/prometheus-haskell | Info.hs | module Prometheus.Info (
Info (..)
, checkInfo
) where
import Data.Text (Text)
import qualified Data.Text as T
-- | Meta data about a metric including its name and a help string that
-- describes the value that the metric is measuring.
data Info = Info {
metricName :: Text
, metricHelp :: Text
} deriving ... | null | https://raw.githubusercontent.com/fimad/prometheus-haskell/4e2c2f1da1f891e9de3ce5a5260ae92882a9f35e/prometheus-client/src/Prometheus/Info.hs | haskell | | Meta data about a metric including its name and a help string that
describes the value that the metric is measuring. | module Prometheus.Info (
Info (..)
, checkInfo
) where
import Data.Text (Text)
import qualified Data.Text as T
data Info = Info {
metricName :: Text
, metricHelp :: Text
} deriving (Read, Show, Eq, Ord)
checkInfo :: Info -> a -> a
checkInfo info a
| (x:_) <- T.unpack name, not $ validStart x ... |
878caeb2e0fd4d581a7e268078512253c8fe5eceb7522242750ba68cafd0b018 | psibi/fb | FQL.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Facebook.FQL
( fqlQuery
, FQLTime(..)
, FQLList(..)
, FQLObject(..)
) where
import Control.Applicative ((<$>))
import Data.Monoid (mempty)
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Time.Clock.POSIX ... | null | https://raw.githubusercontent.com/psibi/fb/bb87e714b22f244e1fda3af85f041a3331639e9f/src/Facebook/FQL.hs | haskell | # LANGUAGE OverloadedStrings #
^ FQL Query
^ Optional access token
| @newtype@ wrapper around 'UTCTime' that is able to parse
strange lists.
However, it represents a singleton list as an object
On the other hand, not all FQL arrays are represented in this
strange objects.
you'll find that empty objects are a... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
module Facebook.FQL
( fqlQuery
, FQLTime(..)
, FQLList(..)
, FQLObject(..)
) where
import Control.Applicative ((<$>))
import Data.Monoid (mempty)
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import qua... |
2cb0f12524fb245e45bd1dd0b97c1df95495724d24011de05e102a1a946e307e | cdinger/rasql | core_test.clj | (ns rasql.core-test
(:require [clojure.test :refer :all]
[rasql.core :refer :all]))
(defrelation posts :posts_tbl)
(defrelation comments :comments_tbl)
;; Projection
(deftest projection-test
(let [p (->Projection [:a :b])
actual (to-sql p)
expected "SELECT a, b"]
(is (= expected act... | null | https://raw.githubusercontent.com/cdinger/rasql/ed8cb378a403a86096924669068d785dde07b8f5/test/rasql/core_test.clj | clojure | Projection
Predicates
Joins
Relation | (ns rasql.core-test
(:require [clojure.test :refer :all]
[rasql.core :refer :all]))
(defrelation posts :posts_tbl)
(defrelation comments :comments_tbl)
(deftest projection-test
(let [p (->Projection [:a :b])
actual (to-sql p)
expected "SELECT a, b"]
(is (= expected actual))))
(deft... |
23e5f96f9bf6993017330e39a9e2271ae01731bcdd1fadbfc4e7c4a42926b354 | tahnik/graphqlx | NonNullArguments.ml | open Types
open Printf
let error: bool ref = ref false;;
let rec read_doc definitions =
(match definitions with
| [] -> ()
| def::defs -> read_definition def; read_doc defs);
and read_definition def =
match def with
| Operation op ->
read_operation op
| Fragment fr ->
read_fragment fr
and rea... | null | https://raw.githubusercontent.com/tahnik/graphqlx/4a3dea80891c0f8aa16a98485f5c9a3b6d0fe88c/src/validation/src/NonNullArguments.ml | ocaml | open Types
open Printf
let error: bool ref = ref false;;
let rec read_doc definitions =
(match definitions with
| [] -> ()
| def::defs -> read_definition def; read_doc defs);
and read_definition def =
match def with
| Operation op ->
read_operation op
| Fragment fr ->
read_fragment fr
and rea... | |
9e99725495d2bcf0e687a32e818bb6fe231980571025f6cf19a0abba50936b38 | conal/TypeCompose | Instances.hs | ----------------------------------------------------------------------
-- |
-- Module : Control.Instances
Copyright : ( c ) Conal Elliott 2007
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- Some (orphan) instances that belong elsewhere (where th... | null | https://raw.githubusercontent.com/conal/TypeCompose/5100cd68b68382b6b65c8c0598a3f34dc9481db3/src/Control/Instances.hs | haskell | --------------------------------------------------------------------
|
Module : Control.Instances
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
Some (orphan) instances that belong elsewhere (where they wouldn't be orphans).
Add the following line to get these in... | Copyright : ( c ) Conal Elliott 2007
module Control.Instances () where
import Data.Orphans ()
|
12884cbf376886fe8f2b503c867d88e7c4304a4452820e5583b03cf975f40d90 | GaloisInc/daedalus | Position.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ViewPatterns #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE BlockArguments #
-- ---------------------------------------------------------------------------------------
-- Mapping positions to things
module Daedalus.LSP.Position where
import Dat... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/76baf11113cc4a0b4ad06faba898a97e42a92e7a/daedalus-language-server/src/Daedalus/LSP/Position.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------------------
Mapping positions to things
result type for function calls
We can't use the free vars stuff here as we want each occurrence of
a name, while that will ju... | # LANGUAGE ViewPatterns #
# LANGUAGE BlockArguments #
module Daedalus.LSP.Position where
import Data.Monoid
import Control.Monad(guard)
import Data.Parameterized.Some
import qualified Data.Text as Text
import qualified Language.LSP.Types as J
import Daedal... |
a1c293ce735a2eaf22f7d8f8cc886072374e2c8444e20f3a236495366458212e | TrustInSoft/tis-interpreter | Model.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/Model.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
fee97a1b91cc23237dcfaa33344d7842af047db4cfb67cc43c7b9f9eea31d156 | landakram/kiwi-desktop | subs.cljs | (ns kiwi.search.subs
(:require [kiwi.utils :as utils]
[re-frame.core :as re-frame :refer [reg-sub]]
[clojure.string :as string]))
(reg-sub
:all-pages
(fn [db _]
(get-in db [:route-state :pages])))
(reg-sub
:search-filter
(fn [db ]
(get-in db [:route-state :filter])))
(def lunr (... | null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/search/subs.cljs | clojure | (ns kiwi.search.subs
(:require [kiwi.utils :as utils]
[re-frame.core :as re-frame :refer [reg-sub]]
[clojure.string :as string]))
(reg-sub
:all-pages
(fn [db _]
(get-in db [:route-state :pages])))
(reg-sub
:search-filter
(fn [db ]
(get-in db [:route-state :filter])))
(def lunr (... | |
2a0098c0ca2251245d88e1b06df65311504b4bcb6e93dda978a382ee562fc06d | patricoferris/oodtty | build.ml | let time = {|Last built: 16:50:22 24/07/21
|}
| null | https://raw.githubusercontent.com/patricoferris/oodtty/4fe0348e1e9d686136c0794bebe205f807bf386c/src/lib/build.ml | ocaml | let time = {|Last built: 16:50:22 24/07/21
|}
| |
290ca8038e4ac791aa7cdd31cc597de492c36826a3d42f4d39bff69da5813979 | armedbear/abcl | class-file.lisp | compiler-tests.lisp
;;;
Copyright ( C ) 2010
;;;
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version ... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/test/lisp/abcl/class-file.lisp | lisp |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more detail... | compiler-tests.lisp
Copyright ( C ) 2010
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - ... |
d85c750935b95c0384a571fcf1022f41b85b6cdd49c747d7576cac0ae3e0a7f4 | ocaml-multicore/eio | zzz.mli | (** A set of timers. *)
(** A handle to a registered timer. *)
module Key : sig
type t
end
type t
(** A set of timers (implemented as a priority queue). *)
val create : unit -> t
(** [create ()] is a fresh empty queue. *)
val add : t -> Mtime.t -> unit Suspended.t -> Key.t
(** [add t time thread] adds a new event... | null | https://raw.githubusercontent.com/ocaml-multicore/eio/35feb3aaa83a47d43658b05ebc9819549593a18d/lib_eio/utils/zzz.mli | ocaml | * A set of timers.
* A handle to a registered timer.
* A set of timers (implemented as a priority queue).
* [create ()] is a fresh empty queue.
* [add t time thread] adds a new event, due at [time], and returns its ID.
You must use {!Eio.Private.Fiber_context.set_cancel_fn} on [thread] before
calling {!pop}... |
module Key : sig
type t
end
type t
val create : unit -> t
val add : t -> Mtime.t -> unit Suspended.t -> Key.t
val remove : t -> Key.t -> unit
val pop : t -> now:Mtime.t -> [`Due of unit Suspended.t | `Wait_until of Mtime.t | `Nothing]
|
f013c971e4b1dd832a3b51d610348656032d9747fc6bbf7a73e8b942cc06d543 | kana/sicp | ex-2.64.scm | (load "./sec-2.3.3-sets-as-binary-trees.scm")
Exercise 2.64 .
;;;
The following procedure list->tree converts an ordered list to a balanced
;;; binary tree. The helper procedure partial-tree takes as arguments an
;;; integer n and list of at least n elements and constructs a balanced tree
containing the first n... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-2.64.scm | scheme |
binary tree. The helper procedure partial-tree takes as arguments an
integer n and list of at least n elements and constructs a balanced tree
partial-tree is a pair (formed with cons) whose car is the constructed tree
and whose cdr is the list of elements not included in the tree.
a. Write a short paragraph expl... | (load "./sec-2.3.3-sets-as-binary-trees.scm")
Exercise 2.64 .
The following procedure list->tree converts an ordered list to a balanced
containing the first n elements of the list . The result returned by
(define (list->tree elements)
(car (partial-tree elements (length elements))))
(define (partial-tree e... |
2ff5eeb078a36334909c22381776df9adc275e5f10bcdfb3cfd663bd978d4d99 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.TimeGrain.FI.Rules
( rules
) where
import Data.Stri... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/TimeGrain/FI/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.TimeGrain.FI.Rules
( rules
) where
import Data.String
import Data.Text (Text)
import Prelude
import Duckling.Dimensions.Types
import Duckling.Types
import qualified Duckling.TimeGrain.Types as TG
grains :: [(Text, String, TG.Grain)]
grains = [... |
fbf305e016b18c5838c8a3ccc838f0b54c52cbbd89721d2ee2bf1e19f1e44b7f | gregorycollins/hashtables | CheapPseudoRandomBitStream.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
module Data.HashTable.Internal.CheapPseudoRandomBitStream
( BitStream
, newBitStream
, getNextBit
, getNBits
) where
import Control.Applicative
import Control.Monad.ST
import Data.Bits ((.&.))
import D... | null | https://raw.githubusercontent.com/gregorycollins/hashtables/a48b589a3266be10921ad15c3b9e65d7fb7fc535/src/Data/HashTable/Internal/CheapPseudoRandomBitStream.hs | haskell | # LANGUAGE BangPatterns #
----------------------------------------------------------------------------
Chosen by fair dice roll. Guaranteed random. More importantly, there are an
----------------------------------------------------------------------------
---------------------------------------------------------------... | # LANGUAGE CPP #
module Data.HashTable.Internal.CheapPseudoRandomBitStream
( BitStream
, newBitStream
, getNextBit
, getNBits
) where
import Control.Applicative
import Control.Monad.ST
import Data.Bits ((.&.))
import Data.STRef
import Dat... |
829207f54887b64910f7cb788ee325a4523987f6b90615a132b5bbc041d77338 | eccentric-j/cljs-tui-template | test_runner.cljs | (ns {{main-ns}}.test-runner
(:require
;; require all the namespaces that you want to test
[{{namespace}}-test]
[figwheel.main.testing :refer [run-tests-async]]))
(defn -main [& args]
"Tests entrypoint. Runs imported tests."
(run-tests-async 5000))
(set! *main-cli-fn* nil)
| null | https://raw.githubusercontent.com/eccentric-j/cljs-tui-template/6ad22eb0d069666a072c58709fc82e6f1a2ca8c3/resources/leiningen/new/cljs_tui/figwheel-main/test/test_runner.cljs | clojure | require all the namespaces that you want to test | (ns {{main-ns}}.test-runner
(:require
[{{namespace}}-test]
[figwheel.main.testing :refer [run-tests-async]]))
(defn -main [& args]
"Tests entrypoint. Runs imported tests."
(run-tests-async 5000))
(set! *main-cli-fn* nil)
|
e1dd95b49931af17d17a5f84d996f5aaddc05920f291d9d86945c4fb3b0f96e0 | proglang/ldgv | FunctionSignaturesSpec.hs | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall #
module FunctionSignaturesSpec (spec) where
import Test.Hspec
import Kinds
import Syntax
import Typechecker
tcOptionsCast :: Options
tcOptionsCast = Options{ gradual = False }
spec :: Spec
spec = do
let tcShouldFail :: [Decl] -> Expectation
tcShouldFail decls... | null | https://raw.githubusercontent.com/proglang/ldgv/395af7190de7f62e2bc0ca9609a28f728ea2445e/test/FunctionSignaturesSpec.hs | haskell | The function definition would be alright by itself but the return
type has to be equivalent with the given signature. | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall #
module FunctionSignaturesSpec (spec) where
import Test.Hspec
import Kinds
import Syntax
import Typechecker
tcOptionsCast :: Options
tcOptionsCast = Options{ gradual = False }
spec :: Spec
spec = do
let tcShouldFail :: [Decl] -> Expectation
tcShouldFail decls... |
61c5839a2610970e825129573f0774f22a4316ed65e71ec2230af509a5d3814e | UBTECH-Walker/WalkerSimulationFor2020WAIC | CruiserJointSate.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-msg)
// ! \htmlinclude
(cl:defclass <CruiserJointSate> (roslisp-msg-protocol:ros-message)
((joint_num
:reader joint_num
:initarg :joint_num
:type cl:fixnum
:initform 0)
(name
:reader name
:initarg :name
:type (cl:vector cl... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/CruiserJointSate.lisp | lisp | Auto-generated. Do not edit! |
(cl:in-package cruiser_msgs-msg)
// ! \htmlinclude
(cl:defclass <CruiserJointSate> (roslisp-msg-protocol:ros-message)
((joint_num
:reader joint_num
:initarg :joint_num
:type cl:fixnum
:initform 0)
(name
:reader name
:initarg :name
:type (cl:vector cl:string)
:initform (cl:make-... |
6789eb696afd819aace5704e9987b81a655b4f3e7f1edb294bbefa4495f44024 | hipsleek/hipsleek | nativefront.ml | #include "xdebug.cppo"
open VarGen
open Globals
open Sleekcommons
module I = Iast
module IF = Iformula
module IP = Ipure
let get_command ( input : string ) : ( string * string ) =
let start_idx = ref 0 in
let len = String.length input in
let ( ) =
while ( ! start_idx < len ) & & ( ( String.get input ... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/nativefront.ml | ocaml | let parse (input : string) : command =
Debug.loop_1_no "parse" (fun x -> x) (fun _ -> "?") parse input
let list_parse (input_file) : command list =
Debug.loop_1_no "list_parse" (fun _ -> "?") (fun _ -> "?") list_parse input_file | #include "xdebug.cppo"
open VarGen
open Globals
open Sleekcommons
module I = Iast
module IF = Iformula
module IP = Ipure
let get_command ( input : string ) : ( string * string ) =
let start_idx = ref 0 in
let len = String.length input in
let ( ) =
while ( ! start_idx < len ) & & ( ( String.get input ... |
ded5e666105bc1a83845f8c697a5a29072f110feccf7b8638ad5a7d0ed5954f3 | dwango/fialyzer | variable.mli | val create : unit -> string
val reset_count : unit -> unit
| null | https://raw.githubusercontent.com/dwango/fialyzer/3c4b4fc2dacf84008910135bfef16e4ce79f9c89/lib/variable.mli | ocaml | val create : unit -> string
val reset_count : unit -> unit
| |
e4110dadc0f94e517aece83d7d0ea9643feb425e377e59239b5844fd4cbdc539 | tweag/ormolu | longer.hs | module Main (main) where
a
b
c
main :: IO ()
main = return ()
d
e
f
g
foo :: Int
foo = 5
| null | https://raw.githubusercontent.com/tweag/ormolu/25b04d45b4f3e8db81bc4a863f2fededda7bc384/data/diff-tests/inputs/longer.hs | haskell | module Main (main) where
a
b
c
main :: IO ()
main = return ()
d
e
f
g
foo :: Int
foo = 5
| |
ae6ea9dfeec7ff36b66233f9f3fa6d976a1ebabe77377060df2c570265197208 | haskell/hackage-server | Unpack.hs | Unpack a tarball containing a Cabal package
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Distribution.Server.Packages.Unpack (
CombinedTarErrs(..),
checkEntries,
checkUselessPermissions,
unpackPackage,
unp... | null | https://raw.githubusercontent.com/haskell/hackage-server/e907996430c6720f61ad6313d75f6f3a97cfb334/src/Distribution/Server/Packages/Unpack.hs | haskell | # LANGUAGE RankNTypes #
import qualified Distribution.Compat.CharParsing as P
Whether to allow upload of "all rights reserved" packages
Returns either an fatal error or a package description and a list
of warnings.
Extract entries and check the tar format / portability
Extract the .cabal file from the tarball
In... | Unpack a tarball containing a Cabal package
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Distribution.Server.Packages.Unpack (
CombinedTarErrs(..),
checkEntries,
checkUselessPermissions,
unpackPackage,
unpackPackageRaw,
) where
im... |
674a9aacd1ee0b641c10e90643e0dbbfbf521addfc12603e5f34f3c24178ed4a | lloda/guile-newra | read.scm | -*- mode : scheme ; coding : utf-8 -*-
( c ) 2017 - 2019
; This library is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation ; either version 3 of the License , or ( at your option ) any
; later version.
;;... | null | https://raw.githubusercontent.com/lloda/guile-newra/bee5951bbc5351779fddba27f9bb59d435d610c8/mod/newra/read.scm | scheme | coding : utf-8 -*-
This library is free software; you can redistribute it and/or modify it under
either version 3 of the License , or ( at your option ) any
later version.
Commentary:
Code:
Don't resize but make a list of vectors and cat once at the end.
read content here
read element
read slice
read a whole... |
( c ) 2017 - 2019
the terms of the GNU General Public License as published by the Free
Reader for ra objects . They start with # % instead of # , otherwise the syntax
is the same as for regular arrays .
(define-module (newra read)
#:export (list->ra list->typed-ra))
(import (newra base) (newra map) (n... |
f01d177b7c082e0d3b664f5d552dac624c22ce53cadca94701256ec9fe4f70e3 | k-stz/arcsynthesis | frag-position.lisp | (in-package #:arc-2)
(defvar *data-directory*
(merge-pathnames #p "2-chapter/data/"
(asdf/system:system-source-directory :arcsynthesis)))
;;; this time we load shaders from files, check out the (init-shader-program) function
(defvar *vertex-positions* (gl:alloc-gl-array :float 12))
(defparameter *verts* #(0.7... | null | https://raw.githubusercontent.com/k-stz/arcsynthesis/586943e74a88b60bfb9d0e16de42635a0904bf5f/2-chapter/frag-position.lisp | lisp | this time we load shaders from files, check out the (init-shader-program) function
buffer object handle
glClearColor(..)
main-loop:
wow, this can be forgotten easily -.-
just for fun, this ONLY WORKS FOR LINEAR INTERPOLATION ... NOT LINEAR _EXTRAPOLATION_
groovy:
(format t "~A~%" #\black_hexagon)
(format t"~a" #... | (in-package #:arc-2)
(defvar *data-directory*
(merge-pathnames #p "2-chapter/data/"
(asdf/system:system-source-directory :arcsynthesis)))
(defvar *vertex-positions* (gl:alloc-gl-array :float 12))
(defparameter *verts* #(0.75 0.75 0.0 1.0
0.75 -0.75 0.0 1.0
-0.75 -0.75 0.0 1.0
0... |
0cc6cd8353e0ec9de76012d7b7d381c3a9b7d36f7cb33b54c6dbb4c6a68a0bc7 | fused-effects/fused-effects | Cut.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
# HLINT ignore " Eta reduce " #
module Cut
( tests
, gen0
, genN
, test
) where
import qualified Control.Carrier.Cut.Church as CutC
import Con... | null | https://raw.githubusercontent.com/fused-effects/fused-effects/85f4b7499789a1750eb9a8d35ea09933b0d7a97b/test/Cut.hs | haskell | # LANGUAGE RankNTypes #
# OPTIONS_GHC -Wno-unrecognised-pragmas # | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# HLINT ignore " Eta reduce " #
module Cut
( tests
, gen0
, genN
, test
) where
import qualified Control.Carrier.Cut.Church as CutC
import Control.Carrier.Reader
import Control.Effect.Choose
import ... |
88997950bb0ff22a3b6f0c014f749919e44e6a487e44ba7958613ba355030d5b | DeaR/xl-git | package.lisp | ;; -*- mode: lisp; package: user; encoding: shift_jis -*-
@name xl - git / package.lisp
@description A front - end for git in xyzzy .
;; @namespace /
;; @author DeaR
@timestamp < 2012 - 05 - 01 15:42:16 DeaR >
Copyright ( c ) 2012 DeaR < >
;;
;; Permission is hereby granted, free of charge,... | null | https://raw.githubusercontent.com/DeaR/xl-git/ae9da0ee87f45f51569bd31c475f622ebc32e42b/site-lisp/xl-git/package.lisp | lisp | -*- mode: lisp; package: user; encoding: shift_jis -*-
@namespace /
@author DeaR
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
use, copy, modify, merge, publish, distribute, sublicense, and/or s... |
@name xl - git / package.lisp
@description A front - end for git in xyzzy .
@timestamp < 2012 - 05 - 01 15:42:16 DeaR >
Copyright ( c ) 2012 DeaR < >
the Software without restriction , including without limitation the rights to
the Software , and to permit persons to whom the Software is furni... |
25f7b88a7a0494b56fa3850cc4d087d61c88206363542c07601417d72da7f3a5 | yutopp/rill | module_info.ml |
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/_migrating/module_info.ml | ocaml |
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | |
aa4a19fec7bac12ab6a97b173c19361897a3aa40d7961f7b29f6292e47b6aa1b | mejgun/haskell-tdlib | NetworkStatistics.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.NetworkStatistics where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.NetworkStatisticsEntry as NetworkStatisticsEntry
import qualified Utils as U
-- |
| A full list of available network statistic entries @sin... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/NetworkStatistics.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
|
| |
module TD.Data.NetworkStatistics where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.NetworkStatisticsEntry as NetworkStatisticsEntry
import qualified Utils as U
| A full list of available network statistic entries @since_date Point in time ( Unix timestamp ) from... |
7d0fc50c783d1bdd1315dbfed1547a34bbb8aea1fa25e002da0539b06e1765b2 | shayan-najd/QFeldspar | NameResolution.hs | module QFeldspar.Expression.Conversions.NameResolution () where
import QFeldspar.MyPrelude
import qualified QFeldspar.Expression.ADTUntypedNamed as AUN
import qualified QFeldspar.Expression.ADTUntypedDebruijn as AUD
import qualified QFeldspar.Environment.Map as EM
import qualified QFeldspar.E... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Expression/Conversions/NameResolution.hs | haskell | module QFeldspar.Expression.Conversions.NameResolution () where
import QFeldspar.MyPrelude
import qualified QFeldspar.Expression.ADTUntypedNamed as AUN
import qualified QFeldspar.Expression.ADTUntypedDebruijn as AUD
import qualified QFeldspar.Environment.Map as EM
import qualified QFeldspar.E... | |
9275cc540640e48f6386d35cd9f26480d4d2bd953d4e5af8aa5d59cc151048df | hackinghat/cl-mysql | mysql.lisp | ;;;; -*- Mode: Lisp -*-
$ Id$
;;;;
Copyright ( c ) 2009 < >
;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining
;;;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;;;; without limitation the... | null | https://raw.githubusercontent.com/hackinghat/cl-mysql/3fbf6e1421484f64c5bcf2ff3c4b96c6f0414f09/mysql.lisp | lisp | -*- Mode: Lisp -*-
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall b... | $ Id$
Copyright ( c ) 2009 < >
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of the Softwa... |
7e33348cbf5d66006a9ac5a971caeda09656ec1bec29ba05c62a992d092de601 | Helium4Haskell/helium | Lambda2.hs |
main :: Bool -> Bool -> ()
main = \True False -> ()
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/Lambda2.hs | haskell |
main :: Bool -> Bool -> ()
main = \True False -> ()
| |
6eeceebc7c02753f14f30016ff2f061dc2b06e48adee0a220ef747630a9e6b8a | aharisu/Gauche-CV | objdetect_type.scm | ;;;
imgproc_type.scm
;;;
MIT License
Copyright 2011 - 2012 aharisu
;;; All rights reserved.
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including witho... | null | https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/src/objdetect/objdetect_type.scm | scheme |
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
; ;... | imgproc_type.scm
MIT License
Copyright 2011 - 2012 aharisu
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER... |
d744a6b80a6f0e9fcb432219f3b28b6b92f3fbb0b6456fee1ceb8979e3a2f5f1 | well-typed-lightbulbs/ocaml-esp32 | ocaml_flags.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/ocamltest/ocaml_flags.mli | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Paris
Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
val stdlib : string -> string
val include_toplevel_directory : string -> string
val c_includes : string -> s... |
a430fc327d42d1754993f2dfb0c5ce922dac1fef3e47fb80969d754dc2868575 | silviucpp/erltls | erltls.erl | -module(erltls).
-include("erltls.hrl").
%% todo:
1 . implement the missing methods
2 . In handshake process add a timeout param ( affects connect and ssl_accept methods )
-export([
start/0,
start/1,
stop/0,
cipher_suites/0,
clear_pem_cache/0,
connect/2,
connect/3,
connect/4,
... | null | https://raw.githubusercontent.com/silviucpp/erltls/da527e75a5792ecfa9379d499628e0c2fe611f52/src/erltls.erl | erlang | todo:
todo: implement timeout in this case
todo: implement timeout parameter here.
internals | -module(erltls).
-include("erltls.hrl").
1 . implement the missing methods
2 . In handshake process add a timeout param ( affects connect and ssl_accept methods )
-export([
start/0,
start/1,
stop/0,
cipher_suites/0,
clear_pem_cache/0,
connect/2,
connect/3,
connect/4,
controlli... |
feebd59da27d9161666ce6c4abf79181b3ab0244c93001d532a4d8a431938458 | hopv/MoCHi | linTermIntRel.ml | open Util
open Combinator
open Term
(** linear relations with integer term coefficients *)
include LinRel.Make(LinTermIntExp.Coeff)
* { 6 Auxiliary constructors }
(* val of_formula : Formula.t -> t *)
let of_formula phi =
match phi |> Formula.term_of |> fun_args with
| Const(c), [t1; t2] when Const.is_brel c(*@... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/linTermIntRel.ml | ocaml | * linear relations with integer term coefficients
val of_formula : Formula.t -> t
@todo[Const.is_ibrel c] rejects the equality with a polymorphic type
* @require c is not <>
@ensure the result only uses geq and eq
val normalize : t -> t
val formula_of : t -> Formula.t
* @ensure pred res
val elem_of : (ele... | open Util
open Combinator
open Term
include LinRel.Make(LinTermIntExp.Coeff)
* { 6 Auxiliary constructors }
let of_formula phi =
match phi |> Formula.term_of |> fun_args with
c, IntTerm.sub t1 t2 |> LinTermIntExp.of_term
| _ ->
Logger.printf "LinTermIntRel.of_formula: %a@," Formula.pr phi;
invalid_a... |
9a65a156c852677408fae3e37a1c57b9d3243d0004e207d92f9a842213a8370d | Simspace/postgresql-tx | DB.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
module Example.PgSimple.Internal.DB where
data Handle f = Handle
{ insertMessage :: String -> f Int
, fetchMessage :: Int -> f (Maybe String)
, close :: IO ()
}
| null | https://raw.githubusercontent.com/Simspace/postgresql-tx/6769f10a4b928aa37c47ffa5f89f0fa3a9c6fc01/example/test/Example/PgSimple/Internal/DB.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE FlexibleContexts #
module Example.PgSimple.Internal.DB where
data Handle f = Handle
{ insertMessage :: String -> f Int
, fetchMessage :: Int -> f (Maybe String)
, close :: IO ()
}
|
befd3e90d28170c2b4c0d52d40f12a6276b8300fcab9f258d8107bcb8811fc6a | Clozure/ccl-tests | load-test-file-2.lsp | (in-package :cl-test)
(declaim (special *load-test-var.1* *load-test-var.2*))
(eval-when (:load-toplevel)
(setq *load-test-var.1* *load-pathname*)
(setq *load-test-var.2* *load-truename*))
| null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/load-test-file-2.lsp | lisp | (in-package :cl-test)
(declaim (special *load-test-var.1* *load-test-var.2*))
(eval-when (:load-toplevel)
(setq *load-test-var.1* *load-pathname*)
(setq *load-test-var.2* *load-truename*))
| |
b950c9c7697d67cccf3ba910fe6881b2f67e898be827756e4c1ce26edcb563c3 | fengctor/octune | Annotate.hs | module Octune.Annotate where
import qualified Data.Map.Strict as Map
import Control.Lens
import Octune.Types
annotateBeatLengths :: Env (AST Ann) -> Env (AST Ann)
annotateBeatLengths env = cache
where
cache :: Env (AST Ann)
cache = fmap go env
memoAnnotate :: AST Ann -> AST Ann
... | null | https://raw.githubusercontent.com/fengctor/octune/a50f2b8d3750a6660de9d94cb46cb83ac7d31421/src/Octune/Annotate.hs | haskell | Beats assertions do not take up time | module Octune.Annotate where
import qualified Data.Map.Strict as Map
import Control.Lens
import Octune.Types
annotateBeatLengths :: Env (AST Ann) -> Env (AST Ann)
annotateBeatLengths env = cache
where
cache :: Env (AST Ann)
cache = fmap go env
memoAnnotate :: AST Ann -> AST Ann
... |
0b7856abd78a23533dc8958455d22bd5f6fd82ec545db1bce8ea8c23e9a9c202 | replikativ/datahike-frontend | pathom.clj | (ns app.server-components.pathom
(:require
[mount.core :refer [defstate]]
[taoensso.timbre :as log]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[com.wsscode.common.async-clj :refer [let-chan]]
[clojure.core.async :as async]
[app.model.account :as acct]
[app.mode... | null | https://raw.githubusercontent.com/replikativ/datahike-frontend/6e3ab3bb761b41c4ffea792297286f8942a27909/src/main/app/server_components/pathom.clj | clojure | Here is where you can dynamically add things to the resolver/mutation
environment, like the server config, database connections, etc.
Understand that this makes the network responses much larger and should not be used in production. | (ns app.server-components.pathom
(:require
[mount.core :refer [defstate]]
[taoensso.timbre :as log]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[com.wsscode.common.async-clj :refer [let-chan]]
[clojure.core.async :as async]
[app.model.account :as acct]
[app.mode... |
0338f205ecfd33ee78425b948e7a5cfce7d052fa1daaa68e4708f752530fb337 | racket/honu | define.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
syntax/define
"compile.rkt"))
(provide (all-defined-out))
(define-syntax-rule (define-literal name ...)
(begin
(define-syntax name (lambda (stx)
(raise-syntax-er... | null | https://raw.githubusercontent.com/racket/honu/b36b9aeda8be22bf7fda177e831f42ac1a1de79b/honu-parse/define.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse
syntax/define
"compile.rkt"))
(provide (all-defined-out))
(define-syntax-rule (define-literal name ...)
(begin
(define-syntax name (lambda (stx)
(raise-syntax-er... | |
31faec098c58e8f1628e86957252e03472fa9071ce767a2f4560ccab43077c9f | nikodemus/SBCL | vm-fndb.lisp | ;;;; signatures of machine-specific functions
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public do... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/generic/vm-fndb.lisp | lisp | signatures of machine-specific functions
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
internal type predicates
translated into non-standard unary predicates.
miscellaneous "sub-primitiv... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
Simple TYPEP uses that do n't have any standard predicate are
(defknown (fixnump bignump ratiop
... |
925ac3802871dead91ef207b74f18b0ebf2c00e29afbd5be771f68a7665e83b9 | rbkmoney/fistful-server | ff_deposit_SUITE.erl | -module(ff_deposit_SUITE).
-include_lib("stdlib/include/assert.hrl").
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
%% Common test API
-export([all/0]).
-export([groups/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_per_group/2]).
-export([end_per_group/2]).
-export(... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/f6155acb0475987e47a4fbc911758c595e129c80/apps/ff_transfer/test/ff_deposit_SUITE.erl | erlang | Common test API
Tests
Internal types
API
Tests
NOTE: This function can flap tests after switch to shumpune
because of potentially wrong Clock. In common case it should be passed
from caller after applying changes to account balance.
balance changes, therefore it will broke tests with shumpune
because of pro... | -module(ff_deposit_SUITE).
-include_lib("stdlib/include/assert.hrl").
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-export([all/0]).
-export([groups/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_per_group/2]).
-export([end_per_group/2]).
-export([init_per_testcase/... |
682f56a3ffe50e2010fe79fc5daf207e15c48f880bc87c621349129adb4b93ae | ahrefs/devkit | reader.mli | (** Simple string reader *)
type t
exception EOS
exception Not_equal of string
val init : string -> t
val eos : t -> bool
(** post-condition: [eos] is true *)
val rest : t -> string
val till : t -> string -> string
val try_till : t -> string -> string
val tillc : t -> char -> string
val try_tillc : t -> char -> str... | null | https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/reader.mli | ocaml | * Simple string reader
* post-condition: [eos] is true |
type t
exception EOS
exception Not_equal of string
val init : string -> t
val eos : t -> bool
val rest : t -> string
val till : t -> string -> string
val try_till : t -> string -> string
val tillc : t -> char -> string
val try_tillc : t -> char -> string
val take : t -> int -> string
val try_take : t -> int -> stri... |
bf6e959596f196a356c2caaa40628bfc0387772590c9975837dc2dba58a935cc | tmfg/mmtis-national-access-point | gtfs.clj | (ns ote.integration.export.gtfs
"GTFS export of routes"
(:require [specql.core :refer [fetch]]
[com.stuartsierra.component :as component]
[ote.components.http :as http]
[compojure.core :refer [GET]]
[ote.db.transit :as transit]
[specql.op :as op]
... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/1aba1c36aac7d6d55ee11accbf5a444e5f514f6c/ote/src/clj/ote/integration/export/gtfs.clj | clojure | (ns ote.integration.export.gtfs
"GTFS export of routes"
(:require [specql.core :refer [fetch]]
[com.stuartsierra.component :as component]
[ote.components.http :as http]
[compojure.core :refer [GET]]
[ote.db.transit :as transit]
[specql.op :as op]
... | |
ef798b718ff9061aa4f0e0f1c811ff8e22e4c3e5b7caba9341c742f9200ab595 | janestreet/universe | tyxml.ml | open Js_of_ocaml
open Tyxml_f
module type XML =
Xml_sigs.T
with type uri = string
and type event_handler = Dom_html.event Js.t -> Event.t
and type mouse_event_handler = Dom_html.mouseEvent Js.t -> Event.t
and type touch_event_handler = Dom_html.touchEvent Js.t -> Event.t
and type keyboard_event_handler... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/virtual_dom/src/tyxml.ml | ocaml | * Element | open Js_of_ocaml
open Tyxml_f
module type XML =
Xml_sigs.T
with type uri = string
and type event_handler = Dom_html.event Js.t -> Event.t
and type mouse_event_handler = Dom_html.mouseEvent Js.t -> Event.t
and type touch_event_handler = Dom_html.touchEvent Js.t -> Event.t
and type keyboard_event_handler... |
f46a0dbc37ee8cd51b960bf03efdd2cd9a3191704a2e4ba9c4b960470ed15ecf | borodust/claw | record.lisp | (cl:in-package :claw.cffi.c)
(declaim (special *anonymous-field-number*))
(defun next-anonymous-field-number ()
(prog1 *anonymous-field-number*
(incf *anonymous-field-number*)))
;;;
;;; RECORD
;;;
(defun field-c-name->lisp (field)
(let ((name (claw.spec:foreign-entity-name field)))
(if (emptyp name)
... | null | https://raw.githubusercontent.com/borodust/claw/ef59eeaed16841da659e3b6f449486950240791a/src/gen/cffi/c/generator/record.lisp | lisp |
RECORD
STRUCT
UNION
| (cl:in-package :claw.cffi.c)
(declaim (special *anonymous-field-number*))
(defun next-anonymous-field-number ()
(prog1 *anonymous-field-number*
(incf *anonymous-field-number*)))
(defun field-c-name->lisp (field)
(let ((name (claw.spec:foreign-entity-name field)))
(if (emptyp name)
(let ((lispif... |
2c42ae72e1d9a9780ebde23b4d15b5666587bab8b69fb283c0b197d62d13cb0f | pixlsus/registry.gimp.org_static | Orton-Effect.scm | ;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be usef... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/Orton-Effect.scm | scheme |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTIC... | it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
(define (script-fu-Orton-Effect inImage inLayer inBlur inOpacity inKeepOriginal)
(gimp-image-undo-group-start inImage)
... |
1abc6d612b719e4eb7b6e76fde5a53fd829da1ccc061603b01be413df0c9af02 | rbkmoney/fistful-server | ff_string.erl | %%%
%%% String manipultion facilities.
-module(ff_string).
-export([join/1]).
-export([join/2]).
%%
-type fragment() ::
iodata()
| char()
| atom()
| number().
-spec join([fragment()]) -> binary().
join(Fragments) ->
join(<<>>, Fragments).
-spec join(Delim, [fragment()]) -> binary() when
De... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_core/src/ff_string.erl | erlang |
String manipultion facilities.
|
-module(ff_string).
-export([join/1]).
-export([join/2]).
-type fragment() ::
iodata()
| char()
| atom()
| number().
-spec join([fragment()]) -> binary().
join(Fragments) ->
join(<<>>, Fragments).
-spec join(Delim, [fragment()]) -> binary() when
Delim ::
char()
| iodata().
... |
11aecef9a62741ad196e53f54a76f4a0d5aa5eec4d91d68e9eb68809475ddde8 | mwand/eopl3 | translator.scm | (module translator (lib "eopl.ss" "eopl")
(require "lang.scm")
(provide translation-of-program)
;;;;;;;;;;;;;;;; lexical address calculator ;;;;;;;;;;;;;;;;
;; translation-of-program : Program -> Nameless-program
Page : 96
(define translation-of-program
(lambda (pgm)
(cases program pgm
... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter3/lexaddr-lang/translator.scm | scheme | lexical address calculator ;;;;;;;;;;;;;;;;
translation-of-program : Program -> Nameless-program
translation-of : Exp * Senv -> Nameless-exp
static environments ;;;;;;;;;;;;;;;;
Senv = Listof(Sym)
Lexaddr = N
empty-senv : () -> Senv
extend-senv : Var * Senv -> Senv
apply-senv : Senv * Var -> Lexaddr
init-senv... | (module translator (lib "eopl.ss" "eopl")
(require "lang.scm")
(provide translation-of-program)
Page : 96
(define translation-of-program
(lambda (pgm)
(cases program pgm
(a-program (exp1)
(a-program
(translation-of exp1 (init-senv)))))))
Page 9... |
c34bd8409ee9056ac31bcd651235ca08c85a68c9bfd1b7204e939ec83f4dbf07 | functionally/mantis | Info.hs |
# LANGUAGE RecordWildCards #
module Mantra.Command.Info (
command
, mainUtxo
, mainAddress
, mainTxBody
, mainTx
) where
import Cardano.Api (AsType(AsAllegraEra, AsAlonzoEra, AsByronEra, AsMaryEra, AsShelleyEra, AsTx, AsTxBody), ConsensusModeParams(CardanoModeParams), EpochSlots(..), FromSomeType(..),... | null | https://raw.githubusercontent.com/functionally/mantis/1cd121202452dcc1bce56ed4b4f41f0e880c9d04/app/Mantra/Command/Info.hs | haskell |
# LANGUAGE RecordWildCards #
module Mantra.Command.Info (
command
, mainUtxo
, mainAddress
, mainTxBody
, mainTx
) where
import Cardano.Api (AsType(AsAllegraEra, AsAlonzoEra, AsByronEra, AsMaryEra, AsShelleyEra, AsTx, AsTxBody), ConsensusModeParams(CardanoModeParams), EpochSlots(..), FromSomeType(..),... | |
af167bfed6b8332546e2972d079bbff4c5afdd064c6d406482877b4f7a4ab063 | terezka/cherry-core | Reporting.hs | # OPTIONS_GHC -Wall #
module Parser.Reporting
( Located(..)
, Position(..)
, Region(..)
, traverse
, toValue
, merge
, at
, toRegion
, mergeRegions
, zero
, one
)
where
import Prelude hiding (traverse)
import Control.Monad (liftM2)
import Data.Binary (Binary, get, put)
import Data.Word (Word... | null | https://raw.githubusercontent.com/terezka/cherry-core/d9bd446e226fc9b04783532969fa670211a150c6/src/Parser/Reporting.hs | haskell | LOCATED
TODO see if unpacking region is helpful
POSITION
# UNPACK #
# UNPACK #
REGION | # OPTIONS_GHC -Wall #
module Parser.Reporting
( Located(..)
, Position(..)
, Region(..)
, traverse
, toValue
, merge
, at
, toRegion
, mergeRegions
, zero
, one
)
where
import Prelude hiding (traverse)
import Control.Monad (liftM2)
import Data.Binary (Binary, get, put)
import Data.Word (Word... |
235e7e5e975a951671dce171ca56a25b5684e874786812281f91cfda8b1eedf5 | NetComposer/nkmedia | nkmedia_api_syntax.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/nkmedia_api_syntax.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nkmedia_api_syntax)... |
92d663d64d085351efc57fc2a397fbb492712f7434cb579adb4b8821bf20bb32 | iamFIREcracker/adventofcode | quickutils.lisp | ;;;; This file was automatically generated by Quickutil.
;;;; See for details.
;;;; To regenerate:
( qtlc : save - utils - as " quickutils.lisp " : utilities ' (: COPY - ARRAY : COPY - HASH - TABLE : : FLATTEN : HASH - TABLE - ALIST : HASH - TABLE - KEYS : HASH - TABLE - VALUES : HASH - TABLE - KEY - EXISTS - P : ... | null | https://raw.githubusercontent.com/iamFIREcracker/adventofcode/cb3831581d95913d1ef1baf7b09b2562fd78c66e/vendor/quickutils.lisp | lisp | This file was automatically generated by Quickutil.
See for details.
To regenerate:
END OF quickutils.lisp ;;;; |
( qtlc : save - utils - as " quickutils.lisp " : utilities ' (: COPY - ARRAY : COPY - HASH - TABLE : : FLATTEN : HASH - TABLE - ALIST : HASH - TABLE - KEYS : HASH - TABLE - VALUES : HASH - TABLE - KEY - EXISTS - P : IF - LET : IOTA : MAKE - KEYWORD : MKSTR : : NCYCLE : SYMB : VOID : WHEN - LET : WITH - GENSYMS ) :... |
e0aa38622e199087927e7688140e0b3d141c61f7808c1ab61a6a94192247c969 | 8l/asif | runEquivTest.hs | import System.Environment (getArgs)
import Language.FOmega.Test.Derivation (newBuiltinQCfg)
import Language.FOmega.Syntax
import Language.FOmega.Derivation (TyError(..), runM, tc, runQ, expandQuotations)
import Language.FOmega.Parse (loadPgmFile, parseExpr)
Right _fst = parseExpr "\\x:*. \\y:*. x"
Right _snd = parseE... | null | https://raw.githubusercontent.com/8l/asif/3a0b0909e71a2e19e0773b3c77eadfa753751b41/tests/runEquivTest.hs | haskell | - Type check -
- Expand quotations - | import System.Environment (getArgs)
import Language.FOmega.Test.Derivation (newBuiltinQCfg)
import Language.FOmega.Syntax
import Language.FOmega.Derivation (TyError(..), runM, tc, runQ, expandQuotations)
import Language.FOmega.Parse (loadPgmFile, parseExpr)
Right _fst = parseExpr "\\x:*. \\y:*. x"
Right _snd = parseE... |
6856db39e3de4298b820766388e898a9a6c783dd03804e0d4f44ad47474f0a51 | mokus0/junkbox | Steps.hs | # LANGUAGE ParallelListComp #
module Monads.Steps where
import Control.Monad.Writer
import Text.Printf
newtype Steps m a = Steps {unSteps :: WriterT [(String, m ())] m a}
instance Monad m => Functor (Steps m) where fmap f (Steps x) = Steps (fmap f x)
instance Monad m => Monad (Steps m) where
fail = Steps . ... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Monads/Steps.hs | haskell | # LANGUAGE ParallelListComp #
module Monads.Steps where
import Control.Monad.Writer
import Text.Printf
newtype Steps m a = Steps {unSteps :: WriterT [(String, m ())] m a}
instance Monad m => Functor (Steps m) where fmap f (Steps x) = Steps (fmap f x)
instance Monad m => Monad (Steps m) where
fail = Steps . ... | |
deff151dcd966fc70b11dc2b120abb6d61c2010a5ac4e9e939b68e62350300b5 | VERIMAG-Polyhedra/VPL | Cons.ml | module Cs = Cstr.Rat
type 'c t = Cs.t * 'c
let triv : 'c Factory.t -> 'c t
= fun factory ->
(Cs.eq [] Scalar.Rat.z, factory.Factory.top)
let mkTriv : 'c Factory.t -> Cstr_type.cmpT -> Scalar.Rat.t -> 'c t
= fun factory cmp r ->
(Cs.mk cmp [] r, factory.Factory.triv cmp r)
let get_c (c,_) = c
let get_cert (_,cer... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/core/Cons.ml | ocaml | v2 = r.v1 | module Cs = Cstr.Rat
type 'c t = Cs.t * 'c
let triv : 'c Factory.t -> 'c t
= fun factory ->
(Cs.eq [] Scalar.Rat.z, factory.Factory.top)
let mkTriv : 'c Factory.t -> Cstr_type.cmpT -> Scalar.Rat.t -> 'c t
= fun factory cmp r ->
(Cs.mk cmp [] r, factory.Factory.triv cmp r)
let get_c (c,_) = c
let get_cert (_,cer... |
823152a42aab9cc4e61c1b2b773eb628f24ce56b3ab2ceeef9916208519805af | codereport/SICP-2020 | geoffrey_viola_solutions.rkt | #lang racket
Exercise 3.38 .
;; a
3 ! = 6 total permutations 4 different values
;;
, , Mary = $ 45
, , Mary = $ 45
;;
, , = $ 50
;;
, , = $ 35
;;
, , = $ 40
, , = $ 40
;; b
;; Some actors can read the initial balance and write the final amount
Peter $ 110
Paul $ 80
;; Mary $50... | null | https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%203.4%20Solutions/geoffrey_viola_solutions.rkt | racket | a
b
Some actors can read the initial balance and write the final amount
Mary $50
Some actors can effectively get skipped
I disagree. Reading the balance is atomic by definition.
It will either read before or after a modification.
Therefore, it is correct at the time it is called.
There shouldn't make... | #lang racket
Exercise 3.38 .
3 ! = 6 total permutations 4 different values
, , Mary = $ 45
, , Mary = $ 45
, , = $ 50
, , = $ 35
, , = $ 40
, , = $ 40
Peter $ 110
Paul $ 80
, Mary = $ 60
, Mary = $ 40
, = $ 60
, = $ 30
Exercise 3.39
121 : P1->P2
101 : P1->P2
... |
12d392a8c8c286aa2e1d2840afd1a2176c42591d74e9032fbbcaad48a50d1058 | ghc/packages-dph | DT.hs | {-# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #-}
# LANGUAGE CPP #
#include "fusion-phases.h"
-- | Distribution of Segment Descriptors
module Data.Array.Parallel.Unlifted.Distributed.Data.USegd.DT
where
import Data.Array.Parallel.Unlifted.Distributed.Data.Vector ()
import Data.Array.Para... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USegd/DT.hs | haskell | # OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #
| Distribution of Segment Descriptors
segment lengths
segment indices
number of elements in this chunk
segment lengths
segment indices
number of elements in this chunk
# INLINE_DIST readMD #
# NOINLINE measureD # | # LANGUAGE CPP #
#include "fusion-phases.h"
module Data.Array.Parallel.Unlifted.Distributed.Data.USegd.DT
where
import Data.Array.Parallel.Unlifted.Distributed.Data.Vector ()
import Data.Array.Parallel.Unlifted.Distributed.Primitive
import Data.Array.Parallel.Unlifted.Sequential.USegd (U... |
957318a1392d73de98058078010359a50dc8172205411165eb7957d635a60c77 | narkisr-deprecated/core | api.clj | (ns re-core.test.api
"These scenarios describe how the API works and mainly validates routing"
(:refer-clojure :exclude [type])
(:require
[re-core.model :as m]
[re-core.fixtures.data :as d]
[re-core.api.users :refer (into-persisted)]
[re-core.jobs :as jobs]
[re-core.persistency.systems :as s]... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/test/re_core/test/api.clj | clojure | (ns re-core.test.api
"These scenarios describe how the API works and mainly validates routing"
(:refer-clojure :exclude [type])
(:require
[re-core.model :as m]
[re-core.fixtures.data :as d]
[re-core.api.users :refer (into-persisted)]
[re-core.jobs :as jobs]
[re-core.persistency.systems :as s]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.