_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
9c816946032d780c8bf5e46f09c4d0b76aa606096a530a6c06d4253121ff441f
babashka/bbin
cli.clj
(ns babashka.bbin.cli (:require [babashka.cli :as cli] [babashka.bbin.scripts :as scripts] [babashka.bbin.util :as util] [clojure.string :as str])) (declare print-commands) (defn- run [command-fn {:keys [opts]}] (util/check-legacy-paths) (if (and (:version opts) (not (:help o...
null
https://raw.githubusercontent.com/babashka/bbin/6fde1b1dbfaef3063eb1eba4899a730bf703c792/src/babashka/bbin/cli.clj
clojure
(ns babashka.bbin.cli (:require [babashka.cli :as cli] [babashka.bbin.scripts :as scripts] [babashka.bbin.util :as util] [clojure.string :as str])) (declare print-commands) (defn- run [command-fn {:keys [opts]}] (util/check-legacy-paths) (if (and (:version opts) (not (:help o...
42b6a9bb7b06ee80064c81f703debf1510e28762a46338b88a290c09419a7246
jaspervdj/digestive-functors
QTests.hs
-------------------------------------------------------------------------------- {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # module Text.Digestive.Form.QTests ( tests ) where ------------------------------------------------------------------...
null
https://raw.githubusercontent.com/jaspervdj/digestive-functors/5827b47404a93b103cc57ad0f54f4dc0bdf94e24/digestive-functors/tests/Text/Digestive/Form/QTests.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ---------------------...
# OPTIONS_GHC -fno - warn - orphans # module Text.Digestive.Form.QTests ( tests ) where import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck hiding (Success) import Text.Digestive.Form.Internal import ...
3a1f00cafbc2fb0779642b92994042b919734d4d5598c3278b169349af646b4d
ardoq/ardoq-docker-compose-addon
client.clj
(ns ardoq.client (:require [org.httpkit.client :as http] [clojure.data.json :as json])) (defprotocol ArdoqResource (resource-path [this])) (defrecord Workspace [name description componentTemplate] ArdoqResource (resource-path [_] "workspace")) (defn workspace [] (map->Workspace {})) (defrecor...
null
https://raw.githubusercontent.com/ardoq/ardoq-docker-compose-addon/be09e3bbdef819a4f47411d7b784e3d5906e5c44/src/ardoq/client.clj
clojure
(ns ardoq.client (:require [org.httpkit.client :as http] [clojure.data.json :as json])) (defprotocol ArdoqResource (resource-path [this])) (defrecord Workspace [name description componentTemplate] ArdoqResource (resource-path [_] "workspace")) (defn workspace [] (map->Workspace {})) (defrecor...
45809b8ee92a497df82e327f3c73c5d574a170d9fd74671393507bf6feff95af
mzp/coq-ruby
heap.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/lib/heap.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Heaps Type of functional heaps ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : heap.mli 6621 200...
2b7a2b3c78335e4c57f59cffdec2e1d306f9fccde7ed2b54c6aa90bac1bd491f
OCamlPro/liquidity
liquidNamespace.ml
(****************************************************************************) (* Liquidity *) (* *) Copyright ( C ) 2017 - 2020 OCamlPro SAS (* ...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidNamespace.ml
ocaml
************************************************************************** Liquidity ...
Copyright ( C ) 2017 - 2020 OCamlPro SAS it under the terms of the GNU General Public License as published by ...
6557358cbd860ca36bb46fcc1a220c2946a44e440dee0c3e783e8669b07b4b10
fizruk/lambdaconf-2019-workshop
AFrame.hs
{-# LANGUAGE OverloadedStrings #-} module ARCube.Utils.AFrame where import qualified Data.List as List import Data.Monoid ((<>)) import Miso import Miso.String (MisoString, ToMisoString (..), ms) import ARCube.Utils.Miso -- | Set up a VR scene. sceneVR :: ...
null
https://raw.githubusercontent.com/fizruk/lambdaconf-2019-workshop/1a7caa4dd03ff1b09877b27d8adf79ca35fcc888/project/ar-cube/src/ARCube/Utils/AFrame.hs
haskell
# LANGUAGE OverloadedStrings # | Set up a VR scene. | Set up an AR scene. * Primitives * Relative positioning, orientation and scaling * Helpers
module ARCube.Utils.AFrame where import qualified Data.List as List import Data.Monoid ((<>)) import Miso import Miso.String (MisoString, ToMisoString (..), ms) import ARCube.Utils.Miso sceneVR :: [View action] -> View action sceneVR wrapped = nodeHtml "a-...
d89314b5a505f3a33aaa10d52f9a99b90a297f2c012da391b503bdcd8795dee4
atlas-engineer/nyxt
bookmark.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-bookmark-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/bookmark-mode:bookmark-mode buffer)) ...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/bookmark.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-bookmark-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/bookmark-mode:bookmark-mode buffer)) ...
b48a70c567c28a4d83aeff489241ad4127597b2ce59835c199c1316180a15952
juxt/jinx
jsonpointer.cljc
Copyright © 2019 - 2021 , JUXT LTD . (ns juxt.jinx.alpha.jsonpointer (:require [clojure.string :as str])) (def reference-token-pattern #"/((?:[^/~]|~0|~1)*)") (defn decode [token] (-> token (str/replace "~1" "/") (str/replace "~0" "~"))) (defn reference-tokens [s] (map decode (map second (re-...
null
https://raw.githubusercontent.com/juxt/jinx/48c889486e5606e39144043946063803ad6effa8/src/juxt/jinx/alpha/jsonpointer.cljc
clojure
Copyright © 2019 - 2021 , JUXT LTD . (ns juxt.jinx.alpha.jsonpointer (:require [clojure.string :as str])) (def reference-token-pattern #"/((?:[^/~]|~0|~1)*)") (defn decode [token] (-> token (str/replace "~1" "/") (str/replace "~0" "~"))) (defn reference-tokens [s] (map decode (map second (re-...
93825c50f161e2151c3644790480918ec30d050768dcf1f6b694c5a2dae0c23c
txkaduo/weixin-mp-sdk
Site.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # module WeiXin.PublicPlatform.Yesod.Site ( module WeiXin.PublicPlatform.Yesod.Site , module WeiXin.PublicPlatform.Yesod.Site.Data ) where { { { 1 im...
null
https://raw.githubusercontent.com/txkaduo/weixin-mp-sdk/5bab123eb3e1c74b4cae14d30003bc4e6b75b3b3/WeiXin/PublicPlatform/Yesod/Site.hs
haskell
^ GET param name of signature ^ signed message text cannot parse incoming XML message 只要有 primary 的回应,就忽略非primary的回应 本来延迟一点点只是为了希望能保持多个信息之间的顺序 | 生成随机字串作为 oauth 的state参数之用 CAUTION: 不要使用会话变量,因为会话可能因为超时而突然变成另一个新会话 ^ oauth's state param ^ return URL XXX: union id 目前设在一个指定的键下面。 下面的做法不能支持多个系统的union id 用户同意授权 we ...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # module WeiXin.PublicPlatform.Yesod.Site ( module WeiXin.PublicPlatform.Yesod.Site , module WeiXin.PublicPlatform.Yesod.Site.Data ) where { { { 1 im...
7017cd4041c72085fad244fb9ddef9a29487775675ab7e9845b1197db154377d
clojure/core.typed
array_old.clj
; some old tests that don't type check anymore but look useful (ns clojure.core.typed.test.array-old (:require [clojure.core.typed :refer [ann check-ns into-array> cf print-env ann-form] :as t] [clojure.repl :refer [pst]])) (ann my-integer-array [-> (Array Integer)]) (defn my-integer-array [...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/array_old.clj
clojure
some old tests that don't type check anymore but look useful
(ns clojure.core.typed.test.array-old (:require [clojure.core.typed :refer [ann check-ns into-array> cf print-env ann-form] :as t] [clojure.repl :refer [pst]])) (ann my-integer-array [-> (Array Integer)]) (defn my-integer-array [] (into-array> Integer (map int [1 2]))) (ann my-int-array [->...
f0318db862d2f400148892a48ad952e52594fd2cad3280ffd2fdb82f81dab1b7
koji-kojiro/cl-repl
highlight.lisp
(in-package :cl-repl) (defun escape-name (name) (ppcre:regex-replace-all "\\+" (ppcre:regex-replace-all "\\*" name "\\\\*") "\\\\+")) (defun list-regex (lst) (format nil "((?<=\\s)|^|(?<=\\()|(?<=\\)))(~{~a|~})(?=(\\s|\\(|\\)|$))" (sort lst #'string>))) (destructuring-...
null
https://raw.githubusercontent.com/koji-kojiro/cl-repl/bfd1521f856a9f8020611e8d8b34634fe75fbbc8/src/highlight.lisp
lisp
(in-package :cl-repl) (defun escape-name (name) (ppcre:regex-replace-all "\\+" (ppcre:regex-replace-all "\\*" name "\\\\*") "\\\\+")) (defun list-regex (lst) (format nil "((?<=\\s)|^|(?<=\\()|(?<=\\)))(~{~a|~})(?=(\\s|\\(|\\)|$))" (sort lst #'string>))) (destructuring-...
7504cdcf27db0fd4fc30eada340089b95bac86caa38d4d58102acacd062af7c9
input-output-hk/cardano-coin-selection
Utilities.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NumericUnderscores # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFami...
null
https://raw.githubusercontent.com/input-output-hk/cardano-coin-selection/cff368d674fe58bc1a12e6564a26ccea21eb5aac/src/test/Cardano/Test/Utilities.hs
haskell
# LANGUAGE OverloadedStrings # | Utility functions, types, and type class instances used purely for testing. License: Apache-2.0 * Input Identifiers * Output Identifiers * Formatting * UTxO Operations * Unsafe Operations ------------------------------------------------------------------------------ Unique Ide...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NumericUnderscores # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn -...
e28efaf91ee3c763b1a66575ffd7764ac20d1d6c1436b7a9d44ca05ca8aa47ca
silky/quipper
TeleportGeneric.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== import Quipper import QuipperLib.Simulation impo...
null
https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/TeleportGeneric.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== | A test that should help see how many qubits we can simulate | The main method deals with command line arguments, and timing of the s...
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the import Quipper import QuipperLib.Simulation import System.Random import System.Environment import System.CPUTime plus_minus :: (QShape a qa ca) => a -> Circ qa plus_minus a = do qs <- qinit a qs <- mapUnary hadamard qs return ...
7ec4b47c98ad78b4f4e8ecc5c942b6d2778cfda554fabb11b4d9b0e1fe010249
MegaLoler/Music
util.lisp
(in-package :music) (defun symbol-from-char (char &optional (eof-p t) eof-v) "Return a symbol from a string designator." (read-from-string (string char) eof-p eof-v)) (defun num-char-p (c) "Whether a character is a number character." (find c "0123456789+-")) (defun not-num-char-p (c) "Whether a character i...
null
https://raw.githubusercontent.com/MegaLoler/Music/6d69042f6ed98994d3f2ec474c71c569e0ee06be/src/util.lisp
lisp
(in-package :music) (defun symbol-from-char (char &optional (eof-p t) eof-v) "Return a symbol from a string designator." (read-from-string (string char) eof-p eof-v)) (defun num-char-p (c) "Whether a character is a number character." (find c "0123456789+-")) (defun not-num-char-p (c) "Whether a character i...
616bde239cc3a1c2f86e9dac38284c472b3d57a0833b8626796f8e45e380d900
dwayne/eopl3
parser.rkt
#lang eopl ;; Program ::= Expression ;; ;; Expression ::= Number ;; ;; ::= Identifier ;; ;; ::= -(Expression, Expression) ;; ;; ::= zero?(Expression) ;; ;; ::= if Expression then Expression else Expression ;; ;; ::= let Identifier = Expression in Expression ;; ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.42-ATTEMPT-1/parser.rkt
racket
Program ::= Expression Expression ::= Number ::= Identifier ::= -(Expression, Expression) ::= zero?(Expression) ::= if Expression then Expression else Expression ::= let Identifier = Expression in Expression ::= proc (Identifier) Expres...
#lang eopl (provide AST program a-program expression expression? const-exp var-exp diff-exp zero?-exp if-exp let-exp proc-exp call-exp nameless-var-exp nameless-let-exp nameless-proc-exp Parser parse) (define scanner-spec '((number (digit (arbno digit)) number) (identifier (letter (arbno...
55e7353926d695bb37eb8ea6f56790e01b2d9346b397847b8021ab86e7ca735d
scicloj/scicloj.ml
core.clj
(ns scicloj.ml.core Autogenerated from scicloj.ml.template.core-- DO NOT EDIT "Core functions for machine learninig and pipeline execution. Requiring this namesspace registers as well the model in: * scicloj.ml.smile.classification * scicloj.ml.smile.regression * scicloj.ml.xgboost Functions are re-expo...
null
https://raw.githubusercontent.com/scicloj/scicloj.ml/74822932075e1575fe9779b0a165c0640b5d4740/src/scicloj/ml/core.clj
clojure
(ns scicloj.ml.core Autogenerated from scicloj.ml.template.core-- DO NOT EDIT "Core functions for machine learninig and pipeline execution. Requiring this namesspace registers as well the model in: * scicloj.ml.smile.classification * scicloj.ml.smile.regression * scicloj.ml.xgboost Functions are re-expo...
cc78605af80f8da1c34a3352cc07563e63ac68eb23438be48da0293450ca1b88
clojure-lsp/clojure-lsp
test_tree.clj
(ns clojure-lsp.feature.test-tree (:require [clojure-lsp.queries :as q] [clojure-lsp.shared :as shared])) (set! *warn-on-reflection* true) (defn ^:private ->testings-children [testings] (let [root-testings (remove (fn [testing] (some #(and (shared/inside? testing %) ...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/d6ca21a6d2235d7438fd8901db93930b80ae257b/lib/src/clojure_lsp/feature/test_tree.clj
clojure
not always a string
(ns clojure-lsp.feature.test-tree (:require [clojure-lsp.queries :as q] [clojure-lsp.shared :as shared])) (set! *warn-on-reflection* true) (defn ^:private ->testings-children [testings] (let [root-testings (remove (fn [testing] (some #(and (shared/inside? testing %) ...
190203d01759f7c62e6bf51e95beed27432dc02ab51b3cafc7bfe8610606334a
marianoguerra/immutant-recipes
init.clj
(ns immutant.init (:use [ring.util.response :only (redirect)] [cemerick.friend.util :only (gets)] ring-router.core [clojure.data.json :only (read-json json-str)]) (:require [cemerick.friend :as friend] (cemerick.friend [workflows :as workflows] [credentials ...
null
https://raw.githubusercontent.com/marianoguerra/immutant-recipes/6b05ad77f91826e8613421de5bee337fc1cc65d0/friend-json-auth/src/immutant/init.clj
clojure
(ns immutant.init (:use [ring.util.response :only (redirect)] [cemerick.friend.util :only (gets)] ring-router.core [clojure.data.json :only (read-json json-str)]) (:require [cemerick.friend :as friend] (cemerick.friend [workflows :as workflows] [credentials ...
e4684520f1fc27e56cf20463cb84d1ec07b1083517ab1b74aa39069c6285fdf3
jabber-at/ejabberd
mod_bosh_riak.erl
%%%------------------------------------------------------------------- @author < > Created : 15 Apr 2017 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_bosh_riak.erl
erlang
------------------------------------------------------------------- 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 implied warranty of MERCHA...
@author < > Created : 15 Apr 2017 by < > ejabberd , Copyright ( C ) 2002 - 2018 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 GNU General Public License along wit...
77f08e817b5a3c0ed42f4f553583099b48322929442da699636155e89b01e9a9
Bogdanp/racket-crontab
info.rkt
#lang info (define license 'BSD-3-Clause) (define version "0.1") (define collection "crontab") (define deps '("base"))
null
https://raw.githubusercontent.com/Bogdanp/racket-crontab/8b940906f10913f37a82845888e72d7dce64c101/crontab-lib/info.rkt
racket
#lang info (define license 'BSD-3-Clause) (define version "0.1") (define collection "crontab") (define deps '("base"))
3534acb0db0fa0676301ac19f87446f45f4c6131f475c1bfa490c45f51a0ddbf
TrustInSoft/tis-kernel
LogicSemantics.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/LogicSemantics.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
c70ec9f2dd64f3f787af788c5e5caf43efed5284ac7a0839a3806fd816f50b6a
racket/draw
hold.rkt
#lang racket/base (provide with-holding) (define-syntax-rule (with-holding v expr) (let ([val v]) (begin0 expr (done-with val)))) ;; Ensure no inline: (define done-with #f) (set! done-with void)
null
https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/private/hold.rkt
racket
Ensure no inline:
#lang racket/base (provide with-holding) (define-syntax-rule (with-holding v expr) (let ([val v]) (begin0 expr (done-with val)))) (define done-with #f) (set! done-with void)
da6867bfb259fb8dd82129c20567532d9e1020f473fd759ba5f8b6a53b18fd58
GNOME/gimp-tiny-fu
beveled-pattern-bullet.scm
; GIMP - The GNU Image Manipulation Program Copyright ( C ) 1995 and ; ; Beveled pattern bullet for web pages Copyright ( C ) 1997 ; ; ; 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 ...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/beveled-pattern-bullet.scm
scheme
GIMP - The GNU Image Manipulation Program Beveled pattern bullet for web pages This program is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANT...
Copyright ( C ) 1995 and Copyright ( C ) 1997 it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (define (script-fu-beveled-pattern-bullet diameter pattern transparent) (let* ( (img (car (gimp-image-new diamet...
f65ec7bb854d6748ba8ae0daf74369669e92fb1591710e13788906fe0b975646
MarcKaufmann/congame
identity.rkt
#lang racket/base (require congame-web/components/auth congame-web/components/user congame/components/export (only-in congame/components/study current-study-instance-id current-study-stack) db koyo/url (prefix-in http: net/http-e...
null
https://raw.githubusercontent.com/MarcKaufmann/congame/ba0d4e4dc4208b4dddbbd602e9093b77bbdb7d1d/congame-web/components/identity.rkt
racket
FIXME: do authorization check based on an api user for congame server. use congame_servers table rather than users. TODO: Is it a feature or a bug that non-identity users trigger this?
#lang racket/base (require congame-web/components/auth congame-web/components/user congame/components/export (only-in congame/components/study current-study-instance-id current-study-stack) db koyo/url (prefix-in http: net/http-e...
1154057b4c2d18d0439416c3b4996db74eed175528edbede0c9bca9e4578c079
lep/jassbot
Signature.hs
# LANGUAGE DeriveGeneric # module Jassbot.Signature ( Native(..) , Signature(..) , parameters , fnname , returnType , sloppySignatureParser , pretty ) where import GHC.Generics import Data.Binary import Data.List (intercalate) import Data.Functor import Control.Applicative import ...
null
https://raw.githubusercontent.com/lep/jassbot/d02402b2f058bca4c77a9014dff24dccab82eb34/Jassbot/Signature.hs
haskell
traceM "fullsig" traceM "nameRet" traceM "paramRet" traceM "justname"
# LANGUAGE DeriveGeneric # module Jassbot.Signature ( Native(..) , Signature(..) , parameters , fnname , returnType , sloppySignatureParser , pretty ) where import GHC.Generics import Data.Binary import Data.List (intercalate) import Data.Functor import Control.Applicative import ...
c37c3e209bf263c910b770da626615b4a6a3d7bcfd7071edc6c73442ca5b1dcc
gothinkster/clojurescript-keechma-realworld-example-app
register_form.cljs
(ns app.controllers.guest.register-form (:require [keechma.next.controller :as ctrl] [keechma.next.controllers.pipelines :as pipelines] [keechma.pipelines.core :as pp :refer-macros [pipeline!]] [app.api :as api] [promesa.core :as p] [keechma.next.controllers...
null
https://raw.githubusercontent.com/gothinkster/clojurescript-keechma-realworld-example-app/f6d32f8eea5439b0b33df1afb89da6d27b7da66b/src/app/controllers/guest/register_form.cljs
clojure
(ns app.controllers.guest.register-form (:require [keechma.next.controller :as ctrl] [keechma.next.controllers.pipelines :as pipelines] [keechma.pipelines.core :as pp :refer-macros [pipeline!]] [app.api :as api] [promesa.core :as p] [keechma.next.controllers...
510b49a073cd5fae157fdb6087d1b029c8d12a80fd27796ff1794531f92b7962
uwplse/synapse
specs.rkt
#lang s-exp rosette (require "../../opsyn/engine/util.rkt") (provide (all-defined-out)) ; Utility procedures for defining pre conditions ; on inputs and (relaxed) correctness constraints ; on outputs. ; Returns a procedure that takes as input a list of ; numbers and asserts that all of them are between ; low an...
null
https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/benchmarks/parrot/specs.rkt
racket
Utility procedures for defining pre conditions on inputs and (relaxed) correctness constraints on outputs. Returns a procedure that takes as input a list of numbers and asserts that all of them are between low and high, inclusive. Returns a procedure that asserts a relaxed
#lang s-exp rosette (require "../../opsyn/engine/util.rkt") (provide (all-defined-out)) (define (range low high) (procedure-rename (lambda (xs) (for ([x xs]) (let ([x (finitize x)]) (assert (<= (finitize low) x)) (assert (<= x (finitize high)))))) 'range)) Asserts the correctnes...
67446b2c41695636f4eecee8da330975ea6bee0e5cd811ef84cacf1425255129
mmcgrana/clj-stacktrace
core.clj
(ns clj-stacktrace.core (:require [clojure.string :as string])) (defn- clojure-code? "Returns true if the filename is non-null and indicates a clj source file." [class-name file] (or (re-find #"^user" class-name) (= file "NO_SOURCE_FILE") (and file (re-find #"\.clj$" file)))) (defn- clojure-ns "...
null
https://raw.githubusercontent.com/mmcgrana/clj-stacktrace/94dc2dd748710e79800e94b713e167e5dc525717/src/clj_stacktrace/core.clj
clojure
drop everything before and including the first $ drop any __xyz suffixes sub _PLACEHOLDER_ for the corresponding char
(ns clj-stacktrace.core (:require [clojure.string :as string])) (defn- clojure-code? "Returns true if the filename is non-null and indicates a clj source file." [class-name file] (or (re-find #"^user" class-name) (= file "NO_SOURCE_FILE") (and file (re-find #"\.clj$" file)))) (defn- clojure-ns "...
6293e3716f5ecac352c877b419a7cc9c0af476f906e9ba07a3d885db451b35cd
tek/polysemy-hasql
Input.hs
module Polysemy.Hasql.Queue.Input where import Control.Concurrent (threadWaitRead) import qualified Control.Concurrent.Async as Concurrent import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TBMQueue (TBMQueue, closeTBMQueue, newTBMQueueIO, readTBMQueue, writeTBMQueue) import Control.Monad.Trans.M...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/59897996f780231c74001a9c605094f74f13c88c/packages/hasql/lib/Polysemy/Hasql/Queue/Input.hs
haskell
module Polysemy.Hasql.Queue.Input where import Control.Concurrent (threadWaitRead) import qualified Control.Concurrent.Async as Concurrent import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TBMQueue (TBMQueue, closeTBMQueue, newTBMQueueIO, readTBMQueue, writeTBMQueue) import Control.Monad.Trans.M...
8452d350f9473b61beec404b16c88423b559387d03fbb47181f8788597be4eaf
ocamllabs/ocaml-modular-implicits
includemod.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/typing/includemod.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 Q Public License version 1.0 . open Misc open Path open Typedtree ope...
712a641284e64a9542277df7b0e1cf3cb366dc7ff5db03faa61a3d4bd7b96b12
yetibot/yetibot
jira.clj
(ns yetibot.commands.jira (:require [clojure.tools.cli :refer [parse-opts]] [yetibot.core.util :refer [filter-nil-vals ]] [taoensso.timbre :refer [info debug]] [clojure.string :refer [split join trim blank?]] [yetibot.core.hooks :refer [cmd-hook]] [clojure.data.json :as json] [yetibot.api.jira :a...
null
https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/jira.clj
clojure
responses we're dealing with here ¯\_(ツ)_/¯ errors in the json response to set a channel-specific default)] [-i issue-type] [-e reporter] [-a <assignee>] [-d <description>] [-f <fix-version>] [-t <time estimated>] [-p <parent-issue-key> (creates a sub-task if specified)] they provided an id so use that but in st...
(ns yetibot.commands.jira (:require [clojure.tools.cli :refer [parse-opts]] [yetibot.core.util :refer [filter-nil-vals ]] [taoensso.timbre :refer [info debug]] [clojure.string :refer [split join trim blank?]] [yetibot.core.hooks :refer [cmd-hook]] [clojure.data.json :as json] [yetibot.api.jira :a...
10062c1f994eadc323cd06c73939a4316d1034701e3b846134fffa7177625ee3
sdiehl/bulletproofs
Internal.hs
# LANGUAGE DeriveGeneric , , ViewPatterns # module Bulletproofs.RangeProof.Internal where import Protolude import Numeric (showIntAtBase) import Data.Char (intToDigit, digitToInt) import Control.Monad.Random (MonadRandom) import Data.Field.Galois (PrimeField(..)) import Data.Curve.Weierstrass.SECP256K1 (PA, Fr, mul...
null
https://raw.githubusercontent.com/sdiehl/bulletproofs/6cb356a2ad44dea139abb81214f1babab8456b91/Bulletproofs/RangeProof/Internal.hs
haskell
^ Blinding factor of the T1 and T2 commitments, combined into the form required to make the committed version of the x-polynomial add up ^ Blinding factor required for the Verifier to verify commitments A, S ^ Dot product of vectors l and r that prove knowledge of the value in range t = t(x) = l(x) · r(x) A = α ·...
# LANGUAGE DeriveGeneric , , ViewPatterns # module Bulletproofs.RangeProof.Internal where import Protolude import Numeric (showIntAtBase) import Data.Char (intToDigit, digitToInt) import Control.Monad.Random (MonadRandom) import Data.Field.Galois (PrimeField(..)) import Data.Curve.Weierstrass.SECP256K1 (PA, Fr, mul...
7850fd07508921bb8c0d5f03c15b65585e680539d8578e99b6ee8bc7336f2c0b
simonstl/introducing-erlang-2nd
combined.erl
-module(combined). -export([height_to_mph/1]). height_to_mph(Meters) -> convert:mps_to_mph(drop:fall_velocity(Meters)).
null
https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch02/ex3-combined/combined.erl
erlang
-module(combined). -export([height_to_mph/1]). height_to_mph(Meters) -> convert:mps_to_mph(drop:fall_velocity(Meters)).
d4f553d3ddee712a209f8a1f109edcab69d86e485daf7bf4f0342931d9bef0be
digital-asset/ghc
Main.hs
module Main(main) where import M1 () main :: IO () main = return ()
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/warnings/should_compile/T13727/src-exe/Main.hs
haskell
module Main(main) where import M1 () main :: IO () main = return ()
f08f4842f5a912b615011e0dbd34196f9c9cbb066d151fea0b980b0fa3451479
exercism/babashka
minesweeper_test.clj
(ns minesweeper-test (:require [clojure.test :refer [deftest is]] [clojure.string :refer [join]] [minesweeper :refer [draw]])) (def line-separator (System/getProperty "line.separator")) (deftest zero-size-board (is (= (draw "") ""))) (deftest empty-board (is (= (draw (join line-separato...
null
https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/minesweeper/test/minesweeper_test.clj
clojure
(ns minesweeper-test (:require [clojure.test :refer [deftest is]] [clojure.string :refer [join]] [minesweeper :refer [draw]])) (def line-separator (System/getProperty "line.separator")) (deftest zero-size-board (is (= (draw "") ""))) (deftest empty-board (is (= (draw (join line-separato...
d1addbe047625c6bc89bcd3a22ea7e4b0dbff51a36d70aa0fa624bfa92e8be2d
rabbitmq/rabbitmq-web-dispatch
rabbit_web_dispatch_SUITE.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 . %% -module(rabbit_web_dispatch_SUITE). -compile(ex...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-web-dispatch/3fc4f8471bf1afad24bbb07ecad8853d5b3a05a7/test/rabbit_web_dispatch_SUITE.erl
erlang
------------------------------------------------------------------- Test suite setup/teardown. ------------------------------------------------------------------- ------------------------------------------------------------------- Test cases. ------------------------------------------------------------------- ...
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 . -module(rabbit_web_dispatch_SUITE). -compile(export_a...
c7ca362144191a5aeebcb2533ed68845c34989b8fe0f263581a8796a4a1683a4
srid/ema
Check.hs
module Ema.Route.Prism.Check ( checkRoutePrismGivenFilePath, checkRoutePrismGivenRoute, ) where import Control.Monad.Writer (Writer, runWriter, tell) import Data.Text qualified as T import Ema.Route.Prism.Type (Prism_, fromPrism_) import Optics.Core (Prism', preview, review) import System.FilePath ((</>)) checkRo...
null
https://raw.githubusercontent.com/srid/ema/61faae56aa0f3c6ca815f344684cc566f6341662/ema/src/Ema/Route/Prism/Check.hs
haskell
route go through. | Check if the route @Prism_@ is lawful. A route @Prism_@ is lawful if its conversions both the ways form an isomorphism for a given value. Returns a Writer reporting logs. TODO: The logging here could be improved. log $ "Testing Partial ISO law for " <> show a <> " and " <> toText s log...
module Ema.Route.Prism.Check ( checkRoutePrismGivenFilePath, checkRoutePrismGivenRoute, ) where import Control.Monad.Writer (Writer, runWriter, tell) import Data.Text qualified as T import Ema.Route.Prism.Type (Prism_, fromPrism_) import Optics.Core (Prism', preview, review) import System.FilePath ((</>)) checkRo...
63420f4553b92e6694ba2fb93f98df5657076253778181565ca5ccbe1068380a
show-matz/CL-STL
cl-stl-functional.lisp
(in-package :cl-stl) (declaim (inline not1 not2 #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) bind1st #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) bind2nd #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) ptr_fun1 #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) ptr_fun2 #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) mem_fu...
null
https://raw.githubusercontent.com/show-matz/CL-STL/c6ffeac2815fa933121bc4c8b331d9c3516dff88/src/cl-stl-functional.lisp
lisp
------------------------------------------------------------------------------- functor basis ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- default methods for functor --------------------------------...
(in-package :cl-stl) (declaim (inline not1 not2 #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) bind1st #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) bind2nd #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) ptr_fun1 #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) ptr_fun2 #+(or cl-stl-0x98 cl-stl-0x11 cl-stl-0x14) mem_fu...
19f3015bc60a87267d85e40017a3898af9330973072fb2d24f4c640ef454d8b3
erlyvideo/publisher
rtsp_inbound.erl
@author < > [ ] 2010 - 2011 %%% @doc RTSP socket module %%% %%% 1 . connect 2 . describe 3 . each setup 4 . play , possible Rtp - Sync 5 . get each packet 6 . decode %%% %%% %%% @end @reference See < a href=" / rtsp " target="_top"></a > for common information . %%% @end %%% T...
null
https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/rtsp/src/rtsp_inbound.erl
erlang
@doc RTSP socket module @end @end erlang-rtsp is free software: you can redistribute it and/or modify (at your option) any later version. erlang-rtsp 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 P...
@author < > [ ] 2010 - 2011 1 . connect 2 . describe 3 . each setup 4 . play , possible Rtp - Sync 5 . get each packet 6 . decode @reference See < a href=" / rtsp " target="_top"></a > for common information . This file is part of erlang - rtsp . it under the terms of the GNU Gener...
b1df13cf0a9f71143fd3cb0d5eb636bb4421b3e50b7c4d001b69a4bb442cb84c
patrickgombert/erlang-koans
about_lists.erl
-module(about_lists). -export([lists_are_not_homogeneous/0, we_can_add/0, we_can_also_take_away/0, lists_define_delete/0, just_how_many_are_deleted/0, lists_have_heads/0, lists_also_have_tails/0, constructing_with_cons/0, length_is_as_simple_as_it_...
null
https://raw.githubusercontent.com/patrickgombert/erlang-koans/d80032d99b6ee3537e585ea02b743fe681fad8cf/src/about_lists.erl
erlang
-module(about_lists). -export([lists_are_not_homogeneous/0, we_can_add/0, we_can_also_take_away/0, lists_define_delete/0, just_how_many_are_deleted/0, lists_have_heads/0, lists_also_have_tails/0, constructing_with_cons/0, length_is_as_simple_as_it_...
06745f29da45b948266cc141d7aa9ed80fe8fd35043273b6b1c8b0cfbd4e6dd8
Kappa-Dev/KappaTools
kfiles.ml
(******************************************************************************) (* _ __ * The Kappa Language *) | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF (* | ' / ********************************************************************...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/777835b82f449d3d379713df76ff25fd5926b762/core/grammar/kfiles.ml
ocaml
**************************************************************************** _ __ * The Kappa Language | ' / ******************************************************************** | . \ * This file is distributed under the terms of the |_|\_\ * GN...
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF open Lwt.Infix type item = { rank : int; content : string; } type catalog = { elements : (string,item) Hashtbl.t; index : string option Mods.DynArray.t; ast : Ast.parsing_compil option ref; } type catalog_item = { position :...
20b0d1f6260e3cf639e2945b69b4ab356cc0774c34986dbf8c57df1da4a8fcbc
conscell/hugs-android
Eliza.hs
-- Eliza: an implementation of the classic pseudo-psychoanalyst --------------- -- Gofer version by , January 12 1992 . Modified for Hugs 1.3 , August 1996 . -- -- Adapted from a pascal implementation provided as part of an experimental package from ( ) , Univ . of KY . with original pascal code apparentl...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/demos/Eliza.hs
haskell
Eliza: an implementation of the classic pseudo-psychoanalyst --------------- Adapted from a pascal implementation provided as part of an experimental ----------------------------------------------------------------------------- Read a line at a time, and produce some kind of response ------------------- strip pun...
Gofer version by , January 12 1992 . Modified for Hugs 1.3 , August 1996 . package from ( ) , Univ . of KY . with original pascal code apparently provided by ( ) . module Eliza where import Interact import Char(toUpper) eliza = interact (writeStr hi $ session initial []) where hi = "\n\ ...
fa41e131665c8c840e12ba3d49246754933cf743303da997108c5f1bf4e90910
HaskellForCats/HaskellForCats
findAvPrimes2.hs
module FindAvTruPrimes where {- taking a list of primes and then finding the average of that list that is itself a prime -} - let lX = ( sum findAvTruPrimes 101 ) ` div ` ( length ( findAvTruPrimes 101 ) ) * FindAvTruPrimes > ( prime ( average ( findAvTruPrimes 101 ) ) ) True - let lX = (sum findAvTruPri...
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/findAvPrimes2.hs
haskell
taking a list of primes and then finding the average of that list that is itself a prime
module FindAvTruPrimes where - let lX = ( sum findAvTruPrimes 101 ) ` div ` ( length ( findAvTruPrimes 101 ) ) * FindAvTruPrimes > ( prime ( average ( findAvTruPrimes 101 ) ) ) True - let lX = (sum findAvTruPrimes 101) `div` (length (findAvTruPrimes 101)) *FindAvTruPrimes> (prime (average (findAvTruPrimes ...
2df03e5ca16de081b53ad48fbae78b97677609cf9741f09f267a58d7e7f6c9ba
samanthadoran/effective-guacamole
console.lisp
(defpackage #:psx-console (:nicknames #:psx) (:use :cl :psx-cpu :memory) (:export #:make-psx #:load-rom-from-file #:console-on #:make-console #:setup-and-run)) (in-package :psx-console) (declaim (optimize (speed 3) (safety 1))) (defstruct psx "A model psx" (scheduler (psx-scheduler:make-scheduler...
null
https://raw.githubusercontent.com/samanthadoran/effective-guacamole/89fa1a8c0527e519e4a1a0b8f85b041843b99099/console.lisp
lisp
TODO(Samantha): I'm not convinced this is going to work out cleanly. The #x200000s here are indicative of the non-mirrored ram size of the psx. We already have a constant for this size, but using it here makes the macroexpander cry. TODO(Samantha): Rename this to something more descriptive (declaim (ftype (functi...
(defpackage #:psx-console (:nicknames #:psx) (:use :cl :psx-cpu :memory) (:export #:make-psx #:load-rom-from-file #:console-on #:make-console #:setup-and-run)) (in-package :psx-console) (declaim (optimize (speed 3) (safety 1))) (defstruct psx "A model psx" (scheduler (psx-scheduler:make-scheduler...
362bbf0d2346b1001a6f73c0c2af830a4a30fc91ccd3cd36ec0bcdb1c6ebbd33
programaker-project/Programaker-Core
automate_rest_api_program_assets_by_id.erl
-module(automate_rest_api_program_assets_by_id). -export([ init/2 , allowed_methods/2 , options/2 , is_authorized/2 , content_types_provided/2 , resource_exists/2 ]). -export([ retrieve_file/2 ]). -include("./records.hrl"). -include("../../automate_storage/src/re...
null
https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_program_assets_by_id.erl
erlang
CORS Authentication Don't do authentication if it's just asking for options Image handler
-module(automate_rest_api_program_assets_by_id). -export([ init/2 , allowed_methods/2 , options/2 , is_authorized/2 , content_types_provided/2 , resource_exists/2 ]). -export([ retrieve_file/2 ]). -include("./records.hrl"). -include("../../automate_storage/src/re...
f8ec1ce329d4b7e4d4dd63df3ec4fe13cdc45abf64bdade32ff1db29f19a9a0f
reactiveml/rml
depend.ml
(**********************************************************************) (* *) (* ReactiveML *) (* *) (* ...
null
https://raw.githubusercontent.com/reactiveml/rml/d3ac141bd9c6e3333b678716166d988ce04b5c80/tools/rmldep/depend.ml
ocaml
******************************************************************** ReactiveML ...
Copyright 2002 , 2007 . All rights reserved . version 1.0 . - theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 ) - Verimag , CNRS Grenoble ( 2005 - 2006 ) - projet , ( 2006 - 2007 ) ...
76f6088a81ce4b30871f3256ab4d0299adf943cf2ee0aa93f828c0be60625a91
input-output-hk/rscoin-haskell
FilePathUtils.hs
module Bench.RSCoin.FilePathUtils ( dbFormatPath , tempBenchDirectory , walletPathPrefix ) where import Data.String (IsString) import Data.Text (Text, unpack) import Formatting (int, sformat, stext, (%)) tempBenchDirectory :: FilePath tempBenchDirectory = "...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/bench/Bench/RSCoin/FilePathUtils.hs
haskell
module Bench.RSCoin.FilePathUtils ( dbFormatPath , tempBenchDirectory , walletPathPrefix ) where import Data.String (IsString) import Data.Text (Text, unpack) import Formatting (int, sformat, stext, (%)) tempBenchDirectory :: FilePath tempBenchDirectory = "...
ca6af4ad3192e39fc727b56089ebd89a73eb4747256d1dcf3181745d4ab0d77e
haskell-repa/repa
TestPar.hs
# LANGUAGE ScopedTypeVariables , MagicHash , BangPatterns , UnboxedTuples , ExistentialQuantification , TypeFamilies # ExistentialQuantification, TypeFamilies #-} module Main where import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck import System.IO.Unsaf...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-flow/test/props/TestPar.hs
haskell
Framework ------------------------------------------------------------------ -------------------------------------------------
# LANGUAGE ScopedTypeVariables , MagicHash , BangPatterns , UnboxedTuples , ExistentialQuantification , TypeFamilies # ExistentialQuantification, TypeFamilies #-} module Main where import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck import System.IO.Unsaf...
a1a619c86ab5ee8012fea1815104e473688b9f2c990dce19d1b86c1d13bcb80e
danieljharvey/mimsa
Evaluate.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Server.Endpoints.Project.Evaluate ( evaluate, EvaluateAPI, ) where import Control.Monad.Except import qualifi...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/server/server/Server/Endpoints/Project/Evaluate.hs
haskell
# LANGUAGE DeriveAnyClass # using -servant/servant/blob/master/doc/cookbook/uverb/UVerb.lhs /project/evaluate-module/
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Server.Endpoints.Project.Evaluate ( evaluate, EvaluateAPI, ) where import Control.Monad.Except import qualified Data.Aeson as JSON import Dat...
e4379454b05a14c2dfcbea058a7a6cea87857dddb522fb0e9ed5082fbf9bc752
CloudI/CloudI
auto_export_test2.erl
-*- coding : utf-8 -*- -*- erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright 2010 - 2019 < > , < > and < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it a...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/test/auto_export_test2.erl
erlang
------------------------------------------------------------------- PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITN...
-*- coding : utf-8 -*- -*- erlang - indent - level : 2 -*- Copyright 2010 - 2019 < > , < > and < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Licens...
dcf49b3ef56e651345844d6c852b3f5aa61572b0a7c3d3548e9759c19ff883f3
votinginfoproject/data-processor
ballot_selections_postgres_test.clj
(ns vip.data-processor.db.translations.v5-2.ballot-selections-postgres-test (:require [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as postgres] [vip.data-processor.db.translations.v5-2.ballot-selections :as bs] ...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/db/translations/v5_2/ballot_selections_postgres_test.clj
clojure
(ns vip.data-processor.db.translations.v5-2.ballot-selections-postgres-test (:require [clojure.test :refer :all] [vip.data-processor.test-helpers :refer :all] [vip.data-processor.db.postgres :as postgres] [vip.data-processor.db.translations.v5-2.ballot-selections :as bs] ...
82708bd3654c721d4c08861e03b2a80a6be6cffca20f53755522a3260946ec7a
brendanhay/gogol
Update.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-logging/gen/Gogol/Logging/Projects/Sinks/Update.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer/identity; see the unique/writer_identity field. ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
f812f6629d4bf102277532c807b15e49904526ae64b1e67c7d81d44f64de0ed8
jaspervdj/advent-of-code
10.hs
{-# LANGUAGE BangPatterns #-} import qualified AdventOfCode.Grid as G import qualified AdventOfCode.Parsing as Parsing import AdventOfCode.V2 import qualified AdventOfCode.V2.Box as Box import qualified Data.List as L import qualified Data.Map as M import qualified System.IO ...
null
https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/2018/10.hs
haskell
# LANGUAGE BangPatterns #
import qualified AdventOfCode.Grid as G import qualified AdventOfCode.Parsing as Parsing import AdventOfCode.V2 import qualified AdventOfCode.V2.Box as Box import qualified Data.List as L import qualified Data.Map as M import qualified System.IO as IO data Light = Light...
b92c0480ff8602d6201e2a13c4790738502784116e30b5892ed3c4322bc34e80
mage2tv/magento-cache-clean
config.cljs
(ns cache.config (:require [cache.config.php :as php] [cache.config.file :as file])) (defn- use-dump? [magento-basedir] (file/config-dump-exists? magento-basedir)) (defn- file-or-php [magento-basedir file-fn php-fn] (let [f (if (use-dump? magento-basedir) file-fn php-fn)] (partial f magento-base...
null
https://raw.githubusercontent.com/mage2tv/magento-cache-clean/67d4ce3f06cb42eccceff436580cdfe0ddfc5deb/src/cache/config.cljs
clojure
(ns cache.config (:require [cache.config.php :as php] [cache.config.file :as file])) (defn- use-dump? [magento-basedir] (file/config-dump-exists? magento-basedir)) (defn- file-or-php [magento-basedir file-fn php-fn] (let [f (if (use-dump? magento-basedir) file-fn php-fn)] (partial f magento-base...
2fd3a426be5a5eefa5d7f09788289eafea8145da0a53b7ac891665f0e3de1066
c-cube/ocaml-containers
CCCache.ml
(* This file is free software, part of containers. See file "license" for more details. *) (** {1 Caches} *) type 'a equal = 'a -> 'a -> bool type 'a hash = 'a -> int let default_hash_ = Hashtbl.hash * { 2 Value interface } type ('a, 'b) t = { set: 'a -> 'b -> unit; get: 'a -> 'b; (* or raise Not_found *) si...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCCache.ml
ocaml
This file is free software, part of containers. See file "license" for more details. * {1 Caches} or raise Not_found * Invariants: - after [cache.set x y], [get cache x] must return [y] or raise [Not_found] - [cache.set x y] is only called if [get cache x] fails, never if [x] is already bound - [cache....
type 'a equal = 'a -> 'a -> bool type 'a hash = 'a -> int let default_hash_ = Hashtbl.hash * { 2 Value interface } type ('a, 'b) t = { set: 'a -> 'b -> unit; size: unit -> int; iter: ('a -> 'b -> unit) -> unit; clear: unit -> unit; } type ('a, 'b) callback = in_cache:bool -> 'a -> 'b -> unit let clear c ...
2c348a1b4ee6ee5211df932e8cd0eaca78e7e9d02a0084595ba830bac687d9ef
qiao/sicp-solutions
2.71.scm
{ A B C D E } 31 ;; / \ ;; / \ { A B C D } 15 { E } 16 ;; / \ ;; / \ { A B C } 7 { D } 8 ;; / \ ;; / \ { A B } 3 { C } 4 ;; / \ { A ...
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.71.scm
scheme
/ \ / \ / \ / \ / \ / \ / \ the least frequent symbol requires n - 1 bits
{ A B C D E } 31 { A B C D } 15 { E } 16 { A B C } 7 { D } 8 { A B } 3 { C } 4 { A } 1 { B } 2 encoding the most frequent symbol requires 1 bit whereas
cee5211a9cde0762c0463451c6a8eaeec64e881447264227d428f54ee19ea3ce
GlideAngle/flare-timing
MaskReachMain.hs
{-# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #-} import System.Environment (getProgName) import System.Console.CmdArgs.Implicit (cmdArgs) import Formatting ((%), fprint) import Formatting.Clock (timeSpecs) import System.Clock (getTime, Clock(Monotonic)) import Control.Exception.Safe (catchIO) import System.Dir...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/34873946be9b93c37048ed118ef5b4649c71d630/lang-haskell/flare-timing/prod-apps/mask-reach/MaskReachMain.hs
haskell
# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #
import System.Environment (getProgName) import System.Console.CmdArgs.Implicit (cmdArgs) import Formatting ((%), fprint) import Formatting.Clock (timeSpecs) import System.Clock (getTime, Clock(Monotonic)) import Control.Exception.Safe (catchIO) import System.Directory (getCurrentDirectory) import Flight.Route (Optima...
36a5cf181310e0a2e5890cf31be763f92c8bbebee9917b5cf40417995f0c9a64
tweag/ormolu
preceding-comment-with-haddock-out.hs
{- Here we go. -} | This is the module 's . module Main (main) where main = return ()
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/module-header/preceding-comment-with-haddock-out.hs
haskell
Here we go.
| This is the module 's . module Main (main) where main = return ()
08cd9f59fa1590db8514298eb722fae7988b148383c86a7c4da28fa1f639d106
achin/lein-parent
plugin.clj
(ns lein-parent.plugin (:require [leiningen.parent :as parent] [leiningen.core.project :as project])) (def meta-merge #'project/meta-merge) (defn middleware [project] (if-let [inherited (parent/inherited-properties project)] (with-meta (meta-merge project inherited) (update (meta pr...
null
https://raw.githubusercontent.com/achin/lein-parent/37630e184a37f9adc2a431f4016624b3e815f848/src/lein_parent/plugin.clj
clojure
(ns lein-parent.plugin (:require [leiningen.parent :as parent] [leiningen.core.project :as project])) (def meta-merge #'project/meta-merge) (defn middleware [project] (if-let [inherited (parent/inherited-properties project)] (with-meta (meta-merge project inherited) (update (meta pr...
c5f4bf64ddd68736a09095ad2e57958b2dfd8024e85a4888dd1f7649f84c90c4
SimulaVR/godot-haskell
Main.hs
import Classgen.Module import Classgen.Spec import Control.Lens import Control.Monad.State import Data.Maybe (mapMaybe) import Data.Aeson import qualified Data.ByteString.Lazy as BL import qualified Data.HashMap.Strict as HM import Language.Haskell.Exts import Language.Haskell.Exts.SimpleComments import System.Director...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/classgen/app-classgen/Main.hs
haskell
let out = prettyPrint mdl
import Classgen.Module import Classgen.Spec import Control.Lens import Control.Monad.State import Data.Maybe (mapMaybe) import Data.Aeson import qualified Data.ByteString.Lazy as BL import qualified Data.HashMap.Strict as HM import Language.Haskell.Exts import Language.Haskell.Exts.SimpleComments import System.Director...
d1e0d40d568995520fb794841bd75bd6f551558ba713307479e262dea256f83a
freckle/hspec-junit-formatter
Env.hs
-- | Load a 'JUnitConfig' using environment variables module Test.Hspec.JUnit.Config.Env ( envJUnitEnabled , envJUnitConfig ) where import Prelude import Data.Semigroup (Endo(..)) import Data.Text (pack) import System.Directory (getCurrentDirectory) import System.Environment (lookupEnv) import System.File...
null
https://raw.githubusercontent.com/freckle/hspec-junit-formatter/38eb127982f55a8287f95d7e7532b8b7c0938c4d/library/Test/Hspec/JUnit/Config/Env.hs
haskell
| Load a 'JUnitConfig' using environment variables | Is @JUNIT_ENABLED=1@ set in the environment? | Produce a 'JUnitConfig' by reading environment variables Variable names align with setter functions from "Test.Hspec.JUnit.Config": * @JUNIT_OUTPUT_DIRECTORY@ 'setJUnitConfigOutputDirectory' * @JUNIT_OUTPUT_NAME@...
module Test.Hspec.JUnit.Config.Env ( envJUnitEnabled , envJUnitConfig ) where import Prelude import Data.Semigroup (Endo(..)) import Data.Text (pack) import System.Directory (getCurrentDirectory) import System.Environment (lookupEnv) import System.FilePath (takeBaseName) import Test.Hspec.JUnit.Config en...
c0baffb0cf19723882f58d7225dbaaa484c07b478ee49d7f2ebc6dfeccd5ea39
andrewzhurov/brawl-haus
css.cljs
(ns brawl-haus.fit.css) (def styles [[:body {:overflow "hidden"}] [:svg {:cursor "crosshair" }] [:.data-reactroot {:overflow "hidden"}] [:.timeline {:position "absolute" :top 0 :right 0 :left 0 :height "40px" :background "rgba(0,0,0,0.3)" ...
null
https://raw.githubusercontent.com/andrewzhurov/brawl-haus/7f560c3dcee7b242fda545d87c102471fdb21888/src/cljs/brawl_haus/fit/css.cljs
clojure
(ns brawl-haus.fit.css) (def styles [[:body {:overflow "hidden"}] [:svg {:cursor "crosshair" }] [:.data-reactroot {:overflow "hidden"}] [:.timeline {:position "absolute" :top 0 :right 0 :left 0 :height "40px" :background "rgba(0,0,0,0.3)" ...
f772a084794f227bf734ca9540633470d7cc262eb1dfa7b523b70ec98cc1c74b
footprintanalytics/footprint-web
upgrade_field_literals.clj
(ns metabase.query-processor.middleware.upgrade-field-literals (:require [clojure.string :as str] [clojure.tools.logging :as log] [clojure.walk :as walk] [medley.core :as m] [metabase.config :as config] [metabase.mbql.util :as mbql.u] [metabase.q...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/upgrade_field_literals.clj
clojure
blow up prod logs don't i18n this because it's developer-facing only. the one in `source-aliases`. Will this work? Not sure whether or not we need to log something about this. complain about anything. no matching Field ref means there's no column with this name in the source query. The query may not work, so log ...
(ns metabase.query-processor.middleware.upgrade-field-literals (:require [clojure.string :as str] [clojure.tools.logging :as log] [clojure.walk :as walk] [medley.core :as m] [metabase.config :as config] [metabase.mbql.util :as mbql.u] [metabase.q...
2e6c278aa23a6e9162d8849661ed980b8e4cae1e71aab9898b17a48fdde7d5b5
xapi-project/xenopsd
table.ml
* Copyright ( C ) 2006 - 2009 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 describe...
null
https://raw.githubusercontent.com/xapi-project/xenopsd/f4da21a4ead7c6a7082af5ec32f778faf368cf1c/list_domains/table.ml
ocaml
* Some string handling functions to help drawing text tables. Modified from Richard's code in the CLI
* Copyright ( C ) 2006 - 2009 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 describe...
29aca9d8107d6e2f8b2a02fd797bde3d7de02863a945b084b3ac935dedfb1ac4
williamleferrand/aws
sQS_factory.ml
SQS API (* *) module Make = functor (HC : Aws_sigs.HTTP_CLIENT) -> struct module C = CalendarLib.Calendar module P = CalendarLib.Printer.CalendarPrinter module X = My_xml open Lwt open Creds module Util = Aws_util exception Error of string let sprint = Printf.sprintf let print = Printf.prin...
null
https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/src/sQS_factory.ml
ocaml
copy/paste from EC2; barko you want to move to Util? xml handling utilities create queue list existing queues get messages from a queue delete a message from a queue send a message to a queue
SQS API module Make = functor (HC : Aws_sigs.HTTP_CLIENT) -> struct module C = CalendarLib.Calendar module P = CalendarLib.Printer.CalendarPrinter module X = My_xml open Lwt open Creds module Util = Aws_util exception Error of string let sprint = Printf.sprintf let print = Printf.printf l...
2cfbc9fb3d1c72968daac8a5197ebac6405f3d29740ba9afe1d14991563d8731
ucsd-progsys/nate
btype.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) and , projet Crist...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/typing/btype.ml
ocaml
********************************************************************* Objective Caml ...
and , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : btype.ml , v 1.39.8.1 2007/06/08 08:03:15 g...
aced04edf2072d615c7d8f6ef0d8f32af030446f784068a3eb364bfc316f08dd
unnohideyuki/bunny
sample283.hs
f [] = False f (x:[]) = False f (x:y:[]) = x > y f (x:xs) = f xs main = putStrLn $ show $ f "331223"
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample283.hs
haskell
f [] = False f (x:[]) = False f (x:y:[]) = x > y f (x:xs) = f xs main = putStrLn $ show $ f "331223"
88102fdd29356a4094d3e676815a06c1602571e16de5e98d6e22497816a50b97
chetmurthy/ensemble
appl_lwe.ml
(**************************************************************) APPL_LWE.ML : lwe application interface Author : , 11/97 (**************************************************************) open Trans open Util open View open Appl_intf open New (**************************************************************) let ...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/appl/appl_lwe.ml
ocaml
************************************************************ ************************************************************ ************************************************************ ************************************************************ ************************************************************ The heartbeat ...
APPL_LWE.ML : lwe application interface Author : , 11/97 open Trans open Util open View open Appl_intf open New let name = Trace.file "APPL_LWE" let failwith = Trace.make_failwith name let log = Trace.log name let arrayf_combine5 a b c d e = let len = Arrayf.length a in let lb = Arrayf.length b in let l...
349f163fafdb970a957e40d871d36d6c73250f386ddd6f7dd7fc8f8301fb71e2
tmattio/device-detector
device_detector.mli
module Referer : sig type t = { domain : string; medium_name : string; referer_name : string; parameters : string list; } val find_from_domain : string -> t option val find_from_uri : string -> t option val favicon_uri : t -> string option end
null
https://raw.githubusercontent.com/tmattio/device-detector/7153345a305c441b2393016cd32153c6ab8e7c95/lib/device_detector.mli
ocaml
module Referer : sig type t = { domain : string; medium_name : string; referer_name : string; parameters : string list; } val find_from_domain : string -> t option val find_from_uri : string -> t option val favicon_uri : t -> string option end
48a160657594411c451de01372f7b9c5f3e79eb65a8f6dd884b1bf01653c9200
andreasabel/java-adt
Syntax.hs
# LANGUAGE DeriveFoldable # | Example : ( only ground inductive types ) @ data D = C1 { x1 : : D1 , ... , xn : : Dn } | C2 ... ... @ is printed as @ public abstract class D { } public class C1 extends D { public D1 x1 ; ... public Dn xn ; public...
null
https://raw.githubusercontent.com/andreasabel/java-adt/db346d3112cc31823bd70957d331b73af806f3eb/src/Syntax.hs
haskell
visitor E1 V1 visitor E2 V2 visitor ' name name visitor E1 V1 visitor E2 V2 visitor' name name ^ Type variable. ^ @List<Type>@ ^ @Type<Type>@ ^ @Type@
# LANGUAGE DeriveFoldable # | Example : ( only ground inductive types ) @ data D = C1 { x1 : : D1 , ... , xn : : Dn } | C2 ... ... @ is printed as @ public abstract class D { } public class C1 extends D { public D1 x1 ; ... public Dn xn ; public...
50f7014ded1bddee07673472784d027a0fd46396d65324adc8036673ca430dc7
klutometis/clrs
figure-15.3.scm
(require-extension syntax-case srfi-11 array-lib check) (require '../15.2/section) (import section-15.2) (let ((p '(30 35 15 5 10 20 25))) (let-values (((m s) (matrix-chain-order p))) (check (array->list m) => '((0 15750 7875 9375 11875 15125) (+inf 0 2625 4375 7125 10500) ...
null
https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/15.2/figure-15.3.scm
scheme
(require-extension syntax-case srfi-11 array-lib check) (require '../15.2/section) (import section-15.2) (let ((p '(30 35 15 5 10 20 25))) (let-values (((m s) (matrix-chain-order p))) (check (array->list m) => '((0 15750 7875 9375 11875 15125) (+inf 0 2625 4375 7125 10500) ...
21f8af8bb47a2a4932d9de82fefc51416b5d0a7209440d0311fdb5b3384bfa60
may-liu/qtalk
mod_irc.erl
%%%---------------------------------------------------------------------- %%% File : mod_irc.erl Author : < > %%% Purpose : IRC transport Created : 15 Feb 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne %%% %%% This program is free software; you can redistribute it and/or mod...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/mod_irc.erl
erlang
---------------------------------------------------------------------- File : mod_irc.erl Purpose : IRC transport 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 WAR...
Author : < > Created : 15 Feb 2003 by < > ejabberd , Copyright ( C ) 2002 - 2014 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 GNU General Public License along ...
3987c9930575104614cf117048c62ead89d74fef876b1ce2654d4ca88d2e5454
wangsix/VMO_repeated_themes_discovery
converter.lisp
;(in-package :common-lisp-user) (load (concatenate 'string *lisp-code-root* "/File conversion" "/csv-files.lisp")) (load (concatenate 'string *lisp-code-root* "/File conversion" "/humdrum-by-col.lisp")) (load (concatenate 'string *lisp-code-root* "/File conversion" "/midi-save.lisp")) (setq *pa...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Aug2013/groundTruth/beethovenOp2No1Mvt3/polyphonic/repeatedPatterns/sectionalRepetitions/E/script/converter.lisp
lisp
(in-package :common-lisp-user)
(load (concatenate 'string *lisp-code-root* "/File conversion" "/csv-files.lisp")) (load (concatenate 'string *lisp-code-root* "/File conversion" "/humdrum-by-col.lisp")) (load (concatenate 'string *lisp-code-root* "/File conversion" "/midi-save.lisp")) (setq *path&name* (concatenate 'string...
89d500abfd2fb52a5b6f2777bb3363f154436243cf8b880211b8a5db3a2743d9
cyverse-archive/DiscoveryEnvironmentBackend
coercions.clj
(ns metadactyl.util.coercions (:require [ring.swagger.coerce :as rc] [ring.swagger.common :refer [value-of]] [schema.coerce :as sc] [schema.utils :as su] [slingshot.slingshot :refer [throw+]]) (:import [java.util UUID])) (defn- stringify-uuids [v] (if (instance? ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/util/coercions.clj
clojure
(ns metadactyl.util.coercions (:require [ring.swagger.coerce :as rc] [ring.swagger.common :refer [value-of]] [schema.coerce :as sc] [schema.utils :as su] [slingshot.slingshot :refer [throw+]]) (:import [java.util UUID])) (defn- stringify-uuids [v] (if (instance? ...
d7da5d382e3b89df2b8fdefca8a8da5915bad236bddbf1c51ebef64854301301
yesodweb/wai
FdCache.hs
# LANGUAGE BangPatterns , CPP # -- | File descriptor cache to avoid locks in kernel. module Network.Wai.Handler.Warp.FdCache ( withFdCache , Fd , Refresh #ifndef WINDOWS , openFile , closeFile , setFileCloseOnExec #endif ) where #ifndef WINDOWS import UnliftIO.Exception (bracket) import Control.Reape...
null
https://raw.githubusercontent.com/yesodweb/wai/052b875effb45fbf7fd3bb9123592fc5002c9763/warp/Network/Wai/Handler/Warp/FdCache.hs
haskell
| File descriptor cache to avoid locks in kernel. -------------------------------------------------------------- | An action to activate a Fd cache entry. -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------...
# LANGUAGE BangPatterns , CPP # module Network.Wai.Handler.Warp.FdCache ( withFdCache , Fd , Refresh #ifndef WINDOWS , openFile , closeFile , setFileCloseOnExec #endif ) where #ifndef WINDOWS import UnliftIO.Exception (bracket) import Control.Reaper import Data.IORef import Network.Wai.Handler.Warp.M...
1ccf589d72a8b5bd55550446f534e9210f97046b10ec28e0413d566a068c2837
bjorng/wings
wpc_jscad.erl
%% %% wpc_jscad.erl -- %% %% OpenJSCAD export. %% Copyright ( c ) 2019 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -module(wpc_jscad). -export([init/0,menu/2,command/2]). -include_lib("wings/e3d/e...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/plugins_src/import_export/wpc_jscad.erl
erlang
wpc_jscad.erl -- OpenJSCAD export. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ Export. Write file head Write file body each mesh will be created by a dedicated function using its name Writes vertex coord...
Copyright ( c ) 2019 -module(wpc_jscad). -export([init/0,menu/2,command/2]). -include_lib("wings/e3d/e3d.hrl"). -include_lib("wings/intl_tools/wings_intl.hrl"). init() -> true. menu({file,export}, Menu) -> menu_entry(Menu); menu({file,export_selected}, Menu) -> menu_entry(Menu); menu(_, Menu) -> Me...
e4d8076c1a5384458f715efb9261eaab09542bc1e9c1f01b88252fde388b02a4
unclebob/ScriptSchedule
core.clj
(ns ScriptSchedule.test.core (:use [ScriptSchedule.core]) (:use [midje.sweet]) (:use [clojure.java.io]) (:use [clojure.xml])) (def expected-header "Set\tCharacter\tDialogs\tScene\tPage\n") (def simple-script "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?> <FinalDraft DocumentType=\"Script\"...
null
https://raw.githubusercontent.com/unclebob/ScriptSchedule/f9bbe667cb4885bea8aea00e3ac4dabeccd75ee7/test/ScriptSchedule/test/core.clj
clojure
(ns ScriptSchedule.test.core (:use [ScriptSchedule.core]) (:use [midje.sweet]) (:use [clojure.java.io]) (:use [clojure.xml])) (def expected-header "Set\tCharacter\tDialogs\tScene\tPage\n") (def simple-script "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?> <FinalDraft DocumentType=\"Script\"...
9325b2b9c99d5a9bb9ffa20cd77039868cb349efd2fe1587bb60cd468e56b01c
40ants/ci
lisp-job.lisp
(defpackage #:40ants-ci/jobs/lisp-job (:use #:cl) (:import-from #:40ants-ci/jobs/job #:os #:lisp #:quicklisp) (:import-from #:40ants-ci/steps/action #:action) (:import-from #:40ants-ci/utils #:single #:dedent ...
null
https://raw.githubusercontent.com/40ants/ci/2e9bc031247c394012677f1629e2a278aadb0c81/src/jobs/lisp-job.lisp
lisp
Here we need to hash *.asd files to make cache different for each project. Cache content will depend not only on qlfile, but also on ASD systems installed during the build. is a symlink into a Cellar directory:
(defpackage #:40ants-ci/jobs/lisp-job (:use #:cl) (:import-from #:40ants-ci/jobs/job #:os #:lisp #:quicklisp) (:import-from #:40ants-ci/steps/action #:action) (:import-from #:40ants-ci/utils #:single #:dedent ...
c76ec31afe2c6c26fb84f93918d9fb745c03bce7020f5c77dc465dfabb3acc50
janegca/htdp2e
Exercise-182-CompleteInDictionary.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-182-CompleteInDictionary) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teach...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/Exercise-182-CompleteInDictionary.rkt
racket
about the language level of this file in a form that our tools can easily process. dictionary on your computer into a list of strings. List-of-strings -> List-of-strings pick out all those Strings that occur in the dictionary
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-182-CompleteInDictionary) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack...
b518eaad422c148e4dc3a040e4ba3d0e017a1fc9060696c312c9b715c37bbea9
futurice/haskell-mega-repo
Machine.hs
{-# LANGUAGE GADTs #-} -- | Implementation of the machine API. module Futurice.App.FUM.Machine (machineServer) where import Control.Concurrent.STM (readTVarIO) import Control.Monad.Reader (Reader, asks, runReader) import Data.Set.Lens (setOf) import Futurice.Prelude import Futurice.Signed ...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/fum-carbon-app/src/Futurice/App/FUM/Machine.hs
haskell
# LANGUAGE GADTs # | Implementation of the machine API.
module Futurice.App.FUM.Machine (machineServer) where import Control.Concurrent.STM (readTVarIO) import Control.Monad.Reader (Reader, asks, runReader) import Data.Set.Lens (setOf) import Futurice.Prelude import Futurice.Signed (SecretKey, Signed, signed, sign) import Prelude () import Servant import...
5112fe9487f2bfb6b5e9dbd5659bbd6f2b5f05e10f049c31a264f57b43d229ae
freckle/stackctl
CLI.hs
module Stackctl.CLI ( App , optionsL , AppT , runAppT ) where import Stackctl.Prelude import qualified Blammo.Logging.LogSettings.Env as LoggingEnv import Control.Monad.Catch (MonadCatch) import Control.Monad.Trans.Resource (ResourceT, runResourceT) import Stackctl.AWS import Stackctl.AWS.Scope import Stack...
null
https://raw.githubusercontent.com/freckle/stackctl/b04e1790dc523cea39e07c868b4fa328f4e453cb/src/Stackctl/CLI.hs
haskell
module Stackctl.CLI ( App , optionsL , AppT , runAppT ) where import Stackctl.Prelude import qualified Blammo.Logging.LogSettings.Env as LoggingEnv import Control.Monad.Catch (MonadCatch) import Control.Monad.Trans.Resource (ResourceT, runResourceT) import Stackctl.AWS import Stackctl.AWS.Scope import Stack...
2481e0240351420e89b30907f26962baf2f1ad4c158c8fea3a2320d362f100a5
racket/typed-racket
tc-subst.rkt
#lang racket/base ;; Functions in this file implement the substitution function in figure 8 , pg 8 of " Logical Types for Untyped Languages " (require "../utils/utils.rkt" "../utils/tc-utils.rkt" racket/match (contract-req) "../env/lexical-env.rkt" "../types/utils.rkt" ...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/typecheck/tc-subst.rkt
racket
Functions in this file implement the substitution function in Substitutes the given objects into the values and turns it into a tc-result. This matches up to the substitutions in the T-App rule from the ICFP paper. NOTE! 'os' should contain no unbound relative addresses (i.e. "free" are substituted under...
#lang racket/base figure 8 , pg 8 of " Logical Types for Untyped Languages " (require "../utils/utils.rkt" "../utils/tc-utils.rkt" racket/match (contract-req) "../env/lexical-env.rkt" "../types/utils.rkt" "../types/prop-ops.rkt" "../types/subtype.rkt" ...
18f54db1a703bf287384e7b16fdbc2836d225abdd2f1add5fe7f6884ea847bcf
chrisa/acts_as_encrypted
skel_app.erl
@author author < > YYYY author . %% @doc Callbacks for the skel application. -module(skel_app). -author('author <>'). -behaviour(application). -export([start/2,stop/1]). , _ ) - > ServerRet %% @doc application start callback for skel. start(_Type, _StartArgs) -> skel_deps:ensure(), skel_sup:star...
null
https://raw.githubusercontent.com/chrisa/acts_as_encrypted/587558a31876dfbbc47d7ab2070782fd3d9395d7/server/deps/mochiweb-src/priv/skel/src/skel_app.erl
erlang
@doc Callbacks for the skel application. @doc application start callback for skel. @doc application stop callback for skel.
@author author < > YYYY author . -module(skel_app). -author('author <>'). -behaviour(application). -export([start/2,stop/1]). , _ ) - > ServerRet start(_Type, _StartArgs) -> skel_deps:ensure(), skel_sup:start_link(). @spec stop(_State ) - > ServerRet stop(_State) -> ok.
047fe2e48bedc34d0a6cea1ccc993502c8a45ba452e00647f3cdf821f9cc191e
clojure/java.jdbc
spec.clj
Copyright ( c ) 2016 - 2019 . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ;; (-1.0.php) which can be ;; found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to b...
null
https://raw.githubusercontent.com/clojure/java.jdbc/acffd9f5f216f8b8c1fc960c1d47b0b5feb56730/src/main/clojure/clojure/java/jdbc/spec.clj
clojure
The use and distribution terms for this software are covered by (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this...
Copyright ( c ) 2016 - 2019 . All rights reserved . the Eclipse Public License 1.0 jdbc / spec.clj (ns ^{:author "Sean Corfield" :doc "Optional specifications for use with Clojure 1.9 or later."} clojure.java.jdbc.spec (:require [clojure.spec.alpha :as s] [clojure.java.jdbc :as sql])) ...
158a42311e7d87f337a985eb7a1e5da1a99dcc7108d523f03f12e45ffdc17b78
c-cube/jsonrpc2
jsonrpc2.ml
* { 1 Simple JSON - RPC2 implementation } See { { : } the spec } See {{: } the spec} *) module type IO = Jsonrpc2_intf.IO module type S = Jsonrpc2_intf.S module Make = Jsonrpc2_core.Make
null
https://raw.githubusercontent.com/c-cube/jsonrpc2/c230d056c8084435b0d681f1be5cc15a0fba834b/src/jsonrpc2.ml
ocaml
* { 1 Simple JSON - RPC2 implementation } See { { : } the spec } See {{: } the spec} *) module type IO = Jsonrpc2_intf.IO module type S = Jsonrpc2_intf.S module Make = Jsonrpc2_core.Make
5e9d4d98021eb372c3897775990ea666a7f7f4772d75d7e0ec82fa23b386abe5
mwand/eopl3
interp.scm
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of) ;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;; ;; value-of-program : Program -> Expval Page : 284 (define va...
null
https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter8/abstract-types-lang/interp.scm
scheme
the interpreter ;;;;;;;;;;;;;;;; value-of-program : Program -> Expval (eopl:pretty-print env) add-module-defns-to-env : Listof(Defn) * Env -> Env We will have let* scoping inside a module body. We put all the values in the environment, not just the ones that are in the interface. But the typechecker will preven...
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of) Page : 284 (define value-of-program (lambda (pgm) (cases program pgm (a-program (module-defs bo...
996694a0038faff9670b46b791903289523cb34a6b4acb5cc23fbcb14da9a563
ixy-languages/ixy.hs
Memory.hs
# LANGUAGE TemplateHaskell # -- | -- Module : Lib.Memory Copyright : 2018 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- -- module Lib.Memory ( allocateMem , mkMemPool , allocateBuf , idToPtr , freeBuf , translate , peekId , pee...
null
https://raw.githubusercontent.com/ixy-languages/ixy.hs/4a24031adf9ba0737cebe1bb4f86bdf11fbf61c3/src/Lib/Memory.hs
haskell
| Module : Lib.Memory License : BSD3 Maintainer : Stability : experimental Portability : unknown $ Huge Pages $ Allocations TODO: We should remove this, but not here. Dir.removeFile fname $ Memory Pools $ Utility This is not arch-specific, hence the magic number.
# LANGUAGE TemplateHaskell # Copyright : 2018 module Lib.Memory ( allocateMem , mkMemPool , allocateBuf , idToPtr , freeBuf , translate , peekId , peekAddr , peekSize , pokeSize , MemPool(..) , PacketBuf(..) , PhysAddr(..) , VirtAddr(..) ) where import Lib.Prelude impo...
354221af60908e043e6842945434fd59cb718ffe952af7faca7f96e014230ce5
onyx-platform/onyx
transform.clj
(ns ^:no-doc onyx.peer.transform (:require [onyx.types :refer [->Result]] [taoensso.timbre :refer [tracef trace]] [onyx.protocol.task-state :refer :all] [clj-tuple :as t])) (defn collect-next-segments [f input throw-fn] (let [segments (try (f input) (catch ...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/peer/transform.clj
clojure
dynamic param currying is pretty slow maybe we can make a separate task-map option to turn this on
(ns ^:no-doc onyx.peer.transform (:require [onyx.types :refer [->Result]] [taoensso.timbre :refer [tracef trace]] [onyx.protocol.task-state :refer :all] [clj-tuple :as t])) (defn collect-next-segments [f input throw-fn] (let [segments (try (f input) (catch ...
9b0b5cf5c2df6f9e88fe77ff6e95de9c580a81058deb038517623fe0351b8951
caisah/sicp-exercises-and-examples
streams-of-pairs.scm
(define (interleave s1 s2) (if (stream-null? s1) s2 (cons-stream (stream-car s1) (interleave s2 (stream-cdr s1))))) (define (pairs s t) (cons-stream (list (stream-car s) (stream-car t)) (interleave (stream-map (lambda (x) (list (stream-car s) x)) (stream-cdr...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.5.3-exploiting_the_stream_paradigm/streams-of-pairs.scm
scheme
(define (interleave s1 s2) (if (stream-null? s1) s2 (cons-stream (stream-car s1) (interleave s2 (stream-cdr s1))))) (define (pairs s t) (cons-stream (list (stream-car s) (stream-car t)) (interleave (stream-map (lambda (x) (list (stream-car s) x)) (stream-cdr...
0b91c5a02bcf7d37f8e8c2b5a776090fdb75de890afb675e2fd875493dc93ae4
esl/MongooseIM
shared_roster_SUITE.erl
%%============================================================================== Copyright 2012 Erlang Solutions 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 %% ...
null
https://raw.githubusercontent.com/esl/MongooseIM/2de7beed551c40223e3a7721e26d4eb76934d7b8/big_tests/tests/shared_roster_SUITE.erl
erlang
============================================================================== you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
Copyright 2012 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(shared_roster_SUITE). -compile([export_all, nowarn_export_all]). -define(USERS, [alice, bob]). -import(distributed_helper, [mim...
b5ce331441b2055e4e99f899eec28504be05bf2691d1ce0d27baad58183c96d7
uw-unsat/leanette-popl22-artifact
imdb250_2.rkt
#lang rosette (require (only-in racket/runtime-path define-runtime-path)) (require "../dom.rkt") (require "../websynth.rkt") (require "../websynthlib.rkt") (define-runtime-path html (build-path ".." "html/imdb250.html")) (define dom (read-DOMNode html)) (define-tags (tags dom)) (define max_zpath_depth (depth dom)) ;...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/websynth/benchmarks/imdb250_2.rkt
racket
Record 0 fields Record 1 fields Cross-record Mask Record 0 zpath asserts Record 1 zpath asserts Record Mask Solve Record 0 zpaths Record 1 zpaths
#lang rosette (require (only-in racket/runtime-path define-runtime-path)) (require "../dom.rkt") (require "../websynth.rkt") (require "../websynthlib.rkt") (define-runtime-path html (build-path ".." "html/imdb250.html")) (define dom (read-DOMNode html)) (define-tags (tags dom)) (define max_zpath_depth (depth dom)) (...
ff8bdcf959cee9f53fd132d06439b7763a3aadd871d85be070c5d4988f3e3d14
chrovis/cljam
writer_test.clj
(ns cljam.io.bcf.writer-test (:require [clojure.test :refer [deftest is are]] [clojure.java.io :as cio] [clojure.string :as cstr] [cljam.io.bcf.writer :as bcf-writer] [cljam.io.util.bgzf :as bgzf] [cljam.test-common :refer [with-before-after ...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/io/bcf/writer_test.clj
clojure
int32 chrom int32 pos-1 0 x 7(char) id = nil 0 filter int32 chrom int32 pos-1 int32 chrom int32 pos-1 0 x 7(char) id = nil Variant Call Format Sample Text int32 chrom int32 pos-1 D,E,F\0\0\0 a,b,c d\0\0\0\0
(ns cljam.io.bcf.writer-test (:require [clojure.test :refer [deftest is are]] [clojure.java.io :as cio] [clojure.string :as cstr] [cljam.io.bcf.writer :as bcf-writer] [cljam.io.util.bgzf :as bgzf] [cljam.test-common :refer [with-before-after ...
3b2d396079b537d20a9b23b1931fa63c1196a431a22f5f406739c6da76e5780d
diku-dk/futhark
SegOp.hs
# LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | Segmented operations. These correspond to perfect @map@ nests on top of /something/ , except that the @map@s are conceptually only over @iota@s ( so there will be explicit indexing inside them ) . module Futhark.IR.SegOp ( SegOp (..), segLevel...
null
https://raw.githubusercontent.com/diku-dk/futhark/1fe93634d63df6005116f55f18e8a35b1a11987a/src/Futhark/IR/SegOp.hs
haskell
| Segmented operations. These correspond to perfect @map@ nests on * Details ** Generic traversal * Simplification * Memory | An operator for 'SegHist'. | In case this operator is semantically a vectorised operator (corresponding to a perfect map nest in the "dimensions". This is used to generate more effici...
# LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # top of /something/ , except that the @map@s are conceptually only over @iota@s ( so there will be explicit indexing inside them ) . module Futhark.IR.SegOp ( SegOp (..), segLevel, segBody, segSpace, typeCheckSegOp, SegSpace (..), ...
94a7e9dd25646ffb35c0eaa0bd4d47f183c89038fdd0afd544f6fce35862a501
well-typed-lightbulbs/ocaml-esp32
switch_opts.ml
(* TEST *) (* Test for optimisation of jump tables to arrays of constants *) let p = Printf.printf type test = Test : 'b * 'a * ('b -> 'a) -> test type t = A | B | C These test functions need to have at least three cases . Functions with fewer cases do n't trigger the optimisation , as they are compi...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/basic/switch_opts.ml
ocaml
TEST Test for optimisation of jump tables to arrays of constants
let p = Printf.printf type test = Test : 'b * 'a * ('b -> 'a) -> test type t = A | B | C These test functions need to have at least three cases . Functions with fewer cases do n't trigger the optimisation , as they are compiled to if - then - else , not switch Functions with fewer cases don't trig...
79b6e3bcaa47710645fbf67f87bf58c5d73c3cc08401309500141bb7b719e12a
well-typed/cborg
CBOR.hs
# OPTIONS_GHC -fno - warn - unused - imports # -- | -- Module : Codec.CBOR Copyright : ( c ) 2015 - 2017 License : BSD3 - style ( see LICENSE.txt ) -- -- Maintainer : -- Stability : experimental Portability : non - portable ( GHC extensions ) -- -- A library for working with CBOR. -- module Co...
null
https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/cborg/src/Codec/CBOR.hs
haskell
| Module : Codec.CBOR Maintainer : Stability : experimental A library for working with CBOR. $intro * Library Structure $structure for , e.g. , safe in - place mutation during decoding primitive decoders et cetera et cetera et cetera for, e.g., safe in-place mutation during decoding prim...
# OPTIONS_GHC -fno - warn - unused - imports # Copyright : ( c ) 2015 - 2017 License : BSD3 - style ( see LICENSE.txt ) Portability : non - portable ( GHC extensions ) module Codec.CBOR ) where used by import Codec.CBOR.Decoding (Decoder) import Codec.CBOR.Encoding (Encoding) import Codec.CBOR.Fla...
0dcff0447cd2963a5cf5a0d1d27a6dcd297c0b39d9893488aa9ec704733d5795
Beluga-lang/Beluga
annotated.ml
module type TYPE = sig type t end module type Base = sig type annotation type 'a t = { value : 'a; annotation : annotation; } val make : 'a -> annotation -> 'a t val map : ('a -> 'b) -> 'a t -> 'b t val amap : (annotation -> annotation) -> 'a t -> 'a t end module Make (T : TYPE) : Base wi...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/23b6dea4d2f2ba81e2a82a3a57a7ca016757a2e7/src/replay/annotated.ml
ocaml
module type TYPE = sig type t end module type Base = sig type annotation type 'a t = { value : 'a; annotation : annotation; } val make : 'a -> annotation -> 'a t val map : ('a -> 'b) -> 'a t -> 'b t val amap : (annotation -> annotation) -> 'a t -> 'a t end module Make (T : TYPE) : Base wi...
aefbb794707f411c3f05e4c4fad9e79bb237ca1d9c2a656da30488fe87a29d78
tonyrog/pacman
pacman_sup.erl
-module(pacman_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). %% =================================================================== %% API functions %% =================================================================== start_link() -> supervisor:star...
null
https://raw.githubusercontent.com/tonyrog/pacman/39f32a55612666ea6f1f82d6b8aa94e263026627/src/pacman_sup.erl
erlang
API Supervisor callbacks =================================================================== API functions =================================================================== =================================================================== Supervisor callbacks ================================================...
-module(pacman_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> C = {pacman, {pacman, start_link, []}, transient, 5000, worker, [pacman]}, {ok, { {one_for_one, 5, 10}, [C]} }.
39dd113956fabf8f016d9baf076e70703f94e24af4d2af71e0bce4d6b44865c8
rd--/hsc3
coyote.help.hs
-- coyote let i = soundIn 0 c = X.coyote kr i 0.2 0.2 0.01 0.5 0.05 0.1 o = pinkNoiseId 'α' ar * decay c 1 * 0.25 in mce2 (i * 0.25) o
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/coyote.help.hs
haskell
coyote
let i = soundIn 0 c = X.coyote kr i 0.2 0.2 0.01 0.5 0.05 0.1 o = pinkNoiseId 'α' ar * decay c 1 * 0.25 in mce2 (i * 0.25) o
d7a40e4254b663a60acd160aec641c98659374e64359eb39e4ad183215c43661
returntocorp/ocaml-tree-sitter-core
CST_grammar_conv.mli
Representation of a CST , as derived from a grammar definition . This representation is meant to be straightforward to translate to OCaml type definitions . A raw grammar definition as expressed in a grammar.json file is readable and writable using the Tree_sitter_t and Tree_sitter_j modules d...
null
https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/ae47b86e4e9d8b85e97affa7904ce43b96439b3d/src/gen/lib/CST_grammar_conv.mli
ocaml
Sort and group the rules based on interdependencies. This is already done as part of 'of_tree_sitter'.
Representation of a CST , as derived from a grammar definition . This representation is meant to be straightforward to translate to OCaml type definitions . A raw grammar definition as expressed in a grammar.json file is readable and writable using the Tree_sitter_t and Tree_sitter_j modules d...
0e65235fd7871510e9341e2f4a6fe69dc6e574858bbc45506f16f850df817b62
ttyerl/sqlite-erlang
sqlite_test.erl
%%%------------------------------------------------------------------- %%% File : sqlite_test.erl Author : < > %%% Description : %%% Created : 10 Jun 2008 by < > %%%------------------------------------------------------------------- -module(sqlite_test). %% API -export([create_table_test/0]). -record(...
null
https://raw.githubusercontent.com/ttyerl/sqlite-erlang/9ab70fc79739624ef0f1b1e869c9bee9b499a44f/src/sqlite_test.erl
erlang
------------------------------------------------------------------- File : sqlite_test.erl Description : ------------------------------------------------------------------- API ==================================================================== API =============================================================...
Author : < > Created : 10 Jun 2008 by < > -module(sqlite_test). -export([create_table_test/0]). -record(user, {name, age, wage}). create_table_test() -> sqlite:open(ct), sqlite:create_table(ct, user, [{name, text}, {age, integer}, {wage, integer}]), [user] = sqlite:list_tables(ct), [{name...