_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 |
|---|---|---|---|---|---|---|---|---|
0b53dc0e8165195249be50093add8a9c4fd9ee09d70d04d4d243a5c759e60220 | darioteixeira/pgocaml | ppx_pgsql.ml | PG'OCaml - type safe interface to PostgreSQL .
* Copyright ( C ) 2005 - 2016 and other authors .
*
* This library 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
* versio... | null | https://raw.githubusercontent.com/darioteixeira/pgocaml/1bb0025deeb3d14029afdcc69aaa7847026e243e/ppx/ppx_pgsql.ml | ocaml | * [get_connection key] Find the database connection specified by [key],
* otherwise attempt to create a new one from [key] and return that (or an
* error).
Create a new connection.
Prepare the nullable test - see result conversions below.
Prepare the unravel test.
Prepare the type name query.
Wrapper ... | PG'OCaml - type safe interface to PostgreSQL .
* Copyright ( C ) 2005 - 2016 and other authors .
*
* This library 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
* versio... |
4d0e8e6b0191469d519e3c83bf763f46e63c89d07c5ab98cd7763680d6f470e5 | mcorbin/tour-of-clojure | more_thread-result.clj | 4
12
"Hello"
| null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/more_thread-result.clj | clojure | 4
12
"Hello"
| |
ecd1708de02f408b3da82376136216eba7d021006f6ef08189e36d89348f2000 | matsen/pplacer | kr_distance.ml | Here we have the core agorithm , which takes two placement collection lists
* and calculates their weighted KR distance .
*
* Each query is allocated 1/(num queries ) , and this get broken up by the
* different placements according to their weight . Note that if a placement
* collection has only one en... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/kr_distance.ml | ocaml | add v2 to v1 (which is modified in place)
take the vector sum of a float array list. no side effects.
a is the location of the location of the data along the edge
we pull this out so that we do the next total, then add on the data
* onto the data_sofar
sum things up on final segment to the next node
... | Here we have the core agorithm , which takes two placement collection lists
* and calculates their weighted KR distance .
*
* Each query is allocated 1/(num queries ) , and this get broken up by the
* different placements according to their weight . Note that if a placement
* collection has only one en... |
2741d0fc9769de05b8c6e6004144890e63f69d5855e9bbc7c2edabd12905139a | ahrefs/devkit | time.ml | (** Time *)
open Printf
open ExtLib
open Prelude
(** unix timestamp *)
type t = float
duration in seconds
type duration = float
include (Devkit_ragel : sig exception Parse_compact_duration of string end)
let compare = Factor.Float.compare
let get = Unix.gettimeofday
let now = Unix.gettimeofday
let unsafe_digi... | null | https://raw.githubusercontent.com/ahrefs/devkit/d6b51998f260d9f79fcffa7a73b982923f7ba00f/time.ml | ocaml | * Time
* unix timestamp
"%04u-%02u-%02uT%02u:%02u:%02u%s"
* YYYY-MM-DD
* YYYYMM
* @param cut - only show this number of most significant components
1m10s
* convert integer number of milliseconds to Time.t
* convert integer number of nanoseconds to Time.t |
open Printf
open ExtLib
open Prelude
type t = float
duration in seconds
type duration = float
include (Devkit_ragel : sig exception Parse_compact_duration of string end)
let compare = Factor.Float.compare
let get = Unix.gettimeofday
let now = Unix.gettimeofday
let unsafe_digit n = Char.unsafe_chr (Char.code '... |
1c33a1b350c31032f7ef3c03382f178a1bea4ca0fb459b95bc82020a5c91a415 | SNePS/SNePS2 | xnode.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : XGINSENG ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : xnode.lisp , v 1.2 2013/08/28 19:07:22 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/demo/activation/xnode.lisp | lisp | Syntax : Common - Lisp ; Package : XGINSENG ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitati... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : xnode.lisp , v 1.2 2013/08/28 19:07:22 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " bas... |
c47a2ae761391568b7d2cbed7d96c6f1fb6aaa3760d24f559274b867d08dacd0 | SparkFund/sails-forth | update.clj | (ns sails-forth.update
"Execute SalesForce updates using more idiomatic Clojure syntax."
(:require [clojure.spec.alpha :as s]
[sails-forth.client :as sf]
[sails-forth.clojurify :as sc]
[sails-forth.spec :as spec]))
(defn- get-sf-type-name
[client type]
(let [sf-type (sf/get-... | null | https://raw.githubusercontent.com/SparkFund/sails-forth/acc97f01d5d1bf21ee7139eee9360d363515d737/src/sails_forth/update.clj | clojure | (ns sails-forth.update
"Execute SalesForce updates using more idiomatic Clojure syntax."
(:require [clojure.spec.alpha :as s]
[sails-forth.client :as sf]
[sails-forth.clojurify :as sc]
[sails-forth.spec :as spec]))
(defn- get-sf-type-name
[client type]
(let [sf-type (sf/get-... | |
8dc94f14023308b6d25504bcdcd0d1aca7d4b8a5b6d033691f9f83210b786643 | karlhof26/gimp-scheme | elsamuko-wb-puzzle.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
; (at your option) any later v... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/63d6374fe9a9b76d15a69c789aadb5a91eedaca6/elsamuko-wb-puzzle.scm | scheme | The GIMP -- an image manipulation program
This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of... | Copyright ( C ) 1995 and
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
Copyright ( C ) 2008 elsamuko < >
(define (elsamuko-wb-puzzle aimg adraw puzzlewidth p... |
6fb36d987084290366c589fb14d7466540b033fbccf5166a14c137db7bc8d14d | ocaml-flambda/ocaml-jst | simplify_primitives.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/middle_end/flambda/simplify_primitives.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42-66"]
open! Int_replace_polymor... |
238096d107d52424e15a0d634b42c8cf6c083e51bfa361de47b1f7db4e0a1014 | system-f/fp-course | ExactlyOne.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.ExactlyOne where
import qualified Control.Applicative as A
import qualified Control.Monad as M
import Course.Core
import qualified Prelude as P
data ExactlyOne a = ExactlyOne a deriving (Eq, Show)
runExactlyOne :: ExactlyOne a -> a
runExa... | null | https://raw.githubusercontent.com/system-f/fp-course/ada33f57099f02960b13ccd835d592c8d80e1ffb/src/Course/ExactlyOne.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.ExactlyOne where
import qualified Control.Applicative as A
import qualified Control.Monad as M
import Course.Core
import qualified Prelude as P
data ExactlyOne a = ExactlyOne a deriving (Eq, Show)
runExactlyOne :: ExactlyOne a -> a
runExa... | |
777403a1f8b1d2030c011923a20179cdb2db0327df4effcfa3dc710b3615f790 | ucsd-progsys/nate | topmain.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/toplevel/topmain.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open EzyUtils
open Clflags
let logger... |
31b9c58d09a58128649b0f79391505ec3823984f1ca03694e80a91f761497de1 | AdaCore/why3 | pvs.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/3b8e66acaa0f2df0118728c7c5c8c4a4b47de4f3/src/printer/pvs.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
QUESTIONS FOR THE PVS TEAM
--------------------------
* tuples ( there are native tuples in Why3 )... |
65e16f89bbc14e8d3f8de24f12a4c98e0571f24be70ebfaf515e3b497f656393 | emqx/emqx | emqx_dashboard_error_code.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 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/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_dashboard/src/emqx_dashboard_error_code.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 ) 2020 - 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_dashboard_error_code).
-include_lib("emqx/include/http_api.hrl").
-export([
a... |
9296bf629da11081bdec3ee77b268e9e457d72c3a1fc28b5132cac5be04664e1 | NorfairKing/intray | Types.hs | module Intray.Server.Types
( module Intray.Server.Types,
MonetisationSettings (..),
)
where
import Control.Monad.Logger
import Database.Persist.Sqlite
import Import
import Intray.API
import Intray.Server.OptParse.Types
import Servant
import Servant.Auth.Server
type LF = Loc -> LogSource -> LogLevel -> LogStr ... | null | https://raw.githubusercontent.com/NorfairKing/intray/0a60e000a4091895020bf7f95a9c4485628a1985/intray-server/src/Intray/Server/Types.hs | haskell | module Intray.Server.Types
( module Intray.Server.Types,
MonetisationSettings (..),
)
where
import Control.Monad.Logger
import Database.Persist.Sqlite
import Import
import Intray.API
import Intray.Server.OptParse.Types
import Servant
import Servant.Auth.Server
type LF = Loc -> LogSource -> LogLevel -> LogStr ... | |
bf2d7f4106fd317135d10431bc2fb1dfdc1ace76724683d288294f8c3d2d8ffa | carlwitt/Erlang-Kademlia | systemMonitor.erl | -module(systemMonitor).
-include("include/systemMonitor.hrl").
-include("include/node.hrl").
-include("include/kademliaGlobal.hrl").
-include("include/metric.hrl").
-export([
start/1
]).
%% ----------------------------------------------------
START
%% ----------------------------------------------------
% bo... | null | https://raw.githubusercontent.com/carlwitt/Erlang-Kademlia/913190e677487cf5c3e9d714f591eb7560693a14/systemMonitor.erl | erlang | ----------------------------------------------------
----------------------------------------------------
boot monitor and connect with master node
?ELSE ->
make process known to all nodes
end.
how to display peers
----------------------------------------------------
DEBUG MESSAGES
-----------------------------... | -module(systemMonitor).
-include("include/systemMonitor.hrl").
-include("include/node.hrl").
-include("include/kademliaGlobal.hrl").
-include("include/metric.hrl").
-export([
start/1
]).
START
start(MasterNode) ->
GlobalName = kademliaMonitor,
LocalName = mon,
Connect = net_kernel:connect(Master... |
fa1a71e8ffefbc2607fe2e337384d820bd99cfc9d68ffcc5cbe98b166c7a14a1 | evilbinary/scheme-lib | xml-parse.scm | " xml-parse.scm " XML parsing and conversion to SXML ( Scheme - XML )
Copyright ( C ) 2007
2007 - 04 jaffer : demacrofied from public - domain SSAX 5.1
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the... | null | https://raw.githubusercontent.com/evilbinary/scheme-lib/6df491c1f616929caa4e6569fa44e04df7a356a7/packages/slib/xml-parse.scm | scheme |
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any services, by way of maintenan... | " xml-parse.scm " XML parsing and conversion to SXML ( Scheme - XML )
Copyright ( C ) 2007
2007 - 04 jaffer : demacrofied from public - domain SSAX 5.1
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction... |
dfee7c2a5fd520ea3ec01fd80603ee09bca626527be78668c72c5a64335d1069 | dzaporozhets/clojure-web-application | profile.clj | (ns sample.features.profile
(:require [sample.handler :refer [app]]
[sample.features.helpers :refer :all]
[kerodon.core :refer :all]
[kerodon.test :refer :all]
[clojure.test :refer :all]))
(use-fixtures :each
(fn [f]
(create-user)
... | null | https://raw.githubusercontent.com/dzaporozhets/clojure-web-application/8d813fc95080a8ebc9532c0a4067f540f7f91553/test/sample/features/profile.clj | clojure | (ns sample.features.profile
(:require [sample.handler :refer [app]]
[sample.features.helpers :refer :all]
[kerodon.core :refer :all]
[kerodon.test :refer :all]
[clojure.test :refer :all]))
(use-fixtures :each
(fn [f]
(create-user)
... | |
2b59a4e3d9ef302aabd76e664ec1e0dcb7c72b975bf798c5d9d957f5dfa9ecd6 | MyDataFlow/ttalk-server | alarms_sup.erl | %%%-------------------------------------------------------------------
@author
( C ) 2013 , Erlang Solutions Ltd.
%%% @doc Top level supervisor for alarms application.
%%%
%%% @end
Created : 16 Apr 2013 by
%%%-------------------------------------------------------------------
-module(alarms_sup).
-behaviou... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/alarms/src/alarms_sup.erl | erlang | -------------------------------------------------------------------
@doc Top level supervisor for alarms application.
@end
------------------------------------------------------------------- | @author
( C ) 2013 , Erlang Solutions Ltd.
Created : 16 Apr 2013 by
-module(alarms_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link(?MODULE, []).
init([]) ->
{ok, {{one_for_one, 4, 1},
[
{alarms_server, {alarms_s... |
e790402ed75d2775193f9ff617d0380aeb520116833fe8f2ff65b8449cee6a9b | egri-nagy/lambdago | liberty.clj | (ns lgo.bot.liberty
"A simple bot playing random moves but not filling eyes and targeting
the opponents low liberty number groups."
(:require
[lgo.board :refer [self-capture? put-stone opposite
board-string empty-points eye-fill?]]))
(defn candidate-moves
"Liberty removing moves first,... | null | https://raw.githubusercontent.com/egri-nagy/lambdago/4259c1b36bf2e2eb3da074e71219344f11387212/src/lgo/bot/liberty.clj | clojure | Initially the candidates are all the empty points.
passing if there are no options left
first some checking for illegal/bad moves
if the move is not good, just try the rest | (ns lgo.bot.liberty
"A simple bot playing random moves but not filling eyes and targeting
the opponents low liberty number groups."
(:require
[lgo.board :refer [self-capture? put-stone opposite
board-string empty-points eye-fill?]]))
(defn candidate-moves
"Liberty removing moves first,... |
75f81b402789b3c84f9943712e8dd3b3d84d2f9622cae902dd5573b6e9900d8a | runeksvendsen/restful-payment-channel-server | RunData.hs | module RunData where
import Common . Util ( pathParamEncode )
import Test.GenData
import Data.Aeson (eitherDecodeStrict, ToJSON(toJSON))
import qualified Data.ByteString as BS
import qualified Network.Wreq.Session as Wreq
import qualified Network.Haskoin.Constants as HCC
import Data.String.Conversions (cs)
import Co... | null | https://raw.githubusercontent.com/runeksvendsen/restful-payment-channel-server/0fe65eadccad5ef2b840714623ec407e509ad00b/driver/RunData.hs | haskell | module RunData where
import Common . Util ( pathParamEncode )
import Test.GenData
import Data.Aeson (eitherDecodeStrict, ToJSON(toJSON))
import qualified Data.ByteString as BS
import qualified Network.Wreq.Session as Wreq
import qualified Network.Haskoin.Constants as HCC
import Data.String.Conversions (cs)
import Co... | |
c1f9359f2a522f79b3a6bc96a752f9d7c0c5a834d997431be042a70b76761cd2 | 8c6794b6/guile-tjit | t-br-if-lt-01.scm | ;; Loop with `br-if-<', loop ends with non-backward-jump, takes small
;; fixnum.
(define (loop n)
(let lp ((i 0) (acc 0))
(if (< n i)
acc
(lp (+ i 1) (+ acc 1)))))
(do ((i 0 (+ i 1))
(acc '() (cons (loop 2) acc)))
((= i 65) acc))
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-br-if-lt-01.scm | scheme | Loop with `br-if-<', loop ends with non-backward-jump, takes small
fixnum. |
(define (loop n)
(let lp ((i 0) (acc 0))
(if (< n i)
acc
(lp (+ i 1) (+ acc 1)))))
(do ((i 0 (+ i 1))
(acc '() (cons (loop 2) acc)))
((= i 65) acc))
|
658b6a74094ce30102ee0b5299e897f694a78006d5ac0097a83f59b1a3936b35 | TOTBWF/refinery | Spec.hs | module Main where
import Test.Hspec
import Spec.PropertyTests
import Spec.STLC
main :: IO ()
main = hspec $ do
propertyTests
stlcTests
| null | https://raw.githubusercontent.com/TOTBWF/refinery/288505dc4d88b4ea1c1f2c6cedbf47a82b903202/test/Spec.hs | haskell | module Main where
import Test.Hspec
import Spec.PropertyTests
import Spec.STLC
main :: IO ()
main = hspec $ do
propertyTests
stlcTests
| |
d6d0bd72f6ef11e469692f56bef93638e16c71470fcd7fdb3081ac970359dfeb | vernemq/vernemq | vmq_diversity_redis.erl | Copyright 2018 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_diversity/src/vmq_diversity_redis.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2018 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_diversity_redis).
-include_lib("luerl/include/luerl.hrl").
-behaviour(gen_server).
-behaviour(poolboy_worker).
... |
7547c7eae80f9cdfb794c904553020a1e2d289ed5d36676ccee12659af8ac105 | sdiehl/arithmetic-circuits | Circuit.hs | module Circuit
( module Circuit.Arithmetic,
module Circuit.Lang,
module Circuit.Expr,
)
where
import Circuit.Arithmetic
import Circuit.Expr
import Circuit.Lang
| null | https://raw.githubusercontent.com/sdiehl/arithmetic-circuits/18e15deb2438287820664406c0840067c6ffa301/src/Circuit.hs | haskell | module Circuit
( module Circuit.Arithmetic,
module Circuit.Lang,
module Circuit.Expr,
)
where
import Circuit.Arithmetic
import Circuit.Expr
import Circuit.Lang
| |
870010888eaa821d69a6ca35033ea24157296d7b58bbfa042f201ee7a628b4ab | digitallyinduced/ihp | ScriptGenerator.hs | module IHP.IDE.CodeGen.ScriptGenerator (buildPlan) where
import IHP.Prelude
import IHP.IDE.CodeGen.Types
buildPlan :: Text -> Either Text [GeneratorAction]
buildPlan scriptName =
if null scriptName
then Left "Script name cannot be empty"
else do
let filePath = "Application/Script/" <>... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/62ca014a3d986e35da0fb05a4b1e84e5831e87cf/IHP/IDE/CodeGen/ScriptGenerator.hs | haskell | module IHP.IDE.CodeGen.ScriptGenerator (buildPlan) where
import IHP.Prelude
import IHP.IDE.CodeGen.Types
buildPlan :: Text -> Either Text [GeneratorAction]
buildPlan scriptName =
if null scriptName
then Left "Script name cannot be empty"
else do
let filePath = "Application/Script/" <>... | |
a0204fc7d53f3cf4502d972c24b5f729fa8edf617ce2fe2126eb1f747b9b0405 | TorXakis/TorXakis | ParamServer.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
-- ------------------------------------... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/serverenv/src/ParamServer.hs | haskell | ----------------------------------------------------------------------------------------- --
----------------------------------------------------------------------------------------- --
----------------------------------------------------------------------------------------- --
export
Params = Map.Map String (... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module ParamServer
TorXakis Server ... |
fa4b11c558ffda4a2b00e17bc28723f3cad43de565554f2eb72af045a8d4794a | madvas/emojillionaire | player_profile_page.cljs | (ns emojillionaire.components.player-profile-page
(:require
[cljs-react-material-ui.icons :as icons]
[cljs-react-material-ui.reagent :as ui]
[emojillionaire.components.emoji :refer [emoji]]
[emojillionaire.components.layout :refer [grid row col outer-paper headline]]
[emojillionaire.components.win... | null | https://raw.githubusercontent.com/madvas/emojillionaire/ee47e874db0c88b91985b6f9e72221f12d3010ff/src/cljs/emojillionaire/components/player_profile_page.cljs | clojure | (ns emojillionaire.components.player-profile-page
(:require
[cljs-react-material-ui.icons :as icons]
[cljs-react-material-ui.reagent :as ui]
[emojillionaire.components.emoji :refer [emoji]]
[emojillionaire.components.layout :refer [grid row col outer-paper headline]]
[emojillionaire.components.win... | |
cf9037c711edcabf011c379d10c5ff43b17ea0e21b37d8b05ea9ac2db62d6396 | Soyn/sicp | Ex2.46.rkt | #lang racket
Ex2.46
(define (make-vect xcor ycor)
(cons xcor ycor))
(define (xcor-vect vector)
(car vector))
(define (ycor-vect vector)
(cdr vector))
(define (add-vect vec1 vec2)
(make-vect ( + (xcor-vect vec1) (xcor-vect vec2))
(+ (ycor-vect vec1) (ycor-vect vec2))))
(define (sub-vect vec1 v... | null | https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.2/Ex2.46.rkt | racket | test uasge | #lang racket
Ex2.46
(define (make-vect xcor ycor)
(cons xcor ycor))
(define (xcor-vect vector)
(car vector))
(define (ycor-vect vector)
(cdr vector))
(define (add-vect vec1 vec2)
(make-vect ( + (xcor-vect vec1) (xcor-vect vec2))
(+ (ycor-vect vec1) (ycor-vect vec2))))
(define (sub-vect vec1 v... |
1b7766f8bd2bacc195dbd3330dcca6638706525f11ee82c268314967c4fe19c3 | hugoduncan/criterium | well.clj | Copyright ( c ) . All rights reserved .
;;;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;;;; which can be found in the file epl-v10.html at the root of this distribution.
;;;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/hugoduncan/criterium/2bd99c496558472009de6a1984b02bc6fda75095/src/criterium/well.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
/~p... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
Improved Long - Period Generators Based on Linear Recurrences Modulo 2
F. Panneton , P. L'Ecuyer and
(ns criterium.well)
Macros to help convert unsigned algorithm to our implementation with signed
unsign is used to conve... |
4fdc828065647f19a1f385e66ba34ee4a547dbdf8077ca853dd9a63e265671fe | graninas/Functional-Design-and-Architecture | BrainfuckSpec.hs | module BrainfuckSpec where
import Test.Hspec
import qualified Data.Map as Map
import Data.IORef
incPointer, decPointer :: Char
jumpForward, jumpBackward :: Char
incVal, decVal :: Char
input :: Char
output :: Char
incPointer = '>'
decPointer = '<'
incVal = '+'
decVal = '-'
input = ','
output... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/9920430c0d9c0754655591a003b92988ac659bf9/Second-Edition-Manning-Publications/BookSamples/CH07/Section7p2p3/test/BrainfuckSpec.hs | haskell | module BrainfuckSpec where
import Test.Hspec
import qualified Data.Map as Map
import Data.IORef
incPointer, decPointer :: Char
jumpForward, jumpBackward :: Char
incVal, decVal :: Char
input :: Char
output :: Char
incPointer = '>'
decPointer = '<'
incVal = '+'
decVal = '-'
input = ','
output... | |
e341e8bac2517d1a45ced22ac2b3e67db9345f785215049455bb541771627ca0 | icicle-lang/zebra-ambiata | Striped.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Test.Zebra.Serial.Json.Striped where
import Disorder.Jack (Property, forAllProperties, quickCheckWithResult, maxSuccess, stdArgs)
import Disorder.Jack (gamble)
import P
import System.IO (IO)
import T... | null | https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/test/Test/Zebra/Serial/Json/Striped.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Test.Zebra.Serial.Json.Striped where
import Disorder.Jack (Property, forAllProperties, quickCheckWithResult, maxSuccess, stdArgs)
import Disorder.Jack (gamble)
import P
import System.IO (IO)
import T... | |
9c6ac108fcd4bc9194241eac09e6c4a0aa0f4c1e9c82fe3f7cdc2c362eefd57d | renatoalencar/ocaml-socks-client | unikernel.ml | open Lwt.Infix
let (let*) a f = a >>= f
module Main (S: Mirage_stack.V4) = struct
module Proxy = Mirage_socks4.Make(S)
let make_request host =
[ "GET / HTTP/1.1"
; "Host: " ^ host
; ""
; "" ]
|> String.concat "\r\n"
|> Cstruct.of_string
let send flow buf =
S.TCPV4.write flow buf >|... | null | https://raw.githubusercontent.com/renatoalencar/ocaml-socks-client/ff413ad0c0c8e7c2ea96c39c64b7e4a0101388d4/examples/mirage/unikernel.ml | ocaml | open Lwt.Infix
let (let*) a f = a >>= f
module Main (S: Mirage_stack.V4) = struct
module Proxy = Mirage_socks4.Make(S)
let make_request host =
[ "GET / HTTP/1.1"
; "Host: " ^ host
; ""
; "" ]
|> String.concat "\r\n"
|> Cstruct.of_string
let send flow buf =
S.TCPV4.write flow buf >|... | |
fca1303c4d6db16b84cee3a68b60e39955744fbe6c36b884a59abcf4d58d4f27 | atzeus/type-aligned | ConsList.hs | # LANGUAGE CPP #
{-# LANGUAGE GADTs #-}
#if __GLASGOW_HASKELL__ >= 706
# LANGUAGE PolyKinds #
#endif
-----------------------------------------------------------------------------
-- |
Module : Data . TASequence . ConsList
Copyright : ( c ) 2014
-- License : BSD-style
-- Maintainer :
-- S... | null | https://raw.githubusercontent.com/atzeus/type-aligned/b3b150eee234b7c5bfe4b2c973b7936b21b6925c/Data/TASequence/ConsList.hs | haskell | # LANGUAGE GADTs #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
A type aligned sequence, a head-tail list, with worst case constant time: '<|', and 'tviewl'.
-----------------------------... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 706
# LANGUAGE PolyKinds #
#endif
Module : Data . TASequence . ConsList
Copyright : ( c ) 2014
module Data.TASequence.ConsList(module Data.TASequence,ConsList(..)) where
import Control.Category
import Data.TASequence
data ConsList c x y where
CNil :... |
b26fcd6a2674bd9ec0135f6f52b36343f2af6c4d3b6965852892bd6fca4b37c6 | kyleburton/sandbox | project.clj | (defproject scratchpad "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main ^:skip-aot scratchpad.core
:global-vars {*warn-on-reflection* true}
:dependencies [
[org.clojure/clojure "... | null | https://raw.githubusercontent.com/kyleburton/sandbox/1164c96c1c0de0948e8666e2ad8a06bbc673d37a/conferences/2016-SCNA-Day2/conways-game-of-life/clojure-game-of-life/project.clj | clojure | (defproject scratchpad "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main ^:skip-aot scratchpad.core
:global-vars {*warn-on-reflection* true}
:dependencies [
[org.clojure/clojure "... | |
49c2351498b3feb023c894f736c4412115fe0293f4239d72d1f97f64744b0f96 | AccelerateHS/accelerate-llvm | Transform.hs | # LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
-- Module : Data.Array.Accelerate.LLVM.PTX.CodeGen.Transform
Copyright : [ 2014 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stab... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/57136bfc67f0da8ea0a0aba0172397a2e92d3378/accelerate-llvm-ptx/src/Data/Array/Accelerate/LLVM/PTX/CodeGen/Transform.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Data.Array.Accelerate.LLVM.PTX.CodeGen.Transform
License : BSD3
Stability : experimental
accelerate
Apply a unary function to each element of an array. Each thread processes
multiple elements, striding the array by the grid size.
| # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright : [ 2014 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.PTX.CodeGen.Transform
where
import Data.Array.Accele... |
a3edd9d9294c85079211d2c238ff3df43fe7204652195c3df4b95d6f90b97f1c | penpot/penpot | bool.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.data.workspace.bool
(:require
[app.common.data :as d]
[app.common.geom.shapes :as gsh]
... | null | https://raw.githubusercontent.com/penpot/penpot/8c618f95f7ecd392c175d7be61181a5b44146c9c/frontend/src/app/main/data/workspace/bool.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.data.workspace.bool
(:require
[app.common.data :as d]
[app.common.geom.shapes :as gsh]
[app.common.pages.changes-builde... |
df46840e6d6fd530bed632a87fde1d7d35bc33fa2a3fc891a0e6510d1c4547c8 | hipsleek/hipsleek | monads.ml | #include "xdebug.cppo"
open Typeclass
(* module for typevar t *)
module type TypeVar = sig type t end
(* module for typevar t2 *)
module type TypeVar2 = sig type t2 end
(* monad m basics *)
module type Monad_B = sig
type 'a m
val return : 'a -> 'a m
val bind : 'a m -> ('a -> 'b m) -> 'b m
end
(* monad m wit... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/monads.ml | ocaml | module for typevar t
module for typevar t2
monad m basics
monad m with extensions
instance state monad basic
instance state monad extension
evaluate and get value
run and get state
instance state monad with everything
instantiating int for t
instance state monad with int for t
to implement List M... | #include "xdebug.cppo"
open Typeclass
module type TypeVar = sig type t end
module type TypeVar2 = sig type t2 end
module type Monad_B = sig
type 'a m
val return : 'a -> 'a m
val bind : 'a m -> ('a -> 'b m) -> 'b m
end
module Monad_E (M : Monad_B) = struct
open M
let seq m f = bind m (fun _ -> f)
let ... |
c5ac948eacaafe2f4026e4bb7d271eb311fa905d22a9300103551bf14bf732ff | flosell/lambdacd | history_test.cljs | (ns lambdacd.history-test
(:require [cljs.test :refer-macros [deftest is testing run-tests]]
[lambdacd.dom-utils :as dom]
[dommy.core :refer-macros [sel sel1]]
[lambdacd.history :as history]
[lambdacd.testutils :as tu]))
(deftest history-test-cljs
(testing "that the ... | null | https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/cljs/lambdacd/history_test.cljs | clojure | (ns lambdacd.history-test
(:require [cljs.test :refer-macros [deftest is testing run-tests]]
[lambdacd.dom-utils :as dom]
[dommy.core :refer-macros [sel sel1]]
[lambdacd.history :as history]
[lambdacd.testutils :as tu]))
(deftest history-test-cljs
(testing "that the ... | |
89899853b860b64d73b7f4d4041ea417bcd31778cd1f7aebaa2e0bf972d4ab2d | mauricioszabo/repl-tooling | stacktraces_test.cljs | (ns repl-tooling.editor-integration.stacktraces-test
(:require [devcards.core :as cards :include-macros true]
[clojure.test]
[promesa.core :as p]
[repl-tooling.integration.fake-editor :as fake]
[check.async :refer [async-test check testing]]))
(defn- click-link [link-t... | null | https://raw.githubusercontent.com/mauricioszabo/repl-tooling/1cea9b411cc118d71266cb8e035e146325baf410/test/repl_tooling/editor_integration/stacktraces_test.cljs | clojure | (ns repl-tooling.editor-integration.stacktraces-test
(:require [devcards.core :as cards :include-macros true]
[clojure.test]
[promesa.core :as p]
[repl-tooling.integration.fake-editor :as fake]
[check.async :refer [async-test check testing]]))
(defn- click-link [link-t... | |
fcc18d5148e7d85b7837b9c66bec4dbcbeb18724be49e7d7baa5672812e50432 | magnusjonsson/unitc | FindUnit.hs | # LANGUAGE FlexibleInstances #
module FindUnit where
import Unit
import Monad.Analysis
import Control.Monad
import Control.Monad.Extra
import Language.C.Pretty
import Language.C.Data.Ident
import Language.C.Data.Position
import Language.C.Syntax.Constants
import Language.C.Syntax.AST
class FindUnit a where
findU... | null | https://raw.githubusercontent.com/magnusjonsson/unitc/4cf5aaf99055aa487b3581803d6534e04c90a5de/app/FindUnit.hs | haskell | # LANGUAGE FlexibleInstances #
module FindUnit where
import Unit
import Monad.Analysis
import Control.Monad
import Control.Monad.Extra
import Language.C.Pretty
import Language.C.Data.Ident
import Language.C.Data.Position
import Language.C.Syntax.Constants
import Language.C.Syntax.AST
class FindUnit a where
findU... | |
32f0ccde2ee2950654bf59a829b7f445be09a2e00b18ab04043b980050b1aeaa | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $
-- This repository contains a Cabal-1.18.0.0 option, which would
-- normally would satisfy the repository, except for v2-build's
extra constraint that setup must be 1.20 . If we do n't
-- have a choice like this available, the unsatisfied constraint
-- w... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Regression/T3932/cabal.test.hs | haskell | This repository contains a Cabal-1.18.0.0 option, which would
normally would satisfy the repository, except for v2-build's
have a choice like this available, the unsatisfied constraint
won't be reported.
version
Don't record because output wobbles based on installed database. | import Test.Cabal.Prelude
main = cabalTest $
extra constraint that setup must be 1.20 . If we do n't
Due to # 415 , the lower bound may be even higher based on GHC
withRepo "repo" $ do
recordMode DoNotRecord $ do
fails (cabal' "v2-build" []) >>=
assertOutputContains "Setup... |
838f639e43054023cbc5dd0fc8706356dc7af51a8886587a99dc0dc186ea8c71 | spawnfest/eep49ers | app_faulty_server.erl | -module(app_faulty_server).
-behaviour(gen_server).
%% API
-export([start_link/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
init([]) ->
an_undefined_module... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/supervisor_SUITE_data/app_faulty/src/app_faulty_server.erl | erlang | API
gen_server callbacks | -module(app_faulty_server).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
init([]) ->
an_undefined_module_with:an_undefined_function(arg... |
9bc69d18d66577c917ec62658bf664964371175ef7c8fdb542e2767de510e464 | mbattyani/cl-pdf | zlib.work.lisp | cl - pdf copyright 2002 see license.txt for the details
;;; You can reach me at or
;;; The homepage of cl-pdf is here: -pdf.html
(in-package pdf)
(eval-when (:load-toplevel :execute)
(unless (uffi:load-foreign-library
#-(or macosx darwin)
(uffi:find-foreign-library
"libz"
'("/usr/local/lib/"... | null | https://raw.githubusercontent.com/mbattyani/cl-pdf/dbafd62afcb2d2e9164054c72612763721297d59/contrib/zlib.work.lisp | lisp | You can reach me at or
The homepage of cl-pdf is here: -pdf.html
Must be > *z-block-size* | cl - pdf copyright 2002 see license.txt for the details
(in-package pdf)
(eval-when (:load-toplevel :execute)
(unless (uffi:load-foreign-library
#-(or macosx darwin)
(uffi:find-foreign-library
"libz"
'("/usr/local/lib/" "/usr/lib/" "/zlib/")
:drive-letters '("C" "D" "E")
:types '("so... |
343e0188d5811731db1510152631de27a6d6f6d198a5186f4ec36e8ea84410ee | tjammer/raylib-ocaml | audio_multichannel_sound.ml | let width = 800
let height = 450
let setup () =
let open Raylib in
init_window width height "raylib [audio] example - Multichannel sound playing";
init_audio_device ();
let fx_wav = load_sound "resources/sound.wav" in
let fx_ogg = load_sound "resources/target.ogg" in
set_sound_volume fx_wav 0.2;
set_t... | null | https://raw.githubusercontent.com/tjammer/raylib-ocaml/76955c30d0a776138daeb93bfc73b104aefc6f6d/examples/audio/audio_multichannel_sound.ml | ocaml | let width = 800
let height = 450
let setup () =
let open Raylib in
init_window width height "raylib [audio] example - Multichannel sound playing";
init_audio_device ();
let fx_wav = load_sound "resources/sound.wav" in
let fx_ogg = load_sound "resources/target.ogg" in
set_sound_volume fx_wav 0.2;
set_t... | |
601be2e863cebe06324607d07c5acfaa883faae0445461b09b4653719da1515c | metosin/palikka | rabbitmq.clj | (ns palikka.components.rabbitmq
(:require [clojure.tools.logging :as log]
[com.stuartsierra.component :as component]
[schema.core :as s]
[langohr.core :as rmq]
[palikka.coerce :as c])
(:import [com.rabbitmq.client Connection]))
(s/defschema Config
{(s/optional-key ... | null | https://raw.githubusercontent.com/metosin/palikka/77e3a1fc6f7ea87bfd9697d8583528285088e50e/src/palikka/components/rabbitmq.clj | clojure | (ns palikka.components.rabbitmq
(:require [clojure.tools.logging :as log]
[com.stuartsierra.component :as component]
[schema.core :as s]
[langohr.core :as rmq]
[palikka.coerce :as c])
(:import [com.rabbitmq.client Connection]))
(s/defschema Config
{(s/optional-key ... | |
87149abdf38c73f5b514c7c3f8e18ceee9ca1d7198738be198d7805092cb0bf6 | cmsc430/www | defns.rkt | #lang racket
(provide (all-defined-out))
(require scribble/core scribble/html-properties scribble/manual)
(define prof (link "jmct.cc" "JMCT"))
(define prof-pronouns "he/him")
(define prof-email "jmct")
(define prof-initials "JMCT")
(define semester "spring")
(define year "2023")
(define courseno "CMSC 430")
(defin... | null | https://raw.githubusercontent.com/cmsc430/www/d828ded67895ee54379e148262fa46cf1c0d2b4e/www/defns.rkt | racket | #lang racket
(provide (all-defined-out))
(require scribble/core scribble/html-properties scribble/manual)
(define prof (link "jmct.cc" "JMCT"))
(define prof-pronouns "he/him")
(define prof-email "jmct")
(define prof-initials "JMCT")
(define semester "spring")
(define year "2023")
(define courseno "CMSC 430")
(defin... | |
e875610739f36cea729d1f276c6ae7c44f3b32e74e77803d999bf9607d937a70 | ndmitchell/extra | Main.hs | module Main where
import Criterion.Main (bench, bgroup, defaultMain, nf)
import Data.List.Extra
main :: IO ()
main = defaultMain
[ bgroup "nubOrd"
[ bench "Int: Many repeats" $ nf nubOrd intMany
, bench "Int: Few repeats " $ nf nubOrd intFew
, bench "String: Many repeats" $ nf nubOrd stringMany
, be... | null | https://raw.githubusercontent.com/ndmitchell/extra/abe48a1d92b1b354c8f14b86405f4e5ece5bfddd/benchmark/Main.hs | haskell | module Main where
import Criterion.Main (bench, bgroup, defaultMain, nf)
import Data.List.Extra
main :: IO ()
main = defaultMain
[ bgroup "nubOrd"
[ bench "Int: Many repeats" $ nf nubOrd intMany
, bench "Int: Few repeats " $ nf nubOrd intFew
, bench "String: Many repeats" $ nf nubOrd stringMany
, be... | |
ce2094596845cde97686d7c1f273afdac3c4cf8dc19ced2e78eb5d50d6c1a913 | zelark/nano-id | core_test.cljc | (ns nano-id.core-test
(:require #?(:clj [clojure.test :refer [deftest is testing]])
#?(:cljs [cljs.test :refer-macros [deftest is testing]])
[nano-id.core :refer [nano-id custom alphabet]]))
(def nano-ids (repeatedly nano-id))
(defn ^boolean valid-id? [id]
(re-matches #"^[A-Za-z0-9_-]+$" id))
(d... | null | https://raw.githubusercontent.com/zelark/nano-id/be4564fab4594d3fcf755b563563a2e3af700459/test/nano_id/core_test.cljc | clojure | Tests | (ns nano-id.core-test
(:require #?(:clj [clojure.test :refer [deftest is testing]])
#?(:cljs [cljs.test :refer-macros [deftest is testing]])
[nano-id.core :refer [nano-id custom alphabet]]))
(def nano-ids (repeatedly nano-id))
(defn ^boolean valid-id? [id]
(re-matches #"^[A-Za-z0-9_-]+$" id))
(d... |
70c87a7dd6ee7db2608f09306a6c5bd623fbd3788b344f8e350042cf1cb0a66d | aesiniath/unbeliever | Identifiers.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE ImportQualifiedPost #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_HADDOCK prune #-}
|
Machinery for generating identifiers to be used in traces and... | null | https://raw.githubusercontent.com/aesiniath/unbeliever/c00fa0e0595ef9f68e6fc2284372eb27342022b8/core-telemetry/lib/Core/Telemetry/Identifiers.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# OPTIONS_HADDOCK prune #
* Internals
for testing
convert a nibble to its hexidecimal character equivalent
get the map out | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE QuasiQuotes #
|
Machinery for generating identifiers to be used in traces and spans . Meets the
requirements of the [ W3C Trace
Context]( / TR / trace - context/#traceparent - header )
specifica... |
33895c79f30856673526810a64110ce2d3c43ce73526673a358a09217745e2fc | mitchellwrosen/dohaskell | devel.hs | {-# LANGUAGE PackageImports #-}
import "dohaskell" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| null | https://raw.githubusercontent.com/mitchellwrosen/dohaskell/69aea7a42112557ac3e835b9dbdb9bf60a81f780/app/devel.hs | haskell | # LANGUAGE PackageImports # | import "dohaskell" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
|
36f11b6728232c4c4488f85acd8868b98fb2ea1a60bc9498725444215989c1ae | esl/MongooseIM | metrics_register_SUITE.erl | %%==============================================================================
Copyright 2013 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/esl/MongooseIM/c138fdc02569ae2ad390d7e24f291d7c2b8efa10/big_tests/tests/metrics_register_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 ex... | Copyright 2013 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(metrics_register_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("escalus/include/escalus.hrl").
-include_lib("c... |
b20cc0f5e0a040367adbe4ef47f13fdd723ea31ce3c14d6ee5aebaed56ce3544 | jrheard/voke | clock.cljs | (ns voke.clock
"A system for tracking the amount of sim time (as opposed to wall time) that's elapsed."
(:require [cljs.spec :as s]))
(defonce ^:private clock (atom 0))
(defn now [] @clock)
(defn add-time! [dt]
(swap! clock + dt))
(s/fdef add-time!
:args (s/and (s/cat :dt number?)
#(pos? (% :... | null | https://raw.githubusercontent.com/jrheard/voke/15b272955d214ce0c531fb2b8d645feb217255c2/src/voke/clock.cljs | clojure | (ns voke.clock
"A system for tracking the amount of sim time (as opposed to wall time) that's elapsed."
(:require [cljs.spec :as s]))
(defonce ^:private clock (atom 0))
(defn now [] @clock)
(defn add-time! [dt]
(swap! clock + dt))
(s/fdef add-time!
:args (s/and (s/cat :dt number?)
#(pos? (% :... | |
b06dcdf3054f32c18e91724484537304f9431f134aab5b5e4517366b7a801996 | nikodemus/SBCL | smoke.impure.lisp | ;;;; rudimentary tests ("smoke tests") for miscellaneous stuff which
;;;; doesn't seem to deserve specialized files at the moment
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one)... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/smoke.impure.lisp | lisp | rudimentary tests ("smoke tests") for miscellaneous stuff which
doesn't seem to deserve specialized files at the moment
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS ... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(cl:in-package :cl-user)
ROOM should run without signalling an error . ( bug 247 )
(room)
(room t)
(room nil)
(copy-symbol 'foo)
(copy-symbol 'bar t)
(defvar *baz*... |
dcd8edfb8cdbd863400fa8604c3ebec2a9d8a9ea1c71367c6005202688eb8e68 | dbuenzli/mu | mu_player.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2021 The mu programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/mu/1bb96303491fe13ee8ed7b4226797e92cbec4c1f/src/mu_player.mli | ocaml | * Play MIDI music (temporary hack).
Needs [timidity] or [vlc] in your [PATH].
* [play m] plays music [m] by shelling out to [timidity] or [vlc].
* [write_midi_file f m] writes a MIDI file for [m] to [f]. | ---------------------------------------------------------------------------
Copyright ( c ) 2021 The mu programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
2c22f5416edc4cf3072c3f2d7a13a4849d5ff43f6c795764931aae3362859f7f | Soostone/hs-d3 | Style.hs | ------------------------------------------------------------------------------
-- | A DSL for generating SVG transform strings.
------------------------------------------------------------------------------
{-# LANGUAGE ExtendedDefaultRules #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
... | null | https://raw.githubusercontent.com/Soostone/hs-d3/fb319ba444e263d7bc9655436db2723115a01c46/src/Graphics/HSD3/D3/Style.hs | haskell | ----------------------------------------------------------------------------
| A DSL for generating SVG transform strings.
----------------------------------------------------------------------------
# LANGUAGE ExtendedDefaultRules #
----------------------------------------------------------------------------
| Orie... |
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - type - defaults #
module Graphics.HSD3.D3.Style where
import Control.Monad
import Language.Javascript.JMacro
import Graphics.HSD3.D3.Cursor
import Graphics.HSD3.D3.Graph
import ... |
37c3359f352dc1762b9b63f0b5c5bb829a3f9c56fa18534abd5ccd463527353b | ghcjs/jsaddle-dom | PasswordCredential.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.PasswordCredential
(newPasswordCredential, newPasswordCredential', setIdName,
getIdName, setPasswordName, g... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/PasswordCredential.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.PasswordCredential
(newPasswordCredential, newPasswordCredential', setIdName,
getIdName, setPasswordName, getPasswordName, setAdditionalData,
getAdditionalData, getAdditionalDataUnsafe,
getA... |
b7bdf80ae958030fd5c901a1fb9631e3fc7b7625bb7553db4e1e78c872081189 | gwkkwg/cl-containers | package.lisp | (in-package #:common-lisp-user)
(defpackage #:metabang.cl-containers.test
(:use #:common-lisp #:cl-containers #:lift)
(:nicknames #:cl-containers-test)
(:import-from #:metatilities
#:deprecated
#:defclass*
#:defcondition
#:ensure-list
... | null | https://raw.githubusercontent.com/gwkkwg/cl-containers/3d1df53c22403121bffb5d553cf7acb1503850e7/tests/package.lisp | lisp | (in-package #:common-lisp-user)
(defpackage #:metabang.cl-containers.test
(:use #:common-lisp #:cl-containers #:lift)
(:nicknames #:cl-containers-test)
(:import-from #:metatilities
#:deprecated
#:defclass*
#:defcondition
#:ensure-list
... | |
89fd8fbd1fe7301b4e07b9a909170a5576ba45e642889777f431be38c2c7a549 | racehub/om-bootstrap | basic.cljs | #_
(:require [om-bootstrap.progress-bar :as pb])
(pb/progress-bar {:min 0 :max 100 :now 50}) | null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/progressbar/basic.cljs | clojure | #_
(:require [om-bootstrap.progress-bar :as pb])
(pb/progress-bar {:min 0 :max 100 :now 50}) | |
38ac173891e75d9d33c62994d5f1a019a3572f6a02ccdb1ef2aaacd0d724530a | GaloisInc/daedalus | Specialise.hs | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings , NamedFieldPuns #
# LANGUAGE GADTs , RankNTypes , ScopedTypeVariables , DataKinds , TupleSections #
# LANGUAGE FlexibleContexts , KindSignatures , PolyKinds #
# LANGUAGE RecordWildCards #
|
Specialise rules polymorphic rules and those which have
gramma... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/fc4a345c98be35cb9fcb3ea9f8a7f2f8e25e8607/src/Daedalus/Specialise.hs | haskell | ` as ` are the type parameters to the function
`as` are the type parameters to the function
-----------------------------------------------------------------------------
Top level driver
| This assumes that the declratations are in dependency order.
do so, we can discard the input tdecl (FIXME: I think?), the
r... | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings , NamedFieldPuns #
# LANGUAGE GADTs , RankNTypes , ScopedTypeVariables , DataKinds , TupleSections #
# LANGUAGE FlexibleContexts , KindSignatures , PolyKinds #
# LANGUAGE RecordWildCards #
|
Specialise rules polymorphic rules and those which have
gramma... |
4102e31dbfc7d1bcde03a1d57d5fb7498dfa6efc55bbcf0d63d6f788051d2916 | infinisil/aoc18 | Main.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Monad.Cont
import Control.Monad.ST
import Control.Monad.State
import Data.Bifunc... | null | https://raw.githubusercontent.com/infinisil/aoc18/049fae7c7a6b636fd65d5d5c188a4f7dc7bf5063/aoc14/src/Main.hs | haskell | # LANGUAGE RankNTypes #
# SCC "case" #
# SCC "ifthing" #
when (n1 /= 0) $ push arr n1
push arr n2 | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Monad.Cont
import Control.Monad.ST
import Control.Monad.State
import Data.Bifunctor
import Data.List
import ... |
ec7e30321c985905e64d54ee229f03c8778f99c853e130700ad2a6857dc41cc3 | Clojure2D/clojure2d-examples | material.clj | (ns rt4.the-rest-of-your-life.ch06b.material
(:require [rt4.common :as common]
[rt4.the-rest-of-your-life.ch06b.ray :as ray]
[rt4.the-rest-of-your-life.ch06b.texture :as texture]
[rt4.the-rest-of-your-life.ch06b.hittable]
[fastmath.vector :as v]
[fastmath.co... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/f47e1655902cc6bf1590aaecc144ac274ed3af66/src/rt4/the_rest_of_your_life/ch06b/material.clj | clojure | (ns rt4.the-rest-of-your-life.ch06b.material
(:require [rt4.common :as common]
[rt4.the-rest-of-your-life.ch06b.ray :as ray]
[rt4.the-rest-of-your-life.ch06b.texture :as texture]
[rt4.the-rest-of-your-life.ch06b.hittable]
[fastmath.vector :as v]
[fastmath.co... | |
e100237530e06ef9da5a6cbe2b6b96c733190c602cb657538c2325bfd35a27c1 | mirage/ocaml-git | carton_git.ml | module type STORE = sig
type 'a rd = < rd : unit ; .. > as 'a
type 'a wr = < wr : unit ; .. > as 'a
type 'a mode =
| Rd : < rd : unit > mode
| Wr : < wr : unit > mode
| RdWr : < rd : unit ; wr : unit > mode
type t
type uid
type 'a fd
type error
type +'a fiber
val pp_error : error Fmt.t
... | null | https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/carton-git/carton_git.ml | ocaml | module type STORE = sig
type 'a rd = < rd : unit ; .. > as 'a
type 'a wr = < wr : unit ; .. > as 'a
type 'a mode =
| Rd : < rd : unit > mode
| Wr : < wr : unit > mode
| RdWr : < rd : unit ; wr : unit > mode
type t
type uid
type 'a fd
type error
type +'a fiber
val pp_error : error Fmt.t
... | |
eccff7fbfd7805e7f8943438f982a140b752e33495f2a78839eebe6d8232c506 | fogfish/datum | generic_SUITE.erl | %%
Copyright ( c ) 2016 ,
%% All Rights Reserved.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed t... | null | https://raw.githubusercontent.com/fogfish/datum/f5e8f0b5deb8b74d6febe046333dbb4f38b086d8/test/generic_SUITE.erl | erlang |
All Rights Reserved.
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... | Copyright ( c ) 2016 ,
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(generic_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile({parse_transform, generic}).
-export([all/0]).
-export([
syntax... |
bbabba59766b77639152eefbb82fb5659f33967dcb1b36cf5140c0f2894b7e95 | uncomplicate/bayadera | project.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/bayadera/4105fd0e02bbe1cb19b9413f454075d61def6945/project.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(defproject uncomplicate/bayadera "0.4.0-SNAPSHOT"
:description "Bayesian Inference and Probabilistic Machine Learning Library for Clojure"
:author "Dragan Djuric"
:url ""
:scm {:name "git"
:url ""}
:license {:name "Eclipse Public License"
:ur... |
21e6368732fc39f1cd5ba025f859622b125203a4c03983ee666bab695cc57a2d | bhauman/devcards | errors.cljs | (ns devdemos.errors
(:require
[devcards.core :as devcards]
[sablono.core :as sab :include-macros true]
[cljs.test :as t :include-macros true])
(:require-macros
[devcards.core :as dc :refer [defcard defcard-doc deftest dom-node]]))
(defcard
"#Errors
Below are examples of various fai... | null | https://raw.githubusercontent.com/bhauman/devcards/65caa84c9438dd8bdf8cd21964e6033b1a22c178/example_src/devdemos/errors.cljs | clojure | (ns devdemos.errors
(:require
[devcards.core :as devcards]
[sablono.core :as sab :include-macros true]
[cljs.test :as t :include-macros true])
(:require-macros
[devcards.core :as dc :refer [defcard defcard-doc deftest dom-node]]))
(defcard
"#Errors
Below are examples of various fai... | |
33d879d4e27f454699b59cbac839092ccfb2284bc46d27ac07950c290734129b | fossas/fossa-cli | Perl.hs | module Strategy.Perl (
discover,
-- * for testing
PackageName (..),
PerlMeta (..),
buildGraph,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Applicative ((<|>))
import Control.Effect.Diagnostics (Diagnostics, context)
import Control.Effect.Reader (R... | null | https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/Perl.hs | haskell | * for testing
Reference: -mymeta_requires/view/bin/mymeta-requires
| Represents Metafile for various versions.
References:
v1.0: -build.sourceforge.net/META-spec-v1.0.html
v1.1: -build.sourceforge.net/META-spec-v1.1.html
v1.2: -build.sourceforge.net/META-spec-v1.2.html
v1.3: -build.sourceforge.net/META-spec-v1.... | module Strategy.Perl (
discover,
PackageName (..),
PerlMeta (..),
buildGraph,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Applicative ((<|>))
import Control.Effect.Diagnostics (Diagnostics, context)
import Control.Effect.Reader (Reader)
import Data.... |
3e661fe9e0e5dc1d9a9bf7b34d9e17ec36b21f9676a96b0cb8ad4272102185df | robrix/isometry | CLI.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
module Isometry.CLI
( Options(..)
, ShouldProfile(..)
, ShouldTrace(..)
, ShouldCheck(..)
, defaultOptions
, profile_
, trace_
, check_
, argumentsParser
-- * Re-exports
, execParser
) where
import Control.Lens
import ... | null | https://raw.githubusercontent.com/robrix/isometry/171b9261b8d7ea32c86ce6019c8c3973742f0349/src/Isometry/CLI.hs | haskell | * Re-exports | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
module Isometry.CLI
( Options(..)
, ShouldProfile(..)
, ShouldTrace(..)
, ShouldCheck(..)
, defaultOptions
, profile_
, trace_
, check_
, argumentsParser
, execParser
) where
import Control.Lens
import Data.Flag
import ... |
cceb2884c57cfe35ef0a43ea5b88c84e3446629f43adf2d515d9b1c955273dd3 | incoherentsoftware/defect-process | Data.hs | module Enemy.All.Turret.Data
( TurretEnemyData(..)
, mkTurretEnemyData
) where
import Control.Monad.IO.Class (MonadIO)
import Configs
import Configs.All.Enemy
import Configs.All.Enemy.Turret
import Enemy.All.Turret.AttackDescriptions
import Enemy.All.Turret.Behavior
import Enemy.All.Turret.Sprites
import ... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Turret/Data.hs | haskell | module Enemy.All.Turret.Data
( TurretEnemyData(..)
, mkTurretEnemyData
) where
import Control.Monad.IO.Class (MonadIO)
import Configs
import Configs.All.Enemy
import Configs.All.Enemy.Turret
import Enemy.All.Turret.AttackDescriptions
import Enemy.All.Turret.Behavior
import Enemy.All.Turret.Sprites
import ... | |
a4f4a35a7cd0049de9520a0be7e139689ea8679f3c4e710e4ebbc606b7412244 | martinjlogan/ErlangBootstrap | fib.erl | -module(fib).
-export([f/1]).
f(N) when N > 1 -> f(N - 1) + f(N - 2);
f(N) when N > -1 -> N.
| null | https://raw.githubusercontent.com/martinjlogan/ErlangBootstrap/42c576f5919034d776654011b468c472a172f217/fib.erl | erlang | -module(fib).
-export([f/1]).
f(N) when N > 1 -> f(N - 1) + f(N - 2);
f(N) when N > -1 -> N.
| |
583cd2342dd8a86677133531ef87fa502edf5cf34cfe3e61ff6b92238ce1eed9 | cabol/erlbus | ebus_reply.erl | -module(ebus_reply).
%% API
-export([new/0, new/1, new/2, new/3, new/4]).
-export([from_map/1]).
%%%===================================================================
%%% Type definitions
%%%===================================================================
%% Defines a reply sent from channels to transports.
%% T... | null | https://raw.githubusercontent.com/cabol/erlbus/050cb728ef09a0ad51c9297281602e362b5e233d/src/transport/ebus_reply.erl | erlang | API
===================================================================
Type definitions
===================================================================
Defines a reply sent from channels to transports.
The message format requires the following keys:
<ul>
<li>`topic': The binary topic or `topic:subtopic` pair... | -module(ebus_reply).
-export([new/0, new/1, new/2, new/3, new/4]).
-export([from_map/1]).
-type t() :: #{
topic => binary() | nil,
status => atom(),
payload => term(),
ref => binary() | nil,
ebus_t => reply
}.
-export_type([t/0]).
new() ->
new(nil).
new(Topic) ->
new(Topic, nil).
new(Topic... |
fb8cc6a785061532bcc99eb41589a4c1d23950cf3718585066111ecd75016cf9 | soywod/unfog | Main.hs | module Main where
import qualified System.Environment as Env
import qualified Unfog.Arg.Parser as Arg (parse)
import Unfog.Arg.Types (Arg (CommandArg, ProcedureArg, QueryArg))
import qualified Unfog.Command.Handler as Command (handle)
import qualified Unfog.Procedure.Handler as Procedure (handle)
import qualified Unfo... | null | https://raw.githubusercontent.com/soywod/unfog/9271f74cf92a2135888b97d9aa91b396bb1eff43/bin/Main.hs | haskell | module Main where
import qualified System.Environment as Env
import qualified Unfog.Arg.Parser as Arg (parse)
import Unfog.Arg.Types (Arg (CommandArg, ProcedureArg, QueryArg))
import qualified Unfog.Command.Handler as Command (handle)
import qualified Unfog.Procedure.Handler as Procedure (handle)
import qualified Unfo... | |
5261e8550a4450f7a14cf0c3de8ae25f97f41774df2c7558ab77a2f0b332a450 | BillHallahan/G2 | Test8.hs | {-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--prune-unsorted" @-}
module Combined () where
import qualified Data.Map as M
data D a = Emp
| R a
deriving (Eq, Ord, Show)
{-@ f :: D { x:Int | 0 <= x} -> M.Map {v:Int | 0 <= v } Int @-}
f :: D Int -> M.Map Int Int
f xs ... | null | https://raw.githubusercontent.com/BillHallahan/G2/4d287df8ed7ba13c06d96d4911b9eedf870e80a1/tests/LiquidInf/Artificial/Pos/Test8.hs | haskell | @ LIQUID "--short-names" @
@ LIQUID "--no-termination" @
@ LIQUID "--prune-unsorted" @
@ f :: D { x:Int | 0 <= x} -> M.Map {v:Int | 0 <= v } Int @ |
module Combined () where
import qualified Data.Map as M
data D a = Emp
| R a
deriving (Eq, Ord, Show)
f :: D Int -> M.Map Int Int
f xs = M.map (\x -> 1) (g h M.empty xs)
g :: (a -> b -> b) -> b -> D a -> b
g _ b Emp = b
g op b (R x) = x `op` b
h :: Int -> M.Map Int (D Int) -> M.Map Int (D Int)
... |
85701de177c535409a86448d64767bc33acec6c28aabb329a655e0b55797a336 | mariari/Misc-Lisp-Scripts | testpkg.lisp | (defpackage :slex-test
(:use #:cl #:fiveam)
(:local-nicknames (:bi :scripts.slex.bi-table)
(:race-role :scripts.slex.race-role-map)
(:entity :scripts.slex.entity)
(:trait :scripts.slex.trait-table))
(:export #:run-tests))
(defpackage #:test)
(in-packag... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/99863683705f10c5f798e8aecd1a2965681c3604/scripts/slex-choice/test/testpkg.lisp | lisp | (defpackage :slex-test
(:use #:cl #:fiveam)
(:local-nicknames (:bi :scripts.slex.bi-table)
(:race-role :scripts.slex.race-role-map)
(:entity :scripts.slex.entity)
(:trait :scripts.slex.trait-table))
(:export #:run-tests))
(defpackage #:test)
(in-packag... | |
d51ffbcbb512aa56d3df094a2f1c25c660d49de24891dfd1ea041a00d349d982 | haskell-lisp/yale-haskell | typedecl-parser.scm | File : parser / typedecl - parser Author :
(define (parse-type-decl interface?)
(save-parser-context
(let* ((sig (parse-signature))
(contexts (signature-context sig))
(simple (signature-type sig))
(deriving '())
(constrs '()))
;; #t = builtins ([] (,,) ->) not allowed
(check-simple simple '#... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/parser/typedecl-parser.scm | scheme | #t = builtins ([] (,,) ->) not allowed | File : parser / typedecl - parser Author :
(define (parse-type-decl interface?)
(save-parser-context
(let* ((sig (parse-signature))
(contexts (signature-context sig))
(simple (signature-type sig))
(deriving '())
(constrs '()))
(check-simple simple '#t "type declaration")
(let ((annotations (... |
f6102ae7bffc21b51c8967dcbbd79099ab5ebc3f0fcc3cbeb776af5cecfb210d | janestreet/ecaml | defconst.ml | open! Core
open! Import
module Q = struct
let defconst = "defconst" |> Symbol.intern
end
let all_defconst_symbols = ref []
module Private = struct
let all_defconst_symbols () =
!all_defconst_symbols |> List.sort ~compare:Symbol.compare_name
;;
end
let defconst_i symbol here ~docstring ~(type_ : _ Value.Ty... | null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/defconst.ml | ocaml | open! Core
open! Import
module Q = struct
let defconst = "defconst" |> Symbol.intern
end
let all_defconst_symbols = ref []
module Private = struct
let all_defconst_symbols () =
!all_defconst_symbols |> List.sort ~compare:Symbol.compare_name
;;
end
let defconst_i symbol here ~docstring ~(type_ : _ Value.Ty... | |
428e11526499e2eb207e1ba8cdf7316780d70e9a044d34b7326b2ba97ef08aaf | galdre/morphe | cljs.clj | Copyright 2019
(ns morphe.util.cljs
(:require [clojure.walk :as walk]
[cljs.analyzer :as ana]
[cljs.analyzer.api :as anapi]
[cljs.env :as env]))
(defn targeting-cljs?
"Good method of doing this? I don't know."
[]
(some? env/*compiler*))
(defmacro not-targeting-cljs
[&... | null | https://raw.githubusercontent.com/galdre/morphe/7f4272b49d5c90ed5a17effe5bf78d7aba84396d/src/morphe/util/cljs.clj | clojure | Just to cover a few edge cases...but if these were run into
probably you're misusing the aspect constructors anyway.
It's in the namespace currently being compiled:
Presumably it's referred into this ns:
it's namespaced, either in full or by alias: | Copyright 2019
(ns morphe.util.cljs
(:require [clojure.walk :as walk]
[cljs.analyzer :as ana]
[cljs.analyzer.api :as anapi]
[cljs.env :as env]))
(defn targeting-cljs?
"Good method of doing this? I don't know."
[]
(some? env/*compiler*))
(defmacro not-targeting-cljs
[&... |
6fa47827d50ff74dfd33372dedb1206173065cb3342d55a6762e1d663febeb8c | anoma/juvix | DisplayRoot.hs | module Commands.Dev.DisplayRoot where
import Commands.Base
import Commands.Dev.DisplayRoot.Options
import Data.Yaml
runCommand :: forall r. (Members '[Embed IO, App] r) => RootOptions -> Sem r ()
runCommand RootOptions {..} = do
askPkgDir >>= say . pack . toFilePath
when _rootPrintPackage printPackage
where
... | null | https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/app/Commands/Dev/DisplayRoot.hs | haskell | module Commands.Dev.DisplayRoot where
import Commands.Base
import Commands.Dev.DisplayRoot.Options
import Data.Yaml
runCommand :: forall r. (Members '[Embed IO, App] r) => RootOptions -> Sem r ()
runCommand RootOptions {..} = do
askPkgDir >>= say . pack . toFilePath
when _rootPrintPackage printPackage
where
... | |
a1f4fc0741e3f96f68e48697b71c4a87e164dce269b65792fd45dfc1c49fab35 | skogsbaer/roundtrip | SpecPrinter.hs | # LANGUAGE ScopedTypeVariables #
module Text.Roundtrip.SpecPrinter (
SpecPrinter, specPrinter, runSpecPrinter
) where
import Prelude hiding (catch, (<>))
import Control.Exception (AsyncException, catch)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import Text.PrettyPrint.HughesPJ
import ... | null | https://raw.githubusercontent.com/skogsbaer/roundtrip/a0c6b7c285f99db227bfb421158ab60dfb9e17e7/src/Text/Roundtrip/SpecPrinter.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Text.Roundtrip.SpecPrinter (
SpecPrinter, specPrinter, runSpecPrinter
) where
import Prelude hiding (catch, (<>))
import Control.Exception (AsyncException, catch)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import Text.PrettyPrint.HughesPJ
import ... | |
33312dd4603a3e8632a77da1db6cf6aa25c2722f4d2f56e5bf8e6164dd3f39a8 | ghcjs/ghcjs-boot | Arrow.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Arrow
Copyright : ( c ) 2002
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer :
-- Stability : provi... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Control/Arrow.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Arrow
License : BSD-style (see the LICENSE file in the distribution)
Maintainer :
Stability : provisional
Portability : portable
Basic arrow definitions, based on
plus a couple of definitions ('r... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2002
* /Generalising Monads to , by ,
/Science of Computer Programming/ 37 , pp67 - 111 , May 2000 .
* /A New Notation for , by , in /ICFP 2001/ ,
Firenze , Italy , pp229 - 240 .
module Control.Arrow (
Arrow(.... |
508c2c5cea587d32edc2c609dfca7e927a771d656518afc2d4352e603e05580c | master/eds | eds_msg.erl | @author < >
%% @doc LDAP Message
-module(eds_msg).
-export([encode/1, decode/1]).
-include("LDAP.hrl").
-spec decode(binary()) -> {tuple(), integer()}.
decode(Envelope) ->
case asn1rt:decode('LDAP', 'LDAPMessage', Envelope) of
{ok, {'LDAPMessage', MessageID, ProtocolOp,_}} ->
{Pr... | null | https://raw.githubusercontent.com/master/eds/cd8df05e82bd84f2ff62de75937b9f06a5911639/src/eds_msg.erl | erlang | @doc LDAP Message
| @author < >
-module(eds_msg).
-export([encode/1, decode/1]).
-include("LDAP.hrl").
-spec decode(binary()) -> {tuple(), integer()}.
decode(Envelope) ->
case asn1rt:decode('LDAP', 'LDAPMessage', Envelope) of
{ok, {'LDAPMessage', MessageID, ProtocolOp,_}} ->
{ProtocolOp, MessageID};
... |
b1fc2076a6374ecc88d1dea6fd8c4eb0da439c17f6919d588a439d0b050d3960 | yoshihiro503/ocamltter | api11.mli | open Spotlib.Spot
open OCamltter_oauth
open Api_intf
* { 6 HTTP parameters }
type params = (string * string option) list
(** HTTP parameter. Element with None means "there is no such a field". *)
* { 6 Error and results }
module Error : sig
type http = Http.error
type json_conv = [ `Json of Api_intf.Jso... | null | https://raw.githubusercontent.com/yoshihiro503/ocamltter/be7ac68c8076bc2ca8ccec216d6647c94ec9f814/twitter/api11.mli | ocaml | * HTTP parameter. Element with None means "there is no such a field".
* The type of results
+ Normally ["api.twitter.com"]
+ POST/GET
+ URL path part
+ header
* API call with JSON-to-OCaml conversion
* The type of API option combinator.
A combinator of type [('a, ?xxx:t -> ... -> ?yyy:t -> 'a) opt] adds
... | open Spotlib.Spot
open OCamltter_oauth
open Api_intf
* { 6 HTTP parameters }
type params = (string * string option) list
* { 6 Error and results }
module Error : sig
type http = Http.error
type json_conv = [ `Json of Api_intf.Json.t Meta_conv.Error.t ]
type json_parse = [ `Json_parse of exn * string ]... |
09517dc361f53107452f7b55d2038daefbda4d800fbe2d7c2e378ac1031589af | ecraven/r7rs-swank | gauche.scm | (define ($scheme-name)
"gauche-scheme")
(define ($macroexpand-1 form)
(macroexpand-1 form))
(define ($macroexpand-all form)
(macroexpand-all form))
(define ($open-tcp-server port-number port-file handler)
(let* ((n (or port-number (+ 10000 (random-integer 50000))))
(socket (make-server-socket 'inet ... | null | https://raw.githubusercontent.com/ecraven/r7rs-swank/4edf1cc502974f5878ac3b7d056043b1b56e1fc2/specific/gauche.scm | scheme | required for older gauche which treats keywords distinct from symbols
basic implementation, print all output at the end, this should
be replaced with a custom output port | (define ($scheme-name)
"gauche-scheme")
(define ($macroexpand-1 form)
(macroexpand-1 form))
(define ($macroexpand-all form)
(macroexpand-all form))
(define ($open-tcp-server port-number port-file handler)
(let* ((n (or port-number (+ 10000 (random-integer 50000))))
(socket (make-server-socket 'inet ... |
32335335d9f550a5dd3e6af777f156d390bc0c78e93f4bbc8bf4f6ed44e8b1e0 | aharisu/vise | read.scm | (define-module vgen.compiler.read
(export vise-phase-read vise-phase-read-repl
))
(select-module vgen.compiler.read)
TODO read dictionary
(define (vise-phase-read in)
(port-map
identity
(pa$ read in)))
(define (vise-phase-read-repl in)
(read in))
| null | https://raw.githubusercontent.com/aharisu/vise/6d0f54b0fe28e7d2c3b2b91cb3ef5ff847a11484/autoload/vgen/compiler/read.scm | scheme | (define-module vgen.compiler.read
(export vise-phase-read vise-phase-read-repl
))
(select-module vgen.compiler.read)
TODO read dictionary
(define (vise-phase-read in)
(port-map
identity
(pa$ read in)))
(define (vise-phase-read-repl in)
(read in))
| |
5ebad60720864ca865aea2a85562bf070b635fc3de9916984aecc4aa7bd97845 | TheLortex/mirage-monorepo | search.ml | Copyright ( c ) 2016 . All rights reserved .
See LICENSE.md
See LICENSE.md *)
let rec mem ?(cmp=compare) a = function
| [] -> false | x::xs -> cmp a x = 0 || mem ~cmp a xs
let rec add ?(cmp=compare) a = function
| [] -> [a]
| x::xs ->
match cmp a x with -1 -> a::x::xs | 1 -> x::add ~cmp a ... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/psq/test/search.ml | ocaml | Copyright ( c ) 2016 . All rights reserved .
See LICENSE.md
See LICENSE.md *)
let rec mem ?(cmp=compare) a = function
| [] -> false | x::xs -> cmp a x = 0 || mem ~cmp a xs
let rec add ?(cmp=compare) a = function
| [] -> [a]
| x::xs ->
match cmp a x with -1 -> a::x::xs | 1 -> x::add ~cmp a ... | |
3b00ba98eab2cf46d0a19e4d184c5755d30cefc4c27b6f50f687bc8959791987 | lykahb/groundhog | OldMigration.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Groundhog.Test.Types.OldMigration where
import Database.Groundhog ()
import Database.Groundhog.TH
data AddColumn = AddColumn {addColumnOld :: Int} deriving (Eq, Show)
data Add... | null | https://raw.githubusercontent.com/lykahb/groundhog/72d39a2c5aa9c3b3d5bb200f5107c6e0b26a508d/groundhog-test/src/Groundhog/Test/Types/OldMigration.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE FlexibleInstances #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Groundhog.Test.Types.OldMigration where
import Database.Groundhog ()
import Database.Groundhog.TH
data AddColumn = AddColumn {addColumnOld :: Int} deriving (Eq, Show)
data AddUniqueConstraint = AddU... |
e5e455821c2df0e6435fd0f04353f68f9ca8504ecda0494561adaf81079f059e | philschonholzer/co2db | Categories.hs | module Web.Controller.Categories where
import Web.Controller.Prelude
import Web.View.Categories.Edit
import Web.View.Categories.Index
import Web.View.Categories.New
import Web.View.Categories.Show
instance Controller CategoriesController where
beforeAction = ensureisAdminUser currentUser Co2ProducersAction
acti... | null | https://raw.githubusercontent.com/philschonholzer/co2db/b33c1cea664fb959476416a7412e603f7f104a6d/Web/Controller/Categories.hs | haskell | module Web.Controller.Categories where
import Web.Controller.Prelude
import Web.View.Categories.Edit
import Web.View.Categories.Index
import Web.View.Categories.New
import Web.View.Categories.Show
instance Controller CategoriesController where
beforeAction = ensureisAdminUser currentUser Co2ProducersAction
acti... | |
74502a02a1bbd47548eaf61e7b842a7c6621666e801a7fadffe7571fd52130c8 | r0man/geocoder-clj | maxmind_test.clj | (ns geocoder.maxmind-test
(:require [clojure.test :refer :all]
[geocoder.maxmind :as geocoder]))
(def ip-address "92.229.192.11")
(def db (geocoder/db geocoder/default-path))
(deftest test-geocode-ip-address
(is (nil? (geocoder/geocode-ip-address db "127.0.0.1")))
(let [result (geocoder/geocode-ip-... | null | https://raw.githubusercontent.com/r0man/geocoder-clj/2738b5f8815e42eb364f2111ba41c68e6bf75ecf/test/geocoder/maxmind_test.clj | clojure | (ns geocoder.maxmind-test
(:require [clojure.test :refer :all]
[geocoder.maxmind :as geocoder]))
(def ip-address "92.229.192.11")
(def db (geocoder/db geocoder/default-path))
(deftest test-geocode-ip-address
(is (nil? (geocoder/geocode-ip-address db "127.0.0.1")))
(let [result (geocoder/geocode-ip-... | |
075621e1cbe415dcc24cdde4e90b0cabdc83c546f174a4ade23ec8038bab09fc | libguestfs/supermin | glob.mli | supermin 5
* Copyright ( C ) 2009 - 2014 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/supermin/fd9f17c7eb63979af882533a0d234bfc8ca42de3/src/glob.mli | ocaml | supermin 5
* Copyright ( C ) 2009 - 2014 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | |
29aea30866205575f01cb667efd1778d4075cdbc6099ac4ecf39c6e5124947aa | NelosG/fp-tests | T1Prioritised.hs | # LANGUAGE StandaloneDeriving #
module Test.T1Prioritised
( hspecPrioritised
, propPrioritised
) where
import HW2.T1 (Prioritised (High, Low, Medium), mapPrioritised)
import Hedgehog (Gen)
import qualified Hedgehog.Gen as Gen
import Test.Common (allProps, genInt)
import Test.Hspec (it, shouldBe)
import Test.Tast... | null | https://raw.githubusercontent.com/NelosG/fp-tests/7e2af5c3c3279c2045662faaff8e5f895af6af6a/hw2/test/T1/Test/T1Prioritised.hs | haskell | # LANGUAGE StandaloneDeriving #
module Test.T1Prioritised
( hspecPrioritised
, propPrioritised
) where
import HW2.T1 (Prioritised (High, Low, Medium), mapPrioritised)
import Hedgehog (Gen)
import qualified Hedgehog.Gen as Gen
import Test.Common (allProps, genInt)
import Test.Hspec (it, shouldBe)
import Test.Tast... | |
af4843f0a823e83a8d56d43990010d5ce5e163f0f700c5f1bf61ae8bf92f73cc | ghc/packages-Cabal | list-sources.test.hs | import System.FilePath (normalise)
import Test.Cabal.Prelude
main = setupTest $ do
tmpdir <- fmap testTmpDir getTestEnv
let fn = tmpdir </> "sources"
setup "sdist" ["--list-sources=" ++ fn]
--list - sources outputs with slashes on posix and backslashes on Windows . ' normalise ' converts our needle to the neces... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/SDist/ListSources/list-sources.test.hs | haskell | list - sources outputs with slashes on posix and backslashes on Windows . ' normalise ' converts our needle to the necessary format . | import System.FilePath (normalise)
import Test.Cabal.Prelude
main = setupTest $ do
tmpdir <- fmap testTmpDir getTestEnv
let fn = tmpdir </> "sources"
setup "sdist" ["--list-sources=" ++ fn]
assertFileDoesContain fn $ normalise "data/blah/a.dat"
assertFileDoesContain fn $ normalise "extra-src/blah/a.html"
as... |
684a05be1a23877efbfb5f88e2fd47c298a82827bdd48f367236a85f3ff5860c | bragful/ephp | ephp_object_tests.erl | -module(ephp_object_tests).
-author('').
-compile([warnings_as_errors]).
-include_lib("eunit/include/eunit.hrl").
-include("ephp.hrl").
set_get_and_remove_test() ->
{ok, Ctx} = ephp_context:start_link(),
Objects = ephp_context:get_objects(Ctx),
Id = 1,
Class = #class{},
Class2 = #class{name = <... | null | https://raw.githubusercontent.com/bragful/ephp/119f1760a5cdf4c8b6a01739e852c7183af7acff/test/ephp_object_tests.erl | erlang | -module(ephp_object_tests).
-author('').
-compile([warnings_as_errors]).
-include_lib("eunit/include/eunit.hrl").
-include("ephp.hrl").
set_get_and_remove_test() ->
{ok, Ctx} = ephp_context:start_link(),
Objects = ephp_context:get_objects(Ctx),
Id = 1,
Class = #class{},
Class2 = #class{name = <... | |
4c29f483aa11f454c59db8c6587c71c4a649c685853375abd08ff33d80fcb508 | buntine/Simply-Scheme-Exercises | 19-13.scm | ; Write deep-reduce, similar to tree-reduce, but for structured lists:
;
; > (deep-reduce word ’(r ((a (m b) (l)) (e (r)))))
RAMBLER
(define (deep-reduce func lst)
(cond ((null? lst) (func))
((list? (car lst))
(func (deep-reduce func (car lst))
(deep-reduce func (cdr lst))))
... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/19-implementing-higher-order-functions/19-13.scm | scheme | Write deep-reduce, similar to tree-reduce, but for structured lists:
> (deep-reduce word ’(r ((a (m b) (l)) (e (r))))) | RAMBLER
(define (deep-reduce func lst)
(cond ((null? lst) (func))
((list? (car lst))
(func (deep-reduce func (car lst))
(deep-reduce func (cdr lst))))
(else (func (car lst)
(deep-reduce func (cdr lst))))))
|
a12cb7b0e3feafa50b07c2dd1ca91a9654f9867c00ecf7c515794c31e1187dd6 | cabol/cross_db | xdb_test_repo_and_adapter.erl | -module(xdb_test_repo_and_adapter).
-export([
child_spec/2,
start_link/0
]).
%% @hidden
child_spec(_Repo, _Opts) ->
{
?MODULE,
{?MODULE, start_link, []},
permanent,
infinity,
supervisor,
[?MODULE]
}.
%% @hidden
start_link() ->
{ok, spawn_link(fun() -> receive M -> M end end)}.
| null | https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/test/support/xdb_test_repo_and_adapter.erl | erlang | @hidden
@hidden | -module(xdb_test_repo_and_adapter).
-export([
child_spec/2,
start_link/0
]).
child_spec(_Repo, _Opts) ->
{
?MODULE,
{?MODULE, start_link, []},
permanent,
infinity,
supervisor,
[?MODULE]
}.
start_link() ->
{ok, spawn_link(fun() -> receive M -> M end end)}.
|
4d4c8346c1538918c95720d3eb94bec72c581504a7680e04ca872fb6bd9fb7d9 | erlware/relx | powershell_release_sup.erl | %%%-------------------------------------------------------------------
%% @doc powershell_release top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(powershell_release_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER,... | null | https://raw.githubusercontent.com/erlware/relx/16a7972f7679778d9d7f40228b1a20351f1077bd/shelltests/powershell_release/apps/powershell_release/src/powershell_release_sup.erl | erlang | -------------------------------------------------------------------
@doc powershell_release top level supervisor.
@end
-------------------------------------------------------------------
sup_flags() = #{strategy => strategy(), % optional
intensity => non_neg_integer(), % optional
optional
... |
-module(powershell_release_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_all,
intensity => 0,
period =... |
663c9a4347b3a7aeaa19073ee8dac786ea41f82f6797f75f8b29296c03f7a4a1 | inaka/rpsls | rpsls_higherbeat_player.erl | -module(rpsls_higherbeat_player).
-author('George Ye <>').
-author('Elian Gidoni <').
-behaviour(rpsls_player).
-export([init/0, play/2]).
@private
-spec init() -> State::term().
init() -> {}.
-spec play(History::[{You::rpsls_player:choice(), Rival::rpsls_player:choice()}], State::term()) -> {rpsls_player:choice(... | null | https://raw.githubusercontent.com/inaka/rpsls/85f6621cfa55a803edf9c2a9fd43901415b9ba80/src/players/rpsls_higherbeat_player.erl | erlang | -module(rpsls_higherbeat_player).
-author('George Ye <>').
-author('Elian Gidoni <').
-behaviour(rpsls_player).
-export([init/0, play/2]).
@private
-spec init() -> State::term().
init() -> {}.
-spec play(History::[{You::rpsls_player:choice(), Rival::rpsls_player:choice()}], State::term()) -> {rpsls_player:choice(... | |
928e5a64aca524f705f2a9bc2cd40013c16d8be5ba2587dd0c93064396a2ce92 | avsm/eeww | ocamlcp.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/avsm/eeww/23ca8b36127b337512e13c6fb8e86b3a7254d4f9/boot/ocaml/tools/ocamlcp.mli | ocaml | ************************************************************************
OCaml
... | , Tarides , Paris
Copyright 2022 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
|
766a6c04d6e75fe44a374c99e0f154b613b498ae798ba3858381bf27301ddd45 | tonyvanriet/clj-slack-client | channels.clj | (ns clj-slack-client.channels
(:require [clj-slack-client.web :as web]))
(defn archive
"Archives a channel. Acessible by workspace and user (not bots)."
[token channel]
(web/call-and-get-response "channels.archive"
{:token token :channel channel}))
(defn create
"Creates a chan... | null | https://raw.githubusercontent.com/tonyvanriet/clj-slack-client/6783f003ab93adae057890421622eb5e61ab033d/src/clj_slack_client/channels.clj | clojure | there are extensive options. check api.slack.com/methods/channels.history | (ns clj-slack-client.channels
(:require [clj-slack-client.web :as web]))
(defn archive
"Archives a channel. Acessible by workspace and user (not bots)."
[token channel]
(web/call-and-get-response "channels.archive"
{:token token :channel channel}))
(defn create
"Creates a chan... |
2aac140921f1724398a6420d649f2b86783a2e4aa891a6d273b631883da6716c | GlideAngle/flare-timing | Align.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Flight.Time.Align
( checkAll
, writeTime
, group
) where
import Data.Time.Clock (UTCTime, diffUTCTime)
import Control.Lens ((^?), element)
import Data.These
import Data.Maybe (catMaybes, fromMaybe, listToMaybe)
import Co... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/172a9b199eb1ff72c967669dc349cbf8d9c4bc52/lang-haskell/time/library/Flight/Time/Align.hs | haskell | ^ Exclude zones outside speed section
^ Exclude zones outside speed section
NOTE: Ensure we're only considering scored subset of flying time.
NOTE: Pilots not tagging any zones. This can
happen when they launch outside the launch
zone and fail to tag the start zone.
REVIEW: This lookup from time to fix is slow b... | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Flight.Time.Align
( checkAll
, writeTime
, group
) where
import Data.Time.Clock (UTCTime, diffUTCTime)
import Control.Lens ((^?), element)
import Data.These
import Data.Maybe (catMaybes, fromMaybe, listToMaybe)
import Co... |
aad62ee81531b5a57b7bcc13c8221ef73fc280764340ccc7f1b85ebb6b5dc7bb | bittide/bittide-hardware | Extra.hs | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : Apache-2.0
module Contranomy.Clash.Extra where
import Clash.Prelude
import Control.Monad.Trans.State
mealyAuto ::
(HiddenClockResetEnable dom, AutoReg s) =>
(s -> i -> (o,s)) ->
s ->
(Signal do... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/contranomy/src/Contranomy/Clash/Extra.hs | haskell |
# INLINE runState' #
# INLINE downto #
# INLINE bitsDownTo # | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : Apache-2.0
module Contranomy.Clash.Extra where
import Clash.Prelude
import Control.Monad.Trans.State
mealyAuto ::
(HiddenClockResetEnable dom, AutoReg s) =>
(s -> i -> (o,s)) ->
s ->
(Signal dom i... |
9779f6954427112d70a6fc4dbf0003851233dfb633b089b7f7bae81302c74719 | HealthSamurai/ql | method.cljc | (ns ql.method
(:require [clojure.string :as str]
[ql.pretty-sql :as pretty-sql]))
(defn dispatch-sql [x]
(cond (map? x) (get x :ql/type)
(vector? x) (first x)
:else (type x)))
(defn simple-type? [x]
(not (or (vector? x) (map? x))))
(defmulti to-sql (fn [{sql :sql params :params} x] ... | null | https://raw.githubusercontent.com/HealthSamurai/ql/145241ee7484a9e8a6c106c271505f2e3f0788ee/src/ql/method.cljc | clojure | (comma-separated [:a :b 0]) | (ns ql.method
(:require [clojure.string :as str]
[ql.pretty-sql :as pretty-sql]))
(defn dispatch-sql [x]
(cond (map? x) (get x :ql/type)
(vector? x) (first x)
:else (type x)))
(defn simple-type? [x]
(not (or (vector? x) (map? x))))
(defmulti to-sql (fn [{sql :sql params :params} x] ... |
9cc5432e60c6d99636b356fae1908c2b2e6dd6e3d477043bc0c7fb8d6498ac58 | arcticmatt/dino-brick | Main.hs | module Main where
import UI (playGame)
import Dino (Game(..))
import Control.Monad (when)
import Data.Monoid ((<>))
import System.Exit (exitSuccess)
import Text.Read (readMaybe)
import Options.Applicative
import qualified System.Directory as D
import System.FilePath ((</>))
newtype Opts = Opts { score :: Bool }
op... | null | https://raw.githubusercontent.com/arcticmatt/dino-brick/8c505f272ca74108868c4687772b79e6b6fee842/app/Main.hs | haskell | Basically copied from tetris example
show high score and exit
High score stuff | module Main where
import UI (playGame)
import Dino (Game(..))
import Control.Monad (when)
import Data.Monoid ((<>))
import System.Exit (exitSuccess)
import Text.Read (readMaybe)
import Options.Applicative
import qualified System.Directory as D
import System.FilePath ((</>))
newtype Opts = Opts { score :: Bool }
op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.