_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 |
|---|---|---|---|---|---|---|---|---|
2de96a9e12620d37eb2a8729aef1a90f3c6f9cf545ff90f86c052a7e75eeca1f | privet-kitty/cl-competitive | rho.lisp | (defpackage :cp/test/rho
(:use :cl :fiveam :cp/rho :cp/linear-sieve)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/rho)
(in-suite base-suite)
(test rho
(let ((mtable (make-minfactor-table 10000))
(*random-state* (sb-ext:seed-random-state 0))
(*test-dribble* nil))
(loop for x... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/da1d7a5fdff189d011348a772293d3d099b962d5/module/test/rho.lisp | lisp | (defpackage :cp/test/rho
(:use :cl :fiveam :cp/rho :cp/linear-sieve)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/rho)
(in-suite base-suite)
(test rho
(let ((mtable (make-minfactor-table 10000))
(*random-state* (sb-ext:seed-random-state 0))
(*test-dribble* nil))
(loop for x... | |
72c6ca1d5c02b3bbc11d4f9e7d4db6cfdbe9b19d3156abf7ff918c29af6159db | camllight/camllight | loadall.ml | compile "code.mli";;
compile "code.ml";;
load_object "code.zo";;
compile "simul.mli";;
compile "simul.ml";;
load_object "simul.zo";;
compile "exec.ml";;
load_object "exec.zo";;
compile "stockage.mli";;
compile "stockage.ml";;
load_object "stockage.zo";;
compile "lexuniv.mli";;
compile "lexuniv.ml";;
load_object "lexuni... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/examples/picomach/loadall.ml | ocaml | compile "code.mli";;
compile "code.ml";;
load_object "code.zo";;
compile "simul.mli";;
compile "simul.ml";;
load_object "simul.zo";;
compile "exec.ml";;
load_object "exec.zo";;
compile "stockage.mli";;
compile "stockage.ml";;
load_object "stockage.zo";;
compile "lexuniv.mli";;
compile "lexuniv.ml";;
load_object "lexuni... | |
409c4cd955b6804eb7e8c680ed94be166e01a59450a78e2afb24df6d4a7ab8c0 | silkapp/girella | Columns.hs | # LANGUAGE
DeriveDataTypeable
, FlexibleInstances
, LambdaCase
, MultiParamTypeClasses
, OverloadedStrings
, TemplateHaskell
, TypeFamilies
, UndecidableInstances
#
DeriveDataTypeable
, FlexibleInstances
, LambdaCase
, MultiParamTypeClasses
, OverloadedStrings
, Templ... | null | https://raw.githubusercontent.com/silkapp/girella/f2fbbaaa2536f1afc5bc1a493d02f92cec81da18/example/User/Columns.hs | haskell | Per convention we use 'id' and '(.)' 'from Control.Category' If you
don't want this, use 'returnA' and '<<<' respectively instead.
| We use a newtype to reperesent a foreign key
| This generates the following instances for our type:
To convert from a postgresql type to Id:
To convert from Id to an opaleye value... | # LANGUAGE
DeriveDataTypeable
, FlexibleInstances
, LambdaCase
, MultiParamTypeClasses
, OverloadedStrings
, TemplateHaskell
, TypeFamilies
, UndecidableInstances
#
DeriveDataTypeable
, FlexibleInstances
, LambdaCase
, MultiParamTypeClasses
, OverloadedStrings
, Templ... |
f165abb7619accb228df543995aaf49dc7f78c66dbd1963b6077272ab5b9e501 | 5HT/ant | GlyphBitmap.ml |
open Unicode.Types;
type glyph =
{
g_glyph : int;
g_width : int;
g_height : int;
g_depth : int;
g_hdpp : float;
g_vdpp : float;
g_min_x : int;
g_min_y : int;
g_max_x : int;
g_max_y : int;
g_bitmap : Bitmap.bitmap
};
value empty_glyph =
{
g_glyph = -1;
g_width = 0;
g_height = ... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/GlyphBitmap.ml | ocaml |
open Unicode.Types;
type glyph =
{
g_glyph : int;
g_width : int;
g_height : int;
g_depth : int;
g_hdpp : float;
g_vdpp : float;
g_min_x : int;
g_min_y : int;
g_max_x : int;
g_max_y : int;
g_bitmap : Bitmap.bitmap
};
value empty_glyph =
{
g_glyph = -1;
g_width = 0;
g_height = ... | |
90de91971bebe36ff73aa0e448483894b66c15583be511830bd14f3bc135827f | BranchTaken/Hemlock | test_file2.ml | open Basis
let buffer = Bytes.Slice.of_string_slice (String.C.Slice.of_string "
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis au... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/7a3facdc0a30fa72bc4c95f3abed6117c30de497/bootstrap/test/basis/file/test_file2.ml | ocaml | open Basis
let buffer = Bytes.Slice.of_string_slice (String.C.Slice.of_string "
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis au... | |
c5f4ad2eb83645b8d72e0a931fac7e2d46bcdf2e0b3626241f056bb4010d3c22 | haskell-suite/haskell-src-exts | Rules.hs | # RULES " head / build " forall ( g::forall b.(a->b->b)->b->b ) . head ( build g ) = g ( \x _ - > x ) badHead #
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/Rules.hs | haskell | # RULES " head / build " forall ( g::forall b.(a->b->b)->b->b ) . head ( build g ) = g ( \x _ - > x ) badHead #
| |
47a91cd7c5506cc0364dc8236c9639b0252f91483c898ff1d2eb9343afcf472d | expipiplus1/vulkan | VK_NV_geometry_shader_passthrough.hs | {-# language CPP #-}
-- | = Name
--
VK_NV_geometry_shader_passthrough - device extension
--
= = VK_NV_geometry_shader_passthrough
--
-- [__Name String__]
-- @VK_NV_geometry_shader_passthrough@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
96
--
-- [__Revision__... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_NV_geometry_shader_passthrough.hs | haskell | # language CPP #
| = Name
[__Name String__]
@VK_NV_geometry_shader_passthrough@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
[__Contact__]
== Other Extension Metadata
[__Last Modified Date__]
[__Interacti... | VK_NV_geometry_shader_passthrough - device extension
= = VK_NV_geometry_shader_passthrough
96
1
- Requires support for Vulkan 1.0
-
< -Docs/issues/new?body=[VK_NV_geometry_shader_passthrough ] @dgkoch%0A*Here describe the issue or question you have about the VK_NV_geometry_... |
9db3c964d633c3a46b09f8828c225457f3ef0bb2130bf119704db6dfaffdfe1d | maybevoid/casimir | State.hs |
module Casimir.Test.Ops.State where
import Test.Tasty
import Test.Tasty.HUnit
import Data.IORef
import Control.Monad.Identity
import Control.Monad.Trans.State.Strict
(StateT, runStateT, evalStateT)
import Casimir
import Casimir.Free
import Casimir.Ops.Io
import Casimir.Ops.Env
import Casimir.Ops.State
import Cas... | null | https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/test/Casimir/Test/Ops/State.hs | haskell |
module Casimir.Test.Ops.State where
import Test.Tasty
import Test.Tasty.HUnit
import Data.IORef
import Control.Monad.Identity
import Control.Monad.Trans.State.Strict
(StateT, runStateT, evalStateT)
import Casimir
import Casimir.Free
import Casimir.Ops.Io
import Casimir.Ops.Env
import Casimir.Ops.State
import Cas... | |
acc534cbc49ee0fe7544833b969d0fefc7d5b3e400c18d96c70123e9901159ba | isovector/transitive-anns | Types.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
module TransitiveAnns.Types where
import qualified Data.Set as S... | null | https://raw.githubusercontent.com/isovector/transitive-anns/548f115856fb94a2c7c3b3c8de595d18136129cb/src/TransitiveAnns/Types.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE ScopedTypeVariables # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
module TransitiveAnns.Types where
import qualified Data.Set as S
import Data.Set (Set)
import Data.Data (Typeable, Data)
import GHC.TypeLits (Symbol)
data Location = Local | Remote... |
7466a202edf4cb7ddd9052bb37a8ec34ee9e3c9e1c1277e9e7ae248424095cb8 | ghollisjr/cl-ana | h5ex-t-stringatt.lisp | Copyright by The HDF Group .
;;;; All rights reserved.
;;;;
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
;;;; use, modification, and redistribution, is contained in the file COPYING,
;;;; which can be found at th... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/examples/datatypes/h5ex-t-stringatt.lisp | lisp | All rights reserved.
use, modification, and redistribution, is contained in the file COPYING,
which can be found at the root of the source code distribution tree.
If you do not have access to this file, you may request a copy from
.
This example shows how to read and write string datatypes
outputs it to the scr... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
to an attribute . The program first writes strings to an
attribute with a dataspace of DIM0 , then closes the file .
Next , it re... |
171f39a164f33784efd6d396f779ebc07420ca00c07908ba6eae52e4c34a402b | input-output-hk/cardano-sl | Toss.hs | -- | Toss abstraction and logic.
module Pos.Chain.Ssc.Toss
( module Pos.Chain.Ssc.Toss.Base
, module Pos.Chain.Ssc.Toss.Class
, module Pos.Chain.Ssc.Toss.Logic
, module Pos.Chain.Ssc.Toss.Pure
, module Pos.Chain.Ssc.Toss.Types
) where
import Pos.Chain.Ssc.Toss.Base
i... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Ssc/Toss.hs | haskell | | Toss abstraction and logic. | module Pos.Chain.Ssc.Toss
( module Pos.Chain.Ssc.Toss.Base
, module Pos.Chain.Ssc.Toss.Class
, module Pos.Chain.Ssc.Toss.Logic
, module Pos.Chain.Ssc.Toss.Pure
, module Pos.Chain.Ssc.Toss.Types
) where
import Pos.Chain.Ssc.Toss.Base
import Pos.Chain.Ssc.Tos... |
2d65e5863326ade8dd3186b57a91cb6ff907d5ceadb58564c75e8a22186e5302 | expipiplus1/vulkan | Bracket.hs | module XR.Bracket
( brackets
) where
import Data.List ( (\\) )
import qualified Data.Map as Map
import qualified Data.Text.Extra as T
import Data.Vector ( Vector )
import Polysemy
import Relude ... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/xr/XR/Bracket.hs | haskell | TODO: Missing functions here should be warnings, because we might be
generating a different version of the spec.
TODO:
, cdBracket "VulkanInstanceKHR"
Check that we can generate all the handles
A crude way of getting all the type names we generate | module XR.Bracket
( brackets
) where
import Data.List ( (\\) )
import qualified Data.Map as Map
import qualified Data.Text.Extra as T
import Data.Vector ( Vector )
import Polysemy
import Relude ... |
f76c94b911901b1140efd017e860853e5a60d5ba84e9c8a7dcf8e17c3efcb5c5 | system-f/papa | Base.hs | # LANGUAGE NoImplicitPrelude #
module Papa.Base(
module Papa.Base.Export,
module Papa.Base.Implement
) where
import Papa.Base.Export
import Papa.Base.Implement
| null | https://raw.githubusercontent.com/system-f/papa/5c4d71e08b905a882dd9a4a7d0c336411971c360/papa-base/src/Papa/Base.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Papa.Base(
module Papa.Base.Export,
module Papa.Base.Implement
) where
import Papa.Base.Export
import Papa.Base.Implement
| |
3d0ddfabe8e2b780e52c60ef122b8324013a7e4aadd2fca77b09737f5f9f8791 | taksuyu/mahjong | Player.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- | Stability: Experimental
module Mahjong.Player where
import Mahjong.Class
import Mahjong.Tile
| Tiles can only be stolen to make a Meld , and once that is formed using
-- a stolen tile it cannot be changed for the duration of the hand. Since
-- visualization is somethin... | null | https://raw.githubusercontent.com/taksuyu/mahjong/720abe28ccee8ee21a2590b5abe08e64287458e0/src/Mahjong/Player.hs | haskell | | Stability: Experimental
a stolen tile it cannot be changed for the duration of the hand. Since
visualization is something to consider, we'll support which tile should be
represented by their position to the player that stole the tile. For instance
Functionally this serves no purpose other than a rule of thumb fo... | # LANGUAGE GeneralizedNewtypeDeriving #
module Mahjong.Player where
import Mahjong.Class
import Mahjong.Tile
| Tiles can only be stolen to make a Meld , and once that is formed using
if the player that steals is North and the player that is stolen from is
South then in a Run the stolen tile will be a second o... |
bca4ac26eaac01bfbfa2b0f0d8d69e06cda4d159aa38744046f0dd8db50a9517 | exercism/ocaml | react.ml | type 'a cell
type callback_id
let create_input_cell ~value ~eq =
failwith "'create_input_cell' is missing"
let value_of _ =
failwith "'value_of' is missing"
let set_value _ =
failwith "'set_value' is missing"
let create_compute_cell_1 _ ~f ~eq =
failwith "'create_compute_cell_1' is missing"
let cre... | null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/react/react.ml | ocaml | type 'a cell
type callback_id
let create_input_cell ~value ~eq =
failwith "'create_input_cell' is missing"
let value_of _ =
failwith "'value_of' is missing"
let set_value _ =
failwith "'set_value' is missing"
let create_compute_cell_1 _ ~f ~eq =
failwith "'create_compute_cell_1' is missing"
let cre... | |
6b00cce1901d098354aaee0e66d10e179e63d903c0ad129544d17252370f6072 | i-am-tom/learn-me-a-haskell | Types.hs | # OPTIONS_HADDOCK not - home #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
|
Module : HTree . Types
Description : The ' HTree ' type and its instances .
Copyright : ( c ) , 2018
... | null | https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/src/HTree/Types.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
| Every node within a tree is either red or black. Here's me avoiding the
ol' boolean blindness with some domain types.
| Our 'HTree' will be indexed by /this/ tree type, which holds a colour for
each node. These are used for tree-balancing, as per the l... | # OPTIONS_HADDOCK not - home #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
|
Module : HTree . Types
Description : The ' HTree ' type and its instances .
Copyright : ( c ) , 2018
License : MIT
Maintainer :
Stability : experimental
... |
a1c957140ccc1d668e976a1d1a205ad9065dba79277e9a280bb41b762f7cd7f9 | fisxoj/json-schema | reference.lisp | (defpackage :json-schema/test.reference
(:local-nicknames (:put :json-schema.reference)
(:utils :json-schema.utils)
(:parse :json-schema.parse))
(:use :cl :rove))
(in-package :json-schema/test.reference)
(defmacro with-context ((&key uri-stack references named-references (s... | null | https://raw.githubusercontent.com/fisxoj/json-schema/cece5ac048298b955ff44bdf90257aa1d921c75c/t/reference.lisp | lisp | -schema/pull/16 | (defpackage :json-schema/test.reference
(:local-nicknames (:put :json-schema.reference)
(:utils :json-schema.utils)
(:parse :json-schema.parse))
(:use :cl :rove))
(in-package :json-schema/test.reference)
(defmacro with-context ((&key uri-stack references named-references (s... |
f04a84dbcac9a69e50eccdac96ef3b44e75c535c1598b2aa1052f96105355463 | csm/s4 | test_util.clj | (ns s4.test-util
(:require [s4.core :as s4]
s4.server)
(:import (java.time Instant Clock ZoneOffset)
(java.net InetSocketAddress)))
(def ^:dynamic *s4* nil)
(def ^:dynamic *port* nil)
(def access-key "ACCESSKEY")
(def secret-key "SECRET/ACCESS/KEY")
(def epoch 0x5d000000) ; arbitrary
(def... | null | https://raw.githubusercontent.com/csm/s4/a09662bbd1696ee2159545523d5def34802fcc16/test/s4/test_util.clj | clojure | arbitrary | (ns s4.test-util
(:require [s4.core :as s4]
s4.server)
(:import (java.time Instant Clock ZoneOffset)
(java.net InetSocketAddress)))
(def ^:dynamic *s4* nil)
(def ^:dynamic *port* nil)
(def access-key "ACCESSKEY")
(def secret-key "SECRET/ACCESS/KEY")
(def secs (atom epoch))
(defn static-c... |
fe089d52302686881c20364b0460445d123ba7c9af747266f436eee0e507bd2f | PUGzera/DATX02-DIT561 | Eval.hs | | Evaluates expressions and runs them in GHC .
module Frontend.Eval (
display,
display',
getResult,
getResults,
runExpr,
runExpr',
runDaisonStmt,
runDecl',
runStmt'
) where
import qualified Frontend.GHCInterface as GHC
import Frontend.Base
import Frontend.Format
import Frontend.Typecheck
import Fro... | null | https://raw.githubusercontent.com/PUGzera/DATX02-DIT561/3b2fa9acdf312ab5c30a55469cd130b0b99e7ff4/src/Frontend/Eval.hs | haskell | | Send a printable value to the 'less' command via the 'echo' command,
making it navigable with the arrow keys.
If this is not possible, or if the string is short, print normally
| Same as display, but send to 'less' even if the string is short.
avoid use of ++ operator
| Determine if the string representa... | | Evaluates expressions and runs them in GHC .
module Frontend.Eval (
display,
display',
getResult,
getResults,
runExpr,
runExpr',
runDaisonStmt,
runDecl',
runStmt'
) where
import qualified Frontend.GHCInterface as GHC
import Frontend.Base
import Frontend.Format
import Frontend.Typecheck
import Fro... |
1f16e77815359a97a167c2daf1ad63f834d4853fb7f5e8604a811de71a2abcd9 | fourmolu/fourmolu | PrinterSpec.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Ormolu.PrinterSpec (spec) where
import Control.Exception
import Control.Monad
import Data.List (isSuffixOf)
import qualified Data.Map as Map
import Data.Maybe (isJust)
import Data.Text (Text)
import qualified Data.Text as T... | null | https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/tests/Ormolu/PrinterSpec.hs | haskell | # LANGUAGE OverloadedStrings #
| Fixities that are to be used with the test examples.
| Check a single given example.
'ormoluFile' automatically.)
output again (the transformation is idempotent).
| Build list of examples for testing.
| Does given path look like input path (as opposed to expected output
path)?
|... | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Ormolu.PrinterSpec (spec) where
import Control.Exception
import Control.Monad
import Data.List (isSuffixOf)
import qualified Data.Map as Map
import Data.Maybe (isJust)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T... |
702eb9942588cf18a7a39e26f8e79e72064ef5013f7e17618b776089c968ad61 | deepfire/holotype | Cairo.hs | # OPTIONS_GHC -Wall -Wno - orphans -Wno - unticked - promoted - constructors #
module Graphics.Cairo
(
Cairo(..), cairoCreate, cairoDestroy
, runCairo
, cairoToGICairo
-- Temporary: until -gi/haskell-gi/issues/188 is fixed
, pangoCairoCreateContext
, pangoLayoutNew
--
, crColor
, crMoveTo
-- *... | null | https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/src/Graphics/Cairo.hs | haskell | Temporary: until -gi/haskell-gi/issues/188 is fixed
* Font types
* Query
* Main API
* Layout
|
Create a new 'GI.Pango.Objects.Layout.Layout' object with attributes initialized to
default values for a particular 'GI.Pango.Objects.Context.Context'.
^ /@context@/: a 'GI.Pango.Objects.Context.Context'
$Font cho... | # OPTIONS_GHC -Wall -Wno - orphans -Wno - unticked - promoted - constructors #
module Graphics.Cairo
(
Cairo(..), cairoCreate, cairoDestroy
, runCairo
, cairoToGICairo
, pangoCairoCreateContext
, pangoLayoutNew
, crColor
, crMoveTo
, FontSpec(..)
, Font(..), WFont, FKind(..)
, FontSizeRequest(.... |
9be2d3945f6f8feecfd8393fd1fc1987c3c2e63f10e2fb720f2db7e32e38b3b2 | AndrasKovacs/ELTE-func-lang | Notes10.hs |
-- parser monád folytatás
import Prelude hiding (exp)
import Control.Monad
import Control.Applicative -- many, some
isSpace , isLetter , isDigit , isAlpha
State String + Maybe
newtype Parser a = Parser {runParser :: String -> Maybe (a, String)}
-- deriving Functor
instance Functor Parser where
fmap f (P... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-2/ea/Notes10.hs | haskell | parser monád folytatás
many, some
deriving Functor
őrfeltétel: f c
üres inputra illeszkedik
konkrét String olvasása
many és some
many regex: (_)*
some refex: (_)+
----------------------------------------------------------
a <- pa
as <- many $ do
a <- pa
pb
pure a
pure (a:as)
Applicat... |
import Prelude hiding (exp)
import Control.Monad
isSpace , isLetter , isDigit , isAlpha
State String + Maybe
newtype Parser a = Parser {runParser :: String -> Maybe (a, String)}
instance Functor Parser where
fmap f (Parser g) = Parser $ \s ->
fmap (\(a, s') -> (f a, s')) (g s)
instance Applicative Pa... |
67785d34e11a7827ec3d266d8de2102c13e33f1dfee961f0f8464883cf14bcc4 | racket/old-plt | java.table.scm | ;
Table generated from the file ~/java / comp / java.lex by SILex 1.0
;
(define java-lex-table
(vector
'all
(lambda (yycontinue yygetc yyungetc)
(lambda (yytext yyline yycolumn yyoffset)
'(0)
))
(lambda (yycontinue yygetc yyungetc)
(lambda (yytext yyline yycolumn yyoffset)
... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/java/java.table.scm | scheme |
Added for Contract Java, @pre, @post, /*@ ... @*/.
| Table generated from the file ~/java / comp / java.lex by SILex 1.0
(define java-lex-table
(vector
'all
(lambda (yycontinue yygetc yyungetc)
(lambda (yytext yyline yycolumn yyoffset)
'(0)
))
(lambda (yycontinue yygetc yyungetc)
(lambda (yytext yyline yycolumn yyoffset)
... |
aad84ec9c9bea6064b2a9f247e567d1dc017a000d13b49209323914618a5c509 | ulricha/dsh | Kure.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE InstanceSigs #
| Infrastructure for KURE - based rewrites on NKL expressions
module Database.DSH.NKL.Kure
* Re - export relevant KURE modules
module Language.KURE
, module La... | null | https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/NKL/Kure.hs | haskell | # LANGUAGE RankNTypes #
* Setters and getters for the translation state
* Changing between stateful and non-stateful transforms
* Congruence combinators
------------------------------------------------------------------------------
Convenience type aliases
------------------------------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE InstanceSigs #
| Infrastructure for KURE - based rewrites on NKL expressions
module Database.DSH.NKL.Kure
* Re - export relevant KURE modules
module Language.KURE
, module Language.KURE.Lens
* The KURE monad
... |
8675664aab4397e0bced3d3c15b399f120180cba4bbc82b9134b21b543328715 | Ptival/language-ocaml | ValueBinding.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Language.OCaml.PrettyPrinter.ValueBinding
( valueBindingPP,
)
where
import Language.OCaml.Definitions.Parsing.ParseTree
( Expression,
ValueBinding (pvbExpr, pvbPat)... | null | https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/ValueBinding.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Language.OCaml.PrettyPrinter.ValueBinding
( valueBindingPP,
)
where
import Language.OCaml.Definitions.Parsing.ParseTree
( Expression,
ValueBinding (pvbExpr, pvbPat),
)
import Language.OCaml.PrettyP... |
ad4f6d1c8f35f664a1ea971c2d70e493f3b1ff0630321ec789a0ae8a948fb44d | hindol/json-rpc | url_test.clj | (ns json-rpc.url-test
(:require
[clojure.test :refer [are deftest is testing]]
[json-rpc.url :refer [path scheme]]))
(deftest scheme-test
(testing "with HTTP and HTTPS URL"
(are [expected parsed] (= expected parsed)
:http (scheme "")
:https (scheme "")))
(testing "with WS and WSS URL"
... | null | https://raw.githubusercontent.com/hindol/json-rpc/fb9805c1e1e62f01b43f432870924e35a0515b36/core/test/json_rpc/url_test.clj | clojure | (ns json-rpc.url-test
(:require
[clojure.test :refer [are deftest is testing]]
[json-rpc.url :refer [path scheme]]))
(deftest scheme-test
(testing "with HTTP and HTTPS URL"
(are [expected parsed] (= expected parsed)
:http (scheme "")
:https (scheme "")))
(testing "with WS and WSS URL"
... | |
7ef7d0e797779ad16e4c122d9281b3302b37d5f9b6aeaa04e849dc2e711480f4 | conscell/hugs-android | Tree.hs | module Tree where
import Gofer
-- Here are a collection of fairly standard functions for manipulating
one form of binary trees
data Tree a = Lf a | Tree a :^: Tree a
reflect t@(Lf x) = t
reflect (l:^:r) = r :^: l
mapTree f (Lf x) = Lf (f x)
mapTree f (l:^:r) = mapTree f l :^: mapTree f r
-- Functions to calc... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/demos/Tree.hs | haskell | Here are a collection of fairly standard functions for manipulating
Functions to calculate the list of leaves on a tree:
direct version
using an accumulating parameter
Picturing a tree:
and recursion to create a `cyclic' program which avoids multiple traversals
over a data structure: | module Tree where
import Gofer
one form of binary trees
data Tree a = Lf a | Tree a :^: Tree a
reflect t@(Lf x) = t
reflect (l:^:r) = r :^: l
mapTree f (Lf x) = Lf (f x)
mapTree f (l:^:r) = mapTree f l :^: mapTree f r
leaves, leaves' :: Tree a -> [a]
leaves (l:^:r) = leaves l ++ leaves r
... |
81d8d65050e3064c0bedffde50f1c83d4115e3237b55d6414035a9416409bd91 | cracauer/sbcl-ita | sparc-vm.lisp | ;;;; SPARC-specific runtime stuff
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/src/code/sparc-vm.lisp | lisp | SPARC-specific runtime stuff
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
MACHINE-TYPE
See also x86-vm for commentary on signed vs unsigned.
FIXME: Should this and CONTEXT-PC be INLINE... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
See x86-vm.lisp for a description of this .
(define-alien-type os-context-t (struct os-context-t-stru... |
f21a8adb63f0cfc9fbc7b4d15a481eece3b4fdaef497a2efb7f5b045e4717ea6 | hugoduncan/muir | ast_test.clj | (ns muir.ast-test
(:require
[clojure.test :refer :all]
[clojure.walk :refer [macroexpand-all]]
[muir.ast :refer :all]))
;;; simple test of generating an AST
(defmacro form-ast [form]
(list 'quote (analyse-form (ns-name *ns*) form)))
(deftest ast-test
(let [ast (form-ast (let [x 1] x))]
(is (= :invo... | null | https://raw.githubusercontent.com/hugoduncan/muir/99983d2e1963f7aae46585c27811fac483604a15/test/muir/ast_test.clj | clojure | simple test of generating an AST
Test round trip of forms through ast and emitter
a test method to assert that a form, when put through the analyzer and
ast-emitter, evaluates to the same as the original form.
check ff resolves
# A test that translates all local bindings into strings
Define a basic traversal to ... | (ns muir.ast-test
(:require
[clojure.test :refer :all]
[clojure.walk :refer [macroexpand-all]]
[muir.ast :refer :all]))
(defmacro form-ast [form]
(list 'quote (analyse-form (ns-name *ns*) form)))
(deftest ast-test
(let [ast (form-ast (let [x 1] x))]
(is (= :invoke (:op ast)))))
(defn identity-tra... |
bc4e6922377a5a0ad5ce4a70855e6ac86ad83884cb2e1288482d3a8d97ca2c3f | liquidz/antq | leiningen_test.clj | (ns antq.upgrade.leiningen-test
(:require
[antq.dep.leiningen :as dep.lein]
[antq.record :as r]
[antq.test-helper :as h]
[antq.upgrade :as upgrade]
[antq.upgrade.leiningen]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.test :as t]))
(t/deftest upgrade-dep-test
(let [java-dep (r/ma... | null | https://raw.githubusercontent.com/liquidz/antq/4b7eba8128f421d1741c7f266cf6154272e17df1/test/antq/upgrade/leiningen_test.clj | clojure | (ns antq.upgrade.leiningen-test
(:require
[antq.dep.leiningen :as dep.lein]
[antq.record :as r]
[antq.test-helper :as h]
[antq.upgrade :as upgrade]
[antq.upgrade.leiningen]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.test :as t]))
(t/deftest upgrade-dep-test
(let [java-dep (r/ma... | |
70ff06a660f863f477adafe6bda3c19773baa469108eb2be85e2e9a579dd9ef7 | janestreet/bonsai | app.mli | include module type of App__generated
| null | https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/web_ui/view/kado/app.mli | ocaml | include module type of App__generated
| |
391a226047c708b22e7e3dc2d57dc110dbf3128530c4afa6e9c1b72e6bad6d77 | kelamg/HtDP2e-workthrough | ex149.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex149) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex149.rkt | racket | about the language level of this file in a form that our tools can easily process.
N String -> List-of-strings
creates a list of n copies of s
be designed.
because its base case never returns true. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex149) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect (copier 0 "hello") '())
(check-expect (copier 2 "... |
8e5fdf1af5d0960fd50721b775312cb933697bb072702c417e3fd4320c16c15b | untangled-web/untangled-ui | Forms__01_The_Basics.cljs | (ns untangled.ui.Forms--01-The-Basics
(:require
[clojure.string :as str]
[com.stuartsierra.component :as component]
[devcards.core :as dc :refer-macros [defcard defcard-doc]]
[om.dom :as dom]
[om.next :as om :refer [defui]]
[untangled.client.core :as uc]
[untangled.client.mutations :as m]
... | null | https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/guide/untangled/ui/Forms__01_The_Basics.cljs | clojure | Mark which thing is the ID of this entity
Don't forget f/form-key!
Use your own helpers to render out the fields
Addition of validator
NOTE: f/form-root-key so that sub-forms will trigger render here | (ns untangled.ui.Forms--01-The-Basics
(:require
[clojure.string :as str]
[com.stuartsierra.component :as component]
[devcards.core :as dc :refer-macros [defcard defcard-doc]]
[om.dom :as dom]
[om.next :as om :refer [defui]]
[untangled.client.core :as uc]
[untangled.client.mutations :as m]
... |
5f2e96f2db37edccf3b692328795f5e799990c5c4dae9ca2185900f0cc4e7e40 | hatsugai/SyncStitch | acceptances.ml | open Printf
open Error
open Col
open Event
open EventCol
open Lts
let calc_minacc_of_state lts ss =
let update acc sprop =
match EventMap.find_opt Tick sprop.trans_map with
Some _ ->
if EventSetSet.mem EventSet.empty acc then
acc
else
let acc =
EventSetSet.filter
... | null | https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/acceptances.ml | ocaml | stable | open Printf
open Error
open Col
open Event
open EventCol
open Lts
let calc_minacc_of_state lts ss =
let update acc sprop =
match EventMap.find_opt Tick sprop.trans_map with
Some _ ->
if EventSetSet.mem EventSet.empty acc then
acc
else
let acc =
EventSetSet.filter
... |
38be84a53266f30937e021e84073382e3a50b6cf4d3c38102d3d8e79866ba1f4 | EchoTeam/mcd | mcd_parallel_SUITE.erl | vim : set ts=4 sts=4 sw=4 et :
-module(mcd_parallel_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
-export([
test_simple/1,
test_noproc/1,
test_timeout/1
]).
all() -> [
test_simple,
test_noproc,
test_timeout
].
init_pe... | null | https://raw.githubusercontent.com/EchoTeam/mcd/ef26b96edbf1608e30ea979b5ef72f7bde02421b/test/mcd_parallel_SUITE.erl | erlang | Tests
private functions | vim : set ts=4 sts=4 sw=4 et :
-module(mcd_parallel_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
-export([
test_simple/1,
test_noproc/1,
test_timeout/1
]).
all() -> [
test_simple,
test_noproc,
test_timeout
].
init_pe... |
2d443a3c2e7f3bbc3a8ac120ebbe914fef9b7011b91e98f5a78055bbad3bb343 | Workiva/eva | completable_future.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/utils/completable_future.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.v2.utils.completable-future
(:refer-clojure :exclude [promise deliver realized?])
(:import (java.util.concurrent CompletableFuture)))
(defn promise [] (CompletableFuture.))
(defn promise? [x] (insta... |
e43921c1806f00a229c175d45680c30a3ace21373a3b002048cc1cd0d2f1b8fc | silkapp/rest | Lazy.hs | {-# LANGUAGE
CPP
, DeriveDataTypeable
, FlexibleInstances
, ScopedTypeVariables
#-}
#include "overlapping-compat.h"
module Rest.StringMap.HashMap.Lazy
( StringHashMap
, fromHashMap
, toHashMap
, fromList
, toList
) where
import Data.Aeson
import Data.HashMap.Strict (HashMap)
import Data.Hasha... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-stringmap/src/Rest/StringMap/HashMap/Lazy.hs | haskell | # LANGUAGE
CPP
, DeriveDataTypeable
, FlexibleInstances
, ScopedTypeVariables
#
| This is used with the assumption that a = b => f a = f b
| General case |
#include "overlapping-compat.h"
module Rest.StringMap.HashMap.Lazy
( StringHashMap
, fromHashMap
, toHashMap
, fromList
, toList
) where
import Data.Aeson
import Data.HashMap.Strict (HashMap)
import Data.Hashable
import Data.JSON.Schema
import Data.String
import Data.String.ToString
import Data.Typeable
... |
06d7b2cf7bc15f65425bf359d33a80d81724d151fa95b492267b4a56bf53fa64 | meain/evil-textobj-tree-sitter | textobjects.scm | (function_definition
(_) @function.inner ) @function.outer
(case_statement) @conditional.outer
(if_statement
(_) @conditional.inner ) @conditional.outer
(for_statement
(_) @loop.inner ) @loop.outer
(while_statement
(_) @loop.inner ) @loop.outer
(comment) @comment.outer
| null | https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/bfd0aec831166684f3e3e5bc1d40306caaf0c820/fixtures/bash/textobjects.scm | scheme | (function_definition
(_) @function.inner ) @function.outer
(case_statement) @conditional.outer
(if_statement
(_) @conditional.inner ) @conditional.outer
(for_statement
(_) @loop.inner ) @loop.outer
(while_statement
(_) @loop.inner ) @loop.outer
(comment) @comment.outer
| |
4fc5f18403849d19477bca3397f10ae3fb832a597aa367a4535f869aa16accab | bgamari/ghc-dump | Convert.hs | # LANGUAGE CPP #
# LANGUAGE ImplicitParams #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE NamedFieldPuns #
module GhcDump.Convert (cvtModule) where
import Data.Bifunctor
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
#if MIN_VERSION_ghc(9,0,0)
import GHC.Types.Literal (Literal(..))
import q... | null | https://raw.githubusercontent.com/bgamari/ghc-dump/0d69ff20c2d5dea7aa2422749bb1cfc8986787ea/ghc-dump-core/GhcDump/Convert.hs | haskell | # LANGUAGE ConstraintKinds #
foreign calls are local but have no binding site.
TODO: use hasNoBinding here.
Lossy | # LANGUAGE CPP #
# LANGUAGE ImplicitParams #
# LANGUAGE NamedFieldPuns #
module GhcDump.Convert (cvtModule) where
import Data.Bifunctor
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
#if MIN_VERSION_ghc(9,0,0)
import GHC.Types.Literal (Literal(..))
import qualified GHC.Types.Literal as Lit... |
6a42e22b96c88105d940a26987f3830a1a0994e04c65a2b83d2011d73d47290b | fragnix/fragnix | Data.Binary.Builder.hs | # LANGUAGE Haskell98 #
# LINE 1 " src / Data / Binary / Builder.hs " #
# LANGUAGE CPP , MagicHash #
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Binary.Builder
Copyright : , ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Binary.Builder.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Data.Binary.Builder
License : BSD3-style (see LICENSE)
Stability : experimental
Efficient constructions of lazy bytestrings.
This now re-exports 'Data.ByteString.Lazy.Builder'.
-----------------... | # LANGUAGE Haskell98 #
# LINE 1 " src / Data / Binary / Builder.hs " #
# LANGUAGE CPP , MagicHash #
Copyright : ,
Maintainer : < >
Portability : portable to Hugs and GHC
module Data.Binary.Builder (
Builder
, toLazyByteString
, em... |
3d37d9df8a2b0af3eb2de17ab3d89e91b1fa33456df27342749c6c98f1ed6cee | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("drracket-tool-lib" "drracket-tool-doc"))) (define implies (quote ("drracket-tool-lib" "drracket-tool-doc"))) (define pkg-desc "Programmatic interface to some IDE tools that DrRacket supports") (define pkg-authors (quote (... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/drracket-tool/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("drracket-tool-lib" "drracket-tool-doc"))) (define implies (quote ("drracket-tool-lib" "drracket-tool-doc"))) (define pkg-desc "Programmatic interface to some IDE tools that DrRacket supports") (define pkg-authors (quote (... | |
5acda6b878f8bd2bc681a8d37fcb28f5bd5ca11874b82dfe8403658a41122f36 | haskell/aeson | Hermes.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Twitter.Hermes where
import Prelude.Compat
import Data.Int (Int64)
import qualified Data.Hermes as H
import qualified Twitter as T
twitterResultDecoder :: H.Value -> H.Decoder T.Result
twitterResultDecoder = H.withObject $ \obj ->
T.Result
... | null | https://raw.githubusercontent.com/haskell/aeson/47c400544dae8ef6428fc61f5e9a239b2a1349d4/benchmarks/bench/Twitter/Hermes.hs | haskell | # LANGUAGE OverloadedStrings #
our bench corpus doesn't have any geolocated tweets | # LANGUAGE NoImplicitPrelude #
module Twitter.Hermes where
import Prelude.Compat
import Data.Int (Int64)
import qualified Data.Hermes as H
import qualified Twitter as T
twitterResultDecoder :: H.Value -> H.Decoder T.Result
twitterResultDecoder = H.withObject $ \obj ->
T.Result
<$> H.atKey "results" (H.list st... |
1745127aeda5044f70306545802c20f885c52f4d793d4a80d623a9b20ba703b2 | elarous/O2SN | playground.clj | (ns o2sn.playground)
(defn -main []
(println "Playground !"))
| null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/server/main/o2sn/playground.clj | clojure | (ns o2sn.playground)
(defn -main []
(println "Playground !"))
| |
1280ace88734e9c9c92cd5933455de844fdd996598189b08427a6750824657ba | NetComposer/nkmedia | nkmedia_kms_docker.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . 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/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/kms_backend/nkmedia_kms_docker.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 ) 2016 . 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
@doc NkMEDIA Docker manage... |
df5c69c2ea29050bb25d3d2289ef9588fa5992360f8c1d4d720ff686fa15906f | idubrov/siperl | sip_transport_tcp.erl | %%%----------------------------------------------------------------
@author < >
%%% @doc
%%% TCP transport implementation module.
%%% ports.
%%% @end
2011 - 2012 . See LICENSE file .
%%%----------------------------------------------------------------
-module(sip_transport_tcp).
%%--------------------------... | null | https://raw.githubusercontent.com/idubrov/siperl/251daf3a0d7c7442f56f42cfd6c92764a4f475a7/apps/sip/src/transport/sip_transport_tcp.erl | erlang | ----------------------------------------------------------------
@doc
TCP transport implementation module.
ports.
@end
----------------------------------------------------------------
-----------------------------------------------------------------
Exports
---------------------------------------------------------... | @author < >
2011 - 2012 . See LICENSE file .
-module(sip_transport_tcp).
-export([send/2]).
-include("../sip_common.hrl").
-include("sip.hrl").
-spec send(#sip_destination{} | #sip_connection{}, sip_message()) -> ok | {error, Reason :: term()}.
send(To, Message) when is_record(To, sip_destination) ->
... |
896f6d1fb063626e28cc604737a8401e9b3df66fe4ca6679434535665d8832eb | mbg/wai-rate-limit | Server.hs | --------------------------------------------------------------------------------
-- Rate Limiting Middleware for Servant --
--------------------------------------------------------------------------------
This source code is licensed under the MIT license found in the LICENSE ... | null | https://raw.githubusercontent.com/mbg/wai-rate-limit/6748e161fce0fdb20be01ff1cab9a8ab6e11cba5/servant-rate-limit/src/Servant/RateLimit/Server.hs | haskell | ------------------------------------------------------------------------------
Rate Limiting Middleware for Servant --
------------------------------------------------------------------------------
file in the root directory of this source tree. --
---... |
# OPTIONS_GHC -Wno - orphans #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Servant.RateLimit.Server (
HasRateLimitStrategy(..),
HasRateLimitPolicy(..)
) where
import GHC.TypeLits
import Control.Monad
import Control... |
a0ff64973b2ace049f77a739a15119092e8293a37859bd63d539e1873975d74b | nuvla/api-server | password.clj | (ns sixsq.nuvla.server.resources.user.password)
(defn create-user-map
"Transforms template into a user resource. Strips the method attribute and
updates the resource-type."
[{:keys [name description tags method username email] :as _resource}]
(let [name-attr (or name username email)]
(cond-> {:resource-t... | null | https://raw.githubusercontent.com/nuvla/api-server/e4f0535e2e39e5042094fc20bfb811d2a9c75ad5/code/src/sixsq/nuvla/server/resources/user/password.clj | clojure | (ns sixsq.nuvla.server.resources.user.password)
(defn create-user-map
"Transforms template into a user resource. Strips the method attribute and
updates the resource-type."
[{:keys [name description tags method username email] :as _resource}]
(let [name-attr (or name username email)]
(cond-> {:resource-t... | |
b3067885c13f7a47f630fb1903cd905b854f83fe30ab2b8acf3d6f93eda0f0db | oxalorg/clojurians-log-v2 | bulk_import.clj | (ns clojurians-log.db.bulk-import
(:require [clojure.java.io :as io]
[clojurians-log.db.import :as import]
[clojurians-log.utils :as utils]
[clojurians-log.slack.api :as clj-slack]
[clojurians-log.system :as system]
[honey.sql :as sql]
[integrant... | null | https://raw.githubusercontent.com/oxalorg/clojurians-log-v2/5efc77310cd02ab94e125b27159e3d524979e176/src/clojurians_log/db/bulk_import.clj | clojure | [:profile :image-original]
:on-conflict []
:do-nothing true
TODO: filter allowed channels for file import too
eval buffer then eval this do form to populate db | (ns clojurians-log.db.bulk-import
(:require [clojure.java.io :as io]
[clojurians-log.db.import :as import]
[clojurians-log.utils :as utils]
[clojurians-log.slack.api :as clj-slack]
[clojurians-log.system :as system]
[honey.sql :as sql]
[integrant... |
df24ad3783bdd4d0e42f42514fd4a52e8875c9da3ee2ad6f216227adc2314386 | yuriy-chumak/ol | error.scm | (define-library (lang error)
(export
typename
verbose-ol-error)
(import
(scheme core)
(src vm) (owl ff)
(lang primop))
(begin
(setq expecting-2-3-arguments "expecting 2-3 arguments, but got")
(define typename {
type-pair 'type-pair
type-vector 'type-vector
... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/77b7537e4539489e27a5c317b3128bb7a4c62e2b/lang/error.scm | scheme | continuation?
(apply ...)
(vm:cast ...)
(vm:run ...)
(car not-a-pair)
(cdr not-a-pair)
ff direct call
(ff not-existent-key)
(not-an-executable-object)
------------------------------------------------------------
syscall errors:
port
number
positive number
reference
rawstream
string
vptr
#t/#f | (define-library (lang error)
(export
typename
verbose-ol-error)
(import
(scheme core)
(src vm) (owl ff)
(lang primop))
(begin
(setq expecting-2-3-arguments "expecting 2-3 arguments, but got")
(define typename {
type-pair 'type-pair
type-vector 'type-vector
... |
793767ebf594b0b73cfd48ac4ad8580f02dec16af98fa0e6962a78c553028ec0 | TrustInSoft/tis-kernel | slicingTransform.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/slicing/slicingTransform.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
78296c41d467ff652f5540265fddc03845be416ce201be43e64901aff3a24ea0 | xclerc/ocamljava | scriptloop.ml |
* This file is part of compiler .
* Copyright ( C ) 2007 - 2015 .
* Original file ( toplevel / opttoploop.ml in the OCaml source
* distribution ) is Copyright ( C ) INRIA .
*
* compiler is free software ; you can redistribute it and/or modify
* it under the terms of the Q Public License as ... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/compiler/toplevel/scriptloop.ml | ocaml | to avoid warning, as value are not created by OCaml code
note: under windows, cannot remove a loaded dll
(should remember the handles, close them in at_exit, and then remove
files)
init
eval
The Dynlink interface does not allow us to distinguish between
a Dynlink.Error exceptions raised in the... |
* This file is part of compiler .
* Copyright ( C ) 2007 - 2015 .
* Original file ( toplevel / opttoploop.ml in the OCaml source
* distribution ) is Copyright ( C ) INRIA .
*
* compiler is free software ; you can redistribute it and/or modify
* it under the terms of the Q Public License as ... |
2282acf7041ded8e1929eddeb5323bc576d0c27d4ec891a50c2ac7b9b2b4fbb8 | input-output-hk/nix-tools | Main.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Environment (getArgs,lookupEnv)
import Data.Maybe (fromMaybe)
import Distribution.Pretty (pretty)
import Data.Yaml (decodeFileEither)
import Data.Text (Text)
import qualified Data.Text as Text
imp... | null | https://raw.githubusercontent.com/input-output-hk/nix-tools/8a754bdcf20b20e116409c2341cf69065d083053/lts2nix/Main.hs | haskell | # LANGUAGE OverloadedStrings #
use yaml here, so we don't have to deal with yaml AND json.
pull it from -content/master/stack/global-hints.yaml | # LANGUAGE NamedFieldPuns #
# LANGUAGE LambdaCase #
module Main where
import System.Environment (getArgs,lookupEnv)
import Data.Maybe (fromMaybe)
import Distribution.Pretty (pretty)
import Data.Yaml (decodeFileEither)
import Data.Text (Text)
import qualified Data.Text as Text
import Nix.Pretty (prettyNix)
import N... |
a65af376861706a0bec14034ad470f56518222ffb43516c5979ace969f10a23b | fujita-y/digamma | load.scm | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(define-library (scheme load)
(import (core primitives))
(export load))
| null | https://raw.githubusercontent.com/fujita-y/digamma/58cccd77bd2c208ec58d3cd634cbe65e32b3c7ec/stdlib/scheme/load.scm | scheme | See LICENSE file for terms and conditions of use. | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(define-library (scheme load)
(import (core primitives))
(export load))
|
93a1b6630bf8b9c46cfca5ca718b8ef6f955a7eed5da209249dda99572ea6886 | facebook/infer | bufferOverrunModels.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/facebook/infer/50fbf0e80faad4d91a6de804d29d59f50876f5f9/infer/src/bufferoverrun/bufferOverrunModels.ml | ocaml | TODO: Raise an exception when given unexpected arguments. Before that, we need
to fix the frontend to parse user defined `new` correctly.
Clang only
* Returns a fixed-size array with a given length backed by the specified array.
* Creates a new array with the values from the given array.
initi... |
* 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
... |
e5bd5a034444c9ddb71f63c504ba7f9ad3c3278d3f6dc6035dc283a05818832b | gonzojive/elephant | testperformance.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
Initial version 9/02/2004 by
;;; <>
;;;
;;; part of
;;;
Elephant : an object - oriented database for Common Lisp
;;;
Copyright ( c ) 2004 by and
;;; <> <>
;;;
;;; Elephant users are granted the rights to distribute and use this software
... | null | https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/tests/testperformance.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
<>
part of
<> <>
Elephant users are granted the rights to distribute and use this software
(), also known as the LLGPL. | Initial version 9/02/2004 by
Elephant : an object - oriented database for Common Lisp
Copyright ( c ) 2004 by and
as governed by the terms of the Lisp Lesser GNU Public License
(in-package :ele-tests)
(defpclass performance-test ()
((slot1-is-a-test-slot :accessor perfslot1 :initarg :s1 :initform 1)
... |
815f7ba9204e54ac21eb621c07de8515377082bbe38510622e37d4da062006eb | roman/Haskell-Reactive-Extensions | ErrorTest.hs | module Rx.Observable.ErrorTest where
import Control.Concurrent.Async (async, wait)
import Control.Exception (ErrorCall (..), toException)
import qualified Rx.Observable as Rx
import qualified Rx.Subject as Rx
import Test.HUnit
import Test.Hspec
tests :: Spec
tests = do
describe "Rx.Observable.onErrorResumeNext" ... | null | https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-core/test/Rx/Observable/ErrorTest.hs | haskell | module Rx.Observable.ErrorTest where
import Control.Concurrent.Async (async, wait)
import Control.Exception (ErrorCall (..), toException)
import qualified Rx.Observable as Rx
import qualified Rx.Subject as Rx
import Test.HUnit
import Test.Hspec
tests :: Spec
tests = do
describe "Rx.Observable.onErrorResumeNext" ... | |
3934ed2c423dae13fc9a9d37e057925ffe0267e26ef1c992b185e84056467e47 | bytekid/mkbtt | parsec.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/parsec/src/parsec.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** MODULE TYPES ************************************************************
** MODULES *****************************************************************
the remaini... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
369c2371f25a09014ffcc534d0e7c40ab7ee3a1768507141713c5af65553d286 | discus-lang/salt | Diff.hs |
module War.Task.Job.Diff
( Spec (..)
, Result (..)
, resultSuccess
, build)
where
import BuildBox.Command.File
import BuildBox.Command.System
import BuildBox.Pretty
import BuildBox
| Diff two files .
data Spec
= Spec
{ -- | The baseline file.
... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/war/War/Task/Job/Diff.hs | haskell | | The baseline file.
| File produced that we want to compare with the baseline.
| Put the result of the diff here.
| Result of a diff process.
| Check if this is a successful diff result.
Run the binary.
Write its output to file. |
module War.Task.Job.Diff
( Spec (..)
, Result (..)
, resultSuccess
, build)
where
import BuildBox.Command.File
import BuildBox.Command.System
import BuildBox.Pretty
import BuildBox
| Diff two files .
data Spec
= Spec
specFile :: FilePath
... |
59237b407348a132290a0ac93aeebb2629acd476d3813fd71a4dcee21a1b4759 | deadpendency/deadpendency | NoRecentPackageReleaseRuleSpec.hs | module Effect.AssessDependencies.Backend.Rules.NoRecentPackageReleaseRuleSpec (spec) where
import Common.Model.Assessment.DependencyAssessmentFailure
import Common.Model.Assessment.DependencyAssessmentViolation
import Common.Model.Assessment.DependencyAssessmentWarning
import Common.Model.RepoConfig.Rules.NoRecentPack... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/report-generator/test/Effect/AssessDependencies/Backend/Rules/NoRecentPackageReleaseRuleSpec.hs | haskell | module Effect.AssessDependencies.Backend.Rules.NoRecentPackageReleaseRuleSpec (spec) where
import Common.Model.Assessment.DependencyAssessmentFailure
import Common.Model.Assessment.DependencyAssessmentViolation
import Common.Model.Assessment.DependencyAssessmentWarning
import Common.Model.RepoConfig.Rules.NoRecentPack... | |
400b124dfd548caad2bee499c67d1ffc1e5965812e2bbd929032611b96d85e86 | MastodonC/witan.ui | core.cljs | (ns witan.ui.core
(:require [goog.dom :as gdom]
[reagent.core :as r]
[accountant.core :as accountant]
;;
[witan.ui.components.login :as login]
[witan.ui.components.side :as side]
[witan.ui.components.app :as app]
[witan.ui.data ... | null | https://raw.githubusercontent.com/MastodonC/witan.ui/5ea6baaff52824ac61737911dd2c11b451157bad/src/cljs/witan/ui/core.cljs | clojure |
data
routing
| (ns witan.ui.core
(:require [goog.dom :as gdom]
[reagent.core :as r]
[accountant.core :as accountant]
[witan.ui.components.login :as login]
[witan.ui.components.side :as side]
[witan.ui.components.app :as app]
[witan.ui.data :as da... |
9e91def653b3e5d12fcc04a5efb864a5cfbdb7ac7c975d767ddb5480c95b9e26 | okuoku/nausicaa | test-classes-virtual-methods.sps | -*- coding : utf-8 -*-
;;;
Part of : / Scheme
;;;Contents: test class virtual methods
Date : Sat Oct 2 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU General Public License as published by... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-classes-virtual-methods.sps | scheme |
Contents: test class virtual methods
Abstract
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; ... | -*- coding : utf-8 -*-
Part of : / Scheme
Date : Sat Oct 2 , 2010
Copyright ( c ) 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
(import (nausicaa)
(rnrs ev... |
a8f8bf4becb506aa70f55fcf79385fdc35535e3b7ee43d27ef22266febe01b74 | juxt/pull | protocol.cljc | (ns juxt.pull.protocol
"Protocols to support map-like pull.
Clojure's find function are defined on fixed set of classes (java.util.Map),
but there are map like structures which does not implements Map interface,
such as datomic.Entity. To support these, you need adapt Findable protocol,
to support wildcard, ... | null | https://raw.githubusercontent.com/juxt/pull/f097c2d1dbe7f0a4a1978b1283da7fe9b77f6ba4/src/juxt/pull/protocol.cljc | clojure | (ns juxt.pull.protocol
"Protocols to support map-like pull.
Clojure's find function are defined on fixed set of classes (java.util.Map),
but there are map like structures which does not implements Map interface,
such as datomic.Entity. To support these, you need adapt Findable protocol,
to support wildcard, ... | |
c08a648cbf67e43016fb40c04467e0c3228f959bd74b0f9e10f74d60382039fe | rcherrueau/rastache | tests.rkt | #lang racket/base
(require rackunit
rackunit/text-ui
"comments.rkt"
"delimiters.rkt"
"interpolation.rkt"
"inverted.rkt"
"lambdas.rkt"
"sections.rkt"
"partials.rkt")
(module+ test
(displayln "Comments tests:")
(run-tests comment-tests)
(disp... | null | https://raw.githubusercontent.com/rcherrueau/rastache/059d00c83416f8ba27cc38fa7f8321b075756d14/rastache/tests/tests.rkt | racket | #lang racket/base
(require rackunit
rackunit/text-ui
"comments.rkt"
"delimiters.rkt"
"interpolation.rkt"
"inverted.rkt"
"lambdas.rkt"
"sections.rkt"
"partials.rkt")
(module+ test
(displayln "Comments tests:")
(run-tests comment-tests)
(disp... | |
d0ca3534939742c28c86d2ace762702e5131388ccefb04e587ad78c9c5cb7217 | serokell/qtah | QPixmap.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Gui/QPixmap.hs | haskell |
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Generator.Interface.Gu... |
5fccf5a7f323f3e9edb5a02607f703416096abe23f8c0443354c0897f896a031 | helpshift/hydrox | sample_document.clj | (ns documentation.sample-document
(:require [midje.sweet :refer :all]))
[[:chapter {:tag "hello" :title "Introduction"}]]
"This is an introduction to the exciting library"
[[:section {:title "Defining a function"}]]
"We define function `add-5`"
[[{:numbered false}]]
(defn add-5 [x]
(+ x 5))
[[:section {:title... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/lein/resources/hydrox/test/documentation/sample_document.clj | clojure | [[{:tag "eq2" :title "some equations 2"}]] | (ns documentation.sample-document
(:require [midje.sweet :refer :all]))
[[:chapter {:tag "hello" :title "Introduction"}]]
"This is an introduction to the exciting library"
[[:section {:title "Defining a function"}]]
"We define function `add-5`"
[[{:numbered false}]]
(defn add-5 [x]
(+ x 5))
[[:section {:title... |
64bff64562eb3bb257ca98877575e5b58ddd6f5e701dfb348f6a260d1df3af7c | MyPost/cassius | mock.clj | (ns cassius.component.mock
(:require [cassius.protocols :refer :all ]
[com.stuartsierra.component :as component]
[taoensso.timbre :refer [infof]]))
(def ^:dynamic *dbs* (atom {}))
(defn purge-dbs
([] (reset! *dbs* {}))
([& ks] (swap! *dbs* apply dissoc ks)))
(defn list-dbs
([] (keys @... | null | https://raw.githubusercontent.com/MyPost/cassius/7b5f550fa8e8f825d4ecd7ba6a0d34c5ff606a7c/src/cassius/component/mock.clj | clojure | (ns cassius.component.mock
(:require [cassius.protocols :refer :all ]
[com.stuartsierra.component :as component]
[taoensso.timbre :refer [infof]]))
(def ^:dynamic *dbs* (atom {}))
(defn purge-dbs
([] (reset! *dbs* {}))
([& ks] (swap! *dbs* apply dissoc ks)))
(defn list-dbs
([] (keys @... | |
a1788dd3618c6f23815181f2b1a6094beeaf7969f49858009b8a549ff29ef034 | gafiatulin/codewars | SortableShapes.hs | -- Sortable Shapes
--
module Kata (Shape (..)) where
data Shape = Square {side:: Double} | Rectangle {width:: Double, height:: Double} | Triangle{base :: Double, height :: Double} | Circle {radius :: Double} | CustomShape {area :: Double} deriving (Show)
size :: Shape -> Double
size (Square s) = s^2
size (Rectangle... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/SortableShapes.hs | haskell | Sortable Shapes
|
module Kata (Shape (..)) where
data Shape = Square {side:: Double} | Rectangle {width:: Double, height:: Double} | Triangle{base :: Double, height :: Double} | Circle {radius :: Double} | CustomShape {area :: Double} deriving (Show)
size :: Shape -> Double
size (Square s) = s^2
size (Rectangle w h) = w*h
size (Trian... |
c90f15d916751ca0f87950ac20de7852304996d7353dff6ae500110a70be92ae | macourtney/Conjure | migrate_config.clj | (ns config.migrate-config
(:require [drift-db.migrate :as drift-db-migrate]
[conjure.server.server :as server]))
(defn migrate-config []
{ :directory "/db/migrate"
:init server/init-args
:current-version drift-db-migrate/current-version
:update-version drift-db-migrate/update-version
... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_test/test/config/migrate_config.clj | clojure | (ns config.migrate-config
(:require [drift-db.migrate :as drift-db-migrate]
[conjure.server.server :as server]))
(defn migrate-config []
{ :directory "/db/migrate"
:init server/init-args
:current-version drift-db-migrate/current-version
:update-version drift-db-migrate/update-version
... | |
c29cb4a33c8e291f789f84a337da0953644372730528ed3f1bb23d99759d8ac9 | BinaryAnalysisPlatform/bap | bap_primus_state.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
module Dict = Univ_map
module Key = Dict.Key
type void
type uuid = (void,void,void) format
type 'a t = {
key : 'a Key.t;
init : project -> 'a;
uuid : string;
}
type 'a state = 'a t
let string_of_uuid uuid =
let uuid = string_of_format uuid in
match Uuidm.of_st... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_primus/bap_primus_state.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
module Dict = Univ_map
module Key = Dict.Key
type void
type uuid = (void,void,void) format
type 'a t = {
key : 'a Key.t;
init : project -> 'a;
uuid : string;
}
type 'a state = 'a t
let string_of_uuid uuid =
let uuid = string_of_format uuid in
match Uuidm.of_st... | |
29d9123eafc9cd71ba2c2b38c7b7ff8a21c9f340e6ecea6ae6eb634a0c42cb97 | unisonweb/unison | Foreign.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Unison.Runtime.Foreign
( Foreign (..),
HashAlgorithm (..),
unwrapForeign,
maybeUnwrapForeign,
wrapBuiltin,
maybeUnwrapBui... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/Runtime/Foreign.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
These functions are explicit aliases of the overloaded function.
When the overloaded function is used in their place, it seems to
cause issues with regard to `promote` above. Somehow, the
unsafeCoerce can cause memory faults, even when the values are
alias seems to prev... | # LANGUAGE InstanceSigs #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Unison.Runtime.Foreign
( Foreign (..),
HashAlgorithm (..),
unwrapForeign,
maybeUnwrapForeign,
wrapBuiltin,
maybeUnwrapBuiltin,
unwrapBuiltin,
BuiltinForeign (..),
... |
95f8c65ed43e7c7d7bf0b2ebec1b9597934b499d32258920b41242ce5fff106a | dmjio/bittrex | API.hs | --------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
--------------------------------------------------------------... | null | https://raw.githubusercontent.com/dmjio/bittrex/423750e748efaf38c6aa9b79b56d9fdaf57c8d72/src/Bittrex/API.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
------------------------------------------------------------------------------
* Overview
$intro
* Public
* Market
* Account
---------------------------------------------... |
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Bittrex.API
getMarkets
, getCurrencies
, getTicker
, getMarketSummaries
, getMarketSummary
, getOrderBookBuys
, getOrderBookSells
, getMarketHistory
, buyLimit
, sellLimit
, cancel
... |
4c72fc08fa9a2128d834f1eb87df2f65cf516c5f40b726462f48c2f829fb285e | kazu-yamamoto/piki | Types.hs | module Types where
import qualified Data.Text.Lazy as L
data Element = HR
| H Int XText
| P XText
| PRE XText
| UOL Xlist
| DL [Def]
| IMG [Image]
| TABLE [[XText]]
| DIV DivAttr [Element]
deriving (Eq... | null | https://raw.githubusercontent.com/kazu-yamamoto/piki/7173a4a224d91a8afc25a3bb66249592abc0f050/src/Types.hs | haskell | module Types where
import qualified Data.Text.Lazy as L
data Element = HR
| H Int XText
| P XText
| PRE XText
| UOL Xlist
| DL [Def]
| IMG [Image]
| TABLE [[XText]]
| DIV DivAttr [Element]
deriving (Eq... | |
1b64811e213c645dc24e044ed5449a6862b88b9d80ee1bf371bab5cd0c5f4772 | WormBase/wormbase_rest | external_links.clj | (ns rest-api.classes.gene.widgets.external-links
(:require
[rest-api.classes.generic-fields :as generic]))
(def widget
{:name generic/name-field
:xrefs generic/xrefs})
| null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/gene/widgets/external_links.clj | clojure | (ns rest-api.classes.gene.widgets.external-links
(:require
[rest-api.classes.generic-fields :as generic]))
(def widget
{:name generic/name-field
:xrefs generic/xrefs})
| |
a382af95c1c214165793a12eb74d1e62277fb2752f53c1bda9d325578fab5103 | CSCfi/rems | search.clj | (ns rems.application.search
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[com.rpl.specter :refer [ALL select]]
[mount.core :as mount]
[rems.common.application-util :as application-util]
[rems.config ... | null | https://raw.githubusercontent.com/CSCfi/rems/730651880b6f9ef3047bb700972f0dea06075d32/src/clj/rems/application/search.clj | clojure | Only one IndexWriter may use the directory at a time.
Otherwise it'll throw a LockObtainFailedException.
delete old index
create a new empty index by creating and closing an IndexWriter, otehrwise SearcherManager will fail
TODO: filter out checkboxes, attachments etc?
metadata
searchable fields
TODO: call from ... | (ns rems.application.search
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[com.rpl.specter :refer [ALL select]]
[mount.core :as mount]
[rems.common.application-util :as application-util]
[rems.config ... |
305c4d3048711d52e1b8b13de9fdc36d810421f32b94c67d46eae28b7a8b1b15 | Feldspar/feldspar-language | OptimizeUntyped.hs | --
Copyright ( c ) 2019 , ERICSSON AB
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Core/Middleend/OptimizeUntyped.hs | haskell |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2019 , ERICSSON AB
* Neither the name of the ERICSSON AB nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIG... |
7fdc3a83d61e13c08034c10dd45ba1b4776f460ad22fdb3186f0aec4430c0c0e | rmloveland/scheme48-0.53 | prescheme.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
Stuff in Pre - Scheme that is not in Scheme .
(define shift-left arithmetic-shift)
(define (arithmetic-shift-right i n)
(arithmetic-shift i (- 0 n)))
; Hack for the robots
(define small* *) ; could do a range check
(define int-mask (- (arithmetic-s... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/prescheme/prescheme.scm | scheme | Hack for the robots
could do a range check
(symbol->string (enumerand->name status errors)))
(external <string> <type> . <maybe scheme value>)
RECEIVE (from big-scheme) | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
Stuff in Pre - Scheme that is not in Scheme .
(define shift-left arithmetic-shift)
(define (arithmetic-shift-right i n)
(arithmetic-shift i (- 0 n)))
(define int-mask (- (arithmetic-shift 1 pre-scheme-integer-size) 1))
(define (logical-shift-right... |
7082958a036273a1d7a2385b4e034cf43b9488176e17ecb89c8b111fd4be97a7 | ertugrulcetin/code3dworld | views.cljs | (ns code3dworld.renderer.views
(:require
[reagent.core :as r]
[goog.object :as ob]
[goog.functions :as gf]
[goog.dom :as dom]
[code3dworld.renderer.util :as util]
[code3dworld.renderer.subs :as subs]
[code3dworld.renderer.events :as events]
[code3dworld.renderer.config :as config]
[clojure.... | null | https://raw.githubusercontent.com/ertugrulcetin/code3dworld/cf260462c2226e56bd648e80e0f4040e4a053b11/src/code3dworld/renderer/views.cljs | clojure | (ns code3dworld.renderer.views
(:require
[reagent.core :as r]
[goog.object :as ob]
[goog.functions :as gf]
[goog.dom :as dom]
[code3dworld.renderer.util :as util]
[code3dworld.renderer.subs :as subs]
[code3dworld.renderer.events :as events]
[code3dworld.renderer.config :as config]
[clojure.... | |
c9c30f36c2e03a4a3b08aed52ab060e0c48a7fb6b728da33b0b5f090e2b8d021 | BillHallahan/G2 | ConcatList2.hs | module ConcatList2 where
{-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--prune-unsorted" @-}
import Prelude hiding (concat)
--flycheck_List.lhs-2015-03-20T17.52.22.lhs
data List a = Emp
| (:+:) a (List a)
deriving (Eq, Ord, Show)
@ measure size : : Lis... | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/ConcatList2.hs | haskell | @ LIQUID "--short-names" @
@ LIQUID "--no-termination" @
@ LIQUID "--prune-unsorted" @
flycheck_List.lhs-2015-03-20T17.52.22.lhs
@ concat' :: List a -> List a -> List a @ | module ConcatList2 where
import Prelude hiding (concat)
data List a = Emp
| (:+:) a (List a)
deriving (Eq, Ord, Show)
@ measure size : : List a - > Int
size ( Emp ) = 0
size ( (: + :) x xs ) = 1 + size xs
@
size (Emp) = 0
size ((:+:) x xs) = 1 ... |
f1fba24eb3d53e689cfaa265935c12a244e0cfdddb09add5ed1338c16c7c6935 | ChildsplayOSU/bogl | CORSMiddleware.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : API.CORSMiddleware
Description : CORS Middleware for the BoGL Server API
Copyright : ( c )
License : BSD-3
Based on @ / questions/41399055 / haskell - yesod - cors - problems - with - browsers - options - requests - when - doing - CORS requests... | null | https://raw.githubusercontent.com/ChildsplayOSU/bogl/8c649689bf26543be1a7ec72787b9c013ecb754f/src/API/CORSMiddleware.hs | haskell | # LANGUAGE OverloadedStrings #
| CORS middleware configured with 'appCorsResourcePolicy'.
unused for the moment
| Cors resource policy to be used with 'corsified' middleware.
This policy will set the following:
* RequestHeaders: @Content-Type@ | |
Module : API.CORSMiddleware
Description : CORS Middleware for the BoGL Server API
Copyright : ( c )
License : BSD-3
Based on @ / questions/41399055 / haskell - yesod - cors - problems - with - browsers - options - requests - when - doing - CORS requests to be made to this server by accep... |
3b0554398d81450432e1f6d8c127de7cd5a1f1d871a3cc5e383270397e02fa52 | aphyr/merkle | fixed_test.clj | (ns merkle.kv.fixed-test
(:require [clojure.test :refer :all]
[merkle.kv.fixed :refer :all]
[clojure.pprint :refer :all]
[simple-check.clojure-test :refer [defspec]]
[simple-check.core :as sc]
[simple-check.generators :as gen]
[simple-check.prope... | null | https://raw.githubusercontent.com/aphyr/merkle/4cb63269947f679551fbae277e8488b7406b18f6/test/merkle/kv/fixed_test.clj | clojure | _ (prn :t1 t1)
_ (prn :t2 t2)
(prn :diff-fraction (try (float (/ (count diffs) (count v1)))
Special case: empty vectors
divergent copies.
Generates a couple sequences, then brings them into sync by copying the
differing parts.
Split apart depth and big vector
(prn :d d)
(pr... | (ns merkle.kv.fixed-test
(:require [clojure.test :refer :all]
[merkle.kv.fixed :refer :all]
[clojure.pprint :refer :all]
[simple-check.clojure-test :refer [defspec]]
[simple-check.core :as sc]
[simple-check.generators :as gen]
[simple-check.prope... |
37aaefb479dd776e316c7a11cd2452e1c1f694309018bf6ad5095160cad3df30 | egri-nagy/kigen | core.clj | (ns kigen.core
(:require [taoensso.timbre :as timbre])
(:gen-class))
;; to save compile time property into a runtime one
(defmacro get-version []
(System/getProperty "kigen.version"))
;; setting default log level
(timbre/merge-config! {:min-level :warn})
(defn -main
"The first argument is a name of a file co... | null | https://raw.githubusercontent.com/egri-nagy/kigen/75e8a2beef3937d817eae32197bdfe5e853eb492/src/kigen/core.clj | clojure | to save compile time property into a runtime one
setting default log level | (ns kigen.core
(:require [taoensso.timbre :as timbre])
(:gen-class))
(defmacro get-version []
(System/getProperty "kigen.version"))
(timbre/merge-config! {:min-level :warn})
(defn -main
"The first argument is a name of a file containing Clojure source code.
This main method evaluates the forms contained."
... |
c6470eef322746345cc2d4282b215c7879c63186d2f12715a822f0ab3a083e66 | bjorng/wings | e3d_bv.erl | %%
%% e3d_bv.erl --
%%
%% Bounding volume operations.
Bounding boxes and quickhull , and eigen - vecs calculation implemented
%%
Copyright ( c ) 2001 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% ... | null | https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/e3d/e3d_bv.erl | erlang |
e3d_bv.erl --
Bounding volume operations.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Bounding Box/Sphere
Other Stuff
--------------------------------------------------------------------
@doc Creates a bound... | Bounding boxes and quickhull , and eigen - vecs calculation implemented
Copyright ( c ) 2001 - 2011
-module(e3d_bv).
-export([box/0,box/1,box/2,box/3,
union/2, dist/2, intersect/2,
center/1,max_extent/1,
surface_area/1,volume/1,
sphere/1,
inside/2, hit/2, hit/3, inv_sign/1]).
-export([eigen_v... |
ba5c9b684d5b72a3e8a8204754ade9c681caf0bbf00b22cac51dc06031faa47a | AstRonin/sgi | sgi_cluster.erl | -module(sgi_cluster).
-behaviour(gen_server).
%% API
-export([start_link/0, nodes_info/0, is_ready/0, send/3, is_use/0, is_overloaded/0, info/0]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
10 min... | null | https://raw.githubusercontent.com/AstRonin/sgi/3854b62b6ce46ba71abd1e76e9cf5200dc0b1df3/src/sgi_cluster.erl | erlang | API
gen_server callbacks
#{
node1@localhost => #{name => '', available => true, overloaded => false, last_updated => 0}
}
===================================================================
API
===================================================================
@doc Return true if cluster should be use
Informat... | -module(sgi_cluster).
-behaviour(gen_server).
-export([start_link/0, nodes_info/0, is_ready/0, send/3, is_use/0, is_overloaded/0, info/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
10 minutes
Sample of structure of ... |
306dd059474fc8c2e6ac25105b774ba5c647532cb0d2e1f2706cf8530e869182 | exoscale/clojure-kubernetes-client | v1beta1_pod_disruption_budget_status.clj | (ns clojure-kubernetes-client.specs.v1beta1-pod-disruption-budget-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1beta1-pod-disruption-budget-status-data v1beta1-pod-disruption-budget-status)
(def v1beta1-pod-disruption-budge... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_pod_disruption_budget_status.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-pod-disruption-budget-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1beta1-pod-disruption-budget-status-data v1beta1-pod-disruption-budget-status)
(def v1beta1-pod-disruption-budge... | |
f3b3b9d0704f8405f6a92c1e3b3ad0c18903d8ac1019f066c1ed0e458142f21c | jscrane/jvml | ex2.clj | (ns ml.ex2
(:use (incanter core charts io)
(ml util optim logistic)))
(defn init-ex2 []
(let [data (to-matrix (read-dataset "data/ex2data1.txt"))
norm (feature-normalize (sel data :except-cols 2))
y (map int (sel data :cols 2))
X (add-intercept (:data norm))]
{:y y :norm norm :X... | null | https://raw.githubusercontent.com/jscrane/jvml/844eb267150564a3a0f882edbbd505ce94924c8f/src/main/clojure/ml/ex2.clj | clojure | (ns ml.ex2
(:use (incanter core charts io)
(ml util optim logistic)))
(defn init-ex2 []
(let [data (to-matrix (read-dataset "data/ex2data1.txt"))
norm (feature-normalize (sel data :except-cols 2))
y (map int (sel data :cols 2))
X (add-intercept (:data norm))]
{:y y :norm norm :X... | |
37147bb49c563fcaebb5945ba24c82eaf7d2aacdf9446bfa53453b87577b86a8 | AHartNtkn/SICAM | Project.hs | module Tests.Example.Project where
import Prelude
import Test.Tasty
import Test.Tasty.TH
import Test.Tasty.Hedgehog
import Hedgehog ((===))
import qualified Hedgehog as H
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Example.Project (plus)
prop_plusIsCommutative :: H.Property... | null | https://raw.githubusercontent.com/AHartNtkn/SICAM/126d8eb90452af9f535c838fa953be05a9ddf282/clash%20files/tests/Tests/Example/Project.hs | haskell | module Tests.Example.Project where
import Prelude
import Test.Tasty
import Test.Tasty.TH
import Test.Tasty.Hedgehog
import Hedgehog ((===))
import qualified Hedgehog as H
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Example.Project (plus)
prop_plusIsCommutative :: H.Property... | |
dd8a95aa2e37a22686a5a1b0e1b5c284fcab93d07c075b4284f70f11d82fb800 | turquoise-hexagon/euler | solution.scm | (import
(chicken fixnum)
(euler))
(define-constant limit #e1e6)
(define (order n)
(let loop ((acc 1))
(let ((_ (fx* acc 10)))
(if (fx> _ n)
acc
(loop _)))))
(define (make-valid? primes limit)
(let ((acc (make-vector (fx+ limit 1) #f)))
(for-each
(lambda (i)
(vector... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/daa7f2e1879ad57a9330c367621f7f982e3d182c/src/037/solution.scm | scheme | (import
(chicken fixnum)
(euler))
(define-constant limit #e1e6)
(define (order n)
(let loop ((acc 1))
(let ((_ (fx* acc 10)))
(if (fx> _ n)
acc
(loop _)))))
(define (make-valid? primes limit)
(let ((acc (make-vector (fx+ limit 1) #f)))
(for-each
(lambda (i)
(vector... | |
f9a9fe46516334280fd22f03ae8b8195e077c4efcf4d005144892be5def3091e | c-cube/ocaml-containers | CCInt.mli | (* This file is free software, part of containers. See file "license" for more details. *)
(** Basic Int functions *)
[@@@ifge 4.08]
include module type of Int
* @inline
[@@@endif]
type t = int
val zero : t
* [ zero ] is the integer [ 0 ] .
@since 3.0
@since 3.0 *)
val one : t
* [ one ] is the integer ... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/1d08a05c443bfe099746995d7505930fad36d9fc/src/core/CCInt.mli | ocaml | This file is free software, part of containers. See file "license" for more details.
* Basic Int functions
* [compare x y] is the comparison function for integers
with the same specification as {!Stdlib.compare}.
* [equal x y] is [true] iff [x] and [y] are equal.
Equality function for integers.
* [hash x] ... |
[@@@ifge 4.08]
include module type of Int
* @inline
[@@@endif]
type t = int
val zero : t
* [ zero ] is the integer [ 0 ] .
@since 3.0
@since 3.0 *)
val one : t
* [ one ] is the integer [ 1 ] .
@since 3.0
@since 3.0 *)
val minus_one : t
* [ minus_one ] is the integer [ -1 ] .
@since 3.0... |
fee804cba5d3cc7f9e7e52610ad54dd98e32b951febab922ad045c080dc24180 | erlang/rebar3 | rebar_paths_SUITE.erl | -module(rebar_paths_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[clashing_apps,
check_modules,
set_paths,
misloaded_mods
].
%%%%%%%%%%%%%%%%%%
%%% TEST SETUP %%%
%%%%%%%%%%%%%%%%%%
init_per_testcase(Case, Config) -... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_paths_SUITE.erl | erlang |
TEST SETUP %%%
This test checks that the right module sets get loaded; however, we must
ensure that we do not have clashes with other test suites' loaded modules,
which we cannot track. As such, we have to ensure all module names here are
unique.
This is done by hand; if you see this test suite failing on its ... | -module(rebar_paths_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[clashing_apps,
check_modules,
set_paths,
misloaded_mods
].
init_per_testcase(Case, Config) ->
BasePaths = code:get_path(),
Dir = filename:joi... |
585b9a263d227d4dc9c04e64b725a8d6d07d865b2c518faf22ee7fdb09f8c5e3 | jfacorro/clojure-lab | util.clj | (ns lab.ui.util)
(defn int-to-rgb
"Converts a single int value int a RGB triple."
[n]
(let [r (-> n (bit-and 0xFF0000) (bit-shift-right 16))
g (-> n (bit-and 0x00FF00) (bit-shift-right 8))
b (-> n (bit-and 0x0000FF))]
{:r r :g g :b b}))
(defn rgb-to-int
"Converts a RGB triple to a single i... | null | https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/ui/util.clj | clojure |
Convenience macros for multimethod implementations | (ns lab.ui.util)
(defn int-to-rgb
"Converts a single int value int a RGB triple."
[n]
(let [r (-> n (bit-and 0xFF0000) (bit-shift-right 16))
g (-> n (bit-and 0x00FF00) (bit-shift-right 8))
b (-> n (bit-and 0x0000FF))]
{:r r :g g :b b}))
(defn rgb-to-int
"Converts a RGB triple to a single i... |
3a206f9b7d5e90df03fdb20e42ebb2135d8353c7f2f3b9ca132d68cf2724fc9b | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package.lisp | (cl:defpackage logger_client-msg
(:use )
(:export
"<LOG>"
"LOG"
))
| null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/logger_client/msg/_package.lisp | lisp | (cl:defpackage logger_client-msg
(:use )
(:export
"<LOG>"
"LOG"
))
| |
4282565d2f33b47e8d4552f2534c05c2010c6c2df6f8cf7eb4c339889f6c6881 | cljfx/cljfx | fx.clj | (ns cljfx.fx
"Part of a public API")
(defmacro lazy-load [sym-expr]
`(delay @(requiring-resolve '~sym-expr)))
(def keyword->lifecycle-delay
{;; cameras
:parallel-camera (lazy-load cljfx.fx.parallel-camera/lifecycle)
:perspective-camera (lazy-load cljfx.fx.perspective-camera/lifecycle)
;; charts
:cat... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/src/cljfx/fx.clj | clojure | cameras
charts
effects
scene
web
media
panes
shapes
transform
3d shapes
controls
cells
dialogs
transitions | (ns cljfx.fx
"Part of a public API")
(defmacro lazy-load [sym-expr]
`(delay @(requiring-resolve '~sym-expr)))
(def keyword->lifecycle-delay
:parallel-camera (lazy-load cljfx.fx.parallel-camera/lifecycle)
:perspective-camera (lazy-load cljfx.fx.perspective-camera/lifecycle)
:category-axis (lazy-load cljfx... |
9e79575c311569f9508fff1407686355293b761a27f3fc4d9b63052f18809c8c | rkaippully/webgear | Method.hs | -- |
Copyright : ( c ) , 2020 - 2021
-- License : MPL-2.0
-- Maintainer :
--
-- Middlewares related to HTTP methods.
module WebGear.Middlewares.Method
( Method (..)
, IsStdMethod (..)
, MethodMismatch (..)
, method
) where
import Control.Arrow (Kleisli (..))
import Control.Monad (... | null | https://raw.githubusercontent.com/rkaippully/webgear/db122125c35e5853251bfd68a0e5222fafd6cd49/webgear-server/src/WebGear/Middlewares/Method.hs | haskell | |
License : MPL-2.0
Maintainer :
Middlewares related to HTTP methods.
| A 'Trait' for capturing the HTTP method of a request
| Failure to match method against an expected value
| A typeclass to map a 'HTTP.StdMethod' from type level to term
level.
| Convert @t@ to term level.
| A middleware t... | Copyright : ( c ) , 2020 - 2021
module WebGear.Middlewares.Method
( Method (..)
, IsStdMethod (..)
, MethodMismatch (..)
, method
) where
import Control.Arrow (Kleisli (..))
import Control.Monad ((>=>))
import Data.Proxy (Proxy (..))
import qualified Network.HTTP.Types as HTTP
import WebGear.Trai... |
552ca075c2171b53ca7e26c8adc270a5d11e9b28c08d5e844bd800c1b2c06f46 | TyOverby/mono | main.ml | open! Core
open! Async_kernel
open! Bonsai_web
let print_effect = Effect.of_sync_fun print_endline
let component =
let on_click = print_effect "hello world" in
Bonsai.const
(Vdom.Node.button
~attr:(Vdom.Attr.on_click (fun _ -> on_click))
[ Vdom.Node.text "click me to print a thing to the console... | null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/handle_io/main.ml | ocaml | open! Core
open! Async_kernel
open! Bonsai_web
let print_effect = Effect.of_sync_fun print_endline
let component =
let on_click = print_effect "hello world" in
Bonsai.const
(Vdom.Node.button
~attr:(Vdom.Attr.on_click (fun _ -> on_click))
[ Vdom.Node.text "click me to print a thing to the console... | |
96cce03ca19c0badda29a6a05b49260ce66011cc5e94109079b0f2d9ac347a0b | cosgroveb/jane | jane_app.erl | -module(jane_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
application:start(... | null | https://raw.githubusercontent.com/cosgroveb/jane/ef5f4187f4f4525ea9d8687bafddf4a2133dadc9/src/jane_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(jane_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
application:start(crypto),
application:start(public_key),
application:start(ssl),
application:start(inets),
ibrowse:start(),
error_logger:info_msg("Starting jane_app~n"),
jane_sup:start_link().
st... |
7ed603f38755760286666c423e68fd2ec8246db5efd6500f9b43f040544c40ac | beijaflor-io/haskell-libui | FFI.hs | module Graphics.LibUI.FFI
(
-- * Imperative API that isn't C
module Graphics.LibUI.FFI.Wrapped
-- * Imperative API that is C
, module Graphics.LibUI.FFI.Raw
)
where
import Graphics.LibUI.FFI.Raw
import Graphics.LibUI.FFI.Wrapped
| null | https://raw.githubusercontent.com/beijaflor-io/haskell-libui/4d1fad25e220071c4c977f79f05b482c2c36af84/src/Graphics/LibUI/FFI.hs | haskell | * Imperative API that isn't C
* Imperative API that is C | module Graphics.LibUI.FFI
(
module Graphics.LibUI.FFI.Wrapped
, module Graphics.LibUI.FFI.Raw
)
where
import Graphics.LibUI.FFI.Raw
import Graphics.LibUI.FFI.Wrapped
|
ae44b1383c542a4424e2e761e99f2016d8110c4a88e19796dc48eb5442d3e042 | nklein/Roto-Mortar | generics.lisp | (in-package :roto-mortar)
(defgeneric draw (drawn-item screen))
(defgeneric draw-as-shadow-volume (drawn-item screen))
(defgeneric update-item (drawn-item elapsed))
(defgeneric alien-got-through (screen))
(defgeneric alien-eliminated (screen)) | null | https://raw.githubusercontent.com/nklein/Roto-Mortar/dd3bb63aa6a377ee4b359921c8d46a94d2847227/src/generics.lisp | lisp | (in-package :roto-mortar)
(defgeneric draw (drawn-item screen))
(defgeneric draw-as-shadow-volume (drawn-item screen))
(defgeneric update-item (drawn-item elapsed))
(defgeneric alien-got-through (screen))
(defgeneric alien-eliminated (screen)) | |
4e6d9f3626a911d0779e8be29d205faa2a1c031c658dbedd301545cfadbb56f7 | ofmooseandmen/jord | Main.hs | import System.Environment (getArgs)
import Text.ParserCombinators.ReadP (ReadP, many1, readP_to_S)
import qualified Ellipsoids as E
import Generator
import qualified Models as M
import qualified Parsers as P
import qualified Transformations as T
main :: IO ()
main = do
args <- getArgs
case args of
[in... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/gen/Main.hs | haskell | import System.Environment (getArgs)
import Text.ParserCombinators.ReadP (ReadP, many1, readP_to_S)
import qualified Ellipsoids as E
import Generator
import qualified Models as M
import qualified Parsers as P
import qualified Transformations as T
main :: IO ()
main = do
args <- getArgs
case args of
[in... | |
55df54d3a900a4c6ec605a116488b05014756b85ffc442c655e47fe700c623f1 | softwarelanguageslab/maf | R5RS_sigscheme_takr-1.scm | ; Changes:
* removed : 0
* added : 4
* swaps : 0
* negated predicates : 5
* swapped branches : 5
* calls to i d fun : 8
(letrec ((tak0 (lambda (x y z)
(if (not (< y x))
(<change>
z
(tak1 (tak37 (- x 1) y z) (tak11 (- y 1) z x... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_sigscheme_takr-1.scm | scheme | Changes: | * removed : 0
* added : 4
* swaps : 0
* negated predicates : 5
* swapped branches : 5
* calls to i d fun : 8
(letrec ((tak0 (lambda (x y z)
(if (not (< y x))
(<change>
z
(tak1 (tak37 (- x 1) y z) (tak11 (- y 1) z x) (tak17 (-... |
69332b3571a6e2fb81ff91ebe76d9b85e425fb1f029a186ce5226e42824c27b2 | nojima/typed-lambda | Value.hs | module Value (Value(..), Frame, RuntimeError(..)) where
import Term (Term)
import qualified Term
import Identifier (Identifier)
import qualified Identifier
import qualified Data.Text as T
import qualified Data.Vector as Vector
import qualified Data.Map.Strict as Map
data Value
= Bool !Bool
... | null | https://raw.githubusercontent.com/nojima/typed-lambda/e62b9e951fa6949cd6c8ff7c1912e2b41b3b57b9/src/Value.hs | haskell | module Value (Value(..), Frame, RuntimeError(..)) where
import Term (Term)
import qualified Term
import Identifier (Identifier)
import qualified Identifier
import qualified Data.Text as T
import qualified Data.Vector as Vector
import qualified Data.Map.Strict as Map
data Value
= Bool !Bool
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.