_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 |
|---|---|---|---|---|---|---|---|---|
7096fbd29208105a38b6ba01a9948bee99f9253daee69937a42bac199817c5ba | stuarthalloway/programming-clojure | interop.clj | (ns examples.test.interop
(:use clojure.test)
(:use examples.interop))
(deftest sum-to-variants
(is (= (sum-to 10) 55))
(is (= (integer-sum-to 10) 55))
(is (= (unchecked-sum-to 10) 55))
(is (= (better-sum-to 10) 55))
(is (= (best-sum-to 10) 55))
)
(deftest test-painstakingly-create-array
(is (= (seq (... | null | https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/test/examples/test/interop.clj | clojure | skipping test of demo-threads
to write this test you would need a cross-thread with-out-str | (ns examples.test.interop
(:use clojure.test)
(:use examples.interop))
(deftest sum-to-variants
(is (= (sum-to 10) 55))
(is (= (integer-sum-to 10) 55))
(is (= (unchecked-sum-to 10) 55))
(is (= (better-sum-to 10) 55))
(is (= (best-sum-to 10) 55))
)
(deftest test-painstakingly-create-array
(is (= (seq (... |
cd50ef2d9f5d13554bdd1bdba8a165dbcdfbcbf62dd3c89e1d912b9c854766d7 | AndrasKovacs/ELTE-func-lang | Tut07.hs | {-# OPTIONS -Wincomplete-patterns #-}
# LANGUAGE InstanceSigs , DeriveFunctor , DeriveFoldable #
module Tut07 where
import Prelude hiding (Traversable(..))
import Control.Monad
import Data.Monoid
data State s a = State { runState :: s -> (a, s) }
deriving (Functor)
instance Applicative (State s) where
pure = re... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/5ae6c1493b0cb2712f41740b0783be9bc8a8a704/2021-22-1/gyak_3/Tut07.hs | haskell | # OPTIONS -Wincomplete-patterns #
------------------------------------------------------------------------------
Define the function `labelTree :: Tree a -> Tree Int`.
Examples:
labelTree (Leaf ()) == Leaf 0
labelTree (Node (Leaf ()) (Leaf ()))
== Node (Leaf 0) (Leaf 1)
labelTree (Node (Node (Leaf ()) ... | # LANGUAGE InstanceSigs , DeriveFunctor , DeriveFoldable #
module Tut07 where
import Prelude hiding (Traversable(..))
import Control.Monad
import Data.Monoid
data State s a = State { runState :: s -> (a, s) }
deriving (Functor)
instance Applicative (State s) where
pure = return
(<*>) = ap
instance Monad (Sta... |
93a3fa877146c1da7db34d5f8de7ad241502337c84722d3f7a963a4eb0299666 | jimmythompson/halboy | httpkit_test.clj | (ns halboy.http.httpkit-test
(:use org.httpkit.fake)
(:require [clojure.test :refer [deftest testing is]]
[halboy.http.http-kit :as httpkit-client]
[halboy.http.protocol :as http]))
(def base-url "")
(deftest halboy-http
(testing "http_kit"
(with-fake-http
[{:url base-url :meth... | null | https://raw.githubusercontent.com/jimmythompson/halboy/7e0b1fcb072851520917476ade692f7dbf6f9962/test/halboy/http/httpkit_test.clj | clojure | (ns halboy.http.httpkit-test
(:use org.httpkit.fake)
(:require [clojure.test :refer [deftest testing is]]
[halboy.http.http-kit :as httpkit-client]
[halboy.http.protocol :as http]))
(def base-url "")
(deftest halboy-http
(testing "http_kit"
(with-fake-http
[{:url base-url :meth... | |
50021451c662e9cf7a8309c48a4e0ec3dd513530664525951419641e17a53f88 | gsakkas/rite | 3407.ml |
let rec clone x n =
if n < 1
then []
else
(let rec helper acc f x =
match x with | 0 -> acc | _ -> helper (f :: acc) f (x - 1) in
helper [] x n);;
let padZero l1 l2 =
let x = (List.length l1) - (List.length l2) in
if x != 0
then
(if x < 0
then (((clone 0 (abs x)) @ l1), l2)
e... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/3407.ml | ocaml |
let rec clone x n =
if n < 1
then []
else
(let rec helper acc f x =
match x with | 0 -> acc | _ -> helper (f :: acc) f (x - 1) in
helper [] x n);;
let padZero l1 l2 =
let x = (List.length l1) - (List.length l2) in
if x != 0
then
(if x < 0
then (((clone 0 (abs x)) @ l1), l2)
e... | |
011c06f36b4ba0d98acf7c6b161a2658837b5572d23c8dabca7718f70993a9ad | neilprosser/mr-maestro | healthy_test.clj | (ns maestro.messages.healthy-test
(:require [maestro.healthy :as healthy]
[maestro.messages.healthy :refer :all]
[midje.sweet :refer :all]))
(def register-with-healthy-params
{:environment "environment"
:new-state {:auto-scaling-group-name "new-asg"
:tyranitar {:applicatio... | null | https://raw.githubusercontent.com/neilprosser/mr-maestro/469790fd712262016729c1d83d4b4e11869237a2/test/maestro/messages/healthy_test.clj | clojure | (ns maestro.messages.healthy-test
(:require [maestro.healthy :as healthy]
[maestro.messages.healthy :refer :all]
[midje.sweet :refer :all]))
(def register-with-healthy-params
{:environment "environment"
:new-state {:auto-scaling-group-name "new-asg"
:tyranitar {:applicatio... | |
e45d074a4192a8239c8b10b452e9f77c336b1a36ece0a102bec198ba9ddfb9ad | Octachron/olivine | vk__builtin__types.ml | module U32 = Unsigned.UInt32
module U64 = Unsigned.UInt64
module U16 = Unsigned.UInt16
module S = Unsigned.Size_t
module type intlike = sig type t val zero: t val ctype: t Ctypes.typ end
let integer_opt (type a) (module I:intlike with type t = a) =
let read x = if x = I.zero then None else Some x in
let write = f... | null | https://raw.githubusercontent.com/Octachron/olivine/e93df595ad1e8bad5a8af689bac7d150753ab9fb/lib_aux/vk__builtin__types.ml | ocaml | module U32 = Unsigned.UInt32
module U64 = Unsigned.UInt64
module U16 = Unsigned.UInt16
module S = Unsigned.Size_t
module type intlike = sig type t val zero: t val ctype: t Ctypes.typ end
let integer_opt (type a) (module I:intlike with type t = a) =
let read x = if x = I.zero then None else Some x in
let write = f... | |
2b7546494d009db567c24eedba690363a680c92405e093e2c5133bb6f272d59f | patrickt/possession | Exts.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Dhall.Exts where
import Data.Monoid
import Data.Semigroup (Max (..))
import Dhall
deriving newtype instance ToDhall a => ToDhall (Sum a)
deriving newtype instance ToDh... | null | https://raw.githubusercontent.com/patrickt/possession/f771bc755dfee7a94ba77310d6f5c69b82e7bfce/src/Dhall/Exts.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Dhall.Exts where
import Data.Monoid
import Data.Semigroup (Max (..))
import Dhall
deriving newtype instance ToDhall a => ToDhall (Sum a)
deriving newtype instance ToDh... | |
6e4e7991ca7ac0992adeeeb6c02bfd7a0f3502ac20b1a8848303406f65afd205 | bsansouci/bsb-native | type_IncompatibleType_1.ml | if 123 then "asd" else "a"
| null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/BetterErrors/tests/type_IncompatibleType/type_IncompatibleType_1.ml | ocaml | if 123 then "asd" else "a"
| |
b597635a1d613e57a0f99c677e213b995e6be83a845f11571f4504caa94a40aa | ianmbloom/gudni | Serialize.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleContexts #
-----------------------------------------------------------------------------
-- |
Module : Graphics . Gudni . Raster . Serialize
Copyright : ( c ) 2019
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : ... | null | https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/Raster/Serialize.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Stability : experimental
Portability : portable
Functions used by TraverseShapeTree to serialize a scene into data buffers that can be parsed by
the rasterizer kernel ... | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleContexts #
Module : Graphics . Gudni . Raster . Serialize
Copyright : ( c ) 2019
Maintainer :
module Graphics.Gudni.Raster.Serialize
( GeometryPile(..)
, GeometryState(..)
, geoReorderTable
, geoMaxStrandSize
, geoMaxStrandsPerTile... |
3e9f0e39703d15a1696e3c8cf700742245a3e65de6aef25ba0f4c6714a78ca19 | rurban/clisp | gdbm.lisp | Module for GDBM / CLISP
;; </>
Copyright ( C ) 2007 < >
Copyright ( C ) 2007 - 2008 , 2018 < >
This is Free Software , distributed under the GNU GPL v2 +
make sure there are no FFI forms in this file ,
;; otherwise gdbm.c will get overwritten on compilation.
(defpackage #:gdbm
(:documentation
... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/gdbm/gdbm.lisp | lisp | </>
otherwise gdbm.c will get overwritten on compilation.
keep this definition in sync with check_gdbm in gdbm.c | Module for GDBM / CLISP
Copyright ( C ) 2007 < >
Copyright ( C ) 2007 - 2008 , 2018 < >
This is Free Software , distributed under the GNU GPL v2 +
make sure there are no FFI forms in this file ,
(defpackage #:gdbm
(:documentation
"GDBM - The GNU database manager - </>")
(:use #:lisp)
(:ex... |
d9ccab41cb5433b8f2c408933d1e3c76077ac87cd9eda468ca5e9a49af8303b7 | Rober-t/apxr_run | flatlog.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Apache License
Version 2.0 , January 2004
%%% /
%%%
%%% TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
%%%
%%% 1. Definitions.
%%%
%%% ... | null | https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/src/lib/flatlog.erl | erlang |
Apache License
/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
t... | Version 2.0 , January 2004
" Licensor " shall mean the copyright owner or entity authorized by
" Derivative Works " shall mean any work , whether in Source or Object
the Work and Derivative Works thereof .
2 . Grant of Copyright License . Subject to the terms and con... |
4bbd3743b36ae7b6e5ef82330bc6fdc9a24f7bd9428ef816f8c7e80d9c7d7f58 | zyla/ceburilo | Main.hs | # LANGUAGE DataKinds , TypeOperators , RecordWildCards , OverloadedStrings #
module Main where
import Network.Wai
import Network.Wai.Handler.Warp
import Network.Wai.Middleware.Cors (simpleCors)
import Servant
import Data.Maybe
import Data.Ord
import Data.Foldable (minimumBy)
import qualified Data.ByteString as BS
impo... | null | https://raw.githubusercontent.com/zyla/ceburilo/7bb24940759bee7b3dff3407fcb093ebf130e710/app/server/Main.hs | haskell | -----------------------------
^Begginning lat,lon
^Destination lat.lon
^Given graph | # LANGUAGE DataKinds , TypeOperators , RecordWildCards , OverloadedStrings #
module Main where
import Network.Wai
import Network.Wai.Handler.Warp
import Network.Wai.Middleware.Cors (simpleCors)
import Servant
import Data.Maybe
import Data.Ord
import Data.Foldable (minimumBy)
import qualified Data.ByteString as BS
impo... |
8dc00bbc92199c247b7d8721b006d0bcbbedb4aa68e85b2edc4910f2f4463409 | rcherrueau/rastache | partials.rkt | #lang racket/base
; /\ \__ /\ \
; _ __ __ ____\ \ ,_\ __ ___\ \ \___ __
/\`'__\/'__`\ /',__\\ \ \/ /'__`\ /'___\ \ _ ` \ /'__`\
; \ \ \//\ \L\.\_/\__, `\\ \ \_/\ \L\.\_/\ \__/\ \ \ \ \/\ __/
\ \_\\ \__/.\_\/\____/ \ \__\ \__/.\_\ \____\\ \_\ \... | null | https://raw.githubusercontent.com/rcherrueau/rastache/059d00c83416f8ba27cc38fa7f8321b075756d14/rastache/tests/partials.rkt | racket | /\ \__ /\ \
_ __ __ ____\ \ ,_\ __ ___\ \ \___ __
\ \ \//\ \L\.\_/\__, `\\ \ \_/\ \L\.\_/\ \__/\ \ \ \ \/\ __/
\/_/ \/__/\/_/\/___/ \/__/\/__/\/_/\/____/ \/_/\/_/\/____/
Mustache template engine for Racket
Partial tags are used to expand an external t... | #lang racket/base
/\`'__\/'__`\ /',__\\ \ \/ /'__`\ /'___\ \ _ ` \ /'__`\
\ \_\\ \__/.\_\/\____/ \ \__\ \__/.\_\ \____\\ \_\ \_\
(provide partials-tests)
(require rackunit
rackunit/text-ui
net/url
"../commons.rkt"
"rastache-test-case.rkt")
(define partials-tests... |
c4214c4bb8a5a4487220dd7489dd07e87df05867026625e79da2f86b3c5434f5 | glguy/advent2015 | Day10.hs | module Main where
import Data.List
main :: IO ()
main =
do steps <- iterate lookAndSay <$> loadInput
print (length (steps !! 40))
print (length (steps !! 50))
loadInput :: IO String
loadInput = head . words <$> readFile "input10.txt"
lookAndSay :: String -> String
lookAndSay = foldr aux [] . group
whe... | null | https://raw.githubusercontent.com/glguy/advent2015/e59b93c41363be85eb7f11396db5c95e79e485ad/Day10.hs | haskell | module Main where
import Data.List
main :: IO ()
main =
do steps <- iterate lookAndSay <$> loadInput
print (length (steps !! 40))
print (length (steps !! 50))
loadInput :: IO String
loadInput = head . words <$> readFile "input10.txt"
lookAndSay :: String -> String
lookAndSay = foldr aux [] . group
whe... | |
7f20117735376b15787d870d0ea912b516bd8b7b66d7434200a0f5fa00a93268 | TheBestTvarynka/Lisp-SQL-Parser | cli.lisp |
(require 'asdf)
(load "priority-queue/priority-queue.asd")
(asdf:load-system 'priority-queue)
; load all functionality code
(load "getenv.lisp")
(load "importer.lisp")
(load "print.lisp")
(load "where.lisp")
(load "orderby.lisp")
(load "select.lisp")
(load "joins.lisp")
(load "union.lisp")
(load "groupby.lisp")
(load... | null | https://raw.githubusercontent.com/TheBestTvarynka/Lisp-SQL-Parser/d8f1283fc00e394d76e4ac28e434c99d1bee72aa/src/cli.lisp | lisp | load all functionality code
tables - hashmap where key is tablename and value is a table
define keywords for sql-query
priorities for every operation
hashmap with all functions for quering |
(require 'asdf)
(load "priority-queue/priority-queue.asd")
(asdf:load-system 'priority-queue)
(load "getenv.lisp")
(load "importer.lisp")
(load "print.lisp")
(load "where.lisp")
(load "orderby.lisp")
(load "select.lisp")
(load "joins.lisp")
(load "union.lisp")
(load "groupby.lisp")
(load "having.lisp")
(load "limit.l... |
4e10a281980e48211919b6bf96c75784747e8a9da865f94669b04af0ae1c4325 | OCamlPro/techelson | macro.ml | Macro parsing .
(* Recognizes strings corresponding to macro operators. *)
let op (token : string) : Base.Mic.Macro.op option = match token with
| "EQ" -> Some Eq
| "NEQ" -> Some Neq
| "LT" -> Some Lt
| "LE" -> Some Le
| "GE" -> Some Ge
| "GT" -> Some Gt
| _ -> None
(* Parses a prefix and then an operator. *)
let p... | null | https://raw.githubusercontent.com/OCamlPro/techelson/932fbf08675cd13d34a07e3b3d77234bdafcf5bc/src/2_parse/macro.ml | ocaml | Recognizes strings corresponding to macro operators.
Parses a prefix and then an operator. | Macro parsing .
let op (token : string) : Base.Mic.Macro.op option = match token with
| "EQ" -> Some Eq
| "NEQ" -> Some Neq
| "LT" -> Some Lt
| "LE" -> Some Le
| "GE" -> Some Ge
| "GT" -> Some Gt
| _ -> None
let prefixed_op
(err : unit -> string list)
(pref : string)
(build : Base.Mic.Macro.op -> 'a)
... |
454695ba1a58a7fe5ceb07e348a839768f095d6a68587b56ae353c1a39ab9a1a | haskellfoundation/error-message-index | Tab.hs | module Tab where
add :: Int -> Int -> Int
add x y =
x + y
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/7dcad9cd5d7b51de61621d6a6eeb0ece68dea539/message-index/messages/GHC-94817/tab/after/Tab.hs | haskell | module Tab where
add :: Int -> Int -> Int
add x y =
x + y
| |
3b408e700bfb9ea55186fb63251b3daf85b7ee3d44252528209e26645c4f6af1 | threatgrid/ctia | print_matrix.clj | #!/usr/bin/env bb
;; determines the build matrix for the GitHub Actions build.
;; try it locally:
;; # normal builds
;; $ GITHUB_ENV=$(mktemp) GITHUB_EVENT_NAME=pull_request ./scripts/actions/print-matrix.clj
;; $ GITHUB_ENV=$(mktemp) GITHUB_EVENT_NAME=push ./scripts/actions/print-matrix.clj
# cron build
;;... | null | https://raw.githubusercontent.com/threatgrid/ctia/e9ccd310fa0c6ae58b26e8d25e7852be1fe8e710/scripts/actions/print_matrix.clj | clojure | determines the build matrix for the GitHub Actions build.
try it locally:
# normal builds
$ GITHUB_ENV=$(mktemp) GITHUB_EVENT_NAME=pull_request ./scripts/actions/print-matrix.clj
$ GITHUB_ENV=$(mktemp) GITHUB_EVENT_NAME=push ./scripts/actions/print-matrix.clj
$ GITHUB_ENV=$(mktemp) GITHUB_EVENT_NAME=sche... | #!/usr/bin/env bb
# cron build
$ GITHUB_ENV=$(mktemp ) CTIA_COMMIT_MESSAGE='{:test - suite : cron } try cron build ' GITHUB_EVENT_NAME = push ./scripts / actions / print - matrix.clj
(ns actions.print-matrix
(:require [actions.actions-helpers :as h]))
(def ^:private default-java-version "11")
LTS version... |
c10a545d06b2cb4e7b996e3f54dc5b737d0f4ac6ea46e35bc48be3f349a1e03b | rowangithub/DOrder | 123_icse2014.ml | let rec loop x y =
if x < 11 then
if (x >= 5) then loop (x+1) (y+1)
else loop (x+1) y
else y
let main x =
let y = 5 in
let x = if (x > y) then y else x in
let res = loop x y in
assert (res = 11) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/123_icse2014.ml | ocaml | let rec loop x y =
if x < 11 then
if (x >= 5) then loop (x+1) (y+1)
else loop (x+1) y
else y
let main x =
let y = 5 in
let x = if (x > y) then y else x in
let res = loop x y in
assert (res = 11) | |
e80b71d2932585181e26edceb790c8850f5c1fdeb2d00160a9a1313076ef079f | ekmett/lens | Lens.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
-- Module : System.IO.Error.Lens
Copyright : ( C ) 2012 - 2016
-- License : BSD-style (see the file LICENSE)
Maintainer... | null | https://raw.githubusercontent.com/ekmett/lens/a26281a49e85af46821964d8f7455b82cfd4251d/src/System/IO/Error/Lens.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.IO.Error.Lens
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : Rank2Types
--------------------------------------------------------------------------
* IOException Lenses
... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( C ) 2012 - 2016
Maintainer : < >
module System.IO.Error.Lens where
import Control.Lens
import GHC.IO.Exception
import System.IO
import Foreign.C.Types
location :: Lens' IOException String
l... |
b1c19f4ec950a14842297ec1c470fbef869565b6fc626116f3c918321a920aca | haroldcarr/learn-haskell-coq-ml-etc | LibSpec.hs | # LANGUAGE NoImplicitPrelude #
module LibSpec where
import Test.Hspec
------------------------------------------------------------------------------
import Lib
{-
spec :: Spec
spec = do
t01
t02
t03
t04
t05
-}
| null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/existentials/2016-06-justin-le-practical-dependent-types-in-haskell-existential-neural-networks-and-types-at-runtime/test/LibSpec.hs | haskell | ----------------------------------------------------------------------------
spec :: Spec
spec = do
t01
t02
t03
t04
t05
| # LANGUAGE NoImplicitPrelude #
module LibSpec where
import Test.Hspec
import Lib
|
95415d6817064f678770432c3d57185baecab0ee2e629452b09dcefd35e7e36b | racket/racket7 | main.rkt | #lang racket/base
(require "config.rkt"
"special.rkt"
"wrap.rkt"
"coerce.rkt"
"readtable.rkt"
"whitespace.rkt"
"delimiter.rkt"
"closer.rkt"
"consume.rkt"
"location.rkt"
"accum-string.rkt"
"error.rkt"
"indentation... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/read/main.rkt | racket | This is not the `read` to be exposed from `racket/base`, but a
general entry to point implement `read` and variants like
`read-syntax` and `read/recursive`. To support syntax objects, the
caller should provide the `dynamic-require`, `read-compiled`,
a plain `read`, since those might be needed by a
`read-syntax/re... | #lang racket/base
(require "config.rkt"
"special.rkt"
"wrap.rkt"
"coerce.rkt"
"readtable.rkt"
"whitespace.rkt"
"delimiter.rkt"
"closer.rkt"
"consume.rkt"
"location.rkt"
"accum-string.rkt"
"error.rkt"
"indentation... |
32cc42d3fe7efd10bf963c07b45067640a47e755fe5fdc4dbe798902a62b7c0c | heidegger/JSConTest | TCJS.ml | open AST
open Annotation
open ProglangUtils
open ExtList
open Contract
open BaseContract
open Analyse
open ASTUtil
open String_of
type bc = BaseContract.t
type a = Analyse.t
type d = Depend.t
type tc = (bc,a,d,DependDown.t) Contract.t
type c = (bc,a,d,DependDown.t) Contract.contract
type exp = tc AST.expression
t... | null | https://raw.githubusercontent.com/heidegger/JSConTest/7c807a76af998da25775fba1f5cbe1cf8031d121/ocaml/transform/TCJS.ml | ocaml | generate code for contracts
Parameter
return
effekte
fname
this object
Parameter
return
effekte
fname
[add_test e (GenInfo.getTestNumber gI)]
transforms the body of a function expression or function statement, returns an
* expression representing the function as a function expression.
It also... | open AST
open Annotation
open ProglangUtils
open ExtList
open Contract
open BaseContract
open Analyse
open ASTUtil
open String_of
type bc = BaseContract.t
type a = Analyse.t
type d = Depend.t
type tc = (bc,a,d,DependDown.t) Contract.t
type c = (bc,a,d,DependDown.t) Contract.contract
type exp = tc AST.expression
t... |
632ba937a133bfa6251ea3a24b36bde3ae8979aa7748e363c19bfa9663cc6426 | FranklinChen/Ebnf2ps | Color.hs | -- -*- Mode: Haskell -*-
Copyright 1994 by
Color.hs --- string converter for colors
Author :
Created On : Thu Dec 2 16:58:33 1993
Last Modified By :
Last Modified On : Fri Dec 3 14:13:34 1993
Update Count : 3
-- Status : Unknown, Use with ... | null | https://raw.githubusercontent.com/FranklinChen/Ebnf2ps/131bf89bc56c9503dc941f0b5bad0e2fe8eb4551/src/Color.hs | haskell | -*- Mode: Haskell -*-
- string converter for colors
Status : Unknown, Use with caution!
$Locker: $
Imported sources
Initial revision
Gofer-like stuff:
make list of n copies of x
prepareColors rgbFile colors =
decodeColors (map (map toLower) colors) (fallBackRgb++... | Copyright 1994 by
Author :
Created On : Thu Dec 2 16:58:33 1993
Last Modified By :
Last Modified On : Fri Dec 3 14:13:34 1993
Update Count : 3
$ Log : Color.hs , v $
Revision 1.1.1.1 1998/12/09 13:34:08 pjt
Revision 1.1 1994/03/15 15:34:53 thiemann
Last Modifi... |
3bffa7a396a03effc9334189fbe143c27617eb4c58c66499fa4f813c833b8cfd | seancorfield/next-jdbc | build.clj | (ns build
"next.jdbc's build script.
clojure -T:build ci
clojure -T:build deploy
Run tests via:
clojure -X:test
For more information, run:
clojure -A:deps -T:build help/doc"
(:refer-clojure :exclude [test])
(:require [clojure.tools.build.api :as b]
[clojure.tools.deps :as t]
... | null | https://raw.githubusercontent.com/seancorfield/next-jdbc/a7833b1858ef908f69cf33b514b529ad216b297d/build.clj | clojure | (ns build
"next.jdbc's build script.
clojure -T:build ci
clojure -T:build deploy
Run tests via:
clojure -X:test
For more information, run:
clojure -A:deps -T:build help/doc"
(:refer-clojure :exclude [test])
(:require [clojure.tools.build.api :as b]
[clojure.tools.deps :as t]
... | |
8c85900de71dfd1fe2bc89883950050dbb9057c398fc3d1bf38037f3a7785770 | immutant/immutant | project.clj | Copyright 2014 - 2017 Red Hat , Inc , and individual contributors .
;;
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/immutant/immutant/6ff8fa03acf73929f61f2ca75446cb559ddfc1ef/integration-tests/project.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Copyright 2014 - 2017 Red Hat , Inc , and individual contributors .
distributed under the License is distributed on an " AS IS " BASIS ,
(defproject org.immutant/integs "2.1.11-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:dependencies [[org.immutant/immutant _]
[org.immutant/wildfly _]]
:al... |
99b4f4cb23d4a5bcdf858ebb9fd9fbe8ebcfb68eec149a014aea250969bdb91a | Spivoxity/obc-3 | stack.ml |
* Oxford Oberon-2 compiler
* stack.ml
* Copyright ( C ) 1995 , 1998
* Oxford Oberon-2 compiler
* stack.ml
* Copyright (C) J. M. Spivey 1995, 1998
*)
open Icode
open Symtab
open Print
open Dict
open Gcmap
We keep a stack of Booleans , each indicating whether an item on the
evaluation... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/compiler/stack.ml | ocaml | This assumes that a label has an empty stack if it is
not the target of some forward branch. |
* Oxford Oberon-2 compiler
* stack.ml
* Copyright ( C ) 1995 , 1998
* Oxford Oberon-2 compiler
* stack.ml
* Copyright (C) J. M. Spivey 1995, 1998
*)
open Icode
open Symtab
open Print
open Dict
open Gcmap
We keep a stack of Booleans , each indicating whether an item on the
evaluation... |
5314ebd482ee93cb934a0a637450e6cbcc640ebd0487f4b4672339941e659ca0 | flexsurfer/re-frame-steroid | views.clj | (ns steroid.views
(:require [clojure.walk :as w]))
;; source -im/status-react/blob/develop/src/status_im/utils/views.clj
(defn atom? [sub]
(or (vector? sub)
(and (seq sub)
(#{`reagent.core/atom} (first sub)))))
(defn walk-sub [sub form->sym]
(if (coll? sub)
(w/postwalk (fn [f]
... | null | https://raw.githubusercontent.com/flexsurfer/re-frame-steroid/c763cb80e34b191824af204bded87a9ccbc23dc3/src/steroid/views.clj | clojure | source -im/status-react/blob/develop/src/status_im/utils/views.clj | (ns steroid.views
(:require [clojure.walk :as w]))
(defn atom? [sub]
(or (vector? sub)
(and (seq sub)
(#{`reagent.core/atom} (first sub)))))
(defn walk-sub [sub form->sym]
(if (coll? sub)
(w/postwalk (fn [f]
(or (form->sym f) f)) sub)
(or (form->sym sub) sub)))
(defn... |
0f6cdb80a97b9524092dd4755100eedfe8a2c261a2891d93f2ce59eba20b7cb9 | dongcarl/guix | nar.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/nar.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (test-nar)
#:use-module (guix tests)
#:... |
6b284d9effa2d258269384e4720f455b97106a9aafd3d2b4c28e1afd99f9cbae | music-suite/music-suite | Score.hs |
# LANGUAGE TypeFamilies #
module Main where
import Music.Prelude
import Util
{-
Describe project here.
-}
music = c
Develop tools for basic counterpoint techniques .
- Presentations ( offset in time and pitch )
- Transformations
- Inversion , augment / dimin etc .
Try to encode the form of classical f... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/examples/pieces/Fugue/Score.hs | haskell |
Describe project here.
|
# LANGUAGE TypeFamilies #
module Main where
import Music.Prelude
import Util
music = c
Develop tools for basic counterpoint techniques .
- Presentations ( offset in time and pitch )
- Transformations
- Inversion , augment / dimin etc .
Try to encode the form of classical fugues in table form , see for... |
dbc6f3037aac83e55e829c1eca6554246e8565e845264f971552d2b3c87764d7 | S8A/htdp-exercises | ex510.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex510) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (h... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex510.rkt | racket | about the language level of this file in a form that our tools can easily process.
N String String -> String
arranges all the words from the in-f into lines of maximal width w
and writes them out to out-f
[List-of [List-of String]] -> [List-of [List-of String]]
arranges the given lines into new ones of maximal wi... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex510) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "batch-io.rkt" "te... |
b39b8fa871935f901709bab8e05d66fe3185075b41cc5c040ca3b79457e6d683 | igrep/typesafe-precure | Words.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module ACME.PreCure.Textbook.Suite.Words where
groupName_Suite = "ハートキャッチプリキュア!"
girlName_Hibiki = "北条 響"
girlName_Kanade = "南野 奏"
girlName_Ellen = "黒川 エレン"
girlName_Ako = "調辺 アコ"
cureName_Melody = "キュアメロディ"
cureName_Rhythm = "キュアリズム"
cureName_Beat = "キュアビート... | null | https://raw.githubusercontent.com/igrep/typesafe-precure/fc94f5f2c0ca8d8acc0b8eabe890a85bc305d7b3/src/ACME/PreCure/Textbook/Suite/Words.hs | haskell |
#Suite_Pretty_Cure.E2.99.AA
-olfeXL8
-9PB0D6_Lc
| # OPTIONS_GHC -fno - warn - missing - signatures #
module ACME.PreCure.Textbook.Suite.Words where
groupName_Suite = "ハートキャッチプリキュア!"
girlName_Hibiki = "北条 響"
girlName_Kanade = "南野 奏"
girlName_Ellen = "黒川 エレン"
girlName_Ako = "調辺 アコ"
cureName_Melody = "キュアメロディ"
cureName_Rhythm = "キュアリズム"
cureName_Beat = "キュアビート... |
9e2e84e0cc9258a93b8d462ca2dc1345948ad061c52be09b1b4dd65b2584308a | inventi/jenkins-rabbitz | api.clj | (ns karotz.api
(:require [clojure.xml :as xml]
[clojure.string :as st])
(:import java.io.IOException
java.net.URLEncoder
javax.crypto.Mac
javax.crypto.spec.SecretKeySpec
org.apache.commons.codec.binary.Base64
(java.util.logging Logger Level)))
(def... | null | https://raw.githubusercontent.com/inventi/jenkins-rabbitz/2a15a7df842ef9794df4a2932850867683d918d8/src/main/clojure/karotz/api.clj | clojure | (ns karotz.api
(:require [clojure.xml :as xml]
[clojure.string :as st])
(:import java.io.IOException
java.net.URLEncoder
javax.crypto.Mac
javax.crypto.spec.SecretKeySpec
org.apache.commons.codec.binary.Base64
(java.util.logging Logger Level)))
(def... | |
4710bf5b9e1dd5c754aac7b079aefae6238baf7cb0286ff5138e1ca7d0dbbc1c | erlang/otp | beam_lib_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/1a36de1974cdb843baee80140b41e9323820f2c1/lib/stdlib/test/beam_lib_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1997 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(beam_lib_SUITE).
-ifdef(debug).
-define(format(S, A), io:format(S, A)).
-define(line, put(line, ?LINE), ).
... |
cf237011ea64fcb53c4bf577096c1742dfe497127aac9809694c424f2eaf5b7a | esumii/min-caml | ack.ml | let rec ack x y =
if x <= 0 then y + 1 else
if y <= 0 then ack (x - 1) 1 else
ack (x - 1) (ack x (y - 1)) in
print_int (ack 3 10)
| null | https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/shootout/ack.ml | ocaml | let rec ack x y =
if x <= 0 then y + 1 else
if y <= 0 then ack (x - 1) 1 else
ack (x - 1) (ack x (y - 1)) in
print_int (ack 3 10)
| |
c866a9d04fcdfa1d537ab6fcc8ea2c84ec66b1ae3f2ea26dde57a2a0059c7bef | techascent/tech.queue | task.clj | (ns tech.queue.task
"Generic things that can be executed on the queue. Uses keyword dispatch"
(:require [tech.queue.protocols :as q]))
(defn keyword->fn
[kwd]
(require (symbol (namespace kwd)))
(resolve (symbol (namespace kwd) (name kwd))))
(defn msg->task-object
[context msg]
((keyword->fn (:tech.qu... | null | https://raw.githubusercontent.com/techascent/tech.queue/117d054de71fa3c3d93e718eb0c4ac209e62ff33/src/tech/queue/task.clj | clojure | Forward everything to something created via the message | (ns tech.queue.task
"Generic things that can be executed on the queue. Uses keyword dispatch"
(:require [tech.queue.protocols :as q]))
(defn keyword->fn
[kwd]
(require (symbol (namespace kwd)))
(resolve (symbol (namespace kwd) (name kwd))))
(defn msg->task-object
[context msg]
((keyword->fn (:tech.qu... |
46043416a3d51826e0bf018ec4422244f52d097958f593a4ba92fbb35fc3cd6a | kiranlak/austin-sbst | traceManager.ml | Copyright : , University College London , 2011
open Cil
let htToInsert : (int, instr list) Hashtbl.t = Hashtbl.create 100
let htToAppend : (int, instr list) Hashtbl.t = Hashtbl.create 50
module Log = LogManager
let newSid = ref (-2)
let reset() =
Hashtbl.clear htToInsert;
Hashtbl.clear htToAppend;
newSid :=... | null | https://raw.githubusercontent.com/kiranlak/austin-sbst/9c8aac72692dca952302e0e4fdb9ff381bba58ae/AustinOcaml/instrumentation/traceManager.ml | ocaml | Copyright : , University College London , 2011
open Cil
let htToInsert : (int, instr list) Hashtbl.t = Hashtbl.create 100
let htToAppend : (int, instr list) Hashtbl.t = Hashtbl.create 50
module Log = LogManager
let newSid = ref (-2)
let reset() =
Hashtbl.clear htToInsert;
Hashtbl.clear htToAppend;
newSid :=... | |
7bfdb5fbe9197e260b6360bb69a473a6337b9279a40d12b3901c7a8932dc8323 | pyrocat101/opal | intuitive.ml |
* Intuitive Language - Hackerrank FP Contest Challenge :
* -calculi-jun14/challenges/intuitive-language
*
* The language is case - INSENSITIVE !
*
* letter : : = [ a - zA - Z ]
* ident : : = < letter > ( < digit > | < letter > ) *
*
* kwd : : = function | is | of | assign | and | to | do | ... | null | https://raw.githubusercontent.com/pyrocat101/opal/ac495a4fc141cf843da74d223baecca47324acd4/examples/intuitive.ml | ocaml | ----------------------------- opal.ml START ------------------------------
------------------------------ opal.ml END -------------------------------
rational number
a c ac
- * - = --
b d bd
a c ad
- / - = --
b d bc
interpreter
parser
eval
parse & eval |
* Intuitive Language - Hackerrank FP Contest Challenge :
* -calculi-jun14/challenges/intuitive-language
*
* The language is case - INSENSITIVE !
*
* letter : : = [ a - zA - Z ]
* ident : : = < letter > ( < digit > | < letter > ) *
*
* kwd : : = function | is | of | assign | and | to | do | ... |
d9e6e0c60d8f6372b2a8fe80660faa4d4671427988dd7960315eeb141db73386 | mzp/min-caml | simm.ml | let f x =
x
| null | https://raw.githubusercontent.com/mzp/min-caml/cf1180792a2a0bc895ba17a0052e3b6f4a74e444/arch/llvm/simm.ml | ocaml | let f x =
x
| |
5459c4bf36b26595b0039756d367778101112143168029aaae84daa3506149a5 | mbutterick/sugar | include.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/path-spec
racket/private/increader
compiler/cm-accomplice
racket/match racket/function)
"../define.rkt")
(provide+safe include-without-lang-line)
(define-syntax (do-in... | null | https://raw.githubusercontent.com/mbutterick/sugar/990b0b589274a36a58e27197e771500c5898b5a2/sugar/unstable/include.rkt | racket | Open the included file
Read expressions from file
Here's where we'll separate the content of the file from the #lang line.
the resulting material will be stored in 'content-guts'.
'content' is a list of syntax objects from the source file.
Each object corresponds to a top-level expression in the file, converted t... | #lang racket/base
(require (for-syntax racket/base
syntax/path-spec
racket/private/increader
compiler/cm-accomplice
racket/match racket/function)
"../define.rkt")
(provide+safe include-without-lang-line)
(define-syntax (do-in... |
8b4255855353f979596ee712c230fcaa9d65f90035727bdd09789ec54cf9a336 | dmitryvk/cl-gtk2 | gtk.tree-model.lisp | (in-package :gtk)
(define-vtable ("GtkTreeModel" tree-model)
(:skip parent-instance g-type-interface)
;;some signals
(:skip tree-model-row-changed :pointer)
(:skip tree-model-row-inserted :pointer)
(:skip tree-model-row-has-child-toggled :pointer)
(:skip tree-model-row-deleted :pointer)
(:skip tree-model... | null | https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/gtk/gtk.tree-model.lisp | lisp | some signals
methods
signal
methods
TODO: GtkTreeModelFilter | (in-package :gtk)
(define-vtable ("GtkTreeModel" tree-model)
(:skip parent-instance g-type-interface)
(:skip tree-model-row-changed :pointer)
(:skip tree-model-row-inserted :pointer)
(:skip tree-model-row-has-child-toggled :pointer)
(:skip tree-model-row-deleted :pointer)
(:skip tree-model-rows-reordered :... |
8cf5027201cfe1437781a194262a3a27a5bf9ad7cc60e6884b48f4058f42b657 | ssomayyajula/refinery | propLexer.ml | # 1 "propLexer.mll"
open PropParser
# 6 "propLexer.ml"
let __ocaml_lex_tables = {
Lexing.lex_base =
"\000\000\245\255\246\255\062\000\000\000\000\000\001\000\001\000\
\252\255\253\255\254\255\001\000\251\255\250\255\249\255\000\000\
\000\000\000\000\248\255";
Lexing.lex_backtrk =
"\255\255\255\... | null | https://raw.githubusercontent.com/ssomayyajula/refinery/2be3e85e25d40e0172cfa82e6352d78a95b342a6/propLexer.ml | ocaml | # 1 "propLexer.mll"
open PropParser
# 6 "propLexer.ml"
let __ocaml_lex_tables = {
Lexing.lex_base =
"\000\000\245\255\246\255\062\000\000\000\000\000\001\000\001\000\
\252\255\253\255\254\255\001\000\251\255\250\255\249\255\000\000\
\000\000\000\000\248\255";
Lexing.lex_backtrk =
"\255\255\255\... | |
307d9565e08fe72b1ab50a82019eecd941bab47867e95246e558603df3b68f24 | jfrederickson/dotfiles | services.scm | (use-modules
(gnu services shepherd)
(gnu packages wm))
(define kanshi-service
(shepherd-service
(provision '(kanshi))
(start #~(make-forkexec-constructor
(list #$(file-append kanshi "/bin/kanshi"))))
(stop #~(make-kill-destructor))))
| null | https://raw.githubusercontent.com/jfrederickson/dotfiles/12476f2e719d2274bbdcc43a97b336fab53f84ff/guix/guix/home/services.scm | scheme | (use-modules
(gnu services shepherd)
(gnu packages wm))
(define kanshi-service
(shepherd-service
(provision '(kanshi))
(start #~(make-forkexec-constructor
(list #$(file-append kanshi "/bin/kanshi"))))
(stop #~(make-kill-destructor))))
| |
ea24eac298daa9ea811cbd1c4fce4906fd4282a92a2f701358764a360600c8d3 | williamleferrand/accretio | basics.ml | (* basics.ml *)
open Lwt
open Printf
open CalendarLib
open Api
open Eliom_content.Html5
open Eliom_content.Html5.D
open Message_parsers
let alert_supervisor context () =
context.log_info "alerting supervisor, manual action is needed" ;
lwt _ =
context.message_supervisor
~subject:"Manual action is ne... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/playbooks/basics.ml | ocaml | basics.ml |
open Lwt
open Printf
open CalendarLib
open Api
open Eliom_content.Html5
open Eliom_content.Html5.D
open Message_parsers
let alert_supervisor context () =
context.log_info "alerting supervisor, manual action is needed" ;
lwt _ =
context.message_supervisor
~subject:"Manual action is needed"
~con... |
11ecfd91e803f3906245ac9d5e78d9db232d843e2fc4eb0e5f556a6f8a5c9bfb | brainsickcc/bscc | Token.hs | Copyright © 2012
-- This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
-- This program is distributed in th... | null | https://raw.githubusercontent.com/brainsickcc/bscc/f47a83f5c77d0ef483e957032715ac4007fcb44d/Bscc/Token.hs | haskell | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General ... | Copyright © 2012
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
| Tokens are produced by lexical analysis ( " Bscc . ) and consumed
... |
3a5c5695255144cad48064ca319c3456cd94fc38df8e628e1ebaeea36a04ccbf | obsidiansystems/hydra-pay | Api.hs | # LANGUAGE TemplateHaskell #
module HydraPay.Api where
import Data.Map
import Data.Int
import GHC.Generics
import Data.Aeson as Aeson
import qualified Data.Text as T
import Control.Applicative((<|>))
import Control.Lens.TH
import Data.Fixed (Pico)
import Hydra.Types
import Hydra.ServerOutput as ServerOutput
import ... | null | https://raw.githubusercontent.com/obsidiansystems/hydra-pay/263ccf817c5ed447b1bb2f433253b0cde749082a/common/src/HydraPay/Api.hs | haskell | This is the API json type that we need to send back out
^ Anytime a command fails
| State the head can be in, progressing linearly though the states.
^ Kills network and removes head
Amount of addresses
| Information about the managed proxy-address
for a specific address | # LANGUAGE TemplateHaskell #
module HydraPay.Api where
import Data.Map
import Data.Int
import GHC.Generics
import Data.Aeson as Aeson
import qualified Data.Text as T
import Control.Applicative((<|>))
import Control.Lens.TH
import Data.Fixed (Pico)
import Hydra.Types
import Hydra.ServerOutput as ServerOutput
import ... |
85f4e76d37f0517745f199fe8b4077e13532ddb47392fc75f65b369ebfb3845d | generateme/fastmath | f.clj | (ns fastmath.fields.f
(:require [fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v]
[fastmath.fields.utils :as u])
(:import [fastmath.vector Vec2]))
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn fdisc
([] {:type :regular
:co... | null | https://raw.githubusercontent.com/generateme/fastmath/820d9e5c432441465d5d6576d4a583677a3bd84f/src/fastmath/fields/f.clj | clojure | (ns fastmath.fields.f
(:require [fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v]
[fastmath.fields.utils :as u])
(:import [fastmath.vector Vec2]))
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn fdisc
([] {:type :regular
:co... | |
b00ca76a10b67a88ae5840c864986cb6e99f2c161face4e0e8a997736b8dd01e | georgegarrington/Syphon | Primitive.hs | module Transpile.Primitive where
import Data.Maybe
import AST.Definition
import AST.Module
import Transpile.Expression
import Transpile.Subscribe2
import Transpile.Function
Reducer in React hook ca n't be a curried function so we have to do this specific syntax
writeUpdateFn :: Dfn -> Module -> String
writeUpdateF... | null | https://raw.githubusercontent.com/georgegarrington/Syphon/402a326b482e3ce627a15b651b3097c2e09e8a53/src/Transpile/Primitive.hs | haskell | Given the view definition and (maybe) a subscribe block definition, write the react component
The view function | module Transpile.Primitive where
import Data.Maybe
import AST.Definition
import AST.Module
import Transpile.Expression
import Transpile.Subscribe2
import Transpile.Function
Reducer in React hook ca n't be a curried function so we have to do this specific syntax
writeUpdateFn :: Dfn -> Module -> String
writeUpdateF... |
a4edb8bb068fd797906acc3a8d4d00556cfcf2bf7c0cbd0f40b956261fcf42aa | realworldocaml/book | ppx_string.ml | open Base
open Ppxlib
open Ast_builder.Default
module Where = struct
type t =
| Imprecise of Location.t
| Precise of { mutable position : position }
let is_precise = function
| Imprecise _ -> false
| Precise _ -> true
;;
let advance position char =
let pos_cnum = position.pos_cnum + 1 in
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_string/src/ppx_string.ml | ocaml | open Base
open Ppxlib
open Ast_builder.Default
module Where = struct
type t =
| Imprecise of Location.t
| Precise of { mutable position : position }
let is_precise = function
| Imprecise _ -> false
| Precise _ -> true
;;
let advance position char =
let pos_cnum = position.pos_cnum + 1 in
... | |
7cd6230d3f3492c40cb1f13df4af2e3918478393c546cef76aa7a36fa271266f | thi-ng/demos | ex02.clj | (ns ws-ldn-10.ex02
(:require
[thi.ng.math.core :as m]
[thi.ng.geom.core :as g]
[thi.ng.geom.vector :as v]
[thi.ng.geom.circle :as c]
[thi.ng.geom.svg.core :as svg]
[thi.ng.color.core :as col]
[piksel.core :as pix]))
(defn svg-doc
[width body]
(->> body
(svg/svg {:width width :height w... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-10/src/clj/ws_ldn_10/ex02.clj | clojure | iterative system: f(x+1) = f(f(x))
-2.726 -2.082 -2.239 -2.340 | (ns ws-ldn-10.ex02
(:require
[thi.ng.math.core :as m]
[thi.ng.geom.core :as g]
[thi.ng.geom.vector :as v]
[thi.ng.geom.circle :as c]
[thi.ng.geom.svg.core :as svg]
[thi.ng.color.core :as col]
[piksel.core :as pix]))
(defn svg-doc
[width body]
(->> body
(svg/svg {:width width :height w... |
9f017da227ffb379ef80754d7753fd61d8edd9c6c0524d380dc837686b460181 | HealthSamurai/ci3 | core_test.clj | (ns ci3.core-test
(:require [clojure.test :refer :all]
[ci3.core :refer :all]))
| null | https://raw.githubusercontent.com/HealthSamurai/ci3/d14a459e677a1f2d89c5df5f09276059f6debccd/test/ci3/core_test.clj | clojure | (ns ci3.core-test
(:require [clojure.test :refer :all]
[ci3.core :refer :all]))
| |
480bd299de512dbca1c63adae08fd1f5c2b588c1bb053a909897cec15e270bc3 | scsibug/hS3 | AWSConnection.hs | -----------------------------------------------------------------------------
-- |
-- Module : Network.AWS.AWSConnection
Copyright : ( c ) 2007
-- License : BSD3
--
Connection and authentication info for an Amazon AWS request .
----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/scsibug/hS3/ca0c0a4f48f2343324fce94da9c30a8718db7905/Network/AWS/AWSConnection.hs | haskell | ---------------------------------------------------------------------------
|
Module : Network.AWS.AWSConnection
License : BSD3
---------------------------------------------------------------------------
* Constants
* Function Types
* Data Types
and authenticate requests.
^ Service provider hostna... | Copyright : ( c ) 2007
Connection and authentication info for an Amazon AWS request .
module Network.AWS.AWSConnection (
defaultAmazonS3Host, defaultAmazonS3Port,
amazonS3Connection, amazonS3ConnectionFromEnv,
AWSConnection(..)
) where
import System.Environment
| An Amazon Web Services connec... |
61f867961ea595cdabd9be940d0ad1ec2613ceb48e8f62c8cca742c960849dcb | nikita-volkov/postgresql-binary | Main.hs | module Main where
import Criterion
import Criterion.Main
import qualified PostgreSQL.Binary.Decoding as D
import qualified PostgreSQL.Binary.Encoding as E
import Prelude
main =
defaultMain
[ b "bool" D.bool ((E.encodingBytes . E.bool) True),
b "int2" (D.int :: D.Value Int16) ((E.encodingBytes . E.int2_int... | null | https://raw.githubusercontent.com/nikita-volkov/postgresql-binary/406cb9a69890eaa92f5aa69092c93e95fc1e0c89/decoding/Main.hs | haskell | module Main where
import Criterion
import Criterion.Main
import qualified PostgreSQL.Binary.Decoding as D
import qualified PostgreSQL.Binary.Encoding as E
import Prelude
main =
defaultMain
[ b "bool" D.bool ((E.encodingBytes . E.bool) True),
b "int2" (D.int :: D.Value Int16) ((E.encodingBytes . E.int2_int... | |
ceb95315c7945a0a4983c3fbf538822d5f786f4ec8ca1c454819f92698a79817 | ewestern/geos | STRTreeSpec.hs | module Data.Geometry.Geos.STRTreeSpec where
import Data.Either
import qualified Data.Vector as V
import qualified Data.Geometry.Geos.STRTree as STR
import Data.Geometry.Geos.Geometry
import Test.Hspec
strSpec = describe "STRTree" $ do
describe "fromList" $ do
it "should correctly build an STRTree" $ d... | null | https://raw.githubusercontent.com/ewestern/geos/3568c3449efe180bd89959c9247d4667137662b6/tests/Data/Geometry/Geos/STRTreeSpec.hs | haskell | module Data.Geometry.Geos.STRTreeSpec where
import Data.Either
import qualified Data.Vector as V
import qualified Data.Geometry.Geos.STRTree as STR
import Data.Geometry.Geos.Geometry
import Test.Hspec
strSpec = describe "STRTree" $ do
describe "fromList" $ do
it "should correctly build an STRTree" $ d... | |
181e54d720698b9b42c3e96fd354c0af722f047c455603a7cda8e3c6cf1d0047 | junjihashimoto/hugs-js | sort.hs | import Data.List(sort)
import Control.Monad(forM_)
main = do
str <- readFile "sort.hs"
let lstr = sort $ lines str
forM_ lstr putStrLn
| null | https://raw.githubusercontent.com/junjihashimoto/hugs-js/5a38dbe8310b5d56746ec83c24f7a9f520fbdcd3/npm-sample/sort.hs | haskell | import Data.List(sort)
import Control.Monad(forM_)
main = do
str <- readFile "sort.hs"
let lstr = sort $ lines str
forM_ lstr putStrLn
| |
d42b1b19c3bd49bd32999ab01ece8fe952eeade16948f119fbda648a5afc6a1a | Clojure2D/clojure2d-examples | M_4_1_01.clj | (ns GG.M.M-4-1-01
(:require [clojure2d.core :refer :all]
[fastmath.vector :as v]
[fastmath.random :as r]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const w 600)
(def ^:const h 600)
(def ^:cons... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/M/M_4_1_01.clj | clojure | (ns GG.M.M-4-1-01
(:require [clojure2d.core :refer :all]
[fastmath.vector :as v]
[fastmath.random :as r]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const w 600)
(def ^:const h 600)
(def ^:cons... | |
29fad0e284b1c3f64abebefc774901bc69604f5294a1f0356333582c604b3879 | ghc/ghc | GhcInGhci.hs | module Settings.Flavours.GhcInGhci (ghcInGhciFlavour) where
import qualified Data.Set as Set
import Expression
import Flavour
import Oracles.Flag
import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
ghcInGhciFlavour :: Flavour
ghcInGhciFlavour = defaultFlavour
{ name ... | null | https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/hadrian/src/Settings/Flavours/GhcInGhci.hs | haskell | # SOURCE #
Please update doc/flavours.md when changing this file. | module Settings.Flavours.GhcInGhci (ghcInGhciFlavour) where
import qualified Data.Set as Set
import Expression
import Flavour
import Oracles.Flag
ghcInGhciFlavour :: Flavour
ghcInGhciFlavour = defaultFlavour
{ name = "ghc-in-ghci"
, args = defaultBuilderArgs <> ghciArgs <> defaultPackageArgs
... |
cb69f855f917c77ce91ef4860ab4ae554a93189dabb36cf52623451f09a99853 | MagnusS/okra | test_filter.ml |
* Copyright ( c ) 2021 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE... | null | https://raw.githubusercontent.com/MagnusS/okra/13f473baae1e8490887bde156f7bb238ef7c645e/test/test_filter.ml | ocaml |
* Copyright ( c ) 2021 < >
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE... | |
471b89c8c6b91ada424a077f62b44fec78ece9c7ea1be68d562dc4f727c2aec7 | slagyr/gaeshi | version.clj | (ns gaeshi.kuzushi.version
(:require
[clojure.string :as str]))
(def major 0)
(def minor 10)
(def tiny 0)
(def snapshot false)
(def string
(str
(str/join "." (filter identity [major minor tiny]))
(if snapshot "-SNAPSHOT" "")))
(def summary (str "gaeshi/lein-gaeshi " string))
(def gaeshi-version "0.10.... | null | https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/lein-gaeshi/src/gaeshi/kuzushi/version.clj | clojure | (ns gaeshi.kuzushi.version
(:require
[clojure.string :as str]))
(def major 0)
(def minor 10)
(def tiny 0)
(def snapshot false)
(def string
(str
(str/join "." (filter identity [major minor tiny]))
(if snapshot "-SNAPSHOT" "")))
(def summary (str "gaeshi/lein-gaeshi " string))
(def gaeshi-version "0.10.... | |
477182fbed052f18d4ba004a734ed562f3425f1a9c8ce866970bcf919163ac15 | Octachron/codept | NAME__a.ml | open Main
open B
open C
open M
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/namespaced/NAME__a.ml | ocaml | open Main
open B
open C
open M
| |
4acebfccaf56d5983fb21e5624a76cdd5d8ffd72b81ad26c5e7d85e0503ab78b | radian-software/kalyn | Primitives.hs | module Primitives where
import Assembly
import OS
import Subroutines
-- -syscall-table/
see also section 2 of the Linux man pages
basicOp :: String -> BinOp -> Stateful VirtualFunction
basicOp name op = do
temp <- newTemp
return $ function
(name ++ "__uncurried")
[ OP MOV ... | null | https://raw.githubusercontent.com/radian-software/kalyn/03d279eee4cf73cd355ed7a13c46340fbb15540b/src/Primitives.hs | haskell | -syscall-table/
write
unlink
open
write
close
chmod
getcwd
open
read
close
write
exit | module Primitives where
import Assembly
import OS
import Subroutines
see also section 2 of the Linux man pages
basicOp :: String -> BinOp -> Stateful VirtualFunction
basicOp name op = do
temp <- newTemp
return $ function
(name ++ "__uncurried")
[ OP MOV $ MR (getArg 2) tem... |
fcd4d692fef6f895c0502e91819583282a32af45383f37aedac492031de1988b | Incubaid/arakoon | arakoon_exc.ml |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribut... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/client/arakoon_exc.ml | ocaml |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distribut... | |
4932c26e2f52cc9b82f95a83d23b0f4ec065caf7da6beda8e9f6feffce492b7b | programaker-project/Programaker-Core | automate_mail_app.erl | %%%-------------------------------------------------------------------
%% @doc automate_mail app API
%% @end
%%%-------------------------------------------------------------------
-module(automate_mail_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%============================... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_mail/src/automate_mail_app.erl | erlang | -------------------------------------------------------------------
@doc automate_mail app API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
=====================================================... |
-module(automate_mail_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
{ok, self()}.
stop(_State) ->
ok.
Internal functions
|
95c275425dc57b1fed0c28a6186ac1b7910cf3e557eba4ec3f703433d386d7f3 | AdaCore/why3 | gnat_ast.ml | (* -*- mode: tuareg -*- *)
(* This package is automatically generated by xtree. Do not edit manually. *)
[@@@warning "-42"]
(* TODO Use appropriate OCaml integer type *)
type uint = Uint of string
type ureal = Ureal of { numerator : uint ; denominator : uint; base : int; negative : bool }
GNAT
type source_ptr =
... | null | https://raw.githubusercontent.com/AdaCore/why3/97be0f6354f4c5a85896746847192d828cc462d6/plugins/gnat_json/gnat_ast.ml | ocaml | -*- mode: tuareg -*-
This package is automatically generated by xtree. Do not edit manually.
TODO Use appropriate OCaml integer type
Kind tags
Class tags
Kind nodes
Class nodes
Tag coercions
Class coercions
Opaque tags from json
Opaque classes from json |
[@@@warning "-42"]
type uint = Uint of string
type ureal = Ureal of { numerator : uint ; denominator : uint; base : int; negative : bool }
GNAT
type source_ptr =
| No_location
| Source_ptr of { filename: string; line: int }
type node_id = Node_id
GNATCOLL.Symbols
type symbol = No_symbol | Symbol of string
... |
7f933f023eb810d0d6531c1515ab994e2b5e0e5aaf38acfecc8f214eda66c275 | janestreet/lwt-async | lwt_timeout.ml | Lightweight thread library for
* Module Lwt_timeout
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the ... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/unix/lwt_timeout.ml | ocaml | **
**
XXX Should probably report any exception | Lightweight thread library for
* Module Lwt_timeout
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the ... |
721950b988f61036947bbc162d9ba945fdfb7df7584b7093dbd932f4f40787b7 | Cumulus/Cumulus | db.ml |
Copyright ( c ) 2012
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
use , copy , modify , merge , publish , dis... | null | https://raw.githubusercontent.com/Cumulus/Cumulus/3b6de05d76c57d528e052aa382f98e40354cf581/src/base/db/db.ml | ocaml | * Debugging
let log = Some Pervasives.stdout |
Copyright ( c ) 2012
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
use , copy , modify , merge , publish , dis... |
01ae4e87ea00ad11ead97ec70c93779e734c5c45f7d0ca30ea8c039f79dd79e5 | dQuadrant/cardano-marketplace | Core.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
module Cardano.Marketplace.V2.Core where
import Cardano.Api
import... | null | https://raw.githubusercontent.com/dQuadrant/cardano-marketplace/9c0ff5efe306ff6b0332e06b33b46ef8f5351beb/marketplace-core/Cardano/Marketplace/V2/Core.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE NumericUnderscores #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
module Cardano.Marketplace.V2.Core where
import Cardano.Api
import Cardano.Api.Shelley (ProtocolParameters, ReferenceScript (Reference... |
bc31f9d07f13553db374466841ba93bcfab7cd2eab1b40953747dbdd6b833d46 | scrintal/heroicons-reagent | bars_arrow_up.cljs | (ns com.scrintal.heroicons.outline.bars-arrow-up)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/bars_arrow_up.cljs | clojure | (ns com.scrintal.heroicons.outline.bars-arrow-up)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | |
d948419a3ea1841fa13311ec8da18da972b67946889749a630435ee83859f09c | MyDataFlow/ttalk-server | mod_shared_roster_ldap.erl | %%%-------------------------------------------------------------------
File :
%%% Author : Realloc <>
< >
< >
%%% Description : LDAP shared roster management
Created : 5 Mar 2005 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2013 ProcessOne
%%%
%%% This program is fr... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_shared_roster_ldap.erl | erlang | -------------------------------------------------------------------
Author : Realloc <>
Description : LDAP shared roster management
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but... | File :
< >
< >
Created : 5 Mar 2005 by < >
ejabberd , Copyright ( C ) 2002 - 2013 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GN... |
3cb2d6b1c2ea30a69ef1c8cd977972762ff54081747169ebf25b5e239fd7c5cf | openbadgefactory/salava | pdf.clj | (ns salava.badge.pdf
(:require [yesql.core :refer [defqueries]]
[salava.core.time :refer [unix-time date-from-unix-time]]
[salava.core.i18n :refer [t]]
[salava.core.helper :refer [dump private?]]
[salava.badge.evidence :refer [badge-evidence]]
[salava.badge.... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/badge/pdf.clj | clojure | : spacer { : extra - starting - value 1 : allow - extra - line - breaks ? true : single - value 2 }
:register-system-fonts? true})
[:spacer 0] | (ns salava.badge.pdf
(:require [yesql.core :refer [defqueries]]
[salava.core.time :refer [unix-time date-from-unix-time]]
[salava.core.i18n :refer [t]]
[salava.core.helper :refer [dump private?]]
[salava.badge.evidence :refer [badge-evidence]]
[salava.badge.... |
7c9a98910d00aa0c4838815318c275bf4ec109c7817a968dcc6c929476c2aab2 | coq/coq | vcs.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/92b9d3ca9928e8332ac81175272e8e4489961d71/stm/vcs.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
87cde6ead0a6d87046a8b9f73b9b8bd1ec5e8071cec98a06ffd23f3b65187065 | cyborgize/es-cli | es.ml | open Devkit
open ExtLib
open Printf
module J = Yojson.Safe
module SS = Set.Make(String)
let log = Log.from "es"
let http_timeout = ref (Time.seconds 60)
type common_args = {
es_version : Config_t.version option;
verbose : bool;
}
let args =
ExtArg.[
"-T", String (fun t -> http_timeout := Time.of_compact_... | null | https://raw.githubusercontent.com/cyborgize/es-cli/fa757156fa08b9da7110dea4898952bf29160e64/src/es.ml | ocaml | FIXME what is repository?
FIXME what is snapshot?
FIXME what's the difference w/ files_total?
FIXME what's the difference w/ bytes_total?
Settings | open Devkit
open ExtLib
open Printf
module J = Yojson.Safe
module SS = Set.Make(String)
let log = Log.from "es"
let http_timeout = ref (Time.seconds 60)
type common_args = {
es_version : Config_t.version option;
verbose : bool;
}
let args =
ExtArg.[
"-T", String (fun t -> http_timeout := Time.of_compact_... |
61f1c50389fcb051838678df9ebc23138a4ab0217264799bdceccdf319f3a7d7 | snmsts/cl-langserver | slynk-indentation.lisp | (in-package :ls-base)
(defvar *application-hints-tables* '()
"A list of hash tables mapping symbols to indentation hints (lists
of symbols and numbers as per cl-indent.el). Applications can add hash
tables to the list to change the auto indentation sly sends to
emacs.")
(defun has-application-indentation-hint-p ... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/contrib/slynk-indentation.lisp | lisp | override slynk version of this function
More complex version.
If there was nothing interesting, don't return anything.
&BODY is &BODY, this is clear.
&KEY is tricksy. If it's at the base level, we want
to indent them normally:
(with-foo (var arg
:foo t
...)
&REST is tricksy. If it's at the... | (in-package :ls-base)
(defvar *application-hints-tables* '()
"A list of hash tables mapping symbols to indentation hints (lists
of symbols and numbers as per cl-indent.el). Applications can add hash
tables to the list to change the auto indentation sly sends to
emacs.")
(defun has-application-indentation-hint-p ... |
42e5b4127d6010f14d70f382aaa2b175d993ef4155c0ccd2c481acf5a0ed649c | HealthSamurai/dojo.clj | model.cljc | (ns app.rest.model
(:require
[re-frame.core :as rf]
[app.routes :refer [href]]))
(def page-key :rest/index)
(rf/reg-event-fx
page-key
(fn [{db :db} [_ phase params]]
(cond
(= :init phase)
{:db (assoc db page-key
{:title "DB"})}
(= :params phase)
{:db db}
(= :de... | null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/app/rest/model.cljc | clojure | (ns app.rest.model
(:require
[re-frame.core :as rf]
[app.routes :refer [href]]))
(def page-key :rest/index)
(rf/reg-event-fx
page-key
(fn [{db :db} [_ phase params]]
(cond
(= :init phase)
{:db (assoc db page-key
{:title "DB"})}
(= :params phase)
{:db db}
(= :de... | |
e1cae4ef1d7d3e0afa7f4c67db275eecf2da7d38dac8d3aec3fcf503831aec62 | grin-compiler/ghc-wpc-sample-programs | HTML.hs | {-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
|
Module : Text . Pandoc . Writers . HTML
Copyright : Copyright ( C ) 2006 - 2020
License : GNU GPL , version 2 or above
Maintainer : < ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Writers/HTML.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
^ List of notes
^ Math is used in document
^ <q> tag is used
^ Syntax highlighting is used
^ Use HTML5
^ EPUB version if for epub
^ Slide level
^ Content is in a section (revealjs)
^ Number of code block
Helpers to render HTML with the appropri... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
|
Module : Text . Pandoc . Writers . HTML
Copyright : Copyright ( C ) 2006 - 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Conversion of ... |
3fb74bf6157aea77da87ff930c51d3e482c4eefea009db61dc52113284e6b944 | kappelmann/eidi2_repetitorium_tum | ha11_sol.ml | open Ha11_angabe
module MakeHashMap (H : Hashable) : (Map with type key = H.key) = struct
type key = H.key
type 'v t = (key * 'v) list array
let create () = Array.make 37 []
let size hm =
Array.fold_left (fun acc bucket -> acc + List.length bucket) 0 hm
let filtered_bucket hm k =
let hash = (H.has... | null | https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/additional_exercises/2016_17/Blatt%2011%20L%C3%B6sungen/ocaml/ha11_sol.ml | ocaml | pre-order traversal: node, left, right | open Ha11_angabe
module MakeHashMap (H : Hashable) : (Map with type key = H.key) = struct
type key = H.key
type 'v t = (key * 'v) list array
let create () = Array.make 37 []
let size hm =
Array.fold_left (fun acc bucket -> acc + List.length bucket) 0 hm
let filtered_bucket hm k =
let hash = (H.has... |
2fdda4a89306c8930ed0ad09a3820707f7cbcdce436b7a1df0cbdfc364957173 | icicle-lang/icicle-ambiata | Statement.hs | | Statements and mutable accumulators ( variables ) for Avalanche
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Icicle.Avalanche.Statement.Statement (
Statement (..)
, Accumulator (..)
, FactBinds (..)
, ForeachTy... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Avalanche/Statement/Statement.hs | haskell | # LANGUAGE OverloadedStrings #
| Part of a loop
Branches
| An IF for filters
| Local binding, so the name better be unique
# UNPACK #
| A loop with some condition on an accumulator.
# UNPACK #
| A loop over some ints
# UNPACK #
| A loop over all the facts.
This should only occur once in the program, and not ins... | | Statements and mutable accumulators ( variables ) for Avalanche
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Icicle.Avalanche.Statement.Statement (
Statement (..)
, Accumulator (..)
, FactBinds (..)
, ForeachType (..)
, WhileType (..... |
bf1723e4d9bcdd52cd23305b4e985b6526d17ce393f2a070be42a325622021e2 | input-output-hk/hydra | MonitoringSpec.hs | # LANGUAGE TypeApplications #
module Hydra.Logging.MonitoringSpec where
import Hydra.Prelude
import Test.Hydra.Prelude
import qualified Data.Text as Text
import Hydra.API.ServerOutput (ServerOutput (SnapshotConfirmed))
import Hydra.BehaviorSpec (testHeadId)
import Hydra.HeadLogic (
Effect (ClientEffect),
Event (... | null | https://raw.githubusercontent.com/input-output-hk/hydra/3c7df6eb4ed246416e4562797b37da3d4c3c3f3a/hydra-node/test/Hydra/Logging/MonitoringSpec.hs | haskell | # LANGUAGE TypeApplications #
module Hydra.Logging.MonitoringSpec where
import Hydra.Prelude
import Test.Hydra.Prelude
import qualified Data.Text as Text
import Hydra.API.ServerOutput (ServerOutput (SnapshotConfirmed))
import Hydra.BehaviorSpec (testHeadId)
import Hydra.HeadLogic (
Effect (ClientEffect),
Event (... | |
a319eb40548dd5c77346c13f234d2dd3903b5a626c68d5200468f9ca9ddd6c02 | ragkousism/Guix-on-Hurd | glib.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2013 , 2015 < >
Copyright © 2013 < >
Copyright © 2014 , 2015 , 2016 , 2017 < >
Copyright © 2016 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free s... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/glib.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2013 , 2015 < >
Copyright © 2013 < >
Copyright © 2014 , 2015 , 2016 , 2017 < >
Copyright © 2016 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU G... |
bb3db93ea87361b86dcb427d20b14a2fa05ee23d887c9ee4d4c71a60683ded92 | audreyt/openafp | MDD.hs |
module OpenAFP.Records.AFP.MDD where
import OpenAFP.Types
import OpenAFP.Internals
data MDD = MDD {
mdd_Type :: !N3
,mdd_ :: !N3
,mdd :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/MDD.hs | haskell |
module OpenAFP.Records.AFP.MDD where
import OpenAFP.Types
import OpenAFP.Internals
data MDD = MDD {
mdd_Type :: !N3
,mdd_ :: !N3
,mdd :: !NStr
} deriving (Show, Typeable)
| |
b6b6347863c88ff25e07fd51d498e16f49c5de5e60de6920c5bd0b7633f01be1 | ddssff/refact-global-hse | Utils.hs | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts , FlexibleInstances , RankNTypes , ScopedTypeVariables #
module Utils where
import Control.Exception (SomeException, throw)
import Control.Exception.Lifted as IO (... | null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/input/rgh/Utils.hs | haskell | (Pretty)
| Do a hard reset of all the files of the repository containing the
working directory.
| Do a hard reset of all the files of a subdirectory within a git
repository. (Does this every throw an exception?)
| Determine whether the repository containing the working directory
is in a clean state.
| Print a ... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts , FlexibleInstances , RankNTypes , ScopedTypeVariables #
module Utils where
import Control.Exception (SomeException, throw)
import Control.Exception.Lifted as IO (... |
1920d2e039f392fd7db4045a6de4d28879ed9253d366226f09a6caf2201edcd3 | projectcs13/sensor-cloud | analyse.erl | -module(analyse).
-export([forecast/1 , forecast/2 , init/0 , stop/0 , this/0 , get_analysis/2 ] ) .
-compile(export_all).
-include("webmachine.hrl").
-include("erlastic_search.hrl").
-define(INDEX, "sensorcloud").
-record(struct, {lst}).
< < " [ { \"value\ " : 3347 , \"date\ " : \"1995 - 06 - 09\ " } , { \"value\ "... | null | https://raw.githubusercontent.com/projectcs13/sensor-cloud/0302bd74b2e62fddbd832fb4c7a27b9c62852b90/src/analyse.erl | erlang | @doc
Function: allowed_methods/2
Purpose: Defines which HTTP methods are allowed
Returns: {List of allowed HTTP requests, string , string()}
@end
@doc
Function: content_types_provided/2
Purpose: based on the Accept header on a 'GET' request, we provide different media types to the client.
@end
@doc
Purpose: ... | -module(analyse).
-export([forecast/1 , forecast/2 , init/0 , stop/0 , this/0 , get_analysis/2 ] ) .
-compile(export_all).
-include("webmachine.hrl").
-include("erlastic_search.hrl").
-define(INDEX, "sensorcloud").
-record(struct, {lst}).
< < " [ { \"value\ " : 3347 , \"date\ " : \"1995 - 06 - 09\ " } , { \"value\ "... |
5227011c87ab8bc807cabb28fed098014b237148dc90cd6d2d873d125484af06 | Plutonomicon/plutarch-plutus | ByteStringSpec.hs | module Plutarch.ByteStringSpec (spec) where
import Data.ByteString qualified as BS
import Plutarch.Prelude
import Plutarch.Test
import Test.Hspec
# HLINT ignore spec " Monoid law , left identity " #
spec :: Spec
spec = do
describe "bytestring" . pgoldenSpec $ do
"empty" @| mempty #== phexByteStr "" @-> passert
... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/plutarch-test/tests/Plutarch/ByteStringSpec.hs | haskell | module Plutarch.ByteStringSpec (spec) where
import Data.ByteString qualified as BS
import Plutarch.Prelude
import Plutarch.Test
import Test.Hspec
# HLINT ignore spec " Monoid law , left identity " #
spec :: Spec
spec = do
describe "bytestring" . pgoldenSpec $ do
"empty" @| mempty #== phexByteStr "" @-> passert
... | |
e885d52c2ac784120e59bdd247c8d784e1473f4b7027a308bc31226643c3df7a | input-output-hk/cardano-ledger-byron | Protocol.hs | module Cardano.Chain.Byron.API.Protocol (
previewDelegationMap
) where
import Cardano.Prelude
import qualified Cardano.Chain.Block as CC
import qualified Cardano.Chain.Delegation as Delegation
import qualified Cardano.Chain.Delegation.Validation.Interface... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Byron/API/Protocol.hs | haskell | | Preview the delegation map at a slot assuming no new delegations are
| scheduled. | module Cardano.Chain.Byron.API.Protocol (
previewDelegationMap
) where
import Cardano.Prelude
import qualified Cardano.Chain.Block as CC
import qualified Cardano.Chain.Delegation as Delegation
import qualified Cardano.Chain.Delegation.Validation.Interface... |
7f3ba11960d4cc8d820a972271d59d2a2e0b61cd7a4305eb13c3cda24b84f16c | ocaml-multicore/ocaml-tsan | arg.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/stdlib/arg.ml | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type key = string
type doc = string
type usage_msg = string
type anon_fun = (string -> unit)
type spec =
... |
51a717f27e2d91c0f2fc022c192908d50f247276923538ed606b5876003537ca | ashinn/chibi-scheme | sha2-native.scm | ;; sha2-native.scm -- SHA-2 digest algorithms native interface
Copyright ( c ) 2015 . All rights reserved .
;; BSD-style license:
(define (process-sha-data! context src)
(cond ((or (bytevector? src) (string? src))
(add-sha-data! context src))
((input-port? src)
(let lp ((chunk (read-... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/crypto/sha2-native.scm | scheme | sha2-native.scm -- SHA-2 digest algorithms native interface
BSD-style license: | Copyright ( c ) 2015 . All rights reserved .
(define (process-sha-data! context src)
(cond ((or (bytevector? src) (string? src))
(add-sha-data! context src))
((input-port? src)
(let lp ((chunk (read-bytevector 1024 src)))
(unless (eof-object? chunk)
(add-sha-da... |
1f1ef9ebbe754c8dd4d1bdcf0a726d1155aad311736ffdca664345b1c105361e | haskell-compat/base-compat | Batteries.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
-- | Reexports "Data.Typeable.Compat"
-- from a globally unique namespace.
module Data.Typeable.Compat.Repl.Batteries (
module Data.Typeable.Compat
) where
import "this" Data.Typeable.Compat
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/e18c4664d784542505966a7610bbac43652afda6/base-compat-batteries/src/Data/Typeable/Compat/Repl/Batteries.hs | haskell | # LANGUAGE PackageImports #
| Reexports "Data.Typeable.Compat"
from a globally unique namespace. | # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
module Data.Typeable.Compat.Repl.Batteries (
module Data.Typeable.Compat
) where
import "this" Data.Typeable.Compat
|
bd47ca787eb6867d6ae86c451aee9c57fa6ab41b87b985c7a9b9db0bce9d77da | pookleblinky/lifescripts | attention.rkt | #lang racket
tiny proof of concept . What I want now is to simply choose , at random , one
;issue/news event to focus on at a time.
(require "../machinery/rng.rkt")
(provide boost-topic)
;; Now the hard part: seeding the topics list
(define topics
(list
'foo
'bar
'baz))
(define (boost-topic)
(de... | null | https://raw.githubusercontent.com/pookleblinky/lifescripts/eab3fe5aaf2c9f5ee9baaa441cb5d556cd7a3a78/social/attention.rkt | racket | issue/news event to focus on at a time.
Now the hard part: seeding the topics list | #lang racket
tiny proof of concept . What I want now is to simply choose , at random , one
(require "../machinery/rng.rkt")
(provide boost-topic)
(define topics
(list
'foo
'bar
'baz))
(define (boost-topic)
(define topic (randomchoice topics))
(printf "Today's topic to boost: ~a~n" topic))
|
552fdc343d2619dac47cd804f5ac096786b04224e2a1acd573deedc2b64d344c | let-def/ocaml-recovery-parser | ast_helper.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/let-def/ocaml-recovery-parser/87a87a25c9436f2e3187b82ec59a5f75c0e2446b/lib/ast_helper.mli | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Helpers to produce Parsetree fragments
{ b Warning } This module is unstable and part of
{ { ! ... |
3ce196aa240413b1d2fe6e953b42ef36e5d5abd7b39d0f9cd65091dd6cc467b6 | brandonbloom/wabt-clj | util.clj | (ns wabt-clj.util)
(defn fail
([msg] (fail msg {}))
([msg data]
(throw (ex-info msg data))))
(defmacro change! [var f & args]
`(set! ~var (~f ~var ~@args)))
(defn tap [x f]
(f x)
x)
| null | https://raw.githubusercontent.com/brandonbloom/wabt-clj/45b80fb05fc49d52ab117a699e9c56582a7078b3/src/wabt_clj/util.clj | clojure | (ns wabt-clj.util)
(defn fail
([msg] (fail msg {}))
([msg data]
(throw (ex-info msg data))))
(defmacro change! [var f & args]
`(set! ~var (~f ~var ~@args)))
(defn tap [x f]
(f x)
x)
| |
f1b8b514430ccc0b00749459138c336727178cfce43edfce78a9921058b841db | cirfi/sicp-my-solutions | 1.07.scm | (define (sqrt-iter guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x)
x)))
(define (improve guess x)
(average guess (/ x guess)))
(define (average x y)
(/ (+ x y) 2))
(define (sqrt x)
(sqrt-iter 1.0 x))
;;; new good-enough?
(define (good-enough? guess x)
(< (/ (abs (- (impro... | null | https://raw.githubusercontent.com/cirfi/sicp-my-solutions/4b6cc17391aa2c8c033b42b076a663b23aa022de/ch1/1.07.scm | scheme | new good-enough? | (define (sqrt-iter guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x)
x)))
(define (improve guess x)
(average guess (/ x guess)))
(define (average x y)
(/ (+ x y) 2))
(define (sqrt x)
(sqrt-iter 1.0 x))
(define (good-enough? guess x)
(< (/ (abs (- (improve guess x)
guess))... |
c13691f9c0f3fdd1ed57b45a505446f327f5d589ad48f9d7478cc6b6e0f704ba | symbiont-io/detsys-testkit | Executor.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NumericUnderscores #
module Scheduler.Executor where
import Control.Applicative ((<|>))
import Data.Aeson
import Data.Aeson.Types
import Data.Aeson.Parser
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8... | null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/54ac69babc84d92d3ad21b14cbba00f3d82efbee/src/runtime-prototype/src/Scheduler/Executor.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------
XXX: Ideally we want to use:
-1.5.5.1/docs/Data-Aeson-Parser.html#v:eitherDecodeWith
which gives an either, but as far as I can see there's no way to create a
type `(Value -> IResult a)` without `iparse`
which is ... | # LANGUAGE DeriveGeneric #
# LANGUAGE NumericUnderscores #
module Scheduler.Executor where
import Control.Applicative ((<|>))
import Data.Aeson
import Data.Aeson.Types
import Data.Aeson.Parser
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as LBS
import Data.Char (toLower)
... |
fe145897a1ff242e0329e7bd8c6068d4ca3501694349c59c9fdc2ef0373687a6 | PascalLG/nubo-hs | CmdList.hs | -----------------------------------------------------------------------------
Nubo Client Application
Copyright ( c ) 2018 ,
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the Software without... | null | https://raw.githubusercontent.com/PascalLG/nubo-hs/390212b73c31746f4ff03a3e341f92d657db0223/Client/src/CmdList.hs | haskell | ---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished ... | Nubo Client Application
Copyright ( c ) 2018 ,
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ... |
3c256cd2dc9e5aad4ddd371a96b29f1c09418cc0c275082af476ba274f4497de | gja/pwa-clojure | api.clj | (ns pwa-clojure.api
(:require [cheshire.core :as json]
[clojure.string :as str]
[pwa-clojure.server.data :as data]))
;; This namespace is super simple
(defn- api-response [body]
{:satus 200
:headers {"Content-Type" "application/json"}
:body (json/encode body)})
(defn- load-data-handl... | null | https://raw.githubusercontent.com/gja/pwa-clojure/a06450747c6ead439d1a74653a34afe415d8ef02/src-clj/pwa_clojure/api.clj | clojure | This namespace is super simple | (ns pwa-clojure.api
(:require [cheshire.core :as json]
[clojure.string :as str]
[pwa-clojure.server.data :as data]))
(defn- api-response [body]
{:satus 200
:headers {"Content-Type" "application/json"}
:body (json/encode body)})
(defn- load-data-handler [handler]
(fn [{:keys [route-... |
1adfa6d1a5e5c848e3f720720d7e06b7d26e93835d5c7264901051217535704c | Gopiandcode/gopcaml-mode | generic_parser.ml |
let interface buf =
(Parse.interface buf)
|> Migrate_parsetree.Migrate_409_410.copy_signature
|> Migrate_parsetree.Migrate_410_411.copy_signature
|> Migrate_parsetree.Migrate_411_412.copy_signature
|> Migrate_parsetree.Migrate_412_413.copy_signature
|> Migrate_parsetree.Migrate_413_414.copy_sig... | null | https://raw.githubusercontent.com/Gopiandcode/gopcaml-mode/9e3327786d2c8b6454e4218a153339a348cea781/parser/409/generic_parser.ml | ocaml |
let interface buf =
(Parse.interface buf)
|> Migrate_parsetree.Migrate_409_410.copy_signature
|> Migrate_parsetree.Migrate_410_411.copy_signature
|> Migrate_parsetree.Migrate_411_412.copy_signature
|> Migrate_parsetree.Migrate_412_413.copy_signature
|> Migrate_parsetree.Migrate_413_414.copy_sig... | |
8dbea61fd05afbb52e512a7fa0a2f1ec00029c13589b416bf56b228b532ee1d5 | futurice/haskell-mega-repo | H.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -freduction-depth=0 #-}
module Futurice.App.GitHubProxy.H (
H, runH,
) where
import Control.Monad.Operational (Program, interpretWithMonad, singleton)
imp... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/github-proxy/src/Futurice/App/GitHubProxy/H.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -freduction-depth=0 # | # LANGUAGE DataKinds #
module Futurice.App.GitHubProxy.H (
H, runH,
) where
import Control.Monad.Operational (Program, interpretWithMonad, singleton)
import Data.Aeson (FromJSON, object)
import Futurice.GitHub (requestToJSON)
import Futurice.Integrations.Classes (M... |
a6281b87006d07436d25e7080109c96845ce6717f60c3b3aeecdad8a593702cd | softlab-ntua/bencherl | dialyzer_cl_parse.erl | -*- erlang - indent - level : 2 -*-
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2011 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not u... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/dialyzer/src/dialyzer_cl_parse.erl | erlang | -----------------------------------------------------------------------
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Se... | -*- erlang - indent - level : 2 -*-
Copyright Ericsson AB 2006 - 2011 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-mod... |
c0690359617b69535227e24bd957b7eb26668a29ad17fb2d21df85d95a833ec6 | input-output-hk/marlowe-cardano | Test.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| Contract - testing commands in the CLI tool .
--
----------------------------------------------------------------... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/a64d953eef811081bb83c7055e7c5b8c7b902deb/marlowe-cli/src/Language/Marlowe/CLI/Command/Test.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
---------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
| Run a contract-testing command.
^ The command.
^ Action for running the co... | License : Apache 2.0
Portability : Portable
| Contract - testing commands in the CLI tool .
# LANGUAGE FlexibleContexts #
module Language.Marlowe.CLI.Command.Test
* CLI Commands
TestCommand
, parseTestCommand
, runTestCommand
) where
import Cardano.Api (IsShelleyBasedEra, NetworkId)
im... |
cb6e7c393e8183463887e1a8104aad9b20443d5045415c3d997044d85d7024e6 | exercism/common-lisp | example.lisp | (in-package :cl-user)
(defpackage :crypto-square
(:use :cl)
(:export :encipher))
(in-package :crypto-square)
(defun normalize (text)
(string-downcase (remove-if-not #'alphanumericp text)))
(defun matrix-transpose (matrix)
(let* ((dimensions (array-dimensions matrix))
(new-matrix (make-array (reverse ... | null | https://raw.githubusercontent.com/exercism/common-lisp/0bb38d1b126f7dc90d86f04c41479d4eaf35df74/exercises/practice/crypto-square/.meta/example.lisp | lisp | (in-package :cl-user)
(defpackage :crypto-square
(:use :cl)
(:export :encipher))
(in-package :crypto-square)
(defun normalize (text)
(string-downcase (remove-if-not #'alphanumericp text)))
(defun matrix-transpose (matrix)
(let* ((dimensions (array-dimensions matrix))
(new-matrix (make-array (reverse ... | |
449c893856d2d8f5bdca0115cde788d3686fbbbe1ebfdd71c7eb2781a1dde012 | anmonteiro/ocaml-h2 | status.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2017 Inhabited Type LLC .
* Copyright ( c ) 2019 .
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided th... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/1aea7e0aebb2c440dc35ef35ca15d87d44799f4e/lib/status.ml | ocaml | Note: The value for reason phrases is never actually serialized to the
* input or output channels.
*
* From RFC7540§8.1.2.4:
* HTTP/2 does not define a way to carry the version or reason phrase that is
* included in an HTTP/1.1 status line. | ----------------------------------------------------------------------------
* Copyright ( c ) 2017 Inhabited Type LLC .
* Copyright ( c ) 2019 .
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.