_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 |
|---|---|---|---|---|---|---|---|---|
2a4dfe56233922b068a7fb7fcd5e9fba5e295aa37ec0c88757e357ce97a3ddbf | imrekoszo/polylith-kaocha | config.clj | (ns polylith-kaocha.kaocha-wrapper.config
(:require
[babashka.fs :as fs]
[clojure.java.io :as io]
[kaocha.config]
[kaocha.plugin]
[polylith-kaocha.util.interface :as util]))
(defn load-config-resource [resource-name]
(let [resource-name (or resource-name "polylith-kaocha/kaocha-wrapper/default-tests... | null | https://raw.githubusercontent.com/imrekoszo/polylith-kaocha/f8536b683842ac1d70eb1e1ab918be0369c43ce5/components/kaocha-wrapper/src/polylith_kaocha/kaocha_wrapper/config.clj | clojure | (ns polylith-kaocha.kaocha-wrapper.config
(:require
[babashka.fs :as fs]
[clojure.java.io :as io]
[kaocha.config]
[kaocha.plugin]
[polylith-kaocha.util.interface :as util]))
(defn load-config-resource [resource-name]
(let [resource-name (or resource-name "polylith-kaocha/kaocha-wrapper/default-tests... | |
dce6c162c1b009ff6d09b525c6a10950f0cb81fbec75e49e4ae2d2bb22ebb6ba | KaroshiBee/weevil | mdb_michelson.mli | module Script : sig
type t
val from_string : ?check_micheline_indentation:bool -> string -> t tzresult
val expanded : t -> Mdb_import.Tez.Prot.Michelson_v1_primitives.prim Tezos_micheline.Micheline.canonical
end
module Expr : sig
type t
val from_string : ?check_micheline_indentation:bool -> string -> t tzres... | null | https://raw.githubusercontent.com/KaroshiBee/weevil/ddb8d0fa8618db3ed2a7eaf4f635200e7a1cc8b6/bin/weevil_mdb_012/src/mdb_michelson.mli | ocaml | module Script : sig
type t
val from_string : ?check_micheline_indentation:bool -> string -> t tzresult
val expanded : t -> Mdb_import.Tez.Prot.Michelson_v1_primitives.prim Tezos_micheline.Micheline.canonical
end
module Expr : sig
type t
val from_string : ?check_micheline_indentation:bool -> string -> t tzres... | |
1b233485a6502ec830688c8aea9ffd80c57808a1c6732ca23d127f7e2d0d667d | elizabethsiegle/reddit-slack-bot | Message.hs | # LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module Twilio.Message
( -- * Resource
Message(..)
, Twilio.Message.get
-- * Types
, MessageDirection(..)
, MessageStatus(..)
) where
import Control.Applicative
import Control.Monad
import Control.Monad.Cat... | null | https://raw.githubusercontent.com/elizabethsiegle/reddit-slack-bot/a52ab60dcaae8e16bee8cdba22fce627157a42d8/twilio-haskell-move-to-stack/src/Twilio/Message.hs | haskell | #LANGUAGE OverloadedStrings #
* Resource
* Types
, price :: !Double
<*> (v .: "num_segments" <&> fmap safeRead
<*> (v .: "price" <&> fmap safeRead
| Get a 'Message' by 'MessageSID'.
Types | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
module Twilio.Message
Message(..)
, Twilio.Message.get
, MessageDirection(..)
, MessageStatus(..)
) where
import Control.Applicative
import Control.Monad
import Control.Monad.Catch
import Data.Aeson
import Data.Monoid
import Data.Text (Text)
imp... |
1b3010ee8f3a82a23c5d34178361779e44929eb3caf1972315c9d4d71d05be04 | zadean/xqerl | prod_ConstructionDecl_SUITE.erl | -module('prod_ConstructionDecl_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['constprolog-1'/1]).
-export(['constprolog-2'/1]).
-export(['constprolog-... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_ConstructionDecl_SUITE.erl | erlang | -module('prod_ConstructionDecl_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['constprolog-1'/1]).
-export(['constprolog-2'/1]).
-export(['constprolog-... | |
f37129ad12e287b583ff4623052058c6696e7a2552d658592e3d06f7955732ef | ajnsit/wai-routes | Main.hs | # LANGUAGE TypeFamilies , QuasiQuotes , TemplateHaskell , MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
module Main where
Example using digestive functors with hamlet templates .
We demonstrate composing nested forms with validation ,
nested views defined in hamlet templates ,
and how t... | null | https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/examples/digestive-functors-hamlet/src/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Our master datatype
We alias it to 'MyRoute' for convenience
Generate routes
We handle both GET (which displays the form) and POST (to submit the form)
Handle Displaying the form
On a GET request, we simply run the releaseForm to get a digestive-functor view definition
This is some... | # LANGUAGE TypeFamilies , QuasiQuotes , TemplateHaskell , MultiParamTypeClasses #
module Main where
Example using digestive functors with hamlet templates .
We demonstrate composing nested forms with validation ,
nested views defined in hamlet templates ,
and how to wire it together with .
TO... |
e3b5ef4c5a2eef8c193c2dcbbcf6088f9c34fa3c6df5665110f027f57831ca6e | nervous-systems/eulalie | mapping.cljc | (ns eulalie.util.json.mapping
(:require
[eulalie.core :as eulalie]
#?(:clj
[glossop.misc :refer [fn-some->>]])
[eulalie.util.functor :refer [fmap]]
[clojure.string :as str]
[camel-snake-kebab.core
:refer [->SCREAMING_SNAKE_CASE_KEYWORD
->kebab-case-keyword
->PascalCas... | null | https://raw.githubusercontent.com/nervous-systems/eulalie/ee435987278f5ed628f576700b716d9d0bc17c61/src/eulalie/util/json/mapping.cljc | clojure | This stuff is kind of weird, but I'm afraid to touch it | (ns eulalie.util.json.mapping
(:require
[eulalie.core :as eulalie]
#?(:clj
[glossop.misc :refer [fn-some->>]])
[eulalie.util.functor :refer [fmap]]
[clojure.string :as str]
[camel-snake-kebab.core
:refer [->SCREAMING_SNAKE_CASE_KEYWORD
->kebab-case-keyword
->PascalCas... |
80bf7a52e1b605be0b22a943285fccae0200113fd04f3b4f2eacf7f98fb75455 | facebook/infer | AnalysisDependencyGraph.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/e2b0c8673655896b2c63d15430b7128e052fa7fa/infer/src/backend/AnalysisDependencyGraph.mli | ocaml | * Build the graph from the summaries in the .specs files, and flag any transitive dependencies of
the [changed_files] |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
61eaefefafcff9013608be045ea8f4afd4d4b947ec601c6cc32abe7121fdc206 | liquidz/jubot | slack.clj | (ns jubot.adapter.slack
"Jubot adapter for Slack.
/
"
(:require
[jubot.adapter.util :refer :all]
[jubot.redef :refer :all]
[com.stuartsierra.component :as component]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.defaults :refer :all]
[compojure.core :refer [def... | null | https://raw.githubusercontent.com/liquidz/jubot/0a2d7b18db801c3fe72f7ff216e8381df9b40815/src/jubot/adapter/slack.clj | clojure | (ns jubot.adapter.slack
"Jubot adapter for Slack.
/
"
(:require
[jubot.adapter.util :refer :all]
[jubot.redef :refer :all]
[com.stuartsierra.component :as component]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.defaults :refer :all]
[compojure.core :refer [def... | |
eeaf58989fb4dfd570158ad240499f47dff1b1642729986a3d66f3cb74d09b0b | fpco/ide-backend | PortableProcess.hs | # LANGUAGE CPP #
module IdeSession.Util.PortableProcess where
import System.Process (ProcessHandle)
#ifdef VERSION_unix
import System.Posix.Signals
import System.Posix.Types
import System.Process.Internals (withProcessHandle, ProcessHandle__(..))
#else
import System.Process
import System.Process.Internals hiding (Pro... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend-common/IdeSession/Util/PortableProcess.hs | haskell | Attempts to terminate the process, on Unix using sigTERM
If available sends a sigKill to the given process handle | # LANGUAGE CPP #
module IdeSession.Util.PortableProcess where
import System.Process (ProcessHandle)
#ifdef VERSION_unix
import System.Posix.Signals
import System.Posix.Types
import System.Process.Internals (withProcessHandle, ProcessHandle__(..))
#else
import System.Process
import System.Process.Internals hiding (Pro... |
f6b33d1a276f975abd15bfe65b57c62a800912756a9723b98b3fd03571ae1ffb | heroku/logplex | live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v50" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=50~n", []);
"v51" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=51 old_vsn=50~n", []);
Else ->
io:... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/upgrades/v50_51/live_upgrade.erl | erlang | Stateless | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v50" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=50~n", []);
"v51" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=51 old_vsn=50~n", []);
Else ->
io:... |
1dacf1756d0d1a3fc3ff47d395b8326e744dded9c9df105b44051c457467ca58 | sol/hpack | HaskellSpec.hs | module Hpack.HaskellSpec (spec) where
import Test.Hspec
import Hpack.Haskell
spec :: Spec
spec = do
describe "isModule" $ do
it "accepts module names" $ do
isModule ["Foo", "Bar"] `shouldBe` True
it "rejects the empty list" $ do
isModule [] `shouldBe` False
describe "isQ... | null | https://raw.githubusercontent.com/sol/hpack/f1aa0c48eb696d66be8c1bcf68528253eab09178/test/Hpack/HaskellSpec.hs | haskell | module Hpack.HaskellSpec (spec) where
import Test.Hspec
import Hpack.Haskell
spec :: Spec
spec = do
describe "isModule" $ do
it "accepts module names" $ do
isModule ["Foo", "Bar"] `shouldBe` True
it "rejects the empty list" $ do
isModule [] `shouldBe` False
describe "isQ... | |
c13547b1c280db598adde0b6bfc87f430bc41c9f9625d818423467418e6e0c3a | onedata/op-worker | sequencer.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module provides API for messa... | null | https://raw.githubusercontent.com/onedata/op-worker/239b30c6510ccf0f2f429dc5c48ecf04d192549a/src/modules/communication/sequencer/sequencer.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module provides API for message sequencing.
@end
-------------------------------------------------------------------
API
Test API
=================================... | @author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(sequencer).
-author("Krzysztof Trzepla").
-include("proto/oneclient/client_messages.hrl").
-include("proto/oneclient/server_messages.hrl").
-include("proto/oneclient/stream_messages.hrl").
... |
c6b20f066398bcae0efb13668d5305efcacdddf0b690da8237893de31cdeaa30 | jyh/metaprl | appl_outboard_server.mli |
* Outboard Ensemble server .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / ... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/tactics/ensemble/appl_outboard_server.mli | ocaml |
* Outboard Ensemble server .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / ... | |
df9c7023229788f88acc62eab8337c476b13c1881d258d2a4caaf198ff835ad8 | Sophia-Gold/madhava | minimax.clj | (ns madhava.minimax)
(defn root [f x epsilon]
(let [x-prime (- x (/ (f x) ((derivative f) x)))]
(if (<= (Math/abs (- x x-prime)) epsilon)
x
(recur f x-prime epsilon))))
(defn argmin-1 [f x epsilon]
(root (derivative f) x epsilon))
(define argmax-1 [f x epsilon]
(root (derivative f) x epsilon))
(de... | null | https://raw.githubusercontent.com/Sophia-Gold/madhava/f780c8fe342c79877ccd03ceac525d12d85b10e7/src/madhava/minimax.clj | clojure | (ns madhava.minimax)
(defn root [f x epsilon]
(let [x-prime (- x (/ (f x) ((derivative f) x)))]
(if (<= (Math/abs (- x x-prime)) epsilon)
x
(recur f x-prime epsilon))))
(defn argmin-1 [f x epsilon]
(root (derivative f) x epsilon))
(define argmax-1 [f x epsilon]
(root (derivative f) x epsilon))
(de... | |
d41806bf34422b7492ca5e2aae3a4e86252070695efd518b983073d9a5bcfbff | ndmitchell/catch | Dual3.hs |
module Dual3 where
main = eq True True && eq False False
eq True True = True
eq False False = True
| null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/Dual3.hs | haskell |
module Dual3 where
main = eq True True && eq False False
eq True True = True
eq False False = True
| |
1e582ab519ae56d64cd8cec99fc43461d3add056b849eeda1b098f3a4685d64a | gentoo-haskell/hackport | Cabal2Ebuild.hs | |
Module : Cabal2Ebuild
Copyright : ( C ) 2005 ,
License :
Maintainer :
A program for generating a Gentoo ebuild from a .cabal file
Module : Cabal2Ebuild
Copyright : (C) 2005, Duncan Coutts
License : GPL-2+
Maintainer :
A program for generating a Gentoo ebuild from a .cab... | null | https://raw.githubusercontent.com/gentoo-haskell/hackport/558298950ed1e1f0c0b51f0595212a857fa373e4/src/Cabal2Ebuild.hs | haskell | This library is free software; you can redistribute it and/or
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
any version | |
Module : Cabal2Ebuild
Copyright : ( C ) 2005 ,
License :
Maintainer :
A program for generating a Gentoo ebuild from a .cabal file
Module : Cabal2Ebuild
Copyright : (C) 2005, Duncan Coutts
License : GPL-2+
Maintainer :
A program for generating a Gentoo ebuild from a .cab... |
5d2e6cc74fa4a1df24f75c1eb362bda7fc3a501f5528424fd4904fe0c858d025 | jonascarpay/calligraphy | Lens.hs | # LANGUAGE DeriveFunctor #
{-# LANGUAGE RankNTypes #-}
module Calligraphy.Util.Lens
( Traversal,
Traversal',
over,
forT_,
)
where
import Data.Functor.Identity
type Traversal s t a b = forall m. Applicative m => (a -> m b) -> (s -> m t)
type Traversal' s a = Traversal s s a a
newtype ConstT m a = Co... | null | https://raw.githubusercontent.com/jonascarpay/calligraphy/ad06ead86379a7e38b7b5ad8044ffbb2cb5f7940/src/Calligraphy/Util/Lens.hs | haskell | # LANGUAGE RankNTypes #
# INLINE (<*>) # | # LANGUAGE DeriveFunctor #
module Calligraphy.Util.Lens
( Traversal,
Traversal',
over,
forT_,
)
where
import Data.Functor.Identity
type Traversal s t a b = forall m. Applicative m => (a -> m b) -> (s -> m t)
type Traversal' s a = Traversal s s a a
newtype ConstT m a = ConstT {unConstT :: m ()}
de... |
3da45a66d898844d2f4f82cef4b68f194471efd551534933de080d603608b418 | evilbinary/scheme-lib | wttree.scm | ;;; "wttree.scm" Weight balanced trees -*-Scheme-*-
;;;
$ I d : wttree.scm , v 1.10 1999/01/02 06:19:10 cph Exp $
;;;
Copyright ( c ) 1993 - 1999 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Licens... | null | https://raw.githubusercontent.com/evilbinary/scheme-lib/6df491c1f616929caa4e6569fa44e04df7a356a7/packages/slib/wttree.scm | scheme | "wttree.scm" Weight balanced trees -*-Scheme-*-
This program is free software; you can redistribute it and/or modify
either version 2 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 WARRANTY; without even the implied wa... | $ I d : wttree.scm , v 1.10 1999/01/02 06:19:10 cph Exp $
Copyright ( c ) 1993 - 1999 Massachusetts Institute of Technology
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
Foundation , Inc. , 675 Mass Ave , Cambridge , , ... |
96c728dcb2a79b7d97486c9a94304be1b3a9f470521c2e502a6399c3ab95933a | patricoferris/ocaml-multicore-monorepo | field.ml | open Stdlib
type 'a t =
| Content_type : Content_type.t t
| Content_encoding : Content_encoding.t t
| Content_disposition : Content_disposition.t t
| Field : Unstrctrd.t t
type witness = Witness : 'a t -> witness
type field = Field : Field_name.t * 'a t * 'a -> field
let pp_unstrctrd ppf v = Fmt.string ppf ... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/multipart_form/lib/field.ml | ocaml | XXX(dinosaure): fast allocation.
XXX(dinosaure): normalized value can have trailing whitespace
* such as "value (comment)" returns "value ". Given parser can
* ignore it (and it does not consume all inputs finally). | open Stdlib
type 'a t =
| Content_type : Content_type.t t
| Content_encoding : Content_encoding.t t
| Content_disposition : Content_disposition.t t
| Field : Unstrctrd.t t
type witness = Witness : 'a t -> witness
type field = Field : Field_name.t * 'a t * 'a -> field
let pp_unstrctrd ppf v = Fmt.string ppf ... |
4ec9633a09128309ea1d6e7171d2821003b89a0c00aac5dd5ff25f9485b7bf10 | OlivierSohn/hamazed | Spec.hs | import System.Console.ANSI(clearScreen)
import Control.Monad.Reader(runReaderT)
import Imj.Graphics.Render
import Imj.Graphics.Render.Naive
import Test.Imj.Quantifiable
import Test.Imj.Bresenham2
import Test.Imj.Bresenham3
import Test.Imj... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/test/Spec.hs | haskell | for readablilty
testEase | import System.Console.ANSI(clearScreen)
import Control.Monad.Reader(runReaderT)
import Imj.Graphics.Render
import Imj.Graphics.Render.Naive
import Test.Imj.Quantifiable
import Test.Imj.Bresenham2
import Test.Imj.Bresenham3
import Test.Imj... |
f419781f839ae3c1803a3b3244bb81302cedaf4aa143e9f298f5e9da03161218 | nikita-volkov/rerebase | Unsafe.hs | module System.IO.Unsafe
(
module Rebase.System.IO.Unsafe
)
where
import Rebase.System.IO.Unsafe
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/System/IO/Unsafe.hs | haskell | module System.IO.Unsafe
(
module Rebase.System.IO.Unsafe
)
where
import Rebase.System.IO.Unsafe
| |
71208f0d933401315f22d6a8386a7cd43c4d5840b6460bc8c7b8cc4937e21fd0 | craigl64/clim-ccl | genera-implementation.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
(in-package :clim-internals)
"Copyright (c) 1990, 1991, 1992 Symbolics, Inc. All rights reserved."
;;; Defined below
(eval-when (compile load eval)
(proclaim '(special *sheet-device*))
#+IMach (proclaim '(... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/pre-silica/genera-implementation.lisp | lisp | Syntax : Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*-
Defined below
I don't want to have to figure out how many microns/pixel there are
for each screen type.
In sheet window coordinates, basically
visibility is a boolean
this isn't quite right, because activating it means it's now... |
(in-package :clim-internals)
"Copyright (c) 1990, 1991, 1992 Symbolics, Inc. All rights reserved."
(eval-when (compile load eval)
(proclaim '(special *sheet-device*))
#+IMach (proclaim '(special *small-sheet-device*)))
(defconstant *alu-noop* boole-2)
(defclass sheet-implementation-mixin
()
((window ... |
69363122659b0f250b2c77fa38f728099cba1750b92539ce83fa045e64591fa5 | sztamas/tetris | project.clj | (defproject tetris "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.48"]
[figwheel "0.3.7"]
[org.clojur... | null | https://raw.githubusercontent.com/sztamas/tetris/e0ef2c411469126f48576140a94926c0fded607a/project.clj | clojure | default and assumes "resources"
default
watch and update CSS | (defproject tetris "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.48"]
[figwheel "0.3.7"]
[org.clojur... |
908d712182b72993a415536284a926397ab342e2917b33c3b7a97f877e97298c | byulparan/cl-collider | buffer.lisp | (in-package #:sc)
(defclass buffer ()
((bufnum :initarg :bufnum :initform nil :accessor bufnum)
(frames :initarg :frames :initform nil :accessor frames)
(chanls :initarg :chanls :initform nil :accessor chanls)
(sr :initarg :sr :initform nil :accessor sr)
(path :initarg :path :initform nil :accessor path)... | null | https://raw.githubusercontent.com/byulparan/cl-collider/1aaa384fac51706de99aad956e7e32de883c4674/buffer.lisp | lisp | without it, the value is simply returned.
without it, the list of frames is simply returned.
it defaults to the fastest one available.
it defaults to the fastest one available.
see #Advanced%20notes:%20wavetable%20format | (in-package #:sc)
(defclass buffer ()
((bufnum :initarg :bufnum :initform nil :accessor bufnum)
(frames :initarg :frames :initform nil :accessor frames)
(chanls :initarg :chanls :initform nil :accessor chanls)
(sr :initarg :sr :initform nil :accessor sr)
(path :initarg :path :initform nil :accessor path)... |
fa17c9d626813ec139891a87511501b445f71e4d1de327698d95f135fa98b40a | rubenbarroso/EOPL | 2-2-2.scm | (let ((time-stamp "Time-stamp: <2000-12-11 16:51:40 wand>"))
(eopl:printf "2-2-2.scm ~a~%" (substring time-stamp 13 29)))
(define-datatype expression expression?
(var-exp
(id symbol?))
(lambda-exp
(id symbol?)
(body expression?))
(app-exp
(rator expression?)
(rand expression?)))
(define o... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/2-2-2.scm | scheme | (let ((time-stamp "Time-stamp: <2000-12-11 16:51:40 wand>"))
(eopl:printf "2-2-2.scm ~a~%" (substring time-stamp 13 29)))
(define-datatype expression expression?
(var-exp
(id symbol?))
(lambda-exp
(id symbol?)
(body expression?))
(app-exp
(rator expression?)
(rand expression?)))
(define o... | |
d8fd495f47a0b07fb2a1fb701d7b55c8e5ded8561c893a6fc6e26e46ff439a97 | cedlemo/OCaml-GObject-Introspection | Test_enum_info.ml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/tests/Test_enum_info.ml | ocaml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | |
40af22772ae7f5391dd94b3e018a2bc77732b6f1d0644619d012d961a89a4324 | cljfx/cljfx | tree_item.clj | (ns cljfx.fx.tree-item
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle])
(:import [javafx.scene.control TreeItem]))
(set! *warn-on-reflection* true)
(def props
(composite/props TreeItem
:children [:list lifecycle/dynamics]
:expanded [:setter ... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/tree_item.clj | clojure | (ns cljfx.fx.tree-item
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle])
(:import [javafx.scene.control TreeItem]))
(set! *warn-on-reflection* true)
(def props
(composite/props TreeItem
:children [:list lifecycle/dynamics]
:expanded [:setter ... | |
5a5d5466846f174b4daf4c0cbf3bb2040cb59aaccd8ea7b77581936bcc0560f7 | stchang/macrotypes | stlc+union+case.rkt | #lang turnstile/base
(extends "stlc+union.rkt" #:except #%app add1 sub1)
(require (for-syntax racket/format racket/string))
;; Simply-Typed Lambda Calculus, plus union types and case-> function types
;; Types:
- types from and stlc+union.rkt
;; - case->
;; Type relations:
;; - sub?
;; Terms:
- terms from stlc+unio... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/stlc%2Bunion%2Bcase.rkt | racket | Simply-Typed Lambda Calculus, plus union types and case-> function types
Types:
- case->
Type relations:
- sub?
Terms:
Other: updated current-sub?
use (failing) typechecks? to get err msg
need this because recursive calls made with unexpanded types
(define τ1 ((current-type-eval) t1))
(define τ2 ((current-ty... | #lang turnstile/base
(extends "stlc+union.rkt" #:except #%app add1 sub1)
(require (for-syntax racket/format racket/string))
- types from and stlc+union.rkt
- terms from stlc+union.rkt
(provide (type-out case->) case→
(typed-out/unsafe [add1 : (case→ (→ Nat Nat)
(→ Int I... |
d079684163ce8bda6c63d31d3e0730bf022cde4e7acd19c7194fc3f50d77486a | kumarshantanu/dime | db.clj | Copyright ( c ) . 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 LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/dime/5c3b8330ddab69ebefaa56dd9bfa2ff97b55c8a8/test/foo/db.clj | clojure | 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 LICENSE 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 ... | Copyright ( c ) . All rights reserved .
(ns foo.db
(:require
[dime.core :as di]
[dime.util :as du]
[dime.var :as dv]))
(def init-count (atom 0))
(defn ^{:expose :connection-pool
:post-inject du/post-inject-invoke}
make-conn-pool
[^:inject db-host ^:inject db-port ^:inject user... |
b7c605fb37702681911e29c6b53deed7c75b1f5d508aefbe8e7780c56ab7695c | McCLIM/McCLIM | define-application-frame.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) copyright 1998,1999,2000 by ( )
( c ) copyright 2000 by Iban Hatchondo ( )
(... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/b6b77f5560904d76d8422f3b0cc6866182687529/Core/clim-core/frames/define-application-frame.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
The DEFINE-APPLICATION-FRAM... | ( c ) copyright 1998,1999,2000 by ( )
( c ) copyright 2000 by Iban Hatchondo ( )
( c ) copyright 2000 by ( )
( c ) copyright 2000,2014 by ( )
( c ) copyright 2004 by < >
( c ) copyright 2019,2020 Jan Moringen < >
( c ) copyright 2016 - 2021 < >
(in-package #:clim-internals)
(defu... |
88c4013e1b56b57a57abfd59d80df6f874aae2bc362c30ba7975778768218e4a | tylerholien/milena | Producer.hs | module Network.Kafka.Producer where
import Data.Bits ((.&.))
import Data.ByteString.Char8 (ByteString)
import qualified Data.Digest.Murmur32 as Murmur32
import Control.Applicative
import Control.Lens
import Control.Monad.Trans (liftIO)
import Data.Monoid ((<>))
import Data.Set (Set)
import qualified Data.Set as Set
im... | null | https://raw.githubusercontent.com/tylerholien/milena/5b46dccfb35017a0c6705db525b4b09f8b48139d/Network/Kafka/Producer.hs | haskell | * Producing
| Execute a produce request and get the raw produce response.
| Construct a produce request with explicit arguments.
| Send messages to partition calculated by 'partitionAndCollate'.
| Send compressed messages to partition calculated by 'partitionAndCollate'.
| Create a protocol message set from a lis... | module Network.Kafka.Producer where
import Data.Bits ((.&.))
import Data.ByteString.Char8 (ByteString)
import qualified Data.Digest.Murmur32 as Murmur32
import Control.Applicative
import Control.Lens
import Control.Monad.Trans (liftIO)
import Data.Monoid ((<>))
import Data.Set (Set)
import qualified Data.Set as Set
im... |
ceedd196ef9df14ff660b90444fa8905d3f32dcfeb7a1c72a9c58912bd2db25d | kkirstein/ocaml-imgproc | test_io.ml | vim : set ft = ts=2 :
open Imgproc
Testable types
let error_cmp a b =
match (a, b) with
| `Invalid_dimension x, `Invalid_dimension y when x = y -> true
| `IO_error s1, `IO_error s2 when s1 = s2 -> true
| _ -> false
let error_type = Alcotest.testable (Fmt.of_to_string Io.error_msg) error_cmp
(* Tests *... | null | https://raw.githubusercontent.com/kkirstein/ocaml-imgproc/9bea2475b2a534c28d436174f789046a8b12ed14/test/test_io.ml | ocaml | Tests
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Test se... | vim : set ft = ts=2 :
open Imgproc
Testable types
let error_cmp a b =
match (a, b) with
| `Invalid_dimension x, `Invalid_dimension y when x = y -> true
| `IO_error s1, `IO_error s2 when s1 = s2 -> true
| _ -> false
let error_type = Alcotest.testable (Fmt.of_to_string Io.error_msg) error_cmp
let test_i... |
c77f7679329904d257cb47f11cceb87239a2063af06b356afd3e53b4920bb9c8 | heroku/snit | snit_http_hello.erl | -module(snit_http_hello).
-behaviour(ranch_protocol).
-export([start_link/4]).
-export([init/4]).
start_link(Ref, Socket, Transport, Opts) ->
Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
{ok, Pid}.
init(Ref, Socket, Transport, _Opts = []) ->
ok = ranch:accept_ack(Ref),
loop(Socket... | null | https://raw.githubusercontent.com/heroku/snit/024214a9f56bc3896a7a043e94ec3abeb0426159/demo/snit_http_hello.erl | erlang | -module(snit_http_hello).
-behaviour(ranch_protocol).
-export([start_link/4]).
-export([init/4]).
start_link(Ref, Socket, Transport, Opts) ->
Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
{ok, Pid}.
init(Ref, Socket, Transport, _Opts = []) ->
ok = ranch:accept_ack(Ref),
loop(Socket... | |
29922902993190225479e4c947915d9992361d3ac17c020e0c93dc9d3f0748a6 | NorfairKing/smos | Gen.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Report.Filter.Gen where
import Control.DeepSeq
import Cursor.Simple.Forest
import Data.Gen... | null | https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-report-gen/src/Smos/Report/Filter/Gen.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Report.Filter.Gen where
import Control.DeepSeq
import Cursor.Simple.Forest
import Data.GenValidity
import Data.GenValidity.Path ()
import Data.Map (Map)
import Data.Set (Set)... |
4c3678f1dce873b0ad3df55cc98fc4f0323e7b0244cb55e40c418474f462f709 | dhess/sicp-solutions | ex1.36.scm | (define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess guess-num)
(let ((next (f guess)))
(display "guess ")
(display guess-num)
(display ": ")
(display next)
(newline)
(if (close-enough? guess next)
n... | null | https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap1/ex1.36.scm | scheme | The solution to the fixed point of x |-> log(1000)/log(x):
With average damping: | (define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess guess-num)
(let ((next (f guess)))
(display "guess ")
(display guess-num)
(display ": ")
(display next)
(newline)
(if (close-enough? guess next)
n... |
4302b254be7a00861b82ca61d667463e73050db4be64cb12ffd416078d63434b | ocaml-sf/learn-ocaml-corpus | even.ml | let rec odd (xs : 'a list) : 'a list =
match xs with
| [] ->
[]
| _ :: xs ->
even xs
and even (xs : 'a list) : 'a list =
match xs with
| [] ->
[]
| x :: xs ->
x :: even xs (* wrong *)
| null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/merge_sort/wrong/even.ml | ocaml | wrong | let rec odd (xs : 'a list) : 'a list =
match xs with
| [] ->
[]
| _ :: xs ->
even xs
and even (xs : 'a list) : 'a list =
match xs with
| [] ->
[]
| x :: xs ->
|
d1c434c34208aeb21d2945646fef070e13efe5792bb133a2b5094e4a5d19abaf | offby1/anagrams | dict.scm | (define (read-line port)
(iterate loop ((input* c port read-char))
((chars '()))
(if (char=? c #\newline)
(list->string (reverse chars))
(loop (cons c chars)))
(if (null? chars)
(eof-object) ; from the PRIMITIVES structure
(list->string (reverse... | null | https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/scheme48/dict.scm | scheme | from the PRIMITIVES structure
it's gotta have a vowel.
it's gotta be all ASCII, all the time.
The dictionary is a list of entries; each entry is (cons key words)
| (define (read-line port)
(iterate loop ((input* c port read-char))
((chars '()))
(if (char=? c #\newline)
(list->string (reverse chars))
(loop (cons c chars)))
(if (null? chars)
(list->string (reverse chars)))))
(define word-acceptable?
(let ((has-vowel-regexp (set ... |
506d44d1f7a6c5c947a24d373b345be31a473e82f0c9ee24acf11faf2bd75503 | active-group/reacl | util.cljs | (ns ^{:author "Marcus Crestani"
:doc "Various utilities for Reacl."}
reacl2.util
(:require [reacl2.core :as core :include-macros true]
[reacl2.dom :as dom :include-macros true]))
(core/defclass
^{:deprecated "2.2"
:doc
"A reacl class that delays `clazz`'s state change for `delay`
... | null | https://raw.githubusercontent.com/active-group/reacl/946e85a946d9659706b8875f9d1d2a7e0da55592/src/reacl2/util.cljs | clojure | (ns ^{:author "Marcus Crestani"
:doc "Various utilities for Reacl."}
reacl2.util
(:require [reacl2.core :as core :include-macros true]
[reacl2.dom :as dom :include-macros true]))
(core/defclass
^{:deprecated "2.2"
:doc
"A reacl class that delays `clazz`'s state change for `delay`
... | |
aa89cdfb59ebf0f2f84e083b3043694bbf5c3425833f4c0b716c2792f08faf65 | deadcode/Learning-CL--David-Touretzky | 6.35.lisp | (setf nerd-states '((sleeping . eating)
(eating . waiting-for-a-computer)
(waiting-for-a-computer . programming)
(programming . debugging)
(debugging . sleeping)))
(defun nerdus (current-state)
(cdr (assoc current-state nerd-state... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%206/6.35.lisp | lisp | (setf nerd-states '((sleeping . eating)
(eating . waiting-for-a-computer)
(waiting-for-a-computer . programming)
(programming . debugging)
(debugging . sleeping)))
(defun nerdus (current-state)
(cdr (assoc current-state nerd-state... | |
4253e32257d270b21b57d2fcb89734e16ac6c1c049c7fde20e3d0c7aa45932bd | herd/herdtools7 | base.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/650450b67eff7f9f3f24b94f42d321a640e64033/internal/lib/base.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
bf3c27dba43bffd9e724c919d266af0a1f1d9d9c68d8e55ee625819de2c73bb5 | avsm/eeww | main.ml | open Eio
let setup_log () =
Fmt_tty.setup_std_outputs ();
Logs.set_level (Some Debug);
Logs.set_reporter (Logs_fmt.reporter ())
let () = setup_log ()
type exn += Graceful_shutdown
let file_io env =
let test = Path.(env#fs / "test.txt") in
let _write =
Eio.Path.(with_open_out ~create:(`If_missing 0o644... | null | https://raw.githubusercontent.com/avsm/eeww/ab64c5391b67fb3f5b1d3de5e0a5a5cb4c80207b/lib/eio/lib_eio_gcd/test/main.ml | ocaml | file_io env
network env
forking env
random env
timer env
big_flow_copy env
cancellation env | open Eio
let setup_log () =
Fmt_tty.setup_std_outputs ();
Logs.set_level (Some Debug);
Logs.set_reporter (Logs_fmt.reporter ())
let () = setup_log ()
type exn += Graceful_shutdown
let file_io env =
let test = Path.(env#fs / "test.txt") in
let _write =
Eio.Path.(with_open_out ~create:(`If_missing 0o644... |
a473d1b38653d14fbdb8705501f138972772f0945bc13435fbd9c059afe36b06 | typelead/eta | tc222.hs | {-# LANGUAGE ImplicitParams, RankNTypes #-}
-- Tests impredivative polymorphism with left-to-right
-- flow information; see the uses of "$"
module TestIP where
import Control.Monad.ST
import Data.STRef
-- Here's a use of runST with ($)
foo = runST $ (do { v <- newSTRef 0; readSTRef v })
-- Here's a use of implicit... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc222.hs | haskell | # LANGUAGE ImplicitParams, RankNTypes #
Tests impredivative polymorphism with left-to-right
flow information; see the uses of "$"
Here's a use of runST with ($)
Here's a use of implicit parameters with ($)
(c ?env)
The subsumption test needed from the call to $ is this:
?env => (?env => C -> ... |
module TestIP where
import Control.Monad.ST
import Data.STRef
foo = runST $ (do { v <- newSTRef 0; readSTRef v })
type PPDoc = (?env :: Int) => Char -> Char
f :: PPDoc -> PPDoc
f c = g $ c
Fully annotated version of f , as compiled by GHC 6.4.2
f ? env c = $ ( ) ( )
( \(x : ) . g ? env ( \... |
80effdc2a11ee99491b85ac794156438b972d85baa678e0b5f0fd19e1170f8df | NorfairKing/smos | Issue.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Smos.GitHub.Issue where
import Control.Monad
import qualified Data.Text as T
import Data.Validity
import Data.Validity.Text ()
import GHC.Generics (Generic)
import GitHub (IssueNumber (..), Owner, Repo)
import G... | null | https://raw.githubusercontent.com/NorfairKing/smos/3b7021c22915ae16ae721c7da60d715e24f4e6bb/smos-github/src/Smos/GitHub/Issue.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.GitHub.Issue where
import Control.Monad
import qualified Data.Text as T
import Data.Validity
import Data.Validity.Text ()
import GHC.Generics (Generic)
import GitHub (IssueNumber (..), Owner, Repo)
import GitHub.Data.Name
import Network.URI
... |
3ff0c8f690fa2d987dc2b5e9158d7eac5dfbc8c07dd88b6b38e7fb45fa4005d5 | titola/incudine | edf.lisp | (in-package :incudine-tests)
(deftest edf.1
(progn
(flush-pending)
(incudine.edf::heap-empty-p))
T)
(deftest edf.2
(let ((incudine::*sample-counter* incudine::*nrt-sample-counter*)
(acc nil)
(last 0.0)
(count 0))
(loop for i below 32
for time in '(... | null | https://raw.githubusercontent.com/titola/incudine/6b312442e862274796342d8a74e547f9b8450b74/tests/edf.lisp | lisp | Correct order of the events with the same time. | (in-package :incudine-tests)
(deftest edf.1
(progn
(flush-pending)
(incudine.edf::heap-empty-p))
T)
(deftest edf.2
(let ((incudine::*sample-counter* incudine::*nrt-sample-counter*)
(acc nil)
(last 0.0)
(count 0))
(loop for i below 32
for time in '(... |
f07743f0bdb867f22118f62f419b1afadefea2f7c2c101166e68c6fcfd14dcc8 | mzp/coq-ide-for-ios | ppextend.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/interp/ppextend.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
s Pretty-print.
Dealing with p... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : ppextend.ml 13329 2... |
bc4392b979b9caeea5553e48e7fdcebc94ae0544f459deec17e4ac1b7eebcf1b | composewell/streamly | Array.hs | -- |
Module : Streamly . Internal . Unicode . Array
Copyright : ( c ) 2018 Composewell Technologies
--
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
Portability : GHC
XXX Remove this or move this to Unicode . Utf32 making " Array Char " as a
newtype wrapper for Utf32 ... | null | https://raw.githubusercontent.com/composewell/streamly/45e21892bcd25103b589801f114c5153250baab3/core/src/Streamly/Internal/Unicode/Array.hs | haskell | |
License : BSD-3-Clause
Maintainer :
Stability : experimental
better append performance.
* Streams of Strings
$setup
>>> :m
>>> :set -XOverloadedStrings
| Break a string up into a stream of strings at newline characters.
The resulting strings do not contain newlines.
> lines = S.lines A.write
... | Module : Streamly . Internal . Unicode . Array
Copyright : ( c ) 2018 Composewell Technologies
Portability : GHC
XXX Remove this or move this to Unicode . Utf32 making " Array Char " as a
newtype wrapper for Utf32 . Is this any better than the [ ] ( String ) type ?
This provides random access and... |
e1b5fe180323b4ed25d03726b8f2023bdce27270e161899b0bb4906ed91cc61c | Quid2/zm | Env.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
Parse ZM data type definitions
module ZM.Parser.Env
( parseADTs
, parseADTsWith
) where
import ZM.Parser.ADT ( adts )
import Data.Either
imp... | null | https://raw.githubusercontent.com/Quid2/zm/b1ae01cdf881a29987aa5e62035c5278a78b80d3/src/ZM/Parser/Env.hs | haskell | import Data.Maybe
import Data.Either.Validation
tst = putStr . prettyShow . parseADTs
ok = putStr . prettyShow . (\(Right a) -> a) . parseADTs
import ZM.Util
` :
`:
makeEnv >=> toAbsEnvWith absEnv
makeEnv ::
[ADTParts]
... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
Parse ZM data type definitions
module ZM.Parser.Env
( parseADTs
, parseADTsWith
) where
import ZM.Parser.ADT ( adts )
import Data.Either
imp... |
d4eff8969a3e5ebc2e4f823560c9d5489ba116abc67519e4c43bc1dbea26338f | compiling-to-categories/concat | A.hs | # LANGUAGE TupleSections #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE InstanceSigs #
# LANGUAGE ViewPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DefaultSignatures #
# LANGUAGE TypeApplicati... | null | https://raw.githubusercontent.com/compiling-to-categories/concat/4bc24919d4181b7a09c4d542b828139722d087e8/classes/src/ConCat/Experimental/A.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE ConstraintKinds #
# LANGUAGE TypeInType #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE ExplicitForAll #
TODO: trim pragmas
| Experiment with polykinded category theory functors
import qualified Control.Arrow as A
-------------------... | # LANGUAGE TupleSections #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE InstanceSigs #
# LANGUAGE ViewPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DefaultSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleIns... |
c3fb18373b4add6d55de89cb354815438007b5dd9951dd239f8ede2cbcc917ba | chef/mini_s3 | mini_s3_tests.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
Copyright 2013 Opscode , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License .... | null | https://raw.githubusercontent.com/chef/mini_s3/e3d368bf2c9e0aff4743574cbc7d8c8472741957/test/mini_s3_tests.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
hostname
i... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
Copyright 2013 Opscode , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
... |
0a562f9dcf5319c37dc790ae6eb550be105fed1869217a68b20e832ad73c1b48 | mlang/chessIO | book2pgn.hs | import Game.Chess
import Game.Chess.PGN
import Game.Chess.Polyglot
import System.IO
main :: IO ()
main = hPutPGN stdout depthFirst $ toPGN defaultBook startpos
| null | https://raw.githubusercontent.com/mlang/chessIO/3cefdcce46fa9cd485376ca60d987f42860f80db/examples/book2pgn.hs | haskell | import Game.Chess
import Game.Chess.PGN
import Game.Chess.Polyglot
import System.IO
main :: IO ()
main = hPutPGN stdout depthFirst $ toPGN defaultBook startpos
| |
3540ac381e159cfba29d32aaa4933648cfa58fd5201d33497bdf5412c55f7332 | GillianPlatform/Gillian | cRunner.ml | open Gillian
module Outcome =
Bulk.Outcome.Make_Concrete (CMemory) (CParserAndCompiler)
(General.External.Dummy (Gil_syntax.Annot.Basic))
module Suite = struct
include Bulk.Suite.ByFolder (struct
let max_depth = 1
let cmd_name = "bulk-exec"
let exec_mode = Gillian.Utils.Exec_mode.Concrete
end)
... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/eaa028aaed7414c216b04ee25e0332dbc3d3cf8b/Gillian-C/lib/cRunner.ml | ocaml | open Gillian
module Outcome =
Bulk.Outcome.Make_Concrete (CMemory) (CParserAndCompiler)
(General.External.Dummy (Gil_syntax.Annot.Basic))
module Suite = struct
include Bulk.Suite.ByFolder (struct
let max_depth = 1
let cmd_name = "bulk-exec"
let exec_mode = Gillian.Utils.Exec_mode.Concrete
end)
... | |
510e9d5ac7cdffd0a91324c2e077f288bf0924fa115105e601e95e1bf46566a1 | bmeg/ophion | store.clj | (ns ophion.store
(:require
[clojure.set :as set]
[ophion.mongo :as db]
[ophion.query :as query]))
(defn store-query
[graph db {:keys [user key focus path query current]}]
(let [pure (query/delabelize query)
insert {:user user
:key key
:focus focus
... | null | https://raw.githubusercontent.com/bmeg/ophion/d22333e8d2b33c6b9e6284ec8ef9fc2a6ce60c8f/src/ophion/store.clj | clojure | [db key]
(db/aggregate
db :ophionresults
[{:$match {:key key}}
{:$replaceRoot {:newRoot "$result"}}])) | (ns ophion.store
(:require
[clojure.set :as set]
[ophion.mongo :as db]
[ophion.query :as query]))
(defn store-query
[graph db {:keys [user key focus path query current]}]
(let [pure (query/delabelize query)
insert {:user user
:key key
:focus focus
... |
fa15854aeee318a7c53f0741bbe081b5b38f99092ad5e592f8d2dbb8c13f2db1 | Netflix/PigPen | code_test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/test/clojure/pigpen/code_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.code-test
(:require [clojure.test :refer :all]
[pigpen.extensions.test :refer [test-diff pigsym-zero pigsym-inc]]
[pigpen.code :as pig]))
(deftest test-assert-arity
... |
25ea4be1da70a63aa20c15b8cd2a907a65e5b6960f69507daf1b229642cbc025 | ghcjs/ghcjs | GHCConstantsHaskellExports.hs | cONTROL_GROUP_CONST_291,
sTD_HDR_SIZE,
pROF_HDR_SIZE,
bLOCK_SIZE,
bLOCKS_PER_MBLOCK,
tICKY_BIN_COUNT,
oFFSET_StgRegTable_rR1,
oFFSET_StgRegTable_rR2,
oFFSET_StgRegTable_rR3,
oFFSET_StgRegTable_rR4,
oFFSET_StgRegTable_rR5,
oFFSET_StgRegTable_rR6,
oFFSET_StgRegTable_rR7... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/utils/pkg-cache/ghc/includes/dist-derivedconstants/header/GHCConstantsHaskellExports.hs | haskell | cONTROL_GROUP_CONST_291,
sTD_HDR_SIZE,
pROF_HDR_SIZE,
bLOCK_SIZE,
bLOCKS_PER_MBLOCK,
tICKY_BIN_COUNT,
oFFSET_StgRegTable_rR1,
oFFSET_StgRegTable_rR2,
oFFSET_StgRegTable_rR3,
oFFSET_StgRegTable_rR4,
oFFSET_StgRegTable_rR5,
oFFSET_StgRegTable_rR6,
oFFSET_StgRegTable_rR7... | |
ddc174d2f9be6a7c6edadce01785d487f1a12b19768c0e426dacd3fe9953be62 | nboldi/c-parser-in-haskell | SymbolTable.hs | # LANGUAGE DeriveDataTypeable , TemplateHaskell , TupleSections #
-- | This module controls how symbols are represented in the symbol table. This module
holds the definitions relating to symbol tables that are pure ( non - monadic ) . Monadic
-- operations are defined in 'MiniC.Parser.Base'.
module MiniC.Symbol... | null | https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/MiniC/SymbolTable.hs | haskell | | This module controls how symbols are represented in the symbol table. This module
operations are defined in 'MiniC.Parser.Base'.
| # LANGUAGE DeriveDataTypeable , TemplateHaskell , TupleSections #
holds the definitions relating to symbol tables that are pure ( non - monadic ) . Monadic
module MiniC.SymbolTable where
import MiniC.AST
import MiniC.Helpers
import MiniC.Semantics
import qualified Data.Map as M
import Data.Data
import Con... |
93fc8322c834c9b51c98dc5f83d623160c97e2b079d9b25ec53beb31e6f2084c | nackjicholson/haskellbook-solutions | jammin.hs | module Jammin where
import Data.List
data Fruit
= Peach
| Plum
| Apple
| Blackberry
deriving (Eq, Ord, Show)
-- Cardinality 65536 + 4
data JamJars = Jam
{ fruit :: Fruit
, quantity :: Int
} deriving (Eq, Ord, Show)
row1, row2, row3, row4, row5, row6 :: [JamJars]
row1 = [Jam Blackberry 7, Jam Apple 3... | null | https://raw.githubusercontent.com/nackjicholson/haskellbook-solutions/c21bd87773734ba2ae1559553a6a4d10891c61c8/chapter11/jammin.hs | haskell | Cardinality 65536 + 4 | module Jammin where
import Data.List
data Fruit
= Peach
| Plum
| Apple
| Blackberry
deriving (Eq, Ord, Show)
data JamJars = Jam
{ fruit :: Fruit
, quantity :: Int
} deriving (Eq, Ord, Show)
row1, row2, row3, row4, row5, row6 :: [JamJars]
row1 = [Jam Blackberry 7, Jam Apple 3]
row2 = [Jam Apple 4, Ja... |
325b3bd1c9dab8678428e5ddcdc3ce2f45351698239d129c00d41e3eba2559dd | basho-labs/riak_explorer | re_file_util.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho-labs/riak_explorer/3d06ca2b14a57ed2850e56efc280d7e5b5f4bbbc/src/re_file_util.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module... |
711ca0853bd2bd4963e87aca5d4aad4f63b510ce6636e3c137a64789c10f7efa | crategus/cl-cffi-gtk | glib.utils.lisp | ;;; ----------------------------------------------------------------------------
glib.utils.lisp
;;;
The documentation of this file is taken from the GLib 2.66 Reference
Manual and modified to document the Lisp binding to the GLib library .
;;; See <>. The API documentation of the Lisp binding is
available from... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/glib/glib.utils.lisp | lisp | ----------------------------------------------------------------------------
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License for Lisp
License, or (at your option) any later versi... | glib.utils.lisp
The documentation of this file is taken from the GLib 2.66 Reference
Manual and modified to document the Lisp binding to the GLib library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2009 - 2011
Copyright ( C ) 2011 - 2021
as published by the Free Software Foundation , either vers... |
fe9fbf7375857f72ecb092577405882552d0abe0ca327406b2f3fdfbae6e23b7 | haskell/old-time | time004.hs | import System.Time
main :: IO ()
main = do
time <- getClockTime
let (CalendarTime year month mday hour min sec psec
wday yday timezone gmtoff isdst) = toUTCTime time
time' = toClockTime (CalendarTime (year - 1) month mday hour min sec psec
wday yday t... | null | https://raw.githubusercontent.com/haskell/old-time/5d580dd9f2cc748c1dceb160e79bb8dc29d1bfdb/tests/time004.hs | haskell | import System.Time
main :: IO ()
main = do
time <- getClockTime
let (CalendarTime year month mday hour min sec psec
wday yday timezone gmtoff isdst) = toUTCTime time
time' = toClockTime (CalendarTime (year - 1) month mday hour min sec psec
wday yday t... | |
a81922bf5b0c66552ab994e28779e8d077a3adb8282b1a0c5b9d020c15326fc2 | arenadotio/blue-http | test_tls.ml | open Core
open Async
let bad_tls_domains =
[ "expired.badssl.com"
; "wrong.host.badssl.com"
; "self-signed.badssl.com"
; "untrusted-root.badssl.com"
]
;;
let () =
Thread_safe.block_on_async_exn
@@ fun () ->
Alcotest_async.
[ ( "invalid certificates"
, bad_tls_domains
|> List.map ~f:(... | null | https://raw.githubusercontent.com/arenadotio/blue-http/f0f4ace55a5a25e92c479c45948f5f2905570ed5/test/test_tls.ml | ocaml | open Core
open Async
let bad_tls_domains =
[ "expired.badssl.com"
; "wrong.host.badssl.com"
; "self-signed.badssl.com"
; "untrusted-root.badssl.com"
]
;;
let () =
Thread_safe.block_on_async_exn
@@ fun () ->
Alcotest_async.
[ ( "invalid certificates"
, bad_tls_domains
|> List.map ~f:(... | |
38eb4cb149fbb7c18c128a4493b44bb32f6032e211f8ced37113f0823c832d11 | dextroamphetamine/nuko | Type.hs | module Nuko.Typer.Infer.Type (
inferClosedTy,
inferOpenTy,
freeVars
) where
import Relude
import Nuko.Names (Label (Label), Name, TyName, genIdent, mkTyName)
import Nuko.Report.Range (Range (..), getPos)
import Nuko.Tree (Re)
import Nuko.Tree.Expr (Ty (..))
import Nuko.Typer.Env ... | null | https://raw.githubusercontent.com/dextroamphetamine/nuko/1b6f960eeeebbfcbfb5700279c39758f82e7df28/src/Nuko/Typer/Infer/Type.hs | haskell | TODO: Probably i can just remove poly and use a readerT instead?
TODO: Disallow Guarded polimorphic types | module Nuko.Typer.Infer.Type (
inferClosedTy,
inferOpenTy,
freeVars
) where
import Relude
import Nuko.Names (Label (Label), Name, TyName, genIdent, mkTyName)
import Nuko.Report.Range (Range (..), getPos)
import Nuko.Tree (Re)
import Nuko.Tree.Expr (Ty (..))
import Nuko.Typer.Env ... |
fcd3c75d16d0d1fbe1a6a7029df7cef3c7d3da6c3e502abd2d5cc75e6d641f3b | jyh/metaprl | itt_unit.ml | doc <:doc<
@module[Itt_unit]
The @tt{Itt_unit} module defines a term containing exactly
one element, <<it>>. The element is the same term that inhabits
the equality (Section @refmodule[Itt_equal]) and subtype
(Section @refmodule[Itt_subtype]) judgments.
@docoff
----------------------------------... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_unit.ml | ocaml | ***********************************************************************
* TERMS *
***********************************************************************
* Standard term.
***********************************************************************
* DISPL... | doc <:doc<
@module[Itt_unit]
The @tt{Itt_unit} module defines a term containing exactly
one element, <<it>>. The element is the same term that inhabits
the equality (Section @refmodule[Itt_equal]) and subtype
(Section @refmodule[Itt_subtype]) judgments.
@docoff
----------------------------------... |
486603e926448232b63485c4804020cd0bb49e1711ce04bc72ae87850fed7a55 | rbkmoney/hellgate | hg_msgpack_marshalling.erl | -module(hg_msgpack_marshalling).
-include_lib("damsel/include/dmsl_msgpack_thrift.hrl").
-include_lib("mg_proto/include/mg_proto_msgpack_thrift.hrl").
%% API
-export([marshal/1]).
-export([unmarshal/1]).
-export([marshal/2]).
-export([unmarshal/2]).
-export_type([value/0]).
-export_type([msgpack_value/0]).
-type v... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/c3e7413db06296a72fb64268eca98e63379d2ef5/apps/hellgate/src/hg_msgpack_marshalling.erl | erlang | API
| -module(hg_msgpack_marshalling).
-include_lib("damsel/include/dmsl_msgpack_thrift.hrl").
-include_lib("mg_proto/include/mg_proto_msgpack_thrift.hrl").
-export([marshal/1]).
-export([unmarshal/1]).
-export([marshal/2]).
-export([unmarshal/2]).
-export_type([value/0]).
-export_type([msgpack_value/0]).
-type value() ... |
46b6c51dae7c280a1ce340908f8c75e3f7dd3fa419ca66ff5b276180783a16dd | nasa/Common-Metadata-Repository | 081_rename_variable_associations.clj | (ns cmr.metadata-db.migrations.081-rename-variable-associations
(:require
[config.mdb-migrate-helper :as h]))
(defn up
"Migrates the database up to version 81."
[]
(println "cmr.metadata-db.migrations.081-rename-variable-associations up...")
(h/sql "ALTER TABLE CMR_VARIABLE_ASSOCIATIONS RENAME COLUMN VARI... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/ca49654cd7d9e62c176a9c07f99a7bb172943ca2/metadata-db-app/src/cmr/metadata_db/migrations/081_rename_variable_associations.clj | clojure | (ns cmr.metadata-db.migrations.081-rename-variable-associations
(:require
[config.mdb-migrate-helper :as h]))
(defn up
"Migrates the database up to version 81."
[]
(println "cmr.metadata-db.migrations.081-rename-variable-associations up...")
(h/sql "ALTER TABLE CMR_VARIABLE_ASSOCIATIONS RENAME COLUMN VARI... | |
06d8b8f4801e9fb67946870ec0e54a7192ddb8030a6e8ddd4e0e1cfb95855fde | TyOverby/mono | test_proc_bonsai.ml | open! Core
open! Import
module Bonsai_lib = Bonsai
open Bonsai_lib
open Proc
open Bonsai.Let_syntax
module Query_response_tracker = Bonsai.Effect.For_testing.Query_response_tracker
let%expect_test "cutoff" =
let var = Bonsai.Var.create 0 in
let value = Bonsai.Var.value var in
let component = return @@ Value.cuto... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/test/test_proc_bonsai.ml | ocaml | use the setter to re-establish the default
Cutoff happens on the unit, so "triggered" isn't printed
Just make sure that this expression doesn't crash
this sub is here to make sure that bonsai doesn't
optimize the component into an "assoc_simple"
When completing the requests out-of-order, the last-... | open! Core
open! Import
module Bonsai_lib = Bonsai
open Bonsai_lib
open Proc
open Bonsai.Let_syntax
module Query_response_tracker = Bonsai.Effect.For_testing.Query_response_tracker
let%expect_test "cutoff" =
let var = Bonsai.Var.create 0 in
let value = Bonsai.Var.value var in
let component = return @@ Value.cuto... |
4606745fb135c984f49742842b1e5b6aed12e150362530ce5d3890f361f350e1 | RedPRL/redtt | Importer.mli | open Contextual
val set_ignore_rot : bool -> unit
module M :
sig
(** load the content of file at the top module. *)
val top_load_file : FileRes.filepath -> unit m
(** load from the standard input at the top module. *)
val top_load_stdin : red : FileRes.filepath -> unit m
(** import some module. *)
val i... | null | https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/frontend/Importer.mli | ocaml | * load the content of file at the top module.
* load from the standard input at the top module.
* import some module. | open Contextual
val set_ignore_rot : bool -> unit
module M :
sig
val top_load_file : FileRes.filepath -> unit m
val top_load_stdin : red : FileRes.filepath -> unit m
val import : selector : FileRes.selector -> rotted_resolver m
end
|
4102c0a35af44e2bd019e558f67c710a5de72ecc18575f8f0aa604c2ec007047 | evdubs/renegade-way | save-price-analysis.rkt | #lang racket/base
; This (module) is a hack to get this code to load before the (requires) call below.
We want to first set up the command line args before initializing stuff in db-queries.rkt .
(module cmd racket/base
(require gregor
racket/cmdline
"params.rkt")
(command-line
#:program... | null | https://raw.githubusercontent.com/evdubs/renegade-way/995e61a7871365fa92133ed054cd889826fb34e0/save-price-analysis.rkt | racket | This (module) is a hack to get this code to load before the (requires) call below. | #lang racket/base
We want to first set up the command line args before initializing stuff in db-queries.rkt .
(module cmd racket/base
(require gregor
racket/cmdline
"params.rkt")
(command-line
#:program "racket save-price-analysis.rkt"
#:once-each
[("-d" "--end-date") end-date
... |
a95b37185c36fcb1b511673930c96340b8308d2882581b387f0d7ff8a1bec3c1 | DavidAlphaFox/ailib | ailib_locker_sup.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 15 Oct 2018 by < >
%%%-------------------------------------------------------------------
-module(ailib_locker_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%... | null | https://raw.githubusercontent.com/DavidAlphaFox/ailib/192a225a55ee9a3d6965353184806c2b9598cb30/src/process/ailib_locker_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
=============================================================... | @author < >
( C ) 2018 ,
Created : 15 Oct 2018 by < >
-module(ailib_locker_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-export([new/1,supervisor_spec/0]).
-define(SERVER, ?MODULE).
new(Opts)->
case erlang:whereis(?SERVER) of
undefined -> throw({ailib_locker,superv... |
0b0c7d5e69eb799e7d81f5ca51a80dc63f9d28768bed47516fe6614b29729633 | mumuki/mulang | Signature.hs | module Language.Mulang.Signature (
arity,
name,
nameAndArity,
parameterNames,
signatureOf,
signaturesOf,
codeSignaturesOf,
styledCodeSignaturesOf,
mulangStyle,
haskellStyle,
prologStyle,
untypedCStyle,
Signature(..),
SignatureStyle) where
import Language.Mulang.Identifier
import Language.Mu... | null | https://raw.githubusercontent.com/mumuki/mulang/aee5d3d8aba787698862ca0deb6ad54623baaa13/src/Language/Mulang/Signature.hs | haskell | Styles
Style helper functions | module Language.Mulang.Signature (
arity,
name,
nameAndArity,
parameterNames,
signatureOf,
signaturesOf,
codeSignaturesOf,
styledCodeSignaturesOf,
mulangStyle,
haskellStyle,
prologStyle,
untypedCStyle,
Signature(..),
SignatureStyle) where
import Language.Mulang.Identifier
import Language.Mu... |
9870da4b4907c7ef63b891e392d61b144e2cb542d4c7254f6fe56657f8c0e9af | mbj/mhs | Prelude.hs | module OpenApi.Prelude (module Exports) where
import Data.Conversions as Exports
import Data.Map.Strict as Exports (Map)
import GHC.TypeLits as Exports (Symbol)
import MPrelude as Exports
| null | https://raw.githubusercontent.com/mbj/mhs/71d96825e92df3549c2ca5b0058acbb91fc2a6e7/openapi/src/OpenApi/Prelude.hs | haskell | module OpenApi.Prelude (module Exports) where
import Data.Conversions as Exports
import Data.Map.Strict as Exports (Map)
import GHC.TypeLits as Exports (Symbol)
import MPrelude as Exports
| |
3de131576ce5bd4c4e04fd1e6268f4b48dd63f498aff05ebe9f54ecc1868ce22 | pgenie-io/cli | Cli.hs | module Pgenie.Cli (main) where
import qualified Coalmine.BaseExtras.IO as IO
import qualified Coalmine.EvenSimplerPaths as Path
import Coalmine.Prelude
import qualified Data.Text.IO as TextIO
import qualified Data.Version as BaseVersion
import qualified Optima
import qualified Paths_pgenie_cli as CabalMetadata
import ... | null | https://raw.githubusercontent.com/pgenie-io/cli/247d4ecb9416203a0a7150b16c129412756e9388/library/Pgenie/Cli.hs | haskell | module Pgenie.Cli (main) where
import qualified Coalmine.BaseExtras.IO as IO
import qualified Coalmine.EvenSimplerPaths as Path
import Coalmine.Prelude
import qualified Data.Text.IO as TextIO
import qualified Data.Version as BaseVersion
import qualified Optima
import qualified Paths_pgenie_cli as CabalMetadata
import ... | |
3f0600d79d6055ee3538e0594c08e14ec249dbd6162163571351bd735982f937 | zhugecaomao/AutoLISP | chhtext-批量改字高.lsp | (DEFUN C:CHHTEXT ()
(princ "\nselect object:")
(setq s (ssget))
(setq hig (getreal "\nĘäČëĐÂ×Ö¸ß<3>:"))
(if (= hig nil) (setq hig 3.0))
(setq h40 (cons 40 hig))
(setq n (sslength s))
(setq k 0 )
(while (< k n)
(setq name (ssname s k))
(setq a (entget name))
(setq b (assoc '0 a))
(setq b... | null | https://raw.githubusercontent.com/zhugecaomao/AutoLISP/3e97f911068124f3ea8a1cf6f1d8be9f8227c64b/chhtext-%E6%89%B9%E9%87%8F%E6%94%B9%E5%AD%97%E9%AB%98.lsp | lisp | (DEFUN C:CHHTEXT ()
(princ "\nselect object:")
(setq s (ssget))
(setq hig (getreal "\nĘäČëĐÂ×Ö¸ß<3>:"))
(if (= hig nil) (setq hig 3.0))
(setq h40 (cons 40 hig))
(setq n (sslength s))
(setq k 0 )
(while (< k n)
(setq name (ssname s k))
(setq a (entget name))
(setq b (assoc '0 a))
(setq b... | |
0f885359ffd6d0c7b0067e4710c671d85acf7aef7b63394d48ee409d2cbcaf6a | RBornat/jape | facts.mli |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... | null | https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/facts.mli | ocaml |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... | |
b49f3754f9f1336e517d084dd73e4bd45c638441d38bfcd1fda5f2d3c11bb929 | xh4/web-toolkit | parser.lisp | (in-package :css)
(defun whitespace-p (char)
(or (eq #\Newline char)
(eq #\Tab char)
(eq #\Space char)))
(define-parser .whitespace ()
(.satisfies 'whitespace-p))
(define-parser .choose (&rest parsers)
(lambda (input)
(loop with parsers = parsers
with rest = input
with values = '(... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/css/parser.lisp | lisp | (parse (.choose (.digit) (.alpha)) "a1")
(parse (.choose (.digit) (.alpha)) "1a")
(parse (.anyorder (.digit) (.alpha)) "a1")
(parse (.anyorder (.digit) (.alpha)) "1a") | (in-package :css)
(defun whitespace-p (char)
(or (eq #\Newline char)
(eq #\Tab char)
(eq #\Space char)))
(define-parser .whitespace ()
(.satisfies 'whitespace-p))
(define-parser .choose (&rest parsers)
(lambda (input)
(loop with parsers = parsers
with rest = input
with values = '(... |
bdfd8aaf24adad65b03d6a2be6d1af2a43b897dde8133f9217396c2c1c6e4b14 | sbcl/sbcl | wrapper.lisp | Bits and pieces of the wrapper machinery . This used to live in cache.lisp ,
;;;; but doesn't really logically belong there.
This software is part of the SBCL system . See the README file for
;;;; more information.
This software is derived from software originally released by Xerox
;;;; Corporation. Copyright a... | null | https://raw.githubusercontent.com/sbcl/sbcl/c259475bc3650ad73f1a33038495a02f3607ba62/src/pcl/wrapper.lisp | lisp | but doesn't really logically belong there.
more information.
Corporation. Copyright and release statements follow. Later modifications
to the software are in the public domain and are provided with
absolutely no warranty. See the COPYING and CREDITS files for more
information.
All rights reserved.
Use and cop... | Bits and pieces of the wrapper machinery . This used to live in cache.lisp ,
This software is part of the SBCL system . See the README file for
This software is derived from software originally released by Xerox
copyright information from original PCL sources :
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1... |
267f104996300942e077be281260ddee221bd95f29aad313d05776335f96c9a7 | mhayashi1120/Gauche-net-twitter | user.scm | (define-module net.twitter.user
(extend net.twitter.base)
(use net.twitter.core)
(export
show/json
lookup/json
search/json
suggestions/json
suggestions/category/json
suggestion/members/json
profile-banner/json
report-spam/json))
(select-module net.twitter.user)
;;;
;;; JSON api
;;;
cre... | null | https://raw.githubusercontent.com/mhayashi1120/Gauche-net-twitter/b9f4be3ca8459fc662f9c79481411aac03b51133/src/net/twitter/user.scm | scheme |
JSON api
CRED can be #f
CRED can be #f | (define-module net.twitter.user
(extend net.twitter.base)
(use net.twitter.core)
(export
show/json
lookup/json
search/json
suggestions/json
suggestions/category/json
suggestion/members/json
profile-banner/json
report-spam/json))
(select-module net.twitter.user)
cred can be # f.
(define... |
c4ff8c646ab7638fd80d7f5cf04398e38d5675d142f89fb94347c890955a1398 | ferd/flatlog | flatlog_SUITE.erl | -module(flatlog_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
all() ->
[term_depth, map_depth, unstructured, colored].
term_depth() ->
[{docs, "Once a term is too deep, it gets continued with `...'"}].
term_depth(_) ->
?assertEqual(
... | null | https://raw.githubusercontent.com/ferd/flatlog/19304ca67af9a9d365d62f808c329bdf3d2471f1/test/flatlog_SUITE.erl | erlang | Use custom templates to drop metadata/templates | -module(flatlog_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
all() ->
[term_depth, map_depth, unstructured, colored].
term_depth() ->
[{docs, "Once a term is too deep, it gets continued with `...'"}].
term_depth(_) ->
?assertEqual(
... |
3d25cb4284b89494164993c210f1604156a39255c40d05a8c2cd76a1b1cb8316 | Liutos/cl-github-page | package.lisp | (defpackage #:com.liutos.cl-github-page.driver
(:use #:cl)
(:export #:add-post
#:init
#:modify-post
#:write-all-category-pages
#:write-all-pagination-pages
#:write-all-posts
#:write-post-page))
| null | https://raw.githubusercontent.com/Liutos/cl-github-page/336e4ad925c95969a8686ea2267099f49c1e01a6/src/driver/package.lisp | lisp | (defpackage #:com.liutos.cl-github-page.driver
(:use #:cl)
(:export #:add-post
#:init
#:modify-post
#:write-all-category-pages
#:write-all-pagination-pages
#:write-all-posts
#:write-post-page))
| |
36f16f0a582551370362708275b5c24fb2a44acb0597cfc736771c45d9aba610 | bloomcrush/bounded | Integral.hs | # LANGUAGE UndecidableInstances #
module Data.Bounded.Integral where
import Data.Bounded.JSON
import Data.Bounded.Prelude
import Data.Bounded.TypeLevel
import GHC.TypeLits (type (<=?))
import qualified Data.Aeson as JSON
import qualified Data.Csv as CSV
newtype BoundNumber' (integral :: Type) (label :: Symbol) (... | null | https://raw.githubusercontent.com/bloomcrush/bounded/2946bfeedb074bc4aa57ce48bdd00d33ce144a4d/src/Data/Bounded/Integral.hs | haskell | # LANGUAGE UndecidableInstances #
module Data.Bounded.Integral where
import Data.Bounded.JSON
import Data.Bounded.Prelude
import Data.Bounded.TypeLevel
import GHC.TypeLits (type (<=?))
import qualified Data.Aeson as JSON
import qualified Data.Csv as CSV
newtype BoundNumber' (integral :: Type) (label :: Symbol) (... | |
5f3a0f0c032f049f23138277afef451b776f167b4aa7d348800e5bb5d458ba08 | 1HaskellADay/1HAD | Main.hs | module Main
( main
) where
import HAD
import Data.Maybe (fromMaybe)
import System.Environment (getArgs)
import Control.Monad
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State.Lazy (evalStateT, get, put, StateT)
type Day = (Int, Int, Int)
main :: IO ()
main = do
args <- getArgs
case args... | null | https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/src/Main.hs | haskell | module Main
( main
) where
import HAD
import Data.Maybe (fromMaybe)
import System.Environment (getArgs)
import Control.Monad
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State.Lazy (evalStateT, get, put, StateT)
type Day = (Int, Int, Int)
main :: IO ()
main = do
args <- getArgs
case args... | |
931cd7d83d1e0d1ff8fab2619cbed307d2a4f10ff2f03d6977ffce4b28538664 | sealchain-project/sealchain | Types.hs | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Pos.Infra.DHT.Real.Types
( KademliaDHTInstance (..)
, DHTHandle
) where
import Universum
import Control.Concurrent.STM (TVar)
import qualified Network.Kademlia as K
import ... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/infra/src/Pos/Infra/DHT/Real/Types.hs | haskell | | Instance of node for /Kademlia DHT/ algorithm. | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Pos.Infra.DHT.Real.Types
( KademliaDHTInstance (..)
, DHTHandle
) where
import Universum
import Control.Concurrent.STM (TVar)
import qualified Network.Kademlia as K
import ... |
f58a81f84cb9b49be0873b730d1f05fd2460add3d218f453b0688ad9b0a8498f | emina/rosette | viz.rkt | #lang racket
(require racket/draw (only-in mrlib/graph find-dot))
(provide automaton->bitmap automaton->dot)
(define (automaton->bitmap a)
(match (find-dot)
[#f a]
[dot
(define-values (p p-out p-in p-err)
(subprocess #f #f #f dot "-Tjpeg"))
(automaton->dot a p-in)
(close-output-port ... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/fsm/viz.rkt | racket | #lang racket
(require racket/draw (only-in mrlib/graph find-dot))
(provide automaton->bitmap automaton->dot)
(define (automaton->bitmap a)
(match (find-dot)
[#f a]
[dot
(define-values (p p-out p-in p-err)
(subprocess #f #f #f dot "-Tjpeg"))
(automaton->dot a p-in)
(close-output-port ... | |
c4b70f155d81f975ccec6c68bff8eebcbe97cb9150d3140cbb38ec5ad1d60770 | oakes/odoyle-rum-todo | dev.clj | (require
'[figwheel.main :as figwheel]
'[odoyle-rum-todo.start-dev :refer [-main]])
(-main)
(figwheel/-main "--build" "dev")
| null | https://raw.githubusercontent.com/oakes/odoyle-rum-todo/15d6dca44ec5ffdb06952937a4a5f8e1de74ca1b/dev.clj | clojure | (require
'[figwheel.main :as figwheel]
'[odoyle-rum-todo.start-dev :refer [-main]])
(-main)
(figwheel/-main "--build" "dev")
| |
34b62137d09e029e7f67fe389012b9a2528bfc4229f8bcc2fe682e3bb26bfc1d | appleby/Lisp-In-Small-Pieces | syntax.scm | ;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is derived from the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
;;; The ... | null | https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/common/syntax.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is derived from the files that accompany the book:
The original sources can be downloaded from the author's website at
-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html
This file may have been altered from the original in order to... | LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
Two macros that I frequently use :
(define-syntax define-abbreviation
(syntax-rules ()
((define-abbreviation call . body)
(define-ma... |
d35eb9f5344a6ffae3f2b89a0d7e9989ddeb89db5fad2f57c8bb12dc42b9b4ba | noinia/hgeometry | QuadTreeSpec.hs | # LANGUAGE TypeApplications #
module Geometry.QuadTreeSpec where
import Control.Lens
import Test.Hspec
import Data.Ext
import Geometry.Point
import Geometry.Box.Sides
import Geometry.QuadTree
import Geometry.QuadTree.Quadrants
import Geometry.QuadTree.Tree(Tree(..))
import Geometry.QuadTree.Cell
import Data.Maybe(isJu... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/test/src/Geometry/QuadTreeSpec.hs | haskell | ------------------------------------------------------------------------------ | # LANGUAGE TypeApplications #
module Geometry.QuadTreeSpec where
import Control.Lens
import Test.Hspec
import Data.Ext
import Geometry.Point
import Geometry.Box.Sides
import Geometry.QuadTree
import Geometry.QuadTree.Quadrants
import Geometry.QuadTree.Tree(Tree(..))
import Geometry.QuadTree.Cell
import Data.Maybe(isJu... |
f99f055b8a0601b60a1a03c3e94ce198a8420cae055930d9b4b7be5f6a0f329e | flavioc/cl-hurd | macros.lisp |
(in-package :mach)
(define-condition port-invalid (error)
((expr :initarg :expr :reader expr)
(ret :initarg :ret :reader ret))
(:documentation "Signals an error if the returned port is invalid.")
(:report (lambda (condition stream)
(format stream "Port returned by the expression ~s (~s) is not v... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/mach/macros.lisp | lisp |
(in-package :mach)
(define-condition port-invalid (error)
((expr :initarg :expr :reader expr)
(ret :initarg :ret :reader ret))
(:documentation "Signals an error if the returned port is invalid.")
(:report (lambda (condition stream)
(format stream "Port returned by the expression ~s (~s) is not v... | |
3b39e47fa589723cd13f8ab0b51a0378f3438297e28be10f9ad796c20259ff74 | Motiva-AI/stepwise | s3.clj | (ns stepwise.s3
(:require [clojure.string]
[clojure.java.io]
[cognitect.aws.client.api :as aws]
[taoensso.nippy :as nippy]))
(def stock-s3-client (delay (aws/client {:api :s3})))
(def bucket-key-separator "/")
(def stepwise-offload-tag :stepwise-offloaded-to-s3)
(defn stepwise-of... | null | https://raw.githubusercontent.com/Motiva-AI/stepwise/4c8cb38f01586d45026442fb71b250c625c86ea8/src/stepwise/s3.clj | clojure | happy path
payload is offloaded in different activities and merged together via
Step Function paths | (ns stepwise.s3
(:require [clojure.string]
[clojure.java.io]
[cognitect.aws.client.api :as aws]
[taoensso.nippy :as nippy]))
(def stock-s3-client (delay (aws/client {:api :s3})))
(def bucket-key-separator "/")
(def stepwise-offload-tag :stepwise-offloaded-to-s3)
(defn stepwise-of... |
eeb6c9b4449efe1655a81802c140269930c2661af166f1291c4354814cbe1706 | dyoo/whalesong | run-all-tests.rkt | #lang racket/base
(require "../../main.rkt")
(run-in-browser "all-tests.rkt")
| null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/older-tests/moby-programs/run-all-tests.rkt | racket | #lang racket/base
(require "../../main.rkt")
(run-in-browser "all-tests.rkt")
| |
5aafd7f517f5fd853888c65ea73cf6290fd376206f0746072dd97c06a6d96a2b | kmi/ocml | strings.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*-
(in-package "OCML")
(in-ontology base-ontology)
(def-class STRING (term)
"A primitive class representing strings"
:lisp-fun #'(lambda (x env)
(if (stringp (instantiate x env)) ;;;make sure to instantiate x
... | null | https://raw.githubusercontent.com/kmi/ocml/90b0b173f588c580c26393c94f9970282c640f4d/library/basic/strings.lisp | lisp | Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*-
make sure to instantiate x |
(in-package "OCML")
(in-ontology base-ontology)
(def-class STRING (term)
"A primitive class representing strings"
:lisp-fun #'(lambda (x env)
(list env)
:fail)))
(def-function READ-FROM-STRING (?p)
:constraint (string ?p)
:lisp-fun #'read-from-string)
(def-funct... |
2cf7d8cc9ff6e89896f0d6d530c346b06787f29da3868b436333acc29198951b | marcoheisig/Petalisp | ir.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.graphviz)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Classes
(defclass ir-graph (petalisp-graph) ())
(defclass ir-edge (petalisp-edge) ())
(defclass load-edge (ir-edge) ())
... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/graphviz/ir.lisp | lisp |
Classes
Connectivity
Node Appearance
Node Labels | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.graphviz)
(defclass ir-graph (petalisp-graph) ())
(defclass ir-edge (petalisp-edge) ())
(defclass load-edge (ir-edge) ())
(defclass store-edge (ir-edge) ())
(defclass input-edge (ir-edge) ())
(defclass output-edge (i... |
9a9915a89143fe1a57af3e315a8e630f1dd76eddcd0a183d1398aec78bb88938 | oshyshko/adventofcode | D07.hs | module Y22.D07 where
import qualified Data.Map.Strict as M
import Imports
type Path = [String]
data State = State { path2size :: Map Path Int, cwd :: Path }
mkPath2Size :: String -> Map Path Int
mkPath2Size =
path2size . foldl' integrate (State M.empty []) . lines
where
integrate s@State {path2si... | null | https://raw.githubusercontent.com/oshyshko/adventofcode/a2ba6b0b93e641337864b361585065b2d9d5a172/src/Y22/D07.hs | haskell | total -- target min free | module Y22.D07 where
import qualified Data.Map.Strict as M
import Imports
type Path = [String]
data State = State { path2size :: Map Path Int, cwd :: Path }
mkPath2Size :: String -> Map Path Int
mkPath2Size =
path2size . foldl' integrate (State M.empty []) . lines
where
integrate s@State {path2si... |
b84ad4e61a9ccddc505079d2f5e3736bc4652febb7ca53e9722edbc027cb46bd | Tyruiop/needle | trace.clj | (ns needle.trace
(:require
[clojure.walk :refer [postwalk]]
[clojure.string :as str]
[clojure.data.json :as json]
[clojure.pprint :as pprint])
(:import
[java.lang ProcessHandle]))
(defn get-pid [] (.pid (ProcessHandle/current)))
(defn get-tid
[]
(-> (Thread/currentThread)
(.getId)))
(def... | null | https://raw.githubusercontent.com/Tyruiop/needle/6bc2bdc680fc218fb75e69eabcb1c55e919ac859/src/needle/trace.clj | clojure | (ns needle.trace
(:require
[clojure.walk :refer [postwalk]]
[clojure.string :as str]
[clojure.data.json :as json]
[clojure.pprint :as pprint])
(:import
[java.lang ProcessHandle]))
(defn get-pid [] (.pid (ProcessHandle/current)))
(defn get-tid
[]
(-> (Thread/currentThread)
(.getId)))
(def... | |
c209413a20da2948139ab0641e2ef0908fcb1ddc5294dfe53c87fb98adce9348 | racket/typed-racket | with-type-lift.rkt | #lang racket/base
;; Test syntax lifting in `with-type`
(require rackunit typed/racket/shallow)
(with-type #:result Number
(define-syntax (m stx)
(syntax-local-lift-expression #'(+ 1 2)))
(m))
(define-syntax (m2 stx)
(syntax-local-lift-expression #'(+ 1 2)))
(with-type #:result Number (m2))
(with-type (... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/with-type-lift.rkt | racket | Test syntax lifting in `with-type`
casts do lifts for the contract
as do predicates | #lang racket/base
(require rackunit typed/racket/shallow)
(with-type #:result Number
(define-syntax (m stx)
(syntax-local-lift-expression #'(+ 1 2)))
(m))
(define-syntax (m2 stx)
(syntax-local-lift-expression #'(+ 1 2)))
(with-type #:result Number (m2))
(with-type ([val Number]) (define val (m2)))
(chec... |
ca301415a0a45ffeaf183185ac37e2c5d345a7b129d72e21a5ddd597de53ed97 | input-output-hk/cardano-benchmarking | Main.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE Trustworthy #
module Main (main) where
import Prelude
import Data.Maybe
import Test.Tasty
import Test.Tasty.HUnit
import Text.Heredoc
import Options.Applicative
import Cardano.Benchmarking.Command (commandParser)... | null | https://raw.githubusercontent.com/input-output-hk/cardano-benchmarking/af05b42df27e2cc7305475cf5c4efa81e7f97540/cardano-tx-generator/test/Main.hs | haskell | Also update readme and documentation when the help-messages changes.
socket - path /work / cli - tests / benchmarks / shelley3pools / logs / sockets/1 --num - of - txs 1000 --add - tx - size 0 --inputs - per - tx 1 --outputs - per - tx 1 --tx - fee 1000000 --tps 10 --init - cooldown 5 --target - node ( " 127.0.0.1",30... | # LANGUAGE QuasiQuotes #
# LANGUAGE Trustworthy #
module Main (main) where
import Prelude
import Data.Maybe
import Test.Tasty
import Test.Tasty.HUnit
import Text.Heredoc
import Options.Applicative
import Cardano.Benchmarking.Command (commandParser)... |
ae08dae2782c364ef7014680060e8a543a9106e1db0f29c1ab9e7f24ed960ac1 | fission-codes/fission | UTF8.hs | -- | UTF8 text helpers
module Web.UCAN.Internal.UTF8
( Textable (..)
, toBase58Text
, stripOptionalPrefix
, stripOptionalPrefixBS
, stripOptionalPrefixLazyBS
, stripOptionalSuffix
, stripOptionalSuffixBS
, stripOptionalSuffixLazyBS
, stripPadding
, stripQuotes
, stripQuotesBS
, stripQuotesLazyBS... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/hs-ucan/library/Web/UCAN/Internal/UTF8.hs | haskell | | UTF8 text helpers
| Convert any binary object to 'Text'
per RFC7515
incase they trail
incase they trail
| Remove a number of characters from the beginning and the end of some text. | module Web.UCAN.Internal.UTF8
( Textable (..)
, toBase58Text
, stripOptionalPrefix
, stripOptionalPrefixBS
, stripOptionalPrefixLazyBS
, stripOptionalSuffix
, stripOptionalSuffixBS
, stripOptionalSuffixLazyBS
, stripPadding
, stripQuotes
, stripQuotesBS
, stripQuotesLazyBS
, stripN
, stripNB... |
e358932f4e792a92bef20aec6d95ccf9100461d65c845986031f59b188b5d5ea | ThoughtWorksInc/stonecutter | delete_account.clj | (ns stonecutter.view.delete-account
(:require [traduki.core :as t]
[net.cgrand.enlive-html :as html]
[stonecutter.routes :as r]
[stonecutter.view.view-helpers :as vh]))
(defn set-form-action [path enlive-m]
(html/at enlive-m [:.clj--delete-account__form] (html/set-attr :action p... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/view/delete_account.clj | clojure | (ns stonecutter.view.delete-account
(:require [traduki.core :as t]
[net.cgrand.enlive-html :as html]
[stonecutter.routes :as r]
[stonecutter.view.view-helpers :as vh]))
(defn set-form-action [path enlive-m]
(html/at enlive-m [:.clj--delete-account__form] (html/set-attr :action p... | |
e1fa6937f9169ba1bf371c1c93115e727ec2b95f4fc56aadedb1e3e2ba18b56d | mfikes/fifth-postulate | ns239.cljs | (ns fifth-postulate.ns239)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns239.cljs | clojure | (ns fifth-postulate.ns239)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
b9dee5ac00388eb56ecae9c0382a47a085d9c8325fbaf98e5a1f58fe7f0615b3 | ahrefs/atd | hello.ml | open Hello_t
let () =
let date = { year = 1970; month = 1; day = 1 } in
print_endline (Hello_j.string_of_date date)
| null | https://raw.githubusercontent.com/ahrefs/atd/9638912ac34d0460674dd691572870bfd364a2c1/doc/atdgen-tutorial-data/hello/hello.ml | ocaml | open Hello_t
let () =
let date = { year = 1970; month = 1; day = 1 } in
print_endline (Hello_j.string_of_date date)
| |
48d8fa1fd564ac73e8f202d1fbc1be3423536c01ce787e53a1ee84323d6f842a | yetibot/yetibot | or.clj | (ns yetibot.commands.or
(:require
[clojure.string :refer [blank?]]
[taoensso.timbre :refer [info warn error]]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn or-cmd
"or <text> # if piped args passed in "
{:yb/cat #{:util}}
[{:keys [raw match]}]
(info "or:" raw match)
(if (or (nil? raw) (empty? r... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/or.clj | clojure | (ns yetibot.commands.or
(:require
[clojure.string :refer [blank?]]
[taoensso.timbre :refer [info warn error]]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn or-cmd
"or <text> # if piped args passed in "
{:yb/cat #{:util}}
[{:keys [raw match]}]
(info "or:" raw match)
(if (or (nil? raw) (empty? r... | |
f63bc57cabe08ad4b34ab828b4b947783e33cc567fdb6a887781e77cea1345ff | ChildsplayOSU/bogl | Server.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-|
Module : API.Server
Description : API Server for BoGL
Copyright : (c)
License : BSD-3
Handles starting up an instance of Servant
Returns encoded board data on request, and computes
boards when input data is t... | null | https://raw.githubusercontent.com/ChildsplayOSU/bogl/8c649689bf26543be1a7ec72787b9c013ecb754f/src/API/Server.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
|
Module : API.Server
Description : API Server for BoGL
Copyright : (c)
License : BSD-3
Handles starting up an instance of Servant
Returns encoded board data on request, and computes
boards when input data is taken
/test () nothing, just indicates ... | # LANGUAGE TemplateHaskell #
module API.Server (startServer, serverApp, SpielApi) where
import API.JSONData
import API.Test
import API.ShareFile
import API.Load
import API.RunCode
import API.ReadFile
import API.CORSMiddleware
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
import Network.Wai.Middl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.