_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 |
|---|---|---|---|---|---|---|---|---|
2306e1d660dc4d4feeeb164109341e586d29f932583942d8d9e04c0c0212c72d | marksteele/cinched | cinched_console.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2016 ,
%%% @doc
Cinched console , to be consumed by the RPC service
%%% @end
Created : 24 Jan 2016 by < >
%%%-------------------------------------------------------------------
This file is provided to you under ... | null | https://raw.githubusercontent.com/marksteele/cinched/5284d048c649128fa8929f6e85cdc4747d223427/src/cinched_console.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expres... | @author < >
( C ) 2016 ,
Cinched console , to be consumed by the RPC service
Created : 24 Jan 2016 by < >
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS ... |
2c1e82c3d7d93004894846e0a8ea7fa5a96dc310d77d0a835fd1a50f846cec03 | astanin/moo | mop_kursawe.hs | function
A multiobjective optimization problem with a discontinuous and
non - convex Pareto front .
, ( 1991 ) . A variant of evolution strategies for vector
optimization . In Parallel Problem Solving from Nature
( pp . 193 - 197 ) . .
A multiobjective optimization problem with a discontinuous a... | null | https://raw.githubusercontent.com/astanin/moo/2e77a94a543d21360f7610c1ee0dda52813997c4/examples/mop_kursawe.hs | haskell | function
A multiobjective optimization problem with a discontinuous and
non - convex Pareto front .
, ( 1991 ) . A variant of evolution strategies for vector
optimization . In Parallel Problem Solving from Nature
( pp . 193 - 197 ) . .
A multiobjective optimization problem with a discontinuous a... | |
4c4f57805b6707bf7ada2e61bffcdb78ab9afed68387311d18a4139f40bfc91f | MichaelXavier/cron | Main.hs | module Main
( main
) where
-------------------------------------------------------------------------------
import SpecHelper
import qualified System.Test.Cron
import qualified System.Test.Cron.Describe
import qualified System.Test.Cron.Parser
import qualified System.Test.Cron.Schedule
import qualif... | null | https://raw.githubusercontent.com/MichaelXavier/cron/4e0db74b626ba10279c1761834cfa9814642e595/test/Main.hs | haskell | -----------------------------------------------------------------------------
----------------------------------------------------------------------------- | module Main
( main
) where
import SpecHelper
import qualified System.Test.Cron
import qualified System.Test.Cron.Describe
import qualified System.Test.Cron.Parser
import qualified System.Test.Cron.Schedule
import qualified System.Test.Cron.Internal.Schedule
main :: IO ()
main = defaultMain $ test... |
4b1928926d3e9f8195ca3c65119b83ffcd37d2fda1739288926bd59b4e46c986 | twosigma/satellite | recipes_test.clj | Copyright 2015 TWO SIGMA OPEN SOURCE , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/twosigma/satellite/d29d982f054d4f87ff47b4f94d23faa26a9b3fe4/satellite-master/test/satellite/recipes_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2015 TWO SIGMA OPEN SOURCE , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns satellite.recipes-test
(use satellite.recipes
clojure.test))
(deftest test-exceeds-threshold?
(testing "Excessive value returns true"
(is (exceeds-threshold? {:metric 5} {:metric 2} ... |
b5df2e1996731a48fc342629c5b96f5f5947f49193a6fdcec8d622ed01227fd8 | takikawa/racket-ppa | type-contract.rkt | #lang racket/base
;; Contract generation for Typed Racket
(require
"../utils/utils.rkt"
syntax/parse
"../rep/type-rep.rkt"
"../rep/prop-rep.rkt"
"../rep/object-rep.rkt"
"../rep/fme-utils.rkt"
"../utils/tc-utils.rkt"
"../utils/prefab.rkt"
"../utils/identifier.rkt"
"../env/type-name-env.rkt"
"../env/row-co... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/typed-racket-lib/typed-racket/private/type-contract.rkt | racket | Contract generation for Typed Racket
submod for testing
has-contrat-def-property? : Syntax -> Boolean
get-contract-def-property : Syntax -> (U False Contract-Def)
Checks if the given syntax needs to be fixed up for contract generation
and if yes it returns the information stored in the property
type->contract-fa... | #lang racket/base
(require
"../utils/utils.rkt"
syntax/parse
"../rep/type-rep.rkt"
"../rep/prop-rep.rkt"
"../rep/object-rep.rkt"
"../rep/fme-utils.rkt"
"../utils/tc-utils.rkt"
"../utils/prefab.rkt"
"../utils/identifier.rkt"
"../env/type-name-env.rkt"
"../env/row-constraint-env.rkt"
"../env/lexical-env.r... |
56574abe8e0e99914ae52471a0b4a9a5b9c44bdece4ecbe4c1db169d986f2ca2 | zen-lang/zen | v2_validation_smoke_test.clj | (ns zen.v2-validation-smoke-test
(:require
[matcho.core :as matcho]
[clojure.test :refer [deftest is testing]]
[zen.core]
[zen.v2-validation :as v2]))
(defmacro vmatch [tctx schemas subj res]
`(let [res# (v2/validate ~tctx ~schemas ~subj)]
(matcho/match res# ~res)
res#))
(defmacro match [tct... | null | https://raw.githubusercontent.com/zen-lang/zen/c06cda47b22494e3cc60f0375da435a8ae5336a0/test/zen/v2_validation_smoke_test.clj | clojure | :regex ".*@.*"
tessting map
schema-key
:args {:type 'zen/vector
:cat [:ctx {:confirms #{'app/ctx}}]} | (ns zen.v2-validation-smoke-test
(:require
[matcho.core :as matcho]
[clojure.test :refer [deftest is testing]]
[zen.core]
[zen.v2-validation :as v2]))
(defmacro vmatch [tctx schemas subj res]
`(let [res# (v2/validate ~tctx ~schemas ~subj)]
(matcho/match res# ~res)
res#))
(defmacro match [tct... |
124e06f43d014d54e5f9cb722cccf56681cf6d743c40ad2be858951a12c6d17f | xmonad/xmonad-contrib | Minimize.hs | ----------------------------------------------------------------------------
-- |
Module : XMonad . Actions . Minimize
-- Description : Actions for minimizing and maximizing windows.
Copyright : ( c ) ( 2016 )
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : ... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/e0d1f177ea6c620b7612e431ff01b3ca1a62c829/XMonad/Actions/Minimize.hs | haskell | --------------------------------------------------------------------------
|
Description : Actions for minimizing and maximizing windows.
License : BSD3-style (see LICENSE)
Stability : unstable
Portability : not portable
Adds actions for minimizing and maximizing windows
this module
Possible keybi... | Module : XMonad . Actions . Minimize
Copyright : ( c ) ( 2016 )
Maintainer : < >
This module should be used with " XMonad . Layout . Minimize " . Add ' minimize ' to your
layout modifiers as described in " XMonad . Layout . Minimize " and use actions from
> , ( ( modm , ... |
e4382c5aed381271b31f268955e8d7a2b929049ae3b1b0d84636e5e0e6018301 | tonymorris/fp-course | FunctorTest.hs | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.FunctorTest where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, (@?=))
import Test.Tasty.QuickCheck (testProperty)
... | null | https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/test/Course/FunctorTest.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.FunctorTest where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, (@?=))
import Test.Tasty.QuickCheck (testProperty)
... | |
586821037c37e4cda63d2e81d48e6892915561f0ff6a5d0d1992bc3bb44e1521 | adrieng/pulsar | options.ml | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* 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 ... | null | https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/pulsar-lib/options.ml | ocaml | Utility functions
Debugging-related flags
Misc global options
Diagnosis
Command-line arguments related to global options | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* 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 ... |
105e79a6452b0b53fb4f714b6c750eadd52a5f95b60549b0991c0979b9f9395e | erlang/epmd | epmd_reg.erl | %%
%% %CopyrightBegin%
%%
Copyright Peer Stritzinger GmbH 2013 - 2015 . 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... | null | https://raw.githubusercontent.com/erlang/epmd/c27e1e3d37f9bb7f657782be5809b78a58b98b4d/src/epmd_reg.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Peer Stritzinger GmbH 2013 - 2015 . 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(epmd_reg).
-behaviour(gen_server).
-export([start_link/0, node_reg/7, node_unreg/1, lookup/1, nod... |
747ee5a2b60cae514834e6f54b5a933f05db1705d483f2a999624fe9e3938738 | CarlosMChica/HaskellBook | Optional.hs | module Optional where
data Optional a =
Nada
| Only a
deriving (Eq, Show)
instance Monoid a => Monoid (Optional a) where
mempty = Nada
x `mappend` Nada = x
Nada `mappend` y = y
(Only x) `mappend` (Only y) = Only (x `mappend` y)
| null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter15/Optional.hs | haskell | module Optional where
data Optional a =
Nada
| Only a
deriving (Eq, Show)
instance Monoid a => Monoid (Optional a) where
mempty = Nada
x `mappend` Nada = x
Nada `mappend` y = y
(Only x) `mappend` (Only y) = Only (x `mappend` y)
| |
e540470e55d298fa01e1e8d0314fc16526b339c377005c6d287daa434543afe8 | minoki/haskell-floating-point | Spec.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
import qualified ConstantsSpec
import Data.Proxy
import qualified FromIntegerSpec
import qualified FromRationalSpec
import qualified IntervalArithmeticSpec
import Numeric.Rounded.Hardware.Backend (backendName)
import qualified ... | null | https://raw.githubusercontent.com/minoki/haskell-floating-point/7d7bb31bb2b07c637a5eaeda92fc622566e9b141/rounded-hw/test/Spec.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
import qualified ConstantsSpec
import Data.Proxy
import qualified FromIntegerSpec
import qualified FromRationalSpec
import qualified IntervalArithmeticSpec
import Numeric.Rounded.Hardware.Backend (backendName)
import qualified ... | |
c9924e3a170352620889f00f373fd9aaa6dc46e19ef7f9e4fdd737550ac25027 | igorhvr/bedlam | ssax-tests.scm | (load "myenv-sisc.scm")
(import string-io)
(import ssax)
(import util)
(run-test
(assert (eq? '_
(call-with-input-string "_" SSAX:read-NCName)))
(assert (eq? '_
(call-with-input-string "_" SSAX:read-QName)))
(assert (eq? (string->symbol "_abc_")
(call-with-input-string "_abc_;" SSAX:read-NCName)))
(as... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/opt/sxml/scm/ssax/ssax-tests.scm | scheme | (test "\r\n\r\n]]>" '("" " NL\n" "" " NL\n"))
(test "\r\n\r\na]]>" '("" " NL\n" "" " NL\n" "a" ""))
(test "TAG1" #f "")
must be an error! Duplicate attr
must be an error! Duplicate attr after ns expansion
Now test the validating parsing
No decl for tag1
Req'd attribute not given error
Wrong content-type of th... | (load "myenv-sisc.scm")
(import string-io)
(import ssax)
(import util)
(run-test
(assert (eq? '_
(call-with-input-string "_" SSAX:read-NCName)))
(assert (eq? '_
(call-with-input-string "_" SSAX:read-QName)))
(assert (eq? (string->symbol "_abc_")
(call-with-input-string "_abc_;" SSAX:read-NCName)))
(as... |
77304d51681aee43624434486fe43bd0a1fe7f9e582c09d73a389e258d9bfcf8 | effectai/effect-network | test.cljs | (ns e2e.test
(:require e2e.token e2e.swap e2e.stake
[cljs.test :refer-macros [run-tests]]))
(defn -main []
(-> (run-tests 'e2e.token)
(.then #(run-tests 'e2e.swap))
(.then #(run-tests 'e2e.stake))))
| null | https://raw.githubusercontent.com/effectai/effect-network/17af92f491458fee8f1e0a3eb602f7be3d6384c4/tests/e2e/test.cljs | clojure | (ns e2e.test
(:require e2e.token e2e.swap e2e.stake
[cljs.test :refer-macros [run-tests]]))
(defn -main []
(-> (run-tests 'e2e.token)
(.then #(run-tests 'e2e.swap))
(.then #(run-tests 'e2e.stake))))
| |
c57e20c89867119fc2210b770e8922c1fe82bb88b46339610782e620fde65d2f | ryanpbrewster/haskell | P004Test.hs | module Problems.P004Test
( case_004_main
) where
import Problems.P004
import Test.Tasty.Discover (Assertion, (@?=))
case_004_main :: Assertion
case_004_main = solve @?= "906609"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P004Test.hs | haskell | module Problems.P004Test
( case_004_main
) where
import Problems.P004
import Test.Tasty.Discover (Assertion, (@?=))
case_004_main :: Assertion
case_004_main = solve @?= "906609"
| |
68fee5472ff58727cb21d048f2afe3734abfb8c2115250a79505d5a1debf2bf7 | erlang/otp | shell_docs_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2020 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/stdlib/test/shell_docs_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2020 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(shell_docs_SUITE).
-export([all/0, suite/0, groups/0, init_per_suite/1, end_per_suite/1,
init_per_group/2,... |
675c30709a38885f155b6698885f6d8bb19bfc95db2b988e11aea1776b241f10 | clojure-interop/google-cloud-clients | core.clj | (ns com.google.cloud.talent.v4beta1.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.google.cloud.talent.v4beta1.ApplicationServiceClient$ListApplicationsFixedSizeCollection])
(require '[com.google.cloud.talent.v4beta1.ApplicationServiceClient$ListApplicationsPage])
(require '[com.g... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/core.clj | clojure | (ns com.google.cloud.talent.v4beta1.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.google.cloud.talent.v4beta1.ApplicationServiceClient$ListApplicationsFixedSizeCollection])
(require '[com.google.cloud.talent.v4beta1.ApplicationServiceClient$ListApplicationsPage])
(require '[com.g... | |
9f8bf5b7f4beb84018eb38a34f782e0079c63d0c438b09a904c6b6f1c7cf9239 | b0-system/b0 | b0_cmd_root.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 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/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/tool-b0/b0_cmd_root.mli | ocaml | * [cmd] is the command line for [root]. | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
4bcf2115f8f835de200372862d97ced097bf628b070b22cd26af8e0418a2f971 | zcaudate/hara | group.clj | (ns hara.state.group
(:require [hara.string :as string]
[hara.data.base.map :as map]))
(defrecord Group [])
(defmethod print-method
Group
[{:keys [tag] :as v} ^java.io.Writer w]
(.write w (str (if tag
(str "#" (string/to-string tag))
"")
(... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/state/group.clj | clojure | (ns hara.state.group
(:require [hara.string :as string]
[hara.data.base.map :as map]))
(defrecord Group [])
(defmethod print-method
Group
[{:keys [tag] :as v} ^java.io.Writer w]
(.write w (str (if tag
(str "#" (string/to-string tag))
"")
(... | |
1f6dcf75e1f466386fceb674ae4f5ecb23a77f1463af96c93df3e7c8030d7035 | pfdietz/ansi-test | format-tilde.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Jul 28 00:27:00 2004
;;;; Contains: Tests of format directive ~~
(def-format-test format.~.1
"~~" nil "~")
(deftest format.~.2
(loop for i from 0 to 100
for s = (make-string i :initial-element #\~)
for format-string = (format nil "~~~D~... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-tilde.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of format directive ~~ | Author :
Created : We d Jul 28 00:27:00 2004
(def-format-test format.~.1
"~~" nil "~")
(deftest format.~.2
(loop for i from 0 to 100
for s = (make-string i :initial-element #\~)
for format-string = (format nil "~~~D~~" i)
for s2 = (format nil format-string)
unless (st... |
20c2ff4ff473bc8985cd5ab274e8e08269559d632f768d905cc2c4382477e395 | byorgey/diagrams-play | TErr.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.TwoD.Layout.Tree
import Data.Tree
lf x = Node x []
t1 = Node 'A' [Node 'B' (map lf "CDE"), Node 'F' [Node 'G' (map lf "HIJ")]]
example =
renderTree ((<> circle 1 # fc white) . text . show)
(~~)
(symmLayout' with... | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/TErr.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.TwoD.Layout.Tree
import Data.Tree
lf x = Node x []
t1 = Node 'A' [Node 'B' (map lf "CDE"), Node 'F' [Node 'G' (map lf "HIJ")]]
example =
renderTree ((<> circle 1 # fc white) . text . show)
(~~)
(symmLayout' with... | |
3d60e723efb14d1614832f837c0a6ab3b3d4b2ef760639658f2df0a495f0c18a | weyrick/roadsend-php | php-odbc.scm | ;; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation ; either version 2.... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/odbc/php-odbc.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
fc14fb5bb882ba58da6643a7547497578ec32e047c0fc6fd451bfff8fde37a84 | slepher/astranaut | disable_tco_SUITE.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 10 Dec 2018 by < >
%%%-------------------------------------------------------------------
-module(disable_tco_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hr... | null | https://raw.githubusercontent.com/slepher/astranaut/e83eb4525c82fbea8feb3b56cfc59b75cc9c2513/test/disable_tco_SUITE.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
Info = [tuple()]
@end
--------------------------------------------------------------------
---------... | @author < >
( C ) 2018 ,
Created : 10 Dec 2018 by < >
-module(disable_tco_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-include("stacktrace.hrl").
@spec suite ( ) - > Info
suite() ->
[{timetrap,{seconds,30}}].
@spec init_per_... |
e1075c3eafba985483649fd4bbdb789807a52512fc21ece5eb4c11638776def9 | JanHenryNystrom/jhn_stdlib | plist_tests.erl | %%==============================================================================
Copyright 2013 - 2021 Jan < >
%%
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
%%
%% U... | null | https://raw.githubusercontent.com/JanHenryNystrom/jhn_stdlib/ffe3d8a58db28a4b0e270597fef7aa599dff9647/test/plist_tests.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 - 2021 Jan < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
( C ) 2013 - 2021 , < >
-module(plist_tests).
-copyright('Jan Henry Nystrom <>').
-include_lib("eunit/include/eunit... |
11765c65c263eb16b43e6b6cc13ec172afae12ea69ff2158cba423f566263135 | utahstreetlabs/risingtide | aof.clj | (ns risingtide.action.persist.aof
(:require
[clojure
[set :refer [map-invert rename-keys]]
[string :as str]
[walk :refer [keywordize-keys]]]
[risingtide
[config :as config]
[persist :refer [keywordize convert-to-kw-set convert-to-set]]])
(:import org.productivity.java.syslog4j.Syslog))
(d... | null | https://raw.githubusercontent.com/utahstreetlabs/risingtide/bc5b798396679739469b1bd8ee1b03db76178cde/src/risingtide/action/persist/aof.clj | clojure | (ns risingtide.action.persist.aof
(:require
[clojure
[set :refer [map-invert rename-keys]]
[string :as str]
[walk :refer [keywordize-keys]]]
[risingtide
[config :as config]
[persist :refer [keywordize convert-to-kw-set convert-to-set]]])
(:import org.productivity.java.syslog4j.Syslog))
(d... | |
8008eb63f5c50b4c72cb6e41f477418606e47227e0e0c28f7e5ea47711ed6dd1 | aweber/rabbitmq-autocluster | autocluster_app.erl | %%==============================================================================
@author < >
2016 AWeber Communications
%% @end
%%==============================================================================
-module(autocluster_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1... | null | https://raw.githubusercontent.com/aweber/rabbitmq-autocluster/31119506acb88b10355f3ab5bcc5291bfcf2cfe0/src/autocluster_app.erl | erlang | ==============================================================================
@end
==============================================================================
Application callbacks
===================================================================
Application callbacks
==========================================... | @author < >
2016 AWeber Communications
-module(autocluster_app).
-behaviour(application).
-export([start/2, stop/1]).
@private
application : start/[1,2 ] , and should start the processes of the
-spec(start(StartType :: normal | {takeover, node()} | {failover, node()},
StartArgs :: term()) ->
... |
f98c50ae9cc1c0945e0aac501c5ffd707d1f5ccba7e5d868a51daa3cf2f29cea | HunterYIboHu/htdp2-solution | ex472-test-on-all-nodes.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex472-test-on-all-nodes) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t cons... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter5/Section29-algorithm-that-backtrack/ex472-test-on-all-nodes.rkt | racket | about the language level of this file in a form that our tools can easily process.
data definitions
A Node is a Symbol
node.
A Path is a [List-of Node]
interpretation The list of nodes specifies a sequence
Node on the list to the last one.
constants
functions
Graph -> Boolean
determine whether there is a pat... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex472-test-on-all-nodes) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
A Edge is a ( cons Node [ List - o... |
8982ef95362c090567ec43f5ecae74da6bf3972bc9546f5c3f385a95c849b23f | AndrasKovacs/ELTE-func-lang | Gy11_pre.hs | # language InstanceSigs , DeriveFunctor #
# options_ghc -Wincomplete - patterns #
module Gy11 where
import Control.Monad
import Control.Applicative
import Data.Char
import Data.Maybe
import Debug.Trace
State
--------------------------------------------------------------------------------
newtype State s a = State ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/e99f5e5629aa10789bf6b6a07c6ea3462744d702/2021-22-2/gyak_3/Gy11_pre.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
mindig hibázó parser
Control.Applicative-ból:
Control.Applicative-ból:
----------------------------------------------------------
token/whitespace parsing seg... | # language InstanceSigs , DeriveFunctor #
# options_ghc -Wincomplete - patterns #
module Gy11 where
import Control.Monad
import Control.Applicative
import Data.Char
import Data.Maybe
import Debug.Trace
State
newtype State s a = State {runState :: s -> (a, s)}
deriving Functor
instance Applicative (State s) wher... |
5fcb5cf79d00ab6f5f63e8e67d7189e4fe8aa9d7ceeb12d0e61aecb0c909a12b | Helium4Haskell/helium | PatUnaryMinBad.hs | f (-x) = 3
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/PatUnaryMinBad.hs | haskell | f (-x) = 3
| |
b7d065ea755d2d87d105bea460629fc249e4411d731f15d291a690e6d99266b3 | dharrigan/startrek | impl.clj | (ns startrek.core.database.impl
{:author "David Harrigan"}
(:require
[clojure.tools.logging :as log]
[next.jdbc :as jdbc]
[next.jdbc.connection :as connection]
-jdbc/blob/a568f0fa87b4216941bfefbf3e86f2b182592ff7/src/next/jdbc/date_time.clj#L30
[next.jdbc.result-set :refer [as-kebab-maps]]
[startrek... | null | https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/core/database/impl.clj | clojure | DONUT LIFECYCLE FUNCTIONS ↓ | (ns startrek.core.database.impl
{:author "David Harrigan"}
(:require
[clojure.tools.logging :as log]
[next.jdbc :as jdbc]
[next.jdbc.connection :as connection]
-jdbc/blob/a568f0fa87b4216941bfefbf3e86f2b182592ff7/src/next/jdbc/date_time.clj#L30
[next.jdbc.result-set :refer [as-kebab-maps]]
[startrek... |
8b28dad8be6da86d391925aa4491b9a99f5808937b8b2c97596a0ff1b6972731 | vorotynsky/Kroha | Instructions.hs | Copyright ( c ) 2020 - 2021
module Kroha.Instructions where
import Control.Monad (void)
import Control.Monad.Zip (mzipWith)
import Data.Foldable (toList)
import Data.Maybe (fromJust)
import Data.Tree
import Kroha.Scope
import ... | null | https://raw.githubusercontent.com/vorotynsky/Kroha/e5d11c5f3612d3ea9b0701c7945ff8cc51ea12d6/src/Kroha/Instructions.hs | haskell | Copyright ( c ) 2020 - 2021
module Kroha.Instructions where
import Control.Monad (void)
import Control.Monad.Zip (mzipWith)
import Data.Foldable (toList)
import Data.Maybe (fromJust)
import Data.Tree
import Kroha.Scope
import ... | |
e0aa79c1153285e2fd4b12cac21a507ba9921f0b9f8cd9fddf0758b4258d0316 | smarkets/smk_erlang_sdk | smk_app.erl | -module(smk_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
smk_sup:start_link... | null | https://raw.githubusercontent.com/smarkets/smk_erlang_sdk/f56ba38201a8d3bc6e2621a402e16f486f8acf09/src/smk_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(smk_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
smk_sup:start_link().
stop(_State) ->
ok.
|
8347281bc55b11ffbab67d5eb1198fb84b741985e515da5f88c49639d9d85b3f | raghavkarol/edt | edt_api_SUITE.erl | -module(edt_api_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("common_test/include/ct.hrl").
suite() ->
[{timetrap, {seconds, 5}}].
init_per_suite(Config) ->
{ok, Home} = ct_helper:setup_test_data(Config),
[{home, Home} | Config].
end_per_suite(_Config) ->
ok.
init_per_testcase(_... | null | https://raw.githubusercontent.com/raghavkarol/edt/c9ac86d4161deb7f23ff20b6ae713e77706e52fa/test/edt_api_SUITE.erl | erlang | -module(edt_api_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("common_test/include/ct.hrl").
suite() ->
[{timetrap, {seconds, 5}}].
init_per_suite(Config) ->
{ok, Home} = ct_helper:setup_test_data(Config),
[{home, Home} | Config].
end_per_suite(_Config) ->
ok.
init_per_testcase(_... | |
5cd54793ceef23e2eca24064b5a10377a263c08a47741ce9bc8c1facd3527357 | mathiasbourgoin/ocaml_mammut | generate_c_functions.ml |
let () =
print_endline "#include <mammut/mammut.h>" ;
Cstubs.write_c Format.std_formatter ~prefix:"mammut_stub_" (module Mammut_stubs_description.Bindings)
| null | https://raw.githubusercontent.com/mathiasbourgoin/ocaml_mammut/41efa63644307d175562a197aecf9dd150f9f3a2/src/c/generate_c_functions.ml | ocaml |
let () =
print_endline "#include <mammut/mammut.h>" ;
Cstubs.write_c Format.std_formatter ~prefix:"mammut_stub_" (module Mammut_stubs_description.Bindings)
| |
432a089ab1bdf4bf18392f896188b7d6a8f4e3e0fd5f76be2ccdc61ce19dc7f4 | mirage/ocaml-9p | protocol_9p_s.mli |
* Copyright ( C ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-9p/b72ccf01d3c8d7942e7ba8daefda08bf08c902b1/lib/protocol_9p_s.mli | ocaml | * Common signatures used by the library
* Common logging functions
* Values which can be read and written
* Instances of this type can be read and written
* The size of a buffer needed to hold [t]
* Read a [t] from the given buffer and return it, along with the
unused remainder of the buffer. If the buffer c... |
* Copyright ( C ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
69f2fe1842a75c416ed1b2215f9615a20d5b26db702209979535691fb970720d | zyrolasting/racket-vulkan | physical-device-report.rkt | #lang racket/base
; Reports physical device information.
(require racket/sequence
racket/string
vulkan/unsafe
ffi/unsafe)
(define (create _t f)
(define p (malloc _t 'atomic))
(f p)
(ptr-ref p _t))
(define (format-uuid numbers)
(string-upcase
(apply format (string-replace "xxxx-x... | null | https://raw.githubusercontent.com/zyrolasting/racket-vulkan/632e0d0ea2b7415dc290221331df1bf996612729/examples/physical-device-report.rkt | racket | Reports physical device information. | #lang racket/base
(require racket/sequence
racket/string
vulkan/unsafe
ffi/unsafe)
(define (create _t f)
(define p (malloc _t 'atomic))
(f p)
(ptr-ref p _t))
(define (format-uuid numbers)
(string-upcase
(apply format (string-replace "xxxx-xx-xx-xx-xxxxxx"
... |
54cd261ca81f085b899243b0e0f04ba3e9d806623050faecefc13b48a245acac | Plutonomicon/plutarch-plutus | IntegerSpec.hs | module Plutarch.IntegerSpec (spec) where
import Plutarch
import Plutarch.Prelude
import Plutarch.Test
import Test.Hspec
spec :: Spec
spec = do
describe "int" $ do
describe "examples" $ do
pgoldenSpec $ do
"add1" @| add1
"add1Hoisted" @| add1Hoisted
"example1" @| example1
"e... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/plutarch-test/tests/Plutarch/IntegerSpec.hs | haskell | > PInteger :--> PInteger)
> PInteger :--> PInteger)
> PInteger)
> PInteger)
> PInteger) | module Plutarch.IntegerSpec (spec) where
import Plutarch
import Plutarch.Prelude
import Plutarch.Test
import Test.Hspec
spec :: Spec
spec = do
describe "int" $ do
describe "examples" $ do
pgoldenSpec $ do
"add1" @| add1
"add1Hoisted" @| add1Hoisted
"example1" @| example1
"e... |
0ac99194d3b65729c041b89ec56c4ad20c98acc910ff41f39113310c0f315116 | unisonweb/unison | Names.hs | {-# LANGUAGE OverloadedStrings #-}
module Unison.PrettyPrintEnvDecl.Names where
import Unison.NamesWithHistory (NamesWithHistory)
import Unison.PrettyPrintEnv.Names (fromNames, fromSuffixNames)
import Unison.PrettyPrintEnvDecl (PrettyPrintEnvDecl (PrettyPrintEnvDecl))
fromNamesDecl :: Int -> NamesWithHistory -> Pret... | null | https://raw.githubusercontent.com/unisonweb/unison/7843e48cddbe46436bffb5a2e1bb5fb444f55302/parser-typechecker/src/Unison/PrettyPrintEnvDecl/Names.hs | haskell | # LANGUAGE OverloadedStrings # |
module Unison.PrettyPrintEnvDecl.Names where
import Unison.NamesWithHistory (NamesWithHistory)
import Unison.PrettyPrintEnv.Names (fromNames, fromSuffixNames)
import Unison.PrettyPrintEnvDecl (PrettyPrintEnvDecl (PrettyPrintEnvDecl))
fromNamesDecl :: Int -> NamesWithHistory -> PrettyPrintEnvDecl
fromNamesDecl hashLe... |
76d52a7f4b11e3f354586272e11d72c9ecd7e2e7e74e36c69af1a4a441dcd1e9 | jonase/eastwood | green.clj | (ns testcases.dynamic-earmuffs.no-dynamic.green)
(def foo)
| null | https://raw.githubusercontent.com/jonase/eastwood/a515efe22c9ce3c84d73d800e23ae7ebbda4a78a/cases/testcases/dynamic_earmuffs/no_dynamic/green.clj | clojure | (ns testcases.dynamic-earmuffs.no-dynamic.green)
(def foo)
| |
0b9c67b2ac065d42b1f963e82a8d543da59ab80a5a63bc12e2b3267c320208eb | input-output-hk/marlowe-cardano | Forward.hs | {-# LANGUAGE OverloadedStrings #-}
module Marlowe.Contracts.UTC.Forward
( forward
) where
import Data.Time.Clock (UTCTime)
import Language.Marlowe.Extended.V1
import qualified Marlowe.Contracts.Forward as C
import Marlowe.Contracts.UTC.Common
-- A forward contract is contract between to parties A and B to buy or ... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/78a3dbb1cd692146b7d1a32e1e66faed884f2432/marlowe-contracts/src/Marlowe/Contracts/UTC/Forward.hs | haskell | # LANGUAGE OverloadedStrings #
A forward contract is contract between to parties A and B to buy or sell an
underlying asset at a specified price on a future date
^ Party A
^ Token A
^ Value A
^ Deposit timeout A
^ Party B
^ Token B
^ Value B:ta
^ Deposit timeout B
^ Delivery date
^ Forward contract | module Marlowe.Contracts.UTC.Forward
( forward
) where
import Data.Time.Clock (UTCTime)
import Language.Marlowe.Extended.V1
import qualified Marlowe.Contracts.Forward as C
import Marlowe.Contracts.UTC.Common
forward ::
forward partyA tokenA valueA timeoutA partyB tokenB valueB timeoutB deliveryDate =
C.forward ... |
65727f8bc3069cc971e7712562cb72544527ae9610bfc33c23c0af75abed9b82 | dawidovsky/IIUWr | ListyLeniwe.rkt | #lang racket
(define (lcons x f)
(cons x f))
(define (lhead l)
(car l))
(define (ltail l)
((cdr l)))
(define (nats-from m)
(lcons
m
(lambda () (nats-from (+ m 1)))))
(define nats
(nats-from 0))
(define (prime? n)
(define (div-by m)
(cond [(= m n) true]
[(= (modulo n m) 0) false]
... | null | https://raw.githubusercontent.com/dawidovsky/IIUWr/73f0f65fb141f82a05dac2573f39f6fa48a81409/MP/Pracownia8/ListyLeniwe.rkt | racket | #lang racket
(define (lcons x f)
(cons x f))
(define (lhead l)
(car l))
(define (ltail l)
((cdr l)))
(define (nats-from m)
(lcons
m
(lambda () (nats-from (+ m 1)))))
(define nats
(nats-from 0))
(define (prime? n)
(define (div-by m)
(cond [(= m n) true]
[(= (modulo n m) 0) false]
... | |
0a4c8d06e304476bc3268b5f184fd6e45ddc0545f456c3ad346171098b22aae3 | opencensus-beam/opencensus_service | opencensus_service_sup.erl | %%%-------------------------------------------------------------------
%% @doc opencensus_service top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(opencensus_service_sup).
-behaviour(supervisor).
-export([start_link/0,
start_child/5]).
-export([in... | null | https://raw.githubusercontent.com/opencensus-beam/opencensus_service/ec3915feddde07b7b044115ea11573e19a443dcb/src/opencensus_service_sup.erl | erlang | -------------------------------------------------------------------
@doc opencensus_service top level supervisor.
@end
------------------------------------------------------------------- |
-module(opencensus_service_sup).
-behaviour(supervisor).
-export([start_link/0,
start_child/5]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
start_child(Name, ChannelName, Endpoints, Options, SupFlags) ->
supervisor:start_chi... |
d306083f662a1f0da974f14aa09a8e76e6efe58ecebc641c2ad9b51c2c48372e | engineyard/vertebra-erl | herault_worker.erl | Copyright 2008 , Engine Yard , Inc.
%
This file is part of Vertebra .
%
Vertebra is free software : you can redistribute it and/or modify it under the
% terms of the GNU Lesser General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
% lat... | null | https://raw.githubusercontent.com/engineyard/vertebra-erl/cf6e7c84f6dfbf2e31f19c47e9db112ae292ec27/lib/herault/src/herault_worker.erl | erlang |
terms of the GNU Lesser General Public License as published by the Free
later version.
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
API
gen_server callbacks | Copyright 2008 , Engine Yard , Inc.
This file is part of Vertebra .
Vertebra is free software : you can redistribute it and/or modify it under the
Software Foundation , either version 3 of the License , or ( at your option ) any
Vertebra is distributed in the hope that it will be useful , but WITHOUT ANY
Yo... |
9baab3b4fbfe1256ac6cd2dc0d7e0937c2ba4bdfcb0581adb71edb9ba4299187 | da-x/fancydiff | DList.hs | module Lib.DList
( dlistConcat
, dlistForM
) where
------------------------------------------------------------------------------------
import Control.Monad (foldM)
import Data.DList (DList)
import qualified Data.DList as DList
--------... | null | https://raw.githubusercontent.com/da-x/fancydiff/95c76034d907f715466b26e4f4001990ca98bfcc/src/Lib/DList.hs | haskell | ----------------------------------------------------------------------------------
---------------------------------------------------------------------------------- | module Lib.DList
( dlistConcat
, dlistForM
) where
import Control.Monad (foldM)
import Data.DList (DList)
import qualified Data.DList as DList
dlistConcat :: DList (DList a) -> DList a
dlistConcat = DList.concat . DList.toList
dlistMa... |
3e1f19de2d9bc193eb440f677715dd0d6a191fd70c5005fa84ab40c31e0301e5 | rudymatela/speculate | CondReason.hs | -- |
-- Module : Test.Speculate.CondReason
Copyright : ( c ) 2016 - 2019
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
--
-- This module is part o Speculate.
--
-- Conditional equational reasoning.
module Test.Speculate.CondReason where
import Test.Speculate.Expr
import... | null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/src/Test/Speculate/CondReason.hs | haskell | |
Module : Test.Speculate.CondReason
This module is part o Speculate.
Conditional equational reasoning.
Chy = Conditional Thy = Conditional Theory
optional optimization
normalize is maybe a misnomer. not necessarily convergent.
already normalized
TODO: fix silly code structure in cnormalize!
using the... | Copyright : ( c ) 2016 - 2019
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
module Test.Speculate.CondReason where
import Test.Speculate.Expr
import Test.Speculate.Reason
import qualified Test.Speculate.Utils.Digraph as D
import Test.Speculate.Utils.Digraph (Digraph)
import ... |
88571ab5012f6a4e9c6711ba1b49ec5f558e31f95f006163cd8fc65f77c1e1b5 | let-def/goo | goo_ref.mli | { { { COPYING * (
Copyright ( C ) 2012 < frederic.bour(_)lakaban.net >
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software without restriction , including without limita... | null | https://raw.githubusercontent.com/let-def/goo/c5dec35c8148f425c87cc4b243ec44d1c8edcaa5/lib/goo_ref.mli | ocaml | * [create ~compact n] creates a new table with memory preallocated for n items
* Size is doubled when needed.
* compact function is called when relocating an item to a new position.
* References an item in the table
* Safe getter
* Quick getter.
* Raise an exception if the references is invalid, however this ... | { { { COPYING * (
Copyright ( C ) 2012 < frederic.bour(_)lakaban.net >
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software without restriction , including without limita... |
de80560704734320153559019fc3ba0fa0a13873809ccbc13ebff79a05b9ada6 | raghavkarol/edt | edt_profile_pprint.erl | %%
%% edt_profile_pprint is a pretty printer for profiles created by
%% edt_profile.
%%
Copyright 2021 .
%%
-module(edt_profile_pprint).
-include("edt_profile.hrl").
-export([
summary/0, summary/1,
summary1/1,
call_graph/0, call_graph/1,
call_graph1/1
]).
%% --------------------------------------... | null | https://raw.githubusercontent.com/raghavkarol/edt/619bb788767dbb0d8e144e1c58af9e6e4925460c/src/edt_profile_pprint.erl | erlang |
edt_profile_pprint is a pretty printer for profiles created by
edt_profile.
---------------------------------------------------------
---------------------------------------------------------
@doc call_graph
@doc summary
---------------------------------------------------------
API
-------------------------... | Copyright 2021 .
-module(edt_profile_pprint).
-include("edt_profile.hrl").
-export([
summary/0, summary/1,
summary1/1,
call_graph/0, call_graph/1,
call_graph1/1
]).
Internal functions
mfa_width() ->
-60.
indent(I) ->
string:join(lists:duplicate(I, " "), "").
to_string1({mfa, {Indent, M... |
254848d615c42d85fe0f010ca552421112d072cb987701faeab6423f22df7c4d | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
import System.Exit (ExitCode (..))
main = cabalTest $ do
fails $ cabal "v2-build" ["example"]
fails $ cabal "v2-haddock" ["example"]
| null | https://raw.githubusercontent.com/haskell/cabal/00a2351789a460700a2567eb5ecc42cca0af913f/cabal-testsuite/PackageTests/NewHaddock/Fails/cabal.test.hs | haskell | import Test.Cabal.Prelude
import System.Exit (ExitCode (..))
main = cabalTest $ do
fails $ cabal "v2-build" ["example"]
fails $ cabal "v2-haddock" ["example"]
| |
5da3597310806fa74995e70254d335b61ceb873514583e921f04e9bbbb0a1b22 | racket/plot | axis-transform-tests.rkt | #lang racket
(require rackunit
plot
plot/utils
racket/draw
racket/runtime-path
"helpers.rkt")
(x-axis-ticks? #f)
(y-axis-ticks? #f)
(define (do-plot1 output-fn)
(parameterize ([plot-x-transform log-transform])
(output-fn(list (function values 1 5)
... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-test/plot/tests/axis-transform-tests.rkt | racket | #lang racket
(require rackunit
plot
plot/utils
racket/draw
racket/runtime-path
"helpers.rkt")
(x-axis-ticks? #f)
(y-axis-ticks? #f)
(define (do-plot1 output-fn)
(parameterize ([plot-x-transform log-transform])
(output-fn(list (function values 1 5)
... | |
a7794291cd02ea151ab8b0e3a7ece7cd5f2d153d8caefd10564e3accd7921bec | footprintanalytics/footprint-web | one_off_dbs.clj | (ns metabase.test.data.one-off-dbs
"Test utility functions for using one-off temporary in-memory H2 databases, including completely blank ones and the
infamous `blueberries_consumed` database, used by sync tests in several different namespaces."
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/test/data/one_off_dbs.clj | clojure | ---------------------------------------- Generic Empty Temp In-Memory DB -----------------------------------------
------------------------------------------------- Blueberries DB ------------------------------------------------- | (ns metabase.test.data.one-off-dbs
"Test utility functions for using one-off temporary in-memory H2 databases, including completely blank ones and the
infamous `blueberries_consumed` database, used by sync tests in several different namespaces."
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :... |
d15ea592c9cd1a200fb4546009bca8cca048e2734f71bbbe3bf211df9c16bfa7 | achirkin/vulkan | Internal.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNe... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src/Graphics/Vulkan/Marshal/Internal.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE RankNTypes #
# LANGUAGE RoleAnnotations #
# LANGUAGE Strict #
... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications ... |
a1c536b5f6cd540bcf6af7b14aaa0f2bb3e8db0c38d5ea582c4bd0d3a0d52e79 | project-oak/hafnium-verification | clang_ast_main.ml |
* Copyright ( c ) 2015 - present , Facebook , Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE ... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/facebook-clang-plugins/clang-ocaml/clang_ast_main.ml | ocaml | This function is not thread-safe
visit
This function is not thread-safe
just in case
populate cache |
* Copyright ( c ) 2015 - present , Facebook , Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE ... |
e56c715d231fd39d53d03e2b643c512036ef0ee63d07ebdf9b2de6f136ed30cb | sondresl/AdventOfCode | Day04.hs | module Day04 where
import Data.Hash.MD5
import Data.List (find)
input :: String
input = "ckczppom"
leadingZeroes :: Int -> String -> Maybe (Int, String)
leadingZeroes n str = find (all (=='0') . take n . snd) . zip [1..] . map (md5s . Str . (str++) . show) $ [1..]
main :: IO ()
main = do
print $ leadingZeroes 5 i... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2015/Haskell/src/Day04.hs | haskell | Just (117946,"00000fe1c139a2c710e9a5c03ec1af03") | module Day04 where
import Data.Hash.MD5
import Data.List (find)
input :: String
input = "ckczppom"
leadingZeroes :: Int -> String -> Maybe (Int, String)
leadingZeroes n str = find (all (=='0') . take n . snd) . zip [1..] . map (md5s . Str . (str++) . show) $ [1..]
main :: IO ()
main = do
print $ leadingZeroes 5 i... |
f96f6ecbb462f2669b5e0b81180d0b50297a4c1e0300dd3a4a5fc46551c43ba5 | Gabriella439/Haskell-Total-Library | Complete.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE TypeOperators #-}
module Lens.Family.Complete
( Full(..)
, GFull(..)
, _cocase
, at
-- * Re-exports
, (&)
, (&&&)
) where
import Data.Functor.Identity
import Data.Function ((&))
import Control.Arrow ((&&&)... | null | https://raw.githubusercontent.com/Gabriella439/Haskell-Total-Library/f0715e55e3cb6fe83797b396c4c9b4a6f9a4ea29/src/Lens/Family/Complete.hs | haskell | # LANGUAGE TypeOperators #
* Re-exports
A typeclass for trivially inhabited types
| Synonym for `trivial`, used to check if a copattern is complete
| Copattern match on a `Lens.Family.Traversal` | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
module Lens.Family.Complete
( Full(..)
, GFull(..)
, _cocase
, at
, (&)
, (&&&)
) where
import Data.Functor.Identity
import Data.Function ((&))
import Control.Arrow ((&&&))
import GHC.Generics
class Full a where
trivial :... |
18f65e5239857fc4a9825260ac8d60e458ad3cb09a57e760b60da89dca2b193e | hiroshi-unno/coar | polynomial.ml | open Core
let qualifiers_of _pvar _sorts _labeled_atoms _examples = failwith "not implemented"
let str_of_domain = "Polynomial"
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/936605f60a0e540c84c2d3f1be5d94bd7e14ce04/lib/PCSat/qualifier/polynomial.ml | ocaml | open Core
let qualifiers_of _pvar _sorts _labeled_atoms _examples = failwith "not implemented"
let str_of_domain = "Polynomial"
| |
586cbc0d5d5d9cc7b6d1c0a99345ebfed9caf51750a111f43169b3458e13056f | haskell-graphql/graphql-api | OrderedMap.hs | {-# LANGUAGE RankNTypes #-}
# OPTIONS_HADDOCK not - home #
-- | Description: Data structure for mapping keys to values while preserving order of appearance
--
There are many cases in GraphQL where we want to have a map from names to
-- values, where values can easily be lookup up by name and name is unique.
-- This ... | null | https://raw.githubusercontent.com/haskell-graphql/graphql-api/8ced344485cd638cee50eeb6b653baecea359406/src/GraphQL/Internal/OrderedMap.hs | haskell | # LANGUAGE RankNTypes #
| Description: Data structure for mapping keys to values while preserving order of appearance
values, where values can easily be lookup up by name and name is unique.
This would normally be modelled as a 'Map'. However, in many of these
cases, the order in which the entries appear matters.
... | # OPTIONS_HADDOCK not - home #
There are many cases in GraphQL where we want to have a map from names to
' foo ' : 1 ,
' bar ' : 2
' bar ' : 2 ,
' foo ' : 1 ,
enough " for implementing the rest of GraphQL .
module GraphQL.Internal.OrderedMap
( OrderedMap
, empty
, singleton
, orderedMap
,... |
34a058119fc751135472dadc2b7cb1d7416c23417e6f9c05355978ccb2bf5818 | danieljharvey/mimsa | Typecheck.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Typechecker.Typecheck
( spec,
)
where
import Data.Bifunctor
import Data.Either (isLeft)
import qualified Data.List.NonEmpty as NE
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Language.Mimsa.Core
import Langu... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/7931b803a9f7e71ff47dc9afa7dc6bceaeb238ee/compiler/test/Test/Typechecker/Typecheck.hs | haskell | # LANGUAGE OverloadedStrings #
can't compare
needs type annotations to make this make sense
needs type annotations |
module Test.Typechecker.Typecheck
( spec,
)
where
import Data.Bifunctor
import Data.Either (isLeft)
import qualified Data.List.NonEmpty as NE
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Language.Mimsa.Core
import Language.Mimsa.Typechecker.Elaborate
imp... |
160afa4cfe8dd20c639651325ec358af81db21b075b9fb926b025abe7dc26841 | BoeingX/haskell-programming-from-first-principles | SomethingOtherThanList.hs | module SignalingAdversity.ChapterExercises.SomethingOtherThanList where
data BinaryTree a = Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
unfold :: (a -> Maybe (a, b, a)) -> a -> BinaryTree b
unfold f a = case f a of
Nothing -> Leaf
... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/SignalingAdversity/ChapterExercises/SomethingOtherThanList.hs | haskell | module SignalingAdversity.ChapterExercises.SomethingOtherThanList where
data BinaryTree a = Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
unfold :: (a -> Maybe (a, b, a)) -> a -> BinaryTree b
unfold f a = case f a of
Nothing -> Leaf
... | |
dbfddab7e16c5eca7ae59a6f263306d4ce271215e467580c134af6a53ef81b67 | databrary/databrary | RequestTest.hs | # LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Action.RequestTest where
import Network.Wai
import Test.Tasty
import Test.Tasty.HUnit
import Action.Request
test_isDatabraryClient :: [TestTree]
test_isDatabraryClient =
[ testCase "example" $ isDatabraryClient defaultRequest @?= False
, testCase "t... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/test/Action/RequestTest.hs | haskell | # LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Action.RequestTest where
import Network.Wai
import Test.Tasty
import Test.Tasty.HUnit
import Action.Request
test_isDatabraryClient :: [TestTree]
test_isDatabraryClient =
[ testCase "example" $ isDatabraryClient defaultRequest @?= False
, testCase "t... | |
015578dbd63739ce6ae50e1647bba5bae131f41c7885568752f5b8a7226654fa | clojure-interop/aws-api | project.clj | (defproject clojure-interop/com.amazonaws.services.waf "1.0.0"
:description "Clojure to Java Interop Bindings for com.amazonaws.services.waf"
:url "-interop/aws-api"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:source-paths ["src"])
| null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.waf/project.clj | clojure | (defproject clojure-interop/com.amazonaws.services.waf "1.0.0"
:description "Clojure to Java Interop Bindings for com.amazonaws.services.waf"
:url "-interop/aws-api"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:source-paths ["src"])
| |
d9ccfc5bd368c87b0e715ea18e47cd66cb71460c9b19686e7d4d581e3729a266 | zenspider/schemers | exercise.2.88.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.88
;; Extend the polynomial system to include
;; subtraction of polynomials. (Hint: You may find it helpful to
;; define a generic negation operation.)
;; (assert-equal x y)
(done)
| null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.88.scm | scheme | Extend the polynomial system to include
subtraction of polynomials. (Hint: You may find it helpful to
define a generic negation operation.)
(assert-equal x y) | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.88
(done)
|
480228606c4a2116282f4e75e8058229ddb67e90e2f31b9f3f6e4a9691bc2866 | nubank/docopt.clj | common.clj | (def usage "Naval Fate.
Usage:
naval_fate ship new <name>
naval_fate ship <name> move <lat> <long> [--speed=<kn>]
naval_fate mine (set|remove) <lat> <long> [--moored|--drifting]
naval_fate -h | --help
naval_fate --version
Options:
-h --help Show this screen.
--version Show version.
--speed=<kn... | null | https://raw.githubusercontent.com/nubank/docopt.clj/98814f559d2e50fdf10f43cbe3b7da0ca3cca423/babashka/common.clj | clojure | (def usage "Naval Fate.
Usage:
naval_fate ship new <name>
naval_fate ship <name> move <lat> <long> [--speed=<kn>]
naval_fate mine (set|remove) <lat> <long> [--moored|--drifting]
naval_fate -h | --help
naval_fate --version
Options:
-h --help Show this screen.
--version Show version.
--speed=<kn... | |
de97f94327f9fddae5fe69a8c2e8b95484c4b37b3abb2d17a01f20606a14f70f | janestreet/memtrace_viewer_with_deps | enumeration_intf.ml | open! Core_kernel
open! Import
module type S = sig
type ('a, 'b) enumeration
type t
type enumeration_witness
val enumeration : (t, enumeration_witness) enumeration
end
" fc " stands for " first class "
module type S_fc = sig
type enumerable_t
include S with type t := enumerable_t
end
module type Enum... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/total_map/src/enumeration_intf.ml | ocaml | open! Core_kernel
open! Import
module type S = sig
type ('a, 'b) enumeration
type t
type enumeration_witness
val enumeration : (t, enumeration_witness) enumeration
end
" fc " stands for " first class "
module type S_fc = sig
type enumerable_t
include S with type t := enumerable_t
end
module type Enum... | |
9a2c913458ab23eae652cb0a6fb925e57af20886c4c051e5626cd1375621fde1 | realworldocaml/book | sexp_conv.mli | (** Utility Module for S-expression Conversions *)
* { 6 Conversion of OCaml - values to S - expressions }
(** [default_string_of_float] reference to the default function used
to convert floats to strings.
Initially set to [fun n -> sprintf "%.20G" n]. *)
val default_string_of_float : (float -> string) ref
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/sexplib0/src/sexp_conv.mli | ocaml | * Utility Module for S-expression Conversions
* [default_string_of_float] reference to the default function used
to convert floats to strings.
Initially set to [fun n -> sprintf "%.20G" n].
* [read_old_option_format] reference for the default option format
used to read option values. [Of_sexp_error] wil... |
* { 6 Conversion of OCaml - values to S - expressions }
val default_string_of_float : (float -> string) ref
* [ write_old_option_format ] reference for the default option format
used to write option values . If set to [ true ] , the old - style option
format will be used , the new - style one otherwise... |
ff9976a2d242e2e9dbaf89ad86d3389d9ec40d29d23d267a3c68448bbef20706 | brawnski/git-annex | S3stub.hs | stub for when is not available
module Remote.S3 (remote) where
import Types.Remote
import Types
remote :: RemoteType Annex
remote = RemoteType {
typename = "S3",
enumerate = return [],
generate = error "S3 not enabled",
setup = error "S3 not enabled"
}
| null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Remote/S3stub.hs | haskell | stub for when is not available
module Remote.S3 (remote) where
import Types.Remote
import Types
remote :: RemoteType Annex
remote = RemoteType {
typename = "S3",
enumerate = return [],
generate = error "S3 not enabled",
setup = error "S3 not enabled"
}
| |
c1a42089fb7362261f2b924496e3c1a7ce3372290cd81ad1d4cc37ce67b1f9f3 | lispbuilder/lispbuilder | sdl.lisp |
SDL CFFI lisp wrapper
Part of the CL - Gardeners project
;;;;
( C)2006 Justin Heyes - Jones ,
;;;; See COPYING for license
;;;;
This .i file has been tested with SDL version 1.2.11
include/*.h changes from SDL-1.2.9 to SDL-1.2.11
;;
SDL-1.2.9 SDL-1.2.11
;; ========== =========
;; SDL.h SDL.h
;; ... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/cffi/sdl.lisp | lisp |
See COPYING for license
========== =========
SDL.h SDL.h
SDL_active.h SDL_active.h
SDL_audio.h SDL_audio.h
SDL_byteorder.h SDL_byteorder.h
SDL_cpuinfo.h SDL_cpuinfo.h
SDL_endian.h SDL_endian.h
SDL_error.h SDL_error.h
SDL_getenv.h SDL_getenv.h
SDL_joystick.h SDL_joystick.h
SDL_keyboard.h SDL_... |
SDL CFFI lisp wrapper
Part of the CL - Gardeners project
( C)2006 Justin Heyes - Jones ,
This .i file has been tested with SDL version 1.2.11
include/*.h changes from SDL-1.2.9 to SDL-1.2.11
SDL-1.2.9 SDL-1.2.11
SDL_cdrom.h SDL_cdrom.h
SDL_copying.h SDL_copying.h
SDL_events.h SDL_even... |
ea0f69c8e4afdbd0cb2ee036d840bb1c42c36c110ae01b54a7585f16c31aad3d | 6502/JSLisp | turtle.lisp | (load (http-get "fsg.lisp"))
(defvar *turtle* (create-element "img"))
(setf *turtle*.src "turtle.png")
(setf *turtle*.style.position "absolute")
(setf *turtle*.style.WebkitTransformOrigin "21px 16px")
(append-child document.body *turtle*)
(defvar *target-x* 200)
(defvar *target-y* 200)
(defvar *target-angle* 0)
(defv... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/turtle.lisp | lisp | (load (http-get "fsg.lisp"))
(defvar *turtle* (create-element "img"))
(setf *turtle*.src "turtle.png")
(setf *turtle*.style.position "absolute")
(setf *turtle*.style.WebkitTransformOrigin "21px 16px")
(append-child document.body *turtle*)
(defvar *target-x* 200)
(defvar *target-y* 200)
(defvar *target-angle* 0)
(defv... | |
f8a5e8dff31834be68b90a794c0ea4493aceeb80aa07526d4558aab23eb9f5fe | Mayvenn/storefront | accordion_v2022_10.cljc | (ns storefront.components.accordion-v2022-10
(:require [mayvenn.visual.tools :refer [with within]]
[storefront.component :as c]
[storefront.platform.component-utils :as utils]
[storefront.components.svg :as svg]
[storefront.events :as events]
[storefront.tra... | null | https://raw.githubusercontent.com/Mayvenn/storefront/c6a604c5f1ccb993c41521c27a23355639d3b40d/src-cljc/storefront/components/accordion_v2022_10.cljc | clojure | Button states: up, down, hidden
Button states: up, down, hidden | (ns storefront.components.accordion-v2022-10
(:require [mayvenn.visual.tools :refer [with within]]
[storefront.component :as c]
[storefront.platform.component-utils :as utils]
[storefront.components.svg :as svg]
[storefront.events :as events]
[storefront.tra... |
05fa1dbaa7e4720631f82240d408e861766a1b4fc18ab206fb9ca4705ce4bed9 | deverl-ide/deverl | deverl_eunit_listener.erl | %% =====================================================================
%% 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 vers... | null | https://raw.githubusercontent.com/deverl-ide/deverl/69216c7720ce2a32344711f5526c0eb9676bcae0/deverl/src/deverl_eunit_listener.erl | erlang | =====================================================================
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
@author < >
@author < >
, 2014
@doc Listener receives callbacks whilst Eunit is running .
-... |
594118e899a00a09a3d9dc42cdb28e7a00383974ae8466efc436fd5bdf1e9872 | HaskellEmbedded/data-stm32 | ClockInit.hs | # LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
module {{ modns }}
( init_clocks
) where
import Ivory.Language
import Ivory.Stdlib
import Ivory.HW
import Ivory.BSP.STM32.ClockConfig
import Ivory.BSP.STM32.Peripheral.RCC.RegTypes
import Ivory.BSP.STM32{{ fam }}.FLASH
import Ivo... | null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/templates/STM32FAM/F4/ClockInit.hs | haskell | Reset PLLCFGR register
Reset HSEBYP bit
Disable all interrupts
clearBit rcc_cir_plli2s_rdyie
Spin for a little bit waiting for RCC->CR HSERDY bit to be high
reset value looks good (hi-perf mode)
modifyReg pwr_reg_cr $ setBit pwr_cr_vos
Select bus clock dividers
then clockconfig | # LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
module {{ modns }}
( init_clocks
) where
import Ivory.Language
import Ivory.Stdlib
import Ivory.HW
import Ivory.BSP.STM32.ClockConfig
import Ivory.BSP.STM32.Peripheral.RCC.RegTypes
import Ivory.BSP.STM32{{ fam }}.FLASH
import Ivo... |
cbffedecad85ceef73fb8e94ef7299a1932d7d678339eca09d5ffe693d9cdc4c | jtkristensen/exercises-in-type-level-programming | PropositionalLogic.hs | # LANGUAGE TypeOperators , EmptyCase #
module PropositionalLogic where
-- Essential.
data Bottom -- A type with no constructors.
type Top = () -- The unit type.
type a :/\: b = (a, b) -- Conjunction is a pair.
type a :\/: b = Either a b -- Disjunction is a sum.
type a :=>: b = a ->... | null | https://raw.githubusercontent.com/jtkristensen/exercises-in-type-level-programming/1388825de69b3fad2783d57361d20f8149e51f46/functionelle-koebenhavnere-november-2022/ProofsAsPrograms/src/PropositionalLogic.hs | haskell | Essential.
A type with no constructors.
The unit type.
Conjunction is a pair.
Disjunction is a sum.
Implication is a function.
Derived connectives.
Negation.
Biimplication.
Propositions as types. Proofs as programs.
Examples
--------------------------------
---------------------
-------------------
Exercise... | # LANGUAGE TypeOperators , EmptyCase #
module PropositionalLogic where
data Proposition program = Proof program
type Premise = Proposition
type Conclusion = Proposition
example1
:: Premise a -> Premise b
-> Conclusion (a :/\: b)
example1 (Proof a) (Proof b) = Proof (a, b)
example2
:: Pr... |
0a423ba2d94aebd4b4cc83e15ef39bac0ec5cce430df6e22291f72e20c498110 | haskell-suite/haskell-src-exts | DoubleHashOp.hs | # LANGUAGE UnboxedTuples #
module DoubleHashOp where
(##) :: a -> b -> Int
a ## b = 0
(#*) :: a -> b -> Int
a #* b = 1
-- This still does not work though:
-- (#) :: a -> b -> Int
a # b = 2
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/DoubleHashOp.hs | haskell | This still does not work though:
(#) :: a -> b -> Int | # LANGUAGE UnboxedTuples #
module DoubleHashOp where
(##) :: a -> b -> Int
a ## b = 0
(#*) :: a -> b -> Int
a #* b = 1
a # b = 2
|
c13e3203cdfd26ba1b1ce72f8ae99225abe7a407689829c2982b6b36381fd9da | yogthos/markdown-clj | md_file_test.clj | (ns markdown.md-file-test
(:require [markdown.core :as markdown]
[markdown.transformers :as transformers]
[clojure.string :as string]
[clojure.test :refer :all]))
(deftest references
(let [wrt (java.io.StringWriter.)]
(markdown/md-to-html (str "test/files" java.io.File/separ... | null | https://raw.githubusercontent.com/yogthos/markdown-clj/aa3df42c30928ca46fa79ffa6814af46f28fcdc3/test/markdown/md_file_test.clj | clojure | (ns markdown.md-file-test
(:require [markdown.core :as markdown]
[markdown.transformers :as transformers]
[clojure.string :as string]
[clojure.test :refer :all]))
(deftest references
(let [wrt (java.io.StringWriter.)]
(markdown/md-to-html (str "test/files" java.io.File/separ... | |
bce047af4ed26ce468272a8452bc3c1c42bcb14d54da0dc941733948e0b01198 | bozsahin/ccglab-database | corner-raised.ccg.lisp | (defparameter *ccg-grammar*
'(((KEY 1) (PHON THE) (MORPH D)
(SYN (((BCAT NP) (FEATS NIL)) (DIR FS) (MODAL STAR) ((BCAT N) (FEATS NIL))))
(SEM (LAM X X)) (PARAM 1.0))
((KEY 2) (PHON MAN) (MORPH N) (SYN ((BCAT N) (FEATS NIL))) (SEM "MAN")
(PARAM 1.0))
((KEY 3) (PHON BOY) (MORPH N) (SYN ((BCAT N) (FEATS NIL))... | null | https://raw.githubusercontent.com/bozsahin/ccglab-database/f24215aaa4ac8102f6d76c9c0ec5bd58a29743d7/demo-model/demo-type-raising/corner-raised.ccg.lisp | lisp | (defparameter *ccg-grammar*
'(((KEY 1) (PHON THE) (MORPH D)
(SYN (((BCAT NP) (FEATS NIL)) (DIR FS) (MODAL STAR) ((BCAT N) (FEATS NIL))))
(SEM (LAM X X)) (PARAM 1.0))
((KEY 2) (PHON MAN) (MORPH N) (SYN ((BCAT N) (FEATS NIL))) (SEM "MAN")
(PARAM 1.0))
((KEY 3) (PHON BOY) (MORPH N) (SYN ((BCAT N) (FEATS NIL))... | |
bc02af76ceec58b58173df66b2363dc8f8e9412f31afde7d1ad1273893e4e0e9 | pjstadig/lein-maven-s3-wagon | wagons.clj | {"s3" #(org.kuali.maven.wagon.S3Wagon.)}
| null | https://raw.githubusercontent.com/pjstadig/lein-maven-s3-wagon/8c4e0497ba258be15c01ee440c160eeca7701095/resources/leiningen/wagons.clj | clojure | {"s3" #(org.kuali.maven.wagon.S3Wagon.)}
| |
2c26db570737ef43b589126365254a06c6cc80e91ca5f423fd457dbed74de2a1 | ucsd-progsys/liquidhaskell | BadSig1.hs | {-@ LIQUID "--expect-error-containing=Illegal type specification for `BadSig1.EZ`" @-}
{-# LANGUAGE GADTs #-}
{-@ LIQUID "--exact-data-con" @-}
module BadSig1 where
data Peano where
Z :: Peano
S :: Peano -> Peano
-- AUTO
data EvProp where
Ev :: Peano -> EvProp
data Ev where
EZ :: Ev
ESS :: Peano -> Ev -... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/BadSig1.hs | haskell | @ LIQUID "--expect-error-containing=Illegal type specification for `BadSig1.EZ`" @
# LANGUAGE GADTs #
@ LIQUID "--exact-data-con" @
AUTO
AUTO/PRELUDE
@ measure prop :: a -> b @
@ type Prop E = {v:_ | pro v = E} @
{v:Ev | prop v = Ev Z}
@ test :: n:Peano -> {v:Ev | prop v = Ev (S (S n))} -> {v:Ev | prop v = Ev n} @
... |
module BadSig1 where
data Peano where
Z :: Peano
S :: Peano -> Peano
data EvProp where
Ev :: Peano -> EvProp
data Ev where
EZ :: Ev
ESS :: Peano -> Ev -> Ev
@ data Ev where
EZ : : Prop ( Ev Z )
ESS : : evn : Peano - > { : Ev | prop = { zing : Ev | prop zing = Ev ( S ( S e... |
118df3dd387970c8400a5684f5f4a90c4b216493059cc7d30202abe87ee738dc | facebook/flow | pidLog.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/hack_forked/utils/sys/pidLog.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
9bd3840c139262a784bd2c973ee1eafd3059c03c1ba0b861451d1e08332b82af | z3z1ma/pipette | core.clj | (ns pipette.core
(:require [clojure.tools.cli :refer [parse-opts]]
[clojure.spec.alpha :as s]
[clojure.java.io :as io]
[clojure.string]
[yaml.core :as yaml]
[jsonista.core :as json]
[pipette.utils :as utils]
[pipette.interface :as int... | null | https://raw.githubusercontent.com/z3z1ma/pipette/f80f15731079a14f55ada5175433e9556e5f07c3/src/pipette/core.clj | clojure | TODO: Make the below a dynamic pull from adapter directory?
---------------- Config Specification --------------------------
we have a local copy of the linux-amd-64 jq binary at resources/jq -- we can access with io/resource?
Consider fault tolerance here, pros/cons
--------------------- Config reader methods ---... | (ns pipette.core
(:require [clojure.tools.cli :refer [parse-opts]]
[clojure.spec.alpha :as s]
[clojure.java.io :as io]
[clojure.string]
[yaml.core :as yaml]
[jsonista.core :as json]
[pipette.utils :as utils]
[pipette.interface :as int... |
880c1314fef093204e05deba0dc20dfe5dbd49f4181733f728d56dbfd234c27a | johnmn3/cljs-thread | routes.cljs | (ns dashboard.routes
(:require
[re-frame.core :as rf]
[reitit.frontend]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[dashboard.views.sign-in :as sign-in]
[dashboard.views.home-panel :as home-panel]))
(defn log-fn [& args]
(fn [& _]
#_(apply js/console.log args)))
... | null | https://raw.githubusercontent.com/johnmn3/cljs-thread/28127b1bb8a10702673e621a3fd6b546fe260892/shadow_dashboard/src/screen/dashboard/routes.cljs | clojure | Subs
Events
Triggering navigation from events.
Routes | (ns dashboard.routes
(:require
[re-frame.core :as rf]
[reitit.frontend]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[dashboard.views.sign-in :as sign-in]
[dashboard.views.home-panel :as home-panel]))
(defn log-fn [& args]
(fn [& _]
#_(apply js/console.log args)))
... |
168e05193645ccc0be26b684204dd43ce2321aedd85a086faedd86a42306fafb | FlowForwarding/lincx | linc_max_splicer_tests.erl | %%
%%
%%
@author Cloudozer , LLP . < >
2014 FlowForwarding.org
-module(linc_max_splicer_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("pkt/include/pkt.hrl").
ether_test_() ->
Mac = <<0,1,2,3,4,5>>,
[?_test(edit([#ether{},#arp{}], eth_src, Mac,
fun(#ether{shost =Mac1}) -> ?assertEqual(Mac,... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_max/src/linc_max_splicer_tests.erl | erlang |
------------------------------------------------------------------------------
with checksum
Pkt2 has checksum calculated by splicer
checksum recalculated by pkt:* |
@author Cloudozer , LLP . < >
2014 FlowForwarding.org
-module(linc_max_splicer_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("pkt/include/pkt.hrl").
ether_test_() ->
Mac = <<0,1,2,3,4,5>>,
[?_test(edit([#ether{},#arp{}], eth_src, Mac,
fun(#ether{shost =Mac1}) -> ?assertEqual(Mac, Mac1);
... |
b31ac90d00a941ddffdcb1ca3505861df008c859c8af85dc407fb2d960bd6320 | dgtized/shimmers | punchcard.cljs | (ns shimmers.sketches.punchcard
(:require
[shimmers.common.svg :as csvg]
[shimmers.common.ui.controls :as ctrl]
[shimmers.math.deterministic-random :as dr]
[shimmers.sketch :as sketch :include-macros true]
[shimmers.view.sketch :as view-sketch]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/punchcard.cljs | clojure | Inspired by: | (ns shimmers.sketches.punchcard
(:require
[shimmers.common.svg :as csvg]
[shimmers.common.ui.controls :as ctrl]
[shimmers.math.deterministic-random :as dr]
[shimmers.sketch :as sketch :include-macros true]
[shimmers.view.sketch :as view-sketch]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]... |
e6fe18666a96d5f0768b479e9b2d851aaf5ab7fcc00da98f2cdc15daaeef4786 | puppetlabs/puppetdb | handlers.clj | (ns puppetlabs.puppetdb.http.handlers
(:require [clojure.tools.logging :as log]
[puppetlabs.puppetdb.http :as http]
[bidi.schema :as bidi-schema]
[puppetlabs.puppetdb.http.query :as http-q]
[puppetlabs.puppetdb.query.paging :as paging]
[puppetlabs.puppetdb.q... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/http/handlers.clj | clojure | General route/handler construction functions
Handlers checking for a single entity
For now, just log
Routes
query parameter sets | (ns puppetlabs.puppetdb.http.handlers
(:require [clojure.tools.logging :as log]
[puppetlabs.puppetdb.http :as http]
[bidi.schema :as bidi-schema]
[puppetlabs.puppetdb.http.query :as http-q]
[puppetlabs.puppetdb.query.paging :as paging]
[puppetlabs.puppetdb.q... |
39ea4bf38fc51893a57a4db48f08f8fd05ba5405e3e6d4ba1aa10c8b59b3d158 | input-output-hk/marlowe-cardano | Server.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
-- | A generic server for the job protocol. Includes a function for
-- interpreting a server as a typed-protocols peer that can be executed with a
-- driver and a codec.
module Network.Protocol.Job.Server
where
import Network.Protocol.Job.Ty... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/86a2088298ce0f5484701d110c71cfb8d63402fb/marlowe-protocols/src/Network/Protocol/Job/Server.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| A generic server for the job protocol. Includes a function for
interpreting a server as a typed-protocols peer that can be executed with a
driver and a codec.
| A generic server for the job protocol.
| In the 'StInit' state, the client has agency. The server must be pre... | # LANGUAGE DataKinds #
module Network.Protocol.Job.Server
where
import Network.Protocol.Job.Types
import Network.TypedProtocol
newtype JobServer cmd m a = JobServer { runJobServer :: m (ServerStInit cmd m a) }
deriving Functor
data ServerStInit cmd m a = ServerStInit
{ recvMsgExec
:: forall status err re... |
323a575941aa751f4cd80585b8635b442ac2c29c064d8bfce9d9fa3f2e1d2ed0 | runtimeverification/haskell-backend | Common.hs | module Test.Kore.AST.Common (
test_id,
test_prettyPrintAstLocation,
) where
import Data.InternedText (internText)
import Kore.Syntax.Id
import Prelude.Kore
import Test.Tasty
import Test.Tasty.HUnit
test_prettyPrintAstLocation :: TestTree
test_prettyPrintAstLocation =
testGroup
"prettyPrintAstLocat... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/a87661036129b72f5031e94f083ee790dde6c09c/kore/test/Test/Kore/AST/Common.hs | haskell | module Test.Kore.AST.Common (
test_id,
test_prettyPrintAstLocation,
) where
import Data.InternedText (internText)
import Kore.Syntax.Id
import Prelude.Kore
import Test.Tasty
import Test.Tasty.HUnit
test_prettyPrintAstLocation :: TestTree
test_prettyPrintAstLocation =
testGroup
"prettyPrintAstLocat... | |
30d706a8b281df46db281a071b1f7bfe14d644d414f6f32e8fca0a3c33a36ce6 | mfp/extprot | dummy_type.ml | type 'a sum = A | B of 'a | C | D of string
type ('a, 'b, 'c) t2 = ('a * 'b * 'c) list
let id x = x
| null | https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/test/dummy_type.ml | ocaml | type 'a sum = A | B of 'a | C | D of string
type ('a, 'b, 'c) t2 = ('a * 'b * 'c) list
let id x = x
| |
be2eb328d792ea8976c9eaaa806dc2fb694aa24430f5d236656ec47954e5ce2c | facebookarchive/pfff | nativeint.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/stdlib/nativeint.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : nativeint.mli , v 1.17 2004/0... |
603c9d4495796553fe623df24080e31e0b6b54720b487135fb592abbe93b4d30 | AdaCore/why3 | extset.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/src/util/extset.mli | 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
* { 1 Sets over ordered types }
module type OrderedType = Set.OrderedType
module type S =
sig
modul... |
4c302eed070ba1f52101c7f86278a009697b3d086479e64ab54d77acad9480ec | zellige/zellige | Main.hs | module Main where
import Data.Semigroup ((<>))
import qualified Options.Applicative as OA
import qualified Data.Geometry.MapnikVectorTile as MVT
import qualified Data.Geometry.Types.LayerConfig as DGTL
main :: IO ()
main = do
x <- OA.execParser opts
MVT.writeLayer x
wher... | null | https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/app/Main.hs | haskell | module Main where
import Data.Semigroup ((<>))
import qualified Options.Applicative as OA
import qualified Data.Geometry.MapnikVectorTile as MVT
import qualified Data.Geometry.Types.LayerConfig as DGTL
main :: IO ()
main = do
x <- OA.execParser opts
MVT.writeLayer x
wher... | |
655e529f11fc6040b9e256814f47213f6f04f23378c9af91d88b3a68f9707112 | ghc/ghc | Monad.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
instance MonadThings is necessarily an orphan
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
Monadery used in desugaring
(c) The Universit... | null | https://raw.githubusercontent.com/ghc/ghc/d0c7bbedb741e6bf947bcdc0e097070242ab56e1/compiler/GHC/HsToCore/Monad.hs | haskell | Getting and setting pattern match oracle states
Tracking evidence variable coherence
Warnings and errors
Data types
************************************************************************
* *
Data types for the desugarer
* ... | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
instance MonadThings is necessarily an orphan
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
Monadery used in desugaring
(c) The Universit... |
f157a7dfc12a905764285e1488a8e3197ce25f68e28237a33e053a86902dc45e | number571/Haskell | (||).hs | module Main where
(|||) :: Bool -> Bool -> Bool
(|||) True _ = True
(|||) _ True = True
(|||) _ _ = False
main :: IO()
main = print $ True ||| False
| null | https://raw.githubusercontent.com/number571/Haskell/7da2676c2604706d43791dc89c0ca8c9842aea48/Templates/(%7C%7C).hs | haskell | module Main where
(|||) :: Bool -> Bool -> Bool
(|||) True _ = True
(|||) _ True = True
(|||) _ _ = False
main :: IO()
main = print $ True ||| False
| |
6b0775ae02f5c75bb06d8644dfa9bb2e3586f1a022f85a545d1a1eb9f876c4ee | borkdude/gh-release-artifact | internal.clj | (ns borkdude.gh-release-artifact.internal
{:no-doc true}
(:require
[babashka.curl :as curl]
[babashka.fs :as fs]
[cheshire.core :as cheshire]
[clj-commons.digest :as digest]
[clojure.java.shell :refer [sh]]
[clojure.string :as str]))
(def token #(System/getenv "GITHUB_TOKEN"))
(def endpoint "")
... | null | https://raw.githubusercontent.com/borkdude/gh-release-artifact/fc3b1ea6ba64334d6c1d20af2b76461268dfc6fa/src/borkdude/gh_release_artifact/internal.clj | clojure | always choose oldest release to prevent race condition
eventual consistency...
in this scenario some other process created a new release just before username
A simple mime type utility from -clojure/ring/blob/master/ring-core/src/ring/util/mime_type.clj
in case of asset, overwrite must be true, which it is by defa... | (ns borkdude.gh-release-artifact.internal
{:no-doc true}
(:require
[babashka.curl :as curl]
[babashka.fs :as fs]
[cheshire.core :as cheshire]
[clj-commons.digest :as digest]
[clojure.java.shell :refer [sh]]
[clojure.string :as str]))
(def token #(System/getenv "GITHUB_TOKEN"))
(def endpoint "")
... |
7b74c0d1995bc43ddf71691380f0f7f0b893382e1d319a90790df0d0af722441 | JeanHuguesdeRaigniac/effects-landscape | HasTransformers.hs | module Internal.HasTransformers
( module Control.Monad.Trans.Has,
module Control.Monad.Trans.Has.Except,
module Control.Monad.Trans.Has.Reader,
module Control.Monad.Trans.Has.State,
module Control.Monad.Trans.Has.Writer,
Control.Monad.IO.Class.MonadIO,
Control.Monad.Trans.Except.runExceptT,
... | null | https://raw.githubusercontent.com/JeanHuguesdeRaigniac/effects-landscape/e44aea11053ac4db85b862fab027d3777d35e232/app/Internal/HasTransformers.hs | haskell | Error
Reader | module Internal.HasTransformers
( module Control.Monad.Trans.Has,
module Control.Monad.Trans.Has.Except,
module Control.Monad.Trans.Has.Reader,
module Control.Monad.Trans.Has.State,
module Control.Monad.Trans.Has.Writer,
Control.Monad.IO.Class.MonadIO,
Control.Monad.Trans.Except.runExceptT,
... |
b0006a88f61f31e89df5b2498a6cd44b9af5ef7d535b40f5c30a105ef810bde5 | nuprl/gradual-typing-performance | summary.rkt | #lang typed/racket/base
Data structure representing the results of one experiment .
;; Handles queries for raw data and statistical summary data.
(provide
from-rktd
;; (->* [Path-String] [#:graph Path-String] Summary)
;; Convert a filepath to a summary object
get-num-paths
;; (-> Summary Index)
;; Coun... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/popl-2016/talk/scripts/summary.rkt | racket | Handles queries for raw data and statistical summary data.
(->* [Path-String] [#:graph Path-String] Summary)
Convert a filepath to a summary object
(-> Summary Index)
Count the number of possible paths through a lattice
(-> Summary Index)
Get the number of configurations from a Summary
(-> Summary Index)
Get t... | #lang typed/racket/base
Data structure representing the results of one experiment .
(provide
from-rktd
get-num-paths
get-num-modules
get-num-configurations
get-project-name
has-typed?
( - > Summary Bitstring ( ) Boolean )
has-untyped?
( - > Summary Bitstring ( ) Boolean )
typed-module... |
558b556751dc68371cbc8c477d16d203bbe42598e928f88f24fda4bc64833da8 | fission-codes/fission | BasicAuth.hs | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Server.Internal.Orphanage.BasicAuth () where
import Data.Swagger
import Servant.API
import Servant.Swagger
import Fission.Prelude
instance HasSwagger api => HasSwagger (BasicAuth x r :> api) where
toSwagger _ = Proxy ... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Internal/Orphanage/BasicAuth.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Server.Internal.Orphanage.BasicAuth () where
import Data.Swagger
import Servant.API
import Servant.Swagger
import Fission.Prelude
instance HasSwagger api => HasSwagger (BasicAuth x r :> api) where
toSwagger _ = Proxy ... | |
8bcdf875f17c9ed0a5abb60ec0322de79e98d0e7d26858e62b33e22423f5b9e5 | mmottl/lacaml | io.ml | File : io.ml
Copyright ( C ) 2005-
email :
WWW :
Jane Street Holding , LLC
Author :
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publis... | null | https://raw.githubusercontent.com/mmottl/lacaml/2e01c0747e740e54ab9a23ea59b29ea0d929b50f/src/io.ml | ocaml | Pretty-printing elements
Pretty-printing in standard style
Vectors
Matrices
Labeled pretty-printing
Labeled matrices
String-labeled matrices
Labeled vectors
String-labeled vectors
Pretty-printing in OCaml-style
Vectors
Matrices
Good pretty-printers for toplevels
Vectors
Matrices | File : io.ml
Copyright ( C ) 2005-
email :
WWW :
Jane Street Holding , LLC
Author :
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publis... |
701654dacd3a5621c3a4bd0dc05267d7f9efaa8392d284389a80d820f7fa6342 | samrushing/irken-compiler | io.scm | ;; -*- Mode: Irken -*-
(require-ffi 'posix)
(define (open path oflag mode)
(syscall
(posix/open (%string->cref #f (zero-terminate path)) oflag mode)))
(define (read fd size)
(let ((buffer (make-string size))
(r (syscall (posix/read fd (%c-cast void (%string->cref #f buffer)) size))))
(if (= r size... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/lib/io.scm | scheme | -*- Mode: Irken -*-
XXX perhaps %string->cref should return (array char)?
XXX range check
file I/O 'object'
generates blocks, not characters. |
(require-ffi 'posix)
(define (open path oflag mode)
(syscall
(posix/open (%string->cref #f (zero-terminate path)) oflag mode)))
(define (read fd size)
(let ((buffer (make-string size))
(r (syscall (posix/read fd (%c-cast void (%string->cref #f buffer)) size))))
(if (= r size)
buffer
(copy-string... |
f0704e07939a8fe3391432bb31289b8c184c1706af9007349d0d8138df7c2450 | weyrick/roadsend-php | make-lib.scm | (module __make-webconnect-lib
(import (webconnect "webconnect.scm"))
(eval (export-all)) )
| null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/webconnect/make-lib.scm | scheme | (module __make-webconnect-lib
(import (webconnect "webconnect.scm"))
(eval (export-all)) )
| |
fc74b28bd73fc53eb21135ea7db1be8b391adcd3dc9f8a2db74574dc5d6a3906 | aria42/flare | report.clj | (ns flare.report
(:refer-clojure :exclude [concat])
(:require [flare.model :as model]
[clojure.spec.alpha :as s]))
(defprotocol Reporter
"For tracking behavior of model across examples"
(update! [this info]
"update with `info` after an 'event'")
(clear! [this]
"clear internal state")
(g... | null | https://raw.githubusercontent.com/aria42/flare/9c7d90bf7bd876a154e705dd78645eb5c69ae590/src/flare/report.clj | clojure | (ns flare.report
(:refer-clojure :exclude [concat])
(:require [flare.model :as model]
[clojure.spec.alpha :as s]))
(defprotocol Reporter
"For tracking behavior of model across examples"
(update! [this info]
"update with `info` after an 'event'")
(clear! [this]
"clear internal state")
(g... | |
82a5441308f6f12523ce3f186aabd4000a7d3522a02d90d09b7cd75e7f0c0658 | lamdu/momentu | Env.hs | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances #
module Test.Momentu.Env where
import qualified Control.Lens as Lens
import qualified GUI.Momentu.Animation as Anim
import qualified GUI.Momentu.Direction as Dir
import GUI.Momentu.Draw (Color(..))
import qualified GUI.Momentu.Element as... | null | https://raw.githubusercontent.com/lamdu/momentu/b287a15f0467176628b0eedf8c70907723a51e69/test/Test/Momentu/Env.hs | haskell | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances #
module Test.Momentu.Env where
import qualified Control.Lens as Lens
import qualified GUI.Momentu.Animation as Anim
import qualified GUI.Momentu.Direction as Dir
import GUI.Momentu.Draw (Color(..))
import qualified GUI.Momentu.Element as... | |
1a3b6b68100d79d0dac6b5380cfe6947c82c6518edf85f40e89be609b646e0b1 | facebookarchive/duckling_old | duration.clj | ; Durations / Periods
(
"second (unit-of-duration)"
#"(?i)sekund(y|zie|(e|ę)|(a|ą)|om|ami|ach|o)?|s"
{:dim :unit-of-duration
:grain :second}
"minute (unit-of-duration)"
#"(?i)minut(y|cie|(e|ę)|om|o|ami|ach|(a|ą))?|m"
{:dim :unit-of-duration
:grain :minute}
"hour (unit-of-duration)"
... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/pl/rules/duration.clj | clojure | Durations / Periods
duration can't be negative...
would need to add fields at some point
but allowing a space creates many false positive
duration can't be negative...
duration can't be negative...
about
sharp
|
(
"second (unit-of-duration)"
#"(?i)sekund(y|zie|(e|ę)|(a|ą)|om|ami|ach|o)?|s"
{:dim :unit-of-duration
:grain :second}
"minute (unit-of-duration)"
#"(?i)minut(y|cie|(e|ę)|om|o|ami|ach|(a|ą))?|m"
{:dim :unit-of-duration
:grain :minute}
"hour (unit-of-duration)"
#"(?i)h|godzin(y|(e|ę... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.