_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
1899db247a0f29e5a7a06decc67127714fe90d669ca5df0ae63be8b5b311b86b
typelead/eta
T9951.hs
# LANGUAGE OverloadedLists # # OPTIONS_GHC -fwarn - incomplete - patterns -fwarn - overlapping - patterns # module T9951 where f :: [a] -> () f x = case x of [] -> () (_:_) -> ()
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/pmcheck/compile/T9951.hs
haskell
# LANGUAGE OverloadedLists # # OPTIONS_GHC -fwarn - incomplete - patterns -fwarn - overlapping - patterns # module T9951 where f :: [a] -> () f x = case x of [] -> () (_:_) -> ()
997154dd15d9aeeeb5f6f19fbb7c134cebf9774773f543d0a93330c5ad8239a4
skanev/playground
21.scm
SICP exercise 1.21 ; ; Use the smallest-divisor procedure to find the smallest divisor of each of the following numbers : 199 , 1999 , 19999 . (define (smallest-divisor n) (find-divisor n 2)) (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) test-di...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/01/21.scm
scheme
Use the smallest-divisor procedure to find the smallest divisor of each of
SICP exercise 1.21 the following numbers : 199 , 1999 , 19999 . (define (smallest-divisor n) (find-divisor n 2)) (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) test-divisor) (else (find-divisor n (+ test-divisor 1))))) (define (square a)...
f8f49026d21429ff171945e476a72af540069a4e43eaf0e5144497aa9b2a5dda
patrickgombert/erlang-koans
about_gen_fsms.erl
-module(about_gen_fsms). -behaviour(gen_fsm). -export([initial_state_is_set_in_init/0, some_actions_will_not_trigger_a_state_change/0, while_others_will_trigger_a_state_change/0, go_ahead_and_grab_a_soda/0 ]). -export([init/1, not_paid/3, paid/3, handle_ev...
null
https://raw.githubusercontent.com/patrickgombert/erlang-koans/d80032d99b6ee3537e585ea02b743fe681fad8cf/src/about_gen_fsms.erl
erlang
-module(about_gen_fsms). -behaviour(gen_fsm). -export([initial_state_is_set_in_init/0, some_actions_will_not_trigger_a_state_change/0, while_others_will_trigger_a_state_change/0, go_ahead_and_grab_a_soda/0 ]). -export([init/1, not_paid/3, paid/3, handle_ev...
10397878ecef1d434a23f1050f63bfe116b30478133c1017bd008a35d49cfa53
awalterschulze/the-little-typer-exercises
chapter8-1-zero-plus-n.rkt
#lang pie Define a function called zero+n = n that states and proves that 0+n = n for all (claim + (-> Nat Nat Nat)) (define + (lambda (a b) (rec-Nat a b (lambda (_ b+a-1) (add1 b+a-1))))) (claim zero+n=n (Pi ((n Nat)) (= Nat (+ 0 n) n))) (define zero+n=n (lambda (n) (sa...
null
https://raw.githubusercontent.com/awalterschulze/the-little-typer-exercises/91cad6c6d5c1733562aa952d8ca515addb2b301d/chapter8-1-zero-plus-n.rkt
racket
#lang pie Define a function called zero+n = n that states and proves that 0+n = n for all (claim + (-> Nat Nat Nat)) (define + (lambda (a b) (rec-Nat a b (lambda (_ b+a-1) (add1 b+a-1))))) (claim zero+n=n (Pi ((n Nat)) (= Nat (+ 0 n) n))) (define zero+n=n (lambda (n) (sa...
786ad2b2188dd46084f3c6be5ac4a485d8ce425e533085a014fe6727c48f71d9
jdormit/sicp-logic
db.clj
(ns sicp-logic.db) (defprotocol FactDB "The FactDB protocol specifies methods to store and retrieve assertions (facts) and rules." (fetch-assertions [db query frame] "Fetches assertions that may match the given query and frame.") (add-assertion [db assertion] "Stores an assertion (a fact) in the datab...
null
https://raw.githubusercontent.com/jdormit/sicp-logic/56ae0fc344d3fce943dcc740a64d3eebc82062d1/src/sicp_logic/db.clj
clojure
(ns sicp-logic.db) (defprotocol FactDB "The FactDB protocol specifies methods to store and retrieve assertions (facts) and rules." (fetch-assertions [db query frame] "Fetches assertions that may match the given query and frame.") (add-assertion [db assertion] "Stores an assertion (a fact) in the datab...
c08741af70089c0420639a5149df6504e0fa309fa7793f7ef25442d580120303
evilbinary/scheme-lib
dirs.scm
" dirs.scm " Directories . Copyright 1998 , 2002 ; ;Permission to copy this software, to modify it, to redistribute it, ;to distribute modified versions, and to use it for any purpose is ;granted, subject to the following restrictions and understandings. ; 1 . Any copy made of this software must include this co...
null
https://raw.githubusercontent.com/evilbinary/scheme-lib/6df491c1f616929caa4e6569fa44e04df7a356a7/packages/slib/dirs.scm
scheme
Permission to copy this software, to modify it, to redistribute it, to distribute modified versions, and to use it for any purpose is granted, subject to the following restrictions and understandings. in full. this software will be error-free, and I am under no obligation to provide any services, by way of maintenan...
" dirs.scm " Directories . Copyright 1998 , 2002 1 . Any copy made of this software must include this copyright notice 2 . I have made no warranty or representation that the operation of 3 . In conjunction with products arising from the use of this (require 'filename) (require 'line-i/o) (require 'system) ...
f323bf835ed57942f9f5e4aca03e30ae66509146a645cd093044e48a22c27c66
schibsted/spid-tech-docs
config.clj
(ns spid-docs.config (:require [clojure.java.io :as io] [spid-docs.load :refer [load-edn]])) (defn config-exists? [] (io/resource "config.edn")) (def get-config (memoize #(load-edn "config.edn")))
null
https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/config.clj
clojure
(ns spid-docs.config (:require [clojure.java.io :as io] [spid-docs.load :refer [load-edn]])) (defn config-exists? [] (io/resource "config.edn")) (def get-config (memoize #(load-edn "config.edn")))
f581d39cd1278565bf825f2b4f405f350703f1fdf5be7b86fb4c7adf69534c1a
huangjs/cl
calendar.lisp
(in-package :cl-user) (defpackage :hjs.util.time (:use :cl :hjs.meta.macro :split-sequence :date) (:export #:translate-japanese-year #:parse-kanji-date #:year #:month #:day #:hour #:minute #:sec #:time-string #:date-string #:weekday)) (in-package :hjs.util.time) (defnewcon...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/mylib/calendar.lisp
lisp
FIXME: it's a hack fixme: not complete, just a hack...
(in-package :cl-user) (defpackage :hjs.util.time (:use :cl :hjs.meta.macro :split-sequence :date) (:export #:translate-japanese-year #:parse-kanji-date #:year #:month #:day #:hour #:minute #:sec #:time-string #:date-string #:weekday)) (in-package :hjs.util.time) (defnewcon...
f92fbc3f2b46620a1056980a2e9c358a87a6be4712e8c60642fa59444d28e224
manuel-serrano/bigloo
cfa2.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / recette / cfa2.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/cfa2.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / recette / cfa2.scm * / * Author : * / * Creation : Tue Apr 29 10:03:37 1997 * / * Last change : Tue Apr 29 10:06:39 1997 ( serrano ) * / * A modu...
67bada7ade7d02d28f04d87402b67e8018a1b09991f99313fe4197876f2c1377
deadpendency/deadpendency
IsRepoNotFoundRuleSpec.hs
module Effect.AssessDependencies.Backend.Rules.IsRepoNotFoundRuleSpec (spec) where import Common.Model.Assessment.DependencyAssessmentFailure import Common.Model.Assessment.DependencyAssessmentViolation import Common.Model.Assessment.DependencyAssessmentWarning import Common.Model.Git.Repo import Common.Model.Git.Repo...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/report-generator/test/Effect/AssessDependencies/Backend/Rules/IsRepoNotFoundRuleSpec.hs
haskell
module Effect.AssessDependencies.Backend.Rules.IsRepoNotFoundRuleSpec (spec) where import Common.Model.Assessment.DependencyAssessmentFailure import Common.Model.Assessment.DependencyAssessmentViolation import Common.Model.Assessment.DependencyAssessmentWarning import Common.Model.Git.Repo import Common.Model.Git.Repo...
41d94bffe946ecdadccd729fe1298995f0118b3db367760a4075bdfe412106d5
erdos/stencil
tree_postprocess.clj
(ns stencil.tree-postprocess "Postprocessing an xml tree" (:require [stencil.postprocess.table :refer :all] [stencil.postprocess.whitespaces :refer :all] [stencil.postprocess.ignored-tag :refer :all] [stencil.postprocess.images :refer :all] [stencil.postprocess.list-r...
null
https://raw.githubusercontent.com/erdos/stencil/cd5d4f510e8f423b6bff7968ec7def3d138c390f/src/stencil/tree_postprocess.clj
clojure
calls postprocess hides rows/columns where markers are present fixes xml:space attribute values where missing includes html() call results. call this first. includes fragments and evaluates them too.
(ns stencil.tree-postprocess "Postprocessing an xml tree" (:require [stencil.postprocess.table :refer :all] [stencil.postprocess.whitespaces :refer :all] [stencil.postprocess.ignored-tag :refer :all] [stencil.postprocess.images :refer :all] [stencil.postprocess.list-r...
2d42a7d053d873af2c465e979720b075fd798453dd7eccd34b81e17ac89688c5
jacobobryant/platypub
platypub.clj
(ns com.platypub (:require [com.biffweb :as biff] [com.platypub.feat.auth :as auth] [com.platypub.feat.home :as home] [com.platypub.feat.lists :as lists] [com.platypub.feat.items :as items] [com.platypub.feat.sites :as sites] [com.platypub.schema...
null
https://raw.githubusercontent.com/jacobobryant/platypub/71799b1b8f4e8fd1f93d7ce94b6ca952aa9709fa/src/com/platypub.clj
clojure
Uncomment this if we add any real tests. for backwards compatibility
(ns com.platypub (:require [com.biffweb :as biff] [com.platypub.feat.auth :as auth] [com.platypub.feat.home :as home] [com.platypub.feat.lists :as lists] [com.platypub.feat.items :as items] [com.platypub.feat.sites :as sites] [com.platypub.schema...
736ff52475b1577916c214b9d69f698953fcc43ed9e3d24b506260aa5cd408fc
rtoy/cmucl
morecoms.lisp
;;; -*- Log: hemlock.log; Package: Hemlock -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/hemlock/morecoms...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/hemlock/morecoms.lisp
lisp
-*- Log: hemlock.log; Package: Hemlock -*- ********************************************************************** ********************************************************************** Even more commands... Casing commands... Lisp's notion are too annoying. TWIDDLE-REGION implements "Uppercase Region" and...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/hemlock/morecoms.lisp $") Written by and . (in-package "HEMLOCK") (defhvar "Region Query Size" "A number-of-lines threshold that destruc...
cce3b5974a9e2ab5fa172cd782438a7ef19155b4f1fc46923c057aee5ede8c82
Deducteam/zenon_modulo
printBox.ml
copyright ( c ) 2013 - 2014 , all rights reserved . redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : redistributions of source code must retain the above copyright notice , this list of conditions and the f...
null
https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/printBox.ml
ocaml
* An internal buffer, suitable for writing efficiently, then convertable into a list of lines create a new buffer find [c] in [s], starting at offset [i] list of lines vertical and horizontal padding height of a line composed of boxes how large is the [i]-th column of [m]? width and height of a colu...
copyright ( c ) 2013 - 2014 , all rights reserved . redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : redistributions of source code must retain the above copyright notice , this list of conditions and the f...
eef17ddce691faed6d6d683993c7d1bf6053e2191ed027d538233c33bca9e0fb
juspay/atlas
Scheduler.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/server/Scheduler.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
c2185c18f5bbb3b042847042e1e7db7153cd0aa27dacfa89736d4df05a35e49a
clojure-interop/java-jdk
SSLPeerUnverifiedException.clj
(ns javax.net.ssl.SSLPeerUnverifiedException "Indicates that the peer's identity has not been verified. When the peer was not able to identify itself (for example; no certificate, the particular cipher suite being used does not support authentication, or no peer authentication was established during SSL hand...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.net/src/javax/net/ssl/SSLPeerUnverifiedException.clj
clojure
no certificate, the particular
(ns javax.net.ssl.SSLPeerUnverifiedException "Indicates that the peer's identity has not been verified. When the peer was not able to cipher suite being used does not support authentication, or no peer authentication was established during SSL handshaking) this exception is thrown." (:refer-clojure :only [...
68194984e32b8e88282444087ced07605cdba988a2db566838755836559ebecf
ChrisPenner/wc
MonoidBSFold.hs
module MonoidBSFold where import Types import Data.Traversable import Data.Monoid import Data.Char import qualified Data.ByteString.Lazy.Char8 as BS monoidBSFold :: [FilePath] -> IO [(FilePath, Counts)] monoidBSFold paths = for paths $ \fp -> do count <- monoidFoldFile <$> BS.readFile fp return (fp, count) m...
null
https://raw.githubusercontent.com/ChrisPenner/wc/7a77329164c7b8e7f7d511539e75bce1a74651af/src/MonoidBSFold.hs
haskell
module MonoidBSFold where import Types import Data.Traversable import Data.Monoid import Data.Char import qualified Data.ByteString.Lazy.Char8 as BS monoidBSFold :: [FilePath] -> IO [(FilePath, Counts)] monoidBSFold paths = for paths $ \fp -> do count <- monoidFoldFile <$> BS.readFile fp return (fp, count) m...
c63af0822d92267554ee9075ed519ad5304a1a656549cf87e63d12debbe7daf0
diprism/perpl
RecEq.hs
-- Constructs == functions for (types containing) recursive datatypes module Transform.RecEq (replaceEqs) where import Struct.Lib import Util.Helpers import Scope.Ctxt import Scope.Free import Data.List (intercalate) import Data.Map (insert, (!), intersection, toList, fromList, member, size) import Control.Monad.RWS -...
null
https://raw.githubusercontent.com/diprism/perpl/347376cd8e3c4fdc9ad0d9fe79a684f9de33b455/src/Transform/RecEq.hs
haskell
Constructs == functions for (types containing) recursive datatypes Do a comparison, generating comparison functions for types containing recursive data when necessary Given [tm1, ..., tmn], returns conjuction of all: True == tm1 == ... == tmn Add stand-in def for now, so recursive calls work
module Transform.RecEq (replaceEqs) where import Struct.Lib import Util.Helpers import Scope.Ctxt import Scope.Free import Data.List (intercalate) import Data.Map (insert, (!), intersection, toList, fromList, member, size) import Control.Monad.RWS replaceEq :: [Term] -> EqM Term replaceEq [] = error "Can't have == wit...
37bc9929fa6400fc9d5f558992e4a7da140721daa397fa73b82d50d3014c669f
well-typed-lightbulbs/ocaml-esp32
dynlink_types.ml
#2 "otherlibs/dynlink/dynlink_types.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/otherlibs/dynlink/dynlink_types.ml
ocaml
************************************************************************ OCaml ...
#2 "otherlibs/dynlink/dynlink_types.ml" , projet Cristal , INRIA Rocquencourt and , Europe Copyright 1996 Institut National de Recherche en Informatique et Copyright 2017 - -2018 Jane Street Group LLC the GNU Lesser G...
4fbda2f70b01ddc50bcedf84aad8d74d8b4edfdcc6f5eabadef6f05c696e2797
graninas/Functional-Design-and-Architecture
Device.hs
module Andromeda.Hardware.Device where import Andromeda.Hardware.HDL import Andromeda.Hardware.Parameter import qualified Data.Map as M data DeviceComponent = Sensor Measurement Guid | Controller Guid deriving (Read, Show, Eq) newtype Device = DeviceImpl (M.Map ComponentIndex DeviceComponent)...
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH05/5.1.2%20HNDL/Andromeda/Hardware/Device.hs
haskell
module Andromeda.Hardware.Device where import Andromeda.Hardware.HDL import Andromeda.Hardware.Parameter import qualified Data.Map as M data DeviceComponent = Sensor Measurement Guid | Controller Guid deriving (Read, Show, Eq) newtype Device = DeviceImpl (M.Map ComponentIndex DeviceComponent)...
4464b5159e6296ff82a2c397d2aea924b40b8d8ddf1099f15203415b288cfaef
slipstream/SlipStreamServer
deployment_parameter_lifecycle_test.clj
(ns com.sixsq.slipstream.ssclj.resources.deployment-parameter-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstream.ss...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/deployment_parameter_lifecycle_test.clj
clojure
admin user collection query should succeed but be empty (no records created yet) normal user collection query should succeed but be empty (no records created yet) anonymous credential collection query should not succeed create a deployment parameter as a admin user admin should be able to see everyone's records. D...
(ns com.sixsq.slipstream.ssclj.resources.deployment-parameter-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstream.ss...
763b747c42f91b23425f76d55ae85a97531b1bea89852cab6aa8e8dc8408f65e
nvim-treesitter/nvim-treesitter
indents.scm
[ (comp_body) (state_statement) (transition_statement) (handler_body) (consequence_body) (global_single) ] @indent "}" @indent_end (comment) @auto (string_literal) @auto
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/41e013dd9a4d27d0154475318b59fd2ca59cbe3d/queries/slint/indents.scm
scheme
[ (comp_body) (state_statement) (transition_statement) (handler_body) (consequence_body) (global_single) ] @indent "}" @indent_end (comment) @auto (string_literal) @auto
6aebc94a87df39c981e1be2fd22db1250b6bf5b22b89821f974953f76e819ee1
batterseapower/haskell-kata
Generics3.hs
# LANGUAGE TypeFamilies , EmptyDataDecls , ScopedTypeVariables , TypeOperators , FlexibleInstances , FlexibleContexts # import Data.Monoid -- Type family for evaluators on types type family E a :: * -- Tag for functor application: fundamental to our approach infixr 9 :% data f :% a -- Tags for evalutor-style data ...
null
https://raw.githubusercontent.com/batterseapower/haskell-kata/49c0c5cf48f8e5549131c78d026e4f2aa73d8a7a/Generics3.hs
haskell
Type family for evaluators on types Tag for functor application: fundamental to our approach Tags for evalutor-style data declarations: such declarations contain "internal" occurrences of E, so we can delay evaluation of their arguments When applying legacy data types we have to manually force the arguments: Eval...
# LANGUAGE TypeFamilies , EmptyDataDecls , ScopedTypeVariables , TypeOperators , FlexibleInstances , FlexibleContexts # import Data.Monoid type family E a :: * infixr 9 :% data f :% a data P0T (f :: *) type instance E (P0T f) = f data P1T (f :: * -> *) type instance E (P1T f :% a) = f a data P2T (f :: * -> * -> *)...
941ab67ccac39c9761bf5c8f7acf08f400d08ab76b7add87bf9d2e8ac57f50ff
clojure-interop/google-cloud-clients
PartitionOptions$Builder.clj
(ns com.google.cloud.spanner.PartitionOptions$Builder "Builder for PartitionOptions instance." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner PartitionOptions$Builder])) (defn set-partition-size-bytes "The desired data size for each partition generated. This is only a hint....
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/PartitionOptions%24Builder.clj
clojure
(ns com.google.cloud.spanner.PartitionOptions$Builder "Builder for PartitionOptions instance." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner PartitionOptions$Builder])) (defn set-partition-size-bytes "The desired data size for each partition generated. This is only a hint....
2af2190db86e08941a1e79343ad09a4fa0d260c38d7c5e7bda5775000c23dbe9
bartavelle/language-puppet
EvaluateStatementSpec.hs
# LANGUAGE OverloadedLists # module Interpreter.EvaluateStatementSpec where import Helpers import qualified Data.Text as Text main :: IO () main = hspec spec shouldNotify :: [Text] -> PValue -> Expectation shouldNotify s expected = do catalog <- case pureCatalog (Text.unlines s) of Left rr -> fai...
null
https://raw.githubusercontent.com/bartavelle/language-puppet/6af7458e094440816c8b9b7b387050612e87a70f/tests/Interpreter/EvaluateStatementSpec.hs
haskell
# LANGUAGE OverloadedLists # module Interpreter.EvaluateStatementSpec where import Helpers import qualified Data.Text as Text main :: IO () main = hspec spec shouldNotify :: [Text] -> PValue -> Expectation shouldNotify s expected = do catalog <- case pureCatalog (Text.unlines s) of Left rr -> fai...
99d4cf5cb91f573fb9fb6711666e3b8e0523c1e084a55fce010561e9ca3d4cd2
frenetic-lang/ocaml-tdk
bdd.ml
open S module Make(V:HashCmp) = struct module C = struct type t = bool let hash x = if x then 1 else 0 let compare x y = match x, y with | true , false -> -1 | false, true -> 1 | _ , _ -> 0 let to_string x = if x then "true" else "false" end module R = struct...
null
https://raw.githubusercontent.com/frenetic-lang/ocaml-tdk/175f25543c7fc7965eed8532fb012c19bfd8bf0f/lib/bdd.ml
ocaml
NOTE: This is done to ensure the unique representation of BDDs
open S module Make(V:HashCmp) = struct module C = struct type t = bool let hash x = if x then 1 else 0 let compare x y = match x, y with | true , false -> -1 | false, true -> 1 | _ , _ -> 0 let to_string x = if x then "true" else "false" end module R = struct...
a6dc6877133c9aedce926c527599b8b982654d2fa30b75e962fe43cc819d8992
modular-macros/ocaml-macros
nativeint.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/stdlib/nativeint.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the external neg: nativeint -> nativeint = "%nativeint_neg" external add: nativeint -> nativeint -> nativein...
bbb15a3d434765da8485f614374fe1df02923c8cacec42fcc6f9bcfcc01af393
UU-ComputerScience/uhc
Main.hs
-- The Great Computer Language Shootout -- / by , , and -- import System.Environment data F = F !Integer !Integer !Integer !Integer main :: IO () main = loop 10 0 . flip take (str (F 1 0 0 1) ns) . read . head =<< getArgs ns = [ F k (4*k+2) 0 (2*k+1) | k <- [1..] ] loop :: Int -> Integer -> [Integer] -...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/benchmark/nofib/imag/pidigits/Main.hs
haskell
/
The Great Computer Language Shootout by , , and import System.Environment data F = F !Integer !Integer !Integer !Integer main :: IO () main = loop 10 0 . flip take (str (F 1 0 0 1) ns) . read . head =<< getArgs ns = [ F k (4*k+2) 0 (2*k+1) | k <- [1..] ] loop :: Int -> Integer -> [Integer] -> IO () loo...
ccaeeda50312d842090169dc61beba5a63500ca7a7a3940b70aa35ecd59d0cf7
gafiatulin/codewars
Phonedir.hs
Phone Directory -- module Codewars.G964.Phonedir(phone) where import Data.Char(isDigit) import Data.List(intercalate) import Data.Maybe(listToMaybe, mapMaybe) import Control.Applicative((<|>)) import Text.ParserCombinators.ReadP(readP_to_S, satisfy, get, many, char, many1, pfail, sepBy1, between) data Person = Pe...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Phonedir.hs
haskell
Phone Directory module Codewars.G964.Phonedir(phone) where import Data.Char(isDigit) import Data.List(intercalate) import Data.Maybe(listToMaybe, mapMaybe) import Control.Applicative((<|>)) import Text.ParserCombinators.ReadP(readP_to_S, satisfy, get, many, char, many1, pfail, sepBy1, between) data Person = Person...
e02f1d43800826506c2bfb399313f1c33fc622ef7a1909005e4f4801d801040a
ocaml-omake/omake
omake_env.ml
module TargetElem = struct type t = int * string * Omake_node_sig.node_kind let compare (h1,s1,k1) (h2,s2,k2) = if h1=h2 then let p1 = String.compare s1 s2 in if p1 = 0 then compare k1 k2 else p1 else h1-h2 let intern ((s1,k1) as key) = let h1 = Hashtbl.hash ke...
null
https://raw.githubusercontent.com/ocaml-omake/omake/26b39e82f81c912f8c0f9859328c9c24800e6ba8/src/env/omake_env.ml
ocaml
* Command lists have source arguments. * An implicit rule with a body. * * In an implicit rule, we compile the targets/sources * to wild patterns. * An implicit dependency. There is no body, but * it may have value dependencies. * Explicit rules. * A listing of all the explicit rules. * * ex...
module TargetElem = struct type t = int * string * Omake_node_sig.node_kind let compare (h1,s1,k1) (h2,s2,k2) = if h1=h2 then let p1 = String.compare s1 s2 in if p1 = 0 then compare k1 k2 else p1 else h1-h2 let intern ((s1,k1) as key) = let h1 = Hashtbl.hash ke...
20f77952838958146a1786d1a958bf489f91c14634652f246cc15e53ce14d59d
theleoborges/imminent
core.clj
(require '[imminent.core :as immi] '[imminent.executors :as executors] '[imminent.util.monad :as monad]) (def repl-out *out*) (defn prn-to-repl [& args] (binding [*out* repl-out] (apply prn args))) (comment (def ma (const-future 10)) (defn fmb [n] (const-future (* 2 n))) (bind ma f...
null
https://raw.githubusercontent.com/theleoborges/imminent/9429072dc2b46d2e23cb64992e40faa682c7eb47/examples/core.clj
clojure
README examples... dispatches the computations in parallel reduces over the futures ClassCastException java.lang.String cannot be cast to java.lang.Number #imminent.core.Failure{:e "Oops!"} "the error is" "Oops!" doing something important... #<Future@79d009ff: :imminent.core/unresolved> #<Future@1c6b016: #immi...
(require '[imminent.core :as immi] '[imminent.executors :as executors] '[imminent.util.monad :as monad]) (def repl-out *out*) (defn prn-to-repl [& args] (binding [*out* repl-out] (apply prn args))) (comment (def ma (const-future 10)) (defn fmb [n] (const-future (* 2 n))) (bind ma f...
bcd901fa2a3421aeff0ad7370b0ae841f2953cd43597c2e4b18ed4c770d51ce9
reborg/clojure-essential-reference
1.clj
(require '[clojure.repl :refer [source]]) (require '[clojure.string :as s]) < 1 > < 2 > with-out-str ; <3> < 4 > println) ( DEFN SOME ? ; < 5 > ;; "RETURNS TRUE IF X IS NOT NIL, FALSE OTHERWISE." { : TAG BOOLEAN : ADDED " 1.6 " ;; :STATIC TRUE} ;; [X] (NOT (NIL? X)))
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/StringsandRegularExpressions/lower-case%2Cupper-case%2Ccapitalize/1.clj
clojure
<3> < 5 > "RETURNS TRUE IF X IS NOT NIL, FALSE OTHERWISE." :STATIC TRUE} [X] (NOT (NIL? X)))
(require '[clojure.repl :refer [source]]) (require '[clojure.string :as s]) < 1 > < 2 > < 4 > println) { : TAG BOOLEAN : ADDED " 1.6 "
9c29e4ea071a09746116f64e89bacf83da242c5b19288c3a7264b64b487c0b9f
spectrum-finance/cardano-dex-backend
Process.hs
module Spectrum.Executor.PoolTracker.Process ( PoolTracker(..) , mkPoolTracker ) where import qualified Streamly.Prelude as S import Streamly.Prelude ( IsStream ) import Control.Monad.IO.Class ( MonadIO ) import Control.Monad.Trans.Control ( MonadBaseControl ) import Control.Monad.Catch ( MonadThrow ) ...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/47528f6a43124ab4f6849521d61dbb3fad476c19/amm-executor/src/Spectrum/Executor/PoolTracker/Process.hs
haskell
module Spectrum.Executor.PoolTracker.Process ( PoolTracker(..) , mkPoolTracker ) where import qualified Streamly.Prelude as S import Streamly.Prelude ( IsStream ) import Control.Monad.IO.Class ( MonadIO ) import Control.Monad.Trans.Control ( MonadBaseControl ) import Control.Monad.Catch ( MonadThrow ) ...
a42ee8d3127418269c108b61191c643904468fdc19fc5813d52cd4bee5043cc7
koto-bank/lbge
image-loader.lisp
(in-package :lbge.image) (defparameter *loaders* (list)) (defmacro register-loader (extension loader-name) `(setf *loaders* (acons (string-upcase ,extension) ,loader-name *loaders*))) (defun load-image (path) "Takes path to an image and returns `image` structure. If the image format is unsupported throws erro...
null
https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/image-loader/image-loader.lisp
lisp
(in-package :lbge.image) (defparameter *loaders* (list)) (defmacro register-loader (extension loader-name) `(setf *loaders* (acons (string-upcase ,extension) ,loader-name *loaders*))) (defun load-image (path) "Takes path to an image and returns `image` structure. If the image format is unsupported throws erro...
b5a1d3ac6599c4106c2fbf045d2de53e69ab969fd9e04fb64f1c0c69adca43a9
monadbobo/ocaml-core
fn.ml
let const c = (); fun _ -> c external ignore : _ -> unit = "%ignore" (* this has the same behavior as [Pervasives.ignore] *) let non f = (); fun x -> not (f x) let forever f = let rec forever () = f (); forever () in try forever () with e -> e external id : 'a -> 'a = "%identity" let ( |! ) x y = y...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/fn.ml
ocaml
this has the same behavior as [Pervasives.ignore] The typical use case for these functions is to pass in functional arguments and get functions as a result. For this reason, we tell the compiler where to insert breakpoints in the argument-passing scheme.
let const c = (); fun _ -> c let non f = (); fun x -> not (f x) let forever f = let rec forever () = f (); forever () in try forever () with e -> e external id : 'a -> 'a = "%identity" let ( |! ) x y = y x let compose f g = (); fun x -> f (g x) let flip f = (); fun x y -> f y x
364684a2168a4be3bf0b8dd4425d6add3fca9b14b297635f0a573a08b2d0c125
SamB/coq
subtac_pretyping.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/subtac/subtac_pretyping.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** A R : A -> A -> Prop : well_fou...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ Id$ open Global open P...
29c088ebf76c02c58d44dab3d3bf56d789bef2145242bccc0115a3da6940f5bb
cnuernber/dtype-next
neanderthal_test.clj
(ns tech.v3.libs.neanderthal-test (:require [uncomplicate.neanderthal.core :as n-core] [uncomplicate.neanderthal.native :as n-native] [tech.v3.tensor :as dtt] [tech.v3.datatype.functional :as dfn] [tech.v3.datatype :as dtype] [clojure.test :refer [deftest is...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/2470025455a4425f910b3fad1a9313106a5c56a6/neanderthal/tech/v3/libs/neanderthal_test.clj
clojure
(ns tech.v3.libs.neanderthal-test (:require [uncomplicate.neanderthal.core :as n-core] [uncomplicate.neanderthal.native :as n-native] [tech.v3.tensor :as dtt] [tech.v3.datatype.functional :as dfn] [tech.v3.datatype :as dtype] [clojure.test :refer [deftest is...
493912c78c3bfe8c6cabc640a9270cd8f55e80a566507bc3cf8ca19303816083
basho/riak_test
repl_aae_fullsync_util.erl
%% @doc This module implements a riak_test to exercise the Active Anti - Entropy Fullsync replication . It sets up two clusters and starts a single fullsync worker for a single AAE tree . -module(repl_aae_fullsync_util). -export([make_clusters/3, prepare_cluster_data/5]). -include_lib("eunit/include/eunit.h...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/repl_aae_fullsync_util.erl
erlang
@doc clusters are not connected, connect them we'll need to wait for cluster names before continuing make sure we are connected --------------------------------------------------- --------------------------------------------------- check that the keys we wrote initially aren't replicated yet, because we've disabl...
This module implements a riak_test to exercise the Active Anti - Entropy Fullsync replication . It sets up two clusters and starts a single fullsync worker for a single AAE tree . -module(repl_aae_fullsync_util). -export([make_clusters/3, prepare_cluster_data/5]). -include_lib("eunit/include/eunit.hrl"). -...
d052617d6aac9183562f32b5f1e0d2a95de8693b3a56ba92287b5cb66f6be7ff
mpickering/apply-refact
Default36.hs
yes = Prelude.concat $ intersperse " " xs
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default36.hs
haskell
yes = Prelude.concat $ intersperse " " xs
e7876f9cb6db0050b0b12c16d7ce6656108f2c574ca92a4166cfb64d0d99714e
evrim/core-server
serialization.lisp
(in-package :core-server.test) (defmacro defserialization-test (name lisp-element db-element &optional (equal 'equalp)) `(deftest ,name (and (xml.equal (xml-serialize ,lisp-element) ,db-element) (,equal (xml-deserialize ,db-element) ,lisp-element)) t)) (defserialization-test serialize-null nil...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/t/database/serialization.lisp
lisp
Generate unique filename for temporary usage
(in-package :core-server.test) (defmacro defserialization-test (name lisp-element db-element &optional (equal 'equalp)) `(deftest ,name (and (xml.equal (xml-serialize ,lisp-element) ,db-element) (,equal (xml-deserialize ,db-element) ,lisp-element)) t)) (defserialization-test serialize-null nil...
fc8fa8b0a97425e05fdfa62d88d5b7572ad012d0e47e33f7e5538e6c520eb0a4
albertoruiz/easyVision
Statistics.hs
module Util.Statistics( mean, median, quartiles, shDist, Histogram, histogram, meanAndSigma, credible, randomPermutation, randomSamples, MCMC(..), metropolis, metropolis', infoMetro ) where import Numeric.LinearAlgebra.HMatrix hiding (step) import Data.List(sortBy, sort) import System.Random import qu...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/tools/src/Util/Statistics.hs
haskell
| pseudorandom permutation of a list | without replacement ------------------------------------------------------------------------------
module Util.Statistics( mean, median, quartiles, shDist, Histogram, histogram, meanAndSigma, credible, randomPermutation, randomSamples, MCMC(..), metropolis, metropolis', infoMetro ) where import Numeric.LinearAlgebra.HMatrix hiding (step) import Data.List(sortBy, sort) import System.Random import qu...
1f5586b6a975c518368c4affd981b028bc0d3be24c0d9df0b4174de615f64843
mjmeintjes/cljs-react-native-tictactoe
macro.clj
(ns reagent-native.macro (:require [clojure.string :as string])) (defn snake-case->camel-case [^String input-str] (string/replace input-str #"-(\w)" (fn [[match captured]] (string/upper-case captured)))) (defn generate-binding [clj-name] (let [js-name (sna...
null
https://raw.githubusercontent.com/mjmeintjes/cljs-react-native-tictactoe/b41ead9ac3982b139a315b3e60c149342f7c345e/src/reagent_native/macro.clj
clojure
(ns reagent-native.macro (:require [clojure.string :as string])) (defn snake-case->camel-case [^String input-str] (string/replace input-str #"-(\w)" (fn [[match captured]] (string/upper-case captured)))) (defn generate-binding [clj-name] (let [js-name (sna...
1ad599f98f53090f678a23614cc2db45d629b47aedc9d30e0916a17111be6488
kimwnasptd/YAAC-Yet-Another-Alan-Compiler
ASTTypes.hs
module ASTTypes where import Tokens data Program = Prog Func_Def deriving (Eq, Show) data Func_Def = F_Def String FPar_List R_Type L_Def_List Comp_Stmt deriving (Eq, Show) -- It doesn't need a custom data type type Stmt_List = [ Stmt ] type L_Def_List = [ Local_Def ] -- Loc...
null
https://raw.githubusercontent.com/kimwnasptd/YAAC-Yet-Another-Alan-Compiler/73046cb21d29aaeb5ab3f83ae6ff6978d445afc8/Parser/ASTTypes.hs
haskell
It doesn't need a custom data type Local Functions or variables It doesn't need a custom data type -> I am sorry. done done done done in a cute way! done done done done done done done done
module ASTTypes where import Tokens data Program = Prog Func_Def deriving (Eq, Show) data Func_Def = F_Def String FPar_List R_Type L_Def_List Comp_Stmt deriving (Eq, Show) type Stmt_List = [ Stmt ] deriving ( Eq , Show ) data Comp_Stmt = C_Stmt Stmt_List deriving (Eq, Show) type ...
70ed07e5244ac6525be08cd136167304fdd2ad33944578893aed3a0b2f908298
static-analysis-engineering/codehawk
jCHTemplateUtil.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpre/jCHTemplateUtil.mli
ocaml
chutil jchlib
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
4c81d5b6448eb3e852a8dd6990e04bf72f2ec82449678a6333e4735628ac295c
melange-re/melange
ext_json_noloc.mli
Copyright ( C ) 2017- Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later version ...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/ext/ext_json_noloc.mli
ocaml
Copyright ( C ) 2017- Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later version ...
2f380d8ef8dc7a57cad155680a999df9dd5e77c17af09e3ec06907aa6ae578c4
DanielG/ghc-mod
PkgDoc.hs
module GhcMod.Exe.PkgDoc (pkgDoc) where import GhcMod.Types import GhcMod.GhcPkg import GhcMod.Monad import GhcMod.Output import Control.Applicative import Prelude -- | Obtaining the package name and the doc path of a module. pkgDoc :: IOish m => String -> GhcModT m String pkgDoc mdl = do ghcPkg <- getGhcPkgProg...
null
https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/GhcMod/Exe/PkgDoc.hs
haskell
| Obtaining the package name and the doc path of a module.
module GhcMod.Exe.PkgDoc (pkgDoc) where import GhcMod.Types import GhcMod.GhcPkg import GhcMod.Monad import GhcMod.Output import Control.Applicative import Prelude pkgDoc :: IOish m => String -> GhcModT m String pkgDoc mdl = do ghcPkg <- getGhcPkgProgram readProc <- gmReadProcess pkgDbStack <- getPackage...
230b816b812b5928bef3dd032f2ac21dddb54ecad1812cb99f8d86559bc0a426
pallix/lacij
core.clj
Copyright © 2010 - 2013 Fraunhofer Gesellschaft Licensed under the EPL V.1.0 (ns ^{:doc "Layout protocol definition"} lacij.layouts.core) (defprotocol Layout (layout-graph [this graph options]) (layout-graph! [this graph options]))
null
https://raw.githubusercontent.com/pallix/lacij/ee9b7dcda13f25f7460acb5995b7970a7564c11e/src/lacij/layouts/core.clj
clojure
Copyright © 2010 - 2013 Fraunhofer Gesellschaft Licensed under the EPL V.1.0 (ns ^{:doc "Layout protocol definition"} lacij.layouts.core) (defprotocol Layout (layout-graph [this graph options]) (layout-graph! [this graph options]))
32abf05d776b059d9c1f18051b9a3e9495a0d955591fd81e41f145d9a46b60a6
sgbj/MaximaSharp
mutils.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/mutils.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; too general f...
(in-package :maxima) (macsyma-module mutils) General purpose utilities . This file contains runtime functions which perform operations on functions or data , but which are a binary operand and 2 elements . For example x=1 , 2 ^ 3 , [ a , b ] etc . The key checked againts the first operand and and retu...
6f05f8b66333c911153f599765c4d5e4f04f6cfea3928ea4ccdd7f81c42a6b6c
grav/seq
nodejs.cljs
(ns ^:figwheel-always seq.nodejs (:require [cljs.nodejs :as nodejs] [seq.core :as seq])) (nodejs/enable-util-print!) (def midi-access (nodejs/require "webmidi-shim")) (defonce app-state (atom nil)) (defn -main [& args] (let [nav (nodejs/require "webmidi-shim") now (nodejs/require "performan...
null
https://raw.githubusercontent.com/grav/seq/ca0bccbe8e12b8cbfffdae4c3af85584de27be5a/src-nodejs/seq/nodejs.cljs
clojure
(ns ^:figwheel-always seq.nodejs (:require [cljs.nodejs :as nodejs] [seq.core :as seq])) (nodejs/enable-util-print!) (def midi-access (nodejs/require "webmidi-shim")) (defonce app-state (atom nil)) (defn -main [& args] (let [nav (nodejs/require "webmidi-shim") now (nodejs/require "performan...
bf908297fd365d06d3ae94f5326a4f8dbffddb28d502834e4aa49cc85eb7f833
emqx/emqx
emqx_mgmt_auth.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/a26c05f4f6d332364aa4195818ee0d6d95dadbbe/apps/emqx_management/src/emqx_mgmt_auth.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_mgmt_auth). -include_lib("emqx/include/emqx.hrl"). -include_lib("emqx/include/logger...
54f1fd4cdac6ba19f155eeee6d8e3575a4961b132bfae515b06692f6fdf665c3
soegaard/pyffi
tutorial-numpy-fish-market.rkt
#lang racket ;;; ;;; Fish Market ;;; This example uses a data set from Finland . ;; A number of fish were caught and measurements for each fish were recorded. ;; One way to use the data set : Consider ` weight ` the dependent variable ;; and try to predict the `weight` from the other data. ;;; Import ...
null
https://raw.githubusercontent.com/soegaard/pyffi/84cee7adbd9fcd1206dbe9224915911206498410/pyffi-tutorials/tutorial-numpy-fish-market.rkt
racket
Fish Market A number of fish were caught and measurements for each fish were recorded. and try to predict the `weight` from the other data. Import and initialize Numpy Bream,242,23.2,25.4,30,11.52,4.02 ... Apart from "Species" all values are floating points. >>> dtypes [('Species', 'U'), ('Weight', 'f8'...
#lang racket This example uses a data set from Finland . One way to use the data set : Consider ` weight ` the dependent variable (require pyffi pyffi/numpy) (initialize) (import-numpy) (finish-initialization) (declare-special-prefix numpy) 1 . Load the data set > less fi...
ebd2091fa419e35d805adde96f581bae8b5e2809bd2d6bbd454d2b77c3b0be12
05st/artemis
Name.hs
module Name where data Namespace = Global | Relative Namespace String deriving (Eq, Ord) data QualifiedName = Qualified Namespace String deriving (Eq, Ord) instance Show Namespace where show Global = [] show (Relative parent name) = show parent ++ "::" ++ name instance Show QualifiedName where show (Qual...
null
https://raw.githubusercontent.com/05st/artemis/0a5622a07d225ce7c14ef61e9c46ce2a46a42536/src/Name.hs
haskell
module Name where data Namespace = Global | Relative Namespace String deriving (Eq, Ord) data QualifiedName = Qualified Namespace String deriving (Eq, Ord) instance Show Namespace where show Global = [] show (Relative parent name) = show parent ++ "::" ++ name instance Show QualifiedName where show (Qual...
dd4f8cb0d34d2f36c3d27f96d38ac4d75c193dd007749081afb3b1f184d1facd
Ericson2314/lighthouse
Substrate.hs
# OPTIONS_GHC -ffi # {-# OPTIONS_GHC -fglasgow-exts #-} module LwConc.Substrate ( SCont , newSCont , switch , TLSKey , newTLSKey , getTLS , setTLS ) where import GHC.Exts import GHC.Prim import GHC.IOBase import LwConc.PTM import Data.IORef import Data.Sequence as Seq ----------------------------------------------...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/base/LwConc/Substrate.hs
haskell
# OPTIONS_GHC -fglasgow-exts # --------------------------------------------------------------------------- --------------------------------------------------------------------------- a boolean flag to indicate whether the SCont is "used up", i.e. already switched to.
# OPTIONS_GHC -ffi # module LwConc.Substrate ( SCont , newSCont , switch , TLSKey , newTLSKey , getTLS , setTLS ) where import GHC.Exts import GHC.Prim import GHC.IOBase import LwConc.PTM import Data.IORef import Data.Sequence as Seq Thread Local State ( TLS ) data TLSKey a = TLSKey Int# newTLSKey :: a -> IO (...
84f304a52e54fb679ab936e8f2dc14b239275914db4e4e0e0b06062eb4a2ee27
charlieg/Sparser
rule-population-window.lisp
;;; -*- Mode:Lisp; Syntax:Common-Lisp; Package:SPARSER copyright ( c ) 1995 -- all rights reserved ;;; ;;; File: "rule population window" ;;; module: "interface;workbench:def rule:" Version : December 1995 broken out of [ define - rule ] 4/27 . 6/14 added initialization for * rdt / reference ...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/workbench/def-rule/rule-population-window.lisp
lisp
-*- Mode:Lisp; Syntax:Common-Lisp; Package:SPARSER File: "rule population window" module: "interface;workbench:def rule:" announcement widgets. (12/5) fixed bug it initialization of that. possible effects of *slvd/tree-family-restriction* -WITH-GROW the rest are done during the setup from higher leve...
copyright ( c ) 1995 -- all rights reserved Version : December 1995 broken out of [ define - rule ] 4/27 . 6/14 added initialization for * rdt / reference - category * . 8/28 added dossier hooks . 11/16 extended the canonical - positioning and warping - off - screen code . 11/17 added result ...
48eec91d8faf31ff07d5a72841c2c4ed663abc0c0772f71621069473873eb683
xapi-project/xen-api
lwt_support.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/wsproxy/src/lwt_support.ml
ocaml
The Lwt.catch below prevents errors on double close of the fd.
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
515df8ab27aeb3c5685caa3e427c5c037fe356161b84ad2abd3e8de509b41a3c
siilisolutions/hedge
core.clj
(ns boot-hedge.common.core (:require [boot.util] [clojure.pprint] [clojure.string :as str] [cheshire.core :refer [generate-stream]])) (def SUPPORTED_HANDLERS [:api :timer :queue]) (def AZURE_FUNCTION {:api 'azure-api-function :timer 'azure-timer-function :queue ...
null
https://raw.githubusercontent.com/siilisolutions/hedge/c856b232f3057530921a1e186371647317819f16/boot/src/boot_hedge/common/core.clj
clojure
hedge-test.core/hello => hedge-test_core__hello
(ns boot-hedge.common.core (:require [boot.util] [clojure.pprint] [clojure.string :as str] [cheshire.core :refer [generate-stream]])) (def SUPPORTED_HANDLERS [:api :timer :queue]) (def AZURE_FUNCTION {:api 'azure-api-function :timer 'azure-timer-function :queue ...
550b2d367cd30b275eef55fdb26cf1c07771928015342384e47ad1a41c37c8f0
JHU-PL-Lab/jaylang
config.ml
open Core type test_group = string list and t = { testcases_to_time : test_group; testcases_not_time : test_group; repeat : int; timeout : string; engine : string; [@default "dbmc"] test_path : string; [@default "benchmark/cases/ddse"] working_path : string; [@default "benchmark/_working"] result_path...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/a88468ce8fb7507ec77a88a4cf8146da104328fb/benchmark/config.ml
ocaml
open Core type test_group = string list and t = { testcases_to_time : test_group; testcases_not_time : test_group; repeat : int; timeout : string; engine : string; [@default "dbmc"] test_path : string; [@default "benchmark/cases/ddse"] working_path : string; [@default "benchmark/_working"] result_path...
f87cbfa93bf2cd1f1453fe34236f52e523b4f82596a6596f583bd5a673c85d1f
vereis/jarlang
io_lib_format.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2017 . 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/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/src/erl/lib/stdlib/io_lib_format.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 1996 - 2017 . 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(io_lib_format). -export([fwrite/2,fwrite_g/1,indentation/2,scan/2,unscan/1,build/1]). Format the argume...
7571ef7b6a9e3952622c8c30de01d573d7d1597519ae3cb10e8b47cd0ab122e3
metametadata/clj-fakes
reify_nice_fake.cljc
(ns unit.reify-nice-fake (:require [clojure.test :refer [is testing]] [unit.utils :as u] [clj-fakes.core :as f] [clj-fakes.context :as fc] [unit.fixtures.protocols :as p :refer [AnimalProtocol]])) (defprotocol LocalProtocol (bar [this] [this x y]) (baz [this x]) (qux [this x y z])) (defn i...
null
https://raw.githubusercontent.com/metametadata/clj-fakes/d928ddfd11b150b1cd2df5621265c447bf42395a/test/unit/reify_nice_fake.cljc
clojure
and tests start failing on every change to contex.cljc (f/with-fakes [bar :optional-fake [f/any "bar"]])] (is (= "bar" (bar foo))) Object integration
(ns unit.reify-nice-fake (:require [clojure.test :refer [is testing]] [unit.utils :as u] [clj-fakes.core :as f] [clj-fakes.context :as fc] [unit.fixtures.protocols :as p :refer [AnimalProtocol]])) (defprotocol LocalProtocol (bar [this] [this x y]) (baz [this x]) (qux [this x y z])) (defn i...
9d453075ffc6090b18b94e06c704fcd664ed8adef49db5e02624ae95d3fcdd5c
karamellpelle/grid
Helpers.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/LevelTools/Helpers.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module LevelTools.Helpers where import MyPrelude ...
f9b92628d0d7802c8b55f62b253ed9caa924425659412151fba62a00cf7dc541
nunchaku-inria/nunchaku
Elim_prop_args.mli
(* This file is free software, part of nunchaku. See file "license" for more details. *) * { 1 Eliminate function arguments of type " prop " } Emits some " if / then / else " instead , using a pseudo - prop type that has exactly two arguments . Emits some "if/then/else" instead, using a pseudo-prop ...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/transformations/Elim_prop_args.mli
ocaml
This file is free software, part of nunchaku. See file "license" for more details.
* { 1 Eliminate function arguments of type " prop " } Emits some " if / then / else " instead , using a pseudo - prop type that has exactly two arguments . Emits some "if/then/else" instead, using a pseudo-prop type that has exactly two arguments. *) open Nunchaku_core type term = Term.t type ...
d491c080c916a6f7f1051906f77188f219220e406b04069890095f5c85dc6c73
ocaml-ppx/ocamlformat
shebang.ml
#!/usr/bin/env ocaml type t = {a: a; b: b} let f x = x
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/shebang.ml
ocaml
#!/usr/bin/env ocaml type t = {a: a; b: b} let f x = x
38ae48b9a3976575fa98dc206aee09c08e356c4523dd134e334ce7b8d96f9816
den1k/vimsical
config.cljc
(ns vimsical.frontend.config (:require [clojure.spec.alpha :as s])) (def debug? #?(:clj false :cljs (let [dbg? ^boolean goog.DEBUG] (s/check-asserts dbg?) dbg?)))
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/config.cljc
clojure
(ns vimsical.frontend.config (:require [clojure.spec.alpha :as s])) (def debug? #?(:clj false :cljs (let [dbg? ^boolean goog.DEBUG] (s/check-asserts dbg?) dbg?)))
6295ab5ab2537f56124fccd91b494ea4f049ba70d9209013c332a66e02b8c9f2
2nishantg/hScraper
Show.hs
module HScraper.Show ( showTree ) where import HScraper.Types import HScraper.HTMLparser import qualified Data.Text as T -- | takes a 'HTMLtree' and prints it in a neat manner. -- -- expected output -- -- @ -- |html -- |head -- |body -- YOLO -- @ -- showTree:: IO HTMLTree -> IO ()...
null
https://raw.githubusercontent.com/2nishantg/hScraper/d2cb0d8ee4a9729fecc06701b76c03d763e49d44/HScraper/Show.hs
haskell
| takes a 'HTMLtree' and prints it in a neat manner. expected output @ |html |head |body YOLO @
module HScraper.Show ( showTree ) where import HScraper.Types import HScraper.HTMLparser import qualified Data.Text as T showTree:: IO HTMLTree -> IO () showTree y= do x <- y let x' = (showTree' x $showString "") "" putStrLn x' showTree':: HTMLTree -> ShowS -> ShowS showTree' (NTree (Text t) []) p = p . sho...
a3f4b3632e4890c9897d0ac002e3ca1ebc88fa366d79277cb1b0098b870e50d1
robashton/cravendb
transaction.clj
(ns cravendb.transaction (:refer-clojure :exclude [load] ) (:require [cravendb.client :as client] [cravendb.database :as db])) (defn mode "Determines whether a transaction is operating on an embedded or remote endpoint Returns either :remote or :embedded" [tx & _] (if (:href tx) :remote :embe...
null
https://raw.githubusercontent.com/robashton/cravendb/461e80c7c028478adb4287922db6ee4d2593a880/src/cravendb/transaction.clj
clojure
(ns cravendb.transaction (:refer-clojure :exclude [load] ) (:require [cravendb.client :as client] [cravendb.database :as db])) (defn mode "Determines whether a transaction is operating on an embedded or remote endpoint Returns either :remote or :embedded" [tx & _] (if (:href tx) :remote :embe...
7d44e1ae637aec0912a58389daa650643c6507ef8f96fe096bd164b57cf367ff
utz82/pstk
treeview.scm
(cond-expand (chicken-4 (use pstk)) (chicken-5 (import pstk))) PS - TK example : display a treeview (tk-start) (ttk-map-widgets 'all) ; make sure we are using tile widget set (tk/wm 'title tk "PS-Tk Example: TreeView") (tk 'configure 'height: 230 'width: 350) ;; create a tree view within scroll bars (let ((tr...
null
https://raw.githubusercontent.com/utz82/pstk/27e907097529a3d61bb63e87e4e1cd1ca9abc3af/doc/examples/treeview.scm
scheme
make sure we are using tile widget set create a tree view within scroll bars associate scrollbars and treeview set up columns in tree view insert items into tree view place tree view and scroll bar ensure grid fills the frame create a label and button to show selection
(cond-expand (chicken-4 (use pstk)) (chicken-5 (import pstk))) PS - TK example : display a treeview (tk-start) (tk/wm 'title tk "PS-Tk Example: TreeView") (tk 'configure 'height: 230 'width: 350) (let ((treeview (tk 'create-widget 'treeview 'columns: '("col1" "col2" "col3"))) (hsb (tk 'create-widget 'sc...
8ddecf2f51825e020a980e20e9c3bbc19b870b2ac1e1374cd0ee99299c273a92
patricoferris/ocaml-multicore-monorepo
caqti_driver_lib.ml
Copyright ( C ) 2017 - -2019 < > * * 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 later version , w...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib/caqti_driver_lib.ml
ocaml
Copyright ( C ) 2017 - -2019 < > * * 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 later version , w...
1e6d71a8bd58e40d0f993c62f917fd644da73931d69f849b35ddf29f7fd2ea39
polysemy-research/polysemy-zoo
MonadWriter.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # module Polysemy.ConstraintAbsorber.MonadWriter ( absorbWriter ) where import qualified Control.Monad.Writer.Class as S import Polysemy i...
null
https://raw.githubusercontent.com/polysemy-research/polysemy-zoo/eb0ce40e4d3b9757ede851a3450c05cc42949b49/src/Polysemy/ConstraintAbsorber/MonadWriter.hs
haskell
---------------------------------------------------------------------------- | Introduce a local 'S.MonadWriter' constraint on 'Sem' --- allowing it to ^ A computation that requires an instance of 'S.MonadWriter' for 'Sem'. This might be something with type @'S.MonadWriter' w m => m a@. ----------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # module Polysemy.ConstraintAbsorber.MonadWriter ( absorbWriter ) where import qualified Control.Monad.Writer.Class as S import Polysemy i...
e85fcde567f8f82a1df9eb5015780b150f4e086ec47ea65620487e2040bf9ccf
earl-ducaine/cl-garnet
abstract-errors.lisp
;;; -*- Mode: COMMON-LISP; Package: GARNET-GADGETS -*- ;; ;;-------------------------------------------------------------------;; Copyright 1993 ; ; ;;-------------------------------------------------------------------;; ;; This code is in the Public Domain. Anyone ...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/protected-eval/abstract-errors.lisp
lisp
-*- Mode: COMMON-LISP; Package: GARNET-GADGETS -*- ;; -------------------------------------------------------------------;; ; -------------------------------------------------------------------;; This code is in the Public Domain. Anyone who can get some use ;; from it is welcome. ...
$ Id$ (in-package "GARNET-GADGETS") (eval-when (:compile-toplevel :load-toplevel :execute) (export '(prompting-protected-eval prompting-protected-read prompting-protected-read-from-string prompter protect-errors with-protected-errors protected-eval protected-read protected-read-from...
183d949bce1172bc7c60b46a12e2c1bb9f06edb27a7d46ccb005d1dcb918f911
ropas/sparrow
spec.ml
(***********************************************************************) (* *) Copyright ( c ) 2007 - present . Programming Research Laboratory ( ROPAS ) , Seoul National University . (* All rights reserved...
null
https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/sparse/spec.ml
ocaml
********************************************************************* All rights reserved. See the LICENSE file for details. ...
Copyright ( c ) 2007 - present . Programming Research Laboratory ( ROPAS ) , Seoul National University . This software is distributed under the term of the BSD license . module type S = sig module Dom : InstrumentedMem.S type t = { locset : Dom.PowA.t; lo...
87d8031b81a2a411a2e7e1d7a72471aff314f1b91ced02e5c2c90a2763162b5a
leptonyu/guiguzi
Redis.hs
# LANGUAGE UndecidableInstances # module Base.Redis where import Boots import Boots.Web import Control.Exception (Exception, throw) import Data.Maybe import Data.Word import Database.Redis import Salak instance Default ConnectInfo where def = def...
null
https://raw.githubusercontent.com/leptonyu/guiguzi/9b3cb22f1b0c5387964c0097ef9a789125d2daee/base/base-redis/src/Base/Redis.hs
haskell
| Middleware context type.
# LANGUAGE UndecidableInstances # module Base.Redis where import Boots import Boots.Web import Control.Exception (Exception, throw) import Data.Maybe import Data.Word import Database.Redis import Salak instance Default ConnectInfo where def = def...
8882e1916e7a0accdd2d8d211ff9bb1ccc601090fc7d8796bee04a2d1a348962
maximedenes/native-coq
vconv.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/vconv.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Env...
0f732894892aedce687ea9ac814f9401c421ec6c91e61852e6446a98ac6f27f1
codecrafters-io/build-your-own-grep
Parser.hs
module Parser (parse, astToMatcher, AST(..)) where import qualified Text.Megaparsec as M import Text.Megaparsec.Char (char, digitChar) import Data.Void (Void) import Data.Maybe (fromMaybe, isNothing) import RegEx (M, posLit, negLit, emptyStrM, digitM, digitInverseM, alphaNumM, alphaNumInverseM, anyCharM, orM, andM, co...
null
https://raw.githubusercontent.com/codecrafters-io/build-your-own-grep/085a70404357c4abf11ff7c039cdf13181349e3c/solutions/haskell/12-alternation/code/src/Parser.hs
haskell
| Inverts an AST Char The regex parser starts here I had to adjust a few rules to support better parsing
module Parser (parse, astToMatcher, AST(..)) where import qualified Text.Megaparsec as M import Text.Megaparsec.Char (char, digitChar) import Data.Void (Void) import Data.Maybe (fromMaybe, isNothing) import RegEx (M, posLit, negLit, emptyStrM, digitM, digitInverseM, alphaNumM, alphaNumInverseM, anyCharM, orM, andM, co...
54423bcd124061e6f871aadce626555c6b27c7c6ba6f27ca7d7bb94f3b7108b7
sellout/haskerwaul
Left.hs
# language UndecidableSuperClasses # module Haskerwaul.Magma.Invertible.Left ( module Haskerwaul.Magma.Invertible.Left -- * extended modules , module Haskerwaul.Magma ) where import Haskerwaul.Magma -- | -- -- = references -- -- - [nLab](+magma) class Magma c t a => LeftInvertibleMagma c t a
null
https://raw.githubusercontent.com/sellout/haskerwaul/cdd4a61c6abe0f757e32058f4832cf616025b45f/src/Haskerwaul/Magma/Invertible/Left.hs
haskell
* extended modules | = references - [nLab](+magma)
# language UndecidableSuperClasses # module Haskerwaul.Magma.Invertible.Left ( module Haskerwaul.Magma.Invertible.Left , module Haskerwaul.Magma ) where import Haskerwaul.Magma class Magma c t a => LeftInvertibleMagma c t a
b1c6739b4498bd5c8dff53f54861132f92c2a46bdb320b46e09c78039e38ce24
dnadales/sandbox
Manual.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ScopedTypeVariables # module Manual ( Manual(..) , toManual , fromManual , dontShrink -- * Combinators , manualSized , manualReplicate -- * Auxiliary , wrapTreeT , unwrapTreeT ) where import Control.Monad import Control.Monad.Trans.Maybe impo...
null
https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/quickcheck-vs-hedgehog/test/Manual.hs
haskell
# LANGUAGE BangPatterns # * Combinators * Auxiliary newtype GenT m a = GenT { unGenT :: Size -> Seed -> TreeT m a } ------------------------------------------------------------------------------ Combinators ------------------------------------------------------------------------------ ----------------------...
# LANGUAGE ScopedTypeVariables # module Manual ( Manual(..) , toManual , fromManual , dontShrink , manualSized , manualReplicate , wrapTreeT , unwrapTreeT ) where import Control.Monad import Control.Monad.Trans.Maybe import Data.Coerce import Data.Functor.Identity import Hedgehog import Hedgehog....
3c8462e33438285f734906a5a7ca5da500601f11e581cb5019e73b91cc39ed87
ruricolist/spinneret
ps.lisp
(in-package #:spinneret) (defparameter *props* '("acceptCharset" "accessKey" "allowTransparency" "bgColor" "cellPadding" "cellSpacing" "className" "className" "colSpan" "style" "defaultChecked" "defaultSelected" "defaultValue" "htmlFor" "frameBorder" "hSpace" "htmlFor" "longDesc" "maxLength" "marginWidth...
null
https://raw.githubusercontent.com/ruricolist/spinneret/aea70bb8fae5b463b3852ad761a2bdab793cfaf1/ps.lisp
lisp
Compatibility hacks from Laconic.js 0.2.2. Set events as properties, ensuring a href.
(in-package #:spinneret) (defparameter *props* '("acceptCharset" "accessKey" "allowTransparency" "bgColor" "cellPadding" "cellSpacing" "className" "className" "colSpan" "style" "defaultChecked" "defaultSelected" "defaultValue" "htmlFor" "frameBorder" "hSpace" "htmlFor" "longDesc" "maxLength" "marginWidth...
68e3bb569f278f8fa4d5fe97cd0acefe4ae9dae64bd52432b4bc90897fb362ff
mlabs-haskell/plutus-simple-model
Eval.hs
module Cardano.Simple.Eval ( evalScript, utxoForTransaction, txBalance, evaluateScriptsInTx, toAlonzoCostModels, ) where import Prelude import Data.Array qualified as Array import Data.Either (lefts, rights) import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map import Data.Set qualified as Se...
null
https://raw.githubusercontent.com/mlabs-haskell/plutus-simple-model/a390bbf51bd9a0ad8a27517d1e02be5fd6d3394e/cardano-simple/src/Cardano/Simple/Eval.hs
haskell
if psm starts supporting staking this would need to be fixed
module Cardano.Simple.Eval ( evalScript, utxoForTransaction, txBalance, evaluateScriptsInTx, toAlonzoCostModels, ) where import Prelude import Data.Array qualified as Array import Data.Either (lefts, rights) import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map import Data.Set qualified as Se...
25241f2445d8616d06a17a2489f857cf67772cf7aa8b49c135993650bdee12cf
iij/lmq
lmq_event_SUITE.erl
-module(lmq_event_SUITE). -include_lib("common_test/include/ct.hrl"). -include("lmq.hrl"). -include("lmq_test.hrl"). -export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0]). -export([emit_new_message/1, handle_new_message/1, handle_local_queue_created/1, handle_remote_...
null
https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/test/lmq_event_SUITE.erl
erlang
start the queue if not exists update the queue if exists ensure mpull also works
-module(lmq_event_SUITE). -include_lib("common_test/include/ct.hrl"). -include("lmq.hrl"). -include("lmq_test.hrl"). -export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0]). -export([emit_new_message/1, handle_new_message/1, handle_local_queue_created/1, handle_remote_...
2e1a02988bce59c6940a83627168db20a86f1b34817abcf0f3d606b88a611119
xclerc/ocamljava
mapReduce.ml
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * 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 yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/mapreduce/mapReduce.ml
ocaml
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * 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 yo...
7268a42cf0bd0383dcce6c6cf4011fb5207859213f701c4d2f700f83aa55c8f1
JAremko/spacetools
spacedoc-cli-project.clj
(defproject spacetools/spacedoc-cli "0.1.0-SNAPSHOT" :description "CLI tools for Spacemacs documentation." :plugins [[lein-environ "1.1.0"]] :dependencies [[funcool/cats "2.3.6"] [medley "1.3.0"] [nio2 "0.2.3"] [orchestra "2020.07.12-1"] [org.clo...
null
https://raw.githubusercontent.com/JAremko/spacetools/2343810353da275bacb21cf49df43286df4bf9be/environments/development/project-files/systems/spacedoc-cli-project.clj
clojure
(defproject spacetools/spacedoc-cli "0.1.0-SNAPSHOT" :description "CLI tools for Spacemacs documentation." :plugins [[lein-environ "1.1.0"]] :dependencies [[funcool/cats "2.3.6"] [medley "1.3.0"] [nio2 "0.2.3"] [orchestra "2020.07.12-1"] [org.clo...
1c4011aa9788ad87d44ec543c0db9832a0fc73dc2a2ad3c9e0594603ed3d38a6
haskell/attoparsec
Alternative.hs
{-# LANGUAGE OverloadedStrings #-} -- This benchmark reveals a huge performance regression that showed up under GHC 7.8.1 ( ) . -- With GHC 7.6.3 and older , this program runs in 0.04 seconds . Under GHC 7.8.1 with ( < | > ) inlined , time jumps to 12 seconds ! import Control.Applicative import Data.Text (Te...
null
https://raw.githubusercontent.com/haskell/attoparsec/85510bdf2c0a42daaf2ab5ef126d5d94a648993a/benchmarks/Alternative.hs
haskell
# LANGUAGE OverloadedStrings # This benchmark reveals a huge performance regression that showed up avoid printing out the entire matched list
under GHC 7.8.1 ( ) . With GHC 7.6.3 and older , this program runs in 0.04 seconds . Under GHC 7.8.1 with ( < | > ) inlined , time jumps to 12 seconds ! import Control.Applicative import Data.Text (Text) import qualified Data.Attoparsec.Text as A import qualified Data.Text as T testParser :: Text -> Either ...
6afba779659fa5124911f4c6af5bbc76e3eb61781682f169e7ccfc1235c46fc2
odj/Ouch
Methods.hs
------------------------------------------------------------------------------ -------------------------------------------------------------------------------- -- Module : Ouch . Test . Methods -- Maintainer : -- Stability : Unstable -- Portability : Copyright ( c ) 2010 Ori...
null
https://raw.githubusercontent.com/odj/Ouch/ed20599214cf77b0cb81cc7cefb4cd9c35bc7cf7/Ouch/Test/Methods.hs
haskell
---------------------------------------------------------------------------- ------------------------------------------------------------------------------ Module : Ouch . Test . Methods Maintainer : Stability : Unstable Portability : ------------------------------------------------...
Copyright ( c ) 2010 Orion This file is part of Ouch , a chemical informatics toolkit written entirely in Haskell . Ouch 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 , e...
e795f8c7075d58e73b82f33c987f506305768f86d9cca125c5bba5ae367cc36c
vbmithr/ocaml-bitstamp-api
bitstamp.mli
module Credentials : sig type t = private { id: string; key: string; secret: string; } val make : id:string -> key:string -> secret:string -> t module Signature : sig val make : t -> string * string end end module type HTTP_CLIENT = sig include Cohttp.S.IO val get : string -> (string * string)...
null
https://raw.githubusercontent.com/vbmithr/ocaml-bitstamp-api/22d503236e7ec725dbdd0e0fdd0116970882b567/lib/bitstamp.mli
ocaml
module Credentials : sig type t = private { id: string; key: string; secret: string; } val make : id:string -> key:string -> secret:string -> t module Signature : sig val make : t -> string * string end end module type HTTP_CLIENT = sig include Cohttp.S.IO val get : string -> (string * string)...
c9fad4461bf5e6fc4daee2a7a18ae57115ed9473f0d3225d609cda5813c72648
rems-project/cerberus
colour.ml
Part of the escape ANSI 's " Select Graphic Rendition " parameters type ansi_style = | Black | Red | Green | Yellow | Blue | Magenta | Cyan | White | Bold | Underline | Blinking | Inverted (* TODO: the complete list *) type ansi_format = ansi_style list let int_fg = function | Black ...
null
https://raw.githubusercontent.com/rems-project/cerberus/dbfab2643ce6cedb54d2a52cbcb3673e03bfd161/util/colour.ml
ocaml
TODO: the complete list TODO: yuck!!!! NOTE: this takes a continuation otherwise the call to 'with_colour' won't work
Part of the escape ANSI 's " Select Graphic Rendition " parameters type ansi_style = | Black | Red | Green | Yellow | Blue | Magenta | Cyan | White | Bold | Underline | Blinking | Inverted type ansi_format = ansi_style list let int_fg = function | Black -> 30 | Red -> 31 | Gr...
ae0be728f128a056f714b987fde35ff1b3f346be09683d9aed418a305748d4f9
EFanZh/EOPL-Exercises
exercise-3.22.rkt
#lang eopl Exercise 3.22 [ ★ ★ ★ ] The concrete syntax of this section uses different syntax for a built - in operation , such as ;; difference, from a procedure call. Modify the concrete syntax so that the user of this language need not know which ;; operations are built-in and which are defined procedures. This ex...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-3.22.rkt
racket
difference, from a procedure call. Modify the concrete syntax so that the user of this language need not know which operations are built-in and which are defined procedures. This exercise may range from very easy to hard, depending on the parsing technology being used. Environments. Data structures. Helpers. Int...
#lang eopl Exercise 3.22 [ ★ ★ ★ ] The concrete syntax of this section uses different syntax for a built - in operation , such as (define empty-env-record? null?) (define environment? (lambda (x) (or (empty-env-record? x) (and (pair? x) (symbol? (car (car x))) (expval? (cad...
bf39b07f8f88d1fe70380fc2ac51a99b483b2de9340c03d678e0d96a4c7bbe97
soarlab/FPTaylor
interval2.mli
(* ========================================================================== *) (* A simple OCaml interval library *) (* *) (* *) Author : (* ...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/simple_interval/interval2.mli
ocaml
========================================================================== A simple OCaml interval library ...
Author : This file is distributed under the terms of the MIT license * A simple OCaml interval library . This interval library needs the OCaml [ Num ] module . It is assumed that all floating - point operations are IEEE 754 compatible and the rounding mode is to nearest . ...
af180c876e91cc91d6d37d2e661f6b41ff3d014b96a4dd7fb76ebcd3fed5350d
ryukinix/discrete-mathematics
data-type-definitions.hs
{-- Data Type Definitions --} data Colour = Red | Orange | Yellow | Green | Blue | Violet deriving Show -- A custom user-defined type for enumerates colors data Animal a b = Cat a | Dog b | Rat deriving Show data BreedOfCat = Siamese | Persian | Moggie derivi...
null
https://raw.githubusercontent.com/ryukinix/discrete-mathematics/1f779e05822c094af33745e2dd3c9a35c6dfb388/src/01-introduction-to-haskell/data-type-definitions.hs
haskell
- Data Type Definitions - A custom user-defined type for enumerates colors Deriving is like inherits properties from other type classes. data Maybe a = Nothing | Just a When using it? Example: If a function has a possibility of variability in our type result/input
data Colour = Red | Orange | Yellow | Green | Blue | Violet deriving Show data Animal a b = Cat a | Dog b | Rat deriving Show data BreedOfCat = Siamese | Persian | Moggie deriving (Show, Eq) The Monad Maybe wrapping a value phoneMessage :: Maybe Integer -...
68f77a7b483c488810dbf5381bba9556c41ff44451cfbdab2d810b11e3509b03
fons/cl-twitter
twitter-blocks.lisp
(in-package :twitter) ;; ;; Block Methods ;; ;; Block resources ;; blocks/create ;; blocks/destroy ;; blocks/exists ;; blocks/blocking ;; blocks/blocking/ids (define-element cursor-id ((ids (identity))) "a cursor element " (next-cursor-str "" nil) (previous-cursor-str "" nil) (next-cursor ...
null
https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/api/twitter-blocks.lisp
lisp
Block Methods Block resources blocks/create blocks/destroy blocks/exists blocks/blocking blocks/blocking/ids Destroys a friendship to the blocked user if it exists. Returns the blocked user in the requested format when successful. --------------------- end of blocks resources -------------------...
(in-package :twitter) (define-element cursor-id ((ids (identity))) "a cursor element " (next-cursor-str "" nil) (previous-cursor-str "" nil) (next-cursor "" nil) (ids "" nil) (previous-cursor "" nil)) (defun limit-length (lst) (if (> (length lst) 5) (format nil...
8ca83a5e158fbf878884b5d350ec8349121d3ce18c9477f9cb7888dc96502035
sru-systems/protobuf-simple
SInt64Msg.hs
-- Generated by protobuf-simple. DO NOT EDIT! module Types.SInt64Msg where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype SInt64Msg = SInt64Msg { value :: PB.Int64 } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default SInt64Msg where defaultVal = SInt64Ms...
null
https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/SInt64Msg.hs
haskell
Generated by protobuf-simple. DO NOT EDIT!
module Types.SInt64Msg where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype SInt64Msg = SInt64Msg { value :: PB.Int64 } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default SInt64Msg where defaultVal = SInt64Msg { value = PB.defaultVal } instance ...
03bf6ced3795f1b3c8ab0b717d804b679a19d708a4238fa2ddd65c05c57be316
sdiehl/dive-into-ghc
Main.hs
# LANGUAGE ScopedTypeVariables # module Main where import GHC import GHC.Paths (libdir) import DynFlags import Outputable import HscTypes import CorePrep import CoreToStg import Control.Monad.Trans showGhc :: (Outputable a) => a -> String showGhc = showPpr unsafeGlobalDynFlags banner :: MonadIO m => String -> m (...
null
https://raw.githubusercontent.com/sdiehl/dive-into-ghc/c9a5d71530864675f54808a5b5302e2bca4d1250/02-parser/Main.hs
haskell
ModuleSummary DesugaredModule
# LANGUAGE ScopedTypeVariables # module Main where import GHC import GHC.Paths (libdir) import DynFlags import Outputable import HscTypes import CorePrep import CoreToStg import Control.Monad.Trans showGhc :: (Outputable a) => a -> String showGhc = showPpr unsafeGlobalDynFlags banner :: MonadIO m => String -> m (...
87f4246e94f8140b01d11bdb995c25d99dea4f878b85a78474ecea27a00b6039
masatoi/cl-random-forest
mnist.lisp
-*- coding : utf-8 ; mode : lisp -*- set dynamic - space - size > = 2500 (defpackage :cl-random-forest/example/classification/mnist (:use #:cl #:cl-random-forest) (:import-from #:cl-random-forest/src/utils #:read-data)) (in-package :cl-random-forest/example/classification/mnist) ;;; ...
null
https://raw.githubusercontent.com/masatoi/cl-random-forest/71c8da62bdd5656866b966e0ea85fee1c82c47fb/example/classification/mnist.lisp
lisp
mode : lisp -*- Load Dataset ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /~cjlin/libsvmtools/datasets/multiclass.html#mnist Make Decision Tree ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Prediction Testing with training data Testing with test data ; ; ; ; ; ; ...
set dynamic - space - size > = 2500 (defpackage :cl-random-forest/example/classification/mnist (:use #:cl #:cl-random-forest) (:import-from #:cl-random-forest/src/utils #:read-data)) (in-package :cl-random-forest/example/classification/mnist) MNIST data (defparameter dir (asdf:syste...
3553c639fa816b9105a9c363100ec5bb1934d8b023b7421a15ec327b308ce4e5
racket/rackunit
tl.rkt
#lang racket/base (require rackunit) ;; test to make sure that the various check functions ;; return what they are promised to at the top-level ;; make drdr notice when a check prints something. (current-output-port (current-error-port)) (check-equal? (check + 1 2) (void)) (check-equal? (check-eq? 1 1) (void)) (che...
null
https://raw.githubusercontent.com/racket/rackunit/f94364891f201f90c055adb1521e5f038ce75411/rackunit-test/tests/rackunit/tl.rkt
racket
test to make sure that the various check functions return what they are promised to at the top-level make drdr notice when a check prints something.
#lang racket/base (require rackunit) (current-output-port (current-error-port)) (check-equal? (check + 1 2) (void)) (check-equal? (check-eq? 1 1) (void)) (check-equal? (check-not-eq? #f #t) (void)) (check-equal? (check-eqv? (expt 2 100) (expt 2 100)) (void)) (check-equal? (check-not-eqv? (expt 2 100) 1) (void)) (ch...
033988f980b8e3db8987c5155890d8743b6f221bd2cc4ddf7cda50186b7acc8f
BillHallahan/G2
FloodConsts.hs
-- Tries to eliminate a symbolic variable by replacing it with a constant. module G2.QuasiQuotes.FloodConsts ( floodConstantsChecking , floodConstants , floodConstant) where import G2.Execution.PrimitiveEval import G2.Language import qualified G2.Lan...
null
https://raw.githubusercontent.com/BillHallahan/G2/43e7a9f1e8f5131d91e28b54ce669e5e6782412b/src/G2/QuasiQuotes/FloodConsts.hs
haskell
Tries to eliminate a symbolic variable by replacing it with a constant. | Tries to eliminate a symbolic variable by replacing them with constants. path constraints obviously false | Tries to eliminate a symbolic variable by replacing them with constants.
module G2.QuasiQuotes.FloodConsts ( floodConstantsChecking , floodConstants , floodConstant) where import G2.Execution.PrimitiveEval import G2.Language import qualified G2.Language.ExprEnv as E import qualified G2.Language.PathConds as PC Returns ...
5532467af8118fa57fd70b8151d78d4e63e6c9a0715bcd26a3b9d0da037b69dd
futurice/haskell-mega-repo
Error.hs
{-# LANGUAGE OverloadedStrings #-} -- | Copyright : ( c ) 2015 Futurice Oy -- License : BSD3 Maintainer : < > module PlanMill.Types.Error ( PlanMillError(..), PlanMillErrorResponse(..), ) where import PlanMill.Internal.Prelude -- | TODO: it should be an 'Int' type Code = String data PlanMillErr...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/planmill-client/src/PlanMill/Types/Error.hs
haskell
# LANGUAGE OverloadedStrings # | License : BSD3 | TODO: it should be an 'Int' ^ Invalid response ^ Error response
Copyright : ( c ) 2015 Futurice Oy Maintainer : < > module PlanMill.Types.Error ( PlanMillError(..), PlanMillErrorResponse(..), ) where import PlanMill.Internal.Prelude type Code = String data PlanMillError deriving (Show, Typeable) instance Exception PlanMillError data PlanMillErrorResponse...
0f29962bd2b9f3b9fe09add529b78a5d195ec49a84ff6108d5eebe80cd8728fb
racket/drracket
syncheck-drracket-button.rkt
#lang racket/base (require racket/class string-constants/string-constant images/compile-time (for-syntax racket/base images/icons/tool images/icons/style)) (provide syncheck-drracket-button syncheck-bitmap syncheck-small-bitmap syncheck:button-callback) (define-lo...
null
https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/drracket/syncheck-drracket-button.rkt
racket
#lang racket/base (require racket/class string-constants/string-constant images/compile-time (for-syntax racket/base images/icons/tool images/icons/style)) (provide syncheck-drracket-button syncheck-bitmap syncheck-small-bitmap syncheck:button-callback) (define-lo...
efb8e971bae7debd3c6b0def4803d889a8e27f48b05617641568648db947b644
JoseFilipeFerreira/haskHell3D
Utils.hs
| Module : Utils Description : Module containing all Utils for haskHell 3D Module : Utils Description : Module containing all Utils for haskHell 3D -} module Utils where import Constantes import Data_structures import Graphics.Gloss.Geometry.Line import Graphics.Gloss.Data.Color import Graphics.Gloss....
null
https://raw.githubusercontent.com/JoseFilipeFerreira/haskHell3D/de47a9462b81c5c9e7e1a527de4893450c8ac21e/src/Utils.hs
haskell
| Calculate the area that is visible to the player | Calculate the point a given vector intersects a given Wall. Returns Nothing if it doesn't intercept. | Calculate the point a given vector intersects a given Enemy. Returns Nothing if it doesn't intercept. | Calculate the distance to a given Wall | Calculate the ...
| Module : Utils Description : Module containing all Utils for haskHell 3D Module : Utils Description : Module containing all Utils for haskHell 3D -} module Utils where import Constantes import Data_structures import Graphics.Gloss.Geometry.Line import Graphics.Gloss.Data.Color import Graphics.Gloss....
13de28944be0da2c8bff78c161fc668282bdd78bf3b09f01198ca001ec029914
promesante/hn-clj-pedestal-re-frame
core.clj
(ns hn-clj-pedestal-re-frame.core)
null
https://raw.githubusercontent.com/promesante/hn-clj-pedestal-re-frame/76b62dbbcc1c803c8e233809796eda75893cf7c9/src/clj/hn_clj_pedestal_re_frame/core.clj
clojure
(ns hn-clj-pedestal-re-frame.core)
1231f67a429c0fe3aad1ac6cd773d4953b3609f501f3587ee163ef9194864fb9
MaskRay/99-problems-ocaml
11.ml
type 'a elem = One of 'a | Many of int * 'a let ($) f g x = f (g x) let rec encode = let rec go c acc = function | [] -> [] | [a] -> (c+1,a)::acc | a :: (b :: _ as xs) -> if a = b then go (c+1) acc xs else go 0 ((c+1,a)::acc) xs in List.rev $ go 0 [] let encode_modified = List.map (function | (...
null
https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/11-20/11.ml
ocaml
type 'a elem = One of 'a | Many of int * 'a let ($) f g x = f (g x) let rec encode = let rec go c acc = function | [] -> [] | [a] -> (c+1,a)::acc | a :: (b :: _ as xs) -> if a = b then go (c+1) acc xs else go 0 ((c+1,a)::acc) xs in List.rev $ go 0 [] let encode_modified = List.map (function | (...
50cdc1b2732ce2ecf99e40c043a151fb4acc862e78243cacd61c5321bc2881ac
parapluu/Concuerror
depend_4_screen.erl
-module(depend_4_screen). -export([depend_4_screen/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. depend_4_screen() -> ets:new(table, [public, named_table]), ets:insert(table, {x, 0}), ets:insert(table, {y, 0}), ets:insert(table, {z, 0}), P = self(), P1 = spawn(fun() -> e...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/dpor_tests/src/depend_4_screen.erl
erlang
-module(depend_4_screen). -export([depend_4_screen/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. depend_4_screen() -> ets:new(table, [public, named_table]), ets:insert(table, {x, 0}), ets:insert(table, {y, 0}), ets:insert(table, {z, 0}), P = self(), P1 = spawn(fun() -> e...
c96ecf4eadcee83e3b8d3e8b939131f84c268558d78ef38861a5bb8cabd8b761
startalkIM/ejabberd
ejabberd_hooks.erl
%%%---------------------------------------------------------------------- File : ejabberd_hooks.erl Author : < > %%% Purpose : Manage hooks Created : 8 Aug 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne %%% %%% This program is free software; you can redistribute it and/or...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_hooks.erl
erlang
---------------------------------------------------------------------- Purpose : Manage hooks This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ...
File : ejabberd_hooks.erl Author : < > Created : 8 Aug 2004 by < > ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GN...