_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 |
|---|---|---|---|---|---|---|---|---|
9377fd2b76593007cd737d1166fdcd5763761b947657341da493cbc20e1ea929 | appleshan/cl-http | sax-construction-context.lisp | -*- package : NOX ; Syntax : Common - lisp ; Base : 10 -*-
(in-package "NOX")
;; an xmlp-based sax parser drives the event-based counterpart based on
;; inline parser construction operations.
;; note that the bridge class implementation does not specify the
;; instantiation and invocation structure.
(defClass sax-... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/contrib/janderson/xml-2001-10-03/demos/sax/sax-construction-context.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
an xmlp-based sax parser drives the event-based counterpart based on
inline parser construction operations.
note that the bridge class implementation does not specify the
instantiation and invocation structure.
specialized versions of the xml parser constructors generate p... |
(in-package "NOX")
(defClass sax-construction-context (sax-producer)
())
(defMethod parse ((parser sax-construction-context) (source t) (locator xutils:uri))
(parse parser source (xutils:uri-namestring locator)))
(defMethod parse ((parser sax-construction-context) (source t) (locator null))
(parse parser sour... |
23121e14b86a5af1f20077257e1b6eef7b431c767bf2a5efb294d968904c03a3 | ramalho/mac316 | aula7.scm | 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 "reader.ss" "plai" "lang")
(define-type RCFAE
[num (n number?)]
[add (lhs RCFAE?) (rhs RCFAE?)]
[sub (lhs RCFAE?) (rhs RCFAE?)]
[mult (l... | null | https://raw.githubusercontent.com/ramalho/mac316/4c925557064c788c4d29e3408a6b1d327386d98b/gubi/aula7.scm | scheme | about the language level of this file in a form that our tools can easily process.
valores de expressões com recursão
predicado para saber se temos um RCFAE recursivo
novo ambiente, com recursão
aqui está, a novidade é o boxed value
lookup : symbol env! RCFAE-Value
cyclically-bind-and-interp : symbol RCFAE env! ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "reader.ss" "plai" "lang")
(define-type RCFAE
[num (n number?)]
[add (lhs RCFAE?) (rhs RCFAE?)]
[sub (lhs RCFAE?) (rhs RCFAE?)]
[mult (lhs RCFAE?) (rhs RCFAE?)]
[div (lhs RCFAE?) (rhs RCFAE?)]
[id (name symbol?)]
[fu... |
13f01ba94fd854c776866e9ac1be84e08c94ae7e8b04d7a345c7617f310f2957 | niquola/route-map | spec.cljc | (ns route-map.spec
#_(:require [clojure.spec :as s]))
(comment
(s/def ::path (s/and string? #(re-matches #"[^/]+" %)))
(s/def ::handler (s/or :handler fn? :anything (fn [& xs] true)))
(s/def ::verbs #{:http/GET :http/POST :http/PUT :http/DELETE})
(s/def ::route
(s/every
(s/or :path (s/tuple ::pa... | null | https://raw.githubusercontent.com/niquola/route-map/5caaad032401bd3f3371ca340491c826f7eeb8d1/src/route_map/spec.cljc | clojure | (ns route-map.spec
#_(:require [clojure.spec :as s]))
(comment
(s/def ::path (s/and string? #(re-matches #"[^/]+" %)))
(s/def ::handler (s/or :handler fn? :anything (fn [& xs] true)))
(s/def ::verbs #{:http/GET :http/POST :http/PUT :http/DELETE})
(s/def ::route
(s/every
(s/or :path (s/tuple ::pa... | |
c5d64d3c2651e7a5ff8145d4e5cc856ebec3bc69f773ba991e24088d8572cfbb | Dean177/reason-standard | Int.ml | type t = int
include Comparator.Make(struct
type t = int
let compare = compare
end)
let minimumValue = Js.Int.min
let maximumValue = Js.Int.max
let zero = 0
let one = 1
let add = ( + )
let ( + ) = ( + )
let subtract = ( - )
let ( - ) = ( - )
let multiply = ( * )
let ( * ) = multiply
let divide n ~by = n... | null | https://raw.githubusercontent.com/Dean177/reason-standard/74ed165c988eb4a4ea54339e829ff1d59b186d15/bucklescript/src/Int.ml | ocaml | type t = int
include Comparator.Make(struct
type t = int
let compare = compare
end)
let minimumValue = Js.Int.min
let maximumValue = Js.Int.max
let zero = 0
let one = 1
let add = ( + )
let ( + ) = ( + )
let subtract = ( - )
let ( - ) = ( - )
let multiply = ( * )
let ( * ) = multiply
let divide n ~by = n... | |
b17dca340299af47d3360b17b9bab9663a690c6d32bd7933edbdacf1d4e74895 | SimonHauguel/Paso | Program.hs | module Paso.Parser.Program where
import qualified Text.Megaparsec as MG
import Paso.Parser.ParserData
import Paso.Program.Program ( Program(..) )
import Paso.Parser.Function (typedFunction)
import Paso.Parser.Define (def... | null | https://raw.githubusercontent.com/SimonHauguel/Paso/6ee509749bf28b5823a7be946ce855eef13dc54d/src/Paso/Parser/Program.hs | haskell | module Paso.Parser.Program where
import qualified Text.Megaparsec as MG
import Paso.Parser.ParserData
import Paso.Program.Program ( Program(..) )
import Paso.Parser.Function (typedFunction)
import Paso.Parser.Define (def... | |
baf8b2a49e7406d2d25ad3d610eaf7a19597fe3730b7539356673ee6291c2116 | antoniogarrote/clj-ml | project.clj | (defproject clj-ml "0.0.3-SNAPSHOT"
:description "Machine Learning library for Clojure built around Weka and friends"
:java-source-path "src/java"
:javac-fork "true"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[lein-javac "0.0.2-SNAPSHOT"]... | null | https://raw.githubusercontent.com/antoniogarrote/clj-ml/a6e3a41b7eed0c31ea344b286ebbeb0e81ce68bc/project.clj | clojure | (defproject clj-ml "0.0.3-SNAPSHOT"
:description "Machine Learning library for Clojure built around Weka and friends"
:java-source-path "src/java"
:javac-fork "true"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[lein-javac "0.0.2-SNAPSHOT"]... | |
81ad9197a2e15d582e857cfe47bc87be9eacb150109cb98c4e807ac342c47ef9 | pokepay/aws-sdk-lisp | ssm.lisp | ;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/ssm
(:use)
(:use-reexport #:aws-sdk/services/ssm/api))
| null | https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/ssm.lisp | lisp | DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. |
(uiop:define-package #:aws-sdk/services/ssm
(:use)
(:use-reexport #:aws-sdk/services/ssm/api))
|
600ef3b06dd88860a15db3b1a62cc575af48526568e8801157d5bd17e4634816 | pfdietz/ansi-test | load.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Oct 6 00:32:56 2002
;;;; Contains: Loader for files containing package tests
(compile-and-load "ANSI-TESTS:AUX;packages00-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;package-aux.lsp")
(in-package #:cl-test)
(let ((*default-pathname-defaults*
(make-pa... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/packages/load.lsp | lisp | -*- Mode: Lisp -*-
Contains: Loader for files containing package tests | Author :
Created : Sun Oct 6 00:32:56 2002
(compile-and-load "ANSI-TESTS:AUX;packages00-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;package-aux.lsp")
(in-package #:cl-test)
(let ((*default-pathname-defaults*
(make-pathname
:directory (pathname-directory *load-pathname*))))
(load "find-s... |
e8308338eb438a54381f30ca571258f574a13913b2904b3192ff915ded931bb6 | jimcrayne/jhc | constraints.hs | and contraint solver
See Proceedings of WAAAPL ' 99
See Proceedings of WAAAPL '99
-}
import Prelude hiding (Maybe(Just,Nothing))
import Data.List
import System.Environment
-----------------------------
-- The main program
-----------------------------
main = do
[arg] <- getArgs
let
... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/9_nofib/spectral/constraints.hs | haskell | ---------------------------
The main program
---------------------------
---------------------------
---------------------------
-----------------------------
-----------------------------
------------------------------------------------
------------------------------------------------
--------------------------------... | and contraint solver
See Proceedings of WAAAPL ' 99
See Proceedings of WAAAPL '99
-}
import Prelude hiding (Maybe(Just,Nothing))
import Data.List
import System.Environment
main = do
[arg] <- getArgs
let
n = read arg :: Int
try algorithm = print (length (search algorithm... |
48bd89b6f3ad7b17a0eccbbc9c2832c0cdcae404cf7bea8d7390c3cef0a4653e | DavidAlphaFox/RabbitMQ | rabbit_mgmt_wm_permissions_user.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions_user.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.
-------------------------------------------------------------------- | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Management Plugin .
The Initial Developer of the Original Code... |
0b9f46d045cd86dc03000f66dd27429f8f60093a3ca6c815adc3bed6b82659c5 | slyrus/abcl | precompiler.lisp | ;;; precompiler.lisp
;;;
Copyright ( C ) 2003 - 2008 < >
$ 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 v... | null | https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/precompiler.lisp | lisp | precompiler.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 Licens... | Copyright ( C ) 2003 - 2008 < >
$ 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. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 ... |
f496137ffa6e7726e5d679c3faefd23ed24a36ccd0fa81d2750d525769a1e2c9 | number571/Haskell | dropWhile.hs | module Main where
dropWhile' :: (a -> Bool) -> [a] -> [a]
dropWhile' _ [] = []
dropWhile' f (x:xs)
| f x = dropWhile' f xs
| otherwise = x:xs
main :: IO()
main = print $ dropWhile' (< 4) [1..10]
| null | https://raw.githubusercontent.com/number571/Haskell/7da2676c2604706d43791dc89c0ca8c9842aea48/Templates/dropWhile.hs | haskell | module Main where
dropWhile' :: (a -> Bool) -> [a] -> [a]
dropWhile' _ [] = []
dropWhile' f (x:xs)
| f x = dropWhile' f xs
| otherwise = x:xs
main :: IO()
main = print $ dropWhile' (< 4) [1..10]
| |
cc8cd7484cd431ecda85817320490b42519ab57394007ed26fd4bfe7ca26556d | heykieran/xl-parse-clj | ast_processing.clj | (ns ast-processing
(:require
[clojure.walk :as walk]
[shunting :as sh]
[xlparse :as parse]
[xl-utils :as xl-utils]))
(defn process-function
"Given a map element representing a function call element in the ast,
i.e. where :type is :Function, unroll the arguments so they can be
processed. For examp... | null | https://raw.githubusercontent.com/heykieran/xl-parse-clj/8ab8677fcadf84cdab9cd9250dc43aa0799584d1/src/ast_processing.clj | clojure | don't forget to sort! | (ns ast-processing
(:require
[clojure.walk :as walk]
[shunting :as sh]
[xlparse :as parse]
[xl-utils :as xl-utils]))
(defn process-function
"Given a map element representing a function call element in the ast,
i.e. where :type is :Function, unroll the arguments so they can be
processed. For examp... |
5685625104e191876a45a7df4879eae1eacdd4e75c75ad74d86c6e02565ae0ef | nicolasff/distributed-counters | test.erl | -module(test).
-export([main/0, test_simple_merge/0]).
-define(CTR_MIN, -1000000).
-define(CTR_MAX, 1000000).
main() ->
NodeCount = 3,
MsgCount = 10000,
run(ctr_sum, MsgCount, NodeCount),
run(ctr_min, MsgCount, NodeCount),
run(ctr_max, MsgCount, NodeCount),
run(ctr_avg, MsgCount, NodeCount),
... | null | https://raw.githubusercontent.com/nicolasff/distributed-counters/36a45b7e13a57b553c29ca09359c2ee812f74da8/test.erl | erlang | create new counter
Generate the merged version of several counters
start cluster
send "Cluster" record to all nodes.
send deltas
collect answers
wait a bit | -module(test).
-export([main/0, test_simple_merge/0]).
-define(CTR_MIN, -1000000).
-define(CTR_MAX, 1000000).
main() ->
NodeCount = 3,
MsgCount = 10000,
run(ctr_sum, MsgCount, NodeCount),
run(ctr_min, MsgCount, NodeCount),
run(ctr_max, MsgCount, NodeCount),
run(ctr_avg, MsgCount, NodeCount),
... |
e3a51871994c13cb5be61541e67baa921095c3e6ea10bfd221c8ba6dd2eae1e5 | lazy-cat-io/metaverse | core.cljs | (ns metaverse.renderer.news.core
(:require
[metaverse.renderer.news.events]
[metaverse.renderer.news.subs]))
| null | https://raw.githubusercontent.com/lazy-cat-io/metaverse/1fc129ebcca37392f7efc3fd5a9ec98aa23cf92b/src/main/clojure/metaverse/renderer/news/core.cljs | clojure | (ns metaverse.renderer.news.core
(:require
[metaverse.renderer.news.events]
[metaverse.renderer.news.subs]))
| |
dcfd6f9cda6a7424ee0a1eba5f279b00f3087fa93fc43408c57b60042632161d | spilgames/spapi-router | spapi_router_callback_noop.erl | %%% @doc Minimal spapi-router callback module example
-module(spapi_router_callback_noop).
-behaviour(spapi_router_callback).
-export([new_resource/2, lost_resource/2, measure/3, success/2, failure/2]).
measure({_Service, _Module, _Function}, Fun, _Opts) ->
Fun().
success({_Service, _Module, _Function}, _Opts) ->... | null | https://raw.githubusercontent.com/spilgames/spapi-router/91485502538a36a0f4ee76d59faaf91f57ec88bb/src/spapi_router_callback_noop.erl | erlang | @doc Minimal spapi-router callback module example | -module(spapi_router_callback_noop).
-behaviour(spapi_router_callback).
-export([new_resource/2, lost_resource/2, measure/3, success/2, failure/2]).
measure({_Service, _Module, _Function}, Fun, _Opts) ->
Fun().
success({_Service, _Module, _Function}, _Opts) ->
ok.
failure({_Service, _Module, _Function}, _Opt... |
cc9c7d4804a41619a841b49a847e888e192b54d40a94d5aa7cd96e05ab4642e8 | Tatsuki-I/Vihs | Delete.hs | module Delete where
deleteLine :: [String] -> Int -> Int ->[String]
deleteLine str line times | line <= length str
&& line >= 0
&& line - 1 <= length str = take (line - 1) str ++
(reverse . take
... | null | https://raw.githubusercontent.com/Tatsuki-I/Vihs/18543d0e2d2970d28a72674d5c502384bb41d98d/src/Delete.hs | haskell | module Delete where
deleteLine :: [String] -> Int -> Int ->[String]
deleteLine str line times | line <= length str
&& line >= 0
&& line - 1 <= length str = take (line - 1) str ++
(reverse . take
... | |
45dd5a9209c20d5c77dd4f8306c6df8ceb4bafd228663e60fc6666e53426b29b | janestreet/krb | cache_type.ml | open! Core.Core_stable
module Stable = struct
module V1 = struct
type t =
| API
| DIR
| FILE
| KEYRING
| MEMORY
| MSLSA
[@@deriving bin_io, compare, enumerate, sexp]
end
end
open! Core
include Stable.V1
include Sexpable.To_stringable (Stable.V1)
| null | https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/cache_type.ml | ocaml | open! Core.Core_stable
module Stable = struct
module V1 = struct
type t =
| API
| DIR
| FILE
| KEYRING
| MEMORY
| MSLSA
[@@deriving bin_io, compare, enumerate, sexp]
end
end
open! Core
include Stable.V1
include Sexpable.To_stringable (Stable.V1)
| |
faee8a9b0df5b79fe23a9d111696afdb05cf352fdd8a10ad60fe48a7b6fe03c9 | bozsahin/ccglab | g-test.lisp | ;; use: (load "g-test.lisp") after getting into ccglab -- it loads and runs this code
-cem bozsahin
(pprint (which-ccglab)) ; to identify version
(defun p-aux (expr targets onto)
"an aux function to call the parser p. Only derivations onto are shown.
Lowest types in targets will be eschewed by turning on typ... | null | https://raw.githubusercontent.com/bozsahin/ccglab/15def13c76e562a053ff92d61353549818d2a7e3/examples/type-raising-with-workflow/g-test.lisp | lisp | use: (load "g-test.lisp") after getting into ccglab -- it loads and runs this code
to identify version
it means eliminate these types during parsing for demo.
show the derivations onto
saves grammar with TR rules
parses the type-raised grammar
parses the type-raised grammar
saves grammar with TR rules
parses ... | -cem bozsahin
(defun p-aux (expr targets onto)
"an aux function to call the parser p. Only derivations onto are shown.
Lowest types in targets will be eschewed by turning on type-raising."
NB this does not mean only type - raise cats in ' target '
(format t "~%Lowest types ~A will be eliminated~%" targets)
... |
7a7b353a2a1161afcf85385f59e7b6c1493974429dfb8810fc6f4604f9c1465c | lasp-lang/partisan | oc_server.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/lasp-lang/partisan/e37ca042f82f4a9d91747dcd8ecd0d3da17667ec/test/otp/oc_server.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(oc_server).
-behaviour(partisan_gen_server).
-export([start/0, start/1]).
-export([init/1]).
-record(state, {}).... |
08293730efa1a70c75f7cb574814c49c413d3eda5be076f75ff8c7a2b0ec2bf4 | OCamlPro/ez_api | ezAPIServerHttpAf.ml | (**************************************************************************)
(* *)
(* Copyright 2018-2023 OCamlPro *)
(* *)
(* All righ... | null | https://raw.githubusercontent.com/OCamlPro/ez_api/c2a11a6cc250e82738939ce55ae76503a9299198/src/server/httpaf/ezAPIServerHttpAf.ml | ocaml | ************************************************************************
Copyright 2018-2023 OCamlPro
All rights reserved. This ... | GNU Lesser General Public License version 2.1 , with the special
open Lwt
open EzAPI
open EzAPIServerUtils
open Httpaf
external limit_open_file : unit -> int = "rlimit_no_file_c"
type lwt_server = {
shutdown : unit Lwt.t Lazy.t;
}
let set_debug () = ()
let () =
Lwt.async_exception_hook := (fun exn ->... |
d97795aeaf16ae83cb2c3898148695e0322904a5cacf4f36937036fb2a05de2c | fulcrologic/semantic-ui-wrapper | ui_comment_author.cljc | (ns com.fulcrologic.semantic-ui.views.comment.ui-comment-author
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$CommentAuthor" :as CommentAuthor])))
(def ui-comment-author
"A comment can contain an author.
Props:
- as (elementType): An element type to ren... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/views/comment/ui_comment_author.cljc | clojure | (ns com.fulcrologic.semantic-ui.views.comment.ui-comment-author
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$CommentAuthor" :as CommentAuthor])))
(def ui-comment-author
"A comment can contain an author.
Props:
- as (elementType): An element type to ren... | |
6c26eb751636ecc5be944230e520a7e5b565ff278bff95279b453c9e6dca3e5a | ygrek/mldonkey | dcClients.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/direct_connect/dcClients.ml | ocaml | Check current client state and setup for future proceeding with client
if client is downloading a file ...
continue downloading later
if client was handling file lists...
close file descriptor and remove client
if client was uploading file ...
check if we have to free a slot
inform GUI
filelist download... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... |
b9ea1f8fba001997fbac398531121cb5fdb0c87defc80d6bdb376b7e06b28abc | returntocorp/semgrep | Logs_helpers.ml | (* Enable basic logging (level = Logs.Warning) so that you can use Logging
* calls even before a precise call to setup_logging.
*)
let enable_logging () =
Logs.set_level ~all:true (Some Logs.Warning);
Logs.set_reporter (Logs_fmt.reporter ());
()
(* TOPORT: with Logs a warning is displayed as:
* osemgrep: [... | null | https://raw.githubusercontent.com/returntocorp/semgrep/e0d996ed1e4d76d0dafd34aec96bde3b718ac05e/libs/commons/Logs_helpers.ml | ocaml | Enable basic logging (level = Logs.Warning) so that you can use Logging
* calls even before a precise call to setup_logging.
TOPORT: with Logs a warning is displayed as:
* osemgrep: [WARNING] Paths that match both --include ...
* with the WARNING in yellow. In python it's displayed as:
* Paths that match... | let enable_logging () =
Logs.set_level ~all:true (Some Logs.Warning);
Logs.set_reporter (Logs_fmt.reporter ());
()
let setup_logging ~force_color ~level =
let style_renderer = if force_color then Some `Ansi_tty else None in
Fmt_tty.setup_std_outputs ?style_renderer ();
Logs.set_level ~all:true level;
Log... |
197e75ceca0df55fa2eee3dd4ce5fa862c9617c316e05a3e8e7d2f06059165d6 | kowainik/tomland | Common.hs | # LANGUAGE FlexibleContexts #
|
Module : Toml . Codec . Combinator . Common
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
This module i... | null | https://raw.githubusercontent.com/kowainik/tomland/561aefdbcf177498c06e6c6fcee2b3fe299b3af6/src/Toml/Codec/Combinator/Common.hs | haskell | # LANGUAGE FlexibleContexts #
|
Module : Toml . Codec . Combinator . Common
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
This module i... | |
d1b72041f1fc51a635e1324be386d73cc74e5c5f58f0b9799ba7e27dbbc780d9 | Naupio/pical | ta_partitioner.erl | -module (ta_partitioner).
-compile(export_all).
partition_find(_,[]) ->
none;
partition_find(Key, ZipKeys) ->
[{Head1,Head2}|TailZipKeys] = ZipKeys,
case Key =:= Head1 of
true -> Head2;
false -> partition_find(Key,TailZipKeys)
end.
range_partition_find(Key, [KeyHead|KeysTail]) ->
... | null | https://raw.githubusercontent.com/Naupio/pical/8d1ea236645493e8a546bc66051c16649888bbbe/apps/rdd/src/ta_rdd/src/ta_partitioner.erl | erlang | -module (ta_partitioner).
-compile(export_all).
partition_find(_,[]) ->
none;
partition_find(Key, ZipKeys) ->
[{Head1,Head2}|TailZipKeys] = ZipKeys,
case Key =:= Head1 of
true -> Head2;
false -> partition_find(Key,TailZipKeys)
end.
range_partition_find(Key, [KeyHead|KeysTail]) ->
... | |
c11355ccfd8de09d5fe0c23524f638c30b4a175ccffd6edae8cdb3c61c8a9298 | incoherentsoftware/defect-process | Util.hs | module Level.Room.Item.Pickup.Util
( itemPickupOverlayBackdropColor
, itemPickupOverlayBackdropBorderSize
, itemPickupRemoveMessage
, itemPickupBuyMessages
, itemPickupCantBuySoundMessage
, itemPickupBuyConfirmSoundMessage
, drawItemPickupBuyConfirmControlsOverlay
, drawItemPickupBuyConf... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/c39ce1f742d32a0ffcde82c03bf872adeb7d9162/src/Level/Room/Item/Pickup/Util.hs | haskell | module Level.Room.Item.Pickup.Util
( itemPickupOverlayBackdropColor
, itemPickupOverlayBackdropBorderSize
, itemPickupRemoveMessage
, itemPickupBuyMessages
, itemPickupCantBuySoundMessage
, itemPickupBuyConfirmSoundMessage
, drawItemPickupBuyConfirmControlsOverlay
, drawItemPickupBuyConf... | |
69828f0eff0c09508fd234b23608df58420e08b5766e8d8f4fd98a21622a4e51 | Wikia/vignette | thumbnail.clj | (ns vignette.util.thumbnail
(:require [cheshire.core :refer :all]
[clojure.java.io :as io]
[clojure.string :refer [split]]
[clojure.java.shell :refer [sh]]
[pantomime.mime :refer [mime-type-of]]
[slingshot.slingshot :refer [try+ throw+]]
[vignett... | null | https://raw.githubusercontent.com/Wikia/vignette/4797aeffc0a01dcfe1e1f661b2d2649d44ddb1d0/src/vignette/util/thumbnail.clj | clojure | todo: do we need it? | (ns vignette.util.thumbnail
(:require [cheshire.core :refer :all]
[clojure.java.io :as io]
[clojure.string :refer [split]]
[clojure.java.shell :refer [sh]]
[pantomime.mime :refer [mime-type-of]]
[slingshot.slingshot :refer [try+ throw+]]
[vignett... |
a2bdefd6ea1d8b31fc5e77b6ac1fe3e077ff3f6abf9cefe5abe811149cda1c4f | radian628/lispsmos | graphics-library.lisp | (folder ((title "Graphics Library"))
; Ray-triangle intersection for collision detection
(= rtiEpsilon 0.001)
(fn isDefined testValue defaultValue
(piecewise
((== testValue testValue) testValue)
(defaultValue)
)
)
(fn rayTriangleIntersectionIntermediate4 det u v t
(piecewise
((< ... | null | https://raw.githubusercontent.com/radian628/lispsmos/d876f7e81129c1990ea1007dadb04cf5d1641d9d/test/desmos-plane/graphics-library.lisp | lisp | Ray-triangle intersection for collision detection
cull faces if needed
(getSingleCullingInformation
([] indices (+ n 1))
([] indices (+ n 2))
([] indices (+ n 3))
farPlane
)
(piecewise
((>
(mean
([] zValues ([] indices (+ n 1)))
([] zValues ([] indices (+ n 2)))
([] zValues... | (folder ((title "Graphics Library"))
(= rtiEpsilon 0.001)
(fn isDefined testValue defaultValue
(piecewise
((== testValue testValue) testValue)
(defaultValue)
)
)
(fn rayTriangleIntersectionIntermediate4 det u v t
(piecewise
((< det rtiEpsilon) -1)
((< t 0) -1)
((< u 0) ... |
5210c8beb53fccb28c47b95cb41aa26eaf571ebda70fcccd772d7d8bda6b52cb | philnguyen/soft-contract | mem.rkt | #lang racket
(require soft-contract/fake-contract)
(define (mk-list n x)
(if (< n 0) empty (cons x (mk-list (- n 1) x))))
(define (mem x xs)
(if (empty? xs) #f (or (= x (car xs)) (mem x (cdr xs)))))
(provide/contract
[mk-list (->i ([_ integer?] [x integer?])
(res (_ x) (and/c (listof integer?)
(λ (l... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/mochi/mem.rkt | racket | #lang racket
(require soft-contract/fake-contract)
(define (mk-list n x)
(if (< n 0) empty (cons x (mk-list (- n 1) x))))
(define (mem x xs)
(if (empty? xs) #f (or (= x (car xs)) (mem x (cdr xs)))))
(provide/contract
[mk-list (->i ([_ integer?] [x integer?])
(res (_ x) (and/c (listof integer?)
(λ (l... | |
8cd8eea9936f0d38ace3eb2e62a157cd3b027fbb6851194a38bb862f9459a3fe | elarous/O2SN | views.cljs | (ns o2sn.topbar.views
(:require [reagent.core :as r]
[re-frame.core :as rf]
["semantic-ui-react" :as ui]
[o2sn.notifications.views :refer [menu-notifications]]))
;; search components
#_(defn story-result [s]
^{:key (:_id s)}
[:div
[:> ui/Header {:color "teal"
... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/topbar/views.cljs | clojure | search components
:on-close identity | (ns o2sn.topbar.views
(:require [reagent.core :as r]
[re-frame.core :as rf]
["semantic-ui-react" :as ui]
[o2sn.notifications.views :refer [menu-notifications]]))
#_(defn story-result [s]
^{:key (:_id s)}
[:div
[:> ui/Header {:color "teal"
:as "h4"
... |
ec88a093fb74491d282fae9c3fb408d54c2961fffc828075a47628e4f3c00193 | carl-eastlund/dracula | run-tests.rkt | #lang racket
(require
rackunit
rackunit/gui
"test-language.rkt"
"test-library.rkt"
"test-teachpacks.rkt" ;; LINKS, does not TEST
"test-modular.rkt"
"test-parse.rkt"
"test-proof.rkt"
"test-regexp.rkt"
"test-state.rkt"
"test-private.rkt")
(test/gui
(test-suite "Dracula"
(test-suite "Internal T... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/test/run-tests.rkt | racket | LINKS, does not TEST | #lang racket
(require
rackunit
rackunit/gui
"test-language.rkt"
"test-library.rkt"
"test-modular.rkt"
"test-parse.rkt"
"test-proof.rkt"
"test-regexp.rkt"
"test-state.rkt"
"test-private.rkt")
(test/gui
(test-suite "Dracula"
(test-suite "Internal Tools"
test-private
regexp-test-suite)
... |
eef4c24062f1e71afc69b07d9a25dc9e6d05b28a1a7031a72d01feafeb565cb4 | Emmanuel-PLF/facile | fcl_stak.mli | (***********************************************************************)
(* *)
FaCiLe
A Functional Constraint Library
(* ... | null | https://raw.githubusercontent.com/Emmanuel-PLF/facile/3b6902e479019c25b582042d9a02152fec145eb0/lib/fcl_stak.mli | ocaml | *********************************************************************
under the terms of the GNU Lesser Gener... | FaCiLe
A Functional Constraint Library
, , LOG , CENA
Copyright 2004 CENA . All rights reserved . This file is distributed
$ I d : fcl_stak.mli , v 1.24 2004/07/30 10:37:13 barnie... |
f6bbf11b69d5031f4694ecacdc51b361b94b0b02b3cfad20d309d074b15b92f0 | imrehg/ypsilon | run-ypsilon.scm | #!/usr/bin/env ypsilon
(import (core))
(add-load-path "./gambit-benchmarks")
(add-load-path "./bench/gambit-benchmarks")
(define-syntax time
(syntax-rules ()
((_ expr)
(destructuring-bind (real-start user-start sys-start) (time-usage)
(let ((result (apply (lambda () expr) '())))
(destructu... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/bench/run-ypsilon.scm | scheme | #!/usr/bin/env ypsilon
(import (core))
(add-load-path "./gambit-benchmarks")
(add-load-path "./bench/gambit-benchmarks")
(define-syntax time
(syntax-rules ()
((_ expr)
(destructuring-bind (real-start user-start sys-start) (time-usage)
(let ((result (apply (lambda () expr) '())))
(destructu... | |
a4cdc99c39960ba485fd927e5a725445c85de9c25e1185be045dd344cc709a79 | tfausak/exercism-solutions | grains_test.hs | import Test.HUnit (Assertion, (@=?), runTestTT, Test(..))
import Control.Monad (void)
import Grains (square, total)
testCase :: String -> Assertion -> Test
testCase label assertion = TestLabel label (TestCase assertion)
main :: IO ()
main = void $ runTestTT $ TestList
[ TestList grainsTests ]
grainsTests :: [... | null | https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/grains/grains_test.hs | haskell | import Test.HUnit (Assertion, (@=?), runTestTT, Test(..))
import Control.Monad (void)
import Grains (square, total)
testCase :: String -> Assertion -> Test
testCase label assertion = TestLabel label (TestCase assertion)
main :: IO ()
main = void $ runTestTT $ TestList
[ TestList grainsTests ]
grainsTests :: [... | |
b6b72396605ff68d910d630b4a7018d272bca33480b8e42a7bd5313086b0897b | chrissound/GitChapter | BlogLiterately.hs | -- GNU GENERAL PUBLIC LICENSE
Version 3 , 29 June 2007
--
Copyright ( C ) 2007 Free Software Foundation , Inc. < / >
-- Everyone is permitted to copy and distribute verbatim copies
-- of this license document, but changing it is not allowed.
--
-- ... | null | https://raw.githubusercontent.com/chrissound/GitChapter/4bfd9bd47b622c1dac08ab8e5ab4427432c48d26/src/BlogLiterately.hs | haskell | GNU GENERAL PUBLIC LICENSE
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
... | Version 3 , 29 June 2007
Copyright ( C ) 2007 Free Software Foundation , Inc. < / >
the GNU General Public License is intended to guarantee your freedom to
software for all its users . We , the Free Software Foundation , use the
price . Our General Public Licenses are designed to m... |
44c1ec37fcb934ae6196ad45484701dda1f70d9ef84e7c9ad3d06434ca141546 | haskell/cabal | PackageInfoModule.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Build.PackageInfoModule
-- Copyright :
--
-- Maintainer :
-- Portability : portable
--
-- Generating the PackageInfo_pkgname module.
--
This is a module that Cabal generates for the benefit o... | null | https://raw.githubusercontent.com/haskell/cabal/ffa9f01b3bf0eccf2318bdd3e644ccc175b8a0e0/Cabal/src/Distribution/Simple/Build/PackageInfoModule.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Build.PackageInfoModule
Copyright :
Maintainer :
Portability : portable
Generating the PackageInfo_pkgname module.
enables them to find their package informations.
-------------------------... | This is a module that Cabal generates for the benefit of packages . It
module Distribution.Simple.Build.PackageInfoModule (
generatePackageInfoModule
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Package
import Distribution.PackageDescription
import Distribution.Simple.Compi... |
76b482822d12e2757d8531b9c36948a15377200cea559cf2c087e50d961999fa | clojusc/meson | core.clj | (ns meson.http.core
(:require [clojure.data.json :as json]
[clojure.tools.logging :as log]
[clj-http.client :as httpc]
[clojusc.twig :refer [pprint]]
[meson.config :as config]
[meson.const :as const]
[meson.error :as error]
[meson.htt... | null | https://raw.githubusercontent.com/clojusc/meson/a690135bf64c967a70fd45e88bdfed1e7b847317/src/meson/http/core.clj | clojure | XXX remove
XXX remove | (ns meson.http.core
(:require [clojure.data.json :as json]
[clojure.tools.logging :as log]
[clj-http.client :as httpc]
[clojusc.twig :refer [pprint]]
[meson.config :as config]
[meson.const :as const]
[meson.error :as error]
[meson.htt... |
cf20b3c255c8600db030b08f28e561fb6dd3ed7906e5c52b379f06d168705873 | macourtney/Conjure | project.clj | (defproject org.conjure/conjure-util "1.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[clojure-tools "1.1.2"]
[org.clojure/clojure "1.4.0"]
[org.clojure/tools.namespace "0.2.0"]]
:aot [conjure.execute]) | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_util/project.clj | clojure | (defproject org.conjure/conjure-util "1.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[clojure-tools "1.1.2"]
[org.clojure/clojure "1.4.0"]
[org.clojure/tools.namespace "0.2.0"]]
:aot [conjure.execute]) | |
a60c704df2592ec80c21d4c8d6eb45326cd4f03e0172f2a7aeb7bab884480226 | gvannest/piscine_OCaml | main.ml |
let rdString () =
Random.self_init () ;
let len = Random.int 12 in
let rec loop (i:int) (res:string) = match i with
| x when x = len -> res
| _ -> loop (i + 1) (res ^ Dalek.charGenerator ())
in loop 0 ""
let () =
Random.self_init () ;
let rec createListPeople (i:int) (res:Peop... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d07/ex04/main.ml | ocaml |
let rdString () =
Random.self_init () ;
let len = Random.int 12 in
let rec loop (i:int) (res:string) = match i with
| x when x = len -> res
| _ -> loop (i + 1) (res ^ Dalek.charGenerator ())
in loop 0 ""
let () =
Random.self_init () ;
let rec createListPeople (i:int) (res:Peop... | |
c0ee6fef421c1e912667f55c72ec736bb2d197e0c0178a4ae1d43d4b71eccd0d | kevinlynx/ext-blog | auth.lisp | auth.lisp
;;;;
;;;; This file is a part of ext-blog, a common lisp blog engine.
;;;; See file doc/LICENSE for license details.
;;;;
Author : ( kevinlynx at gmail dot com )
(in-package #:ext-blog)
;;; cookie stuff
(defconstant +cookie-save-time+ (* 60 60 24 30))
(defun set-cookie (user)
"Set a response cookie ... | null | https://raw.githubusercontent.com/kevinlynx/ext-blog/4f6a6f0ab64f9384d53d41d1208ebaa7b9575534/src/auth.lisp | lisp |
This file is a part of ext-blog, a common lisp blog engine.
See file doc/LICENSE for license details.
cookie stuff | auth.lisp
Author : ( kevinlynx at gmail dot com )
(in-package #:ext-blog)
(defconstant +cookie-save-time+ (* 60 60 24 30))
(defun set-cookie (user)
"Set a response cookie to client"
(unless (cookie "user")
(let ((token (create-random-string)))
(add-user-token user token)
(hunchentoot:set-coo... |
0ae69c76f481fae3eb02e933977edb85b30e69bf0896b655759deb3d6737490f | stackbuilders/tutorials | Luhn.hs | module Luhn
( validate
)
where
import Luhn.Internal
-- | Validates a number using the Luhn algorithm
validate :: Integer -> Bool
validate = (== 0) . (`mod` 10) . sumDigits . doubleEveryOther . toDigits
| null | https://raw.githubusercontent.com/stackbuilders/tutorials/c6100b5bf7a00a3669444313159dfc2ca0cf8eb7/tutorials/haskell/bdd-in-haskell-with-hspec/code/src/Luhn.hs | haskell | | Validates a number using the Luhn algorithm | module Luhn
( validate
)
where
import Luhn.Internal
validate :: Integer -> Bool
validate = (== 0) . (`mod` 10) . sumDigits . doubleEveryOther . toDigits
|
468752d6ccaa29c9c3d3bd8a30ec4c34541d172a8e91dcb9662d7de37137af58 | deadcode/Learning-CL--David-Touretzky | 8.18.lisp | (defun last-element (x)
(cond ((atom (cdr x)) (car x))
(t (last-element (rest x)))))
(let ((test1 '(last-element '(a b c (d e) f)))
(test2 '(last-element '(a b c d (e f))))
(test3 '(last-element '()))
(test4 '(last-element '(a b c d e . f)))
(test5 '(last-element '(a b c d (e ... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.18.lisp | lisp | (defun last-element (x)
(cond ((atom (cdr x)) (car x))
(t (last-element (rest x)))))
(let ((test1 '(last-element '(a b c (d e) f)))
(test2 '(last-element '(a b c d (e f))))
(test3 '(last-element '()))
(test4 '(last-element '(a b c d e . f)))
(test5 '(last-element '(a b c d (e ... | |
40a061afadbf870dadc59e8cfffc991e7d74b101d3d7b19f0b38e5aa065f2a92 | strint/sicpAns | 2091_polynomials_division.scm | ; ***************operation-and-type table**********************
(define op-type-table (make-hash-table))
(define (put op-name data-type procdure)
(hash-table/put! op-type-table (list op-name data-type) procdure))
(define (get op-name data-type)
(hash-table/get op-type-table (list op-name data-type) #f))
; *********... | null | https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.5.3-3_PolynomialsArithmetic/2091_polynomials_division.scm | scheme | ***************operation-and-type table**********************
***************operation-and-type table(end)*******************
******operation-and-type table for coercion*****************
*****operation-and-type table for coercion(end)***************
**********************type tag operations********************
tr... | (define op-type-table (make-hash-table))
(define (put op-name data-type procdure)
(hash-table/put! op-type-table (list op-name data-type) procdure))
(define (get op-name data-type)
(hash-table/get op-type-table (list op-name data-type) #f))
(define op-type-table-coercion (make-hash-table))
(define (put-coercion da... |
a250f13fbc64f82bf768ec064e7d00c556452e47500be4f5935a3d29952606b2 | earl-ducaine/cl-garnet | multifont-pix.lisp | (in-package "USER" :use '("LISP" "KR" "GARNET-DEBUG"))
(when (boundp 'WIN) (opal:destroy WIN))
(create-instance 'WIN inter:interactor-window
(:left 800)(:top 10)(:width 230)(:height 220)
(:background-color opal:motif-gray))
(s-value WIN :aggregate (create-instance 'TOP-AGG opal:aggregate))
(opal:update WIN)
(d... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/doc/src/opal/garnet-code/multifont-pix.lisp | lisp | (in-package "USER" :use '("LISP" "KR" "GARNET-DEBUG"))
(when (boundp 'WIN) (opal:destroy WIN))
(create-instance 'WIN inter:interactor-window
(:left 800)(:top 10)(:width 230)(:height 220)
(:background-color opal:motif-gray))
(s-value WIN :aggregate (create-instance 'TOP-AGG opal:aggregate))
(opal:update WIN)
(d... | |
8d3cc09baf0c27b902be192d74aba2593daff0d9222f9d2c5006ca54ffc0b2c9 | exercism/haskell | Minesweeper.hs | module Minesweeper (annotate) where
import Data.Char (intToDigit)
import Data.Maybe (mapMaybe)
annotate :: [String] -> [String]
annotate xss = [[ fixTile x (i, j)
| (j, x ) <- zip [0..] xs ]
| (i, xs) <- zip [0..] xss ]
where
bombs = length . filter (== '*') . mapMaybe (`looku... | null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/minesweeper/.meta/examples/success-standard/src/Minesweeper.hs | haskell | module Minesweeper (annotate) where
import Data.Char (intToDigit)
import Data.Maybe (mapMaybe)
annotate :: [String] -> [String]
annotate xss = [[ fixTile x (i, j)
| (j, x ) <- zip [0..] xs ]
| (i, xs) <- zip [0..] xss ]
where
bombs = length . filter (== '*') . mapMaybe (`looku... | |
9443d322a24884effbf6cbd0a0c90ccb4cedbbd540e9cd4e08a9c383ab80ac94 | jmlowenthal/staged-streams.agda | StreamListVsSpec.hs |
--
-- Must have rules off, otherwise the fusion rules will replace the rhs
with the lhs , and we only end up testing lhs = = lhs
--
import System.IO
import Properties.Utils
import qualified Properties.Monomorphic.StreamList as Test -- stream functions
import qualified Properties.Monomorphic.Spec as... | null | https://raw.githubusercontent.com/jmlowenthal/staged-streams.agda/3ac5fbff18808a505185c88000a817046de35d0d/lib/stream-fusion-0.1.2.5/tests/Properties/StreamListVsSpec.hs | haskell |
Must have rules off, otherwise the fusion rules will replace the rhs
stream functions
H98
Data.Stream <=> Spec.List
----------------------------------------------------------------------
* Basic interface
----------------------------------------------------------------------
* List transformations
prop_trans... |
with the lhs , and we only end up testing lhs = = lhs
import System.IO
import Properties.Utils
prop_cons = Test.cons `eq2` (:)
prop_snoc = Test.snoc `eq2` (\xs x -> xs Spec.++ [x])
prop_append = Test.append `eq2` (Spec.++)
prop_head = Test.head `... |
35a3938c76d48d97390d148f7c91f55400b1c34c96c99c2472c186bf213e8cb5 | docker-in-aws/docker-in-aws | form_mounts.cljs | (ns swarmpit.component.service.form-mounts
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.ajax :as ajax]
[swarmpit.routes :as routes]
... | null | https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/service/form_mounts.cljs | clojure | (ns swarmpit.component.service.form-mounts
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.ajax :as ajax]
[swarmpit.routes :as routes]
... | |
4aa92620ff2e92b79e0887525d81fc272ac7412074f85a6bc2b9af7ab7b4650e | samply/blaze | cassandra_test.clj | (ns blaze.db.resource-store.cassandra-test
(:refer-clojure :exclude [hash])
(:require
[blaze.async.comp :as ac]
[blaze.byte-buffer :as bb]
[blaze.cassandra :as cass]
[blaze.cassandra-spec]
[blaze.db.resource-store :as rs]
[blaze.db.resource-store.cassandra]
[blaze.db.resource-store.cassa... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/db-resource-store-cassandra/test/blaze/db/resource_store/cassandra_test.clj | clojure | (ns blaze.db.resource-store.cassandra-test
(:refer-clojure :exclude [hash])
(:require
[blaze.async.comp :as ac]
[blaze.byte-buffer :as bb]
[blaze.cassandra :as cass]
[blaze.cassandra-spec]
[blaze.db.resource-store :as rs]
[blaze.db.resource-store.cassandra]
[blaze.db.resource-store.cassa... | |
469b79d7b9e4ac6a3019325507f0c365cc044aacb648365127682df5a77b4e34 | qoocku/erleos | CAN_msg_router_srv_tests.erl | %%% ==========================================================================
@author < >
@since 2010 - 12 - 20
@doc TODO : Add description to can_messages_router_tests
%%% @end
%%% ==========================================================================
-module ('CAN_msg_router_srv_tests').
-author ("Dami... | null | https://raw.githubusercontent.com/qoocku/erleos/ce14d2cfeea81053307b1fab815e0fbe3b9d1133/test/CAN_msg_router_srv_tests.erl | erlang | ==========================================================================
@end
==========================================================================
bomb the router with fake CAN signals:
collect the results
-----------------------------------------------------------------------------
@doc Tests Runner.
@... | @author < >
@since 2010 - 12 - 20
@doc TODO : Add description to can_messages_router_tests
-module ('CAN_msg_router_srv_tests').
-author ("Damian T. Dobroczy\\'nski <>").
-compile (export_all).
-include_lib ("eunit/include/eunit.hrl").
-include ("erleos/include/proto/data_source.hrl").
-record (ctx, {srv}).... |
74c57fa7a5a56dfa82d2cdc7f172ddfec07863b941491c26f33f6ae8cecf7d8b | VERIMAG-Polyhedra/VPL | Ring_polynom.ml | open BinInt
open BinNums
open BinPos
open Datatypes
type 'c coq_Pol =
| Pc of 'c
| Pinj of positive * 'c coq_Pol
| PX of 'c coq_Pol * positive * 'c coq_Pol
* : ' a1 - > ' a1 coq_Pol *
let coq_P0 cO =
Pc cO
* coq_P1 : ' a1 - > ' a1 coq_Pol *
let coq_P1 cI =
Pc cI
* :
( ' a1 - > ' a1 - > bool ) - > '... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/Ring_polynom.ml | ocaml | * val mkX : 'a1 -> 'a1 -> 'a1 coq_Pol *
* val coq_Popp : ('a1 -> 'a1) -> 'a1 coq_Pol -> 'a1 coq_Pol *
* val coq_PsubC :
('a1 -> 'a1 -> 'a1) -> 'a1 coq_Pol -> 'a1 -> 'a1 coq_Pol *
* val coq_PsubI :
('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1) -> ('a1 coq_Pol -> 'a1 coq_Pol -> 'a1
coq_Pol) -> 'a1 coq_Pol -> positive -... | open BinInt
open BinNums
open BinPos
open Datatypes
type 'c coq_Pol =
| Pc of 'c
| Pinj of positive * 'c coq_Pol
| PX of 'c coq_Pol * positive * 'c coq_Pol
* : ' a1 - > ' a1 coq_Pol *
let coq_P0 cO =
Pc cO
* coq_P1 : ' a1 - > ' a1 coq_Pol *
let coq_P1 cI =
Pc cI
* :
( ' a1 - > ' a1 - > bool ) - > '... |
9b5bf1d361898513b7bd0ae9792859c2a94541caa4e14dde75469f76d98e816f | kana/sicp | ex-4.77.scm | Exercise 4.77 . In section 4.4.3 we saw that not and lisp - value can cause
;;; the query language to give ``wrong'' answers if these filtering operations
;;; are applied to frames in which variables are unbound. Devise a way to fix
this shortcoming . One idea is to perform the filtering in a ` ` delayed ''
;;; m... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.77.scm | scheme | the query language to give ``wrong'' answers if these filtering operations
are applied to frames in which variables are unbound. Devise a way to fix
manner by appending to the frame a ``promise'' to filter that is fulfilled
only when enough variables have been bound to make the operation possible.
We could wait to... | Exercise 4.77 . In section 4.4.3 we saw that not and lisp - value can cause
this shortcoming . One idea is to perform the filtering in a ` ` delayed ''
|
2cedb669729649a7f175392201fd294a669cda3bb16a830f4f1f6f9b3654f8f9 | pepeiborra/schemas | Schemas.hs | # LANGUAGE PatternSynonyms #
-- | As a simple example of a schema, let's consider a simple record type:
--
-- @
import Schemas
import Schemas . SOP
--
-- data Person = Person
-- { name :: String
-- , age :: Int
-- , addresses :: [String]
-- }
--
-- personSchema :: TypedSchema Person
-- ... | null | https://raw.githubusercontent.com/pepeiborra/schemas/b8e6cf3cf5866384b85b19058c5673fe8fc4d4a5/src/Schemas.hs | haskell | | As a simple example of a schema, let's consider a simple record type:
@
data Person = Person
{ name :: String
, age :: Int
, addresses :: [String]
}
personSchema :: TypedSchema Person
personSchema = record $ Person
\<$\> fieldWith string "name" name
@
Or, by relying on the... | # LANGUAGE PatternSynonyms #
import Schemas
import Schemas . SOP
\<*\ > fieldWith int " age " age
\<*\ > fieldWith ( list string ) " addresses " addresses
\<*\ > field " age " age
\<*\ > field " addresses " addresses
Or , if the type is SOP generic :
module Schemas
(
TypedSche... |
6e2a39f9514e78638c1d5f38796043f4c1b3322691e0bd8120cddfc475ef63e7 | softlab-ntua/bencherl | class_TraceEmitter.erl | Copyright ( C ) 2003 - 2014
%
This file is part of the Ceylan Erlang library .
%
% This library is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License or
the GNU General Public License , as they are published by the Free Software
Foundation , eith... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/traces/src/class_TraceEmitter.erl | erlang |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License or
any later version.
You can also redistribute it and/or modify it under the terms of the
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; w... | Copyright ( C ) 2003 - 2014
This file is part of the Ceylan Erlang library .
the GNU General Public License , as they are published by the Free Software
Foundation , either version 3 of these Licenses , or ( at your option )
Mozilla Public License , version 1.1 or later .
GNU Lesser General Public License... |
261e27786a9ddec4becfcb34f650bb42f027e4904379cfb6dbb0da746323dc10 | bufferswap/ViralityEngine | example-selector.lisp | (in-package #:virality-examples)
(v:define-component example-selector ()
((%selector-prefabs :accessor selector-prefabs
:initarg :selector-prefabs
:initform nil)
(%selector-camera :reader selector-camera
:initarg :selector-camera
... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/examples/src/example-selector.lisp | lisp | or :playing-example
a list.
TODO: This is an idiom that really requires a whole protocol function
(or "something" assigned to THIS prefab that we can execute) to be run
after the entire prefab is set up correctly. It cannot be done in
on-component-initialize because that is defined to happen before any
attachmen... | (in-package #:virality-examples)
(v:define-component example-selector ()
((%selector-prefabs :accessor selector-prefabs
:initarg :selector-prefabs
:initform nil)
(%selector-camera :reader selector-camera
:initarg :selector-camera
... |
14cbd3261681d2eabc28a123033573b21a7366738446bf88c4867fd601a391b7 | OCamlPro/alt-ergo | typed.mli | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/55dd588a42ed89c3268fe290a405cb48a04864c4/src/lib/structures/typed.mli | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
694f0b171059e57914fd93dcc48972144f507ba905e5c83a22deb5d4e2ef9899 | patrikja/autosar | Stateful.hs | # LANGUAGE GeneralizedNewtypeDeriving #
import Test.QuickCheck hiding (Prop, exhaustive)
import System.Random hiding (next)
import Control.Monad
import Data.List
import Prelude hiding (until)
-- Input to the warning system.
data Input = Input {
driver :: Bool, -- Driver belted
passenger :: Bool, -- Pas... | null | https://raw.githubusercontent.com/patrikja/autosar/2b8d3a22eb99812dca645a1c3c18ce18fbf6d539/oldARSim/examples/Stateful.hs | haskell | Input to the warning system.
Driver belted
Passenger belted
The state of the warning system.
Was the alarm going off previously?
Run the warning system on a sequence of inputs.
Random generation.
A little LTL-ish property language.
Prop a b: properties over traces of input->output pairs
where the inp... | # LANGUAGE GeneralizedNewtypeDeriving #
import Test.QuickCheck hiding (Prop, exhaustive)
import System.Random hiding (next)
import Control.Monad
import Data.List
import Prelude hiding (until)
data Input = Input {
speed :: Speed
} deriving Show
data State = State {
}
warning :: Input -> State -> (B... |
a73b1a24ee41b995ccd93a9efa5d69b83e2a0d7859f7bdd939968b502f12e00c | manu291/dypgen | parse_tree.ml | type tree = Int of int | Plus of (tree * tree) | Times of (tree * tree)
let print_tree t =
let rec aux t = match t with
| Int x -> print_int x
| Plus (t1,t2) -> (
print_string "(";
aux t1;
print_string "+";
aux t2;
print_string ")")
| Times (t1,t2) -> (
pri... | null | https://raw.githubusercontent.com/manu291/dypgen/59d11b4c70b8d0971348ca6913839ff1fb4f9b5f/demos/merge_times_plus/parse_tree.ml | ocaml | type tree = Int of int | Plus of (tree * tree) | Times of (tree * tree)
let print_tree t =
let rec aux t = match t with
| Int x -> print_int x
| Plus (t1,t2) -> (
print_string "(";
aux t1;
print_string "+";
aux t2;
print_string ")")
| Times (t1,t2) -> (
pri... | |
b93f0a3438df8126ba9912fdbf7242e70e18a5d08b35376b0c2428efe888d1dd | ghc/packages-Cabal | TempTestDir.hs | # LANGUAGE CPP #
module UnitTests.TempTestDir (
withTestDir, removeDirectoryRecursiveHack
) where
import Distribution.Verbosity
import Distribution.Compat.Internal.TempFile (createTempDirectory)
import Distribution.Simple.Utils (warn)
import Control.Monad (when)
import Control.Exception (bracket, try, throwIO)... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/tests/UnitTests/TempTestDir.hs | haskell | | Much like 'withTemporaryDirectory' but with a number of hacks to make
sure on windows that we can clean up the directory at the end.
| On Windows, file locks held by programs we run (in this case VCSs)
are not always released prior to completing process termination!
<-us/library/windows/desktop/aa365202.aspx>
... | # LANGUAGE CPP #
module UnitTests.TempTestDir (
withTestDir, removeDirectoryRecursiveHack
) where
import Distribution.Verbosity
import Distribution.Compat.Internal.TempFile (createTempDirectory)
import Distribution.Simple.Utils (warn)
import Control.Monad (when)
import Control.Exception (bracket, try, throwIO)... |
b1ab12c22e8a81f87d34aa6c6597c98281a95b7ef3f84242f76d6012e6861356 | codinuum/cca | xlist.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/util/xlist.ml | ocaml | xlist.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in wri... |
bbaf37122ca3393c45e3476d40f168b19365031458d1303fbc77aee60cc9b672 | NorfairKing/declops | ResourceNameSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Declops.Provider.ResourceNameSpec (spec) where
import Data.GenValidity.Aeson ()
import Data.GenValidity.Path ()
import Data.GenValidity.Text ()
import Declops.Provider.Gen ()
import Declops.Provider.ResourceName
i... | null | https://raw.githubusercontent.com/NorfairKing/declops/0407dddea9ed46d75686f986f1b84d44bac4543d/declops-provider-gen/test/Declops/Provider/ResourceNameSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Declops.Provider.ResourceNameSpec (spec) where
import Data.GenValidity.Aeson ()
import Data.GenValidity.Path ()
import Data.GenValidity.Text ()
import Declops.Provider.Gen ()
import Declops.Provider.ResourceName
import Test.Syd
import Test.Syd.Vali... |
c9abee2f5ffd8adb75d2207583a64c919b9336b6e4ea4a7e9b86d159516b2552 | victornicolet/parsynt | LoopsHelper.ml | *
This file is part of Parsynt .
Author : < >
Parsynt 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 vers... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/cilfront/LoopsHelper.ml | ocaml | * Is the read-write set empty
* Extracting the termination condition of the loop
stm list -> stm list
stm -> exp option * instr list
* Get the initiatlization, termination and update in a
*
Identify the termination condition and remove the break
statement associated to it.
* Remov... | *
This file is part of Parsynt .
Author : < >
Parsynt 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 vers... |
9868ecf458a7152201c4a9d3381b7a7dcde8c366bf4703f31d868db1893eca9f | hercules-ci/hercules-ci-agent | ClusterJoinToken.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Agents.ClusterJoinToken where
import Hercules.API.Accounts.Account (Account)
import Hercules.API.Prelude
data ClusterJoinToken = ClusterJoinToken
{ id :: Id ClusterJoinToken,
ownerId :: Id Account,
creationTime :: UTCTime,
-- TODO lastAccessTime :: Ma... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-api/src/Hercules/API/Agents/ClusterJoinToken.hs | haskell | # LANGUAGE DeriveAnyClass #
TODO lastAccessTime :: Maybe UTCTime |
module Hercules.API.Agents.ClusterJoinToken where
import Hercules.API.Accounts.Account (Account)
import Hercules.API.Prelude
data ClusterJoinToken = ClusterJoinToken
{ id :: Id ClusterJoinToken,
ownerId :: Id Account,
creationTime :: UTCTime,
description :: Text
}
deriving (Generic, Show, Eq, NFDat... |
56a14b17eac0a27581eee4c68143a0708630f9238672564aa6dde8979b1c260f | dwayne/eopl3 | array.rkt | #lang eopl
;; N.B. No bounds checking.
(require "./store.rkt")
(provide
newarray
arrayref
arrayset
array?)
(define (array? v)
(reference? v))
;; newarray : Int x ExpVal -> Array
(define (newarray size default)
(define (allocate n)
(if (zero? n)
#t
(begin
(newref default)
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/MUTABLE-PAIRS-4.29/array.rkt | racket | N.B. No bounds checking.
newarray : Int x ExpVal -> Array
arrayset : Array -> Int -> ExpVal -> Unspecified | #lang eopl
(require "./store.rkt")
(provide
newarray
arrayref
arrayset
array?)
(define (array? v)
(reference? v))
(define (newarray size default)
(define (allocate n)
(if (zero? n)
#t
(begin
(newref default)
(allocate (- n 1)))))
(if (> size 0)
(let ([ref (... |
28dafab5dbf4753a4fc7c016891d061d7c2ed5d81312840d3de1c449fa720a23 | synduce/Synduce | max.ml |
let xi_0 x1 = x1
let xi_1 x2 x3 = x3
let rec target =
function Leaf(a) -> xi_0 a | Node(a, l, r) -> xi_1 a (target r)
| null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/extras/solutions/constraints/bst/from_list/max.ml | ocaml |
let xi_0 x1 = x1
let xi_1 x2 x3 = x3
let rec target =
function Leaf(a) -> xi_0 a | Node(a, l, r) -> xi_1 a (target r)
| |
d8c326e25e63b2a8678d2b40e2a4cff286a0535f55cf54a4bb35158a04420fa8 | cryptosense/ppx_enum | test_enum.ml | module S : sig
type t =
| Foo
| Bar
[@@deriving str_enum]
type simple_enum =
| Foo
| Bar
[@@deriving str_enum]
type enum_with_custom_value =
| Foo
| Bar
| Baz
[@@deriving str_enum]
end = struct
type t =
| Foo
| Bar
[@@deriving str_enum]
type simple_enum =
| F... | null | https://raw.githubusercontent.com/cryptosense/ppx_enum/3309987d638f3667e89e5aaf833177e0efb373af/test/deriver/test_enum.ml | ocaml | module S : sig
type t =
| Foo
| Bar
[@@deriving str_enum]
type simple_enum =
| Foo
| Bar
[@@deriving str_enum]
type enum_with_custom_value =
| Foo
| Bar
| Baz
[@@deriving str_enum]
end = struct
type t =
| Foo
| Bar
[@@deriving str_enum]
type simple_enum =
| F... | |
e571156f6c53dbc0f0322215bec44ae526fa4eb3a3b01780d9a733409f1e545b | haskus/haskus-system | Immediate.hs | # LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
-- - Immediate operand
module Haskus.Arch.Common.Immediate
( Imm (..)
, ImmFam... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/Arch/Common/Immediate.hs | haskell | - Immediate operand
| Immediate value
^ Size of the immediate
^ Sign-extended to the given size
^ Value of the immediate
^ Type of the immediate
| Immediate family
^ Size of the immediate
^ Sign-extended to the given size
^ Value of the immediate
^ Type of the immediate
| Predicated immediate family
| Term... | # LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module Haskus.Arch.Common.Immediate
( Imm (..)
, ImmFam (..)
, ImmFamT
,... |
ec866ae20537af43b09748b9c2d58955bf1b8b274a6a5f2c8a0bbb4ba456ea9d | exercism/racket | armstrong-numbers-test.rkt | #lang racket/base
Tests adapted from
(require "armstrong-numbers.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(run-tests
(test-suite "armstrong-numbers tests"
(test-true "Zero is an Armstrong number"
(armstrong-number? 0))
(test-true "Singl... | null | https://raw.githubusercontent.com/exercism/racket/4110268ed331b1b4dac8888550f05d0dacb1865b/exercises/practice/armstrong-numbers/armstrong-numbers-test.rkt | racket | #lang racket/base
Tests adapted from
(require "armstrong-numbers.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(run-tests
(test-suite "armstrong-numbers tests"
(test-true "Zero is an Armstrong number"
(armstrong-number? 0))
(test-true "Singl... | |
d1180ccb9b80c1c1e66504d9b80f7747670e4e3e35f953cb07f0414c26a41d3c | omcljs/om | project.clj | (defproject org.omcljs/om "1.0.0-beta4"
:description "ClojureScript interface to Facebook's React"
:url ""
:license {:name "Eclipse"
:url "-v10.html"}
:repositories [["clojars" {:sign-releases false}]]
:jvm-opts ^:replace ["-Xms512m" "-Xmx512m" "-server"]
:source-paths ["src/main" "src/devca... | null | https://raw.githubusercontent.com/omcljs/om/3a1fbe9c0e282646fc58550139b491ff9869f96d/project.clj | clojure | examples | (defproject org.omcljs/om "1.0.0-beta4"
:description "ClojureScript interface to Facebook's React"
:url ""
:license {:name "Eclipse"
:url "-v10.html"}
:repositories [["clojars" {:sign-releases false}]]
:jvm-opts ^:replace ["-Xms512m" "-Xmx512m" "-server"]
:source-paths ["src/main" "src/devca... |
083bb4cdfa602a9520d50423fb3f19ab7068f03b7051a60c0bc3576d8cc5ae25 | wardle/pc4 | users.cljs | (ns pc4.ui.users
(:require
[clojure.string :as str]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom :refer [div span li p]]
[com.fulcrologic.fulcro.dom.events :as evt]
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic... | null | https://raw.githubusercontent.com/wardle/pc4/ae6a682fb8301932c4192b53584e489f45578a56/pc4-ms/src/main/pc4/ui/users.cljs | clojure | error | (ns pc4.ui.users
(:require
[clojure.string :as str]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom :refer [div span li p]]
[com.fulcrologic.fulcro.dom.events :as evt]
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic... |
c2a306bb74ef4bd06bc820b9d4a995257c95349d2915ecb82745dc786d0b9f46 | ddssff/refact-global-hse | MoveSpec.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Refactor.MoveSpec
( MoveSpec(MoveSpec)
, applyMoveSpec... | null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/src/Refactor/MoveSpec.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE RankNTypes #
| Specifies where to move each declaration of each module. Given a
departure module key and a declaration, return an arrival module key.
| Print a description of the move spec on the console.
| Build a predicate to pass to 'moveInstDecls'
| Build the argument to... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Refactor.MoveSpec
( MoveSpec(MoveSpec)
, applyMoveSpec
, traceMoveSpec
, moveDeclsByName
, moveInstDec... |
2bf28f1c9c5ca29363e03332bb884c42a8393f397798539ee3229c16101c65fa | loganallen/CmlControl | filesystem.ml | open Unix
open Universal
open Tree
(***************************** Filesystem Module ******************************)
(******************************************************************************)
(******************************* Path Functions *******************************)
returns the option path to the neares... | null | https://raw.githubusercontent.com/loganallen/CmlControl/24bf4616b36672bc12225b9bd93b1ae662733663/modules/filesystem.ml | ocaml | **************************** Filesystem Module *****************************
****************************************************************************
****************************** Path Functions ******************************
returns the absolute path to the nearest cml repository
************************** Fetc... | open Unix
open Universal
open Tree
returns the option path to the nearest .cml directory from the cwd
* ( current working directory ) .
* (current working directory). *)
let cml_path (path : string) : string option =
let rec cml_path_helper i acc =
if i = 0 then
raise (Fatal "Not a Cml repository (... |
036ab9a7f013cca38676e4b499bcd2f2c8ffde9336f400513a0cfda9f56a8e70 | Netflix/mantis-mql | test_properties.clj | ;
Copyright 2022 Netflix , Inc.
;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
distributed unde... | null | https://raw.githubusercontent.com/Netflix/mantis-mql/94600fc687afd380e6a063806a5f0dd0be218f34/mql-jvm/src/test/clojure/io/mantisrx/mql/test_properties.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | Copyright 2022 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns io.mantisrx.mql.test-properties
"The objective of this namespace is to verify correct functionality with
regards to fetching properties in MQL. Many components of the query such
as select (aggregate), whe... |
b0609f32ba9a379d9fc806b0c56e7a2d5a8813e3d9b7409628742f8b65ed1b58 | ocaml-flambda/flambda-backend | simplify_nullary_primitive.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Pier... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/92dbdba868235321a48916b8f1bb3f04ee884d3f/middle_end/flambda2/simplify/simplify_nullary_primitive.ml | ocaml | ************************************************************************
OCaml
Pierre Chambart & Guil... | Copyright 2014 - -2019 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
open! Simplify_import
let simplify_nullary_primitive dacc original_prim (prim : P.nullary_primitive)
dbg ~result_var =
match prim with
| Invalid _result_kind -... |
7385e3b5e74234e6761d37cec817f137722944bd8bdb46847be84446013bfc91 | lemmaandrew/CodingBatHaskell | mixStart.hs | From
Return true if the given string begins with \"mix\ " , except the ' m ' can be anything ,
so \"pix\ " , \"9ix\ " .. all count .
Return true if the given string begins with \"mix\", except the 'm' can be anything,
so \"pix\", \"9ix\" .. all count.
-}
import Test.Hspec ( hspec, describe, it, shouldBe )
m... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Warmup-1/mixStart.hs | haskell | From
Return true if the given string begins with \"mix\ " , except the ' m ' can be anything ,
so \"pix\ " , \"9ix\ " .. all count .
Return true if the given string begins with \"mix\", except the 'm' can be anything,
so \"pix\", \"9ix\" .. all count.
-}
import Test.Hspec ( hspec, describe, it, shouldBe )
m... | |
03c2f1e854e180662b105991c4350a359258fe2c0fc7f1e509abe2df2241a5ea | gafiatulin/codewars | Kprimes.hs | -- k-Primes
--
module Codewars.G964.Kprimes(countKprimes, puzzle) where
factor 1 = []
factor n = let divisors = dropWhile ((/= 0) . mod n) [2 .. ceiling $ sqrt $ fromIntegral n]
in let prime = if null divisors then n else head divisors
in (prime :) $ factor $ div n prime
countKprimes :: Int ->... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Kprimes.hs | haskell | k-Primes
|
module Codewars.G964.Kprimes(countKprimes, puzzle) where
factor 1 = []
factor n = let divisors = dropWhile ((/= 0) . mod n) [2 .. ceiling $ sqrt $ fromIntegral n]
in let prime = if null divisors then n else head divisors
in (prime :) $ factor $ div n prime
countKprimes :: Int -> Int -> Int -> [... |
a9c5b7d8ecfb6b6dcfcee2e20c6e4954819b627e30b2bf3c22eb5fc7ef2cee27 | informatimago/lisp | what-do-you-want.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
;;;;FILE: what-do-you-want.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Collects wishes.
;;;;
< PJ... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/what-do-you-want/what-do-you-want.lisp | lisp | coding : utf-8 -*-
**************************************************************************
FILE: what-do-you-want.lisp
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Collects wishes.
LEGAL
This program is free software: you can redistribute it and/or modify
... | USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2012 - 07 - 11 < PJB > Created .
AGPL3
Copyright 2012 - 2012
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
GNU Affero General Pub... |
ba13e859ffb4911142936bed81552d7bdf627a6b66b89ecb92669c0f7fa8f22f | rtoy/ansi-cl-tests | log.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Feb 11 19:53:33 2004
Contains : Tests of LOG
(in-package :cl-test)
(deftest log.1
(let ((result (log 1)))
(or (eqlt result 0)
(eqlt result 0.0)))
t)
(deftest log.2
(mapcar #'log '(1.0s0 1.0f0 1.0d0 1.0l0))
(0.0s0 0.0f0 0.0d0 0.0l0))
(d... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/log.lsp | lisp | -*- Mode: Lisp -*-
More accuracy tests here
Error tests | Author :
Created : We d Feb 11 19:53:33 2004
Contains : Tests of LOG
(in-package :cl-test)
(deftest log.1
(let ((result (log 1)))
(or (eqlt result 0)
(eqlt result 0.0)))
t)
(deftest log.2
(mapcar #'log '(1.0s0 1.0f0 1.0d0 1.0l0))
(0.0s0 0.0f0 0.0d0 0.0l0))
(deftest log.3
(loop for... |
25a3ab1bfeb448feeb3460903a5df7cf8083d562ec6f471da54ec29a3d655542 | typedbyte/effet | Managed.hs | # LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Effect.Managed
Copyright : ( c ) , 2020
-- License : BSD3 (see the file LICENSE)
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
-- The manage... | null | https://raw.githubusercontent.com/typedbyte/effet/b1e0e2188ae59f0c079b83be6d59f016c5e4baf5/src/Control/Effect/Managed.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Effect.Managed
License : BSD3 (see the file LICENSE)
Maintainer :
Stability : stable
Portability : portable
The managed effect allows a computation to allocate resources which are
guaranteed to be r... | # LANGUAGE TemplateHaskell #
Copyright : ( c ) , 2020
provides a monadic interface for managing one or more long - living
resources in a more readable way than nesting ' IO.bracket'-style
module Control.Effect.Managed
Managed'(..)
, Managed
, manage
, Bracket
, runManaged'
, runManaged
* Ta... |
319205675c39a2c01cfd289debbbe9654c368d6e83e8ca1d10e6495054309f88 | graninas/Andromeda | Translator.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE GADTs #-}
module Andromeda.Language.LogicControl.Translator where
import Control.Lens hiding (getConst)
import Control.Monad.Trans.State as S
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import qualified Data.Map as M
import Data.Maybe
import Andromeda.Types.L... | null | https://raw.githubusercontent.com/graninas/Andromeda/6b56052bca64fc6f55a28f8001dd775a744b95bf/src/Andromeda/Language/LogicControl/Translator.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE TemplateHaskell #
module Andromeda.Language.LogicControl.Translator where
import Control.Lens hiding (getConst)
import Control.Monad.Trans.State as S
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import qualified Data.Map as M
import Data.Maybe
import Andromeda.Types.Language.Scripting as LC... |
52b248c0d73caec2e263a5598b9888b3d4c9737c43bd36669815191197e0eee8 | wdebeaum/step | via.lisp | ;;;;
;;;; W::VIA
;;;;
(define-words :pos W::ADV
:words (
(W::VIA
(SENSES
ont::via is point , ont::along is strip
( ( LF - PARENT ONT::ALONG )
; (TEMPL BINARY-CONSTRAINT-S-TEMPL)
; )
ont::via
;(TEMPL BINARY-CONSTRAINT-S-TEMPL)
(TEMPL BINARY-CONSTRAINT-S-OR-NP-TEMPL
(xp (% W::N... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/via.lisp | lisp |
W::VIA
(TEMPL BINARY-CONSTRAINT-S-TEMPL)
)
(TEMPL BINARY-CONSTRAINT-S-TEMPL) |
(define-words :pos W::ADV
:words (
(W::VIA
(SENSES
ont::via is point , ont::along is strip
( ( LF - PARENT ONT::ALONG )
ont::via
(TEMPL BINARY-CONSTRAINT-S-OR-NP-TEMPL
(xp (% W::NP (W::case (? cas W::obj -)) (w::gerund -) (w::refl -))))
)
((LF-PARENT ONT::BY-MEANS-OF)
(TEM... |
582fc07dc472d341d0ce85a6c849af97dd0e40150b0e85b5fdef64ce1805cee3 | manuel-serrano/bigloo | cptr.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Foreign / cptr.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Foreign/cptr.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The C ptr accessors creations */
*===========================... | * serrano / prgm / project / bigloo / comptime / Foreign / cptr.scm * /
* Author : * /
* Creation : Thu Jun 6 12:23:13 1996 * /
* Last change : We d Mar 30 21:10:55 2011 ( serrano ) * /
* Co... |
4a6b83126644bf73186ca9f454539ab9b6dc56d4e6020bfa8d15a9a8dbe3025d | zotonic/zotonic | z_props.erl | @author < >
2020
%%
%% @doc Query string processing, property lists and property maps for
Zotonic resources .
Copyright 2020
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the Lic... | null | https://raw.githubusercontent.com/zotonic/zotonic/b250a174a9a494e0cbee3a4dbdbb659378e718a3/apps/zotonic_core/src/support/z_props.erl | erlang |
@doc Query string processing, property lists and property maps for
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | @author < >
2020
Zotonic resources .
Copyright 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_props).
-include_lib("../../include/zotonic.hrl").
-export([
from_props/1,
from_list/1... |
3bd8d4c5085c946285470d2b97cce036239c453f57afd778d812d9f9ac127058 | Mikolaj/horde-ad | TestMnistRNNSimple.hs | # LANGUAGE DataKinds , RankNTypes , TypeFamilies #
module TestMnistRNNSimple (testTrees, shortTestForCITrees) where
import Prelude
import Control.Monad (foldM)
import Data.List (foldl', unfoldr)
import qualified Data.Vector.Generic as V
import Numeric.LinearAlgebra (Vector)
import qualif... | null | https://raw.githubusercontent.com/Mikolaj/horde-ad/993ae8b4750a46f2e78b8a94e9eeb5abd9b1d46d/test/common/TestMnistRNNSimple.hs | haskell | * A recurrent net and an autoregressive model for sine, following
-functional-typed-models-2.html
and obtaining matching results
A version written using vectors
dummy vector for compatibility
different random initial paramaters produce a worse result;
matrix implementation faster, because the matrices still fit ... | # LANGUAGE DataKinds , RankNTypes , TypeFamilies #
module TestMnistRNNSimple (testTrees, shortTestForCITrees) where
import Prelude
import Control.Monad (foldM)
import Data.List (foldl', unfoldr)
import qualified Data.Vector.Generic as V
import Numeric.LinearAlgebra (Vector)
import qualif... |
fef7fa47a338fda80cc5bdc8755bb42b9b55c88e8ce7227991cfe10802c53ebf | kseo/systemf | Common.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module Language.LambdaCalculus.Parser.Common
( BoundContext
, LCParser
, infoFrom
, brackets
, braces
, parens
, identifier
, reserved
, reservedOp
, whiteSpace
, arrow
, lambda
, tlambda
, colon
, dot
, star
, equals
, comma
) wh... | null | https://raw.githubusercontent.com/kseo/systemf/ea73fd42567adf2ddcd7bb60f11a66e10eebc154/src/Language/LambdaCalculus/Parser/Common.hs | haskell | # OPTIONS_GHC -fno - warn - missing - signatures #
module Language.LambdaCalculus.Parser.Common
( BoundContext
, LCParser
, infoFrom
, brackets
, braces
, parens
, identifier
, reserved
, reservedOp
, whiteSpace
, arrow
, lambda
, tlambda
, colon
, dot
, star
, equals
, comma
) wh... | |
fcc4e0ecc6b8e1142c086358347aebf7c9c721442a6dddb9fbfe5b1abcb9a24c | ocamllabs/ocaml-modular-implicits | pr5164_ok.ml | module type INCLUDING = sig
include module type of List
include module type of ListLabels
end
module Including_typed: INCLUDING = struct
include List
include ListLabels
end
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/typing-modules-bugs/pr5164_ok.ml | ocaml | module type INCLUDING = sig
include module type of List
include module type of ListLabels
end
module Including_typed: INCLUDING = struct
include List
include ListLabels
end
| |
03de851631441f583a3e422da7d0ea4275daa6c15569bfb26b2443a91b45283c | haskell-repa/repa | Lines.hs |
module Data.Repa.Flow.Generic.IO.Lines
( sourceLinesFormat
, sourceLinesFormatFromLazyByteString)
where
import Data.Repa.Flow.Generic.IO.Base as F
import Data.Repa.Flow.Generic.Map as F
import Data.Repa.Flow.Generic.Base as F
import Data.Repa.Array.Generic ... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-flow/Data/Repa/Flow/Generic/IO/Lines.hs | haskell | | Read lines from a named text file,
in a chunk-wise manner,
converting each line to values with the given format.
^ Chunk length.
^ Action if we find a line longer than the chunk length.
^ Action if we can't convert a row.
^ Format of each line.
Rows are separated by new lines.
Stream chunks of data from ... |
module Data.Repa.Flow.Generic.IO.Lines
( sourceLinesFormat
, sourceLinesFormatFromLazyByteString)
where
import Data.Repa.Flow.Generic.IO.Base as F
import Data.Repa.Flow.Generic.Map as F
import Data.Repa.Flow.Generic.Base as F
import Data.Repa.Array.Generic ... |
3370dbae6a01c64d551c5202038efce92eb5a23781cc88a6937d235c6b7be9d6 | PatrickMaier/HdpH | Conf.hs | -- HpdH runtime configuration parameters
--
Author :
-----------------------------------------------------------------------------
module Control.Parallel.HdpH.Conf
* runtime system configuration parameters
RTSConf(..),
defaultRTSConf, -- :: RTSConf
* reading and updating HdpH RTS config paramet... | null | https://raw.githubusercontent.com/PatrickMaier/HdpH/e836a5bcf5a6c93239f9c0d0109d7b81b459897f/hdph/src/Control/Parallel/HdpH/Conf.hs | haskell | HpdH runtime configuration parameters
---------------------------------------------------------------------------
:: RTSConf
:: String -> RTSConf -> IO (Either String RTSConf)
:: [String] -> RTSConf
-> IO (Either String (RTSConf, [String]))
:: [String] -> RTSConf
-> IO (Either String (RTSConf, [String]))
------... | Author :
module Control.Parallel.HdpH.Conf
* runtime system configuration parameters
RTSConf(..),
* reading and updating HdpH RTS config parameters
) where
import Prelude
import Control.Monad (foldM)
import Data.Char (isDigit, isSpace)
import Data.Functor ((<$>))
import Data.List (intercalate, stripPr... |
d69fcd20db60bfef8f2e842d5814c278424b49c6431375d2d431aed1cb502a5d | xapi-project/xen-api | make.ml |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/message-switch/core/make.ml | ocaml | Response.write (fun _ _ -> return ()) response Lwt_io.stderr >>= fun () ->
we expect the event thread to reconnect for us
XXX: we don't respect the timeout value here
configuration error |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... |
ac5b6d34f994c7ab0a9e663ad4ce9a9709f2778eef3efe0b20be24d79b5b485c | ucsd-progsys/nate | condition.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , INRI... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/threads/condition.ml | ocaml | *********************************************************************
Objective Caml
... | and , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : condition.ml , v 1.8 2001/12/07 13:40:21 xl... |
bdeccde02f6d48316c4785c381515f3d90ab621599a42e32ec6b09cebe92de90 | yesodweb/yesod | Cache.hs | # LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell , MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE Rank2Types #-}
module YesodCoreTest.Cache
( cacheTest
, Widget
, resourcesC
) where
import Test.Hspec
import Network.Wai
import Network.Wai.T... | null | https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/test/YesodCoreTest/Cache.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types # | # LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell , MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
module YesodCoreTest.Cache
( cacheTest
, Widget
, resourcesC
) where
import Test.Hspec
import Network.Wai
import Network.Wai.Test
import Yesod.Core
import UnliftIO.IORef
import Data.Typeab... |
44815a49945582993940b7dd4c5f2bc065f1e09be91d808d4bf322089d84053c | softlab-ntua/bencherl | config.erl | 2007 - 2012 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/src/config.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2012 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Config file parser for scalaris .
@version $ I d : config.erl 2904 2012 - 03 - 19 16:52:28Z $
-module(... |
8c952914552eded7d6dd4218070f0b6f91efa760472916ea50ca53922ec240ed | TyOverby/mono | link.ml | { { { Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE A... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-cohttp/cohttp/src/link.ml | ocaml | From <>
TODO: this could be replaced with empty t/arc fupdate
TODO: this isn't quite right... | { { { Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE A... |
ce7a650299c211c0d5856c2759a6303d74be23389bb7b6066ff4bfefee2c4c84 | CloudI/CloudI | exometer_influxdb_subscribe_mod.erl | -module(exometer_influxdb_subscribe_mod).
-compile([export_all]).
subscribe([metric, test], histogram) ->
Extra = [{tags, [{type, {from_name, 2}}]}],
[{[metric, test], min, 1000, Extra},
{[metric, test], max, 1000, Extra},
{[metric, test], median, 1000, Extra}];
subscribe([metric, test1], histogram) ... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_exometer_influxdb/test/exometer_influxdb_subscribe_mod.erl | erlang | -module(exometer_influxdb_subscribe_mod).
-compile([export_all]).
subscribe([metric, test], histogram) ->
Extra = [{tags, [{type, {from_name, 2}}]}],
[{[metric, test], min, 1000, Extra},
{[metric, test], max, 1000, Extra},
{[metric, test], median, 1000, Extra}];
subscribe([metric, test1], histogram) ... | |
70e82af952ba78d3b7e87dbedd0f93f611bb85410e21d78ff4fa86a871232788 | fredrikt/yxa | presence_pidf.erl | %%%-------------------------------------------------------------------
%%% File : presence_pidf.erl
@author < >
%%% @doc Presence PIDF document store. Input and output for this
%%% module is always XML PIDF documents.
%%% PIDF is Presence Information Data Format, described in
%%% ... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/event/presence_pidf.erl | erlang | -------------------------------------------------------------------
File : presence_pidf.erl
@doc Presence PIDF document store. Input and output for this
module is always XML PIDF documents.
PIDF is Presence Information Data Format, described in
RFC3863.
@end
---------------... | @author < >
@since 30 Apr 2006 by < >
-module(presence_pidf).
-export([init/0,
set_pidf_for_user/6,
update_pidf_for_user/7,
refresh_pidf_user_etag/4,
get_pidf_xml_for_user/2,
get_pidfs_for_user/1,
check_if_user_etag_exists/2,
get_supported_content_types/0,
get_supported_content_type... |
7a4c757c12984772790ace398023c07063ad7ad0367398d423acdc9b67629b0f | mput/sicp-solutions | 2_73.rkt | #lang racket
Solution for exercise 2_73 .
(require (only-in "../solutions/dispatch-table.rkt" put get))
(require (only-in "../solutions/2_56.rkt" =number? variable? same-variable?))
(provide deriv)
(define (deriv exp var)
(cond ((number? exp) 0)
((variable? exp) (if (same-variable? exp var) 1 0))
... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_73.rkt | racket | Add to dispatch table.
Add to dispatch table. | #lang racket
Solution for exercise 2_73 .
(require (only-in "../solutions/dispatch-table.rkt" put get))
(require (only-in "../solutions/2_56.rkt" =number? variable? same-variable?))
(provide deriv)
(define (deriv exp var)
(cond ((number? exp) 0)
((variable? exp) (if (same-variable? exp var) 1 0))
... |
c583918909b4d016c9cef4f06913c726f99d747e2b295250eba1683b85b661d0 | c-cube/stimsym | Parse_loc.ml |
(* This file is free software. See file "license" for more details. *)
(** {1 Location in a file} *)
type t = {
file : string;
start_line : int;
start_column : int;
stop_line : int;
stop_column : int;
}
let mk file start_line start_column stop_line stop_column =
{ file; start_line; start_column; stop_li... | null | https://raw.githubusercontent.com/c-cube/stimsym/38c744b5f770b52980abbfe7636a0dc2b91bbeb7/src/core/Parse_loc.ml | ocaml | This file is free software. See file "license" for more details.
* {1 Location in a file} |
type t = {
file : string;
start_line : int;
start_column : int;
stop_line : int;
stop_column : int;
}
let mk file start_line start_column stop_line stop_column =
{ file; start_line; start_column; stop_line; stop_column; }
let mk_pair file (a,b)(c,d) = mk file a b c d
let mk_pos start stop =
let open... |
eca47aff14e4617006d24142d7add5f8b6d3aebc682d77e7a6533916321e867a | Deducteam/zenon_modulo | smtlib_util.mli | type extradata = unit
val initial_data : unit -> unit
val file : string ref
val line : int ref
type pos = int
val string_of_pos : int -> string
val cur_pd : unit -> int * unit
type pd = pos * extradata
| null | https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/smtlib_util.mli | ocaml | type extradata = unit
val initial_data : unit -> unit
val file : string ref
val line : int ref
type pos = int
val string_of_pos : int -> string
val cur_pd : unit -> int * unit
type pd = pos * extradata
| |
1115efb7b5b69e95db98a6179973783ff6cfb33e24d91632688718a5993cf6ef | bytekid/mkbtt | nodeSet.ml | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/nodeSet.ml | ocaml | ** OPENS **************************************************************
** SUBMODULES *********************************************************
** FUNCTIONS **********************************************************
**** Projections ****
**** Create pre-oriented nodes from TRS ****
**** Create initial nodes from equati... | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
c8e2488f6c7c3623dfb4469349187bdd86ad0969d0b549807a64fe8d37684365 | mzp/coq-for-ipad | trace.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/toplevel/trace.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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 .
$ I d : trace.mli 9547 2010 - 01 - 22... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.