_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 |
|---|---|---|---|---|---|---|---|---|
9b0236f4b2e21586abb5473624731650716c2ee071f80033eb97116f25f9b17f | FestCat/festival-ca | nitech_us_slt_arctic_lexicon.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/FestCat/festival-ca/f6b2d9bf4fc4f77b80890ebb95770075ad36ccaf/src/data/festvox.orig/nitech_us_slt_arctic_lexicon.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | CMU lexicon for US English
(require 'postlex)
(setup_cmu_lex)
(define (nitech_us_slt_arctic::select_lexicon)
"(nitech_us_slt_arctic::select_lexicon)
Set up the CMU lexicon for US English."
(lex.select "cmu")
Post lexical rules
(set! postlex_rules_hooks (list postlex_apos_s_check))
)
(define (nitech_us_slt... |
6afc12935f022adb8f17dd6c5bf4d1de94afab8d5fd5439bf661dd9b449e676c | ocaml/odoc | root.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/ocaml/odoc/704ce161a32b6830c824ec4b9cc87b113b9228bd/src/model/root.ml | ocaml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
d8901e6e9b62e87363fd61cff29cf35a1b4e7e2ed0ea735d37e354d4e6245a4a | atennapel/tinka-hs | Surface.hs | module Surface where
import Data.List (intercalate)
import Text.Megaparsec (SourcePos)
import Data.Maybe (fromMaybe)
import Common
data SLevel
= SLVar Name
| SLS SLevel
| SLMax SLevel SLevel
| SLNat Int
showSLevelS :: SLevel -> String
showSLevelS l@(SLNat _) = show l
showSLevelS l@(SLVar _) = show l
showSLe... | null | https://raw.githubusercontent.com/atennapel/tinka-hs/555f862ba4099120a05a9db4eda8947f25c9bfe3/src/Surface.hs | haskell | module Surface where
import Data.List (intercalate)
import Text.Megaparsec (SourcePos)
import Data.Maybe (fromMaybe)
import Common
data SLevel
= SLVar Name
| SLS SLevel
| SLMax SLevel SLevel
| SLNat Int
showSLevelS :: SLevel -> String
showSLevelS l@(SLNat _) = show l
showSLevelS l@(SLVar _) = show l
showSLe... | |
428ccdd4b1b4f1daaff9453df5ae4f7e1cea03c53495a790a73c3a2b65b986a9 | nuprl/gradual-typing-performance | main.rkt | #lang racket/base
(require benchmark-util
(only-in racket/file file->lines file->string))
(require (submod "lcs.rkt" unsafe))
(define LARGE_TEST "../base/prufock.txt")
(define SMALL_TEST "../base/hunt.txt")
(define KCFA_TYPED "../base/kcfa-typed.rkt")
LCS on all pairs of lines in a file
(define (main tes... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/boundary-configurations/suffixtree/configuration001000-a/main.rkt | racket | 150ms
| #lang racket/base
(require benchmark-util
(only-in racket/file file->lines file->string))
(require (submod "lcs.rkt" unsafe))
(define LARGE_TEST "../base/prufock.txt")
(define SMALL_TEST "../base/hunt.txt")
(define KCFA_TYPED "../base/kcfa-typed.rkt")
LCS on all pairs of lines in a file
(define (main tes... |
f26fe0d6320fc18341ea7c0f3dc85322448facc4c54dbf3bd200cfa815377622 | databrary/databrary | File.hs | {-# LANGUAGE OverloadedStrings #-}
module HTTP.File
( fileResponse
, serveFile
) where
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString as BS
import Data.Monoid ((<>))
import Network.HTTP.Types (ResponseHeaders, hLastModified, hContentType, hCacheControl, hIfMod... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/HTTP/File.hs | haskell | # LANGUAGE OverloadedStrings #
allow range detection or force full file: | module HTTP.File
( fileResponse
, serveFile
) where
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString as BS
import Data.Monoid ((<>))
import Network.HTTP.Types (ResponseHeaders, hLastModified, hContentType, hCacheControl, hIfModifiedSince, notModified304, hIfRang... |
3ec53b8be374b9caa91d3a284b90f21cb082da6de1b7efb5b7135eaffd2fb091 | qmuli/qmuli | Stream.hs | # LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Qi.Test.Config.DDB.Stream where
import Control . Lens
import Control . Monad ( void )
import Data . Aeson
import Data . Aeson . Encode . Pre... | null | https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/tests/Qi/Test/Config/DDB/Stream.hs | haskell | # LANGUAGE OverloadedStrings #
Table
----------
Properties
EventSourceMapping
-------
Properties
TODO : this test fails , check if this was removed
Table
----------
Properties
EventSourceMapping
-------
Properties
TODO: this test fails, check if this was removed
it "specifies StartingPosit... | # LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
module Qi.Test.Config.DDB.Stream where
import Control . Lens
import Control . Monad ( void )
import Data . Aeson
import Data . Aeson . Encode . Pretty ( encodePretty )
import ... |
f919175ff1f8c4775a6a0975b5b1938399c44eee6b485e3c42019b182af9621e | janestreet/accessor | import.ml | include Accessor.O
| null | https://raw.githubusercontent.com/janestreet/accessor/e905e32c808dfda6950be29987a4bf4f2595fbfc/test_helpers/import.ml | ocaml | include Accessor.O
| |
275fa8afa8e18fae4715f92ff26787fe18a0ea4744cf398bc59adbe8a0400b4a | rcherrueau/APE | lam+ref.rkt | #lang racket/base
(require (prefix-in r: racket/base)
"utils.rkt")
;; Lambda Calculus + Reference
;;
;; x ∈ Variables (a, b, c, ...)
;;
Expression
;; e ::= x (Variable)
;; | (λ x e) (Abstraction)
;; | (e e) (Application)
;; | r (Mutable Reference)
;;
;; Mut... | null | https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/pan/attic/lam%2Bref.rkt | racket | Lambda Calculus + Reference
x ∈ Variables (a, b, c, ...)
e ::= x (Variable)
| (λ x e) (Abstraction)
| (e e) (Application)
| r (Mutable Reference)
Mutable Reference
r ::= (ref e) (Reference)
| (set! x e) (Assignment)
Reference
Assignment | #lang racket/base
(require (prefix-in r: racket/base)
"utils.rkt")
Expression
| ( deref x ) ( Dereference )
(extends-lang "lam.rkt")
(define-syntax-rule (ref EXP)
(r:box EXP))
(define-syntax-rule (set! VAR EXP)
(r:set-box! VAR EXP))
Dereference
(define-syntax-rule (deref VAR)
(r:un... |
fcd96adf5aedf5b697d0460eeedad8093aacf8fff18aec3766c278c79533a5dd | Mayvenn/storefront | frontend_transitions.cljs | (ns storefront.frontend-transitions
(:require [adventure.keypaths :as adventure.keypaths]
[catalog.products :as products]
catalog.categories
[cemerick.url :as url]
[clojure.string :as string]
[spice.core :as spice]
[spice.date :as date]
... | null | https://raw.githubusercontent.com/Mayvenn/storefront/38fc7a2ef1e77addc185319e9e846ae20b803fe1/src-cljs/storefront/frontend_transitions.cljs | clojure | (and (= 1 (mod session-n 2))
Going to a new page; add an element to the undo stack, and discard the redo stack
pop an element from the undo stack , push one onto the redo stack
Going to next page; pop an element from the redo stack, push one onto the undo stack
TODO ask product about this
order is important from ... | (ns storefront.frontend-transitions
(:require [adventure.keypaths :as adventure.keypaths]
[catalog.products :as products]
catalog.categories
[cemerick.url :as url]
[clojure.string :as string]
[spice.core :as spice]
[spice.date :as date]
... |
a907c1b5a3cd3e790ca3b6ae85b522fb91095a1c645e6e73196c5fdb77295b5d | tomgr/libcspm | PrettyPrint.hs | module Util.PrettyPrint (
module Text.PrettyPrint.HughesPJ,
PrettyPrintable (prettyPrint),
bytestring,
tabWidth,
tabIndent,
shortDouble,
commaSeparatedInt,
angles, bars, list, dotSep,
speakNth,
punctuateFront,
)
where
import qualified Data.ByteString.Char8 as B
import Numeric
... | null | https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/Util/PrettyPrint.hs | haskell | | The width, in spaces, of a tab character.
commas.
| Show a double `d` printing only `places` places after the decimal place.
(uses `nest`).
| Separates a list of `Doc`s by '.'.
| Separates a list of `Doc`s by ','. | module Util.PrettyPrint (
module Text.PrettyPrint.HughesPJ,
PrettyPrintable (prettyPrint),
bytestring,
tabWidth,
tabIndent,
shortDouble,
commaSeparatedInt,
angles, bars, list, dotSep,
speakNth,
punctuateFront,
)
where
import qualified Data.ByteString.Char8 as B
import Numeric
... |
d2dd6919c1d5231c63fe1cb4416b0510e134f8a4f293231019773251ba5b9575 | triffon/fp-2022-23 | 12.count-atoms.rkt | (define (atom? x)
(and (not (null? x))
(not (pair? x))))
(define (count-atoms dl)
(cond ((null? dl) 0)
((atom? dl) 1)
(else (+ (count-atoms (car dl))
(count-atoms (cdr dl))))))
| null | https://raw.githubusercontent.com/triffon/fp-2022-23/b6991b5be25fb65d1e44b49ff612eb4e63f7caae/exercises/cs2/05.scheme.fold-deeplists/solutions/12.count-atoms.rkt | racket | (define (atom? x)
(and (not (null? x))
(not (pair? x))))
(define (count-atoms dl)
(cond ((null? dl) 0)
((atom? dl) 1)
(else (+ (count-atoms (car dl))
(count-atoms (cdr dl))))))
| |
817c36393c7a8e6cbdc5d06bd2f27d914552a6f3d36b6e221b07dd8b5d5904bd | joyofclojure/book-source | macro_tunes.clj | (ns joy.macro-tunes
"Functions for computing tunes full of notes at compile time")
(defn pair-to-note
"Return a note map for the given tone and duration"
[[tone duration]]
{:cent (* 100 tone)
:duration duration
:volume 0.4})
(defn consecutive-notes
"Take a sequences of note maps that have no :delay, a... | null | https://raw.githubusercontent.com/joyofclojure/book-source/b76ef15248dac88c7b1c77c2d461f3aa522a1461/src/clj/joy/macro_tunes.clj | clojure | (ns joy.macro-tunes
"Functions for computing tunes full of notes at compile time")
(defn pair-to-note
"Return a note map for the given tone and duration"
[[tone duration]]
{:cent (* 100 tone)
:duration duration
:volume 0.4})
(defn consecutive-notes
"Take a sequences of note maps that have no :delay, a... | |
f523e5404ea9acbdfbf523ad9bf0e996c6161a8da582ab7d30c11392700be980 | ocaml-sf/learn-ocaml-corpus | trail_off_by_one.ml | (* ------------------------------------------------------------------------------ *)
(* Building formulae. *)
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
(* [FConst sense] would work too, but would allocate memory *)
let neg ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/trail_off_by_one.ml | ocaml | ------------------------------------------------------------------------------
Building formulae.
[FConst sense] would work too, but would allocate memory
------------------------------------------------------------------------------
Evaluating formulae.
We assume [n < Sys.word_size - 1].
-----------------... |
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
let neg f =
match f with
| FConst sense ->
const (not sense)
| FNeg f ->
f
| _ ->
FNeg f
let conn sense f1 f2 =
match f1, f2 with
| FConst sense', f
| f... |
e99526ffa8119c071d7da6324214d2c43a23c63fbf994011548bc805fa7db1d0 | LaurentMazare/tensorflow-ocaml | protobuf.mli | type t
val of_string : string -> t
val to_string : t -> string
val read_file : string -> t
| null | https://raw.githubusercontent.com/LaurentMazare/tensorflow-ocaml/52c5f1dec1a8b7dc9bc6ef06abbc07da6cd90d39/src/wrapper/protobuf.mli | ocaml | type t
val of_string : string -> t
val to_string : t -> string
val read_file : string -> t
| |
3e9f61568524db7866bbb24a951201c31743d26882140ceecaade85c66607c44 | onedata/op-worker | luma_test_utils.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Utility functions for luma tests
%... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/test_distributed/luma_test_utils.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Utility functions for luma tests
@end
-------------------------------------------------------------------
LUMA API
======================================================... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(luma_test_utils).
-author("Wojciech Geisler").
-include("luma_test_utils.hrl").
-include("modules/storage/helpers/helpers.hrl").
-export([run_test_for_all_storage_configs/5, clear_luma_db_... |
a25d0d76ac9f03a3bc949e3c83fe8643c9f6fee7108bf0366a74779541d9d6b4 | bennofs/haskell-generate | Monad.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
module Language.Haskell.Generate.Monad
( Generate(..), ExpG
, runGenerate, newName
, returnE
, useValue, useCon, useVar
, caseE
... | null | https://raw.githubusercontent.com/bennofs/haskell-generate/2e472a850f989d2086e2b708a98a9c355f14c25a/src/Language/Haskell/Generate/Monad.hs | haskell | ------------------------------------------------------------------------------
Generate expressions
| This monad keeps track of a counter for generating unique names and the set of modules
that are needed for the expression.
| Extract the set of modules and the value from a Generate action.
| This is a type alias ... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
module Language.Haskell.Generate.Monad
( Generate(..), ExpG
, runGenerate, newName
, returnE
, useValue, useCon, useVar
, caseE
... |
29984cd0401f2aee362adc9f428267ea2a8d1a54f4130cf6cd9e328bc97f9f6c | Gbury/dolmen | dolmen_tptp_v6_3_0.mli |
(* This file is free software, part of dolmen. See file "LICENSE" formore information *)
(** TPTP language input *)
module type Id = Ast.Id
module type Term = Ast.Term
module type Statement = Ast.Statement
* Implementation requirement for the TPTP format .
module Make
(L : Dolmen_intf.Location.S)
(I : Id)
... | null | https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/src/languages/tptp/v6.3.0/dolmen_tptp_v6_3_0.mli | ocaml | This file is free software, part of dolmen. See file "LICENSE" formore information
* TPTP language input |
module type Id = Ast.Id
module type Term = Ast.Term
module type Statement = Ast.Statement
* Implementation requirement for the TPTP format .
module Make
(L : Dolmen_intf.Location.S)
(I : Id)
(T : Term with type location := L.t and type id := I.t)
(S : Statement with type location := L.t and type id ... |
18c748a4883f8e6f86092796c2f7182db4acb81685596bd0bc92736e7a8c4b43 | ept/compsci | lambda2comb.ml |
* Convert a lambda calculus expression into an equivalent combinator expression .
* Pretty - prints terms at various stages of their evolution .
* ( c ) < > , 2008 - 03 - 08
* Convert a lambda calculus expression into an equivalent combinator expression.
* Pretty-prints terms at various stages of their... | null | https://raw.githubusercontent.com/ept/compsci/ed666bb4cf52ac2af5c2d13894870bdc23dca237/lambda_calculus/lambda2comb.ml | ocaml | Translate a lambda calculus expression into a combinator expression.
Applies conversionStep repeatedly until no change in the expression is detected.
Returns true if the lambda expression is just a constant or a variable, false otherwise.
Returns true if the lambda expression is a constant or a variable,
or... |
* Convert a lambda calculus expression into an equivalent combinator expression .
* Pretty - prints terms at various stages of their evolution .
* ( c ) < > , 2008 - 03 - 08
* Convert a lambda calculus expression into an equivalent combinator expression.
* Pretty-prints terms at various stages of their... |
5db80e599865cd5ead2e62757a409fc405f92cf7c6b1ea6cfaeb76f045124d37 | Yume-Labs/prism | core.clj | (ns prism.core
(:gen-class)
(:require [clojure.core.async :refer [chan]]
[clojure.java.io :refer [file]]
[clojure.edn :as edn]
[prism.db :refer [get-production-node retrieve-config]]
[prism.preflight :refer [check-config]]
[prism.pregenerate :refer [genera... | null | https://raw.githubusercontent.com/Yume-Labs/prism/1dd2c0f4eac8bbd32877a40617b36c1319d8f114/src/prism/core.clj | clojure | (ns prism.core
(:gen-class)
(:require [clojure.core.async :refer [chan]]
[clojure.java.io :refer [file]]
[clojure.edn :as edn]
[prism.db :refer [get-production-node retrieve-config]]
[prism.preflight :refer [check-config]]
[prism.pregenerate :refer [genera... | |
1ba3e9fe720db2f6572f8774740077bd7913611e4154d3ed0085abcfe0b21d79 | ghc/packages-dph | Vector.hs | module Vector
(solveV)
where
import Common
import Data.Vector.Unboxed
import Prelude hiding (map,filter,minimum)
# NOINLINE solveV #
solveV
:: Vector Vec3 -- ^ vertices of the surface
^ triangles , each 3 vertex indices
-> Vector Vec3 -- ^ rays to cast
-> Double ... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/spectral/Pluecker/Vector.hs | haskell | ^ vertices of the surface
^ rays to cast
^ time
^ the colours of the ray results - in the same order as input rays
(time / 4)
^ triangles with pluecker coords etc precomputed
^ ray
# INLINE get # | module Vector
(solveV)
where
import Common
import Data.Vector.Unboxed
import Prelude hiding (map,filter,minimum)
# NOINLINE solveV #
solveV
^ triangles , each 3 vertex indices
solveV vertices triangles rays time
= map cast' rays
where
tris' = map (triangleFull . tri vertices matrix) triangles
cast' = ... |
3c5e6c25cac71607253adcb71afc0ea674ac73c9db909d4b8e87cd0dab29a4b4 | re-ops/re-cipes | matrix.clj | (ns re-cipes.apps.matrix
(:require
[re-cipes.docker.nginx]
[re-cipes.docker.re-dock]
[re-cog.facts.datalog :refer (hostname fqdn)]
[re-cog.resources.exec :refer [run]]
[re-cog.resources.permissions :refer (set-file-acl)]
[re-cog.resources.ufw :refer (add-rule)]
[re-cog.resources.nginx :refer (sit... | null | https://raw.githubusercontent.com/re-ops/re-cipes/161318f8d2785a4eabfbcfe2ea76d8c4aa7db899/src/re_cipes/apps/matrix.clj | clojure | (ns re-cipes.apps.matrix
(:require
[re-cipes.docker.nginx]
[re-cipes.docker.re-dock]
[re-cog.facts.datalog :refer (hostname fqdn)]
[re-cog.resources.exec :refer [run]]
[re-cog.resources.permissions :refer (set-file-acl)]
[re-cog.resources.ufw :refer (add-rule)]
[re-cog.resources.nginx :refer (sit... | |
a1184a79ff4a00ab0e90c63a50a2d433cfbc52e32086a9edd9db59e0094e3812 | yesodweb/yesod | French.hs | {-# LANGUAGE OverloadedStrings #-}
module Yesod.Form.I18n.French (frenchFormMessage) where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
frenchFormMessage :: FormMessage -> Text
frenchFormMessage (MsgInvalidInteger t) = "Entier invalide : " `Data.Monoid.mappend` t
fre... | null | https://raw.githubusercontent.com/yesodweb/yesod/48d05fd6ab12ad440e1f2aa32684ed08b23f0613/yesod-form/Yesod/Form/I18n/French.hs | haskell | # LANGUAGE OverloadedStrings # | module Yesod.Form.I18n.French (frenchFormMessage) where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
frenchFormMessage :: FormMessage -> Text
frenchFormMessage (MsgInvalidInteger t) = "Entier invalide : " `Data.Monoid.mappend` t
frenchFormMessage (MsgInvalidNumber t)... |
bc03549d82fb37309020305fcc4bf8f22626728146c103578f4328c22a9f10ed | openmusic-project/openmusic | maquetteinterface.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/87bdbf0635d8febb0c49f52c59a388b205775583/OPENMUSIC/code/projects/musicproject/container/maquetteinterface.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
9732061c9bf955ad91653130a32aeefab2e40cdc7240cff79b378be2cf1d59d1 | haskell-github/github | ListStarred.hs | module ListStarred where
import qualified Github.Repos.Starring as Github
import Data.List (intercalate)
import Data.Maybe (fromMaybe)
main = do
possibleRepos <- Github.reposStarredBy Nothing "mike-burns"
putStrLn $ either (("Error: "++) . show)
(intercalate "\n\n" . map formatRepo)
... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Repos/Starring/ListStarred.hs | haskell | module ListStarred where
import qualified Github.Repos.Starring as Github
import Data.List (intercalate)
import Data.Maybe (fromMaybe)
main = do
possibleRepos <- Github.reposStarredBy Nothing "mike-burns"
putStrLn $ either (("Error: "++) . show)
(intercalate "\n\n" . map formatRepo)
... | |
3744161faf9ec6121d8aa4e9b51bf332a333fc19bac78cbfe05c8e95fb291542 | lispnik/iup | temperature.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "iup"))
(defpackage #:iup-examples.temperature
(:use #:common-lisp)
(:export #:temperature))
(in-package #:iup-examples.temperature)
(defun temperature ()
(iup:with-iup ()
(let* ((celsius-label (iup:label :title "Celsius = "))
(fare... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/7guis/temperature.lisp | lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "iup"))
(defpackage #:iup-examples.temperature
(:use #:common-lisp)
(:export #:temperature))
(in-package #:iup-examples.temperature)
(defun temperature ()
(iup:with-iup ()
(let* ((celsius-label (iup:label :title "Celsius = "))
(fare... | |
a65099b968547ce15d20db4415def2b940e8088135f3e6ab52c14e662c264bd6 | OCamlPro/typerex-lint | sUMisc.ml | let pair a b = a,b
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/libs/ocplib-sempatch/lib/std_utils/sUMisc.ml | ocaml | let pair a b = a,b
| |
765ec95dc170dde894e7a32d30f1042582948d593734480ee668b37bac586476 | manavpatnaik/haskell | 8_concat_lists_recursive.hs | concatList :: [Int] -> [Int] -> [Int]
concatList [] lst = lst
concatList (x : xs) lst = x : (concatList xs lst)
main = do
print(concatList [1,2] [3,4])
print(concatList [1,2,3] [4,5,6]) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/af45c3eb5c3461aa77cf25610dfcb3b41c7f7ef9/basic-programs/8_concat_lists_recursive.hs | haskell | concatList :: [Int] -> [Int] -> [Int]
concatList [] lst = lst
concatList (x : xs) lst = x : (concatList xs lst)
main = do
print(concatList [1,2] [3,4])
print(concatList [1,2,3] [4,5,6]) | |
d359f339febc04820a0b18e7287d24d2547209bf48cdec2e3c17174f066bf691 | nikodemus/SBCL | gate.lisp |
;;;;
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
;;;; provided with absol... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/contrib/sb-concurrency/gate.lisp | lisp |
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.
efficient. |
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-concurrency)
FIXME : On Linux a direct futex - based implementation would be more
(defstruct (gate (... |
6a228e056d2d491f2362f4a30343c82186d8f2fd527b64893f3bf9e606fb58cf | magnars/prone | code_excerpt.cljs | (ns prone.ui.components.code-excerpt
(:require [quiescent.core :as q :include-macros true]
[quiescent.dom :as d]))
(def source-classes {:clj "language-clojure"
:java "language-java"})
(q/defcomponent CodeExcerpt [source-loc]
(d/header {:className "trace_info clearfix"}
... | null | https://raw.githubusercontent.com/magnars/prone/50ed099bb95ad3dfa6d70d506f62faf0fdccebf8/src/prone/ui/components/code_excerpt.cljs | clojure | (ns prone.ui.components.code-excerpt
(:require [quiescent.core :as q :include-macros true]
[quiescent.dom :as d]))
(def source-classes {:clj "language-clojure"
:java "language-java"})
(q/defcomponent CodeExcerpt [source-loc]
(d/header {:className "trace_info clearfix"}
... | |
b4a805261bc73be405b5740b9c48bde6c9f4fa42e3c8015455ae223c325ae012 | AdaCore/why3 | gnat_ast_to_ptree.ml | open Why3
open Ptree
open Gnat_ast
open Ptree_constructors
let debug = Debug.register_info_flag "gnat_ast" ~desc:"Output@ mlw@ file"
let () = Debug.set_flag debug
[@@@warning "-42"]
exception Conversion_error of {node_id: int; message: string}
let conversion_error node_id message () = raise (Conversion_error {node... | null | https://raw.githubusercontent.com/AdaCore/why3/97be0f6354f4c5a85896746847192d828cc462d6/plugins/gnat_json/gnat_ast_to_ptree.ml | ocaml | * {1 Auxiliaries for conversion}
The purpose of this model is to allow suppression of duplicate imports in
Why3 theories. This requires a canonical representation of typical
imports, and a compare function for this type, so that we can use OCaml
sets to remove duplicates.
* Test if node is an unq... | open Why3
open Ptree
open Gnat_ast
open Ptree_constructors
let debug = Debug.register_info_flag "gnat_ast" ~desc:"Output@ mlw@ file"
let () = Debug.set_flag debug
[@@@warning "-42"]
exception Conversion_error of {node_id: int; message: string}
let conversion_error node_id message () = raise (Conversion_error {node... |
96e651edb8173d87376443e18e4e6fd98ce8cf1c86f104a65a1d5fbb61a8d45d | dgtized/shimmers | rtree_test.cljc | (ns shimmers.algorithm.rtree-test
(:require
[clojure.set :as set]
[clojure.test :as t :refer [deftest is] :include-macros true]
[shimmers.algorithm.rtree :as sut]
[thi.ng.geom.circle :as gc]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.utils :as gu]))
(deftest creation
(is... | null | https://raw.githubusercontent.com/dgtized/shimmers/57288e7faa60d9e04e2c515ef93c7016864b0d53/test/shimmers/algorithm/rtree_test.cljc | clojure | (ns shimmers.algorithm.rtree-test
(:require
[clojure.set :as set]
[clojure.test :as t :refer [deftest is] :include-macros true]
[shimmers.algorithm.rtree :as sut]
[thi.ng.geom.circle :as gc]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.utils :as gu]))
(deftest creation
(is... | |
724124cf4d6cd8812e74bc67cfd9abfc50d08e009d3685300e1e09a4204b5c25 | wdebeaum/step | contribute.lisp | ;;;;
;;;; W::contribute
;;;;
(define-words :pos W::v :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::contribute
(wordfeats (W::morph (:forms (-vb) :nom w::contribution)))
(SENSES
((LF-PARENT ont::donate-give)
(example "He contributed five dollars [to the donation]")
(SEM (F::Cause F::Agentive) (F::... | null | https://raw.githubusercontent.com/wdebeaum/step/a28ce9dc0acd732be9cf762ffdf7cbcb501d4200/src/LexiconManager/Data/new/contribute.lisp | lisp |
W::contribute
(TEMPL AGENT-affected-goal-OPTIONAL-TEMPL) |
(define-words :pos W::v :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::contribute
(wordfeats (W::morph (:forms (-vb) :nom w::contribution)))
(SENSES
((LF-PARENT ont::donate-give)
(example "He contributed five dollars [to the donation]")
(SEM (F::Cause F::Agentive) (F::Aspect F::bounded) (F::Time-s... |
cdcce1fbc4756605e7db2305fb07c392780cb68533f53869809fc0457a61e269 | metaocaml/ber-metaocaml | gpr1223.ml | TEST
flags = " -short - paths "
modules = " "
* toplevel
flags = " -short-paths "
modules = "gpr1223_foo.mli gpr1223_bar.mli"
* toplevel
*)
let y = Gpr1223_bar.N.O.T;;
let x = Gpr1223_bar.M.T;;
| null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-short-paths/gpr1223.ml | ocaml | TEST
flags = " -short - paths "
modules = " "
* toplevel
flags = " -short-paths "
modules = "gpr1223_foo.mli gpr1223_bar.mli"
* toplevel
*)
let y = Gpr1223_bar.N.O.T;;
let x = Gpr1223_bar.M.T;;
| |
c53509d8223523a104251a9e47851d4d792e26127f4be895f11c12887e5d7203 | monadbobo/ocaml-core | fqueue.mli | * A simple polymorphic functional queue .
Amortized running times assumes that enqueue / dequeue are used sequentially , threading
the changing Fqueue through the calls .
Amortized running times assumes that enqueue/dequeue are used sequentially, threading
the changing Fqueue through the calls. *)... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/fqueue.mli | ocaml | * test via asserts whether invariants hold
* The empty queue
* [enqueue t x] returns a queue with adds [x] to the end of [t]. Complexity: O(1)
* enqueue a single element on the *top* of the queue. Complexity: amortized O(1)
* returns the bottom (most-recently enqueued element). Raises [Empty] if no element is
... | * A simple polymorphic functional queue .
Amortized running times assumes that enqueue / dequeue are used sequentially , threading
the changing Fqueue through the calls .
Amortized running times assumes that enqueue/dequeue are used sequentially, threading
the changing Fqueue through the calls. *)... |
1b19b39f097f358740bdba0dce3f218c590a9bbb301d493b8fbde3a7537a90e6 | beala/symbolic | Util.hs | module Util where
import Foundation
import qualified Data.Bits as B
wordToInt :: Word32 -> Int
wordToInt = fromIntegral . toInteger
wordToSignedInt :: Word32 -> Int
wordToSignedInt w =
if isNegative w then
(-(wordToInt (twosComplement w)))
else
wordToInt w
wordToBool :: Word32 -> Bool
wordToBool 0 = Fa... | null | https://raw.githubusercontent.com/beala/symbolic/439bd8670d9e337a7d6a566b3af9d80ec239eafe/src/Util.hs | haskell | module Util where
import Foundation
import qualified Data.Bits as B
wordToInt :: Word32 -> Int
wordToInt = fromIntegral . toInteger
wordToSignedInt :: Word32 -> Int
wordToSignedInt w =
if isNegative w then
(-(wordToInt (twosComplement w)))
else
wordToInt w
wordToBool :: Word32 -> Bool
wordToBool 0 = Fa... | |
cf77581e5b186107a1f913f696ce788df48d555b2757b02029b5a2e911b43930 | realworldocaml/book | mode.ml | open! Stdune
type t =
| Byte
| Native
let equal x y =
match (x, y) with
| Byte, Byte -> true
| Byte, _ | _, Byte -> false
| Native, Native -> true
let compare x y =
match (x, y) with
| Byte, Byte -> Eq
| Byte, _ -> Lt
| _, Byte -> Gt
| Native, Native -> Eq
let all = [ Byte; Native ]
let decod... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/ocaml/mode.ml | ocaml | open! Stdune
type t =
| Byte
| Native
let equal x y =
match (x, y) with
| Byte, Byte -> true
| Byte, _ | _, Byte -> false
| Native, Native -> true
let compare x y =
match (x, y) with
| Byte, Byte -> Eq
| Byte, _ -> Lt
| _, Byte -> Gt
| Native, Native -> Eq
let all = [ Byte; Native ]
let decod... | |
4ca35565b44c7660e4dc578dfcf1b0db31e9a0e3e8bfba273af0e76b4d40757d | frenetic-lang/netcore-1.0 | Query1.hs | module Query1 where
import Frenetic.NetCore
import System.IO (hFlush, stdout)
main addr = do
let f (sw, n) = do
putStrLn ("Counter is: " ++ show n)
hFlush stdout
let pol = Any ==> [Forward AllPorts unmodified] <+>
Any ==> [CountPackets 0 1000 f]
controller addr pol
| null | https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/examples/Query1.hs | haskell | module Query1 where
import Frenetic.NetCore
import System.IO (hFlush, stdout)
main addr = do
let f (sw, n) = do
putStrLn ("Counter is: " ++ show n)
hFlush stdout
let pol = Any ==> [Forward AllPorts unmodified] <+>
Any ==> [CountPackets 0 1000 f]
controller addr pol
| |
491a45a57e95cf3e8742d6d3a16ecceb4413c125e7ef94e26e69aa30d4284346 | juxt/shop | ajax.cljs | (ns tutorial.vent.frontend.ajax
(:require
[cljs.reader :refer [read-string]]))
(defmulti page-fetch :name)
(defmethod page-fetch :default
[_]
nil)
(defn fetch-page
[page state*]
(some-> (page-fetch page)
(.then (fn [data] (.text data)))
(.then (fn [text] (read-string text)))
... | null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/tutorial.vent/src/tutorial/vent/frontend/ajax.cljs | clojure | (ns tutorial.vent.frontend.ajax
(:require
[cljs.reader :refer [read-string]]))
(defmulti page-fetch :name)
(defmethod page-fetch :default
[_]
nil)
(defn fetch-page
[page state*]
(some-> (page-fetch page)
(.then (fn [data] (.text data)))
(.then (fn [text] (read-string text)))
... | |
0c0791796c04091463fb054b5f7943c2fb0f3005523c3e9fc3eeb64a31c4e587 | gafiatulin/codewars | SJF.hs | Scheduling ( Shortest Job First or SJF )
-- /
module Codewars.Kata.SJF where
import Data.List (sort)
type CC = Integer
type Job = CC
type Index = Int
sjf :: [Job] -> Index -> CC
sjf xs i = sum . (\(before, after) -> (fst . head $ after) : map fst before ) . span ((/=i) . snd) . sort . zip xs $ [0..]
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/SJF.hs | haskell | / | Scheduling ( Shortest Job First or SJF )
module Codewars.Kata.SJF where
import Data.List (sort)
type CC = Integer
type Job = CC
type Index = Int
sjf :: [Job] -> Index -> CC
sjf xs i = sum . (\(before, after) -> (fst . head $ after) : map fst before ) . span ((/=i) . snd) . sort . zip xs $ [0..]
|
21fa68df73795a135406979717d5ea00f322227436dcca02cd3275fffd29254f | MLstate/opalang | qmlTracker.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libqmlcompil/qmlTracker.ml | ocaml | THIS FILE HAS A DOCUMENTED MLI
depends
refactoring in progress
shorthands
************************************************************************
************************************************************************
Source code positions printer registered.
waiting for flexibility in passhander optio... |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
6cea417d6d29599a5bedb903e961b850ed9d784b57cf680fabb6fef40cf6ba74 | mwand/eopl3 | environments.scm | (module environments (lib "eopl.ss" "eopl")
(require "data-structures.scm")
(provide init-env empty-env extend-env apply-env)
;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;;
;; init-env : () -> Env
usage : ( init - env ) = [ i=1 , v=5 , x=10 ]
;; (init-env) builds an environment in which i is bou... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter4/explicit-refs/environments.scm | scheme | initial environment ;;;;;;;;;;;;;;;;
init-env : () -> Env
(init-env) builds an environment in which i is bound to the
environment constructors and observers ;;;;;;;;;;;;;;;;
location : Sym * Listof(Sym) -> Maybe(Int)
else (location sym syms) = #f | (module environments (lib "eopl.ss" "eopl")
(require "data-structures.scm")
(provide init-env empty-env extend-env apply-env)
usage : ( init - env ) = [ i=1 , v=5 , x=10 ]
expressed value 1 , v is bound to the expressed value 5 , and x is
bound to the expressed value 10 .
Page : 69
(define init-env... |
1eff0b578a0da74a0673196f9837ffddf891891948dcfb01dc6dc23d36318c1a | AccelerateHS/accelerate | Either.hs | # LANGUAGE GADTs #
{-# LANGUAGE PatternSynonyms #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
-- |
-- Module : Data.Array.Accelerate.Pattern.Either
Copyright : [ 2018 .. 2020 ] The Accelerate Team
-... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Pattern/Either.hs | haskell | # LANGUAGE PatternSynonyms #
|
Module : Data.Array.Accelerate.Pattern.Either
License : BSD3
Stability : experimental
| # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
Copyright : [ 2018 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Acc... |
392da8204cba64119a2f0258f668ae0f809d195253c3becc47705605fff67157 | ashinn/chibi-scheme | stty.scm | Copyright ( c ) 2011 . All rights reserved .
;; BSD-style license:
> A high - level interface to stty and ioctl .
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; symbolic representation of attributes
(define stty-lookup (make-hash-table eq?))
(for-each
(lambda (c) (hash-table-set... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/stty.scm | scheme | BSD-style license:
symbolic representation of attributes
available on most systems
characters
will send a terminal stop signal
CHAR will end the line
CHAR will erase the last character typed
CHAR will send an interrupt signal
CHAR will erase the current line
CHAR will enter the next character quoted
CHAR ... | Copyright ( c ) 2011 . All rights reserved .
> A high - level interface to stty and ioctl .
(define stty-lookup (make-hash-table eq?))
(for-each
(lambda (c) (hash-table-set! stty-lookup (car c) (cdr c)))
ripped from the stty man page , then trimmed down to what seemed
CHAR will send an EOF ( terminate ... |
5c9fb650103ff8f7d7ec86e9fc0bbaa2c60e06738793cf9c4997aad112ee8be6 | chrisdone/ircbrowse | Types.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE MultiParamTypeClasses #
module Ircbrowse.Types where
import Ircbrowse.Data
import Ircbrowse.Types.Import
import Ircbrowse.Monads
import Control.Applicative
import Data.Text
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.FromRow
import Network.Mail.Mime... | null | https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/src/Ircbrowse/Types.hs | haskell | | Site-wide configuration.
| Statistics. | # LANGUAGE ScopedTypeVariables #
# LANGUAGE MultiParamTypeClasses #
module Ircbrowse.Types where
import Ircbrowse.Data
import Ircbrowse.Types.Import
import Ircbrowse.Monads
import Control.Applicative
import Data.Text
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.FromRow
import Network.Mail.Mime... |
89a7e9e021507f8e1fb8acd7cdba83213ad7351f2156bfad03fefe503ed99844 | camllight/camllight | communication.mli | (****************** Low level communication with the runtime ***************)
#open "obj";;
#open "value";;
#open "primitives";;
(*** Writing/reading data (values and objects). ***)
(* Reading/writing boxed values. *)
value output_val : out_channel -> VALUE -> unit
= 2 "output_val";;
value input_val : in_channel -... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/debugger/communication.mli | ocaml | ***************** Low level communication with the runtime **************
** Writing/reading data (values and objects). **
Reading/writing boxed values.
Read a boxed object.
Read an object.
Read an object header.
** Current connection. **
** Reports. **
** Primitives. **
Set an event at `position'.
Change th... |
#open "obj";;
#open "value";;
#open "primitives";;
value output_val : out_channel -> VALUE -> unit
= 2 "output_val";;
value input_val : in_channel -> VALUE
= 1 "input_val";;
value input_object : in_channel -> OBJECT
= 1 "input_object";;
value copy_remote_object : in_channel -> 'a
= 1 "copy_remote_object";;
... |
3e3bd3077e57684c6065c6c1365995c5c6d66ca0613b12001e89cd202868ba8b | morloc-project/morloc | Typecheck.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
|
Module : Morloc . Frontend . : Core inference module
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.Frontend.Typecheck
Description : Core inference module
Copyright ... | null | https://raw.githubusercontent.com/morloc-project/morloc/c4e76083afaaaeae2bb53a65fe23604200fdf2e0/library/Morloc/Frontend/Typecheck.hs | haskell | # LANGUAGE OverloadedStrings #
Modules, scopes, imports and everything else are abstracted away.
Check the general types, do nothing to the concrete types which may only be
solved after segregation. Later the concrete types will need to be checked
for type consistency and correctness of packers.
TypeU --> Type
l... | # LANGUAGE ViewPatterns #
|
Module : Morloc . Frontend . : Core inference module
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.Frontend.Typecheck
Description : Core inference module
Copyright : (c) Zebulun Arendsee, 2021
Licen... |
cfbd303bd12586ec9e4ca503032a031b43c2d063198dd369d550ed3e9cd49471 | metaocaml/ber-metaocaml | typetexp.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/typetexp.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
val valid_tyvar_name : string -> bool
val transl_simple_type:
Env.t -> bool -> Pars... |
2de4f70e120df7199c6c3d48db2a043cfa8ab97122e95b660be61fed06feff1f | threatgrid/ctim | campaigns.cljc | (ns ctim.examples.campaigns
(:require [ctim.schemas.common :as c]))
(def campaign-maximal
{:id "-b1f8e40a-0e99-48fc-bb12-32a65421cfb5"
:type "campaign"
:names ["foo" "bar"]
:schema_version c/ctim-schema-version
:revision 1
:external_ids ["-b1f8e40a-0e99-48fc-bb12-32a65421cfb5"
"-20... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/examples/campaigns.cljc | clojure | (ns ctim.examples.campaigns
(:require [ctim.schemas.common :as c]))
(def campaign-maximal
{:id "-b1f8e40a-0e99-48fc-bb12-32a65421cfb5"
:type "campaign"
:names ["foo" "bar"]
:schema_version c/ctim-schema-version
:revision 1
:external_ids ["-b1f8e40a-0e99-48fc-bb12-32a65421cfb5"
"-20... | |
4ac255b48f7d8ab9a8f526ba8bb87d22972d0eb09cd0a8922dd677f9ac4fa9a1 | 3b/3bgl-misc | ttf-extrude-example.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Render 3d characters using and - tess , with geometry
drawn through VBO / VAO
(defpackage #:glu-ttf-extrude-example
(:use :cl :glu-ttf-extrude :zpb-ttf :alexandria :basecode)
(:export #:ttf-tess-window))
(in-package #:glu-ttf-extrude-example)
(defclass ttf-t... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/ttf/ttf-extrude-example.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
we pick some random characters from the font, up to the number
specified in the class instance, or the number available
whichever is lower
select C glyphs at random (not very efficiently, but
we only need to do it once...)
loop through all of the characters, triangulate ... | Render 3d characters using and - tess , with geometry
drawn through VBO / VAO
(defpackage #:glu-ttf-extrude-example
(:use :cl :glu-ttf-extrude :zpb-ttf :alexandria :basecode)
(:export #:ttf-tess-window))
(in-package #:glu-ttf-extrude-example)
(defclass ttf-tess-window (basecode-glut perspective-projectio... |
c83617f6f91f79ecfcdc6c53776899bf403d91ee6403675d85a73c9df6faeaf9 | kazu-yamamoto/cab | Printer.hs | # LANGUAGE CPP #
module Distribution.Cab.Printer (
printDeps
, printRevDeps
, extraInfo
) where
import Control.Monad
import Data.Function
import Data.List
import Data.Map (Map)
import qualified Data.Map as M
import Distribution.Cab.PkgDB
import Distribution.Cab.Version
import Distribution.Cab.Utils (UnitId, ... | null | https://raw.githubusercontent.com/kazu-yamamoto/cab/a7bdc7129b079b2d980e529c6ad8c4c6e0456d23/Distribution/Cab/Printer.hs | haskell | --------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
-------------------------------------------------------------- | # LANGUAGE CPP #
module Distribution.Cab.Printer (
printDeps
, printRevDeps
, extraInfo
) where
import Control.Monad
import Data.Function
import Data.List
import Data.Map (Map)
import qualified Data.Map as M
import Distribution.Cab.PkgDB
import Distribution.Cab.Version
import Distribution.Cab.Utils (UnitId, ... |
e2956b66822471d08ababcd8c5a65a9450619c0c722d4e7bf795787249b0f0c3 | logicmoo/logicmoo_nlu | cogbot-init.lisp | ( load " / cogbot - init.lisp " )
;; DMiles likes to watch
(in-package "CYC")
(define FORCE-PRINT (string) (print string) (force-output))
(force-print ";; start loading cynd/cogbot-init.lisp")
(csetq *silent-progress?* NIL) ;this adds some printouts
(csetq *dump-verbose* T) ;this adds some printouts
(csetq *recan-ve... | null | https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/e2c/cynd/cogbot-init.lisp | lisp | DMiles likes to watch
this adds some printouts
this adds some printouts
makes it more like common lisp .. (but leaks functions) | ( load " / cogbot - init.lisp " )
(in-package "CYC")
(define FORCE-PRINT (string) (print string) (force-output))
(force-print ";; start loading cynd/cogbot-init.lisp")
(csetq *recan-verbose?* T)
(csetq *tm-load-verbose?* T)
(csetq *sunit-verbose* T)
(csetq *sme-lexwiz-verbose?* T)
(csetq *verbose-print-pph-phrases?*... |
4fbf7d4faf0a3dd298bc7d858df77fc06470f5fdc45b216ac6933e93aee4f2b4 | SimonHauguel/Paso | ParserData.hs | module Paso.Parser.ParserData where
import qualified Text.Megaparsec as MG
import Paso.Lexer.Stream
import Data.Void ( Void ) -- TODO Remove to custom error handling
import Data.Text ( pack )
import Paso.Lexer.Tokenise
t... | null | https://raw.githubusercontent.com/SimonHauguel/Paso/49c67ef67a97e5c4ed9dbfc0cc11d547806f8cfe/src/Paso/Parser/ParserData.hs | haskell | TODO Remove to custom error handling
TODO Put custom Type Error instead of Void | module Paso.Parser.ParserData where
import qualified Text.Megaparsec as MG
import Paso.Lexer.Stream
import Data.Text ( pack )
import Paso.Lexer.Tokenise
testPars :: Show a => Parser a -> String -> IO ()
testPars p s = case tokenise "test" (pack s) of... |
490839a52daf72806ea8448ba13ca9707c0d39cbe724de3de4271e8b58f0d013 | OlivierSohn/hamazed | Render.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
{-# LANGUAGE OverloadedStrings #-}
module Imj.Profile.Render
( writeHtmlReport
, resultsToHtml
reexport
, FilePath
) where
import Imj.Prelude hiding(div)
import Data.Text(pack)
import... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-profile/src/Imj/Profile/Render.hs | haskell | # LANGUAGE OverloadedStrings #
because we write a report only at the end, or on 'Report'
should not happen | # LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Imj.Profile.Render
( writeHtmlReport
, resultsToHtml
reexport
, FilePath
) where
import Imj.Prelude hiding(div)
import Data.Text(pack)
import Data.UUID(UUID)
import ... |
16722b31c510392c2b0757231d0590f5168ef7106bfb4606b72c389fa4f08cff | cognitect-labs/pedestal.kafka | kafka.clj | (ns com.cognitect.kafka
(:require [clojure.spec :as s]
[com.cognitect.kafka.common :as common]
[com.cognitect.kafka.connector :as connector]
[com.cognitect.kafka.producer :as producer]
[com.cognitect.kafka.consumer :as consumer]
[com.co... | null | https://raw.githubusercontent.com/cognitect-labs/pedestal.kafka/91e826112b2f2bdc6a366a66b6a3cc07f7fca20b/src/com/cognitect/kafka.clj | clojure | ----------------------------------------
Interceptors | (ns com.cognitect.kafka
(:require [clojure.spec :as s]
[com.cognitect.kafka.common :as common]
[com.cognitect.kafka.connector :as connector]
[com.cognitect.kafka.producer :as producer]
[com.cognitect.kafka.consumer :as consumer]
[com.co... |
9fb110376f5a14d6576126eed73ef978b47b6c964a01af0b5e790ecf5ee8412f | racket/htdp | world-mouse.rkt | #lang scheme
(require htdp/world)
(with-handlers ((exn? (lambda (x) #t)))
(place-image (circle 3 'solid 'red) 1.2 3.14 (empty-scene 100 100)))
(define (ms w x y e)
(if (eq? e 'button-down) (list x y) w))
(define (rd w)
(local ((define mt (empty-scene 300 300))
(define x1 (first w))
(define... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/htdp/tests/world-mouse.rkt | racket | #lang scheme
(require htdp/world)
(with-handlers ((exn? (lambda (x) #t)))
(place-image (circle 3 'solid 'red) 1.2 3.14 (empty-scene 100 100)))
(define (ms w x y e)
(if (eq? e 'button-down) (list x y) w))
(define (rd w)
(local ((define mt (empty-scene 300 300))
(define x1 (first w))
(define... | |
ec3ecd14749714bfa373cca7c65e14c501113dd0dbb4b52ac94e64d380ce177f | Idorobots/spartan | modules.rkt | #lang racket
;; Runtime support for modules.
(provide &make-structure &structure-binding &structure-ref)
(define (&make-structure . defs)
;; FIXME Yeah, an alist... Don't judge me...
(list &make-structure defs))
(define &structure-binding cons)
(define (&structure-ref s f)
(cdr (assoc f (cadr s))))
| null | https://raw.githubusercontent.com/Idorobots/spartan/ef3b032906655585d284f1c9a33a58f1e35cb180/src/runtime/modules.rkt | racket | Runtime support for modules.
FIXME Yeah, an alist... Don't judge me... | #lang racket
(provide &make-structure &structure-binding &structure-ref)
(define (&make-structure . defs)
(list &make-structure defs))
(define &structure-binding cons)
(define (&structure-ref s f)
(cdr (assoc f (cadr s))))
|
b53468e8c9ecc2d84868d140d52f4704d5ad46e20f1d11a4ff782d699e42d788 | dgtized/shimmers | intersection_test.cljc | (ns shimmers.math.geometry.intersection-test
(:require
[clojure.test :as t :refer [deftest is] :include-macros true]
[shimmers.math.geometry.intersection :as sut]
[thi.ng.geom.circle :as gc]
[thi.ng.geom.vector :as gv]))
(deftest circle-segment-isec
(is (sut/circle-segment-intersect? (gc/circle [1 1] 1... | null | https://raw.githubusercontent.com/dgtized/shimmers/57288e7faa60d9e04e2c515ef93c7016864b0d53/test/shimmers/math/geometry/intersection_test.cljc | clojure | (ns shimmers.math.geometry.intersection-test
(:require
[clojure.test :as t :refer [deftest is] :include-macros true]
[shimmers.math.geometry.intersection :as sut]
[thi.ng.geom.circle :as gc]
[thi.ng.geom.vector :as gv]))
(deftest circle-segment-isec
(is (sut/circle-segment-intersect? (gc/circle [1 1] 1... | |
968ca879e6be59aa04594c6ebedefc07c34ce71033dffd5d8f37bad47c25b6be | serokell/ariadne | Logging.hs | | Configuration of logging in .
module Ariadne.Config.Logging
( defaultLoggingConfig
, loggingFieldModifier
, LoggingConfig (..)
, lcPathL
) where
import Control.Lens (makeLensesWith)
import qualified Data.HashMap.Strict.InsOrd as Map
import qualified Dhall as D
import Dhall.Core... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/src/Ariadne/Config/Logging.hs | haskell | | Configuration of logging in .
module Ariadne.Config.Logging
( defaultLoggingConfig
, loggingFieldModifier
, LoggingConfig (..)
, lcPathL
) where
import Control.Lens (makeLensesWith)
import qualified Data.HashMap.Strict.InsOrd as Map
import qualified Dhall as D
import Dhall.Core... | |
4a18b66b1220898778bbf8c5b3d76c7015a62a4af480005073cc86ea49df5dce | fulcrologic/semantic-ui-wrapper | ui_dropdown_divider.cljc | (ns com.fulcrologic.semantic-ui.modules.dropdown.ui-dropdown-divider
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$DropdownDivider" :as DropdownDivider])))
(def ui-dropdown-divider
"A dropdown menu can contain dividers to separate related content.
Props:
... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/modules/dropdown/ui_dropdown_divider.cljc | clojure | (ns com.fulcrologic.semantic-ui.modules.dropdown.ui-dropdown-divider
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$DropdownDivider" :as DropdownDivider])))
(def ui-dropdown-divider
"A dropdown menu can contain dividers to separate related content.
Props:
... | |
8b0c6d4cdad9a063da509c203d7e5feac4aaef03d3c73a3cbbd48d3c07673fb4 | racket/gui | load.rkt | #lang racket/base
(require "test-suite-utils.rkt")
(module test racket/base)
(load-framework-automatically #f)
(define (test/load file exp)
(test
(string->symbol file)
void?
`(let ([mred-name ((current-module-name-resolver) 'mred #f #f #t)]
[orig-namespace (current-namespace)])
... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/framework/tests/load.rkt | racket | ensures that all of the names in the signature are provided
by (require framework)
these extra evals let me submit multiple, independent top-level
expressions in the newly created namespace. | #lang racket/base
(require "test-suite-utils.rkt")
(module test racket/base)
(load-framework-automatically #f)
(define (test/load file exp)
(test
(string->symbol file)
void?
`(let ([mred-name ((current-module-name-resolver) 'mred #f #f #t)]
[orig-namespace (current-namespace)])
... |
9fc038616c59a99479e0c689d9faf1d6debf30487a326f56a143373f1351ad2f | snmsts/cl-langserver | slynk-profiler.lisp | (defpackage :ls-profiler
(:use :cl)
(:import-from :ls-base :defslyfun :from-string :to-string)
(:export #:toggle-timing
#:untime-spec
#:clear-timing-tree
#:untime-all
#:timed-spec-p
#:time-spec))
(in-package :ls-profiler)
(defvar *timing-lock* (ls-backend:m... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/contrib/slynk-profiler.lisp | lisp | Reporting to emacs
| (defpackage :ls-profiler
(:use :cl)
(:import-from :ls-base :defslyfun :from-string :to-string)
(:export #:toggle-timing
#:untime-spec
#:clear-timing-tree
#:untime-all
#:timed-spec-p
#:time-spec))
(in-package :ls-profiler)
(defvar *timing-lock* (ls-backend:m... |
0ed39dc0cac1ccbec0c1d1b3b742fb7c0805fe50e507f43d08390f5891d5e190 | buntine/Simply-Scheme-Exercises | 19-3.scm | Write the three - argument version of accumulate that we described .
;
> ( three - arg - accumulate + 0 ' ( 4 5 6 ) )
15
;
> ( three - arg - accumulate + 0 ' ( ) )
0
;
> ( three - arg - accumulate cons ' ( ) ' ( a b c d e ) )
; (A B C D E)
(define (three-arg-accumulate func null-value sent)
(if (empty? s... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/19-implementing-higher-order-functions/19-3.scm | scheme |
(A B C D E) | Write the three - argument version of accumulate that we described .
> ( three - arg - accumulate + 0 ' ( 4 5 6 ) )
15
> ( three - arg - accumulate + 0 ' ( ) )
0
> ( three - arg - accumulate cons ' ( ) ' ( a b c d e ) )
(define (three-arg-accumulate func null-value sent)
(if (empty? sent)
null-value
... |
c17da0046890cb3b72c9a523247bee7a1d1675584b3c1f58b060a3bb45f45e88 | NorfairKing/smos | Gen.hs | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Cursor.Report.Entry.Gen where
import Cursor.Forest
import Cursor.Forest.Gen ()
import Cursor.Text.Gen ()
import Cursor.Tree
import Data.Foldable
import Data.GenValidity
import Data.GenValidity.Path ()
import Data.Maybe
import Lens.Micro
import Path
import Smos.Cursor.... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-report-cursor-gen/src/Smos/Cursor/Report/Entry/Gen.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Cursor.Report.Entry.Gen where
import Cursor.Forest
import Cursor.Forest.Gen ()
import Cursor.Text.Gen ()
import Cursor.Tree
import Data.Foldable
import Data.GenValidity
import Data.GenValidity.Path ()
import Data.Maybe
import Lens.Micro
import Path
import Smos.Cursor.... | |
2842cccf380c8e0eb62f9a994229e1d195bd8c51f3ac2c722eb1cc7830f59e50 | lowasser/TrieMap | TrieBench.hs | # OPTIONS -fasm #
module TrieBench (main) where
import Criterion.Main
import Data.TrieSet
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import Control.Monad.Primitive
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Random (getRandomR, RandT, StdGen, evalRandT, mkStd... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/TrieBench.hs | haskell | # OPTIONS -fasm #
module TrieBench (main) where
import Criterion.Main
import Data.TrieSet
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import Control.Monad.Primitive
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Random (getRandomR, RandT, StdGen, evalRandT, mkStd... | |
b5eec05a720d52ae6ca2634307eaf7c1f69c4a08bbdb03a06b286f8db204b948 | matsen/pplacer | nbc.mli | open Ppatteries
exception Invalid_base of char
val bases: string
val informative: char -> bool
val word_to_int: string -> int
val int_to_word: ?word_length:int -> int -> string
val gen_count_by_seq: int -> (int -> unit) -> string -> unit
val max_word_length: int
val random_winner_max_index: ('a, 'b, 'c) Bigarray.Arr... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/nbc.mli | ocaml | open Ppatteries
exception Invalid_base of char
val bases: string
val informative: char -> bool
val word_to_int: string -> int
val int_to_word: ?word_length:int -> int -> string
val gen_count_by_seq: int -> (int -> unit) -> string -> unit
val max_word_length: int
val random_winner_max_index: ('a, 'b, 'c) Bigarray.Arr... | |
adf7ee82a22e2c3cb98ddc88c84b76153ff94a31f92ea2710af556b47284eeb4 | clash-lang/clash-compiler | Deriving.hs | |
Copyright : ( C ) 2018 - 2022 , Google Inc
2019 , Myrtle Software Ltd
2023 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2018-2022, Google Inc
2019, Myrtle Softw... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/c60353ef28bece4a62f4425ff78b0bd96ed69e40/clash-prelude/src/Clash/Clocks/Deriving.hs | haskell | Derive instance for /n/ clocks
Function definition of 'clocks'
Implementation of 'clocks'
| Generate type @Clock dom@ with fresh @dom@ variable
Derive instances for up to and including to /n/ clocks | |
Copyright : ( C ) 2018 - 2022 , Google Inc
2019 , Myrtle Software Ltd
2023 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2018-2022, Google Inc
2019, Myrtle Softw... |
dd78980c6f75651ddc9a669e376345275d3ac5641fb6ad5c7cf32f6bf04e927d | jnear/compiler-construction-assignments | r5_1.rkt | ((lambda: ([x : Integer]) : Integer x) 42)
| null | https://raw.githubusercontent.com/jnear/compiler-construction-assignments/17a1edbd59627341622203056180d9af7830756d/tests/r5_1.rkt | racket | ((lambda: ([x : Integer]) : Integer x) 42)
| |
1de79f7beb2a27cd80c36d8231daeb7dc5d70943e5f4721f1e1fadc229bee635 | dstarcev/stepic-haskell | Task5.hs | module Module3.Task5 where
sum3 :: Num a => [a] -> [a] -> [a] -> [a]
sum3 = iter []
where
iter a [] [] [] = reverse a
iter a [] a2 a3 = iter a [0] a2 a3
iter a a1 [] a3 = iter a a1 [0] a3
iter a a1 a2 [] = iter a a1 a2 [0]
iter a (x1:xs1) (x2:xs2) (x3:xs3) =
iter (x1 + x2 + x3 : a) xs1 xs2 ... | null | https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module3/Task5.hs | haskell | module Module3.Task5 where
sum3 :: Num a => [a] -> [a] -> [a] -> [a]
sum3 = iter []
where
iter a [] [] [] = reverse a
iter a [] a2 a3 = iter a [0] a2 a3
iter a a1 [] a3 = iter a a1 [0] a3
iter a a1 a2 [] = iter a a1 a2 [0]
iter a (x1:xs1) (x2:xs2) (x3:xs3) =
iter (x1 + x2 + x3 : a) xs1 xs2 ... | |
adbf859e9ba6d6321d31796cd8c7ef5811404a4f10b8819713d2bb569871fead | DSiSc/why3 | why3__BigInt.ml |
open Why3__BigInt_compat
type t = Why3__BigInt_compat.big_int
let compare = compare_big_int
let zero = zero_big_int
let one = unit_big_int
let succ = succ_big_int
let pred = pred_big_int
let add_int = add_int_big_int
let mul_int = mult_int_big_int
let add = add_big_int
let sub = sub_big_int
let mul = mult_big_in... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/lib/ocaml/why3__BigInt.ml | ocaml | when y <> 0, we have x = q*y + r with 0 <= r < |y| |
open Why3__BigInt_compat
type t = Why3__BigInt_compat.big_int
let compare = compare_big_int
let zero = zero_big_int
let one = unit_big_int
let succ = succ_big_int
let pred = pred_big_int
let add_int = add_int_big_int
let mul_int = mult_int_big_int
let add = add_big_int
let sub = sub_big_int
let mul = mult_big_in... |
93afd82b75d6f64f8d0e154200ea9cf4e309d79c37a184dd5e2c250c1b0f3721 | cryptosense/pkcs11 | pkcs11_CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE.mli | * Salt used in [ CKM_PKCS5_PBKD2 ] ( [ CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE ] )
type t = P11_ulong.t [@@deriving eq, ord]
val _CKZ_SALT_SPECIFIED : t
val make : P11_pkcs5_pbkdf2_salt_source_type.t -> t
val view : t -> P11_pkcs5_pbkdf2_salt_source_type.t
val typ : t Ctypes.typ
| null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE.mli | ocaml | * Salt used in [ CKM_PKCS5_PBKD2 ] ( [ CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE ] )
type t = P11_ulong.t [@@deriving eq, ord]
val _CKZ_SALT_SPECIFIED : t
val make : P11_pkcs5_pbkdf2_salt_source_type.t -> t
val view : t -> P11_pkcs5_pbkdf2_salt_source_type.t
val typ : t Ctypes.typ
| |
6d2569311a3e646c53ef2c7e6e492e1f97c4e4f2c96adc9b6a9b614786296476 | avsm/eeww | test_caml_parallel.ml | (* TEST
include runtime_events
*)
open Runtime_events
let majors = Atomic.make 0
let minors = Atomic.make 0
let got_start = ref false
let lost_events_count = ref 0
let lost_events domain_id num_events =
lost_events_count := !lost_events_count + num_events
let lifecycle domain_id ts lifecycle_event data =
m... | null | https://raw.githubusercontent.com/avsm/eeww/23ca8b36127b337512e13c6fb8e86b3a7254d4f9/boot/ocaml/testsuite/tests/lib-runtime-events/test_caml_parallel.ml | ocaml | TEST
include runtime_events
| open Runtime_events
let majors = Atomic.make 0
let minors = Atomic.make 0
let got_start = ref false
let lost_events_count = ref 0
let lost_events domain_id num_events =
lost_events_count := !lost_events_count + num_events
let lifecycle domain_id ts lifecycle_event data =
match lifecycle_event with
| EV... |
cc735b9d650f4b01da9aecc63c1f003ebef199087c153776fd2f6f7d5f4e9aea | simonstl/introducing-erlang-2nd | drop.erl | -module(drop).
-export([fall_velocity/1]).
fall_velocity(Distance) -> math:sqrt(2 * 9.8 * Distance). | null | https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch02/ex4-combined/drop.erl | erlang | -module(drop).
-export([fall_velocity/1]).
fall_velocity(Distance) -> math:sqrt(2 * 9.8 * Distance). | |
509a04d76b114b6a1332a43ba298a3a769daf0b0702fe6e4fd537c730d59fe38 | tonymorris/geo-osm | MaxlatL.hs | -- | Values with a @maxlat@ string accessor.
module Data.Geo.OSM.Lens.MaxlatL where
import Control.Lens.Lens
class MaxlatL a where
maxlatL ::
Lens' a String
| null | https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Lens/MaxlatL.hs | haskell | | Values with a @maxlat@ string accessor. | module Data.Geo.OSM.Lens.MaxlatL where
import Control.Lens.Lens
class MaxlatL a where
maxlatL ::
Lens' a String
|
872f547dcaaf54f088644bd1d21548b562b6a38801611efedc7b7e87cd548ee3 | mitchellwrosen/dohaskell | Tag.hs | module Model.Tag where
import Import
import Model.Resource
-- | Get all tags.
fetchAllTagsDB :: YesodDB App [Entity Tag]
fetchAllTagsDB = selectList [] []
| Get a map of TagId to the number of Resources with that tag .
fetchTagCountsDB :: YesodDB App (Map TagId Int)
fetchTagCountsDB = fetchResourceFieldCountsDB R... | null | https://raw.githubusercontent.com/mitchellwrosen/dohaskell/69aea7a42112557ac3e835b9dbdb9bf60a81f780/src/Model/Tag.hs | haskell | | Get all tags.
| Get the year range of all Resources of with a specific Tag. If none of the
Resources with that Tag have any published year, then the Tag will not exist
in the returned map. | module Model.Tag where
import Import
import Model.Resource
fetchAllTagsDB :: YesodDB App [Entity Tag]
fetchAllTagsDB = selectList [] []
| Get a map of TagId to the number of Resources with that tag .
fetchTagCountsDB :: YesodDB App (Map TagId Int)
fetchTagCountsDB = fetchResourceFieldCountsDB ResourceTagTagId
fe... |
df95c4dd7e8ed7c8b82264a5b5c40ae97922865373ba249a6d2fbb1c168f31a9 | maximedenes/native-coq | gmap.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/gmap.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Maintien de fold_right par compatib... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Maps using the generic comp... |
cf7004a7d9f47a25fb4b5d47c90dd745b4637dd89f6c25ee9f52bdd4a7e5fbb1 | system-f/fp-course | Validation.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.Validation where
import qualified Prelude as P(String)
import Course.Core
-- $setup
-- >>> import Test.QuickCheck
> > > import qualified Prelude as P(fmap , either )
> > > instance Arbitrary a = > Arbitrary ( Validation a ) where arbit... | null | https://raw.githubusercontent.com/system-f/fp-course/e929bc909a1701f67d218ed7974e9732d1e8dd32/src/Course/Validation.hs | haskell | $setup
>>> import Test.QuickCheck
| Returns whether or not the given validation is an error.
>>> isError (Error "message")
True
False
| Returns whether or not the given validation is a value.
>>> isValue (Error "message")
False
True
| Maps a function on a validation's value side.
>>> mapValidation (+... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.Validation where
import qualified Prelude as P(String)
import Course.Core
> > > import qualified Prelude as P(fmap , either )
> > > instance Arbitrary a = > Arbitrary ( Validation a ) where arbitrary = ( P.either Error Value ) arbitra... |
3480b6ebdac22e569a1421dcf62e173f534953284a80e9c5e3f747bbca6f2dc8 | k0dev/erlang-notes | killer.erl | -module(killer).
-export([start/0]).
start() -> spawn(fun() -> kill() end).
kill() ->
receive
stop -> io:format("the killer has been stopped~n");
{Pid, force} -> exit(Pid, kill),
kill();
Pid -> exit(Pid, "You have been killed"),
kill()
end.
... | null | https://raw.githubusercontent.com/k0dev/erlang-notes/0c07941cc0182902e5386a58b513bb937e733e76/code/examples/concurrency/killer.erl | erlang |
> c(killer).
{ok,killer}
> K = killer:start().
> self().
** exception exit: "You have been killed"
> self().
<0.92.0>
> is_process_alive(K).
true
process_flag(trap_exit, true).
false
> K ! self().
<0.92.0>
exits with exit reason killed"
> c(killer).
{ok,killer}
> K = killer:start().
> process_flag(... | -module(killer).
-export([start/0]).
start() -> spawn(fun() -> kill() end).
kill() ->
receive
stop -> io:format("the killer has been stopped~n");
{Pid, force} -> exit(Pid, kill),
kill();
Pid -> exit(Pid, "You have been killed"),
kill()
end.
... |
92fbfb92672939889769211392ba7e98899c265d05f28523b44dadf09f1ae250 | lspitzner/brittany | Test112.hs | foo = if True
then
-- iiiiii
"a "
else
"b "
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test112.hs | haskell | iiiiii | foo = if True
then
"a "
else
"b "
|
87531b044a9ebb508c76291b38db5557f5359ae2062569b8d266528e3ae05197 | clojure/core.typed.analyzer.jvm | infer_tag.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed.analyzer.jvm/7246adac3bb5565ae0a785f430a2121226e7d1cb/src/main/clojure/clojure/core/typed/analyzer/passes/jvm/infer_tag.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.analyzer.passes.jvm.infer-tag
(:require [clojure.tools.analyzer.utils :refer [arglist-for-arity]]
[clojure.tools.analyzer.jvm.utils :as u]
[clojure.core.typed.analyzer.env :as env]
[clojure.set :as set]
... |
42f6fe7024e5a13ef461eb9913ff5bd7630b8c317688efb3cafcf894b968adcb | inhabitedtype/ocaml-aws | restoreDBInstanceFromS3.mli | open Types
type input = RestoreDBInstanceFromS3Message.t
type output = RestoreDBInstanceFromS3Result.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/restoreDBInstanceFromS3.mli | ocaml | open Types
type input = RestoreDBInstanceFromS3Message.t
type output = RestoreDBInstanceFromS3Result.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
0f8d19fbedf1806596e805e618e77c2676086480dcecbbf2a2c625836d1f7a51 | schell/gelatin | GLFW.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
module Gelatin.GLFW (
Rez(..),
-- * Startup
startupGLFWBackend,
newWindow,
-- * Rendering
renderWithGLFW,
updateWindowGLFW,
-- * Re-exports
module GL,
module GLFW
) where
import Gelatin.G... | null | https://raw.githubusercontent.com/schell/gelatin/04c1c83d4297eac4f4cc5e8e5c805b1600b3ee98/gelatin-glfw/src/Gelatin/GLFW.hs | haskell | * Startup
* Rendering
* Re-exports
| Creates a window. This can only be called after initializing with
^ Width
^ Height
^ Title
^ The monitor to fullscreen into.
^ A window to share OpenGL contexts with.
Calculate the dpi of the primary monitor.
-Schell
| Completes all initialization, creates a new window... | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
module Gelatin.GLFW (
Rez(..),
startupGLFWBackend,
newWindow,
renderWithGLFW,
updateWindowGLFW,
module GL,
module GLFW
) where
import Gelatin.GL as GL
import Control.Monad
import Control.Arrow (secon... |
2d25c252a8ca69724c992c6c18ed6718fb99cc89e03f2d7325b1a5fb9d7b8f19 | slegrand45/examples_ocsigen | types.ml | type horiz_position = Left | Middle | Right
type vert_position = Top | Center | Bottom
type diag_position = Left_top_right_bottom | Right_top_left_bottom
type cell_position = horiz_position * vert_position
type player = Player_x | Player_o
type cell_state = Played of player | Empty
type cell = { pos : cell_position; st... | null | https://raw.githubusercontent.com/slegrand45/examples_ocsigen/e2f5efe57caf7a644795ac6b14f6d6e04168e4be/jsoo/tic-tac-toe/types.ml | ocaml | type horiz_position = Left | Middle | Right
type vert_position = Top | Center | Bottom
type diag_position = Left_top_right_bottom | Right_top_left_bottom
type cell_position = horiz_position * vert_position
type player = Player_x | Player_o
type cell_state = Played of player | Empty
type cell = { pos : cell_position; st... | |
fd566340fbb96dfb53429c3551d8b6d3db66b22fe1c396c688befae8a9c9ef19 | jacius/lispbuilder | fps.lisp |
(in-package #:lispbuilder-sdl)
(defgeneric (setf target-frame-rate) (rate fpsmngr)
(:documentation "Set the target frame rate for the game loop.
RATE > 0 will lock the game loop to the specified frame rate, and
calculate the average frame rate over a number of frames.
RATE = 0 will unlock the frame rate, and calcu... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/sdl/fps.lisp | lisp | --------------------------
Lock the game loop to a specified rate
This is a reimplementation of the algorithm for SDL_gfx
From /
Delay game loop, if necessary
--------------------------
Lock timestep to Specified Rate
From -physics/fix-your-timestep/
--------------------------
Lock timestep to Specified Rate
... |
(in-package #:lispbuilder-sdl)
(defgeneric (setf target-frame-rate) (rate fpsmngr)
(:documentation "Set the target frame rate for the game loop.
RATE > 0 will lock the game loop to the specified frame rate, and
calculate the average frame rate over a number of frames.
RATE = 0 will unlock the frame rate, and calcu... |
78cb980fc631d71fdec91e7277fe9a6380d847967352aa5cb882e2999f41d4b3 | D00mch/PWA-clojure | config.clj | (ns pwa.config
(:require
[cprop.core :refer [load-config]]
[cprop.source :as source]
[mount.core :refer [args defstate]]))
(defstate env
:start
(load-config
:merge
[(args)
(source/from-system-props)
(source/from-env)]))
| null | https://raw.githubusercontent.com/D00mch/PWA-clojure/39ab4d3690c7a8ddbdd8095d65a782961f92c183/src/clj/pwa/config.clj | clojure | (ns pwa.config
(:require
[cprop.core :refer [load-config]]
[cprop.source :as source]
[mount.core :refer [args defstate]]))
(defstate env
:start
(load-config
:merge
[(args)
(source/from-system-props)
(source/from-env)]))
| |
e290d22733ed939b24f32bfb6380349939605d897ed46cdc4e33e209c77486a7 | swarmpit/swarmpit | page_403.cljs | (ns swarmpit.component.page-403
(:require [rum.core :as rum]
[sablono.core :refer-macros [html]]
[material.components :as comp]
[swarmpit.routes :as routes]))
(rum/defc form < rum/static []
(comp/mui
(html
[:div.Swarmpit-form
[:div.Swarmpit-form-context
... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/page_403.cljs | clojure | (ns swarmpit.component.page-403
(:require [rum.core :as rum]
[sablono.core :refer-macros [html]]
[material.components :as comp]
[swarmpit.routes :as routes]))
(rum/defc form < rum/static []
(comp/mui
(html
[:div.Swarmpit-form
[:div.Swarmpit-form-context
... | |
8ab8985e2a7f88b6ac9d0e8489ed101ee2ce16c116683b9e16b883b87e82ca8e | joachimdb/dl4clj | graves_lstm.clj | (ns ^{:doc "see "}
dl4clj.nn.conf.layers.graves-lstm
(:require [dl4clj.nn.conf.layers.base-recurrent-layer :as br-layer])
(:import [org.deeplearning4j.nn.conf.layers GravesLSTM$Builder]))
(defn builder [{:keys [forget-gate-bias-init] ;; (double)
:or {}
:as opts}]
(let [builder ^... | null | https://raw.githubusercontent.com/joachimdb/dl4clj/fe9af7c886b80df5e18cd79923fbc6955ddc2694/src/dl4clj/nn/conf/layers/graves_lstm.clj | clojure | (double)
(double)
Example usages: | (ns ^{:doc "see "}
dl4clj.nn.conf.layers.graves-lstm
(:require [dl4clj.nn.conf.layers.base-recurrent-layer :as br-layer])
(:import [org.deeplearning4j.nn.conf.layers GravesLSTM$Builder]))
:or {}
:as opts}]
(let [builder ^GravesLSTM$Builder (br-layer/builder (GravesLSTM$Builder.)... |
241248dfd5b832d4a46864be9a6fc8beba41afdefb9dad3fe77927019265a5cd | qkrgud55/ocamlmulti | str.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/otherlibs/str/str.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : str.mli 12922 2012 - 09 - 11 ... |
17acd4c9b7b4b073f3e7fe4e4d7fbf70e99721100a02f3d4a5a1b9b39e112629 | metaocaml/ber-metaocaml | t050-pushgetglobal.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
let _ = () in 0.01;;
*
0
1 PUSHGETGLOBAL 0.01
3 P... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t050-pushgetglobal.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
let _ = () in 0.01;;
*
0
1 PUSHGETGLOBAL 0.01
3 P... | |
7949aad37a1de16d2ddadabcca85f3c47216266ac67c1a7e6f1bd02d239c8dfc | teamwalnut/graphql-ppx | main.ml | let suites =
[
("Argument named 'query'", Arg_named_query.tests);
("Custom decoder", Custom_decoder.tests);
("Custom scalars", Custom_scalars.tests);
("Enum input", Enum_input.tests);
("Fragment definition", Fragment_definition.tests);
("Interface", Interface.tests);
("Lists", Lists.tests)... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/eb8648d1552fbc11989b9197ef41a7a958b2545f/tests_native/main.ml | ocaml | let suites =
[
("Argument named 'query'", Arg_named_query.tests);
("Custom decoder", Custom_decoder.tests);
("Custom scalars", Custom_scalars.tests);
("Enum input", Enum_input.tests);
("Fragment definition", Fragment_definition.tests);
("Interface", Interface.tests);
("Lists", Lists.tests)... | |
481278f6572c55f89746ff2f2542eaffc443400925997b2e7e2f5faec389aa19 | klutometis/clrs | figure-23.4.scm | (require-extension check)
(require 'section)
(import section-23.2)
(let* ((MST (minimum-spanning-tree/kruskal (figure-23.1)))
(edge-labels
(map
(lambda (edge)
(let ((whence-label (node-label (edge-whence edge)))
(whither-label (node-label (edge-whither edge))))
... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/23.2/figure-23.4.scm | scheme | (require-extension check)
(require 'section)
(import section-23.2)
(let* ((MST (minimum-spanning-tree/kruskal (figure-23.1)))
(edge-labels
(map
(lambda (edge)
(let ((whence-label (node-label (edge-whence edge)))
(whither-label (node-label (edge-whither edge))))
... | |
2b6e041ba9fb39ca6118a654f485f8ba57cf6420ad41351c2206332f66e0514e | blockfrost/blockfrost-haskell | Network.hs | # LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Cardano.Network
where
import Data.Aeson (decode, eitherDecode, encode)
import Data.Text (Text)
import qualified Money
import Test.Hspec
import Test.Tasty.Hspec
import Text.RawString.QQ
im... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/c3812a14a5c0071a17972d9f2ba66ac56ebcbb8a/blockfrost-api/test/Cardano/Network.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NumericUnderscores #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Cardano.Network
where
import Data.Aeson (decode, eitherDecode, encode)
import Data.Text (Text)
import qualified Money
import Test.Hspec
import Test.Tasty.Hspec
import Text.RawString.QQ
import Blockfrost.Types
spec_network... |
bb8a9cd2f66d13868f22fa3e051d762fd49aafdfd6d5d24fb80e92a87d5ac907 | mfelleisen/Fish | run-server-client.rkt | #lang racket
(provide
LOCALHOST
#; {Port# -> Void}
;; runs the server locally on port `p`
run-server
#; {Port# [Listof Player] -> Void}
run-clients
{ [ InputPort OutputPort - > Void ] - > ( values InputPort OutputPort [ - > Void ] ) }
local-setup
#; {N N -> Void}
#; (report-results passsed total-tes... | null | https://raw.githubusercontent.com/mfelleisen/Fish/a2b73f6d5312c42c4700c8ecd7a073fe18bd83e4/Scripts/Private/run-server-client.rkt | racket | {Port# -> Void}
runs the server locally on port `p`
{Port# [Listof Player] -> Void}
{N N -> Void}
(report-results passsed total-test-count)
{-> Port#}
{Port# -> Void}
---------------------------------------------------------------------------------------------------
--------------------------------------------... | #lang racket
(provide
LOCALHOST
run-server
run-clients
{ [ InputPort OutputPort - > Void ] - > ( values InputPort OutputPort [ - > Void ] ) }
local-setup
report-results
get-starter-port
set-starter-port)
(require Fish/Remote/server)
(require Fish/Remote/client)
(require SwDev/Testing/make-client)
(... |
badf5bc5aa3ff5ae76a05cb2d4f502957309782213babeaf11e89507ab1b4a73 | projectcs13/sensor-cloud | streamProcess.erl | @author
@author
%% [www.csproj13.student.it.uu.se]
%% @version 1.0
[ Copyright information ]
%%
%% @doc == streamProcess ==
%% This module represents a stream process which subscribes to data points from
%% the pub/sub system for a specified resource and publish it back into the
%% pub/sub system for the spe... | null | https://raw.githubusercontent.com/projectcs13/sensor-cloud/0302bd74b2e62fddbd832fb4c7a27b9c62852b90/src/pubsub/streamProcess.erl | erlang | [www.csproj13.student.it.uu.se]
@version 1.0
@doc == streamProcess ==
This module represents a stream process which subscribes to data points from
the pub/sub system for a specified resource and publish it back into the
pub/sub system for the specified stream
@end
============================================... | @author
@author
[ Copyright information ]
-module(streamProcess).
-include_lib("amqp_client.hrl").
-include_lib("pubsub.hrl").
-export([create/2]).
: StreamId - The i d of a stream .
-spec create(string(), string()) -> ok.
create(StreamId, ResourceId) ->
Exchange name binarys
ResourceExchange = l... |
5644f57905375cf455d9149b7df7d3dee254fbd267266a7371a37400f3db0dd0 | kupl/FixML | sub20.ml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec eval : formula -> bool = fun f -> match f with | True -> true | False... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub20.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec eval : formula -> bool = fun f -> match f with | True -> true | False... | |
eda6efc1126c06f4bc36a5d8f0f38b0316395b8148e0afefe5048d1d76777764 | hdbc/hdbc-sqlite3 | Testbasics.hs | module Testbasics(tests) where
import Test.HUnit
import Database.HDBC
import TestUtils
import System.IO
import Control.Exception hiding (catch)
openClosedb = sqlTestCase $
do dbh <- connectDB
disconnect dbh
multiFinish = dbTestCase (\dbh ->
do sth <- prepare dbh "SELECT 1 + 1"
r <- execute sth ... | null | https://raw.githubusercontent.com/hdbc/hdbc-sqlite3/6446abb80d4bbc182bb1ea289c821594ca21ed25/testsrc/Testbasics.hs | haskell | Now try a rollback
Now try another commit
Let's try a rollback.
And now a commit. | module Testbasics(tests) where
import Test.HUnit
import Database.HDBC
import TestUtils
import System.IO
import Control.Exception hiding (catch)
openClosedb = sqlTestCase $
do dbh <- connectDB
disconnect dbh
multiFinish = dbTestCase (\dbh ->
do sth <- prepare dbh "SELECT 1 + 1"
r <- execute sth ... |
1a5c04d704c1e56f17035d903312764a8efb30eba6f959751a4767ed649cfaea | kindista/kindista | unsubscribe.lisp | Copyright 2012 - 2016 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at you... | null | https://raw.githubusercontent.com/kindista/kindista/60da1325e628841721200aa00e4de5f9687c0adb/src/email/unsubscribe.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
| Copyright 2012 - 2016 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distr... |
b942c7f7aae9a9f8175cd35fc3694e8ffe987243fbe5a879564f2d1434f8dd04 | MyDataFlow/ttalk-server | cluster_commands_SUITE.erl | %%==============================================================================
Copyright 2014 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/test/ejabberd_tests/tests/cluster_commands_SUITE.erl | erlang | ==============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | Copyright 2014 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(cluster_commands_SUITE).
-compile(export_all).
-import(distributed_helper, [add_node_to_cluster/1,
... |
327306f2106fc0010e858c8aff5d59d9d01735ac30f48c62c6a98c70a1e12e79 | andy128k/cl-gobject-introspection | gui.lisp | (in-package :flood-game-example)
(defvar *glib* (gir:require-namespace "GLib"))
(defvar *gtk* (gir:require-namespace "Gtk" "3.0"))
(defmacro with-gtk-event-loop=window+drawing-area
((window-symbol drawing-area-symbol
&key
protected-final-code
(window-title "Untitled"))
&body code)
(le... | null | https://raw.githubusercontent.com/andy128k/cl-gobject-introspection/13f7ea0c4b33ec0f91eed5131d271dc74f6ea3d2/examples/flood-game/src/gui.lisp | lisp | (in-package :flood-game-example)
(defvar *glib* (gir:require-namespace "GLib"))
(defvar *gtk* (gir:require-namespace "Gtk" "3.0"))
(defmacro with-gtk-event-loop=window+drawing-area
((window-symbol drawing-area-symbol
&key
protected-final-code
(window-title "Untitled"))
&body code)
(le... | |
b479a199c5f8595ab076fc4845edff8386968e6de3dea287870f6b1e2a195654 | nmaehlmann/mallRL | TileImage.hs | module TileImage where
import Data.Array
import SDL.Vect
import Foreign.C.Types
import Data.Word
import Position
type Glyph = (V2 CInt)
type Color = V3 Word8
data Tile = Tile Glyph Color Color
deriving (Show, Eq)
data TileImage = TileImage (Array Position Tile)
deriving (Eq) | null | https://raw.githubusercontent.com/nmaehlmann/mallRL/1ae9add37ee390d645e380b77694d868a90fa70c/app/TileImage.hs | haskell | module TileImage where
import Data.Array
import SDL.Vect
import Foreign.C.Types
import Data.Word
import Position
type Glyph = (V2 CInt)
type Color = V3 Word8
data Tile = Tile Glyph Color Color
deriving (Show, Eq)
data TileImage = TileImage (Array Position Tile)
deriving (Eq) | |
197d78e47bf01dca49d12f9a52122586f84849d8e342a1c33c89da1bc73e49e7 | puppetlabs/puppetserver | puppet_server_config.clj | (ns puppetlabs.services.protocols.puppet-server-config)
(defprotocol PuppetServerConfigService
"The configuration service for puppetserver. This is built on top of
Trapperkeeper's normal configuration service. It adds a few features -
most importantly, it merges in settings from the Puppet's 'settings' in ruby... | null | https://raw.githubusercontent.com/puppetlabs/puppetserver/2d6ca01b4b72716ca543b606f752261b969e401b/src/clj/puppetlabs/services/protocols/puppet_server_config.clj | clojure | (ns puppetlabs.services.protocols.puppet-server-config)
(defprotocol PuppetServerConfigService
"The configuration service for puppetserver. This is built on top of
Trapperkeeper's normal configuration service. It adds a few features -
most importantly, it merges in settings from the Puppet's 'settings' in ruby... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.