_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 |
|---|---|---|---|---|---|---|---|---|
c1fc92eaea151a14ecd3988476edf872b8e4b92b35afecd6ceac691223f9bec8 | 40ants/cl-hamcrest | matchers.lisp | (uiop:define-package #:hamcrest/matchers
(:use #:cl
#:iterate)
(:import-from #:alexandria
#:with-gensyms)
(:import-from #:hamcrest/utils
#:indent
#:alistp
#:shift-rest-lines)
(:export #:has-all
#:has-alist-entries
#:ha... | null | https://raw.githubusercontent.com/40ants/cl-hamcrest/9abb4978271907e11c21411ba350b0d6d7d9cb12/src/matchers.lisp | lisp | save current matcher's context for futher usage
write context lines
and reason
and also, it ignores it's documentation.
this is additional
shift for key values
TODO: тут я хотел добавить сохранение matcher-forms
we go through each key/value pair
from expected entries
if expected-value is callable, then it is ... | (uiop:define-package #:hamcrest/matchers
(:use #:cl
#:iterate)
(:import-from #:alexandria
#:with-gensyms)
(:import-from #:hamcrest/utils
#:indent
#:alistp
#:shift-rest-lines)
(:export #:has-all
#:has-alist-entries
#:ha... |
e8c44a4d93c13d6655a677cc283cef6892e874abf10fc0e0e7be688ffa80bbdd | Clojure2D/clojure2d-examples | figure_I_5_noise1dgraph.clj | (ns example.NOC.introduction.figure-I-5-noise1dgraph
(:require [clojure2d.core :refer :all]
[fastmath.random :as r]
[fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn draw
"Dr... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/introduction/figure_I_5_noise1dgraph.clj | clojure | (ns example.NOC.introduction.figure-I-5-noise1dgraph
(:require [clojure2d.core :refer :all]
[fastmath.random :as r]
[fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn draw
"Dr... | |
5e3c076f122d4a6b7a49e00d1c0f336f94a1f7f91b7425ee44013395cd797641 | emqx/emqx | emqx_ee_connector_influxdb_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%--------------------------------------------------------------------
-module(emqx_ee_connector_influxdb_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-include... | null | https://raw.githubusercontent.com/emqx/emqx/291755f81f2a3ac939990fe127b4a2b4ee6b5563/lib-ee/emqx_ee_connector/test/emqx_ee_connector_influxdb_SUITE.erl | erlang | --------------------------------------------------------------------
--------------------------------------------------------------------
%%------------------------------------------------------------------------------
%% Testcases
%%------------------------------------------------------------------------------
We ... | Copyright ( c ) 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
-module(emqx_ee_connector_influxdb_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-include("emqx_connector.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-define(INFLUXDB_RESOURCE_MOD, e... |
36b3b6df8fba8d087655cd0932a31566b2e04a5028c675b4854a284725d213d0 | erlang/otp | logger_olp.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2017 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/b0afc29474f9625aa0b466b6672e0bbcefd07535/lib/kernel/src/logger_olp.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 - 2023 . 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(logger_olp).
-behaviour(gen_server).
-include("logger_olp.hrl").
-include("logger_internal.hrl").
-export([... |
25259a2845b7132a6b4ae9f45b1577940b351cb074e9c876e37f2e7c97e4cb8a | riemann/riemann-jvm-profiler | stack.clj | (ns riemann.jvm-profiler.stack
(:require [clj-radix :as radix]
[interval-metrics.core :as metrics]
[interval-metrics.measure :as measure]
[clojure.string :as str]
[clojure.core.reducers :as r]
[clojure.tools.logging :refer :all])
(:import
[java.lang.re... | null | https://raw.githubusercontent.com/riemann/riemann-jvm-profiler/71090ac0471b54a9168396e2baa70622a6387612/src/riemann/jvm_profiler/stack.clj | clojure | the estimated | (ns riemann.jvm-profiler.stack
(:require [clj-radix :as radix]
[interval-metrics.core :as metrics]
[interval-metrics.measure :as measure]
[clojure.string :as str]
[clojure.core.reducers :as r]
[clojure.tools.logging :refer :all])
(:import
[java.lang.re... |
6a2a3e1a4734361dd859bcf24cfba19b0db4f5cee3252350ad55d5a4af4979e5 | yzhs/ocamlllvm | emit_common.mli | open Reg
(* Add the name of a global variable to the list of global variables. *)
val add_const : string -> unit
(* Add a function declaration. *)
val add_function : (llvm_type * string * string * ('a list)) -> unit
(* Functions used in the current module (can be omitted when printing function
* decarations). *)
val... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/emit_common.mli | ocaml | Add the name of a global variable to the list of global variables.
Add a function declaration.
Functions used in the current module (can be omitted when printing function
* decarations).
Print the header
Emit the function and variable declarations
The name of the internal calling convention.
Emit LLVM IR ... | open Reg
val add_const : string -> unit
val add_function : (llvm_type * string * string * ('a list)) -> unit
val local_functions : (string * llvm_type list) list ref
val begin_assembly : unit -> unit
val end_assembly : unit -> unit
val calling_conv : string
val fundecl : Linearize.fundecl -> unit
|
6781d28f0270dc38058c46fcf666b068d887263e148c96440497a25502e4cf44 | ekmett/category-extras | Context.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Comonad.Context
Copyright : ( C ) 2008
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : ... | null | https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Comonad/Context.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
---------------------------------------------------------------------------
|
Module : Control.Comonad.Context
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable (MPTCs)
a comonad along itself, except the type of the conte... | Copyright : ( C ) 2008
Maintainer : < >
The Context Comonad Transformer is related to the left Kan Extension ' Lan ' of
module Control.Comonad.Context
( module Control.Comonad
, ComonadContext(..)
, putC
, experiment
, Context(..)
, runContext
, ContextT(..)
) where
import Control.Functor... |
1cafd6bf6b2e1da06aa1cac01f0f72a56ce02cdfe935279351f357f7c0433855 | Bogdanp/racket-binfmt | common.rkt | #lang racket/base
(provide ref)
(define ref (compose1 cdr assq))
| null | https://raw.githubusercontent.com/Bogdanp/racket-binfmt/afd7332833e59f8ed3c33740924b48849a616fc0/binfmt-test/binfmt/common.rkt | racket | #lang racket/base
(provide ref)
(define ref (compose1 cdr assq))
| |
64df3d4645311a12d5a435cb7e5ab9323b8cb219fbbae0422526b7978e716516 | mwand/eopl3 | static-data-structures.scm | (module static-data-structures (lib "eopl.ss" "eopl")
(require "lang.scm") ; for expression?, type?, etc.
(provide (all-defined-out)) ; too many things to list
(define-datatype type-environment type-environment?
(empty-tenv)
(extend-tenv
(bvar symbol?)
(bval ... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter8/simplemodules/static-data-structures.scm | scheme | for expression?, type?, etc.
too many things to list
procedures for looking things up tenvs ;;;;;;;;;;;;;;;;
lookup or die
variable-name->maybe-binding-in-tenv : Tenv * Sym -> Maybe(Type)
module-name->maybe-binding-in-tenv : Tenv * Sym -> Maybe(Iface)
assumes tenv is non-empty. | (module static-data-structures (lib "eopl.ss" "eopl")
(define-datatype type-environment type-environment?
(empty-tenv)
(extend-tenv
(bvar symbol?)
(bval type?)
(saved-tenv type-environment?))
(extend-tenv-with-module
(name symbol?)
(interface interface?)
(saved-tenv... |
a4f81fb2522e2ce5722cf3e71dd0b5b73537832c3e4e3e4426602794a4544dac | Relph1119/sicp-solutions-manual | p1-10-ackermann.scm | (define (A x y)
(cond ((= y 0) 0)
((= x 0) (* 2 y))
((= y 1) 2)
(else (A (- x 1)
(A x (- y 1)))))) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-10-ackermann.scm | scheme | (define (A x y)
(cond ((= y 0) 0)
((= x 0) (* 2 y))
((= y 1) 2)
(else (A (- x 1)
(A x (- y 1)))))) | |
a7b6473a8d8392eb6dbad5b2fcdace48c0105abb921e125e1a9d317bcdaf067e | iu-parfunc/lvars | LVishAndIVar.hs | # LANGUAGE TemplateHaskell , CPP , ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeFamilies #
| Core tests for the LVish scheduler and basic futures / IVars .
module LVishAndIVar(tests,run... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/tests/LVishAndIVar.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE BangPatterns #
------------------------------------------------------------------------------
SADLY, this use of template-Haskell, together with the atomic-primops dependency,
------------------------------------------------------------------------------
| This stress test does noth... | # LANGUAGE TemplateHaskell , CPP , ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeFamilies #
| Core tests for the LVish scheduler and basic futures / IVars .
module LVishAndIVar(tests,runTests, runParStress, lotsaRunPar) where
import Test.Tasty... |
9d1387560ea156ca14254a568d399c43cbf9dc8731faa2f5380be17c6e184d6e | janestreet/merlin-jst | let.ml |
let def = 6
let def : float = float_of_int def
| null | https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/tests/test-dirs/type-enclosing/let.t/let.ml | ocaml |
let def = 6
let def : float = float_of_int def
| |
d3176b309b1abf7758b23f687096fa68cd46d5c7e708e327294120aced18f9d1 | mochi/statebox | statebox_counter_tests.erl | -module(statebox_counter_tests).
-behaviour(proper_statem).
-export([initial_state/0, command/1,
precondition/2, postcondition/3, next_state/3]).
-export([apply_f_inc_acc/4, add_sibling/0, merge_siblings/1]).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
clock_step() ->
100... | null | https://raw.githubusercontent.com/mochi/statebox/680bccb0a25a2658b70e14a4d21dcefaf663fd6a/test/statebox_counter_tests.erl | erlang | statem
TODO:
Generate a new sibling (add_sibling)
Update existing counter (apply_f_inc_acc)
Merge (up to) N siblings (merge_siblings)
properties
tests
Entropy part of the tuple is 0 here, we don't need it for this test.
We should expect to get unique enough results from our entropy and
timestamp even if th... | -module(statebox_counter_tests).
-behaviour(proper_statem).
-export([initial_state/0, command/1,
precondition/2, postcondition/3, next_state/3]).
-export([apply_f_inc_acc/4, add_sibling/0, merge_siblings/1]).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
clock_step() ->
100... |
8dd25b1de1c45fc7c2a7dce1aff1bf9516bf8ff4c7a085044eac7c4f30da4071 | Unrepl/unrepl | repl.clj | (ns unrepl.repl
(:require [clojure.main :as m]
[unrepl.core :as unrepl]
[unrepl.printer :as p]
[clojure.edn :as edn]
[clojure.java.io :as io]))
(defn classloader
"Creates a classloader that obey standard delegating policy.
Takes two arguments: a parent classloader... | null | https://raw.githubusercontent.com/Unrepl/unrepl/fa946eef88b0516dab81c8a9b3d8f9fcff06f44b/src/unrepl/repl.clj | clojure | do not cascade
atomic always flush
was pr-str, must occur outside of the locking form to avoid deadlocks
was pr-str, must occur outside of the locking form to avoid deadlocks
)) (recur true) | (ns unrepl.repl
(:require [clojure.main :as m]
[unrepl.core :as unrepl]
[unrepl.printer :as p]
[clojure.edn :as edn]
[clojure.java.io :as io]))
(defn classloader
"Creates a classloader that obey standard delegating policy.
Takes two arguments: a parent classloader... |
bf1e4fad64bd47a1c4a9d8bc406ff8c9753156cc69be8735c90e513128ffa65f | xapi-project/xen-api | protocol_async.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/20b0574fa0f60c72b5a8eeafbc84bb485ebb6c22/ocaml/message-switch/async/protocol_async.ml | ocaml |
* 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... | |
1877ffa70643803c9dcfd351b08f5d0b716d5db5700ae51236bcde69082a9f0f | matijapretnar/millet | primitives.ml | type primitive =
| CompareEq
| CompareLt
| CompareGt
| CompareLe
| CompareGe
| CompareNe
| IntegerAdd
| IntegerMul
| IntegerSub
| IntegerDiv
| IntegerMod
| IntegerNeg
| FloatAdd
| FloatMul
| FloatSub
| FloatDiv
| FloatPow
| FloatNeg
| ToString
(* Keep this list up to date with the... | null | https://raw.githubusercontent.com/matijapretnar/millet/d1e76b4529a3c0fa526362402fca95d032497844/src/01-language/primitives.ml | ocaml | Keep this list up to date with the type above, otherwise the missing primitives will not be loaded | type primitive =
| CompareEq
| CompareLt
| CompareGt
| CompareLe
| CompareGe
| CompareNe
| IntegerAdd
| IntegerMul
| IntegerSub
| IntegerDiv
| IntegerMod
| IntegerNeg
| FloatAdd
| FloatMul
| FloatSub
| FloatDiv
| FloatPow
| FloatNeg
| ToString
let primitives =
[
CompareEq;
... |
78aea85ecd73bef6b14da2082398a35837ade411b0e6a86bad9d4a7dccebbafb | mfp/obigstore | obs_storage.mli |
* Copyright ( C ) 2011 - 2013 < >
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version , ... | null | https://raw.githubusercontent.com/mfp/obigstore/1b078eeb21e11c8de986717150c7108a94778095/src/server/obs_storage.mli | ocaml | * Flush transactions waiting for group commit and close the DB. All further
* actions on it will raise an error.
* [use_thread_pool db x] indicates whether blocking operations should be
* performed in a separate thread so as to avoid blocking. By default, all
* operations are performed in the main thread.
* Re... |
* Copyright ( C ) 2011 - 2013 < >
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version , ... |
2b86cc17b6dca452b8fc1c1feff62b2fa66fbf446e0f49a58bce8639f9a5adaf | kelamg/HtDP2e-workthrough | ex185.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex185) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex185.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex185) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect (first (list 1 2 3))
1)
(check-expec... |
e84fbacaa6513a5c6bec84ccfc8cd8babffa15e488926f52e61e83ffe62da1ce | senapk/funcional_arcade | solver.hs | splitints :: Integral a => [a] -> ([a], [a])
splitints u = ([x | x<-u, odd x], [x | x<-u, even x])
separar [ 1,2,3,4,1,2,6,7 ] = = ( [ 1,3,1,7 ] , [ 2,4,2,6 ] )
-- 1 Filter
separar xs = ( filter ( \x - > x ` mod ` 2 = = 1 ) xs , filter even xs )
2 List Comp
-- separar xs = ([x | x <- xs, odd x], [x | x <- xs, ev... | null | https://raw.githubusercontent.com/senapk/funcional_arcade/89625b4559b3e590d88dd70a27b6cbdc07cc2988/base/047/solver.hs | haskell | 1 Filter
separar xs = ([x | x <- xs, odd x], [x | x <- xs, even x])
separar [] = ([], [])
separar (x:xs) = ([x | odd x] ++ impares, [x | even x] ++ pares)
-- 4 Interativo
separar' [] impares pares = (impares, pares)
| odd x = separar' xs (impares ++ [x]) pares
| otherwise = separar' xs impares (pare... | splitints :: Integral a => [a] -> ([a], [a])
splitints u = ([x | x<-u, odd x], [x | x<-u, even x])
separar [ 1,2,3,4,1,2,6,7 ] = = ( [ 1,3,1,7 ] , [ 2,4,2,6 ] )
separar xs = ( filter ( \x - > x ` mod ` 2 = = 1 ) xs , filter even xs )
2 List Comp
3
where ( impares , pares ) = separar xs
separar ' ( x... |
5c7b5ea98fdc3e670c5cb56a179c68a88e5f086b2da13401e83fbedc7ed28394 | janestreet/bonsai | area.ml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
open! Core
open! Import
open Gen_js_api
type t = {
x: int ;
y: int ;
w: int ;
h: int }
let rec t_of_js : Ojs.t -> t =
fun (x2 : Ojs.t) ->
{
x = (Ojs.int_of_js (Ojs.get_prop_ascii x2 "x"));
y = (Ojs.i... | null | https://raw.githubusercontent.com/janestreet/bonsai/c202b961f41e20e0b735c4e33c2bbac57a590941/bindings/dygraph/src/area.ml | ocaml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
open! Core
open! Import
open Gen_js_api
type t = {
x: int ;
y: int ;
w: int ;
h: int }
let rec t_of_js : Ojs.t -> t =
fun (x2 : Ojs.t) ->
{
x = (Ojs.int_of_js (Ojs.get_prop_ascii x2 "x"));
y = (Ojs.i... | |
efbf8000d8eccc2a6629a343810df6db8e50d247f776734f3be76112701966ff | jscrane/jvml | ex1.clj | (ns ml.ex1
(:use (incanter core charts io)
(ml util optim linear)))
(defn- compute-parameters [X y]
(gradient-descent (linear-cost-function X y) [0 0] :alpha 0.01 :max-iter 1500))
(defn init-ex1 []
(let [data (to-matrix (read-dataset "data/ex1data1.txt"))
y (sel data :cols 1)
X (add-inte... | null | https://raw.githubusercontent.com/jscrane/jvml/844eb267150564a3a0f882edbbd505ce94924c8f/src/main/clojure/ml/ex1.clj | clojure | (ns ml.ex1
(:use (incanter core charts io)
(ml util optim linear)))
(defn- compute-parameters [X y]
(gradient-descent (linear-cost-function X y) [0 0] :alpha 0.01 :max-iter 1500))
(defn init-ex1 []
(let [data (to-matrix (read-dataset "data/ex1data1.txt"))
y (sel data :cols 1)
X (add-inte... | |
7eda3830a45190f0b8b778e49acc5750b6ac4b68915d1c84a00b0e5ed1024a24 | ymherklotz/verismith | Quartus.hs | -- |
Module : . Tool . Quartus
-- Description : Quartus synthesiser implementation.
Copyright : ( c ) 2019 ,
-- License : GPL-3
-- Maintainer : yann [at] yannherklotz [dot] com
-- Stability : experimental
-- Portability : POSIX
--
-- Quartus synthesiser implementation.
module Verismith.Tool.Quar... | null | https://raw.githubusercontent.com/ymherklotz/verismith/773acb06f15d49b810b76508505f5df5a84f8172/src/Verismith/Tool/Quartus.hs | haskell | |
Description : Quartus synthesiser implementation.
License : GPL-3
Maintainer : yann [at] yannherklotz [dot] com
Stability : experimental
Portability : POSIX
Quartus synthesiser implementation. | Module : . Tool . Quartus
Copyright : ( c ) 2019 ,
module Verismith.Tool.Quartus
( Quartus (..),
defaultQuartus,
)
where
import Control.DeepSeq (NFData, rnf, rwhnf)
import Data.Text (Text, unpack)
import Shelly
import Shelly.Lifted (liftSh)
import Verismith.Tool.Internal
import Verismith.Tool.... |
c0c14157ee51789a748b2b0b20c2bd216ae1cdcc731abae27cefb2406bc4d828 | fredrikt/yxa | sipsocket_blacklist_probe.erl | %%%-------------------------------------------------------------------
%%% File : sipsocket_blacklist_probe.erl
@author < >
%%% @doc Blacklist probe process. When started, sends an OPTIONS
%%% request to the (currently blacklisted) destination. If
%%% we get a response, the blacklist... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/transportlayer/sipsocket_blacklist_probe.erl | erlang | -------------------------------------------------------------------
File : sipsocket_blacklist_probe.erl
@doc Blacklist probe process. When started, sends an OPTIONS
request to the (currently blacklisted) destination. If
we get a response, the blacklist entry is removed. If we
... | @author < >
@since 23 Feb 2006 by < >
@private
-module(sipsocket_blacklist_probe).
-behaviour(gen_server).
-export([start/4
]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3
]).
-include("siprecords.hrl").
-include("sipsocket.hrl").
Record... |
d2ba4db188e9a182c1e2541763b317a2b305265b23e20a98878a89c033a3d320 | c-cube/ocaml-containers | check_labelled_mods.ml | module A = struct
(* test consistency of interfaces *)
module FA = CCArray.Floatarray
module type L = module type of CCArray with module Floatarray := FA
module type LL = module type of CCArrayLabels with module Floatarray := FA
let () = ignore (module CCArrayLabels : L)
let () = ignore (module CCArray : ... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/tests/check_labelled_mods.ml | ocaml | test consistency of interfaces
test consistency of interfaces
test consistency of interfaces | module A = struct
module FA = CCArray.Floatarray
module type L = module type of CCArray with module Floatarray := FA
module type LL = module type of CCArrayLabels with module Floatarray := FA
let () = ignore (module CCArrayLabels : L)
let () = ignore (module CCArray : LL)
end
module S = struct
module typ... |
156225ae0b600f03e189a8d622544c9097af3ca82605d01ad71295d57c5f1a44 | haskell/haskell-language-server | Parser.hs | {-# LANGUAGE CPP #-}
# LANGUAGE PatternSynonyms #
{-# HLINT ignore "Unused LANGUAGE pragma" #-}
-- | Parser compatibility module.
module Development.IDE.GHC.Compat.Parser (
initParserOpts,
initParserState,
#if MIN_VERSION_ghc(9,0,0) && !MIN_VERSION_ghc(9,2,0)
in GHC = = 9.2 the type does n't exis... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/5d56aa70a84807d7659e72eacd4d91fee08dbdbb/ghcide/src/Development/IDE/GHC/Compat/Parser.hs | haskell | # LANGUAGE CPP #
# HLINT ignore "Unused LANGUAGE pragma" #
| Parser compatibility module.
Export data-type here, otherwise only the simple type.
* API Annotations
annotations are found in the ast.
# COMPLETE ParsedModule :: GHC.ParsedModule # | # LANGUAGE PatternSynonyms #
module Development.IDE.GHC.Compat.Parser (
initParserOpts,
initParserState,
#if MIN_VERSION_ghc(9,0,0) && !MIN_VERSION_ghc(9,2,0)
in GHC = = 9.2 the type does n't exist
In GHC = = 9.0 it is a data - type
and GHC < 9.0 it is type - def
Anno.ApiAnns(..),
#else
ApiAnns,
... |
63c40939fa9c0787ac08ba569005260d14b28533cfc8649d827452b13e5d2cf2 | lexi-lambda/hackett | github-issue-36.rkt | #lang hackett
(require hackett/private/test)
(test {(show (Tuple 1 "str")) ==! "(Tuple 1 \"str\")"})
| null | https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-test/tests/hackett/regression/github-issue-36.rkt | racket | #lang hackett
(require hackett/private/test)
(test {(show (Tuple 1 "str")) ==! "(Tuple 1 \"str\")"})
| |
811f5b5a70a226a782ecc3bf6b38e8e5a7919c695168b983d9e537b328068287 | hubski/hubski | serve-internal-api.rkt | #lang web-server
(require web-server/dispatch)
(require web-server/servlet-env)
(require db)
(require json)
(require "db.rkt")
(require "publications.rkt")
(require "db-publication.rkt")
; \todo make command line arg
(define port 8003)
; creates an OK HTTP response, of text, from the given string.
(define (make-respo... | null | https://raw.githubusercontent.com/hubski/hubski/97ddebb02ff404edcf8db6e1a7889cfdf43b367a/serve-internal-api.rkt | racket | \todo make command line arg
creates an OK HTTP response, of text, from the given string.
(write (string-append "serving on " (number->string port)))
listen for external connections
don't open a web browser on start
#:servlet-path "/" | #lang web-server
(require web-server/dispatch)
(require web-server/servlet-env)
(require db)
(require json)
(require "db.rkt")
(require "publications.rkt")
(require "db-publication.rkt")
(define port 8003)
(define (make-response-string str)
(response
200 #"OK"
(current-seconds) TEXT/HTML-MIME-TYPE
empty
... |
2bd4879afa65d287a4a4f3b76de36b83b188316f660bdab82ad93efc2d7bf72a | walmartlabs/lacinia | summarize_query_tests.clj | Copyright ( c ) 2017 - present Walmart , 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
dist... | null | https://raw.githubusercontent.com/walmartlabs/lacinia/88bf46f197bfed645d7767fcfe2bfa39e8b00b27/test/com/walmartlabs/lacinia/summarize_query_tests.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 perm... | Copyright ( c ) 2017 - present Walmart , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.walmartlabs.lacinia.summarize-query-tests
(:require
[clojure.test :refer [deftest is]]
[com.walmartlabs.test-uti... |
6097114a2f19f5a855c910e3661c2a4d30676c935b71960df44433f353e3dc7a | engstrand-config/guix-dotfiles | display.scm | (define-module (engstrand features display)
#:use-module (ice-9 format)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (rde features)
#:use-module (rde features predicates)
#:use-module (gnu services)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-mo... | null | https://raw.githubusercontent.com/engstrand-config/guix-dotfiles/342915fc1762c191bd6d6180bb944ecb68aef007/engstrand/features/display.scm | scheme | please check if package i2c-tools from (gnu packages linux) is required
TODO: add kernel module i2c-dev
TODO: add user to group i2c-dev
TODO: guile bindings for ddcutil?
example commands that we have used before:
) | (define-module (engstrand features display)
#:use-module (ice-9 format)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (rde features)
#:use-module (rde features predicates)
#:use-module (gnu services)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-mo... |
c1ffde74c6bfbe851ddb6df76d61e0e7d3e22ab00021b75ae698751e32509bb1 | jrh13/hol-light | inverse_bug_puzzle_read.ml | (* ========================================================================= *)
( c ) Copyright , 2013
Distributed under the same license as HOL Light
(* *)
Proof of the... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/RichterHilbertAxiomGeometry/inverse_bug_puzzle_read.ml | ocaml | =========================================================================
triples of points in the plane with the same oriented area can be
definition of move, which defines a closed subset
which handles t... | ( c ) Copyright , 2013
Distributed under the same license as HOL Light
Proof of the Bug Puzzle conjecture of the HOL Light tutorial : Any two
connected in 5 moves or less ( FivemovesOrLess ) . Much of the code is
due to : a ... |
dbc5736d51a7bc76abd7a4a868093fb85ee69b7bfd1a04dc2e362158ad873526 | FlowForwarding/LINC-Switch | linc_us5_port.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/LINC-Switch/9c28e7c8677c03440a62023292dd700fef0c3420/apps/linc_us5/src/linc_us5_port.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, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
TAP stack . It provides Open Flow ports represented as gen_server processe... |
f0e316c12afeeabde1fa0022f86ec8c91b6cc4bd37dfc1c914367ebfa1f961e6 | comtihon/social_network_example | sn_mobile_api.erl | %%%-------------------------------------------------------------------
@author tihon
( C ) 2017 , < COMPANY >
%%% @doc
%%% This module is responsible for working with mobile operators for
sending pins , checking MSISDN 's and what not .
%%% @end
%%%----------------------------------------------------------------... | null | https://raw.githubusercontent.com/comtihon/social_network_example/eed32f43947fc8d88c41e38fc2d31d2371be0c2b/src/services/sn_mobile_api.erl | erlang | -------------------------------------------------------------------
@doc
This module is responsible for working with mobile operators for
@end
-------------------------------------------------------------------
API
And others. | @author tihon
( C ) 2017 , < COMPANY >
sending pins , checking MSISDN 's and what not .
-module(sn_mobile_api).
-author("tihon").
-export([
request_msisdn/2,
check_msisdn/1,
check_pin/3]).
request_msisdn(_Arg0, _Arg1) ->
erlang:error(not_implemented).
check_msisdn(_Arg0) ->
erlang:error(not_implemen... |
b208b9b1d0eee1b4bf768fd4cc6b29e53cf9c8ca3485b9daa69e513bd26710fe | dwayne/eopl3 | ex2.29.test.rkt | #lang racket
(require "./ex2.29.rkt")
(require rackunit)
(check-equal?
(parse-expression 'x)
(var-exp 'x))
(check-equal?
(parse-expression '(lambda (x) x))
(lambda-exp (list 'x) (var-exp 'x)))
(check-equal?
(parse-expression '(x y))
(app-exp (var-exp 'x) (list (var-exp 'y))))
(check-equal?
(parse-expressio... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/02-ch2/racket/ex2.29.test.rkt | racket | #lang racket
(require "./ex2.29.rkt")
(require rackunit)
(check-equal?
(parse-expression 'x)
(var-exp 'x))
(check-equal?
(parse-expression '(lambda (x) x))
(lambda-exp (list 'x) (var-exp 'x)))
(check-equal?
(parse-expression '(x y))
(app-exp (var-exp 'x) (list (var-exp 'y))))
(check-equal?
(parse-expressio... | |
9f5df2b7e55d3df434edf2aaec0773f28e0fa2c46750ffd9dac329c0eed671ee | Helium4Haskell/helium | Complete7.hs |
main :: Bool -> ()
main b = case b of True -> ()
_ -> () | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/Complete7.hs | haskell |
main :: Bool -> ()
main b = case b of True -> ()
_ -> () | |
b634e51a75088cc26140f0871cd80785a416f13b1c8e21b1af6611c084fbf75d | haskell/haskell-language-server | MetaBindAll.hs | foo :: a -> (a, a)
foo a = [wingman| split; assumption |]
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/MetaBindAll.hs | haskell | foo :: a -> (a, a)
foo a = [wingman| split; assumption |]
| |
4286f9e8dc256e450c8580265bc6aedf78aa1fce667efeccf8e750d81a86008e | TrustInSoft/tis-kernel | asm_contracts.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/typing/asm_contracts.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
be929bb30354cdc69a86cf10cf66092eefa5d5205cdf1fd92722cc107f439816 | zenhack/haskell-capnp | Main.hs | -- This module is the main entry point for the capnpc-haskell code
-- generator plugin.
module Main (main) where
import Capnp (Parsed, defaultLimit, getParsed)
import Capnp.Gen.Capnp.Schema (CodeGeneratorRequest)
import qualified Check
import Data.Foldable (for_)
import qualified Data.Text.Lazy as LT
import qualified ... | null | https://raw.githubusercontent.com/zenhack/haskell-capnp/6cf9fae35189a3668f2740d64c634675ec5fbdec/cmd/capnpc-haskell/Main.hs | haskell | This module is the main entry point for the capnpc-haskell code
generator plugin.
| Convert a 'CodeGeneratorRequest' to a list of files to create. | module Main (main) where
import Capnp (Parsed, defaultLimit, getParsed)
import Capnp.Gen.Capnp.Schema (CodeGeneratorRequest)
import qualified Check
import Data.Foldable (for_)
import qualified Data.Text.Lazy as LT
import qualified Data.Text.Lazy.IO as TIO
import qualified IR.Flat as Flat
import qualified IR.Haskell as... |
6771cfe0b76015eabc330a34a6083e786c59091f153a8bb24c7471c032122446 | tiredpixel/isoxya-api | Processor.hs | module Isoxya.Processor (
module Isoxya.Processor.Processor,
) where
import Isoxya.Processor.Processor
| null | https://raw.githubusercontent.com/tiredpixel/isoxya-api/1022ee6db77f744c77541c53ef6f15f56884f939/src/Isoxya/Processor.hs | haskell | module Isoxya.Processor (
module Isoxya.Processor.Processor,
) where
import Isoxya.Processor.Processor
| |
41ca07a72dfa57bc327936728a9d4b35d6f152ce9fccc56cbcaed5abc5cbb950 | rudymatela/leancheck | Basic.hs | # LANGUAGE CPP #
-- |
Module : Test . . Basic
Copyright : ( c ) 2015 - 2020
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
--
This module is part of LeanCheck ,
-- a simple enumerative property-based testing library.
--
This module exports " Test . . Core " along... | null | https://raw.githubusercontent.com/rudymatela/leancheck/af299d3616a362816c21931ada6fa49a2af7f911/src/Test/LeanCheck/Basic.hs | haskell | |
a simple enumerative property-based testing library.
You are probably better off importing it.
if you /only/ want the above basic functionality.
| > list :: [Rational] =
> , (-1) % 1
> , (-1) % 2, (-2) % 1
> , (-1) % 3, (-3) % 1
> , (-1) % 4, (-2) % 3, (-3) % 2, (-4) % 1
> , (-1) ... | # LANGUAGE CPP #
Module : Test . . Basic
Copyright : ( c ) 2015 - 2020
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
This module is part of LeanCheck ,
This module exports " Test . . Core " along with :
* support for ' Listable ' 6 - tuples up to 12 - tuples... |
39bb0cf38d8d21fdeda63ff0261daaaae646b6c270072dcf7608b2b68b050801 | jarohen/chord | client.cljs | (ns chord.client
(:require [cljs.core.async :as a :refer [chan <! >! put! close!]]
[chord.channels :refer [read-from-ws! write-to-ws! bidi-ch]]
[chord.format :refer [wrap-format]])
(:require-macros [cljs.core.async.macros :refer [go go-loop alt!]]))
(defn close-event->maybe-error [ev]
(wh... | null | https://raw.githubusercontent.com/jarohen/chord/5db71fd7ae8be04bd64ccc8b800a76e74fc59e69/src/chord/client.cljs | clojure | Detect if the "ws" node library is available
Note that just checking that cljs.core/*target* == nodejs works for nodejs
but not for node-webkit (at least)
This should work in all cases | (ns chord.client
(:require [cljs.core.async :as a :refer [chan <! >! put! close!]]
[chord.channels :refer [read-from-ws! write-to-ws! bidi-ch]]
[chord.format :refer [wrap-format]])
(:require-macros [cljs.core.async.macros :refer [go go-loop alt!]]))
(defn close-event->maybe-error [ev]
(wh... |
e4a5c202fdc7ed96d002efccae5abbdd8baf0df1efc10129b74250cb25607206 | mirage/ocaml-conduit | unikernel.ml | open Lwt.Infix
open Printf
let conduit = Conduit_mirage.empty
let vchan = Conduit_mirage.vchan (module Vchan_xen)
let xs = Conduit_mirage.xs (module OS.Xs)
module Server (Time : Mirage_types_lwt.TIME) = struct
let server_src = Logs.Src.create "server" ~doc:"vchan server"
module Log = (val Logs.src_log server_src... | null | https://raw.githubusercontent.com/mirage/ocaml-conduit/e5421ab8f4e32a95e112629b06c1c496e471e6ee/tests/conduit-mirage/vchan/unikernel.ml | ocaml | open Lwt.Infix
open Printf
let conduit = Conduit_mirage.empty
let vchan = Conduit_mirage.vchan (module Vchan_xen)
let xs = Conduit_mirage.xs (module OS.Xs)
module Server (Time : Mirage_types_lwt.TIME) = struct
let server_src = Logs.Src.create "server" ~doc:"vchan server"
module Log = (val Logs.src_log server_src... | |
4cff128bd9516dd5be6cb06ef5cbb59513852288c13549268f593b344d17dbf3 | andorp/bead | BeadContextInit.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Bead.View.BeadContextInit (
beadContextInit
, beadConfigFileName
, InitTasks
, Daemons(..)
, usersJson
) where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Clas... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/BeadContextInit.hs | haskell | # LANGUAGE OverloadedStrings #
During the initialization what other tasks need to be done.
Just userRegInfo means that a new admin user should be craeted
Nothing means there is no additional init task to be done.
The collection of the daemons that are neccesary to create the
application
TODO: Use lenses for optio... | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Bead.View.BeadContextInit (
beadContextInit
, beadConfigFileName
, InitTasks
, Daemons(..)
, usersJson
) where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Data.Char (toUpp... |
399533149c480febd48e48e01ef2db2a3cb72da4ae40975416638580e1300ffd | wardle/pc4 | subs.cljs | (ns eldrix.pc4-ward.patient.subs
"Subscriptions relating to patients."
(:require [re-frame.core :as rf])
(:import [goog.date Date]))
(rf/reg-sub ::current
(fn [db _]
(get-in db [:patient/current :patient])))
(rf/reg-sub ::search-results
(fn [db _]
(:patient/search-results db)))
(rf/reg-sub ::search... | null | https://raw.githubusercontent.com/wardle/pc4/59ffb6fece3344c142f51625666e4db2870c4d06/pc4-ward/src/eldrix/pc4_ward/patient/subs.cljs | clojure | return the hospital in which the patient is currently admitted
as our backend services do not yet know this information, we return nil
is the patient record loading data?
TODO: don't use a hardcoded project name here, but create an episode type,
or better still, project type, reflecting an inpatient stay. That the... | (ns eldrix.pc4-ward.patient.subs
"Subscriptions relating to patients."
(:require [re-frame.core :as rf])
(:import [goog.date Date]))
(rf/reg-sub ::current
(fn [db _]
(get-in db [:patient/current :patient])))
(rf/reg-sub ::search-results
(fn [db _]
(:patient/search-results db)))
(rf/reg-sub ::search... |
1c4ad5d0863643d567d401d8fdc577291542c5438b04a1957c708a192425a510 | WhatsApp/erlt | modifiers.erl | -file("dev/src/modifiers.erlt", 1).
-module(modifiers).
-eqwalizer_unchecked([{dt, 1},
{empty, 0},
{ffi, 1},
{get, 2},
{put, 3}]).
-export([ffi/1, dt/1, empty/0, get/2, put/3]).
-export_type([map_/2]).
-type map_(_Key, _Value) ... | null | https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/tests/dev/ir-spec/modifiers.erl | erlang | -file("dev/src/modifiers.erlt", 1).
-module(modifiers).
-eqwalizer_unchecked([{dt, 1},
{empty, 0},
{ffi, 1},
{get, 2},
{put, 3}]).
-export([ffi/1, dt/1, empty/0, get/2, put/3]).
-export_type([map_/2]).
-type map_(_Key, _Value) ... | |
3d2f623f4e8219ad9b34f7902edc45c92fb6d8807e55f6eb95727656b2691e4c | haskell/cabal | Run.hs | # LANGUAGE NondecreasingIndentation #
-- | A module for running commands in a chatty way.
module Test.Cabal.Run (
run,
runAction,
Result(..)
) where
import Distribution.Simple.Program.Run
import Distribution.Verbosity
import Control.Concurrent.Async
import System.Process
import System.IO
import System.Exi... | null | https://raw.githubusercontent.com/haskell/cabal/d80e24f8bb2ad9162703af9258bd0ad1c1a27396/cabal-testsuite/src/Test/Cabal/Run.hs | haskell | | A module for running commands in a chatty way.
| The result of invoking the command line.
| Run a command, streaming its output to stdout, and return a 'Result'
with this information.
In our test runner, we allow a path to be relative to the
current directory using the same heuristic as shells:
and 'foo/bar' r... | # LANGUAGE NondecreasingIndentation #
module Test.Cabal.Run (
run,
runAction,
Result(..)
) where
import Distribution.Simple.Program.Run
import Distribution.Verbosity
import Control.Concurrent.Async
import System.Process
import System.IO
import System.Exit
import System.Directory
import System.FilePath
da... |
108bc1c5ae9db20fe4f2e30e92d95b91ebd79fe6ce8cbf309aa1d5edff41d886 | sharplispers/cxml | domtest.lisp | (defpackage :domtest
(:use :cl :cxml)
(:export #:run-all-tests))
(defpackage :domtest-tests
(:use))
(in-package :domtest)
allgemeine
(defmacro string-case (keyform &rest clauses)
(let ((key (gensym "key")))
`(let ((,key ,keyform))
(declare (ignorable ,key))
(cond
,@(loop
for (k... | null | https://raw.githubusercontent.com/sharplispers/cxml/8701da08ba4aac30891b8d2005edb018c1d3d796/test/domtest.lisp | lisp | s/([A-Z][a-z])/-\1/
...
dom1-interfaces.xml auslesen
Conditions uebersetzen
Statements uebersetzen
get
set
Tests uebersetzen
sie halt auf hasFeature "XML" testen. | (defpackage :domtest
(:use :cl :cxml)
(:export #:run-all-tests))
(defpackage :domtest-tests
(:use))
(in-package :domtest)
allgemeine
(defmacro string-case (keyform &rest clauses)
(let ((key (gensym "key")))
`(let ((,key ,keyform))
(declare (ignorable ,key))
(cond
,@(loop
for (k... |
f1896d21a3f7c49e70de3e06824f80dbc7479b772d2018e3aa653f47f5bc466a | emqx/emqx | emqx_connection_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/0a5b221984030c3b2915a4669347b1d95de47f64/apps/emqx/test/emqx_connection_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_connection_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_li... |
ed1a96911e73e2ed8fee0f1da012c9a90e57cecf682a91ff39be12f6c878e4c1 | returntocorp/semgrep | ast_ml.ml |
*
* Copyright ( C ) 2019 - 2021 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file lice... | null | https://raw.githubusercontent.com/returntocorp/semgrep/dcea978347df81cbc8f2c2b49b80c1980f6194cf/languages/ocaml/ast/ast_ml.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Names
**************************************************************************... |
*
* Copyright ( C ) 2019 - 2021 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file lice... |
1713f50e2d6282c36bfce98bd0f5b29f4854694c979b2bf06eabdda1a79684b5 | jeromesimeon/Galax | code_update.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_update.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : code_update.ml , v 1.15 2007/08/23 21:01:32 simeon Exp $
open Cs_util_coercion
open Datatypes
open Xquery_ast
open Xquery_common_ast
open Xquery_core_ast
open Xquery_algebra_ast
open Xquery_algebra_ast_util
open Dm_types
open Dm_ut... |
009edf2cb6e179678e9c13e330a98a20cbc423c7fd016264152d2bd251fb1470 | conductor-sdk/conductor-clojure | metadata.clj | ;;/*
;; * <p>
* 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
;; * <p>
;; * -2.0
;; * <p>
;; * Unless required by applicable law or agreed to in writing, software
distributed unde... | null | https://raw.githubusercontent.com/conductor-sdk/conductor-clojure/45400473f428d1ed03ff13518bc42c728c1edd57/src/io/orkes/metadata.clj | clojure | /*
* <p>
you may not
use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* -2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
express or implied. See the License for the
* specific language governing permissions and limitations und... | distributed under the License is distributed on
* an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either
(ns io.orkes.metadata
(:require [io.orkes.api-client :refer [generic-client]]
[cheshire.core :as json]))
(def authorization-header-key "X-AUTHORIZATION")
(def json-headers
{"... |
9102f9958fbbc99d65f1f41c7493699404dd722e7d6fc06853d0445b29d8ff10 | bjorng/wings | wings_vertex_cmd.erl | %%
%% wings_vertex_cmd.erl --
%%
%% This module contains most of the commands for vertices.
%%
Copyright ( c ) 2001 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wings_vertex_cmd).
-ex... | null | https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/src/wings_vertex_cmd.erl | erlang |
wings_vertex_cmd.erl --
This module contains most of the commands for vertices.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
The Flatten command.
The Extrude command.
The Bevel command.
Winged vertex - ... | Copyright ( c ) 2001 - 2011
-module(wings_vertex_cmd).
-export([menu/3,command/2,tighten_vs/2,tighten_vs/3,
connect/2,bevel_vertex/2,flatten/2]).
-export([set_color/2]).
-include("wings.hrl").
-import(lists, [member/2,foldl/3,mapfoldl/3,sort/1]).
menu(X, Y, St) ->
Dir = wings_menu_util:directions(St),
... |
377ceac73eba700c1e43499ff65e31db014d5b873455f1fa17fa82d6da58d62f | pepijn/google-cloud-functions-clojure | helpers.clj | (ns helpers
(:require
[clojure.java.io :as io])
(:import
(java.io
File)
(java.nio.file
Files
Path)
(java.nio.file.attribute
FileAttribute)
(java.util.zip
ZipFile)))
(defn delete-dir!
[dir]
(run! io/delete-file (->> (.toFile dir) (.listFiles)))
(Files/delete ... | null | https://raw.githubusercontent.com/pepijn/google-cloud-functions-clojure/943835aed008525e5bc6e537edaf54219458f683/deploy/test/helpers.clj | clojure | (ns helpers
(:require
[clojure.java.io :as io])
(:import
(java.io
File)
(java.nio.file
Files
Path)
(java.nio.file.attribute
FileAttribute)
(java.util.zip
ZipFile)))
(defn delete-dir!
[dir]
(run! io/delete-file (->> (.toFile dir) (.listFiles)))
(Files/delete ... | |
d167e1df32dee74d05db2438b5c7bb444db84578731ce461844deac30624f5ef | synduce/Synduce | interval_intersection.ml | * @synduce -NB --no - lifting
type list =
| Cons of int * int * list
| Elt of int * int
let rec sorted_by_start = function
| Elt (x, y) -> true
| Cons (a, b, l) -> a < head l && sorted_by_start l
and head = function
| Elt (a, b) -> a
| Cons (a, b, l) -> a
;;
let rec spec = function
| Elt (a, b) -> f... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/unrealizable/interval_intersection.ml | ocaml | * @synduce -NB --no - lifting
type list =
| Cons of int * int * list
| Elt of int * int
let rec sorted_by_start = function
| Elt (x, y) -> true
| Cons (a, b, l) -> a < head l && sorted_by_start l
and head = function
| Elt (a, b) -> a
| Cons (a, b, l) -> a
;;
let rec spec = function
| Elt (a, b) -> f... | |
b40f0781a9ab63f9e627052a9cf5683a5242817afa22b80451e711f423c82b0a | kcsongor/generic-lens | Typed.hs | {-# LANGUAGE PackageImports #-}
# LANGUAGE TypeApplications #
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariabl... | null | https://raw.githubusercontent.com/kcsongor/generic-lens/e5a390769aff422af656802ab5204b77b02699a9/generic-lens/src/Data/Generics/Sum/Typed.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
---------------------------------------------------------------------------
|
Module : Data.Generics.Sum... | # LANGUAGE TypeApplications #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
Copyright : ( C ) 2020
Maintainer : < >
module Data.Generics.Sum.Typed
AsType (..... |
b7a599db9e515a2fc73e66b9545413e7e849e3eab5d7cabafc234443bf63eb93 | acl2/acl2 | untranslated-terms.lisp | Utilities for dealing with untranslated terms
;
Copyright ( C ) 2015 - 2021 Kestrel Institute
;
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
;
Main Author : ( )
Supporting Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-pack... | null | https://raw.githubusercontent.com/acl2/acl2/94d2df6da448364783e71f5ac78bc4c591ff0c2f/books/kestrel/untranslated-terms-old/untranslated-terms.lisp | lisp |
STATUS: IN-PROGRESS
This book includes some utilities for dealing with untranslated terms, so
that we don't have the translate them, process them, and then try to
untranslate them (which can lose information, especially non-logical
information related to, e.g., execution). The set of macros we will have to
s... | Utilities for dealing with untranslated terms
Copyright ( C ) 2015 - 2021 Kestrel Institute
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
Main Author : ( )
Supporting Author : ( )
(in-package "ACL2")
(include-book "kestrel/untranslated-terms/untranslated-constantp" :dir... |
e4e83fbb02d6f83d5f9969a3fbd6d15bbfde77507b2470458120e111f796df79 | NelosG/fp-tests | Base.hs | module HW3.Base
( HiError (..)
, HiExpr (..)
, HiFun (..)
, HiMonad (..)
, HiValue (..)
) where
import Data.ByteString (ByteString)
import Data.Text (Text)
data HiFun
= HiFunDiv --p7 l
| HiFunMul --p7 l
| HiFunAdd --p6 l
| HiFunSub --p6 l
| HiFunNot
p3 r
| HiFunOr --p2 r
| HiFunLessThan --... | null | https://raw.githubusercontent.com/NelosG/fp-tests/d85a33821f1d9c1a6335efcea53e01faa0186026/hw3/src/HW3/Base.hs | haskell | p7 l
p7 l
p6 l
p6 l
p2 r
p4
p4
p4
p4
p4
p4 | module HW3.Base
( HiError (..)
, HiExpr (..)
, HiFun (..)
, HiMonad (..)
, HiValue (..)
) where
import Data.ByteString (ByteString)
import Data.Text (Text)
data HiFun
| HiFunNot
p3 r
| HiFunIf
| HiFunLength
| HiFunToUpper
| HiFunToLower
| HiFunReverse
| HiFunTrim
deriving (Show, Eq, Or... |
52d4c9e82759daf4c9f8e8ea285ba92bb7023de81c84941bfc2632691555904b | dstcruz/Write-Yourself-A-Scheme-In-48-Hours | exercise_2.hs | # LANGUAGE ExistentialQuantification #
module Main where
import Char (toLower)
import Control.Monad (liftM)
import Control.Monad.Error
import Data.Array (Array (..), listArray)
import Data.Ratio (Rational (..), (%))
import Data.Complex (Complex (..))
import Numeric (readOct, readHex)
import System.Environment
import T... | null | https://raw.githubusercontent.com/dstcruz/Write-Yourself-A-Scheme-In-48-Hours/19765a03fb01d788066259d115c7798518224ad9/ch05/exercise_2.hs | haskell | not sure I understand the type of this function
according to ghci
Bug: this allows the unquote to appear outside of a quasiquoted list
Bug: this allows unquote-splicing to appear outside of a quasiquoted list
Show functions
Evaluator
Primitive functions lookup table
LispVal -> LispVal
Other primitiv... | # LANGUAGE ExistentialQuantification #
module Main where
import Char (toLower)
import Control.Monad (liftM)
import Control.Monad.Error
import Data.Array (Array (..), listArray)
import Data.Ratio (Rational (..), (%))
import Data.Complex (Complex (..))
import Numeric (readOct, readHex)
import System.Environment
import T... |
b9698feb1f6d9096d05efbfd08434723d760acf5663fb13029d8be948d8dd7a0 | CatalinStefan/LearnErlang | hof.erl | -module(hof).
%% API
-export([double/0]).
double() ->
F = fun(X) -> (X - 32) * 5 / 9 end,
map(F, [1, 5, 2, 7, 4, 6]).
map(F, []) ->
[];
map(F, [First | Rest]) ->
[F(First) | map(F, Rest)]. | null | https://raw.githubusercontent.com/CatalinStefan/LearnErlang/cfa810e12eba345c323e90315b0def013a79afc8/src/hof.erl | erlang | API | -module(hof).
-export([double/0]).
double() ->
F = fun(X) -> (X - 32) * 5 / 9 end,
map(F, [1, 5, 2, 7, 4, 6]).
map(F, []) ->
[];
map(F, [First | Rest]) ->
[F(First) | map(F, Rest)]. |
b336d1775c195ab5764aa81be0dced19afb3624af59f3a91c750ff821967d86a | PkmX/rawr | Main.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLabels #
module Main where
import Control.DeepSeq
import GHC.DataSize
import GHC.Generics
import Data.Rawr
import Test.Tasty
import Test.Tasty.HUnit
data Id a = Id a deriving (Generic, NFData)
main :: IO ()
main = defaultMain $ testGrou... | null | https://raw.githubusercontent.com/PkmX/rawr/9e366a58d988526bbfd017471952e68e7266d27b/tests/datasize/Main.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLabels #
module Main where
import Control.DeepSeq
import GHC.DataSize
import GHC.Generics
import Data.Rawr
import Test.Tasty
import Test.Tasty.HUnit
data Id a = Id a deriving (Generic, NFData)
main :: IO ()
main = defaultMain $ testGroup "ghc-datasize"
[ testCase ... |
aad87656f784d1fa55420352fa820c08ebb15fbd6dcd69831a327a50269c3968 | altenwald/eimap | eimap_command_namespace_tests.erl | Copyright 2014 Kolab Systems AG ( )
%%
( Kolab Systems ) < seigo a kolabsys.com >
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at ... | null | https://raw.githubusercontent.com/altenwald/eimap/cfa94c2e1303b240d8582b30546fd666a7ad128b/test/eimap_command_namespace_tests.erl | erlang |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library Gener... | Copyright 2014 Kolab Systems AG ( )
( Kolab Systems ) < seigo a kolabsys.com >
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Library General Public License
-module(... |
bbd687d9f0df84efbe182fd653c3fdfdb42d8e1bb0c031887cc3a099482863b4 | camlp4/camlp4 | lambda_test.ml | (****************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/examples/lambda_test.ml | ocaml | **************************************************************************
OCaml
... | Copyright 2007 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 the special
let id = << fun x -> x >>
Imported and traduced from CCT
let zero = << fun s ->... |
d45f04bfe9abced4f8fa44543eac55362d1bf58da378f7d669a980e60df1620a | startalkIM/ejabberd | esip_listener.erl | %%%----------------------------------------------------------------------
%%% File : esip_listener.erl
Author : < >
%%% Purpose :
Created : 9 Jan 2011 by < >
%%%
%%%
Copyright ( C ) 2002 - 2016 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " Lice... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/esip/src/esip_listener.erl | erlang | ----------------------------------------------------------------------
File : esip_listener.erl
Purpose :
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 WARRANTI... | Author : < >
Created : 9 Jan 2011 by < >
Copyright ( C ) 2002 - 2016 ProcessOne , SARL . 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(esip_listener).
-behaviour(gen_server).
-... |
1626e7417e8844f6f6112a0a46dce1ed3c3307f9a6efa3e8a1bc6b46b0f82349 | danielmiladinov/joy-of-clojure | functions_in_all_their_forms.clj | ;; Functions in all their forms
;; ---------------------------------------------------------------------------------------------------------------------
Earlier we mentioned that most of Clojure 's composite types can be used as functions of their elements . As a
;; refresher, recall that vectors are functions of the... | null | https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter7/functions_in_all_their_forms.clj | clojure | Functions in all their forms
---------------------------------------------------------------------------------------------------------------------
refresher, recall that vectors are functions of their indices, so executing ([:a :b] 0) returns :a. But this can be
used to greater effect by passing the vector as a fun... | Earlier we mentioned that most of Clojure 's composite types can be used as functions of their elements . As a
The example uses the vector as the function to map over a set of indices , indicating its first and fourth elements by
index . Clojure collections offer an interesting juxtaposition , in that not only c... |
033c52ab27d7d7965bf8e007bfa6a2dcc32030204522e6bede1cae751b740ab4 | clojure-interop/google-cloud-clients | GrpcSpeechStub.clj | (ns com.google.cloud.speech.v1.stub.GrpcSpeechStub
"gRPC stub implementation for Cloud Speech API.
This class is for advanced usage and reflects the underlying API directly."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.speech.v1.stub GrpcSpeechStub]))
(defn *create
"client-co... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.speech/src/com/google/cloud/speech/v1/stub/GrpcSpeechStub.clj | clojure | (ns com.google.cloud.speech.v1.stub.GrpcSpeechStub
"gRPC stub implementation for Cloud Speech API.
This class is for advanced usage and reflects the underlying API directly."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.speech.v1.stub GrpcSpeechStub]))
(defn *create
"client-co... | |
e6238e28190d0bcc923107865abc097f84edf0f2aeb04e4a31a99fd7eed7fb4b | kafka4beam/lz4b | lz4b_frame.erl | -module(lz4b_frame).
-include("lz4b_frame.hrl").
-export([compress/1,
decompress/1,
decompress/2,
incremental_decompress/3,
read_frame_info/1
]).
-on_load(init/0).
-type error_ret() :: lz4b_nif:error_ret().
init() ->
lz4b_config:reload_config().
-spec decompress(iodat... | null | https://raw.githubusercontent.com/kafka4beam/lz4b/b3eef5beb91c74741a17f31bb98dedf32aac01d0/src/lz4b_frame.erl | erlang | disabled | -module(lz4b_frame).
-include("lz4b_frame.hrl").
-export([compress/1,
decompress/1,
decompress/2,
incremental_decompress/3,
read_frame_info/1
]).
-on_load(init/0).
-type error_ret() :: lz4b_nif:error_ret().
init() ->
lz4b_config:reload_config().
-spec decompress(iodat... |
558be39c0d0790947cc7a9d187b438f61c22e2725d7ce5efc9995b88ae761366 | fetburner/compelib | lis.ml | module F (ESet : Set.S) = struct
let lis as_ = ESet.cardinal @@ List.fold_left (fun l a ->
match ESet.split a l with
| _, true, _ -> l
| _, false, lr ->
if ESet.is_empty lr then ESet.add a l
else ESet.add a (ESet.remove (ESet.min_elt lr) l)) ESet.empty as_
end
| null | https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/lis.ml | ocaml | module F (ESet : Set.S) = struct
let lis as_ = ESet.cardinal @@ List.fold_left (fun l a ->
match ESet.split a l with
| _, true, _ -> l
| _, false, lr ->
if ESet.is_empty lr then ESet.add a l
else ESet.add a (ESet.remove (ESet.min_elt lr) l)) ESet.empty as_
end
| |
852f2b4d66fba50c831ca4378ae1b5725e098d7fbe4b1a7c1415fa1676d5f4d4 | jimcrayne/jhc | tc205.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
Tests infix type constructors in GADT declarations
module ShouldCompile where
infix 1 `DArrowX` -- (->) has precedence 0
data DArrowX :: * -> * -> * where
First :: a `DArrowX` a' -> (a,b) `DArrowX` (a',b)
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc205.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
(->) has precedence 0 |
Tests infix type constructors in GADT declarations
module ShouldCompile where
data DArrowX :: * -> * -> * where
First :: a `DArrowX` a' -> (a,b) `DArrowX` (a',b)
|
9970b847d659de54825e1bfd02054f9eef736f09aaf045c8bdde58c1784c37b6 | thheller/shadow-cljsjs | sl.cljs | (ns cljsjs.moment.locale.sl
(:require ["moment/locale/sl"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/sl.cljs | clojure | (ns cljsjs.moment.locale.sl
(:require ["moment/locale/sl"]))
| |
32130b187c7267a4392936c530da07308f5712cf1616e2d5b322da06823f0b58 | mokus0/junkbox | Apply2.hs |
- ` ` Apply2 ''
- ( c ) 2008 , , Inc.
- ``Apply2''
- (c) 2008 Cook, J. MR SSD, Inc.
-}
# LANGUAGE
TypeFamilies ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts ,
UndecidableInstances ,
RankNTypes
#
... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/Apply2.hs | haskell | base definitions of application and composition
instance (Apply a b, Apply (Result a b) c) => Apply (Compose a b) c where
type Result (Compose a b) c = Result (Result a b) c
Compose f g $ x = f $ (g $ x)
class Existential c where
exists :: (c -> Bool) -> Bool
instance (a ~ c, Existential c) =>... |
- ` ` Apply2 ''
- ( c ) 2008 , , Inc.
- ``Apply2''
- (c) 2008 Cook, J. MR SSD, Inc.
-}
# LANGUAGE
TypeFamilies ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts ,
UndecidableInstances ,
RankNTypes
#
... |
47f19eb9aaed284d1a992481a7f18e05dc693867c0b97aa17c8a200de5538ebf | wireless-net/erlang-nommu | sets_test_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/sets_test_lib.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2004 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(sets_test_lib).
-export([new/2]).... |
886e0ea3bcf818154af9fd09be082a8f2c2c6a8250d5fdececab2c8ac02fe8e2 | spurious/sagittarius-scheme-mirror | titlecase.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; srfi/%3a129/titlecase.scm - SRFI-129 Title case
;;;
Copyright ( c ) 2015 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; ... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a129/titlecase.scm | scheme | coding : utf-8 ; -*-
srfi/%3a129/titlecase.scm - SRFI-129 Title case
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, th... | Copyright ( c ) 2015 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (srfi :129 titlecase)
(export char-tit... |
a2a097fd4dd337c29557ecce36e72e6eb9cc1114e83023615caa6c833dec0aec | typelead/intellij-eta | Failure.hs | module JUnit.Runner.Notification.Failure where
import P
data Failure = Failure
@org.junit.runner.notification.Failure
deriving Class
| null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/eta/JUnit/Runner/Notification/Failure.hs | haskell | module JUnit.Runner.Notification.Failure where
import P
data Failure = Failure
@org.junit.runner.notification.Failure
deriving Class
| |
acb0898919838736edcc749a05034b4cc061c75ee5d22ce8971c3bfb7eb0c9b1 | kirstin-rhys/nestedmap | TreeSpec.hs | # LANGUAGE NoImplicitPrelude , UnicodeSyntax #
module Data.Nested.TreeSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import qualified Data.List as L
import Prelude ((+))
import Data.Char (Char)
import Data.Int (Int)
import Data.Tuple (snd)
import Data.Eq.Unicode ((≡))
import Data.Function (($))
imp... | null | https://raw.githubusercontent.com/kirstin-rhys/nestedmap/04538d718f308bdeec8d1228cfe205e533b85ec9/test/Data/Nested/TreeSpec.hs | haskell | # LANGUAGE NoImplicitPrelude , UnicodeSyntax #
module Data.Nested.TreeSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import qualified Data.List as L
import Prelude ((+))
import Data.Char (Char)
import Data.Int (Int)
import Data.Tuple (snd)
import Data.Eq.Unicode ((≡))
import Data.Function (($))
imp... | |
c8d7b2ac4e07f03b58bd39756e7c4b428fad548b9dda315e60458c5a42d0d85e | dannywillems/RML | contextEvaluation.mli | *
This module provides an abstraction of context for evaluation algorithms for
DOT .
It aims to provide several submodules for different evaluation strategies
like big step , storeless small step or small step with store .
This module provides an abstraction of context for evaluation algorithm... | null | https://raw.githubusercontent.com/dannywillems/RML/357be3ddac1f6d38b638248d37a877b4f6f802ea/src/contextEvaluation.mli | ocaml | *
This module provides an abstraction of context for evaluation algorithms for
DOT .
It aims to provide several submodules for different evaluation strategies
like big step , storeless small step or small step with store .
This module provides an abstraction of context for evaluation algorithm... | |
0ba8771dac1d5475d4db7897161671545db3fdd5ecaa06074713a5b6a5c2dfef | RefactoringTools/wrangler | tests_all_external.erl | @private
-module(tests_all_external).
-compile([export_all]).
testTwiceX(X) -> def:twice(X).
testTwice0() -> 0.
testTwice1() -> 2.
testH(X) -> def:g(X).
testH() -> 3.
testTripleX(X) -> 3 * (X).
testTwiceTimesTriple(X,Y) ->
def:twice(X) * (3 * (Y)).
testTwiceOfTriple(X) ->
def:twice(3 * (X)).
testOfT... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/tests/transformed/tests_all_external.erl | erlang | @private
-module(tests_all_external).
-compile([export_all]).
testTwiceX(X) -> def:twice(X).
testTwice0() -> 0.
testTwice1() -> 2.
testH(X) -> def:g(X).
testH() -> 3.
testTripleX(X) -> 3 * (X).
testTwiceTimesTriple(X,Y) ->
def:twice(X) * (3 * (Y)).
testTwiceOfTriple(X) ->
def:twice(3 * (X)).
testOfT... | |
f9b449327b8e5581fc2b856e3460b6582bdd1f966e4b658c363f40f89a9450ac | heraldry/heraldicon | charge_select.cljs | (ns heraldicon.frontend.element.charge-select
(:require
[heraldicon.frontend.blazonry-editor.parser :as blazonry-editor.parser]
[heraldicon.frontend.filter :as filter]
[heraldicon.frontend.repository.entity-list :as entity-list]
[heraldicon.frontend.user.session :as session]
[re-frame.core :as rf]))
(... | null | https://raw.githubusercontent.com/heraldry/heraldicon/7bf4dd4149e1f69c9e4f9a0b6b826f73f532a01d/src/heraldicon/frontend/element/charge_select.cljs | clojure | (ns heraldicon.frontend.element.charge-select
(:require
[heraldicon.frontend.blazonry-editor.parser :as blazonry-editor.parser]
[heraldicon.frontend.filter :as filter]
[heraldicon.frontend.repository.entity-list :as entity-list]
[heraldicon.frontend.user.session :as session]
[re-frame.core :as rf]))
(... | |
9b0ab4234aad8f8ab74077413ec023217c5066800976a73e12e782fe7a27973f | razum2um/clj-debugger | core.clj | (ns debugger.core
(:require [debugger.time :as t]
[debugger.config :refer :all]
[debugger.debug-args :as debug-args]
[debugger.formatter :refer [deanonimize-name
demunge
safe-find-var
... | null | https://raw.githubusercontent.com/razum2um/clj-debugger/22f8775193b13e799c3879f6d8443e65600ad503/src/debugger/core.clj | clojure | If we're in the repl, execute immediately
not repl or skip
re-export | (ns debugger.core
(:require [debugger.time :as t]
[debugger.config :refer :all]
[debugger.debug-args :as debug-args]
[debugger.formatter :refer [deanonimize-name
demunge
safe-find-var
... |
89af46a9c5fdafbab9e139a76673c6e00e7429294b488aac7302f54699675125 | input-output-hk/cardano-ledger | Properties.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
-- | Properties of the delegation traces induced by the transition ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/ledger/executable-spec/test/Test/Byron/Spec/Ledger/Delegation/Properties.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Properties of the delegation traces induced by the transition systems
associated with this aspect of the ledger.
------------------------------------------------------------------------------
Delegation certification triggering ... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Byron.Spec.Ledger.Delegation.Properties (
dcertsAreTriggered,
rejectDupSchedDelegs,
tracesAreClassified,
dblockTracesAreClassified,
relevantCase... |
5708384173921c4eafe628ae437a2fc2adc1b5015a62ccbfbde352db74da40d1 | simmsb/calamity | Help.hs | -- | A default help command implementation
module Calamity.Commands.Help (
helpCommand',
helpCommand,
) where
import Calamity.Client.Types (BotC)
import Calamity.Commands.Types
import Calamity.Types.Tellable
import CalamityCommands.Help qualified as CC
import Control.Monad (void)
import Polysemy qualified as P
... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Commands/Help.hs | haskell | | A default help command implementation | module Calamity.Commands.Help (
helpCommand',
helpCommand,
) where
import Calamity.Client.Types (BotC)
import Calamity.Commands.Types
import Calamity.Types.Tellable
import CalamityCommands.Help qualified as CC
import Control.Monad (void)
import Polysemy qualified as P
| Given a ' CommandHandler ' , optionally a... |
272cf0850df9e8d674eead3cfde11584891d542a713da99b4b1735c9e5b7fb05 | ocaml/dune | internal.ml | open Import
let latest_lang_version =
Cmd.v
(Cmd.info "latest-lang-version")
(let+ () = Term.const () in
print_endline
(Dune_lang.Syntax.greatest_supported_version Stanza.syntax
|> Dune_lang.Syntax.Version.to_string))
let group =
Cmd.group (Cmd.info "internal") [ Internal_dump.command; ... | null | https://raw.githubusercontent.com/ocaml/dune/4e83d1b80bd9a37de7e0d39d6f22873850314557/bin/internal.ml | ocaml | open Import
let latest_lang_version =
Cmd.v
(Cmd.info "latest-lang-version")
(let+ () = Term.const () in
print_endline
(Dune_lang.Syntax.greatest_supported_version Stanza.syntax
|> Dune_lang.Syntax.Version.to_string))
let group =
Cmd.group (Cmd.info "internal") [ Internal_dump.command; ... | |
7bd9bafa13d11215e18253764368e9361c5e01587d91dcda8c77861bc0eb7aaa | onyx-platform/onyx | units.cljc | (ns onyx.windowing.units)
(defmulti standard-units-for
(fn [unit] unit))
(defmethod standard-units-for :milliseconds
[unit] :milliseconds)
(defmethod standard-units-for :seconds
[unit] :milliseconds)
(defmethod standard-units-for :minutes
[unit] :milliseconds)
(defmethod standard-units-for :hours
[unit] ... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/windowing/units.cljc | clojure | Pluralized versions for readability | (ns onyx.windowing.units)
(defmulti standard-units-for
(fn [unit] unit))
(defmethod standard-units-for :milliseconds
[unit] :milliseconds)
(defmethod standard-units-for :seconds
[unit] :milliseconds)
(defmethod standard-units-for :minutes
[unit] :milliseconds)
(defmethod standard-units-for :hours
[unit] ... |
18e8076252f06454b04b8a444fba084143ebf581e1817cf19cc4d23e62443f3f | reasonml-old/BetterErrors | type_UnboundRecordField_1.ml | type asd = {
a: int;
}
let bla = {
a = 5;
b = 6;
}
| null | https://raw.githubusercontent.com/reasonml-old/BetterErrors/d439b92bfe377689c38fded5d8aa2b151133f25d/tests/type_UnboundRecordField/type_UnboundRecordField_1.ml | ocaml | type asd = {
a: int;
}
let bla = {
a = 5;
b = 6;
}
| |
b0bfa4e243cf4cdebee85d3b94259a30f0a9d4723c4e95b7bb57228ece6c0d4c | clearwater-analytics/pdf-transforms | text.clj | (ns pdf-transforms.components.text
"Functions for converting featured blocks into text and labels-with-text components"
(:require [clojure.string :as s]
[pdf-transforms.common :as cmn]
[pdf-transforms.utilities :as utils]))
(defn create-text-lines [token-stream]
(let [token-stream (sort-b... | null | https://raw.githubusercontent.com/clearwater-analytics/pdf-transforms/8f15d9855d4c641bf49045bb3aa303beae06c7fd/src/pdf_transforms/components/text.clj | clojure | horizontal indentation is at least as great as nearest's | (ns pdf-transforms.components.text
"Functions for converting featured blocks into text and labels-with-text components"
(:require [clojure.string :as s]
[pdf-transforms.common :as cmn]
[pdf-transforms.utilities :as utils]))
(defn create-text-lines [token-stream]
(let [token-stream (sort-b... |
24a2b89fcbfb98dd82745472a849ef9b56b4c2b8b4f79b31aed41440f2af79a9 | nwf/dyna | InstPretty.hs | ---------------------------------------------------------------------------
| Functions for pretty - printing Insts
--
-- Intended to be imported qualified
--
-- XXX Maybe some of the parser's handling of insts should end up over here,
-- too?
-- Header material {... | null | https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/Analysis/Mode/InstPretty.hs | haskell | -------------------------------------------------------------------------
Intended to be imported qualified
XXX Maybe some of the parser's handling of insts should end up over here,
too?
Header material {{{
# LANGUAGE OverloadedStrings # | | Functions for pretty - printing Insts
module Dyna.Analysis.Mode.InstPretty where
import qualified Data.Map as M
import Data.String
import Dyna.Analysis.Mode.Inst
import Dyna.Analysis.Mode.Uniq
import Text.PrettyPrint.Free
compactUniq :: (IsString a) => Uniq ... |
4c557fcab779d0409a0bea2a776626737264ea32c8e709f20179520766fca923 | INRIA/zelus | zlsolve.ml |
let printf = Printf.printf
let eprintf = Printf.eprintf
let black = "\x1b[0;0m"
let red = "\x1b[0;31m"
let boldred = "\x1b[1;31m"
let green = "\x1b[0;32m"
let yellow = "\x1b[0;33m"
let blue = "\x1b[0;34m"
let magenta = "\x1b[0;35m"
let ... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/lib/std/zlsolve.ml | ocaml | The simulation algorithm
{{{
* Interface for compiled functions
* Configuring and calling the D-C solver
Log simulation steps and continuous state values.
The solver's minimum and maximum step sizes.
The maximum simulation time.
A factor relating simulation and wall clock times.
}}}
{{{
* Interface fo... |
let printf = Printf.printf
let eprintf = Printf.eprintf
let black = "\x1b[0;0m"
let red = "\x1b[0;31m"
let boldred = "\x1b[1;31m"
let green = "\x1b[0;32m"
let yellow = "\x1b[0;33m"
let blue = "\x1b[0;34m"
let magenta = "\x1b[0;35m"
let ... |
9513a4a43ad1956f6ca8c050ca6afac144ad97fedde6cb65a4b645694de1c0a4 | sbcl/sbcl | inspect.lisp | the CL : INSPECT function
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; p... | null | https://raw.githubusercontent.com/sbcl/sbcl/9f5c7c29fa59a52b0a3cbc8948c684a313a70ae6/src/code/inspect.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
"LAMBDA, the ultimate GOTO":-|
newly-consed object for hermetic protection against
mischievous input like #.*EOF-OBJECT*:
If there's ever co... | the CL : INSPECT function
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-IMPL")
(defparameter *inspect-length* 10)
(defun inspector (object input-stream... |
26c052f183f43a9bcf9e0f8e2e4131c6255dd34ecf32498ad3749c187c103ce3 | vvvvalvalval/reagent-phonecat-tutorial | core.clj | (ns reagent-phonecat.core)
(defmacro <? "Version of <! which throws Error that come out of the channel."
[c]
`(reagent-phonecat.core/throw-err (cljs.core.async/<! ~c)))
(defmacro err-or "If body throws an exception, catch it and return it"
[& body]
`(try
~@body
(catch js/Error e# e#)))
(defmacro ... | null | https://raw.githubusercontent.com/vvvvalvalval/reagent-phonecat-tutorial/3207c9cfcb81e423f3074502cba2e570cd2ef274/src/clj/reagent_phonecat/core.clj | clojure | (ns reagent-phonecat.core)
(defmacro <? "Version of <! which throws Error that come out of the channel."
[c]
`(reagent-phonecat.core/throw-err (cljs.core.async/<! ~c)))
(defmacro err-or "If body throws an exception, catch it and return it"
[& body]
`(try
~@body
(catch js/Error e# e#)))
(defmacro ... | |
240181f5ddaf228abfa5ba2ac8752d00d48ea652cba28af18af2a01e54a9a37a | liqd/aula | Frontend.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Werr... | null | https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/src/Frontend.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
* driver
| Call 'runFrontend'' with the persitence implementation chosen in the config.
| Open a warp listener that serves the aula 'Application'. (No content is created; on us... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Werror -Wall #
module Frontend
where
import Prelude hiding (log, (.))
import Control.Category ((.))
import Control.Monad.Trans.Except
import Network.Wai (App... |
d3c09dea5e3706d692ad311a18789ac36b4c2cc4606344073502a362081a3306 | chebert/schemeish | function-combinators.lisp | (defpackage #:function-combinators
(:use :schemeish.schemeish))
(in-package #:function-combinators)
(shadow '(schemeish.schemeish:compose* schemeish.schemeish:compose))
(install-syntax!)
(defparameter *arity-table* (make-hash-table :weakness :key))
(export
(define (restrict-arity proc arity)
"Restricts the a... | null | https://raw.githubusercontent.com/chebert/schemeish/70ac372255dbd62fc778ddfb3ca1aba8786cf2af/src/function-combinators.lisp | lisp | (defpackage #:function-combinators
(:use :schemeish.schemeish))
(in-package #:function-combinators)
(shadow '(schemeish.schemeish:compose* schemeish.schemeish:compose))
(install-syntax!)
(defparameter *arity-table* (make-hash-table :weakness :key))
(export
(define (restrict-arity proc arity)
"Restricts the a... | |
b611ee0baec6eb59165f640984958a53d44c42690c8f4b9d1f341d6d2d5489d4 | kowainik/life-sync | Spec.hs | module Main (main) where
import Test.Hspec (hspec)
import Test.Configuration (configurationSpec)
main :: IO ()
main = hspec
configurationSpec
| null | https://raw.githubusercontent.com/kowainik/life-sync/ea80581a6735d2f3e2df0fda1d1bc0b0b41ad6d0/test/Spec.hs | haskell | module Main (main) where
import Test.Hspec (hspec)
import Test.Configuration (configurationSpec)
main :: IO ()
main = hspec
configurationSpec
| |
3534660edc2f53dd24e2ab1010d0cee9751e7c5fb91f5c1fd1ef9ad6d5728f3d | RunOrg/RunOrg | configuration.mli | (* © 2014 RunOrg *)
type role = [ `Run | `Reset ]
* The path to the configuration used by this instance . By order of priority :
- The contents of the -config command - line argument .
- File ./conf.ini if it exists .
- /etc / runorg / conf.ini
- The contents of the -config command-line argume... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/configuration.mli | ocaml | © 2014 RunOrg
* The role of this instance, as parsed from the command line.
* Is this server running in test mode ? This would enable the "login as
test script" API endpoint.
* If set, write logs to a file in that folder. Otherwise, write logs to
standard output.
* Database pool size. The number of con... |
type role = [ `Run | `Reset ]
* The path to the configuration used by this instance . By order of priority :
- The contents of the -config command - line argument .
- File ./conf.ini if it exists .
- /etc / runorg / conf.ini
- The contents of the -config command-line argument.
- File ./co... |
2263c394990c80ceee26d7e44eeaf8f918ab44814d34d2c5aa9cd03bcf6de2e9 | HaskellForCats/HaskellForCats | MandelB.hs | {-# LANGUAGE BangPatterns #-}
module MandelB where
-- compiler flags
-- ghc -optc-march=pentium4 -optc-mfpmath=sse -optc-msse2 -threaded --make
import System.Environment
import System.IO
import Foreign
import Foreign.Marshal.Array
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.Cha... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/30MinHaskell/z_notes/MandelB.hs | haskell | # LANGUAGE BangPatterns #
compiler flags
ghc -optc-march=pentium4 -optc-mfpmath=sse -optc-msse2 -threaded --make
width in pixels
getArgs >>= readIO . head
width in bytes
width of a pixel in the complex plane
q - work queue
w - width in pixels
m - width of a pixel in the complex plane
n - width in bytes
f - ... | module MandelB where
import System.Environment
import System.IO
import Foreign
import Foreign.Marshal.Array
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.Chan
import Control.Monad
main = do
let n = w `div` 8
m = 2 / fromIntegral w
coords = [T 1 0 y (fro... |
3e9de34553a9b2629227a96d6c8de47778a81e0758e5deb3d2feb63748e8d843 | ucsd-progsys/liquidhaskell | ConstraintsAppend.hs | {-@ LIQUID "--expect-any-error" @-}
module ConstraintsAppend () where
{-@ LIQUID "--no-termination" @-}
import Language.Haskell.Liquid.Prelude
@ type OList a = [ a]<{\x v - > v > = x } > @
@ app : : forall < p : : a - > Bool , q : : a - > Bool , r : : a - > Bool > .
{ x::a < p > |- a < q > < : { v : a| x... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/ConstraintsAppend.hs | haskell | @ LIQUID "--expect-any-error" @
@ LIQUID "--no-termination" @ | module ConstraintsAppend () where
import Language.Haskell.Liquid.Prelude
@ type OList a = [ a]<{\x v - > v > = x } > @
@ app : : forall < p : : a - > Bool , q : : a - > Bool , r : : a - > Bool > .
{ x::a < p > |- a < q > < : { v : a| x < = v } }
{ a < p > < : a < r > }
{ a < q > < : a... |
ec823c596a492eddca409920f81f4089b7850eee0a6405b2d02cc6a231253a93 | neonsquare/mel-base | mime.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Copyright ( c ) 2004 , < > .
;;; All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistribution... | null | https://raw.githubusercontent.com/neonsquare/mel-base/7edc8fb94f30d29637bae0831c55825b0021e0f8/mime.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list... |
Copyright ( c ) 2004 , < > .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :mel.mime)
(defclass mime-header-mixin (rfc2822-header-mixin) ())
(defclass mime-body-mixin (rfc2822-basic-body-mixin) ())
(de... |
feecbe965f0ae1cdb280a8164aa557f4928234f9ab376b6f469c46b4726f6ec4 | clash-lang/clash-compiler | Types.hs | |
Copyright : ( C ) 2012 - 2016 , University of Twente ,
2017 , Myrtle Software Ltd ,
2021 - 2022 , QBayLogic B.V.
2022 , LUMI GUIDE FIETSDETECTIE B.V.
2022 , Google Inc.
License : BSD2 ( see the fil... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/03928285dd064ead8dc748c1e884a81d3e0473a7/clash-lib/src/Clash/Netlist/BlackBox/Types.hs | haskell | # LANGUAGE DeriveAnyClass #
# SOURCE #
| Whether this primitive should be rendered when its result type is void.
^ Render blackbox, even if result type is void
fields. (They are intentionally renamed to prevent name clashes.)
| Use this value in your blackbox template function if you do want to
result type of the ... | |
Copyright : ( C ) 2012 - 2016 , University of Twente ,
2017 , Myrtle Software Ltd ,
2021 - 2022 , QBayLogic B.V.
2022 , LUMI GUIDE FIETSDETECTIE B.V.
2022 , Google Inc.
License : BSD2 ( see the fil... |
c41136482de97e5a720d3985342a643a44845a07a0a3d96ab850a6c5b441e037 | 2600hz/community-scripts | hunt_account_id.erl | %% Sponsored by CloudPBX Inc. ()
-module(hunt_account_id).
-include("clone_tools.hrl").
-export([run/1]).
run([Account]) -> run(Account);
run(Account) when not is_binary(Account) ->
run(wh_types:to_binary(Account));
run(Account) ->
inets:start(),
process_flag('trap_exit', 'true'),
AccountId = wh_acco... | null | https://raw.githubusercontent.com/2600hz/community-scripts/b0b81342bf02300fcdbda99e4cecc1ee93823c70/CloneTools/src/hunt_account_id.erl | erlang | Sponsored by CloudPBX Inc. ()
halt(). | -module(hunt_account_id).
-include("clone_tools.hrl").
-export([run/1]).
run([Account]) -> run(Account);
run(Account) when not is_binary(Account) ->
run(wh_types:to_binary(Account));
run(Account) ->
inets:start(),
process_flag('trap_exit', 'true'),
AccountId = wh_account:format_id(Account, 'raw'),
... |
a7e0c301c8ca5f33cf30bdbd9c8b7dda32aebbd6813e0b15382415658778c16d | bartavelle/language-puppet | PuppetdbSpec.hs | module PuppetdbSpec(spec) where
import XPrelude
import qualified Data.Text as Text
import System.IO.Temp as Temp
import Test.Hspec
import PuppetDB
checkPanicE :: Show x => Text -> ExceptT x IO a -> IO a
checkPanicE msg = runExceptT >=> either (panic . ((msg <> " ") <>) .... | null | https://raw.githubusercontent.com/bartavelle/language-puppet/6af7458e094440816c8b9b7b387050612e87a70f/tests/PuppetdbSpec.hs | haskell | generate an empty puppetdb
get some dummy facts
and add a custom fact
save the facts
check that our custom fact was indeed saved
initiate a new puppetdbapi
check our facts again | module PuppetdbSpec(spec) where
import XPrelude
import qualified Data.Text as Text
import System.IO.Temp as Temp
import Test.Hspec
import PuppetDB
checkPanicE :: Show x => Text -> ExceptT x IO a -> IO a
checkPanicE msg = runExceptT >=> either (panic . ((msg <> " ") <>) .... |
5fce7e4b5e359fb1611340bf57d36eba31161913a8938856310c1213f668bd58 | iskandr/parakeet-retired | InterpBackend.ml | (* pp: -parser o pa_macro.cmo *)
module HostMemspace = struct end
module Memspace = HostMemspace
QUESTION : How call back into Interp when it depends on a particular
(* memState--- should I make that global? *)
let eval_map ~payload closureArgs argVals =
IFDEF DEBUG THEN Printf.printf "Running MAP on host!... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Runtime/InterpBackend.ml | ocaml | pp: -parser o pa_macro.cmo
memState--- should I make that global?
if trying to map over scalars, just evaluate this function directly |
module HostMemspace = struct end
module Memspace = HostMemspace
QUESTION : How call back into Interp when it depends on a particular
let eval_map ~payload closureArgs argVals =
IFDEF DEBUG THEN Printf.printf "Running MAP on host!\n"; ENDIF;
let dataShapes = List.map (DataManager.get_shape P.memState) a... |
66dc6793ea363d556c3f94fdf5c3f2b2aa870f79ad73687e7cad7e05d36721f5 | innoq/tutorial-clj-webapp | handler_test.clj | (ns tutorial.handler-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[ring.mock.request :as mock]
[tutorial.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (mock/request :get "/"))]
(is (= (:status response) 200))
... | null | https://raw.githubusercontent.com/innoq/tutorial-clj-webapp/3a28aa91b6767f5f7531cf94ec6b69727bdd1e03/tutorial/test/tutorial/handler_test.clj | clojure | (ns tutorial.handler-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[ring.mock.request :as mock]
[tutorial.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (mock/request :get "/"))]
(is (= (:status response) 200))
... | |
691035519a22fb2b74b1dfd74f9f3feec6d441b2dbccc5b24544c6503fb3b799 | otpcl/otpcl | otpcl_pipes.erl | @doc OTPCL pipes up the wazoo . OTPCL treats any command that starts with a
% pipe character (`|') as a command terminator - that is, it'll treat all the
words before it as one command , then resume command parsing . This is a bit
tricky to describe in English , so it 's easier to just show you that this :
%
... | null | https://raw.githubusercontent.com/otpcl/otpcl/b174e6dce625f7bca4772c1bca65f4a9e7bbd769/src/otpcl_pipes.erl | erlang | pipe character (`|') as a command terminator - that is, it'll treat all the
```
'''
...is equivalent to this:
```
foo
| bar
'''
In this case, the `|' happens to take the return value of the
previously-executed command (i.e. the `$RETVAL' variable) and pass it as the
of the above are equivalent to this:
... | @doc OTPCL pipes up the wazoo . OTPCL treats any command that starts with a
words before it as one command , then resume command parsing . This is a bit
tricky to describe in English , so it 's easier to just show you that this :
foo | bar | baz
| baz
first argument to the command named in its own first... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.