_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
4265d32a842b27a1ed40cc42f22198127c977c7b067aadf3f635bbd69d17579e
clash-lang/clash-compiler
TH.hs
| This module can automatically generate TopEntity definitions from ' Clash . ' annotations . Annotations involving data\/type families must be inspected for correctness . Not all cases can be handled with automatic generation due to the difficulty of type manipulation in template . In particular annotations...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/17b9f807ee01c7ee7b5379ee5f6e9ff60aeab4a6/clash-prelude/src/Clash/Annotations/TH.hs
haskell
= = = > { - # ANN topEntity Synthesize " topEntity3 " [ PortName " tup1 " , PortName " tup2 " , " tup3 " [ PortName " int",PortName " bool " ] , " tup4 " [ PortName " int",PortName " bool " ] , " custom " [ PortName " named1",PortName " named2 " ] ] ( PortProduct...
| This module can automatically generate TopEntity definitions from ' Clash . ' annotations . Annotations involving data\/type families must be inspected for correctness . Not all cases can be handled with automatic generation due to the difficulty of type manipulation in template . In particular annotations...
fcc84c1c695ef2eed8e9caa71b56ac4b82b77045effe266341f4130f1791fea3
tamarin-prover/tamarin-prover
Report.hs
# LANGUAGE PatternGuards # -- | Copyright : ( c ) 2019 < > -- License : GPL v3 (see LICENSE) -- Maintainer : < > Portability : GHC only -- -- Compute annotations for always-secret channels -- -- A channel is defined always-secret iff it correspond to a fresh variable -- only use as a channel identi...
null
https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/e6854c9355274a7363c7481d27b753789604c2e2/lib/sapic/src/Sapic/Report.hs
haskell
| License : GPL v3 (see LICENSE) Compute annotations for always-secret channels A channel is defined always-secret iff it correspond to a fresh variable only use as a channel identifier. For these channels, we can use a more efficient translation, as the adversary can never deduce then, and thus only a si...
# LANGUAGE PatternGuards # Copyright : ( c ) 2019 < > Maintainer : < > Portability : GHC only module Sapic.Report ( translateTermsReport , reportInit ) where import Control . Monad . Fresh import Data.Set as S import Data.List as L import Sapic.Annota...
aa173989ca5b1f4e956b520307ee3b54eb5959d598fdf81eb3365c6fd3d30770
a9032676/Codewars-Haskell
JpnTranslit.hs
module JpnTranslit where import Data.List import Data.Maybe -- translit :: String -> String -- translit "" = "" -- translit s@(x:xs) = case listToMaybe . match $ s of -- Nothing -> x : translit xs Just ( k , v ) - > v + + maybe " " translit ( stripPrefix k s ) translit :: String -> String transli...
null
https://raw.githubusercontent.com/a9032676/Codewars-Haskell/6eccd81e9b6ae31b5c0a28ecc16b933f3abae1a5/src/JpnTranslit.hs
haskell
translit :: String -> String translit "" = "" translit s@(x:xs) = case listToMaybe . match $ s of Nothing -> x : translit xs translit :: String -> String oldStk: "g", newStk: "gh", try match "gh": [], result: "g" oldStk: "h", newStk: "ho", try match "ho": [("ho","ほ")], result: "gほ" oldStk "", newS...
module JpnTranslit where import Data.List import Data.Maybe Just ( k , v ) - > v + + maybe " " translit ( stripPrefix k s ) translit :: String -> String translit "" = "" translit s@(x:xs) = maybe (x : translit xs) (\(k, v) -> v ++ maybe "" translit (stripPrefix k s)) . listToMaybe . match $ s translit...
6c78376617d5758b5e0cd5066a542e2b8e4c7c4e7866442b75d23d96d06f9607
ocaml-multicore/ocaml-tsan
assert_location.ml
TEST exit_status = " 2 " exit_status = "2" *) let () = ( assert false )
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/parsing/assert_location.ml
ocaml
TEST exit_status = " 2 " exit_status = "2" *) let () = ( assert false )
86d9e83cb624f9685fd868f3228d4eb58e249374db2d54a7ff1460006cd17937
paurkedal/ocaml-mediawiki-api
mwapi_edit.mli
Copyright ( C ) 2013 - -2017 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-mediawiki-api/6a1c1043a8ad578ea321a314fbe0a12a8d0933cf/lib/mwapi_edit.mli
ocaml
Copyright ( C ) 2013 - -2017 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
5ebace469d0157ab17277631b21449fc05ac1d727d41ef6111820676a6927e6e
diku-dk/futhark
SegRed.hs
module Futhark.CodeGen.ImpGen.Multicore.SegRed ( compileSegRed, compileSegRed', DoSegBody, ) where import Control.Monad import Futhark.CodeGen.ImpCode.Multicore qualified as Imp import Futhark.CodeGen.ImpGen import Futhark.CodeGen.ImpGen.Multicore.Base import Futhark.IR.MCMem import Futhark.Transform.Renam...
null
https://raw.githubusercontent.com/diku-dk/futhark/4e43298120cd67bc23f23535ca1755b71595c9cb/src/Futhark/CodeGen/ImpGen/Multicore/SegRed.hs
haskell
| Like 'compileSegRed', but where the body is a monadic action. | A SegBinOp with auxiliary information. | The array in which we write the intermediate results, indexed by the flat/physical thread ID. | Arrays for storing group results shared between threads Are all the operators commutative? Are we only working...
module Futhark.CodeGen.ImpGen.Multicore.SegRed ( compileSegRed, compileSegRed', DoSegBody, ) where import Control.Monad import Futhark.CodeGen.ImpCode.Multicore qualified as Imp import Futhark.CodeGen.ImpGen import Futhark.CodeGen.ImpGen.Multicore.Base import Futhark.IR.MCMem import Futhark.Transform.Renam...
ae98c6edbd61a4a65aaa25fb3b4b610a70bccbeacd3ee0191b1fc111f9ca020c
facebook/duckling
FI.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Dimensions.FI ( allDimensions ) where import Duckling.Dimensions.Types allDimensions ::...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Dimensions/FI.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Dimensions.FI ( allDimensions ) where import Duckling.Dimensions.Types allDimensions :: [Seal Dimension] allDimensions = [ Seal Numeral ]
bfbd812c6cb4e3311f44c852828584d2825aedf4ceceb88abaca27fa2e75bc15
LambdaHack/LambdaHack
Main.hs
| The main source code file of LambdaHack the game . -- Module "TieKnot" is separated to make it usable in tests. module Main ( main ) where import Prelude () import Game.LambdaHack.Core.Prelude import Control.Concurrent.Async import qualified Control.Exception as Ex import qualified GHC.IO.Encoding ...
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/23b631a9ed173fb79c80c19235662348cf66f441/GameDefinition/Main.hs
haskell
Module "TieKnot" is separated to make it usable in tests. run the game and handle exit. Correct unset or some other too primitive encodings. is not a terminal, but then we can't open files to contain the logs. Also it bloats the outcome JS file, so disabled. Special case hack, when the game is started not on a co...
| The main source code file of LambdaHack the game . module Main ( main ) where import Prelude () import Game.LambdaHack.Core.Prelude import Control.Concurrent.Async import qualified Control.Exception as Ex import qualified GHC.IO.Encoding as SIO import qualified Options.Applicative as OA import qual...
38a4efb967c9152b3ab80e25073a8effe424084302f94f407c393b7be05b99f2
scarvalhojr/haskellbook
section17.9.hs
import Data.Monoid ((<>)) import Control.Applicative (liftA3) data Pair a = Pair a a deriving Show instance Functor Pair where fmap f (Pair a a') = Pair (f a) (f a') instance Applicative Pair where pure a = Pair a a (Pair f g) <*> (Pair a a') = Pair (f a) (g a') --- data Two a b = Two a b deriving Sho...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter17/section17.9.hs
haskell
- - - - - -
import Data.Monoid ((<>)) import Control.Applicative (liftA3) data Pair a = Pair a a deriving Show instance Functor Pair where fmap f (Pair a a') = Pair (f a) (f a') instance Applicative Pair where pure a = Pair a a (Pair f g) <*> (Pair a a') = Pair (f a) (g a') data Two a b = Two a b deriving Show i...
313e4226c771a5e291e241ca89957865ff75a6bf9df6b65cedcc194609e63c67
tezos/tezos-mirror
sc_rollup_inbox_storage.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs < > Copyright ( c ) 2022 ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/6cce98810919826c01005f2ffbd02a2302aa91bb/src/proto_alpha/lib_protocol/sc_rollup_inbox_storage.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs < > Copyright ( c ) 2022 TriliTech < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOU...
9b1008649d379644213e903136b8ab8ac6f5c2bccfed8cfa6c6d4f0f7e26c52a
moonpolysoft/dynomite
configuration_test.erl
-include_lib("eunit/include/eunit.hrl"). config_parsing_test() -> JSON = "{\"blocksize\": 4096,\"text_port\": 11222,\"thrift_port\": 9200,\"web_port\": 8080,\"directory\": \"/Users/cliff/data/tmp\",\"storage_mod\": \"dets_storage\",\"n\": 1,\"r\": 1,\"w\": 1,\"q\": 6}", Config = decode_json(mochijson:decode(JSON))...
null
https://raw.githubusercontent.com/moonpolysoft/dynomite/a5618dcbe17b16cefdc9c567f27a1f4445aee005/etest/configuration_test.erl
erlang
-include_lib("eunit/include/eunit.hrl"). config_parsing_test() -> JSON = "{\"blocksize\": 4096,\"text_port\": 11222,\"thrift_port\": 9200,\"web_port\": 8080,\"directory\": \"/Users/cliff/data/tmp\",\"storage_mod\": \"dets_storage\",\"n\": 1,\"r\": 1,\"w\": 1,\"q\": 6}", Config = decode_json(mochijson:decode(JSON))...
5b20c14ef952ada80029baa7b17d6b5e1d2d025233bbcd7ce276388419eb6a7d
toschoo/mom
tstate.hs
# OPTIONS -fno - cse # module Main where import Test.QuickCheck import Test.QuickCheck.Monadic import Data.List (find) import Control.Applicative((<$>)) import Control.Concurrent import Control.Monad (when) import Data.Time.Clock import Data.Maybe import System.Exit import Network.Mom.Stompl.Clie...
null
https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/client/test/suite/tstate.hs
haskell
------------------------------------------------------ Arbitrary ------------------------------------------------------ ------------------------------------------------------ Just a test ------------------------------------------------------ ------------------------------------------------------ When we do nothing,...
# OPTIONS -fno - cse # module Main where import Test.QuickCheck import Test.QuickCheck.Monadic import Data.List (find) import Control.Applicative((<$>)) import Control.Concurrent import Control.Monad (when) import Data.Time.Clock import Data.Maybe import System.Exit import Network.Mom.Stompl.Clie...
3f4df4cc74bba423ee97d1cc2f9c7f102aeb3d843dd867fe81cc962d745a286c
imitator-model-checker/imitator
PConstraint.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Laboratoire Specification et Verification ( ENS Cachan & CNRS , France ) * Université Paris 13 , LIPN , CNRS , France * * Descripti...
null
https://raw.githubusercontent.com/imitator-model-checker/imitator/ea560fd1e58fbca9a0666658d9d8fbd232f39dda/src/PConstraint.ml
ocaml
********************************************************** ********************************************************** ********************************************************** ********************************************************** -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* * {3 Creation} -*-*-*-*-*-*-*-*-*-...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Laboratoire Specification et Verification ( ENS Cachan & CNRS , France ) * Université Paris 13 , LIPN , CNRS , France * * Descripti...
7ceff60f7302b78956058726119659ba614f2d7ef0eb53bfbf0a797d6d113f1f
uhc/uhc
Locale.hs
----------------------------------------------------------------------------- -- | -- Module : System.Locale Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : stable -- Portability : portable -- -- Th...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/ehclib/old-locale/System/Locale.hs
haskell
--------------------------------------------------------------------------- | Module : System.Locale License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable This module provides the ability to adapt to local conventions. At present, i...
Copyright : ( c ) The University of Glasgow 2001 System . Time.calendarTimeToString from the System . Time module in the module System.Locale ( TimeLocale(..) , defaultTimeLocale , iso8601DateFormat , rfc822DateFormat ) where import Prelude data TimeLocale = TimeLocale { |full a...
e05c9d5d243f2c0287da2760ea7db600913707e9f17d08096706d17f67064e3a
ayato-p/mokuhan
regex.cljc
(ns org.panchromatic.mokuhan.util.regex #?(:clj (:import java.util.regex.Pattern))) (defn re-quote [s] #?(:clj (re-pattern (Pattern/quote (str s))) :cljs (re-pattern (.replace s (js/RegExp. "\\W" "g") #(str "\\" %))))) (defn source [regex] #?(:clj (.toString regex) :cljs (.-source ...
null
https://raw.githubusercontent.com/ayato-p/mokuhan/8f6de17b5c4a3712aa83ba4f37234de86f3c630b/src/org/panchromatic/mokuhan/util/regex.cljc
clojure
(ns org.panchromatic.mokuhan.util.regex #?(:clj (:import java.util.regex.Pattern))) (defn re-quote [s] #?(:clj (re-pattern (Pattern/quote (str s))) :cljs (re-pattern (.replace s (js/RegExp. "\\W" "g") #(str "\\" %))))) (defn source [regex] #?(:clj (.toString regex) :cljs (.-source ...
0722b075e5f43d2c651e48aab95846364f767ef8fcdb24066360efebd0c4625e
sig-gis/gridfire
output.clj
(ns gridfire.spec.output (:require [clojure.spec.alpha :as s] [gridfire.spec.common :as common])) (def file-path-regex #"^(((\.\.){1}/)*|(/){1})?(([\w-]*)/)*([\w-]+)$") (s/def ::file-path (s/and string? #(re-matches file-path-regex %))) (s/def ::type (s/or :key #{:final} :scalar int?)) (s/de...
null
https://raw.githubusercontent.com/sig-gis/gridfire/44aeaf56fceb01f61b21db6220d2cb562a92570b/src/gridfire/spec/output.clj
clojure
(ns gridfire.spec.output (:require [clojure.spec.alpha :as s] [gridfire.spec.common :as common])) (def file-path-regex #"^(((\.\.){1}/)*|(/){1})?(([\w-]*)/)*([\w-]+)$") (s/def ::file-path (s/and string? #(re-matches file-path-regex %))) (s/def ::type (s/or :key #{:final} :scalar int?)) (s/de...
53f362292660a9a60d810ac0396dfc03dab70deef19178ebcb17cdcdf872a364
svenssonjoel/Obsidian
Program.hs
2012,2013,2014 Notes : 2014 : starting a big overhauling 2013 - 04 - 02 : Added a Break statement to the language . Use it to break out of sequential loops . 2013 - 01 - 08 : removed number - of - blocks field from ForAllBlocks Notes: 2014 : starting a big ...
null
https://raw.githubusercontent.com/svenssonjoel/Obsidian/90886a0ef513cdaa58bb63765c230fa193d1ef10/Obsidian/Program.hs
haskell
# LANGUAGE GADTs # # LANGUAGE EmptyDataDecls # # LANGUAGE ConstraintKinds # ---------------------------------------- LANGUAGE FunctionalDependencies all exported.. for now Class helpers Programming interface ------------------------------------------------------------------------- Thread/Block/Grid -------------...
2012,2013,2014 Notes : 2014 : starting a big overhauling 2013 - 04 - 02 : Added a Break statement to the language . Use it to break out of sequential loops . 2013 - 01 - 08 : removed number - of - blocks field from ForAllBlocks Notes: 2014 : starting a big ...
d9a3fc7eb5e17c03a5cb8d7c77677b7c8af750cc6c9ad3ef4700b2922a97e5c1
eigenhombre/organa
parse.clj
(ns organa.parse (:require [clojure.string :as string] [clojure.walk :as walk] [net.cgrand.enlive-html :as html])) (defn title-for-org-file [parsed-html] (some-> parsed-html (html/select [:h1.title]) first :content first For some reason ’ is renderi...
null
https://raw.githubusercontent.com/eigenhombre/organa/6997ed9f1256edc08241462af9caa71f94938541/src/organa/parse.clj
clojure
synced to zerolib: =>
(ns organa.parse (:require [clojure.string :as string] [clojure.walk :as walk] [net.cgrand.enlive-html :as html])) (defn title-for-org-file [parsed-html] (some-> parsed-html (html/select [:h1.title]) first :content first For some reason ’ is renderi...
be6051743d83043f68a11d6ffab7f1fa2dec8489a86f861ea2b552810ab7b613
simingwang/emqx-plugin-kafkav5
erl_kernel_errors.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2020 - 2021 . 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/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/erl_kernel_errors.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 - 2021 . 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(erl_kernel_errors). -export([format_error/2]). -spec format_error(Reason, StackTrace) -> ErrorMap when ...
54b311064d52bf8e6f56def1025a60caa74db99cc83b1bf216d8efb75cb88299
tezos/tezos-mirror
baking_actions.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/f0fac81ca8d49f180e663316b2566780ddc1517e/src/proto_016_PtMumbai/lib_delegate/baking_actions.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
0d59104fdacfc0eafd1811b68f6c52780e3013bd34b21292731570a59b61a47c
bvaugon/ocapic
main.ml
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/simulator/goblet/main.ml
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . open Graphics;; open Printf;; type color = White | Black type button = Table of int * int | Stack of color * int let wood = rgb 230 250 100;; let bakelite = rgb 103 41 11;; let widt...
15ff47fde134cb82878e9f7294e54b9eb00b8beb630b54187312ff607b633359
vikram/lisplibraries
swank-ccl.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; openmcl-swank.lisp --- SLIME backend for OpenMCL . ;;; Copyright ( C ) 2003 , < > ;;; ;;; This program is licensed under the terms of the Lisp Lesser GNU ;;; Public License, known as the LLGPL, and distributed with OpenMCL ;;; as the file "LICENSE". The LLGPL...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/slime/swank-ccl.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- This program is licensed under the terms of the Lisp Lesser GNU Public License, known as the LLGPL, and distributed with OpenMCL as the file "LICENSE". The LLGPL consists of a preamble and the LGPL, which is distributed with OpenMCL as the file "LGPL". Where these co...
openmcl-swank.lisp --- SLIME backend for OpenMCL . Copyright ( C ) 2003 , < > tested only with OpenMCL version 0.14 - 030901 on --- I would * Evaluation of forms with C - M - x. * File compilation with C - c C - k. * Most of the debugger functionality , except EVAL - IN - FRAME , * Macroexpanding w...
9edd255c25146aa903dfa4823bfac4dfebe65ab3c012083812a8247cd4414a7e
incoherentsoftware/defect-process
Flags.hs
module Player.Flags ( PlayerFlags(..) , PlayerRisingJumpFlag(..) , PlayerWallProximityFlag(..) , mkPlayerFlags , updatePlayerFlags ) where import Util data PlayerRisingJumpFlag = PlayerNotRisingJumpFlag | PlayerRisingFullJumpFlag Secs | PlayerRisingShortJumpFlag deriving Eq da...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/64d9988dd0c4082aed582ca140e5e3e2c9bd0292/src/Player/Flags.hs
haskell
module Player.Flags ( PlayerFlags(..) , PlayerRisingJumpFlag(..) , PlayerWallProximityFlag(..) , mkPlayerFlags , updatePlayerFlags ) where import Util data PlayerRisingJumpFlag = PlayerNotRisingJumpFlag | PlayerRisingFullJumpFlag Secs | PlayerRisingShortJumpFlag deriving Eq da...
2384660167befbbadf9646577f213790061a54d6f1f87baf4456902af4c91d6a
zotonic/z_stdlib
z_html_parse_test.erl
@author < > 2007 Mochi Media , Inc. ; copyright 2018 - 2021 Maas - Maarten Zeeman -module(z_html_parse_test). -include_lib("eunit/include/eunit.hrl"). to_html_test() -> ?assertEqual( <<"<html><head><title>hey!</title></head><body><p class=\"foo\">what's up<br /></p><div>sucka</div>RAW!<!-- comment...
null
https://raw.githubusercontent.com/zotonic/z_stdlib/91a4c3aec85fe50218037906f5ce043eb7c97a0f/test/z_html_parse_test.erl
erlang
Not a tag because tags can't start with a number. Case insensitive html tags and attributes. Case insensitive html tags and attributes mixed with case sensitive xml data islands. Case insensitive html tags and attributes mixed with case sensitive xml data islands. Difference in lowercasing attribute names and tag ...
@author < > 2007 Mochi Media , Inc. ; copyright 2018 - 2021 Maas - Maarten Zeeman -module(z_html_parse_test). -include_lib("eunit/include/eunit.hrl"). to_html_test() -> ?assertEqual( <<"<html><head><title>hey!</title></head><body><p class=\"foo\">what's up<br /></p><div>sucka</div>RAW!<!-- comment...
31bfc98166e2ab1d7f85be83d2feb66c1ec49cb1e29d481e24b95d846e338710
commercialhaskell/path
Windows.hs
# LANGUAGE CPP # #define PLATFORM_NAME Windows #define IS_WINDOWS True #include "Include.hs"
null
https://raw.githubusercontent.com/commercialhaskell/path/2bec48c17be4b82f7dabc8e2dd167444e558e9a5/src/Path/Windows.hs
haskell
# LANGUAGE CPP # #define PLATFORM_NAME Windows #define IS_WINDOWS True #include "Include.hs"
e2496c8567c322b8a0e366f35b27fcdd96d85d266c9c3eb5c18d7f39eab76736
rds13/xmlrpc
date_server.erl
-module(date_server). -export([handler/2]). %% %% A server which calculates date value(s) such as: %% * Calculates the number of days since year 0 for a given date . * Calculates if a given date is a leap year . * Calculates the day of the week for a given day . %% %% In order to perform the calculation a client...
null
https://raw.githubusercontent.com/rds13/xmlrpc/42e6e96a0fe7106830274feed915125feb1056f3/examples/date_server.erl
erlang
A server which calculates date value(s) such as: In order to perform the calculation a client must login with keepalive timeout is set to infinity. The server returns a session counter for each call using the state variable.
-module(date_server). -export([handler/2]). * Calculates the number of days since year 0 for a given date . * Calculates if a given date is a leap year . * Calculates the day of the week for a given day . username " " and password " Bartfast " . After login the HTTP/1.1 handler({false, N}, {call, login, ["Sl...
90d0bc1024aac12a58b7a21b429579280683809ce4af8b7968c1d9bef4c91104
cadpnq/papyrith
script.lisp
;;;; Structures for holding the different parts of a script. (in-package :papyrith) (defvar *script*) (defvar *object*) (defvar *state*) (defvar *function*) (defvar *property*) (defmacro defstruct-printing (name printer &rest slots) `(defstruct (,name (:print-function (lambda (p s k) (with-slots ...
null
https://raw.githubusercontent.com/cadpnq/papyrith/755579f38a7f3f20d528966b4e548cc6e9bb006f/script.lisp
lisp
Structures for holding the different parts of a script. static~]~%~
(in-package :papyrith) (defvar *script*) (defvar *object*) (defvar *state*) (defvar *function*) (defvar *property*) (defmacro defstruct-printing (name printer &rest slots) `(defstruct (,name (:print-function (lambda (p s k) (with-slots (,@(loop for slot in slots if (l...
5532183b137c02825b09f5767f99da38e7cedfba55baef177ac315da68d2bf57
Khepu/cron-condenser
constants.clj
(ns cron-condenser.constants) ; Segment Bounds ;; Numeric bounds [lower, upper) (def minute-bounds {:lower 0 :upper 60}) (def hour-bounds {:lower 0 :upper 24}) (def day-bounds {:lower 1 :upper 32}) (def month-bounds {:lower 1 :upper 13}) (def week-day-bounds {:lo...
null
https://raw.githubusercontent.com/Khepu/cron-condenser/f0b0174e93e84fdfa4648817b4e9fb1d812dbe90/src/cron_condenser/constants.clj
clojure
Segment Bounds Numeric bounds [lower, upper) Explicit bounds
(ns cron-condenser.constants) (def minute-bounds {:lower 0 :upper 60}) (def hour-bounds {:lower 0 :upper 24}) (def day-bounds {:lower 1 :upper 32}) (def month-bounds {:lower 1 :upper 13}) (def week-day-bounds {:lower 0 :upper 7}) (def month-names ["JAN" "FEB" "MA...
542d78e2cab153463234d11b4317e28104875a650da7cee7983aecfc4aa1c590
mirage/xentropyd
handle.ml
* Copyright ( C ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
null
https://raw.githubusercontent.com/mirage/xentropyd/4705bb2f6c10ae84f842a5c39cd8a513ea8c761a/core/handle.ml
ocaml
transaction id in use (0 means no transaction) paths read or written to paths being watched no transaction not recording accesses no paths watched
* Copyright ( C ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
474be403afc55d52b2ddc33563cb714bd45aa7b353f84374cfa2fe7549d754e9
shayan-najd/QFeldspar
MiniFeldspar.hs
module Tests.MiniFeldspar where import QFeldspar.MyPrelude import QFeldspar.Expression.MiniFeldspar import QFeldspar.Environment.Typed import qualified QFeldspar.Expression.GADTValue as FGV import QFeldspar.Variable.Typed import QFeldspar.Conversion import QFeldspar.Expression.Conversions.Evaluation.MiniFeldspar () ...
null
https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/Tests/MiniFeldspar.hs
haskell
module Tests.MiniFeldspar where import QFeldspar.MyPrelude import QFeldspar.Expression.MiniFeldspar import QFeldspar.Environment.Typed import qualified QFeldspar.Expression.GADTValue as FGV import QFeldspar.Variable.Typed import QFeldspar.Conversion import QFeldspar.Expression.Conversions.Evaluation.MiniFeldspar () ...
c9ec2fd27de82fa6fb76d03e0d3f7e658cdaa20f1d2f07ea0d644c111dbbfc91
bollu/cellularAutomata
Cyclic1D.hs
# LANGUAGE TemplateHaskell # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Cyclic1D where import Cellular import Control.Comonad import Diagrams.Prelude import Diagrams.Backend.Cairo.CmdLine import Diagrams.TwoD.Layout.Grid import qualified Data.Vector as V import Data.Mo...
null
https://raw.githubusercontent.com/bollu/cellularAutomata/1c77ff5d6d59678a845bde7e1747d45d0ca0989f/app/Cyclic1D.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Cyclic1D where import Cellular import Control.Comonad import Diagrams.Prelude import Diagrams.Backend.Cairo.CmdLine import Diagrams.TwoD.Layout.Grid import qualified Data.Vector as V import Data.Mo...
2f6e7b73dd8358f322680bdc5fe89de558c5e5693dd24cda3f40a767910e37c9
janestreet/bonsai
type.ml
include Type_intf
null
https://raw.githubusercontent.com/janestreet/bonsai/33e9a58fc55ec12095959dc5ef4fd681021c1083/examples/sexp_grammar/type.ml
ocaml
include Type_intf
2bcb6172cb5ca08b0abb416a1e02476e3324ab485ccec6e2f6161cb042948cf4
onedata/op-worker
subscription_manager.erl
%%%------------------------------------------------------------------- @author ( C ) 2016 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module is responsible for eve...
null
https://raw.githubusercontent.com/onedata/op-worker/6b4eae12034bb469f49200c32c32f37c9179ac6a/src/modules/events/subscription_manager.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module is responsible for events routing table management. @end ------------------------------------------------------------------- API For tests routing can requ...
@author ( C ) 2016 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(subscription_manager). -author("Krzysztof Trzepla"). -include("modules/events/routing.hrl"). -include("modules/events/definitions.hrl"). -include("modules/fslogic/data_access_control.hrl")....
53d4f1c394213be2785297bcf378ac5c61b00087a009b36479edb959af261ffa
lenn0x/Event-Notifier
thrift_binary_protocol.erl
%% Licensed to the Apache Software Foundation ( ASF ) under one %% or more contributor license agreements. See the NOTICE file %% distributed with this work for additional information %% regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the %% "License"); you ...
null
https://raw.githubusercontent.com/lenn0x/Event-Notifier/5b370624578f4610b4af71c989c13068c2cbbf58/thrift-erl/src/thrift_binary_protocol.erl
erlang
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "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 require...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(thrift_binary_protocol). -behaviour(thrift_protocol). -include("thrift...
7a81005065ebf349cc0d88feced1beca610adf2a92df3409e4baea2c67c73d2a
lspector/Clojush
odd.clj
;; odd.clj an example problem for clojush , a Push / PushGP system written in Clojure , , 2010 (ns clojush.problems.demos.odd (:use [clojush.pushgp.pushgp] [clojush.random] [clojush pushstate interpreter] clojush.instructions.common)) ;;;;;;;;;;;; The " odd " problem : take a positi...
null
https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/demos/odd.clj
clojure
odd.clj whether or not the input is an odd number. There are many ways to compute this
an example problem for clojush , a Push / PushGP system written in Clojure , , 2010 (ns clojush.problems.demos.odd (:use [clojush.pushgp.pushgp] [clojush.random] [clojush pushstate interpreter] clojush.instructions.common)) The " odd " problem : take a positive integer input and pus...
7355ffddb4bff596810713cee28c7080d8e953a199b9e7efc5d3feb61bfefd8b
haskell-perf/graphs
Graph.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE FlexibleInstances # module Alga.Graph (functions, mk, mkSpecClique) where import BenchGraph.Types import qualified BenchGraph.Suites as S import BenchGraph.GenericGraph (Edges) import BenchGraph.Utils (extractMaxVertex) import Algebra.Graph import qualified Algebra....
null
https://raw.githubusercontent.com/haskell-perf/graphs/d2e53fb424b01bb51d5733cc40fd62abb2740430/bench/Alga/Graph.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE FlexibleInstances # module Alga.Graph (functions, mk, mkSpecClique) where import BenchGraph.Types import qualified BenchGraph.Suites as S import BenchGraph.GenericGraph (Edges) import BenchGraph.Utils (extractMaxVertex) import Algebra.Graph import qualified Algebra....
4024f5ce21f774f721fbec65d0c337cee09cfb1d34b9d9aee36a151190373003
emqx/emqx
emqx_authn_redis.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/73d5592b5af0cbbf347e5dc2b9b865b41228249f/apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_authn_redis). -include("emqx_authn.hrl"). -include_lib("emqx/include/logger.hrl")....
047526ac661cab863106782030f093b9952577602317dd7b84797fab27ca7845
sirherrbatka/clusters
generics.lisp
(cl:in-package #:clusters.clarans) (defgeneric y (state)) (defgeneric medoids (state)) (defgeneric distortion (state)) (defgeneric d (state)) (defgeneric (setf y) (new-value state)) (defgeneric (setf medoids) (new-value state)) (defgeneric (setf distortion) (new-value state)) (defgeneric (setf d) (new-value state))
null
https://raw.githubusercontent.com/sirherrbatka/clusters/20b8b60005ac8e27d12d05d277b26d8b5ca5c238/source/clarans/generics.lisp
lisp
(cl:in-package #:clusters.clarans) (defgeneric y (state)) (defgeneric medoids (state)) (defgeneric distortion (state)) (defgeneric d (state)) (defgeneric (setf y) (new-value state)) (defgeneric (setf medoids) (new-value state)) (defgeneric (setf distortion) (new-value state)) (defgeneric (setf d) (new-value state))
b10b108f03eda64a536838229b455d1c8c11a350157a8435de78ca6f6266a115
votinginfoproject/data-processor
electoral_district_test.clj
(ns vip.data-processor.validation.v5.electoral-district-test (:require [vip.data-processor.validation.v5.electoral-district :as v5.electoral-district] [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as psql] [vip...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/electoral_district_test.clj
clojure
(ns vip.data-processor.validation.v5.electoral-district-test (:require [vip.data-processor.validation.v5.electoral-district :as v5.electoral-district] [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as psql] [vip...
5c4fa61574095f5da784081eb130aba23fcd55cf524c4e0918082da5583ac526
clojure-interop/google-cloud-clients
ImageAnnotatorStub.clj
(ns com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStub "Base stub class for Google Cloud Vision API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.vision.v1p2beta1.stub ImageAnnotatorStub])) (defn ...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.clj
clojure
(ns com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStub "Base stub class for Google Cloud Vision API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.vision.v1p2beta1.stub ImageAnnotatorStub])) (defn ...
b6ebc9574c2da314bb65b9494e0b295214691fa6fb36c4d7d97b5f1549478cc0
schibsted/spid-tech-docs
load.clj
(ns spid-docs.load "Various utilities used across many namespaces" (:require [clojure.java.io :as io] [clojure.string :as str])) (defn- check-resource-existance [file] (if (nil? (io/resource file)) (throw (Exception. (str "Unable to load " file ", no such file resources/" file))))) (defn load-ed...
null
https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/load.clj
clojure
(ns spid-docs.load "Various utilities used across many namespaces" (:require [clojure.java.io :as io] [clojure.string :as str])) (defn- check-resource-existance [file] (if (nil? (io/resource file)) (throw (Exception. (str "Unable to load " file ", no such file resources/" file))))) (defn load-ed...
88f3b6c348128c66e37a9a3ad754955721cc51e5542f50cdd11bd5a078045358
zenspider/schemers
exercise.2.44.scm
#lang racket/base (require "../lib/test.rkt") (require "../lib/myutils.scm") HACK ( require ( planet " sicp.ss " ( " soegaard " " sicp.plt " 2 1 ) ) ) Exercise 2.44 ;; Define the procedure `up-split' used by `corner-split'. It is ;; similar to `right-split', except that it switches the roles of ;; `below' and `...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.44.scm
scheme
Define the procedure `up-split' used by `corner-split'. It is similar to `right-split', except that it switches the roles of `below' and `beside'.
#lang racket/base (require "../lib/test.rkt") (require "../lib/myutils.scm") HACK ( require ( planet " sicp.ss " ( " soegaard " " sicp.plt " 2 1 ) ) ) Exercise 2.44 (define (up-split painter n) (if (= n 0) painter (let ((smaller (up-split painter (- n 1)))) (below painter (beside smaller smalle...
b47915b8fffd6ab0ce44070cec815753beac28656938cdfecc6dfc9b8021be7b
gersh/erlang-rtmp
rtmp_handshake.erl
@private @author < > [ ] @author All those guys , that have found how to sign handshake from red5 : @author ( ) @author ( ) @author < > @author @author @author 2009 %%% @doc RTMP handshake module %%% @reference See <a href="" target="_top"></a> for more...
null
https://raw.githubusercontent.com/gersh/erlang-rtmp/57157fb3be20278af19c87232f99aa9a83041d18/src/rtmp_handshake.erl
erlang
@doc RTMP handshake module @reference See <a href="" target="_top"></a> for more information @end The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, pub...
@private @author < > [ ] @author All those guys , that have found how to sign handshake from red5 : @author ( ) @author ( ) @author < > @author @author @author 2009 also good reference is Copyright ( c ) 2009 in the Software without restriction , inclu...
a6bc954391ba3e2da50399d5a5b2d0fc53e61c1903239c85bd1d10da902b8abb
TerrorJack/ghc-alter
T7457.hs
import Text.Printf main = printf "%*sx\n" (-(3::Int)) "hi"
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/T7457.hs
haskell
import Text.Printf main = printf "%*sx\n" (-(3::Int)) "hi"
be2e89b08f4c6da618c57c7f32aff86f15569cbded80a87895f8aced71970f2d
ocaml/oasis-db
PkgVerRemove.ml
* Package 's version removal * @author * @author Sylvain Le Gall *) open Lwt open XHTML.M open Eliom_parameters open Eliom_predefmod.Xhtml open Eliom_services open Template open ODBPkgVer open ODBGettext open OASISVersion open Common open Context let remove = register_new_service ~path:["remov...
null
https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/web/PkgVerRemove.ml
ocaml
* Package 's version removal * @author * @author Sylvain Le Gall *) open Lwt open XHTML.M open Eliom_parameters open Eliom_predefmod.Xhtml open Eliom_services open Template open ODBPkgVer open ODBGettext open OASISVersion open Common open Context let remove = register_new_service ~path:["remov...
a5e8932b6af40045e85cda76b187e8439ca73a6d7e149f847a1c2212c9823526
ghc/ghc
Heap.hs
----------------------------------------------------------------------------- -- Stg to C-- : heap management functions -- ( c ) The University of Glasgow 2004 - 2006 -- ----------------------------------------------------------------------------- module GHC.StgToCmm.Heap ( getVirtHp, setVirtHp, setRealHp,...
null
https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/StgToCmm/Heap.hs
haskell
--------------------------------------------------------------------------- : heap management functions --------------------------------------------------------------------------- --------------------------------------------------------- --------------------------------------------------------- Cost Centre to stic...
( c ) The University of Glasgow 2004 - 2006 module GHC.StgToCmm.Heap ( getVirtHp, setVirtHp, setRealHp, getHpRelOffset, entryHeapCheck, altHeapCheck, noEscapeHeapCheck, altHeapCheckReturnsTo, heapStackCheckGen, entryHeapCheck', mkStaticClosureFields, mkStaticClosure,...
acac8506ce6cbccff67704ed953ba4cff7c352fa40716129679ccfe91a2588af
camlspotter/ocamloscope.2
t31_method.ml
class t = object method x = 1 end
null
https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/tests/t31_method.ml
ocaml
class t = object method x = 1 end
293ca33d6325c23fc36fc38301cbf2211b1e01789e9c538a3b5a6d7d1ce7f649
facebook/infer
string.mli
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/b3a229f872003fe020455807668bc7a8edd22d5c/sledge/nonstdlib/string.mli
ocaml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
964a7902b32948b69ca7e2d26942bd7d5b7ad8394a5642fe592f910323061d69
anmonteiro/ocaml-quic
h3.ml
---------------------------------------------------------------------------- * Copyright ( c ) 2020 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1...
null
https://raw.githubusercontent.com/anmonteiro/ocaml-quic/d4ada690841481ebea744d08ff39f49bb7d8ae89/h3/lib/h3.ml
ocaml
---------------------------------------------------------------------------- * Copyright ( c ) 2020 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1...
19d9cae56a6750b68ce56e80d9401543f0a5d67cc29da1a530b48ebbdfb4cb63
camlspotter/ocaml-zippy-tutorial-in-japanese
w35.ml
let () = for i = 1 to 10 do print_endline "Howdy!" done
null
https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/warnings/w35.ml
ocaml
let () = for i = 1 to 10 do print_endline "Howdy!" done
08c403452b1f8a9a951ee9797161f8d160e188fd00cf739b55e18c8cc93f06fe
jgoerzen/hsh
Channel.hs
{-# OPTIONS_GHC -XFlexibleInstances -XTypeSynonymInstances #-} Channel basics for HSH Copyright ( C ) 2004 - 2008 < > Please see the COPYRIGHT file Copyright (C) 2004-2008 John Goerzen <> Please see the COPYRIGHT file -} | Module : HSH.Channel Copyright : Copyright ( C ) 2006 - 2009 L...
null
https://raw.githubusercontent.com/jgoerzen/hsh/047197b789bf2ab63c87dcf7acf78db5f7687cf1/HSH/Channel.hs
haskell
# OPTIONS_GHC -XFlexibleInstances -XTypeSynonymInstances # | The main type for communicating between commands. All are expected to be lazy.
Channel basics for HSH Copyright ( C ) 2004 - 2008 < > Please see the COPYRIGHT file Copyright (C) 2004-2008 John Goerzen <> Please see the COPYRIGHT file -} | Module : HSH.Channel Copyright : Copyright ( C ) 2006 - 2009 License : GNU LGPL , version 2.1 or above Maintainer :...
fec64a558248d9a8c560416f2373744e45bc3d4e43554f787b025625a18c1bed
metabase/metabase
test_util.clj
(ns metabase.pulse.render.test-util "The goal of this namespace is to provide some utility functions that let us write static-viz tests without needing to make a card or run the query processor. It also allows us to write tests that check for actual visual changes in the render by providing a hiccup tree instead ...
null
https://raw.githubusercontent.com/metabase/metabase/e5ca616b50435dab1b18478c37c1d1e304f74fe3/test/metabase/pulse/render/test_util.clj
clojure
make-card-and-data validate-viz-scenarios apply viz-scenarios goes in [:data :viz-settings :column-settings] this goes in [:card :visualization_settings :column_settings] example scenario-settings for goal-line example scenario-settings for multi-series this goes in [:data :viz-settings :table-c...
(ns metabase.pulse.render.test-util "The goal of this namespace is to provide some utility functions that let us write static-viz tests without needing to make a card or run the query processor. It also allows us to write tests that check for actual visual changes in the render by providing a hiccup tree instead ...
bafa8af6767b2cd4af3b177211593f3a8f03902266a46904800f45ecffb91f5a
lancelet/wgpu-hs
Adapter.hs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # -- | -- Module : WGPU.Internal.Adapter -- Description : Adapter (physical device). module WGPU.Internal.Adapter ( -- * Types Adapter (..),...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/29c6a7a3f21ec074f3b23e282ea69396bad337cb/wgpu-hs/src-internal/WGPU/Internal/Adapter.hs
haskell
# LANGUAGE OverloadedStrings # | Module : WGPU.Internal.Adapter Description : Adapter (physical device). * Types * Functions ----------------------------------------------------------------------------- | Handle to a physical graphics and/or compute device. Request an 'Adapter' for a 'Surface' using the 'r...
# LANGUAGE ForeignFunctionInterface # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module WGPU.Internal.Adapter Adapter (..), AdapterType (..), BackendType (..), AdapterProperties (..), requestAdapter, getAdapterProperties, adapterPropert...
24560f2bb94ab1792fb38d57047d0fc6ec93d7ead1b96a35052904609054293a
zcaudate/hara
common.clj
(ns hara.deploy.analyser.common (:require [hara.io.file :as fs])) (defmulti -file-info "extendable function for `file-info`" {:added "3.0"} fs/file-type) (defmethod -file-info :default [file] {:file file :exports #{} :imports #{}}) (defrecord FileInfo [] Object (toString [this] (-> this :path))...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/deploy/analyser/common.clj
clojure
(ns hara.deploy.analyser.common (:require [hara.io.file :as fs])) (defmulti -file-info "extendable function for `file-info`" {:added "3.0"} fs/file-type) (defmethod -file-info :default [file] {:file file :exports #{} :imports #{}}) (defrecord FileInfo [] Object (toString [this] (-> this :path))...
345e4daa18cc64096865a94845bcf123c2f381d43280c270cef0ffbe63257a7e
orthecreedence/wookie
post.lisp
(defpackage :wookie-plugin-core-post (:use :cl :wookie-util :wookie)) (in-package :wookie-plugin-core-post) (defun check-if-post (request) "Check if this request contains POST data, and mark the plugin data as such so once we have body data we know whether or not to try and parse it." (let ((headers (request-...
null
https://raw.githubusercontent.com/orthecreedence/wookie/c18e4f994b307c648cce0a82d0ea78c2581c46df/core-plugins/post/post.lisp
lisp
let the parser know we have a post convert the body to a string via the Content-Type header TODO: fix hardcoded UTF8
(defpackage :wookie-plugin-core-post (:use :cl :wookie-util :wookie)) (in-package :wookie-plugin-core-post) (defun check-if-post (request) "Check if this request contains POST data, and mark the plugin data as such so once we have body data we know whether or not to try and parse it." (let ((headers (request-...
20dbce201006a2073dc600e270c935dfcd6984cf72b7a7e2ad3ca11e6881cde1
chetmurthy/ensemble
coord.mli
(**************************************************************) COORD.MLI Author : , 8/97 Designed with (**************************************************************) open Trans open Mutil (**************************************************************) (* COORD.T: The type for coordinators. *) type t (...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/groupd/coord.mli
ocaml
************************************************************ ************************************************************ ************************************************************ COORD.T: The type for coordinators. CREATE: create a new coordiator instance. RECEIVE: handle a message from a member. RECONSTR...
COORD.MLI Author : , 8/97 Designed with open Trans open Mutil type t val create : primary -> (coord_msg -> unit) -> t val receive : t -> (endpt * member_msg) -> unit val reconstruct : t -> primary -> (endpt list) * (Member.state list) * (ltime list) * (endpt list list) -> unit
7859e779169c57bf3f5e266d58313a4b05c9e49f8a6e248b2e2f928be986910e
foreverbell/project-euler-solutions
InfiniteSequence.hs
module Common.Numbers.InfiniteSequence ( prime , fibnoacci ) where import qualified Common.Numbers.Primes as P prime :: Integral a => [a] prime = P.primes fibnoacci :: Integral a => [a] fibnoacci = 0 : 1 : zipWith (+) fibnoacci (tail fibnoacci)
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/lib/Common/Numbers/InfiniteSequence.hs
haskell
module Common.Numbers.InfiniteSequence ( prime , fibnoacci ) where import qualified Common.Numbers.Primes as P prime :: Integral a => [a] prime = P.primes fibnoacci :: Integral a => [a] fibnoacci = 0 : 1 : zipWith (+) fibnoacci (tail fibnoacci)
5a6c0d3eb6e6cd9260efad9c4eedb6d19fbd11c21e714b216785d8b597bfcbcf
Liqwid-Labs/liqwid-libs
File.hs
module ScriptExport.File ( runFile, ) where import ScriptExport.Options (FileOptions) import ScriptExport.Types (Builders, getBuilders, handleServe) import Control.Applicative (optional) import Control.Monad (when) import Control.Monad.Except (runExcept) import Data.Aeson qualified as Aeson import Data.Aeson.Encode...
null
https://raw.githubusercontent.com/Liqwid-Labs/liqwid-libs/ea3553eeeb8493f7430204ca730f468827bd464c/liqwid-script-export/src/ScriptExport/File.hs
haskell
module ScriptExport.File ( runFile, ) where import ScriptExport.Options (FileOptions) import ScriptExport.Types (Builders, getBuilders, handleServe) import Control.Applicative (optional) import Control.Monad (when) import Control.Monad.Except (runExcept) import Data.Aeson qualified as Aeson import Data.Aeson.Encode...
f956f9e5e3da713786886363d056ba2a7536113ea5d6838fcde19025308ee5bb
arianvp/haskell-fido2
Database.hs
# LANGUAGE NamedFieldPuns # module Database ( Connection, Transaction (), -- Constructor deliberately not exposed. addAttestedCredentialData, addUser, withTransaction, connect, getUserByCredentialId, getCredentialIdsByUserId, getCredentialsByUserId, initialize, ) where import q...
null
https://raw.githubusercontent.com/arianvp/haskell-fido2/d6181dbe427769573166085e27ea0beba2c5d316/server/Database.hs
haskell
Constructor deliberately not exposed. If exceptions occur within the transaciton, the transaction is aborted with `ROLLBACK TRANSACTION`. Otherwise, the transaction is committed using `COMMIT TRANSACTION`. This ensures that we always close our transactions and don't leave them open when exceptions occur. TODO(...
# LANGUAGE NamedFieldPuns # module Database ( Connection, addAttestedCredentialData, addUser, withTransaction, connect, getUserByCredentialId, getCredentialIdsByUserId, getCredentialsByUserId, initialize, ) where import qualified Codec.CBOR.Read as CBOR import qualified Codec.CBOR....
54b932bcd6121d889f2a39baf0fb8b7f406b84b1daddffce814c1a2ff0881fb0
ucsd-progsys/liquidhaskell
TerminationNum.hs
{-@ LIQUID "--expect-any-error" @-} module TerminationNum where @ fak2 : : ( a , Eq a , a ) = > y:{x : a | x > = 0 } - > a /[y]@ fak2 :: (Ord a, Eq a, Num a) => a -> a fak2 0 = 1 fak2 x = x * fak2 (x + 1)
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/TerminationNum.hs
haskell
@ LIQUID "--expect-any-error" @
module TerminationNum where @ fak2 : : ( a , Eq a , a ) = > y:{x : a | x > = 0 } - > a /[y]@ fak2 :: (Ord a, Eq a, Num a) => a -> a fak2 0 = 1 fak2 x = x * fak2 (x + 1)
3fb77710036c9ede84a469b51dc34b2b6634a82318a44521e2501eb085ec6530
TrustInSoft/tis-kernel
export_altergo.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/export_altergo.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
0760f1ccffabc4484b1b85785d001539d176f56ab99eb569239f4db696edf30a
anishathalye/knox
expand.rkt
#lang racket/base (require (except-in "../verilog.rkt") (only-in "../yosys.rkt" yosys-top) (only-in rosette/safe [#%module-begin @#%module-begin]) racket/pretty (for-syntax racket/base syntax/parse)) (provide (except-out (all-from-out "../verilog.rkt") #%module-begin) (ren...
null
https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/yosys/debug/expand.rkt
racket
#lang racket/base (require (except-in "../verilog.rkt") (only-in "../yosys.rkt" yosys-top) (only-in rosette/safe [#%module-begin @#%module-begin]) racket/pretty (for-syntax racket/base syntax/parse)) (provide (except-out (all-from-out "../verilog.rkt") #%module-begin) (ren...
74755b418c5b22424f4d22f3c97bce74a754550ed0649d145dd0ddafaafe69b8
eeng/mercurius
event_bus.clj
(ns mercurius.core.domain.messaging.event-bus (:require [tick.alpha.api :as t] [clojure.spec.alpha :as s] [mercurius.util.uuid :refer [uuid]])) (defrecord Event [type id created-at data]) (defn new-event [type data] (map->Event {:type type :data data :id (uuid...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/core/domain/messaging/event_bus.clj
clojure
(ns mercurius.core.domain.messaging.event-bus (:require [tick.alpha.api :as t] [clojure.spec.alpha :as s] [mercurius.util.uuid :refer [uuid]])) (defrecord Event [type id created-at data]) (defn new-event [type data] (map->Event {:type type :data data :id (uuid...
2fa30e06a353713e473dfe947ff6950a8a64de5e85922c24e835d32114919cd2
inaka/katana-test
ktn_meta_SUITE.erl
%%% @doc Meta Testing SUITE %%% Use with mixer or by yourself. Just include a call to each of its functions %%% in your common test suites. %%% Make sure to add an application property to your common test configuration. -module(ktn_meta_SUITE). -author(''). -export([all/0]). -export([xref/1, dialyzer/1, elvis/1]). -ig...
null
https://raw.githubusercontent.com/inaka/katana-test/a99e56b8a49d751e16644d8d035512c2925f28b8/src/ktn_meta_SUITE.erl
erlang
@doc Meta Testing SUITE Use with mixer or by yourself. Just include a call to each of its functions in your common test suites. Make sure to add an application property to your common test configuration. @doc xref's your code using xref_runner. Available Options: - xref_config: Configuration for xref_r...
-module(ktn_meta_SUITE). -author(''). -export([all/0]). -export([xref/1, dialyzer/1, elvis/1]). -ignore_xref([all/0]). -ignore_xref([xref/1, dialyzer/1, elvis/1]). -type config() :: [{atom(), term()}]. -spec all() -> [dialyzer | elvis | xref, ...]. all() -> [dialyzer, elvis, xref]. -spec xref(config()) -> {comment,...
6b31af80dd2ca72eb143a33a6d566b32317cb6c57cc9195de2948f45efd41298
remyoudompheng/hs-language-go
Pretty.hs
-- | -- Module : Tests.Pretty Copyright : ( c ) 2013 License : ( see COPYING ) -- -- This module provides tests for the pretty-printer. -- module Tests.Pretty (testsPretty) where import Test.Tasty import Test.Tasty.HUnit import Text.PrettyPrint (render) import Text.Parsec.Combinator import Langu...
null
https://raw.githubusercontent.com/remyoudompheng/hs-language-go/5440485f6404356892eab4832cff4f1378c11670/tests/Tests/Pretty.hs
haskell
| Module : Tests.Pretty This module provides tests for the pretty-printer.
Copyright : ( c ) 2013 License : ( see COPYING ) module Tests.Pretty (testsPretty) where import Test.Tasty import Test.Tasty.HUnit import Text.PrettyPrint (render) import Text.Parsec.Combinator import Language.Go.Parser.Tokens import Language.Go.Parser.Parser import Language.Go.Pretty testRoundTrip :...
8669e68d80a923cf008345aab0e34c3d9fa8d412d3fcd837410f56486eca52ec
sgbj/MaximaSharp
kummer.lisp
Author University of Nebraska at Kearney Copyright ( C ) 2004 , Brief Description : Maxima code for linear homogeneous second order ;; differential equations. Maxima odelin is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License , ;; . Maxima od...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/contrib/diffequations/kummer.lisp
lisp
differential equations. you can redistribute it and/or . MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Author University of Nebraska at Kearney Copyright ( C ) 2004 , Brief Description : Maxima code for linear homogeneous second order modify it under the terms of the GNU General Public License , Maxima odelin has NO WARRANTY , not even the implied warranty of ($put '$kummer 1 '$version) (putprop '$k...
05b37e6f5b02bf7d92e86e81f73e5a605a7e321e8cd9f798fbd13e95c43b5843
janestreet/bonsai
bonsai_partial_render_table_example.ml
open! Core open! Bonsai_web open Bonsai.Let_syntax module Table = Bonsai_web_ui_partial_render_table.Basic module Row = Row module Time_ns_option = struct type t = Time_ns.t option [@@deriving compare] let to_string = function | None -> "-" | Some t -> Time_ns.to_string_utc t ;; end module Style = [%...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/partial_render_table/src/bonsai_partial_render_table_example.ml
ocaml
open! Core open! Bonsai_web open Bonsai.Let_syntax module Table = Bonsai_web_ui_partial_render_table.Basic module Row = Row module Time_ns_option = struct type t = Time_ns.t option [@@deriving compare] let to_string = function | None -> "-" | Some t -> Time_ns.to_string_utc t ;; end module Style = [%...
ad8806bf04ff6b911ea3019c0c33044cdc041f2a7574aa9adffcb0c935090431
geneweb/geneweb
historyDiff.ml
Copyright ( c ) 1998 - 2007 INRIA open Config open Def open Gwdb type gen_record = { date : Adef.safe_string; wizard : Adef.safe_string; gen_p : (iper, iper, string) gen_person; gen_f : (iper, ifam, string) gen_family list; gen_c : iper array list; } Le nom du fichier historique ( à partir de la clé pe...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/historyDiff.ml
ocaml
history directory path ************************************************************************ ************************************************************************ ************************************************************************ *********************************************************************...
Copyright ( c ) 1998 - 2007 INRIA open Config open Def open Gwdb type gen_record = { date : Adef.safe_string; wizard : Adef.safe_string; gen_p : (iper, iper, string) gen_person; gen_f : (iper, ifam, string) gen_family list; gen_c : iper array list; } Le nom du fichier historique ( à partir de la clé pe...
404d41747739ed8852e35419bcb19b8f3c62fd03d51a665e4833ababee5ab4df
herbertjones/my-stumpwm-config
defaults.lisp
(in-package :hfj) (defvar *group-names* '("Emacs" "Browser" "Terminal" "Email") "List of group names to be created.") (defvar *frame-preferences* '(("Emacs" (0 t t :title "Emacs - main")) ...
null
https://raw.githubusercontent.com/herbertjones/my-stumpwm-config/e2f259895835e9f39250ea3546b24ec13fbd093c/defaults.lisp
lisp
(in-package :hfj) (defvar *group-names* '("Emacs" "Browser" "Terminal" "Email") "List of group names to be created.") (defvar *frame-preferences* '(("Emacs" (0 t t :title "Emacs - main")) ...
16a797bcb77550e5034272d0f7bff029794c91b627501529a54ba26894e08731
juxt/jinx
schema_test.cljc
Copyright © 2019 , JUXT LTD . (ns juxt.jinx.schema-test (:require [juxt.jinx.alpha.schema :as schema] #?(:clj [clojure.test :refer [deftest is are testing]] :cljs [cljs.test :refer-macros [deftest is testing]] [cljs.core :refer [ExceptionInfo]])) #?(:clj (:import (clojure...
null
https://raw.githubusercontent.com/juxt/jinx/48c889486e5606e39144043946063803ad6effa8/test/juxt/jinx/schema_test.cljc
clojure
Copyright © 2019 , JUXT LTD . (ns juxt.jinx.schema-test (:require [juxt.jinx.alpha.schema :as schema] #?(:clj [clojure.test :refer [deftest is are testing]] :cljs [cljs.test :refer-macros [deftest is testing]] [cljs.core :refer [ExceptionInfo]])) #?(:clj (:import (clojure...
ef28d8c0b35ae7f11533377785a2863f881d7a8880cf795be08b8790656caac5
WorksHub/client
company.cljc
(ns wh.common.company (:require [wh.common.user :as user] [wh.verticals :as verticals])) (defn permissions [db] (get-in db [:wh.user.db/sub-db :wh.user.db/company :permissions])) (defn can-edit-jobs-after-first-job-published? [db] (or (user/admin? db) (contains? (permissions db) :can_edit_jobs...
null
https://raw.githubusercontent.com/WorksHub/client/0b47ee801184dd4c3e1b0612344b8f0009cd29a8/common/src/wh/common/company.cljc
clojure
greenhouse workable
(ns wh.common.company (:require [wh.common.user :as user] [wh.verticals :as verticals])) (defn permissions [db] (get-in db [:wh.user.db/sub-db :wh.user.db/company :permissions])) (defn can-edit-jobs-after-first-job-published? [db] (or (user/admin? db) (contains? (permissions db) :can_edit_jobs...
ab286ad93d97cf0246aa556288b9f94efc2a43ff0bde3d14f9256484c0f0bce8
finnishtransportagency/harja
viestinta.clj
(ns harja.palvelin.palvelut.laadunseuranta.viestinta "Tässä namespacessa on palveluita laadunseuranta-asioihin liittyvään tekstiviesti-/sähköpostiviestintään." (:require [taoensso.timbre :as log] [clojure.core.match :refer [match]] [harja.tyokalut.html :as html-tyokalut] [harja.k...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/clj/harja/palvelin/palvelut/laadunseuranta/viestinta.clj
clojure
Sisäinen käsittely
(ns harja.palvelin.palvelut.laadunseuranta.viestinta "Tässä namespacessa on palveluita laadunseuranta-asioihin liittyvään tekstiviesti-/sähköpostiviestintään." (:require [taoensso.timbre :as log] [clojure.core.match :refer [match]] [harja.tyokalut.html :as html-tyokalut] [harja.k...
7db911b5deb5992d91e612e03bf925dccb911f82eb31d966308f72412e19197c
inaka/elvis_core
elvis_test_utils.erl
-module(elvis_test_utils). -export([config/0, config/1, find_file/2]). -spec config() -> elvis_config:configs(). config() -> application:get_env(elvis_core, config, []). -spec config(RuleSet :: atom()) -> elvis_config:config(). config(RuleSet) -> RuleSetCfgs = application:get_env(elvis_core, config, []), ...
null
https://raw.githubusercontent.com/inaka/elvis_core/66e8d89333fabd812d264b8ad0bb448fe1dfb0f8/test/elvis_test_utils.erl
erlang
-module(elvis_test_utils). -export([config/0, config/1, find_file/2]). -spec config() -> elvis_config:configs(). config() -> application:get_env(elvis_core, config, []). -spec config(RuleSet :: atom()) -> elvis_config:config(). config(RuleSet) -> RuleSetCfgs = application:get_env(elvis_core, config, []), ...
d94986122f239f58283e58b02e88fb050be05e7bd5857991c87efcfd47f440ab
racket/typed-racket
static-contract-conversion-tests.rkt
#lang racket/base (require "test-utils.rkt" "evaluator.rkt" rackunit (only-in racket/contract contract?) syntax/srcloc syntax/location (for-syntax syntax/parse racket/base typed-racket/private/type-contract typed-racket/static-contracts/in...
null
https://raw.githubusercontent.com/racket/typed-racket/29ea3c105e0bd60b88c1fd195b54fa716863f690/typed-racket-test/unit-tests/static-contract-conversion-tests.rkt
racket
-racket/issues/625 Vectors Unions of hashes and vectors These tests for unit static contracts are insufficient, but in order to test Unit types the signature environment must be set up correctly. More complex cases of compilation to unit/c contracts are tested by integration tests.
#lang racket/base (require "test-utils.rkt" "evaluator.rkt" rackunit (only-in racket/contract contract?) syntax/srcloc syntax/location (for-syntax syntax/parse racket/base typed-racket/private/type-contract typed-racket/static-contracts/in...
7795d7140f02503cf413bd1a8cbe58ce4c5a8e804cc4fe14ff8502200bd40210
jaju/lucene-clj
lucene_test.clj
(ns msync.lucene.lucene-test (:require [clojure.test :refer :all] [msync.lucene.tests-common :refer :all] [msync.lucene :as lucene] [msync.lucene.indexer :as indexer] [clojure.string :as string] [msync.lucene.query :as query] [msync.lucene.analyz...
null
https://raw.githubusercontent.com/jaju/lucene-clj/b6b67929f2838d8deb0dc9b11309aa33ee0be844/test/msync/lucene/lucene_test.clj
clojure
This is to hold onto the index when created during REPL-driven development, and this buffer is eval'ed. Using contexts. Contexts work differently than fields. All contexts are clubbed together. I wish I understood this design rationale better.
(ns msync.lucene.lucene-test (:require [clojure.test :refer :all] [msync.lucene.tests-common :refer :all] [msync.lucene :as lucene] [msync.lucene.indexer :as indexer] [clojure.string :as string] [msync.lucene.query :as query] [msync.lucene.analyz...
bf9488d77895b41f5cf27d24a4600953faa33b6f01f138935932c6919a3006c7
oakes/play-cljs
dev.cljs
(ns play-cljs.dev (:require [play-cljs.core] [dynadoc.core]))
null
https://raw.githubusercontent.com/oakes/play-cljs/6e007c4fc2aba84f75b03796672826ba5617732e/src/play_cljs/dev.cljs
clojure
(ns play-cljs.dev (:require [play-cljs.core] [dynadoc.core]))
a7e4324cbeeb386d7edde334055326d8362bd99e615652f533d84f340830b7c2
haskell-compat/base-compat
Compat.hs
# LANGUAGE CPP , NoImplicitPrelude # module Data.Functor.Sum.Compat ( #if MIN_VERSION_base(4,9,0) module Base #endif ) where #if MIN_VERSION_base(4,9,0) import Data.Functor.Sum as Base #endif
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat/src/Data/Functor/Sum/Compat.hs
haskell
# LANGUAGE CPP , NoImplicitPrelude # module Data.Functor.Sum.Compat ( #if MIN_VERSION_base(4,9,0) module Base #endif ) where #if MIN_VERSION_base(4,9,0) import Data.Functor.Sum as Base #endif
51fb27f90151dab85ed2b925006e8af1e8a10d36292c398e6595f7b752f6432b
karlhof26/gimp-scheme
kward1979uk_Contact Sheet.scm
Created by ; License : ; ; 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 version. ; ; This p...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/0db4e0d3a711f4a1084e42970cf3b27301a31280/kward1979uk_Contact%20Sheet.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t...
Created by License : it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or To view a copy of the GNU General Public License (define (contact load opt maxh maxw imagew imageh) (let* ( (a 0) ...
059501737ecbb57af28bbc966d4e0521827325568caf8e53b2ba9e0de10bbd8b
cfcs/omktorrent
omktorrent.ml
open Rresult let handle_file ~unaligned ~piece_length ~pieces_chan ~files_chan rel_path input = let open Omgtorrent in let write_piece_hash hash = output_bytes pieces_chan hash in let files_writer = Omgtorrent.writer_of_out_channel files_chan in let { Unix.LargeFile.st_size = file_size; _ } = Unix.L...
null
https://raw.githubusercontent.com/cfcs/omktorrent/333bcca153d4c3f9772c62cc2dfc1516c1eb2561/app/omktorrent.ml
ocaml
then don't insert padding hash pieces from the mmap: ="shared". see comment in the other map_file below hash remainder of the file write file record fill in relative path, split by '/': insert padding file record, if applicable let's open it in read-WRITE mode. we don't need to write, obviou...
open Rresult let handle_file ~unaligned ~piece_length ~pieces_chan ~files_chan rel_path input = let open Omgtorrent in let write_piece_hash hash = output_bytes pieces_chan hash in let files_writer = Omgtorrent.writer_of_out_channel files_chan in let { Unix.LargeFile.st_size = file_size; _ } = Unix.L...
1c7a0506080002765f208982eb3105770e686756c4bcd505c6e1f2616c3b7eb0
batsh-dev-team/Batsh
winbat.ml
type t = { batsh : Parser.t; batch_ast : Winbat_ast.t; batch_ast_expanded : Winbat_ast.t; } let compile (batsh : Parser.t) : t = let batch_ast = Winbat_compile.compile batsh in let batch_ast_expanded = Winbat_functions.expand batch_ast in {batsh; batch_ast; batch_ast_expanded} let print (batch : t) : stri...
null
https://raw.githubusercontent.com/batsh-dev-team/Batsh/5c8ae421e0eea5dcb3da01643152ad96af941f07/lib/winbat.ml
ocaml
type t = { batsh : Parser.t; batch_ast : Winbat_ast.t; batch_ast_expanded : Winbat_ast.t; } let compile (batsh : Parser.t) : t = let batch_ast = Winbat_compile.compile batsh in let batch_ast_expanded = Winbat_functions.expand batch_ast in {batsh; batch_ast; batch_ast_expanded} let print (batch : t) : stri...
20681c8835df053f39c59eab4ed7b6e6e1078d986604b28de603dc8c619e25da
zotonic/zotonic
filter_escapejs.erl
@author < > 2010,2016 %% @doc 'escapejs' filter, escape a value for output in javascript Copyright 2010,2016 %% 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 %% %% ...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_escapejs.erl
erlang
@doc 'escapejs' filter, escape a value for output in javascript 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 i...
@author < > 2010,2016 Copyright 2010,2016 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(filter_escapejs). -export([escapejs/2]). escapejs(Input, Context) -> z_utils:js_escape(Input, Context).
6aaf64f64e698b5cf5fc145281d0b29a1c34ff8eb30f6a5fe0eac9211cbf71aa
tianyicui/golio
eval.mli
* Evaluate { ! } to { ! Type.value } open Type val eval : ?tail:bool -> env -> sexp -> env * value ;; * Given an { ! , evaluate a { ! } in it , returns a new * { ! } and the result { ! Type.value } . Use the parameter [ tail ] when the * expression is a * { { : -Z-H-6.html#%_sec_3.5 } * tail exp...
null
https://raw.githubusercontent.com/tianyicui/golio/2f03a0ddb451ff8389125477e1214839973eaa1f/src/eval.mli
ocaml
* evaluate a [list] of {!Type.sexp}s sequentially, and return the result of * last one.
* Evaluate { ! } to { ! Type.value } open Type val eval : ?tail:bool -> env -> sexp -> env * value ;; * Given an { ! , evaluate a { ! } in it , returns a new * { ! } and the result { ! Type.value } . Use the parameter [ tail ] when the * expression is a * { { : -Z-H-6.html#%_sec_3.5 } * tail exp...
74187edb8b57db5d153c48c17bb5c29044a1440d41a53db02a5c087ef569d628
kostyushkin/erlworld
actor.erl
%%% %%% Actor %%% @author %%% @doc %%% The Actor module defines how to create and interact with Actors in the world. %%% An Actor is made up of three aspects:<br / > %%% = State - an instance of actor_state<br /> %%% = Act - A callback function defining how to update this Actors s...
null
https://raw.githubusercontent.com/kostyushkin/erlworld/1c55c9eb0d12db9824144b4ff7535960c53e35c8/src/actor.erl
erlang
Actor @doc The Actor module defines how to create and interact with Actors in the world. = State - an instance of actor_state<br /> = Act - A callback function defining how to update this Actors state.<br /> = Paint - A callback function defining how to paint.<br /> <e...
@author An Actor is made up of three aspects:<br / > The ActorState should be an instance made from the actor_state module ( or a < em > Act ( State::actor_state ( ) , Parent::pid ( ) ) - > NewState::actor_state()</em><br / > frame . The signature of the Act function must be in the format stated...
a89fd09a39cb33c6e99c1cb5d4626b8e92cd95c124f2f7923a54db8d51062010
prometheusresearch-archive/action
Scope.mli
(** * A data structure which implements nested scopes. *) (** Scope which maps names to values 'v *) type 'v t (** Scoped name is just a string *) type name = string (** Globally unique name *) module Name : sig type t val toString : t -> string end (** An empty scope *) val empty : 'v t (** Add bindings to...
null
https://raw.githubusercontent.com/prometheusresearch-archive/action/34e0a1058e3e3212066f732babc1bdd4f2eb1428/core/src/Scope.mli
ocaml
* * A data structure which implements nested scopes. * Scope which maps names to values 'v * Scoped name is just a string * Globally unique name * An empty scope * Add bindings to the scope * Return a list of all bindings * Resolve a name into a locally unique name * Get a value by a globally unique name * R...
type 'v t type name = string module Name : sig type t val toString : t -> string end val empty : 'v t val add : (name * 'v) list -> 'v t -> 'v t val bindings : 'v t -> (Name.t * name * 'v) list val resolve : name -> 'v t -> Name.t option val get : Name.t -> 'v t -> 'v option val resolveAndGet : name -> 'v...
d326fea6c1e399ddea51edc010b9840194d8a487b9bd7126fa744e29e64765af
agentm/project-m36
WebSocket.hs
# LANGUAGE CPP # -- test the websocket server import Test.HUnit import qualified Network.WebSockets as WS import ProjectM36.Server.WebSocket import ProjectM36.Server.Config import ProjectM36.Server import ProjectM36.Client import ProjectM36.Base import Network.Socket import Control.Exception import Control.Concurrent ...
null
https://raw.githubusercontent.com/agentm/project-m36/d05dec56f6a4884f10c49d30efd1db45b7db3a48/test/Server/WebSocket.hs
haskell
test the websocket server start the websocket server run some tutoriald against it start normal server runServer does n't support returning an arbitrary socket wait for socket to be listening receive relation response
# LANGUAGE CPP # import Test.HUnit import qualified Network.WebSockets as WS import ProjectM36.Server.WebSocket import ProjectM36.Server.Config import ProjectM36.Server import ProjectM36.Client import ProjectM36.Base import Network.Socket import Control.Exception import Control.Concurrent import System.Exit import Dat...
eb7defe433c2897460a7ddd2dd67a657c526fad13ad374bde6cb8399a014d201
ryukzak/nitta
Types.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -fno-warn-orphans #-} | Module : NITTA.Project . Types Description : Types for a target project description and generation Copyright : ( c ) , 2019 License : : Stability : experimental Module : ...
null
https://raw.githubusercontent.com/ryukzak/nitta/1e1e571fd73b2cb9bea4e5781bf658e7edd264c0/src/NITTA/Project/Types.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS -fno-warn-orphans # | Target project for different purpose (testing, target system, etc). Should be writable to disk. FIXME: collision between target project name and output directory. Maybe pName or pTargetProjectPath should be maybe? Or both? ^ target project name ^ IP-c...
# LANGUAGE AllowAmbiguousTypes # | Module : NITTA.Project . Types Description : Types for a target project description and generation Copyright : ( c ) , 2019 License : : Stability : experimental Module : NITTA.Project.Types Description : Types for a target project descript...
020edb702409c13eb647e708a00555ac200bf44d9f76455c83a2413883a77af4
ServiceNow/picard
Prelude.hs
module Language.SQL.SpiderSQL.Prelude where import Control.Applicative (Alternative (empty, (<|>)), Applicative (liftA2)) import Control.Monad.Reader.Class (MonadReader (ask)) import Data.Char (toLower) import Data.Function (on) import Data.Functor (($>)) import qualified Data.HashMap.Strict as HashMap (elems, interse...
null
https://raw.githubusercontent.com/ServiceNow/picard/6a252386bed6d4233f0f13f4562d8ae8608e7445/picard/src/Language/SQL/SpiderSQL/Prelude.hs
haskell
$setup >>> :set -XOverloadedStrings | Like 'many' but with an upper limit. Left "endOfInput" Right 1.2 Left "double: Failed reading: empty" Right (-1.2e-5) | @caselessString s@ matches the string @s@ using case insensitive comparison. >>> parseOnly (caselessString "singer_in_concert" <* endOfInput) "sing...
module Language.SQL.SpiderSQL.Prelude where import Control.Applicative (Alternative (empty, (<|>)), Applicative (liftA2)) import Control.Monad.Reader.Class (MonadReader (ask)) import Data.Char (toLower) import Data.Function (on) import Data.Functor (($>)) import qualified Data.HashMap.Strict as HashMap (elems, interse...
dddf358d83464aec2deace413d49481ed0449170b3c7d64a7afa61dd39ae75b2
TerrorJack/ghc-alter
Environment.hs
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # # LANGUAGE CPP # module GHC.Environment (getFullArgs) where import Foreign import Foreign.C import GHC.Base import GHC.Real ( fromIntegral ) #ifdef mingw32_HOST_OS import GHC.IO (finally) import GHC.Windows # if defined(i386_HOST_ARCH) # define WINDOWS_CCONV ...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/Environment.hs
haskell
| Computation 'getFullArgs' is the "raw" version of 'getArgs', similar command line arguments, starting with the program name, and including those normally eaten by the RTS (+RTS ... -RTS).
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # # LANGUAGE CPP # module GHC.Environment (getFullArgs) where import Foreign import Foreign.C import GHC.Base import GHC.Real ( fromIntegral ) #ifdef mingw32_HOST_OS import GHC.IO (finally) import GHC.Windows # if defined(i386_HOST_ARCH) # define WINDOWS_CCONV ...
209dfbb9783018fa1ab10338309776753769b944ef455590472c8434bd10ef6b
rpeszek/typed-encoding
DiySignEncoding.hs
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- {-# LANGUAGE PartialTypeSignatures #-} -- | Simple DIY encoding example...
null
https://raw.githubusercontent.com/rpeszek/typed-encoding/441f9f3bbf849f485f82eae66402ee2fd7b47a34/src/Examples/TypedEncoding/Instances/DiySignEncoding.hs
haskell
# LANGUAGE OverloadedStrings # {-# LANGUAGE PartialTypeSignatures #-} | Simple DIY encoding example that "signs" Text with its length. Documentation includes discussion of error handling options. My current thinking: Stronger type level information about encoding provides type safety over decoding process. D...
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # ( JSON instances , DB retrievals , etc ) . This can be accomplished using provided support for /Validatio...
18edaa8ed6dea4e46ab843672b2a7c53b81cb06b3c799c4107bb8568215bf1ae
RyanHope/ACT-R
multi-model-talking.lisp
This file creates three models in the same meta - process ;;; which are able to hear each other talking through the use ;;; of a custom device. ;;; ;;; To run the model just call the test-it function. That ;;; will create the instance of the device, install it for ;;; each model and then run them. (clear-all) ;;; ...
null
https://raw.githubusercontent.com/RyanHope/ACT-R/c65f3fe7057da0476281ad869c7963c84c0ad735/examples/multi-model-talking.lisp
lisp
which are able to hear each other talking through the use of a custom device. To run the model just call the test-it function. That will create the instance of the device, install it for each model and then run them. Creating a custom device to allow all models to hear each other when they talk. Define the m...
This file creates three models in the same meta - process (clear-all) (defstruct conference-call) (defmethod device-move-cursor-to ((device conference-call) loc)) (defmethod device-handle-click ((device conference-call))) (defmethod device-handle-keypress ((device conference-call) key)) (defmethod cursor-to-vis-...
0e55cf752f881ca88faf815948501953ef623925ede00fa9423029d5337b617c
facebookincubator/hsthrift
JSONPrettyTest.hs
Copyright ( c ) Facebook , Inc. and its affiliates . # LANGUAGE QuasiQuotes # module JSONPrettyTest (main) where import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy.Char8 as B import Data.Text.Prettyprint.Doc as Pretty hiding ((<>)) import Text.JSON import Test.HUnit import TestRunner impor...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/tests/JSONPrettyTest.hs
haskell
Copyright ( c ) Facebook , Inc. and its affiliates . # LANGUAGE QuasiQuotes # module JSONPrettyTest (main) where import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy.Char8 as B import Data.Text.Prettyprint.Doc as Pretty hiding ((<>)) import Text.JSON import Test.HUnit import TestRunner impor...
cb10b127de86655e3491e411f42fcb790ae4d5143f252e299527ef9283f26cfd
janestreet/hardcaml
ram.ml
open Base module Collision_mode = struct module T = struct type t = | Read_before_write | Write_before_read [@@deriving sexp_of, compare] end include T include Comparable.Make (T) end module Write_port = struct type t = Signal.write_port = { write_clock : Signal.t ; write_addres...
null
https://raw.githubusercontent.com/janestreet/hardcaml/dc284ad1b3d0e2d78702314bc5c43ae3a5779ff2/src/ram.ml
ocaml
open Base module Collision_mode = struct module T = struct type t = | Read_before_write | Write_before_read [@@deriving sexp_of, compare] end include T include Comparable.Make (T) end module Write_port = struct type t = Signal.write_port = { write_clock : Signal.t ; write_addres...
71043e1217a799893ff333e0c6dc3caf4a80f64f42dbcf503c75ac341d4e1f1e
ucsd-progsys/liquidhaskell
MergeSort.hs
{-@ LIQUID "--expect-any-error" @-} ------------------------------------------------------------------------------ | An implementation of Merge Sort , where LH verifies : -- 1. Termination (Totality) -- 2. The output is indeed in non-decreasing order -------------------------------------------------------------...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/MergeSort.hs
haskell
@ LIQUID "--expect-any-error" @ ---------------------------------------------------------------------------- 1. Termination (Totality) 2. The output is indeed in non-decreasing order ---------------------------------------------------------------------------- | The top level `sort` function. Proved: (a) ter...
| An implementation of Merge Sort , where LH verifies : module MergeSort (sort) where @ type OList a = [ a]<{\fld v - > ( v > = fld ) } > @ @ type OListN a N = { v : OList a | len v = = N } @ @ sort : : ( a ) = > xs:[a ] - > OListN a { len xs } @ sort :: Ord a => [a] -> [a] sort [] = [] sort [x] = [x] so...
acc8850a78813f084b0c18d8bacd0fd154432db6b15ac9253a8759f4bc8a15ea
oakes/Nightmod
manager.clj
(ns nightmod.manager (:require [clojure.java.io :as io] [nightmod.utils :as u] [play-clj.core :refer :all] [play-clj.net-utils :as net-utils] [play-clj.utils :as utils]) (:import [com.badlogic.gdx.assets.loaders FileHandleResolver] [com.badlogic.gdx.files F...
null
https://raw.githubusercontent.com/oakes/Nightmod/e1145a49d96c5322aaf4bdd5493ae14a7f0c0f8a/src/clojure/nightmod/manager.clj
clojure
make all assets load relative to the current project's directory keep a reference to all timers to we can stop them later keep a reference to all networks so we can disconnect them later
(ns nightmod.manager (:require [clojure.java.io :as io] [nightmod.utils :as u] [play-clj.core :refer :all] [play-clj.net-utils :as net-utils] [play-clj.utils :as utils]) (:import [com.badlogic.gdx.assets.loaders FileHandleResolver] [com.badlogic.gdx.files F...
b3ee02c4cc51591b5036762c5e78d28a9431326e7f811a0cd4e387cc8a9db24e
dfinity/motoko
stability.mli
(* (Stable) Signature matching *) open Mo_types (* signature matching with multiple error reporting c.f. (simpler) Types.match_sig. *) val match_stab_sig : Type.field list -> Type.field list -> unit Diag.result
null
https://raw.githubusercontent.com/dfinity/motoko/bf89f4def15b6f10d956834b9a9549c91818795d/src/mo_frontend/stability.mli
ocaml
(Stable) Signature matching signature matching with multiple error reporting c.f. (simpler) Types.match_sig.
open Mo_types val match_stab_sig : Type.field list -> Type.field list -> unit Diag.result
c8d02a10ca254dda8c8e612aa098b6384f3ae41830b280445892d79a65d0915a
sebastiaanvisser/clay
Main.hs
{-# LANGUAGE OverloadedStrings #-} OverloadedLists here causes things like forM _ [ 0 .. 3 ] cause type ambiguity module Main where import Control.Monad import Data.Text (pack) import Data.List.NonEmpty (fromList) import Prelude import Clay hiding (i, s, div) import Clay.Selector (with) main :: IO () main = putCss ...
null
https://raw.githubusercontent.com/sebastiaanvisser/clay/16f55a5c6ab7fd98e39cedf852bd3400a02ac45f/examples/Main.hs
haskell
# LANGUAGE OverloadedStrings #
OverloadedLists here causes things like forM _ [ 0 .. 3 ] cause type ambiguity module Main where import Control.Monad import Data.Text (pack) import Data.List.NonEmpty (fromList) import Prelude import Clay hiding (i, s, div) import Clay.Selector (with) main :: IO () main = putCss logo where s = 80 :: Double ...
d13616218be80c36ca5f1a003068a48ec60b11baee2cc3a37e18182dce483a14
ucsd-progsys/nate
btype.ml
(***********************************************************************) (* *) (* OCaml *) (* *) and , projet Crist...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/ocaml/typing/btype.ml
ocaml
********************************************************************* OCaml ...
and , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Misc open Types module TypeSet = Set.Make(Typ...
90df5696cc8ae8196c66930ccf498f8cd5923615519b3ea55dcd7bb6ea841ebb
tlaplus/tlapm
llproof.ml
Copyright 2004 INRIA open Expr;; type binop = | And | Or | Imply | Equiv ;; type rule = | Rfalse | Rnottrue | Raxiom of expr | Rcut of expr | Rnoteq of expr | Reqsym of expr * expr | Rnotnot of expr | Rconnect of binop * expr * expr | Rnotconnect of binop * expr * expr | Rex of expr ...
null
https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/llproof.ml
ocaml
Copyright 2004 INRIA open Expr;; type binop = | And | Or | Imply | Equiv ;; type rule = | Rfalse | Rnottrue | Raxiom of expr | Rcut of expr | Rnoteq of expr | Reqsym of expr * expr | Rnotnot of expr | Rconnect of binop * expr * expr | Rnotconnect of binop * expr * expr | Rex of expr ...
9999587cd98bb8dc74e373f7ec514590b75352901823a228f10296f3844e95d8
forward/incanter-BLAS
censored.clj
(ns incanter.censored (:use [incanter.core :only (mult pow)] [incanter.stats :only (pdf-normal cdf-normal sd)])) (defn- lambda-two-sided ([a-std b-std] (/ (- (pdf-normal a-std) (pdf-normal b-std)) (- (cdf-normal b-std) (cdf-normal a-std))))) (defn- lambda-lower ([a-std] (/ (pdf-normal a-std) ...
null
https://raw.githubusercontent.com/forward/incanter-BLAS/da48558cc9d8296b775d8e88de532a4897ee966e/src/main/clojure/incanter/censored.clj
clojure
(* s-sq (- 1 (cdf-normal alpha)) (+ (- 1 (delta alpha)) (cdf-normal alpha)))))
(ns incanter.censored (:use [incanter.core :only (mult pow)] [incanter.stats :only (pdf-normal cdf-normal sd)])) (defn- lambda-two-sided ([a-std b-std] (/ (- (pdf-normal a-std) (pdf-normal b-std)) (- (cdf-normal b-std) (cdf-normal a-std))))) (defn- lambda-lower ([a-std] (/ (pdf-normal a-std) ...
cc14a04ddef818a355c0c51868310da81e1efbc38a99f37fe68808620890b4ae
hazel-el/hazel
NormalizeSpec.hs
module Hazel.NormalizeSpec (spec) where import Data.Monoid ((<>)) import Test.Hspec import Hazel.Core import Hazel.Normalize import Hazel.TestCases spec :: Spec spec = do describe "GCI Normalization" $ do it "normalizes gci2" $ normalizeGCI gci2 `shouldBe` gci2' it "normalizes gci2b" $ n...
null
https://raw.githubusercontent.com/hazel-el/hazel/0f5d7e0c03d5eebd16f103df8cc05c5408c152f1/test/Hazel/NormalizeSpec.hs
haskell
module Hazel.NormalizeSpec (spec) where import Data.Monoid ((<>)) import Test.Hspec import Hazel.Core import Hazel.Normalize import Hazel.TestCases spec :: Spec spec = do describe "GCI Normalization" $ do it "normalizes gci2" $ normalizeGCI gci2 `shouldBe` gci2' it "normalizes gci2b" $ n...