_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
dfcb17bb9a3342b06041fcc2a9c7c2831dd37ca4ffea52b769d83630997c59e6
hdbc/hdbc-odbc
Testbasics.hs
module Testbasics(tests) where import Test.HUnit import Database.HDBC import TestUtils import System.IO import Control.Exception openClosedb = sqlTestCase $ do dbh <- connectDB disconnect dbh multiFinish = dbTestCase (\dbh -> do sth <- prepare dbh "SELECT 1 + 1" r <- execute sth [] assert...
null
https://raw.githubusercontent.com/hdbc/hdbc-odbc/06833d77799f16634d2038bcdc308c35d4752cdd/testsrc/Testbasics.hs
haskell
Now try a rollback Now try another commit Let's try a rollback. And now a commit.
module Testbasics(tests) where import Test.HUnit import Database.HDBC import TestUtils import System.IO import Control.Exception openClosedb = sqlTestCase $ do dbh <- connectDB disconnect dbh multiFinish = dbTestCase (\dbh -> do sth <- prepare dbh "SELECT 1 + 1" r <- execute sth [] assert...
0a2449d969c92f4dd6f297bad3ca4c617a5be0143444f6790771c12e8d2370c3
google/ormolu
transform-multi-line1.hs
# LANGUAGE TransformListComp # foo' xs ys = [ (x, y) | x <- xs, y <- ys, First comment Second comment ]
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/comprehension/transform-multi-line1.hs
haskell
# LANGUAGE TransformListComp # foo' xs ys = [ (x, y) | x <- xs, y <- ys, First comment Second comment ]
6bfd515bc20055313f449ab7ba062b64b47ed3cc0969e315754a318919df1a32
NoRedInk/haskell-libraries
Kafka.hs
{-# LANGUAGE GADTs #-} | A module for creating great logs in code using . module Log.Kafka ( emptyDetails, Details, topic, partitionId, key, contents, createTime, logAppendTime, processAttempt, assignedPartitions, pausedPartitions, timeSinceLastRebalance, requestId,...
null
https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-observability/src/Log/Kafka.hs
haskell
# LANGUAGE GADTs # | A type describing a kafka message being processed by a consumer. > emptyDetails > { topic = Just "kafka-topic" > } | The topic name of the message. | The partition id of the message. | The key of the message (if it has one). If a key is provided by a message producer it is used to dete...
| A module for creating great logs in code using . module Log.Kafka ( emptyDetails, Details, topic, partitionId, key, contents, createTime, logAppendTime, processAttempt, assignedPartitions, pausedPartitions, timeSinceLastRebalance, requestId, mkContents, Co...
156337f0f55286062146b3720d82d8fc1d36242a4999a1f86e158fa782911996
haskell-lisp/liskell
GHCAPICompat.hs
-- -*-haskell-*- -- --------------------------------------------------------------------------- Liskell -- -- Author(s): -- --------------------------------------------------------------------------- module GHCAPICompat where import HsSyn import RdrHsSyn cHsModule a b c d e = HsModule a b c d e emptyHaddockM...
null
https://raw.githubusercontent.com/haskell-lisp/liskell/6fed2294bde7852fac7fd805bff6b7e4dde5aa81/GHCAPICompat.hs
haskell
-*-haskell-*- --------------------------------------------------------------------------- Author(s): ---------------------------------------------------------------------------
Liskell module GHCAPICompat where import HsSyn import RdrHsSyn cHsModule a b c d e = HsModule a b c d e emptyHaddockModInfo Nothing cmkClassDecl a b c d = mkClassDecl a b c d [] [] ccvBindsAndSigs x = let (binds, sigs, _, _ ) = cvBindsAndSigs x in (binds, sigs) cConDecl a b c d e f = ConDecl a ...
7354f9223fa91f426faf3c8e8980e8d4fca5e2f9169190217c2cd1ff8aa97c2a
rudolph-miller/cl-gists
user.lisp
(in-package :cl-user) (defpackage cl-gists-test.user (:use :cl :prove :cl-gists-test.init :cl-gists) (:import-from :cl-gists.user :make-user)) (in-package :cl-gists-test.user) (plan nil) (subtest "user" (let ((user (make-user :login "octocat" :id ...
null
https://raw.githubusercontent.com/rudolph-miller/cl-gists/bcf3687f0af8b2eb5acaeda5db94d67446e56daf/t/user.lisp
lisp
(in-package :cl-user) (defpackage cl-gists-test.user (:use :cl :prove :cl-gists-test.init :cl-gists) (:import-from :cl-gists.user :make-user)) (in-package :cl-gists-test.user) (plan nil) (subtest "user" (let ((user (make-user :login "octocat" :id ...
36e3f22cf6039cb640e414c53eb312c4690937340a0264090d3bdfe408e3192e
quan-nh/adventofcode
day8.clj
(ns adventofcode.day8 (:require [clojure.string :as str])) (defn decrease [s] (- (count s) (-> s (str/replace #"^\"" "") (str/replace #"\"$" "") (str/replace #"\\\"" "\"") (str/replace #"\\\\" "q") (str/replace #"\\x[0-9a-f]{2}" "q") count))) (defn increa...
null
https://raw.githubusercontent.com/quan-nh/adventofcode/98542934a121d1df85dd271d28fedc1f25b98206/src/adventofcode2015/day8.clj
clojure
(ns adventofcode.day8 (:require [clojure.string :as str])) (defn decrease [s] (- (count s) (-> s (str/replace #"^\"" "") (str/replace #"\"$" "") (str/replace #"\\\"" "\"") (str/replace #"\\\\" "q") (str/replace #"\\x[0-9a-f]{2}" "q") count))) (defn increa...
086c39c260a154f0dc83bddbe66282dd273e189f4c16b59268569b89d49f3b14
google/mlir-hs
NativeSpec.hs
Copyright 2021 Google LLC -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, software distributed un...
null
https://raw.githubusercontent.com/google/mlir-hs/a1d0a937e691e8d90cb4ab9197abd7da5772e03d/test/MLIR/NativeSpec.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2021 Google LLC Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module MLIR.NativeSpec where import Test.Hspec hiding (shouldContain, shouldStartWith) import Text.RawString.QQ import Data.Int import Data.Maybe...
74e0c3a4a3878e071c21fdd35003b56e89b6c6b805aebbcf9c8e7d576c83fc63
CodyReichert/qi
reload.lisp
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 " the conditions and ENSURE - SSL - FUNCALL are by . " ;;; ;;; See LICENSE for details. ;;; We do this in an extra file so that it happens ;;; - after the asd file has been loaded, so that users can ;;; customize *libssl-pathname* between loading t...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl%2Bssl-latest/reload.lisp
lisp
See LICENSE for details. We do this in an extra file so that it happens - after the asd file has been loaded, so that users can customize *libssl-pathname* between loading the asd and LOAD-OPing the actual sources - before ssl.lisp is loaded, which needs the library at compilation time on some i...
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 " the conditions and ENSURE - SSL - FUNCALL are by . " - but not every time ffi.lisp is re - loaded as would happen if we put this directly into ffi.lisp #+xcvb (module (:depends-on ("package"))) (in-package :cl+ssl) OpenBSD needs to load ...
630b1b4eb3be1c83718daad1d481fd0331b46b2fbebcbbdfd281dcddb50d48fe
albertoruiz/easyVision
crosscorr.hs
import Vision.GUI import Util.Geometry ( Polyline(polyPts) ) import Image.Processing ( Image, size, crossCorr, copy, grayf, crossCorrLoc ) import Image.ROI ( topLeft, roi2poly ) sel = grayf fun = crossCorr main = run $ getTemplate >>> observe "template" snd >>> arr (\(x,t) -> ((sel x,t), fun t (sel ...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/examples/crosscorr.hs
haskell
import Vision.GUI import Util.Geometry ( Polyline(polyPts) ) import Image.Processing ( Image, size, crossCorr, copy, grayf, crossCorrLoc ) import Image.ROI ( topLeft, roi2poly ) sel = grayf fun = crossCorr main = run $ getTemplate >>> observe "template" snd >>> arr (\(x,t) -> ((sel x,t), fun t (sel ...
104b1fe19bea64e8d85270b176fa8584e06ad23bea93f8092ce378872a0c1599
MegaLoler/Music
instrument.lisp
(in-package :music) (defclass instrument () () (:documentation "Represents an instrument to play musical notes.")) (defclass adsr-instrument (instrument) ((adsr :initarg :asdr :initform (make-instance 'adsr) :type adsr :accessor adsr)) (:documentation "An instrument with an ADSR envelope.")) ...
null
https://raw.githubusercontent.com/MegaLoler/Music/6d69042f6ed98994d3f2ec474c71c569e0ee06be/src/instrument.lisp
lisp
(in-package :music) (defclass instrument () () (:documentation "Represents an instrument to play musical notes.")) (defclass adsr-instrument (instrument) ((adsr :initarg :asdr :initform (make-instance 'adsr) :type adsr :accessor adsr)) (:documentation "An instrument with an ADSR envelope.")) ...
cdecbe1b4d5439d87e276810bba652466e8c67085c33e1130ed64f731278f274
ocaml/dune
seq.mli
type 'a t = 'a Stdlib.Seq.t and +'a node = 'a Stdlib.Seq.node = | Nil | Cons of 'a * 'a t val empty : 'a t val return : 'a -> 'a t val cons : 'a -> 'a t -> 'a t val append : 'a t -> 'a t -> 'a t val concat : 'a t t -> 'a t val map : 'a t -> f:('a -> 'b) -> 'b t val filter : 'a t -> f:('a -> bool) -> 'a t v...
null
https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/seq.mli
ocaml
type 'a t = 'a Stdlib.Seq.t and +'a node = 'a Stdlib.Seq.node = | Nil | Cons of 'a * 'a t val empty : 'a t val return : 'a -> 'a t val cons : 'a -> 'a t -> 'a t val append : 'a t -> 'a t -> 'a t val concat : 'a t t -> 'a t val map : 'a t -> f:('a -> 'b) -> 'b t val filter : 'a t -> f:('a -> bool) -> 'a t v...
0b82ba133c77c8ba8b7a93cbeec439de1f1d704449737288ff05341fb4b6376e
Tritlo/spectacular
Paths.hs
{-# LANGUAGE OverloadedStrings #-} | Representations of paths in an FTA , data structures for -- equality constraints over paths, algorithms for saturating these constraints module Data.ECTA.Internal.Paths ( Path(.., EmptyPath, ConsPath) , unPath , path , Pathable(..) , pathHeadUnsafe , pathTailUnsa...
null
https://raw.githubusercontent.com/Tritlo/spectacular/00621f4f0f03e5d0afea3c730434a8842e473546/src/Data/ECTA/Internal/Paths.hs
haskell
# LANGUAGE OverloadedStrings # equality constraints over paths, algorithms for saturating these constraints ----------------------------------------------------- --------------------------------------------------------------------- ------------------------- Misc / general ---------------------------- ---------------...
| Representations of paths in an FTA , data structures for module Data.ECTA.Internal.Paths ( Path(.., EmptyPath, ConsPath) , unPath , path , Pathable(..) , pathHeadUnsafe , pathTailUnsafe , isSubpath , isStrictSubpath , substSubpath , smallestNonempty , largestNonempty , getMaxNonemptyInd...
95aa730f744d2ad241f129e2c5061d5eaf32c36de870de01c5f786ffa08f59e3
wireapp/wire-server
TeamsIntra.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/bd9d33f7650f1bc47700601a029df2672d4998a6/libs/wire-api/src/Wire/API/Routes/Internal/Galley/TeamsIntra.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along # LANGUAGE DataKinds # # LANGUAGE...
3b44c2fb5afc7ea367072bf5738e92c62f21fd5f6dbd95170adfd1964754832d
flosell/lambdacd
dev.cljs
(ns ^:figwheel-no-load lambdacd.dev (:require [lambdacd.ui-core :as core] [figwheel.client :as figwheel :include-macros true] [weasel.repl :as weasel] [lambdacd.testutils :refer [path]] [lambdacd.styleguide :as styleguide] [reagent.core :as r])) (enable-con...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/env/dev/cljs/lambdacd/dev.cljs
clojure
(ns ^:figwheel-no-load lambdacd.dev (:require [lambdacd.ui-core :as core] [figwheel.client :as figwheel :include-macros true] [weasel.repl :as weasel] [lambdacd.testutils :refer [path]] [lambdacd.styleguide :as styleguide] [reagent.core :as r])) (enable-con...
0c67a29f097bd68b98bab8ba715f645cd5a44334853c2678a6eb2a7f6b4a2e4d
eeng/mercurius
pub_sub.clj
(ns mercurius.core.adapters.messaging.pub-sub (:require [clojure.spec.alpha :as s])) (defprotocol PubSub (publish [this topic message] "Sends the `message` to the specified `topic` (string).") (subscribe [this topic-pattern opts] "Allows to be notified when a message is sent to a topic matching `topic-p...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/core/adapters/messaging/pub_sub.clj
clojure
(ns mercurius.core.adapters.messaging.pub-sub (:require [clojure.spec.alpha :as s])) (defprotocol PubSub (publish [this topic message] "Sends the `message` to the specified `topic` (string).") (subscribe [this topic-pattern opts] "Allows to be notified when a message is sent to a topic matching `topic-p...
0f2175f4648755ebe3b663348024a2b011945e8b5b284261df7ddca9089fad70
unisonweb/unison
UserInfo.hs
module Unison.Auth.UserInfo where import qualified Data.Aeson as Aeson import qualified Data.Aeson.Types as Aeson import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.Text as Text import qualified Data.Text.Encoding as Text import qualified Network.HTTP.Client as HTTP import qualified Network.HTTP.C...
null
https://raw.githubusercontent.com/unisonweb/unison/69d27be69621072848f7f82ce401ffea311c7a31/unison-cli/src/Unison/Auth/UserInfo.hs
haskell
| Get user info for an authenticated user.
module Unison.Auth.UserInfo where import qualified Data.Aeson as Aeson import qualified Data.Aeson.Types as Aeson import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.Text as Text import qualified Data.Text.Encoding as Text import qualified Network.HTTP.Client as HTTP import qualified Network.HTTP.C...
87869f4be441e171608210a2345a9418117e86ad82502a4f73548a5730f7fa91
aiju/lilith
scope.ml
module H = Hashtbl open Ast module Def = struct type t = Symbol.t * Symbol.t let compare = compare end module Sd = Set.Make(Def) type blocktype = BSeq | BFix | BLet type block = { bid: int; typ: blocktype; mutable ast: meta ast list; up: block option; mutable sub: block list; mutable next: block list; mutable...
null
https://raw.githubusercontent.com/aiju/lilith/56a34309abb016d75c7aa25937f9350f337287d7/eva/scope.ml
ocaml
module H = Hashtbl open Ast module Def = struct type t = Symbol.t * Symbol.t let compare = compare end module Sd = Set.Make(Def) type blocktype = BSeq | BFix | BLet type block = { bid: int; typ: blocktype; mutable ast: meta ast list; up: block option; mutable sub: block list; mutable next: block list; mutable...
887d4a7b8b49dc715b26a50717a173ad4a26c570eeeac98fdcdee44b2ae6fa72
ScrambledEggsOnToast/needle
Parse.hs
| Module : Control . Arrow . Needle . Description : Parsing needle diagrams Copyright : ( c ) 2014 License : MIT Maintainer : This module 's main export is ' parseNeedle ' , which parses a needle diagram into a ` NeedleArrow ` . Module : Control.Arrow.Needle.Parse Description : P...
null
https://raw.githubusercontent.com/ScrambledEggsOnToast/needle/3c0d6a9c106d816871a94ad956955f8bf396db5c/Control/Arrow/Needle/Parse.hs
haskell
* Parsing needles * Errors ------------------------------ Types ------------------------------ | The datatype representing a generic needle arrow. | Errors in parsing. | Present the error. ------------------------------ String -> NeedleArrow ------------------------------ | Parse a string to a needle ----------...
| Module : Control . Arrow . Needle . Description : Parsing needle diagrams Copyright : ( c ) 2014 License : MIT Maintainer : This module 's main export is ' parseNeedle ' , which parses a needle diagram into a ` NeedleArrow ` . Module : Control.Arrow.Needle.Parse Description : P...
961a365b8f1f36f5658921e67565ff95ea3737ad0a092939a0073f4d121a3f02
ghc/packages-dph
Testsuite.hs
module DPH.Testsuite ( module DPH.Testsuite.Preproc, module DPH.Testsuite.Testcase, module DPH.Testsuite.Utils, module Test.QuickCheck ) where import DPH.Testsuite.Preproc import DPH.Testsuite.Testcase import DPH.Testsuite.Utils import Test.QuickCheck
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-test/framework/DPH/Testsuite.hs
haskell
module DPH.Testsuite ( module DPH.Testsuite.Preproc, module DPH.Testsuite.Testcase, module DPH.Testsuite.Utils, module Test.QuickCheck ) where import DPH.Testsuite.Preproc import DPH.Testsuite.Testcase import DPH.Testsuite.Utils import Test.QuickCheck
61c3895c0552a18958e485b9273efc89d3b6f0cb318f0bb958497aa07f74e7f8
prestancedesign/pingcrm-clojure
users.clj
(ns pingcrm.handlers.users (:require [crypto.password.bcrypt :as password] [inertia.middleware :as inertia] [pingcrm.models.users :as db] [ring.util.response :as rr] [struct.core :as st])) (def user-schema [[:first_name st/required st/string] [:last_name st/requir...
null
https://raw.githubusercontent.com/prestancedesign/pingcrm-clojure/1a0aa343d7ab1cfa3a042cbd948022b22c491c7d/src/clj/pingcrm/handlers/users.clj
clojure
(ns pingcrm.handlers.users (:require [crypto.password.bcrypt :as password] [inertia.middleware :as inertia] [pingcrm.models.users :as db] [ring.util.response :as rr] [struct.core :as st])) (def user-schema [[:first_name st/required st/string] [:last_name st/requir...
8079805f829141c485742e3a55d7293cc57ea83d2b7d42c268bcb79be8650167
Hexstream/compatible-metaclasses
package.lisp
(cl:defpackage #:compatible-metaclasses (:use #:cl) (:shadowing-import-from #:enhanced-find-class #:find-class) (:shadow #:class #:standard-class #:substitute) (:export #:class #:substitute #:standard-class #:standard-metaclass #:validate-as-mi...
null
https://raw.githubusercontent.com/Hexstream/compatible-metaclasses/7e0e44bc4944c9669adb4eed2539df1b5e3cab14/package.lisp
lisp
(cl:defpackage #:compatible-metaclasses (:use #:cl) (:shadowing-import-from #:enhanced-find-class #:find-class) (:shadow #:class #:standard-class #:substitute) (:export #:class #:substitute #:standard-class #:standard-metaclass #:validate-as-mi...
08549d5bdc54375a41e15cd15b938e94706e7c2dbc1b3922b128a907fb4e653f
samirose/sicp-compiler-project
or.scm
(define-library (or) (export empty-or-is-false or-one-false-is-false or-one-non-false-value-is-value or-two-non-falses-is-first-value or-any-non-false-is-non-false or-with-complex-expressions or-evaluates-expressions-from-left-to-right or-true-short-circuits-to-true) (import (sch...
null
https://raw.githubusercontent.com/samirose/sicp-compiler-project/2bc8a481044b5a653408f8595b2a2396600b8ad6/test-compiler/or.scm
scheme
(define-library (or) (export empty-or-is-false or-one-false-is-false or-one-non-false-value-is-value or-two-non-falses-is-first-value or-any-non-false-is-non-false or-with-complex-expressions or-evaluates-expressions-from-left-to-right or-true-short-circuits-to-true) (import (sch...
3f466ec93f7196c3497764e7d5793a1f6270038b28e7ea79d52b58ea98fcf273
FranklinChen/hugs98-plus-Sep2006
Double.hs
Double.hs ( adapted from double.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2005 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This is a simple double buffered program . Pressing the left mouse...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/GLUT/examples/RedBook/Double.hs
haskell
Request double buffer display mode. Register mouse input callback functions
Double.hs ( adapted from double.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2005 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This is a simple double buffered program . Pressing the left mouse...
5cca98ef3b4b04c58a8ddfe2ddd3111bb04f2836410a9d08a3c316ea07c4eb39
factisresearch/large-hashable
MD5.hs
| An implementation of ' HashAlgorithm ' for ( ) . {-# LANGUAGE BangPatterns #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE CApiFFI # module Data.LargeHashable.MD5 ( MD5Hash(..), md5HashAlgorithm, runMD5 ) where keep imports in alphabetic order ( in Emacs , use " M - x sort - lines " ) import Data.LargeHa...
null
https://raw.githubusercontent.com/factisresearch/large-hashable/823772be60e1314c4cbe7ac14c7633b2b32fbeea/src/Data/LargeHashable/MD5.hs
haskell
# LANGUAGE BangPatterns # phantom type argument
| An implementation of ' HashAlgorithm ' for ( ) . # LANGUAGE ScopedTypeVariables # # LANGUAGE CApiFFI # module Data.LargeHashable.MD5 ( MD5Hash(..), md5HashAlgorithm, runMD5 ) where keep imports in alphabetic order ( in Emacs , use " M - x sort - lines " ) import Data.LargeHashable.Intern import Data.Larg...
39f1f4eeef59e90a775739433cae9b052d4581d3454ede91b6b22e4a2d405bf7
cyverse-archive/DiscoveryEnvironmentBackend
common.clj
(ns kifshare.common (:require [clojure.string :as string] [kifshare.config :as cfg]) (:use [hiccup.core :only [html]] [hiccup.page :only [include-css include-js html5]])) (defn parse-accept-headers "Parses out the accept headers and returns a list of the acceptable content types." [reque...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/kifshare/src/kifshare/common.clj
clojure
(ns kifshare.common (:require [clojure.string :as string] [kifshare.config :as cfg]) (:use [hiccup.core :only [html]] [hiccup.page :only [include-css include-js html5]])) (defn parse-accept-headers "Parses out the accept headers and returns a list of the acceptable content types." [reque...
717a15e4aa968e9333f5ce4bd88c274fb5e40b0167094d73737d84c3090cc02d
xapix-io/axel-f
json.cljc
(ns axel-f.excel.json (:require [axel-f.buddy.codecs.json :as json])) (defn encode* "Returns a JSON-encoding String for the given object." [^{:doc "Object to encode"} to-encode] (json/generate-string to-encode)) (def encode #'encode*) (defn decode* "Returns an object corresponding to the given JSON-encoded...
null
https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/src/axel_f/excel/json.cljc
clojure
(ns axel-f.excel.json (:require [axel-f.buddy.codecs.json :as json])) (defn encode* "Returns a JSON-encoding String for the given object." [^{:doc "Object to encode"} to-encode] (json/generate-string to-encode)) (def encode #'encode*) (defn decode* "Returns an object corresponding to the given JSON-encoded...
e8497ebcdc3d50524a5e2ade13958f859b8de98629a7d8efe3d8442a7f238c87
exercism/scheme
test.scm
(load "test-util.ss") (define test-cases `((test-success "no primes under two" equal? sieve '(1) '()) (test-success "find first prime" equal? sieve '(2) '(2)) (test-success "find primes up to 10" equal? sieve '(10) '(2 3 5 7)) (test-success "limit is prime" equal? sieve '(13) '(2 3 5 7 11 13)...
null
https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/sieve/test.scm
scheme
(load "test-util.ss") (define test-cases `((test-success "no primes under two" equal? sieve '(1) '()) (test-success "find first prime" equal? sieve '(2) '(2)) (test-success "find primes up to 10" equal? sieve '(10) '(2 3 5 7)) (test-success "limit is prime" equal? sieve '(13) '(2 3 5 7 11 13)...
d1446c30e8c87900d6e006f99f18a53248324c537817bdfb4f69afd17d43465d
wkok/openai-clojure
sse.clj
(ns ^:no-doc wkok.openai-clojure.sse (:require [hato.client :as http] [clojure.core.async :as a] [clojure.string :as string] [cheshire.core :as json]) (:import (java.io InputStream))) (def event-mask (re-pattern (str "(?s).+?\n\n"))) (defn deliver-events [events {:keys [on-next]}] (when on-next ...
null
https://raw.githubusercontent.com/wkok/openai-clojure/5d781bae62001aa8d597fb62a3ed3bcc55ab1b66/src/wkok/openai_clojure/sse.clj
clojure
Input stream closed, exiting read-loop Output stream closed, exiting read-loop
(ns ^:no-doc wkok.openai-clojure.sse (:require [hato.client :as http] [clojure.core.async :as a] [clojure.string :as string] [cheshire.core :as json]) (:import (java.io InputStream))) (def event-mask (re-pattern (str "(?s).+?\n\n"))) (defn deliver-events [events {:keys [on-next]}] (when on-next ...
d53392ab1e5b4fc286b97f50e26ed4c2a0b4eb9ee41986a3efb625e2bbb16a1b
archhaskell/cblrepo
Main.hs
- Copyright 2011 - 2014 Per - - 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 , s...
null
https://raw.githubusercontent.com/archhaskell/cblrepo/83316afca397b1e5e526a69d360efd9cb260921b/src/Main.hs
haskell
{ { { 1 command line arguments
- Copyright 2011 - 2014 Per - - 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 , s...
1ca448a4e204d779c6ee3ad4369547ff6311ef7e0a33cddaf3a7215d89239c97
mmottl/gsl-ocaml
eigen.mli
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 (** Eigensystems *) open Vectmat * { 3 Real Symmetric Matrices } type symm_ws val make_symm_ws : int -> symm_ws external _symm : ...
null
https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/eigen.mli
ocaml
* Eigensystems
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 open Vectmat * { 3 Real Symmetric Matrices } type symm_ws val make_symm_ws : int -> symm_ws external _symm : mat -> vec -> symm_w...
9e33342474d0b9105d2adee715a09b22120f6e06ccf9245e806ea85e1ecbb367
sarabander/p2pu-sicp
3.70.scm
Takes two streams of pairs and a weight function (define (merge-weighted weight s1 s2) (cond ((stream-null? s1) s2) ((stream-null? s2) s1) (else (let ((s1car (stream-car s1)) (s2car (stream-car s2))) (cond ((<= (weight s1car) (weight s2car)) (con...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/3.5/3.70.scm
scheme
Takes two streams of pairs and a weight function (define (merge-weighted weight s1 s2) (cond ((stream-null? s1) s2) ((stream-null? s2) s1) (else (let ((s1car (stream-car s1)) (s2car (stream-car s2))) (cond ((<= (weight s1car) (weight s2car)) (con...
c2a8b802ce9ddf412bf28e54a6b594767a026bb2002d95d3ca9f181735b9e278
7bridges-eu/clj-odbp
db.clj
Copyright 2017 7bridges s.r.l . ;; 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 distributed u...
null
https://raw.githubusercontent.com/7bridges-eu/clj-odbp/5a92515c2e4c6198bd1093ace83da96e30b90829/src/clj_odbp/operations/db.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2017 7bridges s.r.l . distributed under the License is distributed on an " AS IS " BASIS , (ns clj-odbp.operations.db (:require [clj-odbp [constants :as consts] [utils :refer [decode encode]]] [clj-odbp.network.sessions :as sessions] [clj-odbp.operation...
1b022ff23b27c7249c5ab60c6cff81eaef980229e76460abf07ce12ce8573b55
erlangbureau/jamdb_oracle
jamdb_oracle.erl
-module(jamdb_oracle). -vsn("0.5.4"). -behaviour(gen_server). %% API -export([start_link/1, start/1]). -export([stop/1]). -export([sql_query/2, sql_query/3]). %% gen_server callbacks -export([init/1, terminate/2]). -export([handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3]). -define(default_time...
null
https://raw.githubusercontent.com/erlangbureau/jamdb_oracle/283ede9dc66a9e8423d510fa2b91c5c48fc371ee/src/jamdb_oracle.erl
erlang
API gen_server callbacks API gen_server callbacks Error types: socket, remote, local
-module(jamdb_oracle). -vsn("0.5.4"). -behaviour(gen_server). -export([start_link/1, start/1]). -export([stop/1]). -export([sql_query/2, sql_query/3]). -export([init/1, terminate/2]). -export([handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3]). -define(default_timeout, 5000). -spec start_link(j...
027fe26085bdc0ab207d32fd0e82188e52e3fcb4223582aca828c1ce7076eb47
stylewarning/quickutil
conses.lisp
(in-package #:quickutil-utilities.utilities) (defutil recons (:version (1 . 0) :category conses) "Reuse the cons cell `old-cons`, replacing its CAR with `a` and CDR with `b`." #>%%%> (defun recons (a b old-cons) %%DOC (psetf (car old-cons) a (cdr old-cons) b) old-cons) %...
null
https://raw.githubusercontent.com/stylewarning/quickutil/5adb3463d99095145325c4013117bd08a8f6cac2/quickutil-utilities/utilities/conses.lisp
lisp
(in-package #:quickutil-utilities.utilities) (defutil recons (:version (1 . 0) :category conses) "Reuse the cons cell `old-cons`, replacing its CAR with `a` and CDR with `b`." #>%%%> (defun recons (a b old-cons) %%DOC (psetf (car old-cons) a (cdr old-cons) b) old-cons) %...
f9b9059a431144d3e2a4b607a034098d19a0e73fdc55693c0094a465dfa170a1
saman-pasha/LCC
mode.lisp
(defun lcc-add-keywords (face-name keyword-rules) (let* ((keyword-list (mapcar #'(lambda (x) (symbol-name (cdr x))) keyword-rules)) (keyword-regexp (concat "(\\(" (regexp-opt keyword-list) "\\)[ \t\n]*"))) (font-lock-add-keywords 'lisp-mode `((,keyword-regexp 1 ',face-name))))...
null
https://raw.githubusercontent.com/saman-pasha/LCC/00087c057676469fc6d6467de0ea563e1967af21/mode.lisp
lisp
(defun lcc-add-keywords (face-name keyword-rules) (let* ((keyword-list (mapcar #'(lambda (x) (symbol-name (cdr x))) keyword-rules)) (keyword-regexp (concat "(\\(" (regexp-opt keyword-list) "\\)[ \t\n]*"))) (font-lock-add-keywords 'lisp-mode `((,keyword-regexp 1 ',face-name))))...
6dd43426da34c3f1c8a67bfc98f3bbc9b91ce47e762d95b8952d6e7eb8ed2b58
nuprl/gradual-typing-performance
lib.rkt
#lang racket/base (provide CONST) (define CONST 5)
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/test/path-overlap/src/lib.rkt
racket
#lang racket/base (provide CONST) (define CONST 5)
005696b7a41acc545f7d354a5002c33c32d66c8f2b48d98b54a0cb2bc5f9d2d0
dwayne/eopl3
translator.test.rkt
#lang racket (require "./parser.rkt") (require "./translator.rkt") (require rackunit) (check-equal? (translate (parse #<<CODE let x = 37 in proc (y) let z = -(y, x) in -(x, y) CODE )) (a-program (nameless-let-exp (const-exp 37) (nameless-proc-exp (nameless-let-exp (diff-exp ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.42-ATTEMPT-1/translator.test.rkt
racket
#lang racket (require "./parser.rkt") (require "./translator.rkt") (require rackunit) (check-equal? (translate (parse #<<CODE let x = 37 in proc (y) let z = -(y, x) in -(x, y) CODE )) (a-program (nameless-let-exp (const-exp 37) (nameless-proc-exp (nameless-let-exp (diff-exp ...
f393607992748bd13991e05c113cd546d86ade55841f9a934edbbf1d40d23bf3
backtracking/ocamlgraph
testgraphml.ml
(******************************************************************************) (* *) Copyright ( C ) 2012 < > (* *) (* This library is free software...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/tests/testgraphml.ml
ocaml
**************************************************************************** This library is free software: you can redistribute it and/or modify it under t...
Copyright ( C ) 2012 < > published by the Free Software Foundation , either version 3 of the exception to the GNU Lesser General Public License applies to this module V = struct type t = int let compare = compare let hash i = i let equal = (=) end module G = Graph.Impe...
ec1d108711dbe329b1fc4c9650614871f162e9d52fd311c6e9e8187c46652fe1
mokus0/hs-hdf5
LCPL.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Bindings.HDF5.PropertyList.LCPL ( module Bindings.HDF5.PropertyList.STRCPL , LCPL , LinkCreationPropertyList(..) ) where import Bindings.HDF5.Core import Bindings.HDF5.PropertyList.STRCPL class StringCreationPropertyList t => LinkCreationPropert...
null
https://raw.githubusercontent.com/mokus0/hs-hdf5/196e0d714a34e97358be9a907af0b93b4c7922e3/src/Bindings/HDF5/PropertyList/LCPL.hs
haskell
TODO: implement functions
# LANGUAGE GeneralizedNewtypeDeriving # module Bindings.HDF5.PropertyList.LCPL ( module Bindings.HDF5.PropertyList.STRCPL , LCPL , LinkCreationPropertyList(..) ) where import Bindings.HDF5.Core import Bindings.HDF5.PropertyList.STRCPL class StringCreationPropertyList t => LinkCreationPropert...
c16f972c12eb2116bdd5f24f6f0097eb8120f52e3c1d19f08f1764ef5739b8e5
karimarttila/clojure
session_common.clj
(ns simpleserver.session.session-common (:require [clojure.tools.logging :as log] [buddy.sign.jwt :as buddy-jwt] [clj-time.core :as c-time] [simpleserver.util.config :as ss-config] )) (def my-hex-secret "Creates dynamically a hex secret when the server boots." ((fn...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/webstore-demo/simple-server/src/simpleserver/session/session_common.clj
clojure
Some other issue, throw it.
(ns simpleserver.session.session-common (:require [clojure.tools.logging :as log] [buddy.sign.jwt :as buddy-jwt] [clj-time.core :as c-time] [simpleserver.util.config :as ss-config] )) (def my-hex-secret "Creates dynamically a hex secret when the server boots." ((fn...
f1ef11562b85153cebe55695115e1d1f1ef1f963d00c41e124525420d81b63b5
alexandergunnarson/quantum
form.cljc
(ns quantum.untyped.core.form (:require [quantum.untyped.core.core :as ucore :refer [defalias]] [quantum.untyped.core.form.evaluate :refer [case-env*]] [quantum.untyped.core.form.generate :as ufgen])) (ucore/log-this-ns) (defn core-symbol [env sym] (symbol (str (case-env* env :cljs ...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/core/form.cljc
clojure
===== Code quoting ===== ;; QUOTE+ -------------
(ns quantum.untyped.core.form (:require [quantum.untyped.core.core :as ucore :refer [defalias]] [quantum.untyped.core.form.evaluate :refer [case-env*]] [quantum.untyped.core.form.generate :as ufgen])) (ucore/log-this-ns) (defn core-symbol [env sym] (symbol (str (case-env* env :cljs ...
711c53389efa31fc70207baab461a28a13dc9456a01fa98c9c25b9fc9be795d0
binsec/haunted
riscv_arch.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/disasm/riscv/riscv_arch.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
3c242ed3a390736308927b64e2953ab216d2f2d39598357a123fdc2c89229d93
finnishtransportagency/harja
kartta_debug.cljs
(ns harja.ui.kartta-debug) (defn kartta-layers [& args] ) (defn aseta-kartta-debug-sijainti [& args] ) (defn nayta-kartan-debug [] )
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljs-prod/harja/ui/kartta_debug.cljs
clojure
(ns harja.ui.kartta-debug) (defn kartta-layers [& args] ) (defn aseta-kartta-debug-sijainti [& args] ) (defn nayta-kartan-debug [] )
a793146d6c1d5471b63febe91b9aab8edf08af7e6db638b766d999a0edc1722b
simplegeo/erlang
wxGridCellFloatRenderer.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public Lic...
null
https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/wx/src/gen/wxGridCellFloatRenderer.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " < br />{@link wxGridCellRenderer } -module(wxG...
9d5267719f051a0cf7ee3f42f97a8225fcc30c3cd949488d59f664094a82223c
mojombo/yaws
wiki_yaws.erl
% File: wiki_yaws.erl (~jb/work/wiki/src/wiki_yaws.erl) Author : Created : Thu Jun 27 22:26:49 2002 % Purpose: Yaws support utilities -module('wiki_yaws'). -author(''). -export([get_path_prefix/1, parse_multipost/1, parse_post/2, call_with_multi/3, call_with_query/3, call_with_post/...
null
https://raw.githubusercontent.com/mojombo/yaws/f75fde80f1e35a87335f21d0983e3285eb665f17/applications/wiki/src/wiki_yaws.erl
erlang
File: wiki_yaws.erl (~jb/work/wiki/src/wiki_yaws.erl) Purpose: Yaws support utilities search for initial path part
Author : Created : Thu Jun 27 22:26:49 2002 -module('wiki_yaws'). -author(''). -export([get_path_prefix/1, parse_multipost/1, parse_post/2, call_with_multi/3, call_with_query/3, call_with_post/3, call_wiki/3, call_with_multiquery/3]). -include("../../../include/yaws_api.hrl"). get_path_...
b5293a4baadc22c1ddc5bf66aba1c1d400771b26a1b3216ef1807a552eb8693b
tezos/tezos-mirror
dac_plugin.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2023 Trili Tech , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/bbca5502eb430d3915ad697259d3bffc62c2d01d/src/lib_dac_node/dac_plugin.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2023 Trili Tech , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHE...
1f4c4ddf3447f63aecb4a208189437b56c82470d7f3039a051588c6bc97176a6
circuithub/haskell-gerber
StepRepeat.hs
module Gerber.StepRepeat ( StepRepeat(..) ) where data StepRepeat = StepRepeat { xRepeats :: !Int , yRepeats :: !Int , xStep :: !Float , yStep :: !Float } deriving ( Eq, Show )
null
https://raw.githubusercontent.com/circuithub/haskell-gerber/c1ef0273e9dcf98d731a63ffc6aeb1b4c884bd8d/gerber/lib/Gerber/StepRepeat.hs
haskell
module Gerber.StepRepeat ( StepRepeat(..) ) where data StepRepeat = StepRepeat { xRepeats :: !Int , yRepeats :: !Int , xStep :: !Float , yStep :: !Float } deriving ( Eq, Show )
a4084d425242e554a7ac15c9a74a3754b5a445507ce4759bb6b3a848259645f2
AndrasKovacs/ELTE-func-lang
Practice03.hs
# LANGUAGE InstanceSigs # module Practice03 where data Coord = C { x : : , y : : Int } deriving ( Eq , Ord , Show ) x : : Coord - > Int x ( C c1 c2 ) = c1 data Coord = C { x :: Int , y :: Int } deriving (Eq, Ord, Show) x :: Coord -> Int x (C c1 c2) = c1 -} newtype Fun a ...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-1/pentek_gyak/Practice03.hs
haskell
class C1 a => C2 a where C1 a must be defined when i use C1 (T a), (C1 a) must be defined TODO : ( < > ) : : T a - > T a - > T a lift law : lift ( x < > y ) = = lift x < > lift y TODO : : : T a lift unitR : lift x < > = = lift x lift unitL : < > lift y = = lift y TODO: (<>) :: T a -> T a -> T ...
# LANGUAGE InstanceSigs # module Practice03 where data Coord = C { x : : , y : : Int } deriving ( Eq , Ord , Show ) x : : Coord - > Int x ( C c1 c2 ) = c1 data Coord = C { x :: Int , y :: Int } deriving (Eq, Ord, Show) x :: Coord -> Int x (C c1 c2) = c1 -} newtype Fun a ...
0e67840fd855b25c8cd71485a4b741e111dae5c61ee4cc956e7f4995a65df10d
Wavenet/http_proxy
mod_post.erl
mod_post.erl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @author < > 2013 - 2015 Global Wavenet ( Pty ) Ltd %%% @end 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...
null
https://raw.githubusercontent.com/Wavenet/http_proxy/a66bbf5607fd8610a66355467378c171f8f65ce8/test/mod_post.erl
erlang
@end you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language govern...
mod_post.erl @author < > 2013 - 2015 Global Wavenet ( Pty ) Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_post). -export([do/1]). -include_lib("inets/include/httpd.hrl"). do(#mod{method = "POST...
cdb40596553a99e0cabbc0bfbc921bde54640687e9b6a4ce5d27045d8604ece1
patricoferris/sesame
utils.mli
val date_to_ptime : string -> Ptime.t (** [date_to_ptime s] converts the string [s] to a [Ptime.t] *) val get_time : unit -> string (** [get_time ()] gets the current time... might be removed because it is a UNIX only thing *) val html_path : ?dir:Fpath.t option -> Fpath.t -> Fpath.t (** [html_path ?dir path] tur...
null
https://raw.githubusercontent.com/patricoferris/sesame/8521e2a086b49d0bc20f0fca705f07675c52e1ae/src/sesame/utils.mli
ocaml
* [date_to_ptime s] converts the string [s] to a [Ptime.t] * [get_time ()] gets the current time... might be removed because it is a UNIX only thing * [html_path ?dir path] turns [a/b/c.md] into [a/b/c.html] * A useful {!S.Encodeable} compliant module [Fpath.t] * Build a module that will build things from a dir...
val date_to_ptime : string -> Ptime.t val get_time : unit -> string val html_path : ?dir:Fpath.t option -> Fpath.t -> Fpath.t val filename_to_html : Fpath.t -> Fpath.t val title_to_dirname : string -> string module Fpath_input : S.Encodeable with type t = Fpath.t * A { ! S.S } compliant module for JSON ( using [ ...
d6ace65c6acc5212a77cffa6920fc39d51301d836ebf843bd4896f06963ae158
francescoc/scalabilitywitherlangotp
earth.erl
-module(earth). -export([start/0, init/0]). start() -> spawn(?MODULE, init, []). init() -> create_earth(), day(). day() -> receive eclipse -> day(); sunset -> night() end. night() -> receive sunrise -> make_roosters_crow(), day() end. create_earth() -> ok. make_roosters_cr...
null
https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch6/earth.erl
erlang
-module(earth). -export([start/0, init/0]). start() -> spawn(?MODULE, init, []). init() -> create_earth(), day(). day() -> receive eclipse -> day(); sunset -> night() end. night() -> receive sunrise -> make_roosters_crow(), day() end. create_earth() -> ok. make_roosters_cr...
d260bb7f0617ee7d7c7b33288fa5dc0981c6cf84d34f1a9128f311fc5791f301
Clojure2D/clojure2d-examples
ch10_camera2.clj
(ns rt-in-weekend.ch10-camera2 (:require [clojure2d.core :refer :all] [clojure2d.pixels :as p] [clojure2d.extra.utils :as u] [fastmath.vector :as v] [rt-in-weekend.ray :refer :all] [rt-in-weekend.hitable :refer :all] [rt-in-weekend.sphere :refer ...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/rt_in_weekend/ch10_camera2.clj
clojure
(save img "results/rt-in-weekend/camera2-fov20.jpg")
(ns rt-in-weekend.ch10-camera2 (:require [clojure2d.core :refer :all] [clojure2d.pixels :as p] [clojure2d.extra.utils :as u] [fastmath.vector :as v] [rt-in-weekend.ray :refer :all] [rt-in-weekend.hitable :refer :all] [rt-in-weekend.sphere :refer ...
5692e9977e9f9231d26a73414dbf84053c24daba91a03dfe70ccc932766dc153
Lovesan/virgil
proxy.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- Copyright ( C ) 2010 - 2012 , < > ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;; restriction, including without lim...
null
https://raw.githubusercontent.com/Lovesan/virgil/ab650955b939fba0c7f5c3fd945d3580fbf756c1/src/proxy.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do...
Copyright ( C ) 2010 - 2012 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-packag...
1fe7be48770779cbba3e24690b666e4bc05b9b051052a896e6cf583f1a966c23
programaker-project/Programaker-Core
automate_rest_api_services_register.erl
%%% @doc %%% REST endpoint to manage knowledge collections. %%% @end -module(automate_rest_api_services_register). -export([init/2]). -export([ allowed_methods/2 , options/2 , is_authorized/2 , content_types_accepted/2 ]). -export([ accept_json_register_service/2 ]). -define(U...
null
https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_services_register.erl
erlang
@doc REST endpoint to manage knowledge collections. @end CORS Authentication Don't do authentication if it's just asking for options Non matching username POST handler
-module(automate_rest_api_services_register). -export([init/2]). -export([ allowed_methods/2 , options/2 , is_authorized/2 , content_types_accepted/2 ]). -export([ accept_json_register_service/2 ]). -define(UTILS, automate_rest_api_utils). -include("./records.hrl"). -record(s...
b8f115a2009a37b9e4a4099415f75b3682a8104d2153e935b707e461be37b660
D00mch/PWA-clojure
nrepl.clj
(ns pwa.nrepl (:require [nrepl.server :as nrepl] [clojure.tools.logging :as log])) (defn start "Start a network repl for debugging on specified port followed by an optional parameters map. The :bind, :transport-fn, :handler, :ack-port and :greeting-fn will be forwarded to clojure.tools.nrepl.server/s...
null
https://raw.githubusercontent.com/D00mch/PWA-clojure/39ab4d3690c7a8ddbdd8095d65a782961f92c183/src/clj/pwa/nrepl.clj
clojure
(ns pwa.nrepl (:require [nrepl.server :as nrepl] [clojure.tools.logging :as log])) (defn start "Start a network repl for debugging on specified port followed by an optional parameters map. The :bind, :transport-fn, :handler, :ack-port and :greeting-fn will be forwarded to clojure.tools.nrepl.server/s...
126a604d2f245d0c1c1402b9d763b15ad7b3ae6a87f2d5491613994bd38860a5
Decentralized-Pictures/T4L3NT
protocol_logging.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs . < > Copyright ( c ) 2021...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_validation/protocol_logging.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs . < > Copyright ( c ) 2021 DaiLambda , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOU...
9dbf8892086c5019508e350f9e0f93adccf251e6907661215948de0bfd38bf50
less-wrong/less-wrong
Parser.hs
module LessWrong.HL.Parser where import Control.Applicative (many, some, (<|>)) import Data.Text (Text) import Text.Megaparsec (eof, optional, parse, parseErrorPretty) import Text.Megaparsec.Text (Parser...
null
https://raw.githubusercontent.com/less-wrong/less-wrong/4dd04f396551a7c81438349041335453137c0951/src/LessWrong/HL/Parser.hs
haskell
Helper declaration components functions
module LessWrong.HL.Parser where import Control.Applicative (many, some, (<|>)) import Data.Text (Text) import Text.Megaparsec (eof, optional, parse, parseErrorPretty) import Text.Megaparsec.Text (Parser...
fb20da1869f1e85c9837084d83c77d1019849d0eda5f41d0802ebde6a74a5298
logicblocks/salutem
results.clj
(ns salutem.core.results "Provides constructors and predicates for check results." (:require [tick.alpha.api :as t])) (defn result "Constructs a result with the provided `status`. The optional map of extra data is stored with the result for future use. Unless overridden in the extra data map, an `:salu...
null
https://raw.githubusercontent.com/logicblocks/salutem/9854c151b69c80c481f48d8be7ee7273831cb79b/core/src/salutem/core/results.clj
clojure
(ns salutem.core.results "Provides constructors and predicates for check results." (:require [tick.alpha.api :as t])) (defn result "Constructs a result with the provided `status`. The optional map of extra data is stored with the result for future use. Unless overridden in the extra data map, an `:salu...
0f170c152438144687bb65ccce515f7db379c807850cf94fc930d760c37a3073
paurkedal/batyr
user.mli
Copyright ( C ) 2022 < > * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later version . * * This p...
null
https://raw.githubusercontent.com/paurkedal/batyr/814791b6ce6476b79ecddc12b7d28fa4d23dc591/rockettime/lib/user.mli
ocaml
Copyright ( C ) 2022 < > * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later version . * * This p...
740002ac28155bbead173d936ec3c759dc0e0e2959ec0e0dadbce61b979bfe34
NorfairKing/intray
Foundation.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orpha...
null
https://raw.githubusercontent.com/NorfairKing/intray/8bb58ecf6975adedabdab091f2bb01980635a987/intray-web-server/src/Intray/Web/Server/Foundation.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Intray.Web.Server.Foundation ( module Intray.Web...
507ff1e73045d20c5c41184b8e3e7982422f4052ef4a1c4effaf8e7762d233bd
tokenrove/imago
morphology.lisp
;;; IMAGO library ;;; Morphology functions ;;; Copyright ( C ) 2021 ( ) , ( ) ;;; ;;; The authors grant you the rights to distribute ;;; and use this software as governed by the terms of the Lisp Lesser GNU Public License ;;; (), ;;; known as the LLGPL. (in-package :imago) ;; ==================== ;; Compo...
null
https://raw.githubusercontent.com/tokenrove/imago/22d42e75e4f0dff24eb952f66e36c7f6816f7336/src/morphology.lisp
lisp
IMAGO library Morphology functions The authors grant you the rights to distribute and use this software as governed by the terms (), known as the LLGPL. ==================== Component labeling ==================== If an element is a background element, label it as so If the element does not have a label, a...
Copyright ( C ) 2021 ( ) , ( ) of the Lisp Lesser GNU Public License (in-package :imago) (alex:define-constant +cross-pattern+ '((-1 0) ( 0 -1) ( 0 1) ( 1 0)) :test #'equalp :documentation "Neighborhood pattern for Manhattan distance. Two pixels are considered neighbors if Manhattan d...
74fa1b33f6c7fcee47439c79be5a16ed583fad6f6e18d4bfda78f1d241353696
UU-ComputerScience/uhc
BoundedInt1.hs
{- ---------------------------------------------------------------------------------------- what : Bounded class, for Int expected: ok platform: word size dependent ---------------------------------------------------------------------------------------- -} module BoundedInt1 where main :: IO () main = d...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/BoundedInt1.hs
haskell
---------------------------------------------------------------------------------------- what : Bounded class, for Int expected: ok platform: word size dependent ----------------------------------------------------------------------------------------
module BoundedInt1 where main :: IO () main = do putStrLn (show (minBound :: Int)) putStrLn (show (maxBound :: Int))
23b63953c5fc0500f2a45e3b2d4d8f00287a9df7b073ad72b020d36edc1b1698
locusmath/locus
object.clj
(ns locus.set.tree.two-quiver.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general.core.object ...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/tree/two_quiver/core/object.clj
clojure
set of another. This is similar to how given a pair of function f: A -> B and g: B -> C sharing a common input and output, they can form a triangle copresheaf. So these include any pair of quivers that can be chained together, without extra conditions. Corresponding morphisms for the component functions Underlying...
(ns locus.set.tree.two-quiver.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general.core.object ...
2683c31aeb7fe051f31549d0254570d527bc7e553e061e61a3a8e484dd9d00b2
tjammer/raylib-ocaml
ctypes_reexports.ml
Re - exports some ctypes functionality to the module (* but it's a band-aid *) module CArray = Ctypes.CArray type 'a ctyp = 'a Ctypes.structure type 'a ptr = 'a Ctypes.ptr let to_ctyp (a : 'a Ctypes.structure) = a let addr (x : 'a ctyp) = Ctypes.addr x let to_voidp = Ctypes.to_voidp let ptr_of_int i = Ctypes.(all...
null
https://raw.githubusercontent.com/tjammer/raylib-ocaml/76955c30d0a776138daeb93bfc73b104aefc6f6d/src/raylib/ctypes_reexports.ml
ocaml
but it's a band-aid
Re - exports some ctypes functionality to the module module CArray = Ctypes.CArray type 'a ctyp = 'a Ctypes.structure type 'a ptr = 'a Ctypes.ptr let to_ctyp (a : 'a Ctypes.structure) = a let addr (x : 'a ctyp) = Ctypes.addr x let to_voidp = Ctypes.to_voidp let ptr_of_int i = Ctypes.(allocate int i) let ptr_of_ui...
3d63e143f78cbab70e45876bea9985673d17c5e6a62a91659cd1c94da993df7d
atgreen/lisp-openshift
session.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*- Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; * Redistr...
null
https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/hunchentoot-1.2.3/session.lisp
lisp
Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*- 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 t...
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :hunchentoot) (defgeneric session-db-lock (acceptor &key whole-db-p) (:documentation "A function...
7bbfb52355ccdfc440370af0745ac5a1ba8481d916799d876ccc49d946095866
lojic/RacketCon2020
axio-init.rkt
#lang racket/base (require "./axio-database.rkt" "./axio-env.rkt" "./axio-init-structs.rkt" "./axio-logger.rkt") (require db racket/contract) (provide axio-init) ;; -------------------------------------------------------------------------------------------- ;; Public Interface ;;...
null
https://raw.githubusercontent.com/lojic/RacketCon2020/310e0ab01d8c3e1546029720f6bb66e6d1a5fb1e/TodoApp/axio/axio-init.rkt
racket
-------------------------------------------------------------------------------------------- Public Interface -------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------- Private Implementat...
#lang racket/base (require "./axio-database.rkt" "./axio-env.rkt" "./axio-init-structs.rkt" "./axio-logger.rkt") (require db racket/contract) (provide axio-init) (define/contract (axio-init app-env-id #:log-level [ log-level 'warning ]) (->* (symbol?) (#:log-level symbol?) axi...
febc3dfd15353fc3e0c84a0d9e5bcc204b24faa1ca7afef2c59f60de0c903440
tengstrand/lein-polylith
doc.clj
(ns leiningen.polylith.cmd.help.doc) (defn help [] (println " Generates system documentation to the WS-ROOT/doc directory by using") (println " the Selmer template engine ().") (println) (println " lein polylith doc [TEMPLATE]") (println " TEMPLATE = (omitted) -> workspace.ftl.") (println " ...
null
https://raw.githubusercontent.com/tengstrand/lein-polylith/27bf508a7b4806e4d2dfac01787e99edf2c1c306/src/leiningen/polylith/cmd/help/doc.clj
clojure
(ns leiningen.polylith.cmd.help.doc) (defn help [] (println " Generates system documentation to the WS-ROOT/doc directory by using") (println " the Selmer template engine ().") (println) (println " lein polylith doc [TEMPLATE]") (println " TEMPLATE = (omitted) -> workspace.ftl.") (println " ...
4589ababcf03883d6af68b6b4556195c3c7fd341784eb4a9ee5f7f775fdd21fc
dinosaure/carton
carton_lwt.ml
open Lwt_io type lwt = Lwt_io.lwt external inj : 'a Lwt.t -> ('a, lwt) Carton.io = "%identity" external prj : ('a, lwt) Carton.io -> 'a Lwt.t = "%identity" let lwt_bind x f = let open Lwt.Infix in inj (prj x >>= fun x -> prj (f x)) [@@inline] let lwt_return x = inj (Lwt.return x) [@@inline] let lwt = { Carton...
null
https://raw.githubusercontent.com/dinosaure/carton/8cb8b3685fab477594b2d83c70b2fc965d1d59b9/lwt/carton_lwt.ml
ocaml
XXX(dinosaure): [?visited] disappeared but it's only * about internal use.
open Lwt_io type lwt = Lwt_io.lwt external inj : 'a Lwt.t -> ('a, lwt) Carton.io = "%identity" external prj : ('a, lwt) Carton.io -> 'a Lwt.t = "%identity" let lwt_bind x f = let open Lwt.Infix in inj (prj x >>= fun x -> prj (f x)) [@@inline] let lwt_return x = inj (Lwt.return x) [@@inline] let lwt = { Carton...
fa71dbf4c6220cf9ba29d0d514717e42ee18367921c67d90f8ed556332a2bd84
WhatsApp/erlt
calc_core.erl
-file("calc/src/calc_core.erlt", 1). -module(calc_core). -eqwalizer_unchecked([]). -export_type([expr/0]). -export([expr_number/1, expr_add/2, expr_subtr/2, expr_mult/2, expr_divd/2, expr_var/1]). -type expr() :: {'$#calc_core:expr.number', integer()} | ...
null
https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/tests/calc/ir-spec/calc_core.erl
erlang
-file("calc/src/calc_core.erlt", 1). -module(calc_core). -eqwalizer_unchecked([]). -export_type([expr/0]). -export([expr_number/1, expr_add/2, expr_subtr/2, expr_mult/2, expr_divd/2, expr_var/1]). -type expr() :: {'$#calc_core:expr.number', integer()} | ...
eb65badc6823991d618da3c47b34f540e14f41198a1801481b1023204dca77fd
emina/rosette
reals.rkt
#lang rosette (require "type.rkt" "errors.rkt" rosette/lib/match (only-in racket/syntax format-symbol) (for-syntax (only-in racket/syntax format-id)) (only-in rosette/base/core/type subtype? type-cast) (only-in rosette [void rosette-void])) (provide real-type? real-type-length ...
null
https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/synthcl/model/reals.rkt
racket
which can be either a scalar or a vector type. A real type has a length ( which is 1 for scalar types ) ; a corresponding base (element) type; and a procedure for implicitly converting values to that type, and for constructing values of that type from base components. The base type of a scalar type is its corr...
#lang rosette (require "type.rkt" "errors.rkt" rosette/lib/match (only-in racket/syntax format-symbol) (for-syntax (only-in racket/syntax format-id)) (only-in rosette/base/core/type subtype? type-cast) (only-in rosette [void rosette-void])) (provide real-type? real-type-length ...
e6b32c2fc6e7a689bb8f6b5232a9e0e29ea29e394bdc74f654af8d201dac0bde
jarohen/clidget
app.cljs
(ns todomvc.cljs.app (:require [cljs.core.async :as a] [todomvc.cljs.todomvc-widget :refer [make-todomvc]] [todomvc.cljs.todomvc-model :as model] [dommy.core :as d]) (:require-macros [dommy.macros :refer [sel1]] [cljs.core.async.macros :refer [go]])) (enable-c...
null
https://raw.githubusercontent.com/jarohen/clidget/bd67082ad3819908e2d532151417cab436333ad0/todomvc/src/cljs/todomvc/cljs/app.cljs
clojure
(ns todomvc.cljs.app (:require [cljs.core.async :as a] [todomvc.cljs.todomvc-widget :refer [make-todomvc]] [todomvc.cljs.todomvc-model :as model] [dommy.core :as d]) (:require-macros [dommy.macros :refer [sel1]] [cljs.core.async.macros :refer [go]])) (enable-c...
5d20e6b58745e113fd7fe006a9dfc774d14bf1e8b7780cbdc788e92ffca52849
tisnik/clojure-examples
core.clj
; ( C ) Copyright 2016 , 2020 , 2021 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (ns consume-messages-2.core ...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/a5f9d6119b62520b05da64b7929d07b832b957ab/kafka-consume-messages-2/src/consume_messages_2/core.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors:
( C ) Copyright 2016 , 2020 , 2021 -v10.html (ns consume-messages-2.core (:require [jackdaw.client :as jc] [jackdaw.client.log :as jl] [clojure.pprint :as pp])) (def consumer-config {"bootstrap.servers" "localhost:9092" "key.deserializer" "org.apache.kafka.common.seri...
e0f6861172572d332b0bd4fa675c2af7efd90cdfb6d55d7531d6da14770851af
2600hz/kazoo
crossbar_view.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc @author @author Hesaam %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain ...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/crossbar_view.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- non-range query chunked query ranged query start/end key length fixer A literal CouchDB `startkey' or `endkey', or a {@link keymap_fun()} for non...
( C ) 2010 - 2020 , 2600Hz @author @author Hesaam This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(crossbar_view). -export([load/2, load/3 ,load_time_range/2, load_ti...
e1128e2318e0008bd96897405a737f7074aa4a0d98f586d96728cb787d814ae2
vimus/libmpd-haskell
Util.hs
{-# LANGUAGE OverloadedStrings #-} -- | Module : Network.MPD.Util Copyright : ( c ) 2005 - 2009 , Joachim Fasting 2010 License : MIT ( see LICENSE ) -- Maintainer : Joachim Fasting <> -- Stability : alpha -- Utilities . module Network.MPD.Util ( parseDate, parseIso8601, formatIso8601, parseNu...
null
https://raw.githubusercontent.com/vimus/libmpd-haskell/1ec02deba33ce2a16012d8f0954e648eb4b5c485/src/Network/MPD/Util.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Network.MPD.Util Maintainer : Joachim Fasting <> Stability : alpha Break a string by character, removing the separator. Parse C style floating point value, returning 'Nothing' on failure. Inverts 'parseBool'. FIXME: can we change the type to (Bool -> ByteString)? ...
Copyright : ( c ) 2005 - 2009 , Joachim Fasting 2010 License : MIT ( see LICENSE ) Utilities . module Network.MPD.Util ( parseDate, parseIso8601, formatIso8601, parseNum, parseFrac, parseBool, parseSingle, showBool, breakChar, parseTriple, toAssoc, toAssocList, splitGroups, read ) where...
945c1e388ad0a2b2baf758e7c53169100970a92ec12dc2c3c05bd612f0e52e90
rjnw/sham
ctxt.rkt
#lang racket (require "utils.rkt") (require sham/sam/runtime) (provide (all-defined-out)) (struct env-var [name val] #:transparent) ;; a local variable bound by bind or where (struct env-bind-var env-var [] #:transparent) (struct env-where-var env-var [] #:transparent) val is wrapped in a function which takes a...
null
https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-examples/sham/cryptol/compiler/ctxt.rkt
racket
a local variable bound by bind or where primitive value which should compile an app primitively prelude value lazy compile returns a specialized value for specific pargs and gensym'd name [(env-var name #f) [(env-var name #f) (printf " ~a?" name)] type stores name type for val and kind for type in bind (paramet...
#lang racket (require "utils.rkt") (require sham/sam/runtime) (provide (all-defined-out)) (struct env-var [name val] #:transparent) (struct env-bind-var env-var [] #:transparent) (struct env-where-var env-var [] #:transparent) val is wrapped in a function which takes and ctxt to compile (struct env-lazy-var env...
0c78deff46c12e0c8a3a32fbc31e52510436c679f1e9ec574567d34600a97b19
techascent/tech.datatype
color_gradients.clj
(ns tech.v2.tensor.color-gradients "" (:require [clojure.java.io :as io] [tech.v2.tensor :as dtt] [tech.v2.datatype :as dtype] [tech.v2.datatype.functional :as dfn] [tech.v2.datatype.unary-op :as unary-op] [tech.v2.tensor.typecast :as tens-typecast] ...
null
https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/tensor/color_gradients.clj
clojure
Gradients are accessed potentially many many times so reversing it here is often wise as opposed to inline reversing in the main loops. If we have to min/max check then we have to filter out invalid indexes. In that case we prefilter the data and trim it. We always check for invalid data in the main loops below and th...
(ns tech.v2.tensor.color-gradients "" (:require [clojure.java.io :as io] [tech.v2.tensor :as dtt] [tech.v2.datatype :as dtype] [tech.v2.datatype.functional :as dfn] [tech.v2.datatype.unary-op :as unary-op] [tech.v2.tensor.typecast :as tens-typecast] ...
09a3b539d41c52995299fd3820629917a233463c26a42406232074dc7722cc32
haskell-numerics/hmatrix
root.hs
-- root finding examples import Numeric.GSL import Numeric.LinearAlgebra import Text.Printf(printf) rosenbrock a b [x,y] = [ a*(1-x), b*(y-x^2) ] test method = do print method let (s,p) = root method 1E-7 30 (rosenbrock 1 10) [-10,-5] print s -- solution disp' p -- evolution of the algorithm jacobian...
null
https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/examples/root.hs
haskell
root finding examples solution evolution of the algorithm
import Numeric.GSL import Numeric.LinearAlgebra import Text.Printf(printf) rosenbrock a b [x,y] = [ a*(1-x), b*(y-x^2) ] test method = do print method let (s,p) = root method 1E-7 30 (rosenbrock 1 10) [-10,-5] jacobian a b [x,y] = [ [-a , 0] , [-2*b*x, b] ] testJ method = do prin...
f1a3ab6d7f7d9bf2db3e6cbe857af485dfeb089708d2acf3b1934177932e39ae
panda-planner-dev/ipc2020-domains
p-16.lisp
(defproblem problem domain ( (In_City O27 Ulm) (In_City O28 Ulm) (In_City Bibliothek Ulm) (In_City Rathaus Ulm) (At_Vehicle Pferd Rathaus) (Connects James_Franck_Ring O27 O28) (Connects Frauen_Strasse Bibliothek O27) (Connects Albecker_Strasse Rathaus Bibliothek) (Available James_...
null
https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/UM-Translog/other/SHOP2/p-16.lisp
lisp
(defproblem problem domain ( (In_City O27 Ulm) (In_City O28 Ulm) (In_City Bibliothek Ulm) (In_City Rathaus Ulm) (At_Vehicle Pferd Rathaus) (Connects James_Franck_Ring O27 O28) (Connects Frauen_Strasse Bibliothek O27) (Connects Albecker_Strasse Rathaus Bibliothek) (Available James_...
9182816418060e3539105de667efe2f75f1508b493471adbaed8cfae2956eed9
ghc/testsuite
T1633.hs
-- This just tests what the kind error message looks like Trac # 1633 module T1633 where instance Functor Bool
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/T1633.hs
haskell
This just tests what the kind error message looks like
Trac # 1633 module T1633 where instance Functor Bool
14a17967a9938f01272d8855c38bd1999e77e191bd4363fb42b72836a08b5a06
Cognician/dogstatsd-clj
dogstatsd.clj
(ns ^{:doc " (configure! \"localhost:8125\") Total value/rate: (increment! \"chat.request.count\" 1) In-the-moment value: (gauge! \"chat.ws.connections\" 17) Values distribution (mean, avg, max, percentiles): (histogram! \"chat.re...
null
https://raw.githubusercontent.com/Cognician/dogstatsd-clj/adddac1b2dc44d9e280d79409d89781e8f8584ce/src/cognician/dogstatsd.clj
clojure
=> |#env:production,chat => |#env:production,chat (println "[ metrics ]" payload)
(ns ^{:doc " (configure! \"localhost:8125\") Total value/rate: (increment! \"chat.request.count\" 1) In-the-moment value: (gauge! \"chat.ws.connections\" 17) Values distribution (mean, avg, max, percentiles): (histogram! \"chat.re...
8f25551820c982af36cd18e494e6de1ca5ed289c44fb853b858e8d517d751627
haskus/packages
Map.hs
module Haskus.Utils.Map ( module Data.Map ) where import Data.Map
null
https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-utils-data/src/lib/Haskus/Utils/Map.hs
haskell
module Haskus.Utils.Map ( module Data.Map ) where import Data.Map
13f9d2be720985c3cb7cd963d7db09fcc995273eca8b24dbcaa534ade654632d
danr/hipspec
ParseDSL.hs
-- | A hacky way of parsing the property language DSL module HipSpec.ParseDSL where --import Type import -- import Var hiding (Id) import HipSpec.GHC.Utils import Data.List import HipSpec.Id import HipSpec.Lang.Type import qualified HipSpec.Lang.CoreToRich as CTR import TyCon (TyCon) varWithPropType :: Var -> Bool v...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/src/HipSpec/ParseDSL.hs
haskell
| A hacky way of parsing the property language DSL import Type
module HipSpec.ParseDSL where import import Var hiding (Id) import HipSpec.GHC.Utils import Data.List import HipSpec.Id import HipSpec.Lang.Type import qualified HipSpec.Lang.CoreToRich as CTR import TyCon (TyCon) varWithPropType :: Var -> Bool varWithPropType x = case CTR.trPolyType (varType x) of Right (Forall...
b089551f331eb34f33adbdb0ae9c997a34cab8df22c2d24a3d911e803b872429
seizans/happiage
Application.hs
# OPTIONS_GHC -fno - warn - orphans # module Application ( getApplication , getApplicationDev ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers (getRobotsR) #if DEVELOPMENT import Yesod.Logger (Logger, logBS) import N...
null
https://raw.githubusercontent.com/seizans/happiage/38843c2a8fe3306e4a8e7d85899434c6ed4210d7/src/Application.hs
haskell
Import all relevant handler modules here. the comments there for more details. This function allocates resources (such as a database connection pool), place to put your migrate statements to have automatic database by default the logger is set for development
# OPTIONS_GHC -fno - warn - orphans # module Application ( getApplication , getApplicationDev ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers (getRobotsR) #if DEVELOPMENT import Yesod.Logger (Logger, logBS) import N...
43bd908c73941a1f801c3b322ff6b3eebab1716739bd61dcbcc014d192029d21
mikera/clisk
node.clj
(ns ^{:author "mikera" :doc "Functions for managing clisk AST nodes. Should not normally be needed by library users"} clisk.node (:require [mikera.vectorz.core :as vec]) (:import [clisk Util NodeMarker]) (:import java.awt.image.BufferedImage) (:import clisk.IRenderFunction) (:use clisk.util)) (set...
null
https://raw.githubusercontent.com/mikera/clisk/44dd35fabbae68ad44f0e8ac2dec4c580203f7b9/src/main/clojure/clisk/node.clj
clojure
============================== Image generation constants =========================== Node protocols ======================================= Default protocol implementations (when (identical? nd this)) (error "Get-component problem with: " this) ======================================= Code generation utility ...
(ns ^{:author "mikera" :doc "Functions for managing clisk AST nodes. Should not normally be needed by library users"} clisk.node (:require [mikera.vectorz.core :as vec]) (:import [clisk Util NodeMarker]) (:import java.awt.image.BufferedImage) (:import clisk.IRenderFunction) (:use clisk.util)) (set...
03df023b7ab99785510ae880539901444eb562d9dd5fea7db5185e109b2d6818
master/ejabberd
node_hometree.erl
%%% ==================================================================== ` ` The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %%% compliance with the License. You should have received a copy of the %%% Erlang Public License ...
null
https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/mod_pubsub/node_hometree.erl
erlang
==================================================================== compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved via the world wide web at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See th...
` ` The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Initial Developer of the Original Code is ProcessOne . Portions created by ProcessOne are C...
1f5ca69f8de2aa471c70ce3f9fda30d5fabeee90559494bda02d20174940a7b9
bisphone/Toveri
toveri_buffer.erl
-module(toveri_buffer). -behaviour(gen_server). %% ----------------------------------------------------------------------------- %% API %% ----------------------------------------------------------------------------- -export([start_link/2]). -export([stop/1]). -export([get_size/1]). -export([insert/2]). -export([read_...
null
https://raw.githubusercontent.com/bisphone/Toveri/2c6132447dfeb54a89d0cff11dfd9626f318ed88/src/toveri_buffer.erl
erlang
----------------------------------------------------------------------------- API ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- gen_server callbacks -------------------------------------------------------...
-module(toveri_buffer). -behaviour(gen_server). -export([start_link/2]). -export([stop/1]). -export([get_size/1]). -export([insert/2]). -export([read_pos/2]). -export([read_next/1]). -export([delete_pos/2]). -export([init/1]). -export([handle_call/3]). -export([handle_cast/2]). -export([handle_info/2]). -export([term...
8644b38acaefe6fd0f41adbf87c4518a1644ffd259dc039724881f68f084d7c9
takikawa/tr-pfds
binomial.rkt
#lang typed/racket (provide filter remove fold (rename-out [heap-map map] [heap-ormap ormap] [heap-andmap andmap]) empty? insert find-min/max delete-min/max merge sorted-list heap Heap build-heap) (struct: (A) Node ([rank : Integer] [val : A] ...
null
https://raw.githubusercontent.com/takikawa/tr-pfds/a08810bdfc760bb9ed68d08ea222a59135d9a203/pfds/heap/binomial.rkt
racket
Checks for empty heap (: link : (All (A) ((Node A) (Node A) (A A -> Boolean) -> (Node A)))) Inserts a node into the tree Inserts an element into the heap Helper for merge similar to list map function. apply is expensive so using case-lambda in order to saperate the more common case similar to list foldr or foldl...
#lang typed/racket (provide filter remove fold (rename-out [heap-map map] [heap-ormap ormap] [heap-andmap andmap]) empty? insert find-min/max delete-min/max merge sorted-list heap Heap build-heap) (struct: (A) Node ([rank : Integer] [val : A] ...
d6d3603fd72963a2ad7780c436fb6d31e88387ec0d3ab2dd95c4a0fb310edc36
ryanpbrewster/haskell
parsec_example_1.hs
-- parsec_example_1.hs {- - Do (+), then (*) -} import Text.ParserCombinators.Parsec line = adds adds = do first <- add next <- moreAdds return (first:next) moreAdds = (char '+' >> adds) <|> (return []) add = prods prods = do first <- prod next <- moreProds retur...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/parsec/parsec_example_1.hs
haskell
parsec_example_1.hs - Do (+), then (*)
import Text.ParserCombinators.Parsec line = adds adds = do first <- add next <- moreAdds return (first:next) moreAdds = (char '+' >> adds) <|> (return []) add = prods prods = do first <- prod next <- moreProds return (first:next) prod :: GenParser Char st Int prod...
5d719c752ad95f33353e8cd8884474401275b90a4907068645624e073f88c74f
airbus-seclab/bincat
mapOpt.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/utils/mapOpt.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with Modifications by Airbus Group - Copyr...
4675d1544df4697db5f828e521e079f85ff85ac66d553f16941b6e7101036428
inaka/elvis_core
pass_export_used_types.erl
-module pass_export_used_types. -type my_type() :: my | type. -type private_type(X) :: {X}. -export_type [my_type/0]. -export [my_fun/1]. -spec my_fun(my_type()) -> my_type(). my_fun(my) -> type; my_fun(type) -> private_fun(none), my. % ignore types only used by private functions -spec private_fun(X) -> pri...
null
https://raw.githubusercontent.com/inaka/elvis_core/72df3ba9dae03cb070fa7af3b266c38bb3095778/test/examples/pass_export_used_types.erl
erlang
ignore types only used by private functions
-module pass_export_used_types. -type my_type() :: my | type. -type private_type(X) :: {X}. -export_type [my_type/0]. -export [my_fun/1]. -spec my_fun(my_type()) -> my_type(). my_fun(my) -> type; my_fun(type) -> private_fun(none), my. -spec private_fun(X) -> private_type(X). private_fun(none) -> {none}.
87e70ad69cdf42001dddfa8b21c96aecc7eacb08656c4c5761adc31a2ba8b335
pflanze/chj-schemelib
read-csv.scm
Copyright 2016 - 2019 by < > ;;; This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or ;;; (at your option) any later version. (require eas...
null
https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/read-csv.scm
scheme
This file is free software; you can redistribute it and/or modify (at your option) any later version. *not* a method allows unwrapped inputs, too (if match predicate) The main use: Heavy OO: type error reporting force |error?| here instead of BUG msg below? XX this should be in some interface file, once u...
Copyright 2016 - 2019 by < > it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or (require easy eol csv-defaults (predicates length-=) jclass stream oo-lib-...
f0a9ba6f9ec5618377a9e03b09719c504795691746595ae7be6428a1fdd0e081
HunterYIboHu/htdp2-solution
ex268-ir-sort.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex268-ir-sort) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter3-Abstraction/Section16-Using-Abstraction/ex268-ir-sort.rkt
racket
about the language level of this file in a form that our tools can easily process. structs an inventory record is (make-IR String String Number Number) (make-IR n d ap sp) the n means the name of IR, and the d is the description and the ap, sp are acquisition price and sale price. functions [List-of IR] -> [List...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex268-ir-sort) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct IR [name description acq-price sale-pri...
506d39d2c41d3320a3fa3ec7e2aa70f88dbf561f702cad54401f513b2ad316f2
subttle/regular
TransitionGraph.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module TransitionGraph where import Algebra.Graph.Relation as Relation (Relation, gmap, transpose) import Data.Foldable (Foldable (toList)) import Data.Functor.Contravariant (Contravariant (..)) import Commo...
null
https://raw.githubusercontent.com/subttle/regular/1a9e71cb1c43cb3215b9331efa98d4dcf21fbf9c/src/TransitionGraph.hs
haskell
Transition Graph of an automaton Transition Graph of an automaton with ε-transitions
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module TransitionGraph where import Algebra.Graph.Relation as Relation (Relation, gmap, transpose) import Data.Foldable (Foldable (toList)) import Data.Functor.Contravariant (Contravariant (..)) import Commo...
71464312c4efe078a6e78b0cd515028c15b1d9e354340e33951f72626ef16535
myShoggoth/deckbuilder
LegendarySpec.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE TypeApplications # {-# LANGUAGE ScopedTypeVariables #-...
null
https://raw.githubusercontent.com/myShoggoth/deckbuilder/2f2f6613b0edd80610d30405b21192470f9e0bff/test/LegendarySpec.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE OverloadedStrings # Don't calculate victory points as we go anymore it "calculates the right amount of victory" $ p1AfterEvaluate ^. #victory `shouldBe` length (filter (== estateCard) (p1AfterEvaluate ^. #played))
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE TypeApplications # module LegendarySpec ( spec ) wh...
ae0cacb97e7c39e52ebb303f9e5a017a66cbc1cd9b69c8f54fa0b353bad26fd6
BranchTaken/Hemlock
test_add_sub.ml
open! Basis.Rudiments open! Basis open U128 let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin File.Fmt.stdout |> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x |> Fmt.fmt " +,- " |> fmt ~alt:true ~zpad:true ~width:32L ~radi...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u128/test_add_sub.ml
ocaml
open! Basis.Rudiments open! Basis open U128 let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin File.Fmt.stdout |> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x |> Fmt.fmt " +,- " |> fmt ~alt:true ~zpad:true ~width:32L ~radi...
54acca16958ae034a52e5724eabb823be1a9ebb71adda04024621338b2dd079a
HunterYIboHu/htdp2-solution
ex521.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex521) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter6/Section33/ex521.rkt
racket
about the language level of this file in a form that our tools can easily process. is the final state reachable from state0 generative create a tree of possible boat rides termination ??? generative generate the successors of los Questions Q1: Because of this systematic way of traversing the tree, solve* cannot...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex521) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) PuzzleState - > PuzzleState (check-expect (solve ini...
ce14a31ea81bdb2cb067c5d47db5949736d9b0bda75c5926c9e533fb12347b87
larsen/wiz
Core.hs
module Wiz.Core ( equal, car, cdr, cons, list, nil, Wiz.Core.not, Wiz.Core.or, Wiz.Core.and, pair, evalBool ) where import Wiz.Types import Wiz.Environment equal :: Value -> Value -> Expression equal x y | x == y = Boolean True | otherwise = Boolean False car :...
null
https://raw.githubusercontent.com/larsen/wiz/59b8c5fa5a1bde0a5ed83261599407e2d80efb25/src/Wiz/Core.hs
haskell
(cons ’a ’()) ⇒ (a) (cons ’(a) ’(b c d)) ⇒ ((a) b c d) (cons ’(a b) ’c) ⇒ ((a b) . c) cons v1 v2 | trace ("-> cons v1:" ++ show v1 ++ ", v2:" ++ show v2) False = undefined evalBool v | trace ("evalBool " ++ show v) False = undefined
module Wiz.Core ( equal, car, cdr, cons, list, nil, Wiz.Core.not, Wiz.Core.or, Wiz.Core.and, pair, evalBool ) where import Wiz.Types import Wiz.Environment equal :: Value -> Value -> Expression equal x y | x == y = Boolean True | otherwise = Boolean False car :...
a6bd2555e0619f0c67b13746bb0a449f66fed16100fe4b2b4a555019cf2a14ea
ekmett/reactive
Future.hs
# LANGUAGE GeneralizedNewtypeDeriving # # OPTIONS_GHC -Wall -fno - warn - orphans # ---------------------------------------------------------------------- -- | Module : FRP.Reactive . Future Copyright : ( c ) 2007 - 2008 -- License : GNU AGPLv3 (see COPYING) -- -- Maintainer : -- Stability ...
null
https://raw.githubusercontent.com/ekmett/reactive/61b20b7a2e92af372b5bd9a2af294db0fbdfa9d8/src/FRP/Reactive/Future.hs
haskell
-------------------------------------------------------------------- | License : GNU AGPLv3 (see COPYING) Maintainer : Stability : experimental A simple formulation of functional /futures/, roughly as described at <>. A /future/ is a value with an associated time of /arrival/. Typically, neith...
# LANGUAGE GeneralizedNewtypeDeriving # # OPTIONS_GHC -Wall -fno - warn - orphans # Module : FRP.Reactive . Future Copyright : ( c ) 2007 - 2008 press/ , or /the value of LambdaPix stock at noon next Monday/. ' Monad ' , and ' Monoid ' . Some comments on the ' Future ' instances of * Monoid ...
29a85d42000ad59554b05f77ba545989846bbb1a676d338f388750346976a1d9
apinf/proxy42
vegur_upgrade_middleware.erl
Copyright ( c ) 2013 - 2015 , Heroku Inc < > . %%% 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,...
null
https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/vegur/src/vegur_upgrade_middleware.erl
erlang
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 following disclaimer. * Redistributions...
Copyright ( c ) 2013 - 2015 , Heroku Inc < > . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , ...
8f6cc7a3dff64509c428f439ab6fea031415ef2dbc045c20ed389db42f734289
rabbitmq/rabbitmq-erlang-client
amqp_rpc_server.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% %% @doc This is a utility module that is used to ...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-erlang-client/2022e01c515d93ed1883e9e9e987be2e58fe15c9/src/amqp_rpc_server.erl
erlang
@doc This is a utility module that is used to expose an arbitrary function via an asynchronous RPC over AMQP mechanism. It frees the implementor of RPC server does not handle any data encoding, so it is up to the callback -------------------------------------------------------------------------- API -------------...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . a simple function from having to plumb this into . N...