_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
77744c7b2e978b85a901ca40784558272ee685961fed8a38b65f69ca4d02fdf7
jixiuf/helloerlang
chat_log.erl
-module(chat_log). -export([info/2,debug/2]). -define(loglevel,debug). %available value: debug,info info(Format,Params)-> %% {ok,LogLevel}=application:get_env(loglevel), case LogLevel of case ?loglevel of info -> io:format("Info: "++Format,Params); debug ->...
null
https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/chat/src/chat_log.erl
erlang
available value: debug,info {ok,LogLevel}=application:get_env(loglevel), {ok,LogLevel}=application:get_env(loglevel),
-module(chat_log). -export([info/2,debug/2]). info(Format,Params)-> case LogLevel of case ?loglevel of info -> io:format("Info: "++Format,Params); debug -> io:format("Info: "++Format,Params); _Other -> io:format("",[]) end . debug(Format,P...
b50de617f62df4a228ddf88292d8b04717457a1c3ba1cce3c08578939d056835
wilkerlucio/pathom-viz
index_explorer_cards.cljs
(ns com.wsscode.pathom.viz.index-explorer-cards (:require [cljs.reader :refer [read-string]] [cljs.spec.alpha :as s] [cljs.test :refer [is testing]] [com.fulcrologic.fulcro-css.localized-dom :as dom] [com.fulcrologic.fulcro.components :as fc] [com.wsscode.co...
null
https://raw.githubusercontent.com/wilkerlucio/pathom-viz/6bed1d2adf556655892213de2d50fbe2db3c5423/src/cards/com/wsscode/pathom/viz/index_explorer_cards.cljs
clojure
(ns com.wsscode.pathom.viz.index-explorer-cards (:require [cljs.reader :refer [read-string]] [cljs.spec.alpha :as s] [cljs.test :refer [is testing]] [com.fulcrologic.fulcro-css.localized-dom :as dom] [com.fulcrologic.fulcro.components :as fc] [com.wsscode.co...
5ed15d6e58cc423f9e6b18454a4781fcf413ae099b01ec502461ae52fdbe14dd
fare/cl-scripting
suite.lisp
(uiop:define-package :cl-scripting/test/suite (:use :cl :uiop :hu.dwim.stefil) (:export #:cl-scripting/test)) (in-package :cl-scripting/test/suite) (defsuite (cl-scripting/test :in root-suite :documentation "cl-scripting tests"))
null
https://raw.githubusercontent.com/fare/cl-scripting/60c357e648ba5146a0a53b96fb73a3cc6ad387bd/test/suite.lisp
lisp
(uiop:define-package :cl-scripting/test/suite (:use :cl :uiop :hu.dwim.stefil) (:export #:cl-scripting/test)) (in-package :cl-scripting/test/suite) (defsuite (cl-scripting/test :in root-suite :documentation "cl-scripting tests"))
e69332eb93f565aab9d099a2439e8ce0b6b5530bec34214a2c747e8c3c364e6f
basho-labs/riak_nagios
check_connection_pools.erl
-module(check_connection_pools). -export([run/2]). %% pass check level options after "--" %% check_node file_handle_count -- --request_warning_threshold=64 run(Options, NonOptArgs) -> OptSpecList = option_spec_list(), case getopt:parse(OptSpecList, NonOptArgs) of {ok, {CmdOptions, _}} -> r...
null
https://raw.githubusercontent.com/basho-labs/riak_nagios/9cc200e8cec7d6f71f445df5a7bd195f7a772e8a/src/check_connection_pools.erl
erlang
pass check level options after "--" check_node file_handle_count -- --request_warning_threshold=64
-module(check_connection_pools). -export([run/2]). run(Options, NonOptArgs) -> OptSpecList = option_spec_list(), case getopt:parse(OptSpecList, NonOptArgs) of {ok, {CmdOptions, _}} -> run_cmd(Options, CmdOptions); {error, {Reason, Data}} -> {unknown, "~s ~p", [Reason, D...
9955fd122ede5ea6689a5fa8d904e4edb6306fe3edf779f1ef5af6bd4b7456d6
kmarekspartz/TaPL
Syntax.hs
module Language.TaPL.Arith.Syntax (Term(..), integerToTerm, isVal, isNumericVal) where import Test.QuickCheck (Arbitrary, arbitrary, sized, oneof) import Control.Monad (liftM, liftM3) import Control.Applicative ((<$>)) import Language.TaPL.ShowPretty (ShowPretty, showp) data Term = TmTrue | TmFalse ...
null
https://raw.githubusercontent.com/kmarekspartz/TaPL/2f1aebf5ed370f769709852ee27020f5cb715123/src/Language/TaPL/Arith/Syntax.hs
haskell
module Language.TaPL.Arith.Syntax (Term(..), integerToTerm, isVal, isNumericVal) where import Test.QuickCheck (Arbitrary, arbitrary, sized, oneof) import Control.Monad (liftM, liftM3) import Control.Applicative ((<$>)) import Language.TaPL.ShowPretty (ShowPretty, showp) data Term = TmTrue | TmFalse ...
e6c158ac194d0031cabd83d8abf7e7e3f44b266c0e3c6c4a1d7279ee1cdc51e2
zcaudate/hara
listener_test.clj
(ns hara.test.form.listener-test (:use hara.test) (:require [hara.test.form.listener :refer :all])) ^{:refer hara.test.form.listener/summarise-verify :added "3.0"} (comment "extract the comparison into a valid format ") ^{:refer hara.test.form.listener/summarise-evaluate :added "3.0"} (comment "extract the form i...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/test/form/listener_test.clj
clojure
(ns hara.test.form.listener-test (:use hara.test) (:require [hara.test.form.listener :refer :all])) ^{:refer hara.test.form.listener/summarise-verify :added "3.0"} (comment "extract the comparison into a valid format ") ^{:refer hara.test.form.listener/summarise-evaluate :added "3.0"} (comment "extract the form i...
15a5101d3a931c9e2dd30b78bdeb778d76fef32ae27aaf8a98edc57186f8b971
tari3x/csec-modex
one.ml
Copyright ( c ) 2009 - 2013 , , Permission to use , copy , modify , and/or 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 AUTHOR DISCLAIM...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/ocamlyices/examples/one.ml
ocaml
Copyright ( c ) 2009 - 2013 , , Permission to use , copy , modify , and/or 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 AUTHOR DISCLAIM...
eb4254a77fef8014704c1b8ad675e1a478f8dd483d822c1f98f997e9a56c1e99
diogob/pg-recorder
DatabaseSpec.hs
module DatabaseSpec (spec) where import Protolude import Data.Function (id) import qualified Hasql.Connection as H import qualified Hasql.Pool as HP import Test.Hspec import PgRecorder.Database spec :: Spec spec = describe "waitForNoti...
null
https://raw.githubusercontent.com/diogob/pg-recorder/b4fdd2952f8b0f4c66e140cadebdc2316fc03fe3/test/DatabaseSpec.hs
haskell
module DatabaseSpec (spec) where import Protolude import Data.Function (id) import qualified Hasql.Connection as H import qualified Hasql.Pool as HP import Test.Hspec import PgRecorder.Database spec :: Spec spec = describe "waitForNoti...
68385647c271de103c32bfc4d953f192902022540f20a2b28b5e68ffcc94007e
rkaippully/webgear
Main.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingVia #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE Overloade...
null
https://raw.githubusercontent.com/rkaippully/webgear/db122125c35e5853251bfd68a0e5222fafd6cd49/webgear-examples/users/Main.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE RankNTypes # ----------------------------------------...
# LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # module Main where import Control.Applicative (Alternative (..)) import Control.Arrow (Kleisli (..)) import Control.Monad (MonadPlus) import Control.Monad.Ex...
8e580bf421b50dfa311873036ba4144ea7e402f175fe837b37506a67c963b420
paurkedal/ocaml-bitpath
test_bitpath.ml
Copyright ( C ) 2012 - -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-bitpath/28ffff6fc0d211faa8776dfa12de82a34acfa847/tests/test_bitpath.ml
ocaml
Copyright ( C ) 2012 - -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...
befd1407ca22500eaec0e4980f32894336a471c01573ceff4a84290f2fc64a12
bkomuves/nanohs
Types.hs
-- | Common types and functions # LANGUAGE NoImplicitPrelude , MagicHash # {-# LANGUAGE Strict #-} # LANGUAGE FlexibleInstances , TypeSynonymInstances # {-# LANGUAGE OverloadedStrings, OverloadedLists #-} module Types where -------------------------------------------------------------------------------- import Pre...
null
https://raw.githubusercontent.com/bkomuves/nanohs/0eb3f7a14526f96e59ea9a51514a8ed3c3ce56f5/Types.hs
haskell
| Common types and functions # LANGUAGE Strict # # LANGUAGE OverloadedStrings, OverloadedLists # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ % include "Base.hs" % % include "Containers.hs" % ------...
# LANGUAGE NoImplicitPrelude , MagicHash # # LANGUAGE FlexibleInstances , TypeSynonymInstances # module Types where import Prelude ( Int , Char , Eq , Show ) import PrimGHC import Base import Containers type Name = String type Arity = Int | level type Level = Int | De Bruijn index type Idx = Int typ...
c76cd7877fb91b89920a840857b767b983d572b75880d632e665089897d198b8
orbitz/phantom_types
rstring.ml
type rstring = string let make = String.copy let compare = String.compare let concat = String.concat let sub ~s ~l str = String.sub str s l let get ~p str = String.get str p let str = String.copy
null
https://raw.githubusercontent.com/orbitz/phantom_types/12f199745f78024e67b01cc39c5aa1a23cfc18e5/rstring/rstring.ml
ocaml
type rstring = string let make = String.copy let compare = String.compare let concat = String.concat let sub ~s ~l str = String.sub str s l let get ~p str = String.get str p let str = String.copy
c026a58399ba20713035408051ced30123e28339f8cfe396c5c29e4199928702
schlepfilter/frp
drag_n_drop.cljs
(ns examples.rx.drag-n-drop (:require [aid.core :as aid] [cats.core :as m] [clojure.set :as set] [com.rpl.specter :as s] [frp.clojure.core :as core] [frp.core :as frp] [frp.window :as window])) (def initialize (partial frp/stepper (s/setval (s...
null
https://raw.githubusercontent.com/schlepfilter/frp/4a889f0aefd3aa17371fe1f0cdfabdad01fece8f/examples/src/examples/rx/drag_n_drop.cljs
clojure
(ns examples.rx.drag-n-drop (:require [aid.core :as aid] [cats.core :as m] [clojure.set :as set] [com.rpl.specter :as s] [frp.clojure.core :as core] [frp.core :as frp] [frp.window :as window])) (def initialize (partial frp/stepper (s/setval (s...
5c2762b9740f65e66d59ce663c48cbd3d759b0cc1984ca1dee0b70184e85fff2
cmsc430/www
compile.rkt
#lang racket (provide (all-defined-out)) (require "stdlib.rkt" "ast.rkt" "a86/ast.rkt" "registers.rkt" "types.rkt" "lambdas.rkt" "fv.rkt" "utils.rkt" "compile-define.rkt" "compile-expr.rkt" "compile-literals.rkt") type CEnv = ...
null
https://raw.githubusercontent.com/cmsc430/www/d5d9eedda5238b0beb2e07c6dbe106183bba2c6b/langs/outlaw/compile.rkt
racket
save non-volatile registers recv heap pointer restore non-volatile registers null arg one way to make `cons' a function instead of a primitive cons-function call init_lib hard-coded limited unimplemented Op0 Op1 Op2 Op3 pop function Lib -> Asm
#lang racket (provide (all-defined-out)) (require "stdlib.rkt" "ast.rkt" "a86/ast.rkt" "registers.rkt" "types.rkt" "lambdas.rkt" "fv.rkt" "utils.rkt" "compile-define.rkt" "compile-expr.rkt" "compile-literals.rkt") type CEnv = ...
d70c3b5b48a1b1efd921e62ade1c3cbbc83795d34991948967853b5af933c2fa
serokell/servant-util
Error.hs
-- | Errors in servant. module Servant.Util.Error ( SimpleJSON ) where import Universum import Data.Aeson (FromJSON, ToJSON, eitherDecode, encode) import Data.Reflection (Reifies (..), reflect) import Servant (JSON) import Servant.API.ContentTypes (Accept (..), MimeRender (..), MimeUnrender (..)) -- | Custom...
null
https://raw.githubusercontent.com/serokell/servant-util/3dff2de34cce90c4d1dab68e03d30f8939fd52ca/servant-util/src/Servant/Util/Error.hs
haskell
| Errors in servant. | Custom json marker which sends no human-unreadable decoding errors but a given fixed one.
module Servant.Util.Error ( SimpleJSON ) where import Universum import Data.Aeson (FromJSON, ToJSON, eitherDecode, encode) import Data.Reflection (Reifies (..), reflect) import Servant (JSON) import Servant.API.ContentTypes (Accept (..), MimeRender (..), MimeUnrender (..)) data SimpleJSON err instance Accep...
5d74314b98cc8bd35721be39684673e9a3ce0da1bad9041ba1fe099a53ffa12b
OCamlPro/numcaml
vector.ml
* Copyright ( c ) 2011 < > * * 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/OCamlPro/numcaml/5c12b3aa62b09670ba7712006b5aa0254b8bdea3/lib/numcaml/vector.ml
ocaml
* Copyright ( c ) 2011 < > * * 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...
2a9d1b506af15fab0e0141e6644a835518e742032c55707a3f8c734e9fcdb680
ocaml-multicore/multicoretests
lin_thread.mli
open Lin (** functor to build an internal module representing concurrent tests *) module Make_internal (Spec : Internal.CmdSpec [@alert "-internal"]) : sig val arb_cmds_triple : int -> int -> (Spec.cmd list * Spec.cmd list * Spec.cmd list) QCheck.arbitrary val lin_prop : (Spec.cmd list * Spec.cmd list * Spec.cmd l...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/2491d697d81370289b18f7aad0975a510a7bf0e8/lib/lin_thread.mli
ocaml
* functor to build an internal module representing concurrent tests * functor to build a module for concurrent testing * [lin_test ~count:c ~name:n] builds a concurrent test with the name [n] that iterates [c] times. The test fails if one of the generated programs is not sequentially consistent. In that c...
open Lin module Make_internal (Spec : Internal.CmdSpec [@alert "-internal"]) : sig val arb_cmds_triple : int -> int -> (Spec.cmd list * Spec.cmd list * Spec.cmd list) QCheck.arbitrary val lin_prop : (Spec.cmd list * Spec.cmd list * Spec.cmd list) -> bool val lin_test : count:int -> name:string -> QCheck.Test.t ...
b0f5986a60a467149c999b9e5959f1e6aa9a23e963b43befd4ace1464660dcd1
matijapretnar/millet
loader.ml
open Utils module Ast = Language.Ast module Loader (Backend : Backend.S) = struct type state = { desugarer : Desugarer.state; backend : Backend.load_state; typechecker : Typechecker.state; } let load_primitive state prim = let x = Ast.Variable.fresh (Language.Primitives.primitive_name prim) in ...
null
https://raw.githubusercontent.com/matijapretnar/millet/6d451ad010e602b653116a0bd77a6fb28c2052f9/src/06-user-interface/core/loader.ml
ocaml
* The module Stdlib_mlt is automatically generated from stdlib.mlt. Check the dune file for details.
open Utils module Ast = Language.Ast module Loader (Backend : Backend.S) = struct type state = { desugarer : Desugarer.state; backend : Backend.load_state; typechecker : Typechecker.state; } let load_primitive state prim = let x = Ast.Variable.fresh (Language.Primitives.primitive_name prim) in ...
7addd3f50750da257a3876cfe9e7f4bc42f0dd0e4dd4ad5eafc10a80fd4d0054
YoshikuniJujo/test_haskell
Object.hs
# LANGUAGE ImportQualifiedPost # # LANGUAGE BlockArguments # {-# LANGUAGE ScopedTypeVariables, TypeApplications #-} # LANGUAGE GADTs , TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes # # LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableIn...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/37eb9675bf1c0b008c7af4843713c91623c1e7f4/themes/gui/vulkan/try-my-vulkan-snd/src/Data/Kind/Object.hs
haskell
# LANGUAGE ScopedTypeVariables, TypeApplications # # LANGUAGE PatternSynonyms, ViewPatterns # # OVERLAPPABLE #
# LANGUAGE ImportQualifiedPost # # LANGUAGE BlockArguments # # LANGUAGE GADTs , TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes # # LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC...
b7fbc563e4bbc98b4ba945fb55a8e06812d7640818097700b03a4892447dac7c
mattmundell/nightshade
unixcoms.lisp
;;; Commands useful when running on a Unix box. (in-package "ED") ;;;; Region and File printing commands. #[ Printing {command:Print Region} {command:Print Buffer} {command:Print File} {evariable:Print Utility} {evariable:Print Utility Switches} ]# (defevar "Print Utility" "The Unix program the print commands ...
null
https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/ed/unixcoms.lisp
lisp
Commands useful when running on a Unix box. Region and File printing commands. PRINT-SOMETHING calls RUN-PROGRAM on the utility-name and args. Output and error output are done to the echo area, and errors are ignored for now. Run-program-keys are other keywords to pass to RUN-PROGRAM in addition to :wait, :outp...
(in-package "ED") #[ Printing {command:Print Region} {command:Print Buffer} {command:Print File} {evariable:Print Utility} {evariable:Print Utility Switches} ]# (defevar "Print Utility" "The Unix program the print commands use to send files to the printer. The program should act like lpr: if a filename is g...
9520b86229e5ed4f8c10fff2231108c2560e8244531387e3d2aba82d0f1361a9
gklijs/bkes-demo
views.cljs
(ns nl.openweb.bank.views (:require [re-frame.core :as re-frame] [nl.openweb.bank.subs :as subs] [nl.openweb.bank.templates :as templates])) (defn main-panel [] [:div (let [selected-nav (re-frame/subscribe [::subs/nav])] (apply templates/nav-bar @selected-nav)) ...
null
https://raw.githubusercontent.com/gklijs/bkes-demo/43d78683b41c2c8a1d06ab9fe4e6bea0c67cf16b/frontend/src/cljs/nl/openweb/bank/views.cljs
clojure
(ns nl.openweb.bank.views (:require [re-frame.core :as re-frame] [nl.openweb.bank.subs :as subs] [nl.openweb.bank.templates :as templates])) (defn main-panel [] [:div (let [selected-nav (re-frame/subscribe [::subs/nav])] (apply templates/nav-bar @selected-nav)) ...
e3c2fb9cfe1b71e9ab9ce24420f6478ddfbaecfba86cfddf2bcb535dee69f3ee
chrovis/cljam
writer.clj
(ns cljam.io.dict.writer "Makes a sequence dictionary from FASTA data, and writes it to a file." (:require [digest] [cljam.io.sam.common :refer [sam-version]] [cljam.util :refer [string->bytes graph?]]) (:import java.io.BufferedWriter)) DICTWriter ;; ---------- (deftype DICTWriter [^ja...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/io/dict/writer.clj
clojure
---------- Making dict ----------- Writing -------
(ns cljam.io.dict.writer "Makes a sequence dictionary from FASTA data, and writes it to a file." (:require [digest] [cljam.io.sam.common :refer [sam-version]] [cljam.util :refer [string->bytes graph?]]) (:import java.io.BufferedWriter)) DICTWriter (deftype DICTWriter [^java.io.Buffered...
f60fb5f66d42c961a7ef9b6adbbf724d9deebce7cf40cbc293da1ec194821652
coccinelle/herodotos
expertise.ml
open Helper let get_expertise vlist idx name = if name = "Linus Torvalds" && idx=0 then Ignore initial import to git done by . None else try let (contact, since, until, totaltimespan, dates, duration, abspct, reldays) = Git.author_info vlist idx name in let sum = Git.count_patches nam...
null
https://raw.githubusercontent.com/coccinelle/herodotos/5da230a18962ca445ed2368bc21abe0a8402e00f/herodotos/graph/expertise.ml
ocaml
open Helper let get_expertise vlist idx name = if name = "Linus Torvalds" && idx=0 then Ignore initial import to git done by . None else try let (contact, since, until, totaltimespan, dates, duration, abspct, reldays) = Git.author_info vlist idx name in let sum = Git.count_patches nam...
357b714dd6e310a28b4d87ddd5e5366795f9cc7af855d4a454f3a425862efa2d
racketscript/racketscript
accessor.rkt
#lang racket/base (struct posn (x y)) (struct circle (center radius)) (define a (posn 1 2)) (define b (posn 3 8)) (equal? (posn-x a) 1) (equal? (posn-y a) 2) (equal? (posn-x b) 3) (equal? (posn-y b) 8)
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/struct/accessor.rkt
racket
#lang racket/base (struct posn (x y)) (struct circle (center radius)) (define a (posn 1 2)) (define b (posn 3 8)) (equal? (posn-x a) 1) (equal? (posn-y a) 2) (equal? (posn-x b) 3) (equal? (posn-y b) 8)
cd1ca58702e04f0ea2d760ce1b5983559d4173198ce6a8d0fdbe2611c5e7659c
Carnap/Carnap
Hilbert.hs
# LANGUAGE FlexibleContexts # module Carnap.Calculi.NaturalDeduction.Parser.Hilbert (toProofTreeHilbert, toProofTreeHilbertImplicit, toDeductionHilbert, toDeductionHilbertImplicit) where import Data.Tree import Data.Typeable import Text.Parsec import Carnap.Core.Data.Types import Carnap.Calculi.Util import Carnap.Calc...
null
https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Calculi/NaturalDeduction/Parser/Hilbert.hs
haskell
# LANGUAGE FlexibleContexts # module Carnap.Calculi.NaturalDeduction.Parser.Hilbert (toProofTreeHilbert, toProofTreeHilbertImplicit, toDeductionHilbert, toDeductionHilbertImplicit) where import Data.Tree import Data.Typeable import Text.Parsec import Carnap.Core.Data.Types import Carnap.Calculi.Util import Carnap.Calc...
5b71ab6b83081f692c3a017580d304cd1ec7fa5e76e57092cdad3905c09d9340
roddyyaga/ocoi
specification.ml
type verb = Get | Post | Put | Delete let verb_to_string = function | Get -> "get" | Post -> "post" | Put -> "put" | Delete -> "delete" module type S_base = sig val verb : verb val path : string end module type S = sig include S_base module Parameters : sig type t end module Responses : si...
null
https://raw.githubusercontent.com/roddyyaga/ocoi/0a07e9457add9890cb507ac8bb4e55044d86a640/js_ocoi/specification.ml
ocaml
type verb = Get | Post | Put | Delete let verb_to_string = function | Get -> "get" | Post -> "post" | Put -> "put" | Delete -> "delete" module type S_base = sig val verb : verb val path : string end module type S = sig include S_base module Parameters : sig type t end module Responses : si...
6f48ebea5999e568eb3388decd1b5415b8b6e37c34039e47f49d84611e01a668
technion/erlvulnscan
netscan.erl
@doc Module that spawns threads to scan CVE-2015 - 1635 , and each thread reports results to the main thread -module(netscan). -export([netscan_runscan/1]). @headerfile " defs.hrl " -include("defs.hrl"). %% @doc Run a scan across the provided network -spec netscan_runscan(string()) -> [{inet:ip4_address(), scan_r...
null
https://raw.githubusercontent.com/technion/erlvulnscan/8d109c49c8ecf331a4a859296e9fafd57aa458cd/src/netscan.erl
erlang
@doc Run a scan across the provided network @doc Collects replies from threads with results of scan. @doc Spawns a thread and receives a message with the address to scan
@doc Module that spawns threads to scan CVE-2015 - 1635 , and each thread reports results to the main thread -module(netscan). -export([netscan_runscan/1]). @headerfile " defs.hrl " -include("defs.hrl"). -spec netscan_runscan(string()) -> [{inet:ip4_address(), scan_result()}]. netscan_runscan(Network) -> nets...
dd8dcf85ca183e3ab75d22a04892c866a8b8099e611cd60bb9a7c31895e48e39
kuberlog/daemon-clj
core.clj
(ns daemon.core (require [daemon.face.core :as face] [daemon.voice.core :as voice] [daemon.brochas-area.core :as brochas-area] [daemon.prefrontal-cortex.core :as prefrontal-cortex] [clj-time.core :as t] [clj-time.coerce :as c] [overtone.at-at :as at-at...
null
https://raw.githubusercontent.com/kuberlog/daemon-clj/904699d005ea2df3d86426d8aa1d3b030178e683/src/daemon/core.clj
clojure
(ns daemon.core (require [daemon.face.core :as face] [daemon.voice.core :as voice] [daemon.brochas-area.core :as brochas-area] [daemon.prefrontal-cortex.core :as prefrontal-cortex] [clj-time.core :as t] [clj-time.coerce :as c] [overtone.at-at :as at-at...
b4f007d563e029a21f396114dbfb9332d9b0d4c53f062701f52006882d2b0ad1
vii/teepeedee2
channel.lisp
(in-package #:tpd2.webapp) (defvar *channels* (make-hash-table :test 'equalp)) (defmyclass channel (id (random-web-sparse-key 10)) (state 0) (subscribers nil)) (my-defun channel 'initialize-instance :after (&key) (setf (gethash (my id) *channels*) me)) (my-defun channel notify () (let ((subscribers (my su...
null
https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/webapp/channel.lisp
lisp
(in-package #:tpd2.webapp) (defvar *channels* (make-hash-table :test 'equalp)) (defmyclass channel (id (random-web-sparse-key 10)) (state 0) (subscribers nil)) (my-defun channel 'initialize-instance :after (&key) (setf (gethash (my id) *channels*) me)) (my-defun channel notify () (let ((subscribers (my su...
0d77f53de992e9a574c182310ec4427c1644ceddda6b38a9c59409601052e53b
falsetru/htdp
41.2.20.scm
#lang racket (define (histogram grades) (local ((define (histogram-ac grades counts) (cond [(empty? grades) counts] [else (begin (vector-set! counts (first grades) (add1 (ve...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/41/41.2.20.scm
scheme
#lang racket (define (histogram grades) (local ((define (histogram-ac grades counts) (cond [(empty? grades) counts] [else (begin (vector-set! counts (first grades) (add1 (ve...
6e728eca72417dc2b60f0ce12d73647a3e01355a1c2e2ccef41aebe39df172c7
effectfully/tiny-lang
Generator.hs
# LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # | NOTE : comparisons . We 're now allowing comparisons of field elements with the operators < , < = , > = , and > . We 're only supposed to compare things which have " integer " values , and then the comparison is on the corres...
null
https://raw.githubusercontent.com/effectfully/tiny-lang/3dbb730d3595a76f087a33da3b353783ff2a27e9/field/TinyLang/Field/Generator.hs
haskell
@MonadSupply m@ are satisfied for it, so that we can generate fresh variables. The final @Arbitrary@ instances call @runSupplyGenT@ to get booleans and field elements, and boolean var names have to start with '?' for the benefit of the parser. TODO: move me somewhere else. | A heterogeneous list of variables. | ...
# LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # | NOTE : comparisons . We 're now allowing comparisons of field elements with the operators < , < = , > = , and > . We 're only supposed to compare things which have " integer " values , and then the comparison is on the corres...
ce4c1818914520f95a139650e67ce3d9a1d2b77350c1d0fc791f8167ae418386
fission-codes/fission
Redirect.hs
module Fission.Web.Server.Redirect (redirect) where import Servant import Fission.Prelude Servant treats all non-200s as " errors " so we redirect by " throwing " a 301 redirect :: MonadThrow m => ByteString -> m NoContent redirect location = throwM err301 { errHeaders = [("Location", location)...
null
https://raw.githubusercontent.com/fission-codes/fission/7e69c0da210a77412c96631f5ff7ef1b38240d37/fission-web-server/library/Fission/Web/Server/Redirect.hs
haskell
module Fission.Web.Server.Redirect (redirect) where import Servant import Fission.Prelude Servant treats all non-200s as " errors " so we redirect by " throwing " a 301 redirect :: MonadThrow m => ByteString -> m NoContent redirect location = throwM err301 { errHeaders = [("Location", location)...
e0533320695261d459562852ea67ff8f509c9a42fcc7942415d32be44bcbd088
thheller/shadow-experiments
foo.clj
(ns dummy.services.foo) (defn start [deps] ::foo) (defn stop [instance])
null
https://raw.githubusercontent.com/thheller/shadow-experiments/a2170c2214778b6b9a9253166383396d64d395a4/src/dev/dummy/services/foo.clj
clojure
(ns dummy.services.foo) (defn start [deps] ::foo) (defn stop [instance])
d88c00bc49864b39087e1035cc25c424e62911f7843519138180bdcf087adf73
votinginfoproject/data-processor
db_test.clj
(ns vip.data-processor.validation.db-test (:require [vip.data-processor.validation.db :refer :all] [vip.data-processor.test-helpers :refer :all] [clojure.test :refer :all] [vip.data-processor.validation.csv :as csv] [vip.data-processor.validation.data-spec :as data-spec...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/db_test.clj
clojure
(ns vip.data-processor.validation.db-test (:require [vip.data-processor.validation.db :refer :all] [vip.data-processor.test-helpers :refer :all] [clojure.test :refer :all] [vip.data-processor.validation.csv :as csv] [vip.data-processor.validation.data-spec :as data-spec...
d7fa5f262bafdb8791bdb4ebd7606435c3307a98393a8de74d8d6a5950e24cf9
janestreet/hardcaml
design_rule_checks.ml
open Base let verify_clock_pins ~expected_clock_pins (t : Circuit.t) = let rec transitively_resolve (signal : Signal.t) = match signal with | Empty -> assert false | Wire { signal_id; driver } -> (match !driver with | Empty -> signal_id | otherwise -> transitively_resolve otherwise) ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/design_rule_checks.ml
ocaml
open Base let verify_clock_pins ~expected_clock_pins (t : Circuit.t) = let rec transitively_resolve (signal : Signal.t) = match signal with | Empty -> assert false | Wire { signal_id; driver } -> (match !driver with | Empty -> signal_id | otherwise -> transitively_resolve otherwise) ...
d51ff3f306cb76d7e9aabf1b80f12111184baf2c0d4c07a96bff0a3c0e4d62fe
cirodrig/triolet
RuntimeLayout.hs
{- This experimental code is obsolete, and should be deleted after its replacement is finished. -} module SystemF.Datatypes.RuntimeLayout where import Control.Monad import qualified Data.IntMap as IntMap import Debug.Trace import Text.PrettyPrint.HughesPJ import Common.Error import Common.Identifier import Common...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/SystemF/Datatypes/RuntimeLayout.hs
haskell
This experimental code is obsolete, and should be deleted after its replacement is finished. ----------------------------------------------------------------------------- | Tag for computing a 'copy' method | Tag for computing size and alignment | Tag for computing a 'Repr' object | Values used in computing an...
module SystemF.Datatypes.RuntimeLayout where import Control.Monad import qualified Data.IntMap as IntMap import Debug.Trace import Text.PrettyPrint.HughesPJ import Common.Error import Common.Identifier import Common.Label import Builtins.Builtins import SystemF.Build import SystemF.Syntax import SystemF.MemoryIR imp...
1afe1b7c947c140b6ec4e1373d1a66630b2d812d5b2059d288e042ed57090c87
DavidAlphaFox/RabbitMQ
rabbit_tracing_wm_file.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-tracing/src/rabbit_tracing_wm_file.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. --------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , In...
8f97327995716f7b022b3570a120dbc1be393d36a46a9f9badde53a6959b2f4f
nojb/ocaml-imap
parser.ml
The MIT License ( MIT ) Copyright ( c ) 2015 - 2018 < > 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 limitation the rig...
null
https://raw.githubusercontent.com/nojb/ocaml-imap/6e06e159597c3c1ea231edfe5ede53b28ae0c0ba/lib/parser.ml
ocaml
type 'a t = buffer -> ('a, string * int) result quoted = DQUOTE *QUOTED-CHAR DQUOTE QUOTED-CHAR = <any TEXT-CHAR except quoted-specials> / '\\' quoted-specials ASTRING-CHAR = ATOM-CHAR / resp-specials astring = 1*ASTRING-CHAR / string nil =...
The MIT License ( MIT ) Copyright ( c ) 2015 - 2018 < > 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 limitation the rig...
2c2099b8a0144a9ba2f303ddb0231d323d1ea912c7a5a3f202f67745e7a4d058
clojure-interop/java-jdk
DefaultMetalTheme.clj
(ns javax.swing.plaf.metal.DefaultMetalTheme "A concrete implementation of MetalTheme providing the original look of the Java Look and Feel, code-named \"Steel\". Refer to MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme) for details on changing the default theme. All colors returned by Def...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/metal/DefaultMetalTheme.clj
clojure
(ns javax.swing.plaf.metal.DefaultMetalTheme "A concrete implementation of MetalTheme providing the original look of the Java Look and Feel, code-named \"Steel\". Refer to MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme) for details on changing the default theme. All colors returned by Def...
332bc56fc6286b7befc10cd2541699361e5b58100416200bc1ebb2f4282a78ff
mzp/coq-ruby
hiddentac.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/tactics/hiddentac.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i Tactics for the interpreter. Th...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : hiddentac.mli 12...
1dd5c954025afe1ed2d3488698fd8add13fe9e192ef34eb17cbda8d54326ced3
liebke/avout
mongo.clj
(ns avout.atoms.mongo (:use avout.state) (:require [avout.atoms :as atoms] [somnium.congomongo :as mongo])) (deftype MongoStateContainer [conn name] StateContainer (initStateContainer [this] (mongo/with-mongo conn (or (mongo/fetch-one :atoms :where {:name name}) (mongo/insert!...
null
https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/plugins/avout-mongo/src/avout/atoms/mongo.clj
clojure
(ns avout.atoms.mongo (:use avout.state) (:require [avout.atoms :as atoms] [somnium.congomongo :as mongo])) (deftype MongoStateContainer [conn name] StateContainer (initStateContainer [this] (mongo/with-mongo conn (or (mongo/fetch-one :atoms :where {:name name}) (mongo/insert!...
8f4cfe2ee18ab9cc78f5660d249f39c48a0d81d53c0fd274b83a020b378d4851
MarcusPlieninger/HtDP_2e_solutions
HtDP_2e_Exercise_043.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_43) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati...
null
https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_043.rkt
racket
about the language level of this file in a form that our tools can easily process. interpretation the number of clock ticks since the animation started Like the original data definition, this one also equates the states of the world with the class of numbers. Its interpretation, however, explains that the number me...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_43) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Exercise 43 . Let ’s work through the same problem...
12ee3a49b4289378467e73515b457f4ea410ec903e185dd0d42f595a884fbaf6
BinaryAnalysisPlatform/bap
powerpc_load.ml
open Powerpc.Std * Fixed - point Load Byte / Halfword / Word and Zero Pages 48 - 54 of IBM Power ISATM Version 3.0 B examples : 89 3c 00 14 - lbz r9 , 20(r28 ) 89 20 00 14 - lbz r9 , 20(0 ) a1 3c 00 14 - lhz r9 , 20(r28 ) 83 eb ff fc - lwz r31 , -4(r11 ) Pages 48-54 of IBM Power...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/97fb7fa6a8a90faeae2b077d8ad59b8b882d7c32/plugins/powerpc/powerpc_load.ml
ocaml
open Powerpc.Std * Fixed - point Load Byte / Halfword / Word and Zero Pages 48 - 54 of IBM Power ISATM Version 3.0 B examples : 89 3c 00 14 - lbz r9 , 20(r28 ) 89 20 00 14 - lbz r9 , 20(0 ) a1 3c 00 14 - lhz r9 , 20(r28 ) 83 eb ff fc - lwz r31 , -4(r11 ) Pages 48-54 of IBM Power...
b7498d01f24507906927ff8c36bee1e8781169f4caac40b1d92d6aaa595ffadb
input-output-hk/plutus
Panic.hs
module Panic where
null
https://raw.githubusercontent.com/input-output-hk/plutus/edc6d4672c41de4485444122ff843bc86ff421a0/stubs/plutus-ghc-stub/src/Panic.hs
haskell
module Panic where
767f8823573281b362085e03b23b89195868f10ca65714a06e0cc674dd49e372
ejgallego/dualquery
exp.mli
Copyright ( c ) 2013 - 2014 , The Trustees of the University of Pennsylvania All rights reserved . LICENSE : 3 - clause BSD style . See the LICENSE file for details on licensing . All rights reserved. LICENSE: 3-clause BSD style. See the LICENSE file for details on licensing. *) open Dq o...
null
https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/src/exp.mli
ocaml
Little helper Num of times -> exp_data, exp_params
Copyright ( c ) 2013 - 2014 , The Trustees of the University of Pennsylvania All rights reserved . LICENSE : 3 - clause BSD style . See the LICENSE file for details on licensing . All rights reserved. LICENSE: 3-clause BSD style. See the LICENSE file for details on licensing. *) open Dq o...
c47b875dcf11ac363abf617ab447cc245cc24e19c299cb4cb84bcf5604c37475
alakahakai/hackerrank
euler003.hs
Project Euler+ 003 Author : < > Date : June 17th , 2015 Project Euler+ 003 Author: Ray Qiu <> Date: June 17th, 2015 -} import Control.Monad (forM_) import Debug.Trace primes :: Integral a => [a] primes = 2 : sieve primes [3,5..] where sieve [] _ = [] sieve ...
null
https://raw.githubusercontent.com/alakahakai/hackerrank/465d17107bbe402daf750651bb57cf092305acf9/euler%2B/euler003.hs
haskell
Project Euler+ 003 Author : < > Date : June 17th , 2015 Project Euler+ 003 Author: Ray Qiu <> Date: June 17th, 2015 -} import Control.Monad (forM_) import Debug.Trace primes :: Integral a => [a] primes = 2 : sieve primes [3,5..] where sieve [] _ = [] sieve ...
1689e79718f1e45450479484bc4d52366571e078f0e6eae11ee53c6c16060dc3
anoma/juvix
Graph.hs
module Juvix.Compiler.Internal.Translation.FromAbstract.Analysis.Termination.Data.Graph ( module Juvix.Compiler.Internal.Translation.FromAbstract.Analysis.Termination.Data.Graph, ) where import Data.HashSet qualified as HashSet import Juvix.Compiler.Abstract.Extra import Juvix.Compiler.Abstract.Pretty.Base import ...
null
https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/src/Juvix/Compiler/Internal/Translation/FromAbstract/Analysis/Termination/Data/Graph.hs
haskell
module Juvix.Compiler.Internal.Translation.FromAbstract.Analysis.Termination.Data.Graph ( module Juvix.Compiler.Internal.Translation.FromAbstract.Analysis.Termination.Data.Graph, ) where import Data.HashSet qualified as HashSet import Juvix.Compiler.Abstract.Extra import Juvix.Compiler.Abstract.Pretty.Base import ...
65c5eb454300f911e6b9d2c80a41dbe3034d26bb8c28df4527004b166ec93aa5
IBM/probzelus
semi_symbolic.ml
open Owl module Semi_symbolic_impl = Semi_symbolic_impl module Distr_operations = Distr_operations type 'a expr = 'a Semi_symbolic_impl.expr type 'a distribution = 'a Semi_symbolic_impl.distribution type 'a random_var = 'a Semi_symbolic_impl.random_var let const = Semi_symbolic_impl.const let add = Semi_symbolic_imp...
null
https://raw.githubusercontent.com/IBM/probzelus/c56573201b43780b9c103e5616bb193ababa3399/probzelus/semi_symbolic/src/semi_symbolic.ml
ocaml
open Owl module Semi_symbolic_impl = Semi_symbolic_impl module Distr_operations = Distr_operations type 'a expr = 'a Semi_symbolic_impl.expr type 'a distribution = 'a Semi_symbolic_impl.distribution type 'a random_var = 'a Semi_symbolic_impl.random_var let const = Semi_symbolic_impl.const let add = Semi_symbolic_imp...
1b5012329847484a505099bd6b22e167489e2be1b9764d88a91692d5b1344dd4
zwizwa/rai
test-bresenham.rkt
#lang racket/base (require rai/ai-stream rai/tools rai/test-tools rai/stream-lib ;; rai/stream-syntax ;; "test_pd.rkt" ;; "test-lang.rkt" ) ;; Some stream functions (module dsp rai/stream (require rai/stream-lib) (provide (all-defined-out)) (define (br...
null
https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/test-bresenham.rkt
racket
rai/stream-syntax "test_pd.rkt" "test-lang.rkt" Some stream functions (t bres)
#lang racket/base (require rai/ai-stream rai/tools rai/test-tools rai/stream-lib ) (module dsp rai/stream (require rai/stream-lib) (provide (all-defined-out)) (define (bres (s c) (i m p)) (let* ((next_c (+ c 1)) (c_p (quot next_c p)) (next_s (+ s (* ...
0ffcad1d6657ec9b86aa983eb0d8b529c7a1d227d7d1123a5dce7c1340c26474
TerrorJack/ghc-alter
Classes.hs
{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Classes Copyright : ( c ) 2013 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : portable -- of the ...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Data/Functor/Classes.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | Module : Data.Functor.Classes License : BSD-style (see the file LICENSE) Maintainer : Stability : experimental Portability : portable unary and binary type constructors. These classes are needed ...
Copyright : ( c ) 2013 of the Prelude classes ' Eq ' , ' ' , ' Read ' and ' Show ' to transformers in portable . Thus for a new transformer @T@ , > instance ( Eq1 f ) = > Eq1 ( T f ) where ... > instance ( ) = > ( T f ) where ... > instance ( Show1 f ) = > Show1 ( T f ) where ... > instance...
681edc6f6d9d79ae96881e3b8eb25c28bb4735da6b6c95a47bec38490ff6d164
Soostone/hadron
FanOut.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ExistentialQuantification # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # -----------------------------------------------------------------------...
null
https://raw.githubusercontent.com/Soostone/hadron/d155ecbcdf0bb0dd442d6fc3e142bea75a312241/src/Hadron/Run/FanOut.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # --------------------------------------------------------------------------- | License : BSD3 Stability : experimental Streaming. ------------------------------------------------------------...
# LANGUAGE ExistentialQuantification # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # Module : Hadron . Run . FanOut Copyright : Soostone Inc , 2015 Maintainer : Haskell - native ability to stream output to multiple files in Hadoop module Hadron.Run.FanOut ...
69260bcf04e11e88f2ec0344fb0adecdbc190608787f958a54d70f538bc63d3d
huangz1990/real-world-haskell-cn
Prettify.hs
module Prettify where import Numeric (showHex) import Data.Bits (shiftR, (.&.)) import Data.Char (ord) data Doc = Empty | Char Char | Text String | Line | Concat Doc Doc | Union Doc Doc deriving (Show,Eq) string :: String -> Doc string = enclose '"' '"' . hcat ...
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch05/Prettify.hs
haskell
module Prettify where import Numeric (showHex) import Data.Bits (shiftR, (.&.)) import Data.Char (ord) data Doc = Empty | Char Char | Text String | Line | Concat Doc Doc | Union Doc Doc deriving (Show,Eq) string :: String -> Doc string = enclose '"' '"' . hcat ...
a9fc269dc9c36f4da568b07d980d99a98e4d7247bbab0203d229db3eb00bd7d9
b0-system/b0
b00_cache.ml
--------------------------------------------------------------------------- Copyright ( c ) 2018 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/tools/b00_cache.ml
ocaml
Command line interface Commands
--------------------------------------------------------------------------- Copyright ( c ) 2018 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
7c25b885785082368f45c40426472c78b3c2f061b8b334cff72568fb45c285a2
ten0s/syntaxerl
syntaxerl_format.erl
-module(syntaxerl_format). -author("Dmitry Klionsky <>"). -export([ format_errors/2, format_warnings/2 ]). -include("issues_spec.hrl"). %% =================================================================== %% API %% =================================================================== -spec format_errors(mod...
null
https://raw.githubusercontent.com/ten0s/syntaxerl/fc5113c68f0ce0c6ef43216e2b3483b090c6dd86/src/syntaxerl_format.erl
erlang
=================================================================== API =================================================================== =================================================================== ===================================================================
-module(syntaxerl_format). -author("Dmitry Klionsky <>"). -export([ format_errors/2, format_warnings/2 ]). -include("issues_spec.hrl"). -spec format_errors(module(), error_list()) -> [{error, integer(), string()}]. format_errors(_Handler, []) -> []; format_errors(Handler, [{_FileName, Errors} | _]) ...
a5463ccc7cc2b5ab722b2e439ba8517805245df4e1bca618ccdae4b6a70c33f1
homebaseio/homebase-react
reagent_test.cljs
(ns homebase.reagent-test {:no-doc true} (:require [homebase.test-polyfills] [reagent.core :as r] [datascript.core :as d] [homebase.reagent :as hbr] [clojure.test :refer [deftest testing is use-fixtures]] [homebase.dev.example.reagent.counter :as counter] [homebase.dev.example.reagent.todo :as ...
null
https://raw.githubusercontent.com/homebaseio/homebase-react/35cf71a996c98eebaa2933246bbf0681d5a891ce/src/test/homebase/reagent_test.cljs
clojure
Idea from -project/reagent/blob/master/test/reagenttest/utils.cljs
(ns homebase.reagent-test {:no-doc true} (:require [homebase.test-polyfills] [reagent.core :as r] [datascript.core :as d] [homebase.reagent :as hbr] [clojure.test :refer [deftest testing is use-fixtures]] [homebase.dev.example.reagent.counter :as counter] [homebase.dev.example.reagent.todo :as ...
50eb88436ba257b7e888898307a7bc05003f2ef6c8bda9b2998b629d758d768a
crisptrutski/matchbox
om.cljs
(ns matchbox-reagent.dice.om (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true] [sablono.core :as html :refer-macros [html]] [matchbox.core :as m] [matchbox.atom :as matom] [matchbox-reagent.dice.core :as dice] [matchbox-reagent.common :refer [get-ref ord...
null
https://raw.githubusercontent.com/crisptrutski/matchbox/5bb9ba96f5df01bce302a8232f6cddd9d64a1d71/examples/src/cljs/matchbox_reagent/dice/om.cljs
clojure
state actions views
(ns matchbox-reagent.dice.om (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true] [sablono.core :as html :refer-macros [html]] [matchbox.core :as m] [matchbox.atom :as matom] [matchbox-reagent.dice.core :as dice] [matchbox-reagent.common :refer [get-ref ord...
1d076721566870db0241d9179b55cd547475e772056200ae02576062ec57b1d7
mikebroberts/clojurenote
project.clj
(defproject clojurenote-demo "0.1.0" :description "Demonstration app to show usage of clojurenote" :url "" :dependencies [ [org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [environ "0.4.0"] [clojurenote "0.4.0"] ] :plugins [ [lein-ring "0.8.2"] [lein-environ "0.4.0"] ] :ring {:h...
null
https://raw.githubusercontent.com/mikebroberts/clojurenote/db1f183fcb3766b9fb219484f3d9a17bd1fa4563/clojurenote-demo/project.clj
clojure
(defproject clojurenote-demo "0.1.0" :description "Demonstration app to show usage of clojurenote" :url "" :dependencies [ [org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [environ "0.4.0"] [clojurenote "0.4.0"] ] :plugins [ [lein-ring "0.8.2"] [lein-environ "0.4.0"] ] :ring {:h...
2d01041057e53bf73ba20d1bd99627317122de6178a789b23a67cfa4fa14846c
fractalide/fractalide
frame.rkt
#lang racket/base (require fractalide/modules/rkt/rkt-fbp/agent) (require (rename-in racket/gui [send class-send]) racket/match) ; (require (rename-in racket/class [send class-send])) (define-agent #:input '("in") ; in port #:output '("out") ; out port (define acc (try-recv (input "acc"))) (define m...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/guiv2/frame.rkt
racket
(require (rename-in racket/class [send class-send])) in port out port
#lang racket/base (require fractalide/modules/rkt/rkt-fbp/agent) (require (rename-in racket/gui [send class-send]) racket/match) (define-agent (define acc (try-recv (input "acc"))) (define msg (recv (input "in"))) (unless acc (set! acc (let* ([new-es (make-eventspace)] ...
e413c98c54013d73676407dfd11f18683022313e07776107443de11a6b1f0630
camlp5/camlp5
pa_rp.ml
(* camlp5r *) (* pa_rp.ml,v *) Copyright ( c ) INRIA 2007 - 2017 (* #load "pa_extend.cmo" *) (* #load "q_MLast.cmo" *) open Asttools;; open Exparser;; open Pcaml;; Syntax extensions in Revised Syntax grammar Grammar.safe_extend (let _ = (expr : 'expr Grammar.Entry.e) and _ = (ipatt : 'ipatt Grammar.Entry.e...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/meta/pa_rp.ml
ocaml
camlp5r pa_rp.ml,v #load "pa_extend.cmo" #load "q_MLast.cmo"
Copyright ( c ) INRIA 2007 - 2017 open Asttools;; open Exparser;; open Pcaml;; Syntax extensions in Revised Syntax grammar Grammar.safe_extend (let _ = (expr : 'expr Grammar.Entry.e) and _ = (ipatt : 'ipatt Grammar.Entry.e) and _ = (ext_attributes : 'ext_attributes Grammar.Entry.e) in let grammar_ent...
46273a9e0c90890001e6ce4cd5bc32deaf3e33441f9c269e91bca87b8e97e8b7
Apress/practical-webdev-haskell
AuthSpec.hs
module Adapter.PostgreSQL.AuthSpec where import ClassyPrelude import Test.Hspec import qualified Domain.Auth.Types as D import Database.PostgreSQL.Simple import Adapter.PostgreSQL.Auth import Text.StringRandom spec :: Spec spec = beforeAll initDB $ do describe "addAuth" $ it "should return email taken if the em...
null
https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/11/test/Adapter/PostgreSQL/AuthSpec.hs
haskell
module Adapter.PostgreSQL.AuthSpec where import ClassyPrelude import Test.Hspec import qualified Domain.Auth.Types as D import Database.PostgreSQL.Simple import Adapter.PostgreSQL.Auth import Text.StringRandom spec :: Spec spec = beforeAll initDB $ do describe "addAuth" $ it "should return email taken if the em...
b3c9692d4594ac82bb2fe5ad16a0a697ecaf75ec332c14613d5a4828ba424d8c
erlang/otp
httpc_manager.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2002 - 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 applic...
null
https://raw.githubusercontent.com/erlang/otp/27cfa09417fcb692f2aab3a8aec827c22cd610ba/lib/inets/src/http_client/httpc_manager.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 Ericsson AB 2002 - 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(httpc_manager). -behaviour(gen_server). -include_lib("inets/src/http_lib/http_internal.hrl"). -include("htt...
147aa5553a5fcdd0c7bc805221eb475ab7b01742a799cbcbdbb63f9b93be6f16
zcaudate/hara
manage_test.clj
(ns hara.event.condition.manage-test (:use hara.test) (:require [hara.event.condition.manage :refer :all])) ^{:refer hara.event.condition.manage/manage-apply :added "3.0"} (fact "helper function to manage-condition") ^{:refer hara.event.condition.manage/manage-condition :added "3.0"} (fact "allows conditionals to...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/event/condition/manage_test.clj
clojure
(ns hara.event.condition.manage-test (:use hara.test) (:require [hara.event.condition.manage :refer :all])) ^{:refer hara.event.condition.manage/manage-apply :added "3.0"} (fact "helper function to manage-condition") ^{:refer hara.event.condition.manage/manage-condition :added "3.0"} (fact "allows conditionals to...
fb363f1972c549a6d3f730ed0492e210f76ad6e84e10b2d738017fa70e2f48d1
RichiH/git-annex
InodeSentinal.hs
git - annex inode sentinal file - - Copyright 2012 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012-2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} # LANGUAGE CPP # module Annex.InodeSentinal where import Annex.Common import qualifie...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/InodeSentinal.hs
haskell
Some filesystems get new inodes each time they are mounted. - In order to work on such a filesystem, a sentinal file is used to detect - when the inodes have changed. - - If the sentinal file does not exist, we have to assume that the - inodes have changed. optimisation
git - annex inode sentinal file - - Copyright 2012 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012-2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} # LANGUAGE CPP # module Annex.InodeSentinal where import Annex.Common import qualifie...
b27abd58313e4fef5413b43e29ccd4a0adf75c0d417bd8126b8a74245216e05b
ChrisPenner/void-space
Dashboard.hs
{-# LANGUAGE OverloadedStrings #-} module Display.Dashboard where import Brick import Brick.Widgets.Border import Brick.Widgets.Border.Style import Brick.Widgets.ProgressBar import Brick.Widgets.Center import Control.Lens import Types import Display.Attrs import Text.Printf import Text.Wrap import qualified Data.Text ...
null
https://raw.githubusercontent.com/ChrisPenner/void-space/0058a78334921cd3efa425c53e900e173c3e3a5f/src/Display/Dashboard.hs
haskell
# LANGUAGE OverloadedStrings #
module Display.Dashboard where import Brick import Brick.Widgets.Border import Brick.Widgets.Border.Style import Brick.Widgets.ProgressBar import Brick.Widgets.Center import Control.Lens import Types import Display.Attrs import Text.Printf import Text.Wrap import qualified Data.Text as T dashboard :: (HasHealth s, Ha...
50dd2a9ce3febf2468d561e09346dc3834f96edf3cb056ea419e30ee9c59f09b
input-output-hk/cardano-ledger
PrettyCore.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # # OPTIONS_GHC...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/ac405a977557a7c58ce1cf69d3c2a0bf148cf19f/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/PrettyCore.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # ===================================================== =================================================================== =================================================================== ========================================= =================================...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Test.Cardano.Ledger.Generic.Pret...
fcd93686e93e1794a7845f02e3d56c9808c07edea952f40417b2b939419914d8
richcarl/merl
lispc.erl
%% --------------------------------------------------------------------- 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 w...
null
https://raw.githubusercontent.com/richcarl/merl/edde1202635479075f13ca240ae85c95e591a142/examples/lispc.erl
erlang
--------------------------------------------------------------------- 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....
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may distributed under the License is distributed on an " AS IS " BASIS , @author < > 2012 @doc Lisp compiler in Erlang . -module(lispc). -export([eval/1]). -record(st, {}). -include("lisp_test.erl"). -include("../include/merl...
c76809bf1111d83961f95ee5ec7bed1934bb14a6d3cbe1a8067311e6ef9ed7e5
c-cube/ocaml-avro
main.ml
open Avro_compiler_lib let spf = Printf.sprintf let debug_ = ref false let out_file_ = ref "" let internal = ref false let compile (file:string) : unit = let schema = match Schema.parse_file file with | Ok s -> s | Error e -> Printf.printf "cannot compile '%s':\n%s" file e; exit 1 in if !debug_ then Fo...
null
https://raw.githubusercontent.com/c-cube/ocaml-avro/a37639a5fda2848495e9155700bfaf72686fd037/src/compiler/main.ml
ocaml
open Avro_compiler_lib let spf = Printf.sprintf let debug_ = ref false let out_file_ = ref "" let internal = ref false let compile (file:string) : unit = let schema = match Schema.parse_file file with | Ok s -> s | Error e -> Printf.printf "cannot compile '%s':\n%s" file e; exit 1 in if !debug_ then Fo...
f251ad9ef873d66eaebc6b0849f710984f09ec9c470b34673550fc30c3e00bfc
cognitect-labs/vase
literals.clj
(ns com.cognitect.vase.literals (:require [clojure.walk :as walk] [datomic.api :as d] [io.pedestal.http.route.definition :as definition] [io.pedestal.interceptor :as i] [com.cognitect.vase.actions :as actions] [com.cognitect.vase.util :as util])) ;; Data li...
null
https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/src/com/cognitect/vase/literals.clj
clojure
Data literals ------------- Schema literals --------------- Routing/Action literals -----------------------
(ns com.cognitect.vase.literals (:require [clojure.walk :as walk] [datomic.api :as d] [io.pedestal.http.route.definition :as definition] [io.pedestal.interceptor :as i] [com.cognitect.vase.actions :as actions] [com.cognitect.vase.util :as util])) (def acce...
207380dfb6d9f5b5b8b7a2c9da3b297feff636599370e9e407073eb2975fc5bd
finnishtransportagency/harja
lupaus_domain_test.clj
(ns harja.domain.lupaus-domain-test (:require [clojure.test :refer :all] [harja.domain.lupaus-domain :as lupaus-domain] [harja.pvm :as pvm] [clj-time.coerce :as tc])) (defn- kk->pvm [vuosi kuukausi] (pvm/suomen-aikavyohykkeessa (tc/from-string (str vuosi "-" kuukausi)))) (d...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/b8f1a2554a3665ef561c6c98ad3e4df65cc376a6/test/clj/harja/domain/lupaus_domain_test.clj
clojure
Kuluva kuukausi Tulevat kuukaudet
(ns harja.domain.lupaus-domain-test (:require [clojure.test :refer :all] [harja.domain.lupaus-domain :as lupaus-domain] [harja.pvm :as pvm] [clj-time.coerce :as tc])) (defn- kk->pvm [vuosi kuukausi] (pvm/suomen-aikavyohykkeessa (tc/from-string (str vuosi "-" kuukausi)))) (d...
d29c7d835c73e8fbf70c73585b9fe8c36b6699cac21225ac4135c668da33c50a
coq/coq
profile_ltac.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/a4c9f8adf6793f7a2c2f802cd6ef12ff435efe23/plugins/ltac/profile_ltac.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
93cdfaa2624f319fce3c39ab04c9e494039d0dedb903ada5d8964779679b511d
commercialhaskell/stack
Main.hs
import StackTest import Control.Monad (unless) main :: IO () main = do -- Disabled on Windows due to an error occurred in the integration tests regarding Unicode character . Tried to fix it ( ) -- but it didn't work unless isWindows $ stack ["build"]
null
https://raw.githubusercontent.com/commercialhaskell/stack/0839a48dddbcf6e238af66fde3cd1a2be6015fe3/test/integration/tests/4938-non-ascii-module-names/Main.hs
haskell
Disabled on Windows due to an error occurred in the integration tests but it didn't work
import StackTest import Control.Monad (unless) main :: IO () main = do regarding Unicode character . Tried to fix it ( ) unless isWindows $ stack ["build"]
91b8e04a0012972f14b18fdf4cd2c048bed518c1b688c8039dc40c8fbe19f564
wjrforcyber/SystemT
Extrinsic.hs
-- | This is the Syntax of L3. module Lang.L3.Syntax.Extrinsic where import Common.Types import Test.QuickCheck data Ty = TNat | TBool deriving (Eq, Show) data Exp = EZero | ESucc Exp | ETrue | EFalse | EAdd Exp Exp | EMul Exp Exp | EIf Exp Exp Exp deriving (Eq, Show) data Val = VSuccN Nat ...
null
https://raw.githubusercontent.com/wjrforcyber/SystemT/0b402e5a9a335e28e8a19ba0274f1b8e40c08eaf/src/Lang/L3/Syntax/Extrinsic.hs
haskell
| This is the Syntax of L3.
module Lang.L3.Syntax.Extrinsic where import Common.Types import Test.QuickCheck data Ty = TNat | TBool deriving (Eq, Show) data Exp = EZero | ESucc Exp | ETrue | EFalse | EAdd Exp Exp | EMul Exp Exp | EIf Exp Exp Exp deriving (Eq, Show) data Val = VSuccN Nat | VTrue | VFalse deriving ...
cd2ab1d2840dfd30a1c4e41ca28e4d9a1e71b404ba1fc09da18758fee102de29
Hans-Halverson/myte
driver_myte.ml
open Basic_collections open Driver_utils Top level driver for . Parsers , analyzes , generates MIR , optimizes , and then generates textual x86 assembly for all hosts . After textual x86 assembly has been generated , defers to host - specific drivers for final calls to host 's assembler and linker . te...
null
https://raw.githubusercontent.com/Hans-Halverson/myte/6f32bbb1dcc0fd63fb5bb50d3ec75192f6f1ba0e/src/driver/driver_myte.ml
ocaml
Stages of compilation Perform analysis passes Dump IR when sequence of transforms is specified Generate textual assembly for program Write textual assembly to output file
open Basic_collections open Driver_utils Top level driver for . Parsers , analyzes , generates MIR , optimizes , and then generates textual x86 assembly for all hosts . After textual x86 assembly has been generated , defers to host - specific drivers for final calls to host 's assembler and linker . te...
7d17f0bfaff7b5b7ba17db18d54df7017a47545c27b25f34261def49b3be4955
basho/riak_test
always_fail_test.erl
%% @doc A test that always returns `fail'. -module(always_fail_test). -export([confirm/0]). -spec confirm() -> pass | fail. confirm() -> fail.
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/always_fail_test.erl
erlang
@doc A test that always returns `fail'.
-module(always_fail_test). -export([confirm/0]). -spec confirm() -> pass | fail. confirm() -> fail.
77b7e79a28e258c55d5dfdb8107b372c63696feb42382efed8c3882142cacddd
JustusAdam/marvin
Script1.hs
# LANGUAGE TemplateHaskell # module Script1 ( script ) where import qualified Data.Text.Lazy as L import qualified Data.Version as V import Marvin.Adapter.Shell import Marvin.Handler import Marvin.Prelude import qualified Paths_marvin_integration as P import...
null
https://raw.githubusercontent.com/JustusAdam/marvin/c49db1f7efbd5cc0803c9802ca31bb4488472ac3/test/integration/shell/Script1.hs
haskell
# LANGUAGE TemplateHaskell # module Script1 ( script ) where import qualified Data.Text.Lazy as L import qualified Data.Version as V import Marvin.Adapter.Shell import Marvin.Handler import Marvin.Prelude import qualified Paths_marvin_integration as P import...
9a064f1a15c254aa5bc3792b4ea329676e49e9597aa7c6085c8b8a99e51592b2
ocsigen/ocsimore
wiki_services.ml
Ocsimore * * Copyright ( C ) 2005 - 2009 * Boender - * CNRS - Université Paris Diderot Paris 7 * * 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 versi...
null
https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/site/server/wiki_services.ml
ocaml
* These are all the services related to wikis */* IDs */* if there is a static page, and should we send it ? RRR: This should be generalized and exported * Register the services for the wiki [wiki] Registering the service with suffix for wikipages ~menu_style:`Pencil the same, but non attached: ~menu_st...
Ocsimore * * Copyright ( C ) 2005 - 2009 * Boender - * CNRS - Université Paris Diderot Paris 7 * * 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 versi...
e7781b71ce12cea8a177d0d0612a9691692acad6abffffb02a91fa586b693b77
beijaflor-io/haskell-libui
OSX.hs
module Graphics.LibUI.OSX ( module Graphics.LibUI.FFI.Raw.OSX , module Graphics.LibUI.FFI.Wrapped.OSX ) where import Graphics.LibUI.FFI.Raw.OSX import Graphics.LibUI.FFI.Wrapped.OSX
null
https://raw.githubusercontent.com/beijaflor-io/haskell-libui/4d1fad25e220071c4c977f79f05b482c2c36af84/src/Graphics/LibUI/OSX.hs
haskell
module Graphics.LibUI.OSX ( module Graphics.LibUI.FFI.Raw.OSX , module Graphics.LibUI.FFI.Wrapped.OSX ) where import Graphics.LibUI.FFI.Raw.OSX import Graphics.LibUI.FFI.Wrapped.OSX
fe56d0fe13dde7326dd209e323f5849d00c7d23759889cd0dca59985491a063a
erlang/otp
diameter_dist_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2019 - 2022 . 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/7f0389d65055f0a9fdc4a0ec74b64f599c25f37c/lib/diameter/test/diameter_dist_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 2019 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Tests of traffic between two Diameter nodes , the server being spread across three Erlang nodes . -module(diame...
6d28576f10662957b7deed74d8173f4bbb49d7f7692088c97dd1de999d97e18e
jellelicht/guix
databases.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2015 , 2016 < > Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/services/databases.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 < > Copyright © 2015 , 2016 < > Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu services databases) #:use-module ...
cf0bcd23e4eb11ad09131a95683f9f7faf0776c68f435cfe17f2fb31e3fd74af
pmh/funkyweb
request.clj
(ns funkyweb.helpers.request (:use ring.util.codec [clojure.string :only (join)])) (declare alter-request qs-to-map) (def *request* (ref {})) (def content-types {"json" "application/json" "xml" "text/xml" "html" "text/html"}) (defn request-get [key] (@*request* k...
null
https://raw.githubusercontent.com/pmh/funkyweb/b3731c5664c3b6a40db32a1fef18a59777d9156d/src/funkyweb/helpers/request.clj
clojure
(ns funkyweb.helpers.request (:use ring.util.codec [clojure.string :only (join)])) (declare alter-request qs-to-map) (def *request* (ref {})) (def content-types {"json" "application/json" "xml" "text/xml" "html" "text/html"}) (defn request-get [key] (@*request* k...
6fe21439bf231fdfda38dafad2cb494fc5f4bc2b4354c807e05e281959357181
erikd/exceptT-demo
Dog.hs
module Improved.Dog ( Dog (..) , DogParseError (..) , parseDog , renderDogParseError ) where import Data.ByteString.Char8 (ByteString) import Data.Text (Text, pack) -- A trivial Dog data type data Dog = Dog -- An error type. data DogParseError = DogParseErrorOne | DogParseErrorTwo deriving Show -- A...
null
https://raw.githubusercontent.com/erikd/exceptT-demo/ceadf646000bfa27c3dfea81064caa21747c6ab5/Improved/Dog.hs
haskell
A trivial Dog data type An error type. A trival parser for a Dog data type. This can't fail, but obviously a real parser could. Would not use `show` for a real error type.
module Improved.Dog ( Dog (..) , DogParseError (..) , parseDog , renderDogParseError ) where import Data.ByteString.Char8 (ByteString) import Data.Text (Text, pack) data Dog = Dog data DogParseError = DogParseErrorOne | DogParseErrorTwo deriving Show parseDog :: ByteString -> Either DogParseError Do...
b59a6bbf542bd638f51ede4c50074786fd7633e34d9f5ca61f69f34ffcf1b4ba
LLazarek/mutate
mutate-program.rkt
#lang at-exp racket/base (require racket/contract racket/stream syntax/parse) (provide (contract-out [make-program-mutator ({mutator/c} {#:select top-level-selector/c} . ->* . full-program-mu...
null
https://raw.githubusercontent.com/LLazarek/mutate/863618b4099005623c7cf0e6bbf5270672f757ee/mutate-lib/private/mutate-program.rkt
racket
Note: distinction between mutate-program and mutate-expr is necessary because mutate-program may want to descend only into certain top level forms, while mutate-expr can descend into everything (mutate-program acts like its gatekeeper) move on to the rest of the program, if necessary Ignore anything else
#lang at-exp racket/base (require racket/contract racket/stream syntax/parse) (provide (contract-out [make-program-mutator ({mutator/c} {#:select top-level-selector/c} . ->* . full-program-mu...
046362af4df0e086bf3b74679b9ba81856ed6c9da13aa91a40b5443801421d66
armon/bloomd_ring
bloomd_ring_console.erl
%% @doc Interface for riak_searchng-admin commands. -module(bloomd_ring_console). -export([join/1, leave/1, remove/1, ringready/1]). join([NodeStr]) -> try case riak_core:join(NodeStr) of ok -> io:format("Sent join request to ~s~n", [NodeStr]), ...
null
https://raw.githubusercontent.com/armon/bloomd_ring/ca51d00e2f0e1b6f12f061403df8421d7207d078/src/bloomd_ring_console.erl
erlang
@doc Interface for riak_searchng-admin commands.
-module(bloomd_ring_console). -export([join/1, leave/1, remove/1, ringready/1]). join([NodeStr]) -> try case riak_core:join(NodeStr) of ok -> io:format("Sent join request to ~s~n", [NodeStr]), ok; {error, not_reachable} -> ...
1476e4eb1e01edfd9005f9e33027339608589001da78fd4c5fa2943a0372b48e
BinaryAnalysisPlatform/bap
bap_ir_graph.ml
open Core_kernel[@@warning "-D"] open Regular.Std open Graphlib.Std open Option.Monad_infix open Bap_bil open Bap_common_types open Bap_ir module Jmp = Ir_jmp module Blk = Ir_blk module Sub = Ir_sub type 'a seq = 'a Seq.t module Pred = struct type t = Tid.Set.t Tid.Map.t [@@deriving bin_io, compare, sexp] * [ remo...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/lib/bap_types/bap_ir_graph.ml
ocaml
* extracts a successor's tid from a jump term * [control_flow_difference bx by] computes a changes in control flow produced by blocks [bx] and [by]. Only changes, that affects graph toplogy are computed, i.e., change in a condition expression, or change of the order doesn't affect the topology. If jump k...
open Core_kernel[@@warning "-D"] open Regular.Std open Graphlib.Std open Option.Monad_infix open Bap_bil open Bap_common_types open Bap_ir module Jmp = Ir_jmp module Blk = Ir_blk module Sub = Ir_sub type 'a seq = 'a Seq.t module Pred = struct type t = Tid.Set.t Tid.Map.t [@@deriving bin_io, compare, sexp] * [ remo...
9cd8a1340095aa69267a4a126ab5ee6c74446677055d2c7fea7bd7b68e04bb28
nomeata/haskell-via-sokoban
04ex-sokoban.hs
{-# LANGUAGE OverloadedStrings #-} import CodeWorld -- Lists data List a = Empty | Entry a (List a) deriving Eq infixr `Entry` mapList :: (a -> b) -> List a -> List b mapList _ Empty = Empty mapList f (Entry c cs) = Entry (f c) (mapList f cs) combine :: List Picture -> Picture combine Empty = blank combine (Entry ...
null
https://raw.githubusercontent.com/nomeata/haskell-via-sokoban/0ae9d6e120c2851eca158c01e08e2c4c7f2b06d0/code/04ex-sokoban.hs
haskell
# LANGUAGE OverloadedStrings # Lists Graph Search Coordinates The maze The state Event handling Drawing Cunning! The complete activity The general activity type Resetable activities Start screen Undoable activitys We need to remember the current state, and all past states: The main function
import CodeWorld data List a = Empty | Entry a (List a) deriving Eq infixr `Entry` mapList :: (a -> b) -> List a -> List b mapList _ Empty = Empty mapList f (Entry c cs) = Entry (f c) (mapList f cs) combine :: List Picture -> Picture combine Empty = blank combine (Entry p ps) = p & combine ps allList :: List Bool...
cf7788db327f9c284010c9a855e381eb9ce3fb66bbe9e70aab40b8e907f4e3d7
tweag/capability
Reflection.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Reflection where import Capability.Error import Capabil...
null
https://raw.githubusercontent.com/tweag/capability/65271a22ff9c173579f889dc033231f80453b185/examples/Reflection.hs
haskell
# LANGUAGE RankNTypes # -------------------------------------------------------------------- Instances -------------------------------------------------------------------- Test Cases
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Reflection where import Capability.Error import Capability.Reader import Capability...
071ece64c9bd20e2a98178b107d2990e6aefdd2265b8263876860bc8308aebcc
janestreet/universe
cutoff.mli
(** A module internal to Incremental. Users should see {!Incremental_intf}. An ['a Cutoff.t] is a function that returns [true] if propagation of changes should be cutoff at a node based on the old value and the (possible) new value of the node. *) open! Core_kernel open! Import type 'a t [@@deriving sexp_of...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/incremental/src/cutoff.mli
ocaml
* A module internal to Incremental. Users should see {!Incremental_intf}. An ['a Cutoff.t] is a function that returns [true] if propagation of changes should be cutoff at a node based on the old value and the (possible) new value of the node.
open! Core_kernel open! Import type 'a t [@@deriving sexp_of] include Invariant.S1 with type 'a t := 'a t val create : (old_value:'a -> new_value:'a -> bool) -> 'a t val of_compare : ('a -> 'a -> int) -> 'a t val of_equal : ('a -> 'a -> bool) -> 'a t val always : _ t val never : _ t val phys_equal : _ t val poly_eq...
8658e234efb72172bec07cf74e05235e96c96cd480735b0847f081c2c37a4059
herd/herdtools7
uint_test.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/tests/uint_test.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2015 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
643a1423b0a7a6808f40a9e153569f8e5f278e96c240536803f85594b26b5f4c
ocaml-sf/learn-ocaml-corpus
test.ml
open Report open Test_lib let exercise_1 = set_progress "Grading exercise 1." ; Section ([ Text "Exercise 1: " ; Code "wrap" ], test_function_1_against_solution ~gen:5 [%ty: int list-> int list list] "wrap" [] @ test_function_1_against_solution ~gen:5 [%...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week4/seq4/ex1/test.ml
ocaml
open Report open Test_lib let exercise_1 = set_progress "Grading exercise 1." ; Section ([ Text "Exercise 1: " ; Code "wrap" ], test_function_1_against_solution ~gen:5 [%ty: int list-> int list list] "wrap" [] @ test_function_1_against_solution ~gen:5 [%...
3822b5b0d920569f624848bf5483b9b58239a6963bca853b48991463bbf3acbd
irastypain/sicp-on-language-racket
test_exercise_2_37.rkt
#lang racket (require rackunit "../../src/chapter02/exercise_2_37.rkt") (check-equal? (matrix-*-vector (list (list 1 2 3) (list 4 5 6)) (list 7 8 9)) (list 50 122) (printf "test#1 2.37 passed\n")) (check-equal? (transpose (list (list 1 2 3) (list 4 5 6) (list 7 8 9))) ...
null
https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter02/test_exercise_2_37.rkt
racket
#lang racket (require rackunit "../../src/chapter02/exercise_2_37.rkt") (check-equal? (matrix-*-vector (list (list 1 2 3) (list 4 5 6)) (list 7 8 9)) (list 50 122) (printf "test#1 2.37 passed\n")) (check-equal? (transpose (list (list 1 2 3) (list 4 5 6) (list 7 8 9))) ...
b2d46bd3f35c1fd9519d5a2e3d60795c4d592f45920fd3d92fd170741dc45f71
merlin-lang/merlin
Test_Click.ml
open Merlin_FrontEnd let test_click input expected = let t = Printf.sprintf "./examples/%s/%s.dot" input input in let p = Printf.sprintf "./examples/%s/%s.mln" input input in let topo = parse_topo_file t in let ir = policy_file_to_ir p in let flows = match ir with |Some ir -> solve ir topo | None...
null
https://raw.githubusercontent.com/merlin-lang/merlin/35a88bce024a8b8be858c796f1cd718e4a660529/test/Test_Click.ml
ocaml
TODO: this test will only check that there should be the expected number click command for the input. We need something more extensible. (\* These are expected to pass *\)
open Merlin_FrontEnd let test_click input expected = let t = Printf.sprintf "./examples/%s/%s.dot" input input in let p = Printf.sprintf "./examples/%s/%s.mln" input input in let topo = parse_topo_file t in let ir = policy_file_to_ir p in let flows = match ir with |Some ir -> solve ir topo | None...
6c96beb407fd5879cf1d2b2bba55c867fb0ba6d72ef10bf39189fc474be00f5a
thheller/shadow-cljs
browser_extra.cljs
(ns demo.browser-extra (:require [demo.browser :as b])) (js/console.log "bar") (js/console.log "demo.browser-extra" ::foo ::foo) ;; (throw (ex-info "boom!" {})) (def x "i'm from browser-extra") (def y "i'm from browser-extra too")
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/browser_extra.cljs
clojure
(throw (ex-info "boom!" {}))
(ns demo.browser-extra (:require [demo.browser :as b])) (js/console.log "bar") (js/console.log "demo.browser-extra" ::foo ::foo) (def x "i'm from browser-extra") (def y "i'm from browser-extra too")
55a354dbeac61782bdd309d5a135ce410550de34009b44ff7cc252788cdd7b8e
arachne-framework/aristotle
registry_test.clj
(ns arachne.aristotle.registry-test (:require [clojure.test :refer :all] [arachne.aristotle.registry :as reg]) (:import [clojure.lang ExceptionInfo])) (reg/alias :mike "/#mike") (deftest kw-registration (is (= "/#mike" (reg/iri :mike)))) (reg/prefix 'foaf "/") (deftest direct-prefix-registration ...
null
https://raw.githubusercontent.com/arachne-framework/aristotle/86f3ace210318bd9820322da45e627cec9cfba48/test/arachne/aristotle/registry_test.clj
clojure
(ns arachne.aristotle.registry-test (:require [clojure.test :refer :all] [arachne.aristotle.registry :as reg]) (:import [clojure.lang ExceptionInfo])) (reg/alias :mike "/#mike") (deftest kw-registration (is (= "/#mike" (reg/iri :mike)))) (reg/prefix 'foaf "/") (deftest direct-prefix-registration ...
b898ccfa5904ae5b6fe8166b6404331c9711f879c6c973f9bfabd888c8db9c73
snapframework/snap-core
Tests.hs
# OPTIONS_GHC -fno - warn - warnings - deprecations # # LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Snap.Util.CORS.Tests (tests) where ------------------------------------------------------------------------------ import Data.ByteString.Char8 (ByteString) import Data.CaseIns...
null
https://raw.githubusercontent.com/snapframework/snap-core/a18d6f85751b78731c1e52733f804d0a7a9baaad/test/Snap/Util/CORS/Tests.hs
haskell
# LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------------- Constants -- ------------- ----------------...
# OPTIONS_GHC -fno - warn - warnings - deprecations # # LANGUAGE CPP # module Snap.Util.CORS.Tests (tests) where import Data.ByteString.Char8 (ByteString) import Data.CaseInsensitive (CI (..)) #if !MIN_VERSION_base(4,8,0) import Data.Functor ((<$>)) ...
931bef7b30735f5f870c5056855c253c517ed98e71e956c2a4b3eae3138ed78c
mjrusso/joy-of-clojure-examples
ch11.clj
(ns joc.ch11) Clojure has four major mutable references : ;; - Refs: synchronous coordination of multiple objects ;; - Agents: asynchronous actions ;; - Atoms: lone, synchronous objects ;; - Vars: thread-local storage All but Vars are considered shared references ( and allow for ;; changes to be seen across t...
null
https://raw.githubusercontent.com/mjrusso/joy-of-clojure-examples/d59fddbb416ff613af63d540d3f1076de0c79bc0/src/joc/ch11.clj
clojure
- Refs: synchronous coordination of multiple objects - Agents: asynchronous actions - Atoms: lone, synchronous objects - Vars: thread-local storage changes to be seen across threads of execution). Values can be accessed via the `@` reader macro, or the `deref` function (regardless of the reference type). U...
(ns joc.ch11) Clojure has four major mutable references : All but Vars are considered shared references ( and allow for (doc io!) (io! (.println System/out "Haikeeba!")) (doc dosync) (dosync (.println System/out "Haikeeba!")) ( dosync ( io ! ( .println System / out " Haikeeba ! " ) ) ) (import '(java.util....
fa1762a643110e1c5dfdbb115732d5a9da871e245ee7568855a4df6041efb143
apache/couchdb-mochiweb
mochijson2.erl
@author < > 2007 Mochi Media , Inc. %% %% 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 limitation %% the rights to use, copy, modify, merge, ...
null
https://raw.githubusercontent.com/apache/couchdb-mochiweb/53114ba91470e1b9d90e3f6fb663ff6bba43619a/src/mochijson2.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright noti...
@author < > 2007 Mochi Media , Inc. to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
344b49a4bef1476a1fb1622b4f4ab07bc88f817eba57dbe1599195fa9564dad9
joearms/sherlock
sherlock_similar.erl
-module(sherlock_similar). Copyright ( c ) 2009 Whoomph Software AB ( ) . All rights reserved . %% For license read the top level LICENSE file -export([cosine_similarity/2, cross/2, norm/1]). %%---------------------------------------------------------------------- compute the consine similarity of two vectors ...
null
https://raw.githubusercontent.com/joearms/sherlock/3bc967e1b51f8fb312686d6f95771d86f6dd6362/src/sherlock_similar.erl
erlang
For license read the top level LICENSE file ---------------------------------------------------------------------- computes the cross product .. Norm of the vector is ...
-module(sherlock_similar). Copyright ( c ) 2009 Whoomph Software AB ( ) . All rights reserved . -export([cosine_similarity/2, cross/2, norm/1]). compute the consine similarity of two vectors L1 , L2 of the form [ { Term , } ] cosine_similarity([], _) -> 0; cosine_similarity(_, []) -> 0; cosine_similarity(...
f6cf8848981704188db9cd898a5daf4262ae0f3e980409a87db0538a97c43a97
flybot-sg/lasagna-pull
option_test.cljc
(ns sg.flybot.pullable.core.option-test (:require [sg.flybot.pullable.core.option :as sut] [sg.flybot.pullable.util :refer [error?]] [clojure.test :refer [deftest is]]) #?(:clj (:import [clojure.lang ExceptionInfo]))) (deftest apply-post-seq (is (thrown? ExceptionInfo (sut/apply-post #:pr...
null
https://raw.githubusercontent.com/flybot-sg/lasagna-pull/4256f807a005df6e918d892aaf474e125f81dcdb/test/sg/flybot/pullable/core/option_test.cljc
clojure
(ns sg.flybot.pullable.core.option-test (:require [sg.flybot.pullable.core.option :as sut] [sg.flybot.pullable.util :refer [error?]] [clojure.test :refer [deftest is]]) #?(:clj (:import [clojure.lang ExceptionInfo]))) (deftest apply-post-seq (is (thrown? ExceptionInfo (sut/apply-post #:pr...
35acde318cd20434587a98b5128b586d6886ea23f46ebf34f0ca7aa7df0be091
mysql-otp/mysql-otp
ssl_tests.erl
MySQL / OTP – MySQL client library for Erlang / OTP Copyright ( C ) 2017 Copyright ( C ) 2017 - 2018 %% %% This file is part of MySQL/OTP. %% MySQL / OTP 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 Softwar...
null
https://raw.githubusercontent.com/mysql-otp/mysql-otp/552dce4a2512db9e4bfc45ab50de2e3b9a094ca0/test/ssl_tests.erl
erlang
This file is part of MySQL/OTP. the terms of the GNU Lesser General Public License as published by the Free any later version. This program is distributed in the hope that it will be useful, but WITHOUT FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with this pro...
MySQL / OTP – MySQL client library for Erlang / OTP Copyright ( C ) 2017 Copyright ( C ) 2017 - 2018 MySQL / OTP is free software : you can redistribute it and/or modify it under Software Foundation , either version 3 of the License , or ( at your option ) ANY WARRANTY ; without even the implied warrant...
94e035028a9c6e92dce8a8bea94f133b469bc730cdfdd1bd1f307a8b529d81a9
OCamlPro/ocp-reveal
example.ml
open Ocp_reveal.Html open Ocp_reveal.Slides let slide_0 = frame { default with title = title5 "Make your presentation with OCaml"; content = {| You can write your presentation in OCaml thant to `ocp-reveal`: ```ocaml let my_slide = frame { defaut with title = title3 "Some title"; content = "Some du...
null
https://raw.githubusercontent.com/OCamlPro/ocp-reveal/338de73186803e6f14c780ff9dfb72a81f061f77/examples/example.ml
ocaml
open Ocp_reveal.Html open Ocp_reveal.Slides let slide_0 = frame { default with title = title5 "Make your presentation with OCaml"; content = {| You can write your presentation in OCaml thant to `ocp-reveal`: ```ocaml let my_slide = frame { defaut with title = title3 "Some title"; content = "Some du...