_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 |
|---|---|---|---|---|---|---|---|---|
3e0c917c2f95419cd40443fb321b0aad074bb56eec4467db3782e3c1d9398a73 | lachenmayer/arrowsmith | Types.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
module Arrowsmith.Types where
import Data.Aeson.TH
import qualified Data.ByteString as BS
import Data.Hashable
import Data.HashMap.Strict
import qualified Data.FileStore
import Data.List (inte... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/backend/Arrowsmith/Types.hs | haskell | Editor
TODO add ranges
start
end
Re-implementation of elm-compiler:AST.Variable.Listing
Re-implementation of elm-compiler:AST.Module.ImportMethod
relative to project root
Serving
{ _projects :: IORef ProjectsMap
}
makeLenses ''App | # LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
module Arrowsmith.Types where
import Data.Aeson.TH
import qualified Data.ByteString as BS
import Data.Hashable
import Data.HashMap.Strict
import qualified Data.FileStore
import Data.List (inte... |
bec9f50b7803dfe16c84445d540e8a46dba8f6dc6a4d9309103993f3616b13d2 | runtimeverification/haskell-backend | Resolvers.hs | module Test.Kore.IndexedModule.Resolvers (
test_resolvers,
test_resolver_undefined_messages,
) where
import Data.Default
import Data.List qualified as List
import Data.Map.Strict (
Map,
)
import Data.Map.Strict qualified as Map
import Data.Ord qualified
import Kore.Attribute.Function (
Function (..),
... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/7e0d12bef597158073a5d273185096828bd68300/kore/test/Test/Kore/IndexedModule/Resolvers.hs | haskell | TODO: Find out how to compose functions like the following
out of Test.Terse primitives. Is there a clean way to
do testcase nesting? | module Test.Kore.IndexedModule.Resolvers (
test_resolvers,
test_resolver_undefined_messages,
) where
import Data.Default
import Data.List qualified as List
import Data.Map.Strict (
Map,
)
import Data.Map.Strict qualified as Map
import Data.Ord qualified
import Kore.Attribute.Function (
Function (..),
... |
3fb2010bd8817bd73d8210b1af053e27f6ac3a65f7ce90dc1cdc258b58d0b439 | lipas-liikuntapaikat/lipas | components.cljs | (ns lipas.ui.components
(:require
[lipas.ui.components.selects :as selects]
[lipas.ui.components.tables :as tables]
[lipas.ui.components.buttons :as buttons]
[lipas.ui.components.autocompletes :as autocompletes]
[lipas.ui.components.dialogs :as dialogs]
[lipas.ui.components.text-fields :as text-fiel... | null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/02452fd4f9e93e0b4c844d8bb600a50aa9b3be71/webapp/src/cljs/lipas/ui/components.cljs | clojure | Components ;;; | (ns lipas.ui.components
(:require
[lipas.ui.components.selects :as selects]
[lipas.ui.components.tables :as tables]
[lipas.ui.components.buttons :as buttons]
[lipas.ui.components.autocompletes :as autocompletes]
[lipas.ui.components.dialogs :as dialogs]
[lipas.ui.components.text-fields :as text-fiel... |
3da56fbcc61ed7aad460956bb2df27481fdae0d5829e7dc7850e1591693fc7fb | haskellari/microstache | Microstache.hs | -- |
-- Module : Text.Microstache
Copyright : © 2016–2017 Stack Builders
License : BSD 3 clause
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
This is a implementation of Mustache templates . The
implementation conforms to the version 1.1.3 of offici... | null | https://raw.githubusercontent.com/haskellari/microstache/b5ffba1ff12b6b566ec3de8cff494c7912856d8a/src/Text/Microstache.hs | haskell | |
Module : Text.Microstache
Stability : experimental
Portability : portable
functions to compile templates (from directory, from file, and from lazy
text) and one to render them.
the end user.
available in the "Text.Microstache.Compile.TH" module. The helpers are
marked as optional in the spec a... | Copyright : © 2016–2017 Stack Builders
License : BSD 3 clause
Maintainer : < >
This is a implementation of Mustache templates . The
implementation conforms to the version 1.1.3 of official
specification < > . It is extremely simple
and straightforward to use with minimal but complete... |
0b19b82a7e3f48124f4361ec2b907d884a81c1128df5c8736aaaf397a69c195c | thelema/ocaml-community | odoc_global.ml | (***********************************************************************)
(* *)
(* OCamldoc *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/ocamldoc/odoc_global.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let _ = Clflags.dont_write_files := true
... |
bdb34dd35802f576da2e0548778a832e48b7f6434c0bec909e6993d98141b143 | iu-parfunc/HSBencher | FiltCSV.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Filter a subset of columns from a CSV file.
--
NOTE : This is subsumed by the ` csvcut ` command from the python ` csvkit ` library .
module Main where
import Control . Monad
import Data . List as L
import Data . Monoid
import Data . Maybe
import qualified Data.Vecto... | null | https://raw.githubusercontent.com/iu-parfunc/HSBencher/76782b75b3a4b276c45a2c159e0b4cb6bd8a2360/cat-csv/FiltCSV.hs | haskell | # LANGUAGE OverloadedStrings #
| Filter a subset of columns from a CSV file.
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.Text.IO as T |
NOTE : This is subsumed by the ` csvcut ` command from the python ` csvkit ` library .
module Main where
import Control . Monad
import Data . List as L
import Data . Monoid
import Data . Maybe
import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Laz... |
f9b571725be9f8c618798a2782cd38bc9becec071b98bf8b7608b4551a9f1ba4 | smucclaw/dsl | BoolStruct.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
module AnyAll.BoolStruct where
import qualified Data.Text as T
import AnyAll.Types
... | null | https://raw.githubusercontent.com/smucclaw/dsl/4f5fcb6fe8be32d3312f5f3f0c1ad0b93238394a/lib/haskell/anyall/src/AnyAll/BoolStruct.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
| more or less the inverse of `alwaysLabeled` below.
| used in the conversion to Purescript output.
| flatten redundantly nested structure
example:
input:
All [All [x1, x2], Any [y1, y2], Leaf z]
output:
All [x1, x2, Any [y1, y2],... | # LANGUAGE DeriveGeneric #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
module AnyAll.BoolStruct where
import qualified Data.Text as T
import AnyAll.Types
import Data.Aeson
import Data.Tree
import GHC.Generics
import Data.Aes... |
7b30b430f0ee40ba74d2ad1d862acd2359bf9db4f2888d1b7800ddc19828a2dd | casperschipper/ocaml-cisp | midiParser.ml |
0 7 . . . . 4 . . . 2 0 2 . 12
* notes :
things that analyse will build up state .
Some may have some shared state ?
Maybe there can be a container of analysers
let analyse =
Analyser.build [ intervals , pitchmap ]
how to fetch the analysers results ?
what is an analyser ?
Examples of ana... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/src/midiParser/midiParser.ml | ocaml | todo replace with -core/109.55.00/tmp/core_kernel/Dequeue.html
raw midi message seq.t -> midi state seq.t
midi seq.t -> [ map Analyse ] -> state seq.t
state =
playing notes
controller values
history keeps last n pitches that where played |
0 7 . . . . 4 . . . 2 0 2 . 12
* notes :
things that analyse will build up state .
Some may have some shared state ?
Maybe there can be a container of analysers
let analyse =
Analyser.build [ intervals , pitchmap ]
how to fetch the analysers results ?
what is an analyser ?
Examples of ana... |
9d255f67735d36c5b9b01057d381a859531aa73933671e74bde84bba1b13d4cd | mirage/irmin | atomic_write.mli |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-git/atomic_write.mli | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 IS PROVIDED " AS IS " AND... | |
19f4d343db62c55b4550b914b98c15cea3523450ea5cefe7fa2f1d5e1a8a6b99 | logseq/mldoc | pos.ml | type pos_meta =
{ start_pos : int
; end_pos : int
}
[@@deriving yojson]
let dummy_pos = { start_pos = 0; end_pos = 0 }
| null | https://raw.githubusercontent.com/logseq/mldoc/376bcdca3fef551d233ce8ebdc618e06edfe2e44/lib/syntax/pos.ml | ocaml | type pos_meta =
{ start_pos : int
; end_pos : int
}
[@@deriving yojson]
let dummy_pos = { start_pos = 0; end_pos = 0 }
| |
b657a88e1cab973849cebcc5d3ae4f848369ce4f77592e78d096038ff779c578 | IBM/probzelus | run.ml |
* Copyright 2018 - 2020 IBM Corporation
*
* 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 writin... | null | https://raw.githubusercontent.com/IBM/probzelus/3bdd60e3c4010452239bfe7bc79165802e5d941b/benchmarks/slam/ds/run.ml | ocaml |
* Copyright 2018 - 2020 IBM Corporation
*
* 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 writin... | |
6829a71cf0582a3786dc129da6c51172edca15eb63bca510ae3ff889c2c174bc | twosigma/waiter | settings_test.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/80db706160158a45989d19a929fea3e5644445fb/waiter/test/waiter/settings_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.settings-test
(:require [clojure.test :refer :all]
[schema.core :as s]
[waiter.settings :refer :all]
[waiter.util.utils :as utils]
[waiter.uti... |
460e05a6682e912d0d74dc8c3941abf5bfe2c5508589c114eff33b26fdd5a7b3 | tweag/pirouette | Action.hs | module UnionFind.Action where
data Action key value
= Insert key value
| Union key key
deriving (Show)
isInsert :: Action key value -> Bool
isInsert (Insert _ _) = True
isInsert _ = False
isUnion :: Action key value -> Bool
isUnion (Union _ _) = True
isUnion _ = False
| null | https://raw.githubusercontent.com/tweag/pirouette/35c88ead8bc0b2222d94b1349fe42cf3ea3b1fa5/src/UnionFind/Action.hs | haskell | module UnionFind.Action where
data Action key value
= Insert key value
| Union key key
deriving (Show)
isInsert :: Action key value -> Bool
isInsert (Insert _ _) = True
isInsert _ = False
isUnion :: Action key value -> Bool
isUnion (Union _ _) = True
isUnion _ = False
| |
f1242fc63a9b7e308f6207e67517216180e7d25e65e9c407ec435fbea030b1c7 | defaultxr/bdef | test.lisp | (defpackage #:bdef/tests
(:use #:cl
#:bdef
#:mutility
#:fiveam))
(in-package #:bdef/tests)
(def-suite bdef-tests
:description "bdef tests suite.")
(in-suite bdef-tests)
(test undocumented-symbols
"Check for any undocumented exported symbols"
(let ((undocumented (package-undocumented-... | null | https://raw.githubusercontent.com/defaultxr/bdef/3326825489bbaf6943a51c1b8364d60542333e87/t/test.lisp | lisp | (defpackage #:bdef/tests
(:use #:cl
#:bdef
#:mutility
#:fiveam))
(in-package #:bdef/tests)
(def-suite bdef-tests
:description "bdef tests suite.")
(in-suite bdef-tests)
(test undocumented-symbols
"Check for any undocumented exported symbols"
(let ((undocumented (package-undocumented-... | |
b4631ab9eae65b6747892554aad9c43b8decea4e071d294438c7fb58b9a41840 | rowangithub/DOrder | test.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/tests/test.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
module... |
cd067090272f15b687a6f77a0369472da753f4b0b987c3abe3aae3b62fedfec5 | Simspace/simformat | simformat.hs | | Description : Source code for the ` simformat ` script , which will format and validate imports for source files .
module Main (main) where
import Control.Applicative ((<|>))
import Control.Monad (unless)
import Data.Foldable (for_)
import Data.Maybe (catMaybes)
import Data.Traversable (for)
import Data.Version (sh... | null | https://raw.githubusercontent.com/Simspace/simformat/3632630495cc03b6c646e927af2037a8327405ec/app/simformat.hs | haskell | | Description : Source code for the ` simformat ` script , which will format and validate imports for source files .
module Main (main) where
import Control.Applicative ((<|>))
import Control.Monad (unless)
import Data.Foldable (for_)
import Data.Maybe (catMaybes)
import Data.Traversable (for)
import Data.Version (sh... | |
f61f9afacc62f9825909f943d54c9bbff32a9cdaac81f59e562136556a064ec4 | 2600hz/kazoo | pqc_cb_lists.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
%%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_lists.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(pqc_cb_lists).
-export([summary/2]).
-export([create/3]).
-export([fetch/3]).
-export([update... |
aac88a99deb46619590a9ccac35558f865caf33dd9b64dc829721cc89c396af3 | jorams/birch | events.lisp | ;;;; Functions to handle messages and turn some of them into events.
(defpackage :birch/events
(:use :cl)
(:import-from :birch/connection
#:connection
#:user
#:make-user
#:nick
#:rename-user
#:add-user
#:... | null | https://raw.githubusercontent.com/jorams/birch/50f1313cabb89c1ec2f275cdc4fb10bd145fdd9d/src/events.lisp | lisp | Functions to handle messages and turn some of them into events.
Special method combination
Somewhat low-level message handling
Default message handlers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(anything that is not letter | special).
The event system ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | (defpackage :birch/events
(:use :cl)
(:import-from :birch/connection
#:connection
#:user
#:make-user
#:nick
#:rename-user
#:add-user
#:remove-user
#:channel
#:make-channel... |
01cc869658631be59991ab7097f02bd530681bd01bcb1c4661257f406c12356a | bmillwood/stepeval | Stepeval.hs | module Language.Haskell.Stepeval (Scope, eval, itereval, printeval, stepeval) where
import Control.Arrow (first)
import Control.Applicative ((<$), (<$>), (<*>), (<|>))
import Control.Monad (guard, join, replicateM)
import Data.Foldable (foldMap)
import Data.List (delete, find, partition, unfoldr)
import Data.Maybe (fr... | null | https://raw.githubusercontent.com/bmillwood/stepeval/4fb70ae412f35c95f4f83c0229d3a05b6a027524/src/Language/Haskell/Stepeval.hs | haskell | (SrcLoc),
| Evaluate an expression as completely as possible.
| Print each step of the evaluation of an expression.
| Make a list of the evaluation steps of an expression.
Note that @head (itereval s exp) == exp@
prelude functions, but it's more convenient in general.
When we grow a proper Prelude of our own, it... | module Language.Haskell.Stepeval (Scope, eval, itereval, printeval, stepeval) where
import Control.Arrow (first)
import Control.Applicative ((<$), (<$>), (<*>), (<|>))
import Control.Monad (guard, join, replicateM)
import Data.Foldable (foldMap)
import Data.List (delete, find, partition, unfoldr)
import Data.Maybe (fr... |
82ae75e2f0fe51aff72dcc5dc9e02b824b96383dfab3df04087eb3f55688c8bc | adityaathalye/sicp | ex1-32-accumulate-recursive.scm | SICP Ex . 1.32
Express a general notion called ' accumulate ' that combines a
; collection of terms, using some general accumulation function:
; (accumulate combiner null-value term a next b)
; WHERE:
' combiner ' procedure ( of two arguments ) specifies how the
; current term is to be combined with the acc... | null | https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ex1-32-accumulate-recursive.scm | scheme | collection of terms, using some general accumulation function:
(accumulate combiner null-value term a next b)
WHERE:
current term is to be combined with the accumulation of the
preceding terms.
'null-value' specifies what base value to use when
the terms run out.
'a', 'b' range-limit the terms of the series ... | SICP Ex . 1.32
Express a general notion called ' accumulate ' that combines a
' combiner ' procedure ( of two arguments ) specifies how the
(define (accumulate combiner null-value term a next b)
(if (> a b)
null-value
(combiner (term a)
(accumulate
combiner n... |
3d3727ee5690dc3015a7cc7babbe9a1e10f7a16951b029f1bdfddb776d937534 | huangjs/cl | trigrat.lisp | (in-package :maxima)
(defun $listofei (e )
(declare (special $d2 $lg $lexp))
(setq $d2 (copy-tree (car e)))
(setq $lg ())
(setq $lexp ())
(do ((lvar (caddr $d2) (cdr lvar))
(lg (cadddr $d2) (cdr lg))
(var))
((null lvar)(setq $lg (cons '(mlist) $lg))
(setq $lexp (cons '(mlist) $lexp))
... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/trigonometry/trigrat.lisp | lisp | (in-package :maxima)
(defun $listofei (e )
(declare (special $d2 $lg $lexp))
(setq $d2 (copy-tree (car e)))
(setq $lg ())
(setq $lexp ())
(do ((lvar (caddr $d2) (cdr lvar))
(lg (cadddr $d2) (cdr lg))
(var))
((null lvar)(setq $lg (cons '(mlist) $lg))
(setq $lexp (cons '(mlist) $lexp))
... | |
3a258e18a60c59231f3652de9cee333db482a4361950aa10c928cf700a3b0084 | darwin/blender-clojure | compiler.cljs | (ns bcljs.compiler
(:require-macros [bcljs.compiler])
(:require [bcljs.runtime]))
| null | https://raw.githubusercontent.com/darwin/blender-clojure/bbdb5071d3f4a33ccbdb5a67818df58ae6767716/bcljs/src/lib/bcljs/compiler.cljs | clojure | (ns bcljs.compiler
(:require-macros [bcljs.compiler])
(:require [bcljs.runtime]))
| |
f017a43ba06d61501780a9235d2aea019553ad3ef2fd24e829f2fc84c2821440 | RDTK/generator | distribution.lisp | distribution.lisp --- Deployment of distributions as jobs .
;;;;
Copyright ( C ) 2012 - 2020 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.deployment.jenkins)
(defmethod deploy:deploy ((thing project:distribution) (target target))
(let ((jobs (call-next-method))
(or... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/deployment/jenkins/distribution.lisp | lisp |
Add dependencies for generated jobs.
Configure orchestration for the distribution.
Configure view(s) for the distribution.
Views | distribution.lisp --- Deployment of distributions as jobs .
Copyright ( C ) 2012 - 2020 Jan Moringen
Author : < >
(cl:in-package #:build-generator.deployment.jenkins)
(defmethod deploy:deploy ((thing project:distribution) (target target))
(let ((jobs (call-next-method))
(orchestratio... |
6ed41994200e28eab688e5ed46485d985dbde996c0fdd7d8b0c17b06db0ea548 | ocaml/ocamlbuild | ocaml_compiler.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/ocaml_compiler.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
val forpack_flags : string -> ... |
d41b16b61c04cd5f9e005ea8905e3277b477e4e7b72023652d439d00702de09e | greglook/clj-pgp | generate.clj | (ns clj-pgp.test.generate
(:require
[clj-pgp.core :as pgp]
[clj-pgp.generate :as pgp-gen]
[clj-pgp.keyring :as keyring]
[clojure.test :refer [deftest is]])
(:import
(org.bouncycastle.openpgp
PGPPublicKeyRing
PGPSecretKeyRing)))
(deftest keyring-macro-generation
(is (thrown? cloju... | null | https://raw.githubusercontent.com/greglook/clj-pgp/fe2b5cc6e49446bed59712e670c487c5ead57841/test/clj_pgp/test/generate.clj | clojure | (ns clj-pgp.test.generate
(:require
[clj-pgp.core :as pgp]
[clj-pgp.generate :as pgp-gen]
[clj-pgp.keyring :as keyring]
[clojure.test :refer [deftest is]])
(:import
(org.bouncycastle.openpgp
PGPPublicKeyRing
PGPSecretKeyRing)))
(deftest keyring-macro-generation
(is (thrown? cloju... | |
c1c99cf8648f51c1e007d0be06bc98feca4e3823b0c1fd50c471c0c5a73d51cc | mirage/irmin | proof.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/4936dec5bb672552c1b9f09d1c6de08ccd762605/src/irmin/proof.ml | ocaml | Push all hashes except the last one into [skips]
[skips] are the elements of the [stream] that are included in the
extenders, they will be removed from the final stream.
Peek the sequence but do not advance the ref
[v] is out of [of_proof], it is supposed to have its hash available
without IOs.... |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 IS PROVIDED " AS IS " AND... |
96a62d309c8c8e3f4277f7299f7f4b5f14fdae20febabd5c1e06fadf7e4503f8 | zotonic/z_stdlib | z_string_sanitize_utf8_test.erl | @author < >
-module(z_string_sanitize_utf8_test).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
valid_utf8_test_() ->
[
?_assert(v_utf8(<<>>)),
?_assert(v_utf8(<<127>>)),
?_assert(v_utf8(<<2#11001111, 2#10000000>>)),
?_assert(v_utf8(<<2#1... | null | https://raw.githubusercontent.com/zotonic/z_stdlib/da120ed8128dd811b0b1a2aeaa62e89c9134204a/test/z_string_sanitize_utf8_test.erl | erlang | z_string:sanitize_utf8 -> unicode.erl
"unicode.erl -> z_string:sanitize_utf8"
unicode.erl agrees
s_utf agrees.
@doc PropErly generate valid utf8 string of various lengths
@doc Check if there is not an illegal codepoint.
| @author < >
-module(z_string_sanitize_utf8_test).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
valid_utf8_test_() ->
[
?_assert(v_utf8(<<>>)),
?_assert(v_utf8(<<127>>)),
?_assert(v_utf8(<<2#11001111, 2#10000000>>)),
?_assert(v_utf8(<<2#1... |
d14621cb864dab978bac88124d2a2b214abba95b455ce44d8d7661f5f6ef66c8 | tmcgilchrist/airship | Decision.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
module Airship.Internal.Decision
( flow
, appendRequestPath
) where
import Airship.Headers (addResponseHe... | null | https://raw.githubusercontent.com/tmcgilchrist/airship/e946ac322f5f9ec0ceebcee593caacc9ea0b05ec/airship/src/Airship/Internal/Decision.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ImpredicativeTypes #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
HTTP Headers
These are headers not defined for us already in
----------------------------------------------------------------------------
-------... | # LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
module Airship.Internal.Decision
( flow
, appendRequestPath
) where
import Airship.Headers (addResponseHeader)
import Airship.Internal.Date (parseRfc1123Date,
... |
74156ad5f7d541e21e1bb1acc3ad7c40e529c74f0a8e999d43a210a65e6f908d | zaneli/hdbc-clickhouse | Reader.hs | module Database.HDBC.ClickHouse.Data.Reader (readValue) where
import Data.Bits
import Data.IP (toIPv4, toIPv6)
import Data.List (intersperse, unfoldr)
import Data.Word
import Database.HDBC.SqlValue
import Database.HDBC.ClickHouse.Data.Column
import Database.HDBC.ClickHouse.Protocol (joinSqlValues, Config)
import Netwo... | null | https://raw.githubusercontent.com/zaneli/hdbc-clickhouse/bf2ea2583ba5de63b943e95f597f17ac336920d8/src/Database/HDBC/ClickHouse/Data/Reader.hs | haskell | TODO: timezone
TODO: timezone | module Database.HDBC.ClickHouse.Data.Reader (readValue) where
import Data.Bits
import Data.IP (toIPv4, toIPv6)
import Data.List (intersperse, unfoldr)
import Data.Word
import Database.HDBC.SqlValue
import Database.HDBC.ClickHouse.Data.Column
import Database.HDBC.ClickHouse.Protocol (joinSqlValues, Config)
import Netwo... |
b40ff3be1c7603f0def44857abb634bd0d24124c99726f78b8f02e3b32e74d39 | polyfy/polylith | loc.clj | (ns polylith.clj.core.workspace.loc
(:require [polylith.clj.core.file.interface :as file]))
(defn lines-of-code-source [namespaces]
(apply + (mapv file/lines-of-code
(mapv :file-path namespaces))))
(defn lines-of-code [{:keys [src test]}]
{:src (lines-of-code-source src)
:test (lines-of-code... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/workspace/src/polylith/clj/core/workspace/loc.clj | clojure | (ns polylith.clj.core.workspace.loc
(:require [polylith.clj.core.file.interface :as file]))
(defn lines-of-code-source [namespaces]
(apply + (mapv file/lines-of-code
(mapv :file-path namespaces))))
(defn lines-of-code [{:keys [src test]}]
{:src (lines-of-code-source src)
:test (lines-of-code... | |
d70eb6830e9c7bc4680a4718d01d1181b5b29bc64c0c9eb2241fae5b0ccaf73a | jlongster/genetic-canvas | engine.scm | ;;;; Implements a genetic algorithm for learning how to draw images.
;;;;
3/9/2009
;; Declares
(declare (block)
(standard-bindings)
(extended-bindings)
(flonum))
;; Required modules
(define-macro (eval-for-macros expr)
(eval expr))
(eval-for-macros (define inline? #f))
(define-m... | null | https://raw.githubusercontent.com/jlongster/genetic-canvas/2592e48ddbd168a819ca6ca330a6f8af6ffc37aa/lib/engine.scm | scheme | Implements a genetic algorithm for learning how to draw images.
Declares
Required modules
Utility
Application
These are special methods which the application is aware of,
and are automatically called at the appropriate times.
Run all the genotypes
Show the results
Evolve it another time | 3/9/2009
(declare (block)
(standard-bindings)
(extended-bindings)
(flonum))
(define-macro (eval-for-macros expr)
(eval expr))
(eval-for-macros (define inline? #f))
(define-macro (require-macros name)
`(include ,name))
(define-macro (require name)
(if inline?
`(include... |
500a40845c894bf38134b55a44ce6194a7111263b011f88072e143f74e7be8a0 | mclumd/Meta-AQUA | data.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : TALE - SPIN ; Base : 10 -*-
;;; $Rev$
This file was corrupted when I tried to play with in 1999 . I
;;; restored the code by downloading it from the FreeWare Tools. I then
;;; remembered the code in the /usr/loca/mcox/Archives/cleon.tar. I made the
... | null | https://raw.githubusercontent.com/mclumd/Meta-AQUA/e4d4f83330fd07d1354aec245a49bde9e246c618/Tale-spin/data.lisp | lisp | Syntax : Common - lisp ; Package : TALE - SPIN ; Base : 10 -*-
$Rev$
restored the code by downloading it from the FreeWare Tools. I then
remembered the code in the /usr/loca/mcox/Archives/cleon.tar. I made the
===========================================================================
TaleSpin
===========... |
This file was corrupted when I tried to play with in 1999 . I
copy consistent with that version . 14jan99
Copyright ( C ) 1987
Elvis World and the Tale - Spin Story Generation Subsystem
for Meta - AQUA
( )
under the terms of the GNU General Public Li... |
ebb5942f34f6b215688cae042a9d46ca3a5a702402cc1897e6cbdceb96b3c114 | GaloisInc/semmc | Initialize.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module SemMC.S... | null | https://raw.githubusercontent.com/GaloisInc/semmc/3d9bc90f92a7f7ef59ff4943369dea9c0eb4b3ae/semmc-learning/src/SemMC/Stochastic/Initialize.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
^ Minimum number of equivalent programs to require
before stopping the stochastic search
^ The number of random tests to generate
^ The number opcodes to process in parallel. More is usually
better, but there is locking around the symbolic backend (i.e.,
'SimpleBuilder'... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module SemMC.Stochastic.Initialize (
Config(..),
SynEnv(..),
... |
9a672460f6a9f63c43049596697265fa1663e9186844c1f77a815893eb108389 | RNCryptor/rncryptor-hs | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified PasswordBasedVectors as Pwd
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import Tests
----------------------------------------------------------------------
withQuickCheckDepth :: Te... | null | https://raw.githubusercontent.com/RNCryptor/rncryptor-hs/2c4fdb41646eefc1675482f2564c780a548b655c/test/Main.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
-------------------------------------------------------------------- | module Main where
import qualified PasswordBasedVectors as Pwd
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import Tests
withQuickCheckDepth :: TestName -> Int -> [TestTree] -> TestTree
withQuickCheckDepth tn depth tests =
localOption (QuickCheckTest... |
1f5dc5cb2ebe1dc39b803146eb4aed6eafaf28372f1ca3aae35b4cfa00daf9b8 | mbj/stratosphere | DataOutputConfigurationProperty.hs | module Stratosphere.LookoutEquipment.InferenceScheduler.DataOutputConfigurationProperty (
module Exports, DataOutputConfigurationProperty(..),
mkDataOutputConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
i... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/lookoutequipment/gen/Stratosphere/LookoutEquipment/InferenceScheduler/DataOutputConfigurationProperty.hs | haskell | # SOURCE # | module Stratosphere.LookoutEquipment.InferenceScheduler.DataOutputConfigurationProperty (
module Exports, DataOutputConfigurationProperty(..),
mkDataOutputConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
i... |
da6b1bb80e41ebcf33d4934167de3c1a4325ed3e8a4a017f1de92ddacbbfd29c | unclebob/ubc-website | sidebar.clj | (ns ubc-website.interactors.sidebar
(:require
[me.raynes.fs :as fs]
[clj-time.core :as t]
[clj-time.format :as t-fmt]
[clojure.xml :as xml]))
(def event-formatter (t-fmt/formatter "yyyyMMdd"))
(defn event-file->date [event-file]
(let [event-name (first (clojure.string/split (fs/name event-file) #"... | null | https://raw.githubusercontent.com/unclebob/ubc-website/c1298df6db0759d77cc8bd4a1bad2de62de1cfcd/src/ubc_website/interactors/sidebar.clj | clojure | [{:link "link" :title "title" :date "date"}] | (ns ubc-website.interactors.sidebar
(:require
[me.raynes.fs :as fs]
[clj-time.core :as t]
[clj-time.format :as t-fmt]
[clojure.xml :as xml]))
(def event-formatter (t-fmt/formatter "yyyyMMdd"))
(defn event-file->date [event-file]
(let [event-name (first (clojure.string/split (fs/name event-file) #"... |
920801c385eacc69e440fa93e492c5c6b12dc48736d232dc6ba60e26d7882067 | susanemcg/pandoc-tufteLaTeX2GitBook | Org.hs | {-# LANGUAGE OverloadedStrings #-}
module Tests.Readers.Org (tests) where
import Text.Pandoc.Definition
import Test.Framework
import Tests.Helpers
import Tests.Arbitrary()
import Text.Pandoc.Builder
import Text.Pandoc
import Data.List (intersperse)
import Data.Monoid (mempty, mappend, mconcat)
org :: String -> Pandoc... | null | https://raw.githubusercontent.com/susanemcg/pandoc-tufteLaTeX2GitBook/00c34b4299dd89c4e339e1cde006061918b559ab/pandoc-1.12.4.2/tests/Tests/Readers/Org.hs | haskell | # LANGUAGE OverloadedStrings # | module Tests.Readers.Org (tests) where
import Text.Pandoc.Definition
import Test.Framework
import Tests.Helpers
import Tests.Arbitrary()
import Text.Pandoc.Builder
import Text.Pandoc
import Data.List (intersperse)
import Data.Monoid (mempty, mappend, mconcat)
org :: String -> Pandoc
org = readOrg def
infix 4 =:
(=:)... |
caed571f0cce6b3cd7574d93781413bea9ac67ad1937889ebcf438f0a939748e | odyssomay/clj-dm | read-and-compile.lsp | ;;;-*-Mode: LISP; Package: DM -*-
;;
;; ***********************************************************
;; ***********************************************************
;;
;;; this file should merge with utilities, environment or something like that
;;;
;;; concatenate-pathnames
;;; load-last-version
;;;
(in-package :dm... | null | https://raw.githubusercontent.com/odyssomay/clj-dm/cf215aab652f8f463957b61fceccba1bca02f9e0/resources/dm/lib-core/read-and-compile.lsp | lisp | -*-Mode: LISP; Package: DM -*-
***********************************************************
***********************************************************
this file should merge with utilities, environment or something like that
concatenate-pathnames
load-last-version
-------------------------
CONCATENATE P... |
(in-package :dm)
(defun concatenate-pathnames (path1 path2)
(pathname
(concatenate 'string
(namestring path1)(namestring path2))))
#+:mswindows
(defun load-last-version (pathname)
(if
(or
(not (probe-file (concatenate 'string pathname *.fasl-pathname*)))
(< (file-write-date (c... |
ab3c770156f9cda1278a9681cff1949490a605afc79a9a2e1ca7af34eef5d84d | igorhvr/bedlam | main.scm | (import pattern-matching)
(import hashtable)
(define (enable-debugging)
(emit-debugging-symbols #t)
(emit-annotations #t)
(current-optimizer debugging-instrument))
(define (debugging-instrument expr)
(let* ([reg (make-hashtable)]
[res (scan expr '() 0 #f reg)])
(hashtable/for-each (lambda (key va... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/debugger/main.scm | scheme | (import pattern-matching)
(import hashtable)
(define (enable-debugging)
(emit-debugging-symbols #t)
(emit-annotations #t)
(current-optimizer debugging-instrument))
(define (debugging-instrument expr)
(let* ([reg (make-hashtable)]
[res (scan expr '() 0 #f reg)])
(hashtable/for-each (lambda (key va... | |
a672c3af32812bae641272da3cb8e2ff8cf240e20f1077ac85c65b96324a8abf | LdBeth/star-lisp | pref.lisp | ;; -*- Mode: Lisp; Syntax:Common-Lisp; Package: (*SIM-I COMMON-LISP-GLOBAL); Muser: yes -*-
(in-package :*sim-i)
;;;> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
;;;>
;;;> The Thinking Machines *Lisp Simulator is in the public domain.
;;;> You are free to do whatever you ... | null | https://raw.githubusercontent.com/LdBeth/star-lisp/034fb97fe8780d6e9fbff7c1d8c4a6b8c331797b/source/pref.lisp | lisp | -*- Mode: Lisp; Syntax:Common-Lisp; Package: (*SIM-I COMMON-LISP-GLOBAL); Muser: yes -*-
> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
>
> The Thinking Machines *Lisp Simulator is in the public domain.
> You are free to do whatever you like with it, including but
> not lim... |
(in-package :*sim-i)
> . Other than to Thinking Machines '
(defun internal-pref (pvar processor)
(ecase (pvar-class pvar)
(:general (aref (pvar-array pvar) processor))
(:array (pref-array-pvar pvar processor))
(:structure
(when (eq 'address-object (pvar-structure-name pvar))
(decache-addre... |
b09f6cde867542c17e36b5b680907661373db997ddb34a400df7a9cf8128f946 | ghosthamlet/algorithm-data-structure | longest_common_substring.clj | (ns algorithm-data-structure.algorithms.string.longest-common-substring)
(defn run [s1 s2]
(let [len1 (count s1)
len2 (count s2)
tmp (repeat (count len2)
(repeat (count len1) nil))
substring-matrix (->> len1 inc range (assoc tmp 0)
(map #(asso... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/string/longest_common_substring.clj | clojure | (ns algorithm-data-structure.algorithms.string.longest-common-substring)
(defn run [s1 s2]
(let [len1 (count s1)
len2 (count s2)
tmp (repeat (count len2)
(repeat (count len1) nil))
substring-matrix (->> len1 inc range (assoc tmp 0)
(map #(asso... | |
ea0b6bb0bc219eb5e4bcfb1fcc3ce79a3a05f5b992205bf8c05753eb401142d9 | rzetterberg/orgmode-sql | Import.hs | {-|
Commonly used imports used in the project to minimize import definitions in
modules that uses the same libraries.
Is only used internally in the library.
-}
module Database.OrgMode.Internal.Import
( module Import
) where
import Control.Monad as Import (void, liftM)
import ... | null | https://raw.githubusercontent.com/rzetterberg/orgmode-sql/98cf35b96e6ce63f60ce11ace18be55e5770352e/lib/Database/OrgMode/Internal/Import.hs | haskell | |
Commonly used imports used in the project to minimize import definitions in
modules that uses the same libraries.
Is only used internally in the library.
| module Database.OrgMode.Internal.Import
( module Import
) where
import Control.Monad as Import (void, liftM)
import Control.Monad.IO.Class as Import (MonadIO, liftIO)
import Control.Monad.Reader as Import (ReaderT)
import Data.Text ... |
e39c4614ee0de880ec20320040f3fa44f1a613ced9ebabccd7f3a8e15612ef12 | HaskellEmbedded/data-stm32 | Extract.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Data.CMX.Extract (
cmxFamilies
, cmxDevices
, extractCMX
, extractCMXCached
, filterSupported
, uniqueIpNames
, uniqueIpVersions
, uniqueIps
, hasIp
, hasIpVersion
, mcusWithIp
, ipPerMCUCounts
, ipFamilies
, ipShortNam... | null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/src/Data/CMX/Extract.hs | haskell | # LANGUAGE OverloadedStrings #
fill in missing ram2 and ram3 sizes, compute real sram1 size
compute ram1 size - we substract ram2 & ram3 & ccram from
total size
so we add it manually based on `Data.STM32.Memory.ccmSize`
returns ip with the count of devices which use it
returns ip with the list of families which u... | # LANGUAGE RecordWildCards #
module Data.CMX.Extract (
cmxFamilies
, cmxDevices
, extractCMX
, extractCMXCached
, filterSupported
, uniqueIpNames
, uniqueIpVersions
, uniqueIps
, hasIp
, hasIpVersion
, mcusWithIp
, ipPerMCUCounts
, ipFamilies
, ipShortName
, getIPVersion
, fx
) where... |
7ae23d36f60960e585b21bd84479a433f4363dfcc51accf7253c597a92c42c7e | Carnap/Carnap | Rules.hs | # LANGUAGE GADTs , UndecidableInstances , ConstraintKinds , RankNTypes , FlexibleContexts , PatternSynonyms , TypeSynonymInstances , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PureFirstOrder.Logic.Rules where
import Data.List (intercalate)
import Data.Typeable (Typeable)
import Data.Maybe (cat... | null | https://raw.githubusercontent.com/Carnap/Carnap/bb134b404f753a665b287501ac0d6aaa6b933caf/Carnap/src/Carnap/Languages/PureFirstOrder/Logic/Rules.hs | haskell | ------------------------------------------------------
------------------------------------------------------
# OVERLAPPABLE #
some extra lines that we need to add if we're putting this
constraint on a subproof-closing rule
XXX: for now we ignore the complication of making sure these
are *available* lines.
------------... | # LANGUAGE GADTs , UndecidableInstances , ConstraintKinds , RankNTypes , FlexibleContexts , PatternSynonyms , TypeSynonymInstances , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PureFirstOrder.Logic.Rules where
import Data.List (intercalate)
import Data.Typeable (Typeable)
import Data.Maybe (cat... |
d147b375278b43e39cda2d7b3953d3163b7fa73f1e70ce15552f2d665a01effa | qfpl/reflex-tutorial | Solution.hs | # LANGUAGE CPP #
# LANGUAGE RecursiveDo #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
module Ex14.Solution (
attachEx14
) where
import Language.Javascript.JSaddle (JSM)
import Control.Monad.Fix (MonadFix)
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as Text
import... | null | https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex14/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
These calls to `mkStock` create a `Dynamic t Stock` for the stock items
the name of the stock
We then display the stock information and emit an `Event t Text` with the
name of the stock when the stock item is selected
Everything after this we had before.
The exi... | # LANGUAGE CPP #
# LANGUAGE RecursiveDo #
module Ex14.Solution (
attachEx14
) where
import Language.Javascript.JSaddle (JSM)
import Control.Monad.Fix (MonadFix)
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Map as Map
import Reflex
import Reflex.Do... |
e4932a2f1b5e4ee6353625198e45efec70f480bac68cb81c6b3ee3fd71785d0d | shirok/Gauche | levenshtein.scm | ;;;
util.levenshtein - Calculate edit distance between two sequences
;;;
Copyright ( c ) 2016 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of sourc... | null | https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/lib/util/levenshtein.scm | scheme |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in b... | util.levenshtein - Calculate edit distance between two sequences
Copyright ( c ) 2016 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY ... |
3553fa7570b89f9016da8465164af41b7854e7506d0cc17e5f0bae20a18f7ac1 | pixura/simple-graphql-client | Spec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
import qualified Data.Aeson as J
import Data.FileEmbed ( embedStringFile )
import GHC.Generics
import Da... | null | https://raw.githubusercontent.com/pixura/simple-graphql-client/ed663325693b85b226bac1bc4204f8af65a1c611/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings #
TODO :: Implement better spec. for now simple test that will crash if failed.
---------------------------------------------------------------------------
| TestCountries Query
--------------------------------------------------------------------------- | # LANGUAGE LambdaCase #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
import qualified Data.Aeson as J
import Data.FileEmbed ( embedStringFile )
import GHC.Generics
import Data.Text
import Data.Void
... |
50c13021a5d465af8fdf02b8aa316278e4634ba0fe18dd374bedce804f1299c4 | fpco/stackage-server | Schema.hs | # LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTy... | null | https://raw.githubusercontent.com/fpco/stackage-server/b707b5a0d72c44a3134a305b628c3f0b28db2697/src/Stackage/Database/Schema.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
* Database
* Tables
** Snapshot
** Package
** Pantry
TODO: deprecate? since it's encapsulated in `compiler` | # LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE Sta... |
34494bf23d9ed1d0bdb0002bb84173492c2355bacc31fbda5eaa8e2d40c66619 | anentropic/ocaml-spectrum | capabilities.ml | type color_level =
FORCE_COLOR=0 or FORCE_COLOR = false
| Basic (* FORCE_COLOR=1 or FORCE_COLOR=true *)
FORCE_COLOR=2
| True_color (* FORCE_COLOR=3 *)
[@@deriving show, eq]
type numeric_version = {
major: int;
minor: int;
patch: int;
}
let parse_numeric_version s =
let rex = Pcre.regexp "(?P<ma... | null | https://raw.githubusercontent.com/anentropic/ocaml-spectrum/55ba0b8412e4bc3bcd7880d468af12e51a2a82da/lib/capabilities.ml | ocaml | FORCE_COLOR=1 or FORCE_COLOR=true
FORCE_COLOR=3
failed parsing version
failed parsing version
failed parsing version
util for using StrMap as a fake env (e.g. in tests)
util for faking the OS checks (e.g. in tests)
the legit OS info | type color_level =
FORCE_COLOR=0 or FORCE_COLOR = false
FORCE_COLOR=2
[@@deriving show, eq]
type numeric_version = {
major: int;
minor: int;
patch: int;
}
let parse_numeric_version s =
let rex = Pcre.regexp "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)" in
let substrings = Pcre.exec ~rex s in
{... |
beac329f825d26994ca3628bd50dc7a5f44a2e4f4d5778ff6ce6e4fb7da99b8a | serioga/webapp-clojure-2020 | shadow_cljs.clj | (ns dev.env.system.integrant.shadow-cljs
(:require [dev.env.shadow-cljs.server :as server]
[integrant.core :as ig]))
(set! *warn-on-reflection* true)
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
(derive :dev.env.system.integrant/shadow-cljs
... | null | https://raw.githubusercontent.com/serioga/webapp-clojure-2020/4d5a4cf339f1fa7429bcb02089586ac16e26a555/dev/dev/env/system/integrant/shadow_cljs.clj | clojure | (ns dev.env.system.integrant.shadow-cljs
(:require [dev.env.shadow-cljs.server :as server]
[integrant.core :as ig]))
(set! *warn-on-reflection* true)
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
(derive :dev.env.system.integrant/shadow-cljs
... | |
c01635a747ec5676dd0588285c9bac6b50e71bc4450313804d5d955c5ee74a76 | cmars/sks-keyserver | keydb.ml | (***********************************************************************)
keydb.ml - Interface for dealing with underlying key database
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011... | null | https://raw.githubusercontent.com/cmars/sks-keyserver/d848c4852cb15585525772b6378670f8724a8f39/keydb.ml | ocaml | *********************************************************************
redistribute it and/or modify it under the terms of the GNU General
... | keydb.ml - Interface for dealing with underlying key database
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published b... |
0713b662b728f8bd17d17d341ceae57291da72a3f14dfb8b5f0099e4bd0de877 | robrix/sequoia | Quantification.hs | {-# LANGUAGE ConstraintKinds #-}
module Sequoia.Calculus.Quantification
( -- * Quantification rules
QuantificationIntro
-- * Re-exports
, module Sequoia.Calculus.ForAll
, module Sequoia.Calculus.Exists
) where
import Sequoia.Calculus.Exists
import Sequoia.Calculus.ForAll
-- Quantification rules
type Quantificati... | null | https://raw.githubusercontent.com/robrix/sequoia/9cd6f61e35ef9c7077ac9a4c5b7d43c592bc7b4c/src/Sequoia/Calculus/Quantification.hs | haskell | # LANGUAGE ConstraintKinds #
* Quantification rules
* Re-exports
Quantification rules | module Sequoia.Calculus.Quantification
QuantificationIntro
, module Sequoia.Calculus.ForAll
, module Sequoia.Calculus.Exists
) where
import Sequoia.Calculus.Exists
import Sequoia.Calculus.ForAll
type QuantificationIntro s = (UniversalIntro s, ExistentialIntro s)
|
462768c9bcb6d6f7dd457fed2d1735a59a91318dca7a58dc199e638b839fa722 | NetComposer/nksip | nksip_response.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_response.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nksip_response).
-au... |
aa249b6927245b44eba09fd6b601dec0ae127db124bf5c38204fb9b1182a9f57 | EasyCrypt/easycrypt | ecLocation.mli | (* -------------------------------------------------------------------- *)
open EcUtils
open Lexing
(* -------------------------------------------------------------------- *)
type t = {
loc_fname : string;
loc_start : int * int;
loc_end : int * int;
loc_bchar : int;
loc_echar : int;
}
(* -----------------... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/ecLocation.mli | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcUtils
open Lexing
type t = {
loc_fname : string;
loc_start : int * int;
loc_end : int * int;
loc_bchar : int;
loc_echar : int;
}
type 'a mloc = ('a, t) tagged
val _dummy : t
val make : position -> position -> t
val of_lexbuf : lexbuf -> t
val tostring : t -> string
val tos... |
ae1985c071c44574f7d1896b8dfa873beffc7c7277ad00863bb49c9f99660f0a | lpw25/ocaml-typed-effects | toploop.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/toplevel/toploop.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Path
open Format
open Config
open... |
413da0a89693afbb7f902e62e2d7da565460acef7bc0488716216e15cb946832 | mstksg/advent-of-code-2021 | Day08.hs | {-# OPTIONS_GHC -Wno-redundant-constraints #-}
-- |
Module : AOC.Challenge .
-- License : BSD3
--
-- Stability : experimental
-- Portability : non-portable
--
Day 8 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day08 (
day08a
, day08b
) where
import ... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2021/cfb1c85b165de950605c9828817640a87165421e/src/AOC/Challenge/Day08.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
|
License : BSD3
Stability : experimental
Portability : non-portable
way too much type safety
| Actual physical segment on the display
| abcdefg
| Map of wire displays to the digit they represent |
Module : AOC.Challenge .
Day 8 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day08 (
day08a
, day08b
) where
import AOC.Common (listTup, traverseLines, countTrue)
import AOC.Common.FinitarySet (FinitarySet)
import AOC.Solv... |
861c57ef8c086c0eae3fff2cf6c8f6de45fbae6917b830a92fb86895c7c7e5b3 | reborg/clojure-essential-reference | 3.clj | < 1 >
(+ 1 1)
2 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/VarsandNamespaces/ns-mapandns-unmap/3.clj | clojure | < 1 >
(+ 1 1)
2 | |
4825c66d3acf333dab0245117b7754d9cd10af4f3be62b8aba542620d0c4077a | links-lang/links | instantiate.mli | open CommonTypes
open Utility
(* TODO: after Types refactoring, turn this into singular *)
type instantiation_maps = Types.type_arg IntMap.t
exception ArityMismatch of (int * int) (* Expected, provided *)
val show_recursion : bool Settings.setting
val var : Types.environment -> string -> (Types.type_arg list * Type... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/instantiate.mli | ocaml | TODO: after Types refactoring, turn this into singular
Expected, provided
Given a quantified type and a list of type arguments, create the corresponding instantiation map | open CommonTypes
open Utility
type instantiation_maps = Types.type_arg IntMap.t
val show_recursion : bool Settings.setting
val var : Types.environment -> string -> (Types.type_arg list * Types.datatype)
val rigid : Types.environment -> string -> (Types.type_arg list * Types.datatype)
val typ : Types.datatype -> (Ty... |
660820998d6735b6ef171ba1571cf753c0e1344c3efc9e1368b07706528e4d2a | exercism/erlang | diamond.erl | -module(diamond).
-export([rows/1]).
rows(_Letter) -> undefined.
| null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/diamond/src/diamond.erl | erlang | -module(diamond).
-export([rows/1]).
rows(_Letter) -> undefined.
| |
5453e2d007129881bafdbe34c2d758aebdab14f84f028135d5da7474a0b99c85 | dasuxullebt/uxul-world | leveleditor.lisp | Copyright 2009 - 2011
(in-package :uxul-world-leveleditor)
(defparameter *leveleditor-images* nil)
(defun bmp-to-gif (inblob)
"Convert BMP to Grayscale-Gif using skippy."
(let*
((w (uxul-world::bmp-width inblob))
(h (uxul-world::bmp-height inblob))
(img (uxul-world::bmp-pixel-data inblob)... | null | https://raw.githubusercontent.com/dasuxullebt/uxul-world/f05e44b099e5976411b3ef1f980ec616bd221425/leveleditor.lisp | lisp | 0 becomes transparent
(lisp-magick:with-magick-wand (mywand)
(lisp-magick::magick-read-image-blob mywand img)
(lisp-magick:with-drawing-wand (dw)
(lisp-magick::draw-set-text-under-color dw pw))
(lisp-magick::draw-set-fill-color dw pw))
(lisp-magick:magick-draw-image mywand dw))
(lisp-magic... | Copyright 2009 - 2011
(in-package :uxul-world-leveleditor)
(defparameter *leveleditor-images* nil)
(defun bmp-to-gif (inblob)
"Convert BMP to Grayscale-Gif using skippy."
(let*
((w (uxul-world::bmp-width inblob))
(h (uxul-world::bmp-height inblob))
(img (uxul-world::bmp-pixel-data inblob)... |
2bbad216dba23438a9b09697a1384e3ed5796d8d87273f214618f89645fb6483 | marigold-dev/deku | ast.ml | (*
* Throughout the implementation we use consistent naming conventions for
* syntactic elements, associated with the types defined here and in a few
* other places:
*
* x : var
* v : value
* e : instr
* f : func
* m : module_
*
* t : value_type
* s : func_type
* c : context / config
*
* ... | null | https://raw.githubusercontent.com/marigold-dev/deku/a26f31e0560ad12fd86cf7fa4667bb147247c7ef/deku-c/interpreter/syntax/ast.ml | ocaml |
* Throughout the implementation we use consistent naming conventions for
* syntactic elements, associated with the types defined here and in a few
* other places:
*
* x : var
* v : value
* e : instr
* f : func
* m : module_
*
* t : value_type
* s : func_type
* c : context / config
*
* Th... |
open Types
type void = Lib.void
Operators
module IntOp = struct
type unop = Clz | Ctz | Popcnt | ExtendS of pack_size
type binop =
| Add
| Sub
| Mul
| DivS
| DivU
| RemS
| RemU
| And
| Or
| Xor
| Shl
| ShrS
| ShrU
| Rotl
| Rotr
type testop = Eqz
... |
a9b7153729bb69df355b6bbf5a657eb8e2ff131223649df3c4a59d2c617aab22 | 5HT/ant | LoadImage.ml |
module Images = Images;
open XNum;
open Unicode;
type format =
[ Bitmap
| Bmp
| PostScript
| PDF
];
type bitmap_format =
[ Indexed of string
| RGB
| RGBA
| CMYK
];
type bitmap =
{
bm_format : bitmap_format;
bm_width : int;
bm_height : int;
bm_depth : int;
bm_scanline : int -> string
};
value in... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/LoadImage.ml | ocaml |
module Images = Images;
open XNum;
open Unicode;
type format =
[ Bitmap
| Bmp
| PostScript
| PDF
];
type bitmap_format =
[ Indexed of string
| RGB
| RGBA
| CMYK
];
type bitmap =
{
bm_format : bitmap_format;
bm_width : int;
bm_height : int;
bm_depth : int;
bm_scanline : int -> string
};
value in... | |
9d534d8764a57ea24db1d8e6916e0668d7ccbed52adb99ab071fde3a12d690ee | ghilesZ/geoml | drawing.ml | open Geoml
open Graphics
(* conversion utilities *)
let iof = int_of_float
let soi = string_of_int
let point2pixel p = Point.(iof p.x, iof p.y)
let moveto_p p =
let x, y = point2pixel p in
moveto x y
let lineto_p p =
let x, y = point2pixel p in
lineto x y
(* screen handling *)
let open_graph size_x size_y... | null | https://raw.githubusercontent.com/ghilesZ/geoml/f3b93d801913f76ab06ef7a4c56c03fef38d4209/examples/drawing/drawing.ml | ocaml | conversion utilities
screen handling
drawing
shapes with non null area
string drawing | open Geoml
open Graphics
let iof = int_of_float
let soi = string_of_int
let point2pixel p = Point.(iof p.x, iof p.y)
let moveto_p p =
let x, y = point2pixel p in
moveto x y
let lineto_p p =
let x, y = point2pixel p in
lineto x y
let open_graph size_x size_y title =
let sx = size_x |> iof |> string_of_in... |
6e09d573f5467eb65e6ce1a4e8aa95b8b35ca7017eeb82497ae9f553540b461f | ReactiveX/RxClojure | graph.clj | (ns rx.lang.clojure.graph
"This is an implementation namespace. Don't use it directly. Use the symbols
in rx.lang.clojure.core
"
(:require [clojure.set :as set]))
(def ^:private -ns- *ns*)
(set! *warn-on-reflection* true)
(defn ^:private ->let-o*-observable
[^rx.Observable o n name]
(if (= n 1)
o
TO... | null | https://raw.githubusercontent.com/ReactiveX/RxClojure/8f8e454f447ae24549bcf5f001c9d2458af21cac/src/main/clojure/rx/lang/clojure/graph.clj | clojure | we only need to cache values until we get the nth subscription at which
point, it just becomes a pass through. I haven't found a cache/replay-ish
operator that gives this level of control over the cached values
It's already resolving up the stack. We've hit a cycle.
It's already resolved. Done.
recursively resolv... | (ns rx.lang.clojure.graph
"This is an implementation namespace. Don't use it directly. Use the symbols
in rx.lang.clojure.core
"
(:require [clojure.set :as set]))
(def ^:private -ns- *ns*)
(set! *warn-on-reflection* true)
(defn ^:private ->let-o*-observable
[^rx.Observable o n name]
(if (= n 1)
o
TO... |
112798c11beb995ff42f5ac5208af99c1767a47bba677d734238c9eed34ac3d7 | krukow/calabash-script | run.clj | (ns calabash-script.clj.run
(:require [clojure.java.io :as io]))
(def trace-template "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate")
(defn run-test
"Launch UIA via instruments."
[& kwargs]
(let [options ... | null | https://raw.githubusercontent.com/krukow/calabash-script/7e54beab5aa83087c7b52a55eca3d1828d2d0f36/src/clj/calabash_script/clj/run.clj | clojure | (ns calabash-script.clj.run
(:require [clojure.java.io :as io]))
(def trace-template "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate")
(defn run-test
"Launch UIA via instruments."
[& kwargs]
(let [options ... | |
2fbab73c63d85278cfe1609b01039d892ec0c0ca9cd53d14af89e61a0bc6c2a6 | project-oak/hafnium-verification | SummaryPayload.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/absint/SummaryPayload.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
5e443b07623e7adbf0465020783c19abdfded4cb9a74ab1e4768d34365dbf37f | supki/xmonad-screenshot | WorkspaceScreenshot.hs | # OPTIONS_HADDOCK not - home #
-- | Provides an utility functions for easy and robust workspaces' screen capturing.
module XMonad.Util.WorkspaceScreenshot
( module XMonad.Util.WorkspaceScreenshot.Internal
) where
import XMonad.Util.WorkspaceScreenshot.Internal
| null | https://raw.githubusercontent.com/supki/xmonad-screenshot/424810c33ed397cfd508915fb011c4e6de10b55d/src/XMonad/Util/WorkspaceScreenshot.hs | haskell | | Provides an utility functions for easy and robust workspaces' screen capturing. | # OPTIONS_HADDOCK not - home #
module XMonad.Util.WorkspaceScreenshot
( module XMonad.Util.WorkspaceScreenshot.Internal
) where
import XMonad.Util.WorkspaceScreenshot.Internal
|
c7f91cb14d2c4b2301d130d56e185eca481cae9a29c1b8f7dd5540b5e2ebed48 | haskus/packages | Shapefile.hs | # LANGUAGE LambdaCase #
-- | ShapeFile format
--
--
module Haskus.Format.Shapefile
( Header (..)
, readHeader
, readRecord
, readShapeFile
, Record (..)
, RecordHeader (..)
, Shape (..)
, Box (..)
, Point (..)
, PointM (..)
, PointZ (..)
, MultiPoint (..)
, PolyLine (..)
, ... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-maps/src/lib/Haskus/Format/Shapefile.hs | haskell | | ShapeFile format
^ All the shapes in the file have the same type
| Surface patch type
| Read ShapeFile header
skip unused bytes
| Record header
| Read a record header
| (x,y)
| (x,y,m)
| (x,y,z,m)
^ Counter-clockwise rings are holes. Rings are closed.
^ Counter-clockwise rings are holes. Rings are clos... | # LANGUAGE LambdaCase #
module Haskus.Format.Shapefile
( Header (..)
, readHeader
, readRecord
, readShapeFile
, Record (..)
, RecordHeader (..)
, Shape (..)
, Box (..)
, Point (..)
, PointM (..)
, PointZ (..)
, MultiPoint (..)
, PolyLine (..)
, PatchType (..)
, Patch (.... |
060409affc77c7761bc056526b3bc2a670c91b865d50f56ca39083ed0e720c33 | modular-macros/ocaml-macros | Inline_records.mli | (**
This test focuses on the printing of documentation for inline record
within the latex generator.
*)
(** A nice exception *)
exception Simple
(** An open sum type *)
type ext = ..
(** A simple record type for reference *)
type r = { lbl: int (** Field documentation for non-inline, [lbl : int] *);
m... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocamldoc-html/Inline_records.mli | ocaml | *
This test focuses on the printing of documentation for inline record
within the latex generator.
* A nice exception
* An open sum type
* A simple record type for reference
* Field documentation for non-inline, [lbl : int]
* More documentation for r, [more : int list]
* [A] field documentation
* More [A] fi... |
exception Simple
type ext = ..
* A sum type with one inline record
* A sum type with two inline records
type s =
type ext +=
* Two new constructors for ext
|
193078cc51531e961be42f9e43e3fcb9100ed8c95f7064986d0f82dd6e9e0c91 | aaronallen8455/hi-fi | Types.hs | # LANGUAGE RoleAnnotations #
# LANGUAGE DerivingStrategies #
# LANGUAGE UndecidableSuperClasses #
# LANGUAGE TypeFamilyDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# LANGUAGE DataKinds #
module HiFi.Internal.Types
( HKD(..)
, RecArray
, FieldName(..)
,... | null | https://raw.githubusercontent.com/aaronallen8455/hi-fi/72c42adfa502f73cd52e79cadcd57093440d1286/src/HiFi/Internal/Types.hs | haskell | # LANGUAGE GADTs #
------------------------------------------------------------------------------
Record Nesting
------------------------------------------------------------------------------
| Marks a nested record field so that it inherits the higher kindedness of
the ambient record.
from the result of the fold.... | # LANGUAGE RoleAnnotations #
# LANGUAGE DerivingStrategies #
# LANGUAGE UndecidableSuperClasses #
# LANGUAGE TypeFamilyDependencies #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# LANGUAGE DataKinds #
module HiFi.Internal.Types
( HKD(..)
, RecArray
, FieldName(..)
, FieldGetters(..)
, H... |
ae238904ebc0a081adfab8c5c1c11ac106e591a5d91c9e9e0cedbb7c6d5cd671 | MrEbbinghaus/Todoish | todo.clj | (ns todoish.models.todo
(:require
[datahike.api :as d]
[datahike.core :as d.core]
[ghostwheel.core :refer [>defn >defn- => | ? <-]]
[clojure.spec.alpha :as s]
[todoish.models.user :as user]))
(s/def ::id uuid?)
(s/def ::task string?)
(s/def ::done? boolean?)
(s/def ::todo (s/keys :req [::id ::tas... | null | https://raw.githubusercontent.com/MrEbbinghaus/Todoish/42c5a8e575c19937e4ed3332b738e5f35e847f07/src/main/todoish/models/todo.clj | clojure | (ns todoish.models.todo
(:require
[datahike.api :as d]
[datahike.core :as d.core]
[ghostwheel.core :refer [>defn >defn- => | ? <-]]
[clojure.spec.alpha :as s]
[todoish.models.user :as user]))
(s/def ::id uuid?)
(s/def ::task string?)
(s/def ::done? boolean?)
(s/def ::todo (s/keys :req [::id ::tas... | |
bb9c7199cd00e08a54fd90e516c32ce1fc03ba9ca7c0379e378cbcf261ea9cc1 | loguntsov/reliable_udp | rudp_qos.erl | -module(rudp_qos).
-author("Sergey Loguntsov <>").
-record(rudp_qos, {
size = 0 :: pos_integer(),
levels = {} :: tuple()
}).
-type qos() :: #rudp_qos{}.
-type priority() :: pos_integer().
-export_type([
qos/0, priority/0
]).
%% API
-export([
new/1,
add/3,
next/1,
size/1, length/1,
is_realtime/2, has_... | null | https://raw.githubusercontent.com/loguntsov/reliable_udp/6544c08a551397182f33ca89ce2ff1db470a0daa/src/rudp_qos.erl | erlang | API
INTERNAL | -module(rudp_qos).
-author("Sergey Loguntsov <>").
-record(rudp_qos, {
size = 0 :: pos_integer(),
levels = {} :: tuple()
}).
-type qos() :: #rudp_qos{}.
-type priority() :: pos_integer().
-export_type([
qos/0, priority/0
]).
-export([
new/1,
add/3,
next/1,
size/1, length/1,
is_realtime/2, has_realtim... |
d6b1065d2883928d703893177055a5f8b845403661f4fd45d079b0718c318808 | radicle-dev/radicle-alpha | ConcurrentMap.hs | module Radicle.Internal.ConcurrentMap
( empty
, lookup
, nonAtomicRead
, insert
, modifyExistingValue
, modifyValue
, CMap
) where
import Protolude hiding (empty)
import Control.Monad.IO.Unlift
import qualified Data.Map.Strict as Map
-- | A mutable Map that serializes operations o... | null | https://raw.githubusercontent.com/radicle-dev/radicle-alpha/b38a360d9830a938fa83fc066c1d131ec903b5e1/src/Radicle/Internal/ConcurrentMap.hs | haskell | | A mutable Map that serializes operations on the same key.
Calls to the 'lookup', 'insert', 'modifyValue', and
'modifyExistingValue' with the same key are serialized. Calls to
these functions with different keys can run concurrently.
| Create a new empty 'CMap'.
| Atomically lookup a value.
| Non-atomically re... | module Radicle.Internal.ConcurrentMap
( empty
, lookup
, nonAtomicRead
, insert
, modifyExistingValue
, modifyValue
, CMap
) where
import Protolude hiding (empty)
import Control.Monad.IO.Unlift
import qualified Data.Map.Strict as Map
newtype CMap k v = CMap (MVar (Map k (MVar (May... |
c37cedabf35590c05ce69765bfb194d33b99feed7a9bb9e666744d7a14245bff | helium/router | router_decoder.erl | -module(router_decoder).
%% ------------------------------------------------------------------
%% Decoder API Exports
%% ------------------------------------------------------------------
-export([
new/3,
id/1,
type/1,
args/1
]).
%% ------------------------------------------------------------------
%%... | null | https://raw.githubusercontent.com/helium/router/769173d9edb8a40cbefe1b94d50f3f6352283b0a/src/decoders/router_decoder.erl | erlang | ------------------------------------------------------------------
Decoder API Exports
------------------------------------------------------------------
------------------------------------------------------------------
API Exports
------------------------------------------------------------------
-------------... | -module(router_decoder).
-export([
new/3,
id/1,
type/1,
args/1
]).
-export([
init_ets/0,
add/1,
delete/1,
decode/4
]).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-define(ETS, router_decoder_ets).
-record(decoder, {
id :: binary(),
type :: atom(),
args... |
fcf1ff173a2987baa6afeef8daeba760bdf88eae207ada106cf7d74b059d80fe | seriyps/mtproto_proxy | prop_mtp_fake_tls.erl | @doc property - based tests for mtp_fake_tls
-module(prop_mtp_fake_tls).
-include_lib("proper/include/proper.hrl").
-include_lib("stdlib/include/assert.hrl").
-export([prop_codec_small/1, prop_codec_big/1, prop_stream/1]).
prop_codec_small(doc) ->
"Tests that any binary below 65535 bytes can be encoded and deco... | null | https://raw.githubusercontent.com/seriyps/mtproto_proxy/5ad7c536da57ff89dea488941c7ff4711372d858/test/prop_mtp_fake_tls.erl | erlang | @doc property - based tests for mtp_fake_tls
-module(prop_mtp_fake_tls).
-include_lib("proper/include/proper.hrl").
-include_lib("stdlib/include/assert.hrl").
-export([prop_codec_small/1, prop_codec_big/1, prop_stream/1]).
prop_codec_small(doc) ->
"Tests that any binary below 65535 bytes can be encoded and deco... | |
ecaddb3c5d21529af8c31c4aea492db37f956facc32db21b749a18771de9345a | wjt/bustle | AboutDialog.hs |
Bustle . UI.AboutDialog : just the about dialog …
Copyright © 2008–2012 Collabora Ltd.
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at... | null | https://raw.githubusercontent.com/wjt/bustle/0a8cf38db3fbdca4d1501f1effa110448ab219ba/Bustle/UI/AboutDialog.hs | haskell |
Bustle . UI.AboutDialog : just the about dialog …
Copyright © 2008–2012 Collabora Ltd.
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at... | |
d4eba8a40be4dda2495b9f43974a967a1764d69f8683974184a693bcff63370a | brendanhay/terrafomo | Types.hs | -- This module was auto-generated. If it is modified, it will not be overwritten.
-- |
Module : . Packet . Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable ( GHC ex... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-packet/src/Terrafomo/Packet/Types.hs | haskell | This module was auto-generated. If it is modified, it will not be overwritten.
|
Stability : auto-generated
import Formatting (Format, (%)) |
Module : . Packet . Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.Packet.Types where
import Data . Text ( Text )
import Terrafomo
import Terrafomo ... |
15aa970fe0383132302e0e2ce8bd9ad09e2fca46a82f0a1c785b4136a5baafc3 | Frama-C/Frama-C-snapshot | metrics_coverage.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/metrics/metrics_coverage.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
3d79cc1a182ef20732671738623737f3359ab51062120e14f4367370bf8f644d | stardust66/openapi-type-provider | info.rkt | #lang info
(define version "0.1")
(define collection "openapi-type-provider")
(define deps '("base"
"typed-racket-lib"
"typed-racket-more"))
(define pkg-desc "Generate well typed client library from OpenAPI schema.")
(define pkg-authors '(""))
(define scribblings '(("scribblings/open... | null | https://raw.githubusercontent.com/stardust66/openapi-type-provider/ba298d11271bb08448f7a5d9f018f5f5c1b8f828/info.rkt | racket | #lang info
(define version "0.1")
(define collection "openapi-type-provider")
(define deps '("base"
"typed-racket-lib"
"typed-racket-more"))
(define pkg-desc "Generate well typed client library from OpenAPI schema.")
(define pkg-authors '(""))
(define scribblings '(("scribblings/open... | |
8c53f6c5f91aefbbde219f6a01f0d45e2e2d0a09f2a30ade7f40ba9257767369 | p2pcollab/ocaml-p2p | msg_id.ml |
Copyright ( C ) 2019 TG x
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 .
This program is distributed in the hope that it will be usef... | null | https://raw.githubusercontent.com/p2pcollab/ocaml-p2p/c6315b03356717f8b72c7444d3f0be233628951c/lib/p2p/msg_id.ml | ocaml |
Copyright ( C ) 2019 TG x
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 .
This program is distributed in the hope that it will be usef... | |
b5e19a91f151792a0ec748cf47aa3189616f3d302ee7868edf0f911d41a70889 | headwinds/reagent-reframe-material-ui | core.cljs | (ns devtools.formatters.core
(:require-macros [devtools.oops :refer [safe-call]])
(:require [devtools.prefs :refer [pref]]
[devtools.format :refer [IDevtoolsFormat]]
[devtools.protocols :refer [IFormat]]
[devtools.reporter :as reporter]
[devtools.formatters.templating... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/devtools/formatters/core.cljs | clojure | -- RAW API ----------------------------------------------------------------------------------------------------------------
note: body is emulated using surrogate references
see alter-json-ml-to-fit-in-remaining-budget!, in case we didn't fit into budget, a header-expander placeholder with body was added in place
-... | (ns devtools.formatters.core
(:require-macros [devtools.oops :refer [safe-call]])
(:require [devtools.prefs :refer [pref]]
[devtools.format :refer [IDevtoolsFormat]]
[devtools.protocols :refer [IFormat]]
[devtools.reporter :as reporter]
[devtools.formatters.templating... |
750c3fd4f83c4637722cffb620a9071c56c885cb93fa730867e46e983b839c18 | input-output-hk/cardano-wallet | Checkpoints.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplicatio... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/b058cffeee4979ee3ae30ea6539246ddca73f762/lib/wallet/src/Cardano/Wallet/DB/Store/Checkpoints.hs | haskell | # LANGUAGE RankNTypes #
|
License: Apache-2.0
'Store' implementations that can store various wallet types
FIXME LATER during ADP-1043:
* Inline the contents of this module into its new name
"Cardano.Wallet.DB.Sqlite.Stores"
* Testing
--------------------------------------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies... |
37288279822ded3c68cf3d5b476f91681c59bbd80b65624cfc5a3acc6d7c5d52 | whamtet/dogfort | body_parser.cljs | (ns dogfort.middleware.body-parser
(:use [cljs.node :only [log]])
(:use-macros [redlobster.macros :only [let-realised]])
(:require [redlobster.stream :as s]
[dogfort.util.codec :as codec]))
(defn- merge-params [request params]
(assoc request :params (merge (:params request {}) params)))
(defn- is-... | null | https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/src/dogfort/middleware/body_parser.cljs | clojure | (ns dogfort.middleware.body-parser
(:use [cljs.node :only [log]])
(:use-macros [redlobster.macros :only [let-realised]])
(:require [redlobster.stream :as s]
[dogfort.util.codec :as codec]))
(defn- merge-params [request params]
(assoc request :params (merge (:params request {}) params)))
(defn- is-... | |
87d22a3a8a4b839588722b96047a74291d62dae7b2e1afb4909de131739b3790 | mbutterick/aoc-racket | 07.rkt | #lang br
(require racket/file rackunit)
(define (string->ints str) (map string->number (string-split str #px",\\s*")))
(define (string->regs str) (list->vector (string->ints str)))
(define ((binarize proc) x y) (if (proc x y) 1 0))
(define (make-amp-thread program calling-thd)
(thread (λ ()
(define reg... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2019/07.rkt | racket | #lang br
(require racket/file rackunit)
(define (string->ints str) (map string->number (string-split str #px",\\s*")))
(define (string->regs str) (list->vector (string->ints str)))
(define ((binarize proc) x y) (if (proc x y) 1 0))
(define (make-amp-thread program calling-thd)
(thread (λ ()
(define reg... | |
5e549c5d3d4bd949457439adc06e7145f6c21e96819b5d264a8dc4b12a929d20 | tiagodalloca/city-weather-clj | cache.clj | (ns city-weather-clj.cache)
(defprotocol StatefulWeatherCache
(get-city-weather [this city])
(assoc-city-weather! [this city-weather]))
(defrecord AtomWeatherCache [map-atom]
StatefulWeatherCache
(get-city-weather
[_ city]
(get @map-atom (.toUpperCase city)))
(assoc-city-weather!
[_ {:keys [city... | null | https://raw.githubusercontent.com/tiagodalloca/city-weather-clj/de41488eba926abe6b8dfeec67fdad7c718dbd8f/src/city_weather_clj/cache.clj | clojure | hash-map is used becasue it is more efficient than
array-map for larger counts entries | (ns city-weather-clj.cache)
(defprotocol StatefulWeatherCache
(get-city-weather [this city])
(assoc-city-weather! [this city-weather]))
(defrecord AtomWeatherCache [map-atom]
StatefulWeatherCache
(get-city-weather
[_ city]
(get @map-atom (.toUpperCase city)))
(assoc-city-weather!
[_ {:keys [city... |
e0d8b7271b37e9773f78b2b46412d0fc53ea2ec6bb8ed22197f21724e3fa84d3 | facebook/pyre-check | searchPath.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/98b8362ffa5c715c708676c1a37a52647ce79fe0/source/searchPath.ml | ocaml | TODO(T132410158) Add a module-level doc comment. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
01b2c793d7c673ef4cecf110bace53d800c084774c8ad21b7fc2f6903b4240a9 | askonomm/blocko | core.cljs | (ns blocko.core
(:require
[reagent.core :as r]
[reagent.dom :as rdom]
[re-frame.core :refer [dispatch dispatch-sync subscribe]]
[blocko.events]
[blocko.subs]
[blocko.blocks :as blocks]))
(defn- editor [on-change-callback js?]
(let [blocks (subscribe [:blocks])]
(r/create-class
{:componen... | null | https://raw.githubusercontent.com/askonomm/blocko/64e0c7eaebb86f124b709b61791fdf77dab814bc/src/blocko/core.cljs | clojure | (ns blocko.core
(:require
[reagent.core :as r]
[reagent.dom :as rdom]
[re-frame.core :refer [dispatch dispatch-sync subscribe]]
[blocko.events]
[blocko.subs]
[blocko.blocks :as blocks]))
(defn- editor [on-change-callback js?]
(let [blocks (subscribe [:blocks])]
(r/create-class
{:componen... | |
47be8cc4fedf0f5f78420c6ea02bad2f53342ae2eb17f8065c174aa3f596787b | tonyrog/servator | servator.erl | %%
%% Create a start script from information about a running system
%%
-module(servator).
-export([make/1]).
-export([make_soft_release/1]).
-export([make_appimage/1]).
-export([make_starexec/1]).
-export([make_osxapp/1]).
-export([make_win32app/1]).
-export([make_release/1, make_release/3]).
-export([system_applica... | null | https://raw.githubusercontent.com/tonyrog/servator/809d8e0f49ab0a18a79f5dd3a6b4db4e8b6c9e66/src/servator.erl | erlang |
Create a start script from information about a running system
util
recursive
recursive
recursive
debug
-compile(export_all).
Defaults
?? FIXME ??
-define(dbg(F,A), ok).
ERL_CRASH_DUMP=/dev/null ?? FIXME Does not work ??
Others found in runtime system:
ERL_CRASH_DUMP_NICE
ERL_NO_VFORK
ERL_NO_KERNEL_POLL
... | -module(servator).
-export([make/1]).
-export([make_soft_release/1]).
-export([make_appimage/1]).
-export([make_starexec/1]).
-export([make_osxapp/1]).
-export([make_win32app/1]).
-export([make_release/1, make_release/3]).
-export([system_applications/0]).
-export([otp_applications/0]).
-export([user_applications/0,... |
6b8f3e82deba84f0f3c5ce1f66960eb75f28622ddd33f673ad0259c95ff47571 | hspec/hspec | Spec.hs | import Test.Hspec
import Control.Exception
import Control.Concurrent
main :: IO ()
main = hspec $
describe "it" $ do
it "should run" $ do
(threadDelay 10000000 >> putStrLn "ran action")
`finally` (threadDelay 1000000 >> putStrLn "ran finalizer")
| null | https://raw.githubusercontent.com/hspec/hspec/b48eee41032450123044de82c4c02213813563b1/test/regression/issue-270/Spec.hs | haskell | import Test.Hspec
import Control.Exception
import Control.Concurrent
main :: IO ()
main = hspec $
describe "it" $ do
it "should run" $ do
(threadDelay 10000000 >> putStrLn "ran action")
`finally` (threadDelay 1000000 >> putStrLn "ran finalizer")
| |
0f6cb5c05132e4a32e524a2a383c4a8a9d9a9c6968d82fcff9d79695c9f605a6 | haskell-cryptography/libsodium-bindings | PasswordHashing.hs | # LANGUAGE CApiFFI #
# LANGUAGE Trustworthy #
-- |
--
Module : LibSodium . Bindings . PasswordHashing
Description : Direct bindings to the password hashing primitives of Libsodium .
Copyright : ( C ) Hécate Moonlight 2022
-- License: BSD-3-Clause
Maintainer : The Haskell Cryptography Group
-- Stability: Stable... | null | https://raw.githubusercontent.com/haskell-cryptography/libsodium-bindings/127113199e7b3f91305cc34b169b06a2622d65da/libsodium-bindings/src/LibSodium/Bindings/PasswordHashing.hs | haskell | |
License: BSD-3-Clause
Stability: Stable
* Introduction
$introduction
* Operations
* Constants
$introduction
This modules provides an API that can be used both for key derivation using a low-entropy input and password storage.
=== Guidelines for choosing the parameters
Start by determining how much memory... | # LANGUAGE CApiFFI #
# LANGUAGE Trustworthy #
Module : LibSodium . Bindings . PasswordHashing
Description : Direct bindings to the password hashing primitives of Libsodium .
Copyright : ( C ) Hécate Moonlight 2022
Maintainer : The Haskell Cryptography Group
Portability : GHC only
module LibSodium.Bindings.Pa... |
4f8abdcb356e9ac070d339e69720af0f5361cc2e943461ad91e4c491c0d6637d | aisamanra/config-ini | Main.hs | # LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Main where
import Data.Ini.Config.Bidir
import Data.Text (Text, unpack)
import Lens.Micro.TH (makeLenses)
data Config = Config
{ _confUsername :: Text,
_confPort :: Int,
_confUseEncryption :: Bool,
_conf... | null | https://raw.githubusercontent.com/aisamanra/config-ini/35dd9a28d32fde6c78b778653359579d65386d79/examples/bidir-example/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
module Main where
import Data.Ini.Config.Bidir
import Data.Text (Text, unpack)
import Lens.Micro.TH (makeLenses)
data Config = Config
{ _confUsername :: Text,
_confPort :: Int,
_confUseEncryption :: Bool,
_confHostname :: Text,
_confConfigFi... |
d5c64cf36b1ffee5edd0a58de6cf38433a21315b78f942388af372eb1551ed00 | tolysz/spock-ghcjs-sample | User.hs |
module MyProject.Api.User where
import Data.Int
import Web.Spock.Api
import qualified Data.Text as T
data LoginReq
= LoginReq
{ lr_username :: !T.Text
, lr_password :: !T.Text
} deriving (Show, Eq, Generic, NFData, Typeable, ToJSON, FromJSON)
data LoginResp
= LoginOkay !User
| LoginFailed
deriv... | null | https://raw.githubusercontent.com/tolysz/spock-ghcjs-sample/4b5b7cb28bedcb57f243de60c4553e4540f64b59/project-api/src/MyProject/Api/User.hs | haskell |
module MyProject.Api.User where
import Data.Int
import Web.Spock.Api
import qualified Data.Text as T
data LoginReq
= LoginReq
{ lr_username :: !T.Text
, lr_password :: !T.Text
} deriving (Show, Eq, Generic, NFData, Typeable, ToJSON, FromJSON)
data LoginResp
= LoginOkay !User
| LoginFailed
deriv... | |
3e693e82d8ef07863e990e4466c69dbf13fea1f28a339d100c6527fd99719c4f | rajasegar/cl-bootstrap | forms.lisp | file :
(in-package :cl-bootstrap)
(defmacro bs-form-input (type (&key label id name placeholder))
(let ((g-id (gensym))
(g-name (gensym))
(g-placeholder (gensym)))
`(let ((,g-id ,id)
(,g-name ,name)
(,g-placeholder ,placeholder))
(with-html-output (*standard-output*)
(:div :class "form-gro... | null | https://raw.githubusercontent.com/rajasegar/cl-bootstrap/c6a1150bd3609817634d8c11d53ac1e97f114796/src/forms.lisp | lisp | file :
(in-package :cl-bootstrap)
(defmacro bs-form-input (type (&key label id name placeholder))
(let ((g-id (gensym))
(g-name (gensym))
(g-placeholder (gensym)))
`(let ((,g-id ,id)
(,g-name ,name)
(,g-placeholder ,placeholder))
(with-html-output (*standard-output*)
(:div :class "form-gro... | |
372fc44ca89156f7cec2bc1228fe5eb7f5197ebeb3fcc2791e88fa1479d926ec | autolwe/autolwe | DeducMatSig.ml | open Expr
open MatData
open ExprUtils
open Util
open NCGroebner
open MatSig
open MatData
open Num
open Abbrevs
module type MATDEDUC = functor (M : MATDATA) -> sig
type split_subgoals = SSBase of M.mat | SSConcatR of (split_subgoals *
split_subgoals) | SSConcatL of (split_subgoals * split_subgoals)
val sol... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Deduce/DeducMatSig.ml | ocaml | --- actual deducibility ---
compute target pol, split into subgoals
compute input mats
norm
fullly split
add trans
norm
throw in constants | open Expr
open MatData
open ExprUtils
open Util
open NCGroebner
open MatSig
open MatData
open Num
open Abbrevs
module type MATDEDUC = functor (M : MATDATA) -> sig
type split_subgoals = SSBase of M.mat | SSConcatR of (split_subgoals *
split_subgoals) | SSConcatL of (split_subgoals * split_subgoals)
val sol... |
3370e85a340ca2d07476728dc17e6122d4011e2529b7605b98fde3de697ddf1d | RedPRL/cooltt | Elaborator.mli | open Core
module CS := ConcreteSyntax
module S := Syntax
module RM := Monads.RefineM
module D := Domain
open Tactic
val chk_tp : CS.con -> Tp.tac
val chk_tp_in_tele : CS.cell list -> CS.con -> Tp.tac
val chk_tm : CS.con -> Chk.tac
val chk_tm_in_tele : CS.cell list -> CS.con -> Chk.tac
val syn_tm : ?elim_total:bool ->... | null | https://raw.githubusercontent.com/RedPRL/cooltt/88511e10cb9e17286f585882dee334f3d8ace47c/src/frontend/Elaborator.mli | ocaml | open Core
module CS := ConcreteSyntax
module S := Syntax
module RM := Monads.RefineM
module D := Domain
open Tactic
val chk_tp : CS.con -> Tp.tac
val chk_tp_in_tele : CS.cell list -> CS.con -> Tp.tac
val chk_tm : CS.con -> Chk.tac
val chk_tm_in_tele : CS.cell list -> CS.con -> Chk.tac
val syn_tm : ?elim_total:bool ->... | |
05da0bb579bce2d9689339f27d1ced01a58eac9ff1d897b555cc56ea3d4e6f58 | tonymorris/geo-osm | MaximumL.hs | -- | Values with a @maximum@ string accessor.
module Data.Geo.OSM.Lens.MaximumL where
import Control.Lens.Lens
class MaximumL a where
maximumL ::
Lens' a String
| null | https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Lens/MaximumL.hs | haskell | | Values with a @maximum@ string accessor. | module Data.Geo.OSM.Lens.MaximumL where
import Control.Lens.Lens
class MaximumL a where
maximumL ::
Lens' a String
|
04f4dbd0c0f77c82c23f5ae05a2996157a2ab5f44bf9fbf59b38f53331facad7 | clojure-interop/google-cloud-clients | TextToSpeechClient.clj | (ns com.google.cloud.texttospeech.v1.TextToSpeechClient
"Service Description: Service that implements Google Cloud Text-to-Speech API.
This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:
try (TextToSpeechClient... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.texttospeech/src/com/google/cloud/texttospeech/v1/TextToSpeechClient.clj | clojure |
"
specifying \"zh\ " will also get supported \"cmn-*\ " voices ; specifying \"zh - hk\ " will also get supported \"yue-*\ " voices . - ` java.lang . String `
| (ns com.google.cloud.texttospeech.v1.TextToSpeechClient
"Service Description: Service that implements Google Cloud Text-to-Speech API.
This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:
try (TextToSpeechClient... |
233d29b943c83acc15c172de0866a88ac89cdf7751dc99614846da60f761d8fa | RefactoringTools/HaRe | A2.hs | module RmOneParameter.A2 where
import RmOneParameter.D2
sumSq xs ys= sum (map sq xs) + sumSquares xs ys
main = sumSq [1..4]
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/RmOneParameter/A2.hs | haskell | module RmOneParameter.A2 where
import RmOneParameter.D2
sumSq xs ys= sum (map sq xs) + sumSquares xs ys
main = sumSq [1..4]
| |
1fcce252e120e9f1241caf5cc7d5607237c94231655e1bd2d61013d8b0ee7c6e | tuscland/lw-project-generator | utilities.lisp | -*- encoding : utf-8 ; mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
LispWorks Project Generator .
Copyright ( c ) 2013 , . 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.... | null | https://raw.githubusercontent.com/tuscland/lw-project-generator/21bafd22cd3fc6bb0762155df764dc5538369a9a/src/utilities.lisp | lisp | mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
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,
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
exp... |
LispWorks Project Generator .
Copyright ( c ) 2013 , . All rights reserved .
software distributed under the License is distributed on an " AS
(in-package "COM.WILDORA.PROJECT-GENERATOR")
(defun pathname-as-relative (parent subpath
&optional (defaults *default-pathname-defaults... |
b024dae1d9029b6c7291abe58f69149fbe58f5394116772b4678e89b3d58f118 | simmone/racket-simple-xlsx | set-col-width-test.rkt | #lang racket
(require rackunit/text-ui rackunit)
(require"../../../xlsx/xlsx.rkt")
(require"../../../sheet/sheet.rkt")
(require"../../../style/style.rkt")
(require"../../../style/set-styles.rkt")
(define test-styles
(test-suite
"test-styles"
(test-case
"test-styles-set-col-width"
(with-xlsx
(l... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/style/set-styles/set-col-width-test.rkt | racket | #lang racket
(require rackunit/text-ui rackunit)
(require"../../../xlsx/xlsx.rkt")
(require"../../../sheet/sheet.rkt")
(require"../../../style/style.rkt")
(require"../../../style/set-styles.rkt")
(define test-styles
(test-suite
"test-styles"
(test-case
"test-styles-set-col-width"
(with-xlsx
(l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.