_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 |
|---|---|---|---|---|---|---|---|---|
4f638556eab5f932fc1ce43cab3f7a75f9bfdcaf1bb2836fa2777edc1b4aee6a | NelosG/fp-tests | T9Spec.hs | # LANGUAGE CPP , QuasiQuotes #
module Hi.Test.T9Spec (spec) where
import Text.RawString.QQ
import HW3.Action
import Hi.Test.Common
import qualified Data.Set as Set
import Test.Hspec.Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
spec :: Spec
spec = do
#if HI_TEST_UPTO < 9
... | null | https://raw.githubusercontent.com/NelosG/fp-tests/c335ae1eafc8c58a9142eb9a35d7da6d941b4421/hw3/test/Hi/Test/T9Spec.hs | haskell | # LANGUAGE CPP , QuasiQuotes #
module Hi.Test.T9Spec (spec) where
import Text.RawString.QQ
import HW3.Action
import Hi.Test.Common
import qualified Data.Set as Set
import Test.Hspec.Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
spec :: Spec
spec = do
#if HI_TEST_UPTO < 9
... | |
8bcb090557bc870db306619fd20a83793b8cc70f4eb561798d0b3042d2fb6ebe | pgj/mirage-kfreebsd | arp.ml |
* Copyright ( c ) 2010 - 2011 Anil Madhavapeddy < >
*
* 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 PROVID... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/arp.ml | ocaml | Request
the requested address
Reply
If we have pending entry, notify the waiters that answer is ready
Obtain a buffer to write into
ethernet mac size
Resize buffer to sizeof arp packet
Send a gratuitous ARP for our IP addresses
Send a query for a particular IP
printf "ARP query: %s -> [incomplete]\n%... |
* Copyright ( c ) 2010 - 2011 Anil Madhavapeddy < >
*
* 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 PROVID... |
fbafd53050909f62730441ec44687ddf3614fc2066ee9d75942c8e23ad826ddf | vseloved/cl-agraph | test-sparql.lisp | CL - AGRAPH symbolic translator test
( c ) Vsevolod Dyomkin . see LICENSE file for permissions
(in-package :agraph)
(named-readtables:in-readtable rutils-readtable)
(defmethod should-check ((key (eql :match-except-ws)) expected fn &rest _)
(declare (ignore _))
(with ((raw (call fn))
(rez (re:regex-... | null | https://raw.githubusercontent.com/vseloved/cl-agraph/e605b34fa57a9ede6fb6cc13ef82fc3438898567/test/test-sparql.lisp | lisp | CL - AGRAPH symbolic translator test
( c ) Vsevolod Dyomkin . see LICENSE file for permissions
(in-package :agraph)
(named-readtables:in-readtable rutils-readtable)
(defmethod should-check ((key (eql :match-except-ws)) expected fn &rest _)
(declare (ignore _))
(with ((raw (call fn))
(rez (re:regex-... | |
618ad70ce0aca2c01b074470e45bf14b3e33975acc86bb15f28509f790ebb0ba | nikodemus/raylisp | flat.lisp | ;;; Provides only the ambient component.
(in-package :raylisp)
(defclass flat-shader (shader color-mixin ambient-shader-mixin)
())
(defmethod compute-shader-function ((shader flat-shader) object scene transform)
(let ((ambient-color (hadamard-product
(vec* (scene-ambient-light scene)
... | null | https://raw.githubusercontent.com/nikodemus/raylisp/f79f61c6df283baad265dfdc207d798b63ca19a9/shaders/flat.lisp | lisp | Provides only the ambient component. |
(in-package :raylisp)
(defclass flat-shader (shader color-mixin ambient-shader-mixin)
())
(defmethod compute-shader-function ((shader flat-shader) object scene transform)
(let ((ambient-color (hadamard-product
(vec* (scene-ambient-light scene)
(coefficient (a... |
739b15cc195f69bd6a67ce9b898ee4faebdd580257bd07f4e15fb76ffabb6c88 | input-output-hk/plutus | Value.hs | -- editorconfig-checker-disable-file
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DerivingVia #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
-- Preve... | null | https://raw.githubusercontent.com/input-output-hk/plutus/c3918d6027a9a34b6f72a6e4c7bf2e5350e6467e/plutus-ledger-api/src/PlutusLedgerApi/V1/Value.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
Prevent unboxing, which the plugin can't deal with
| Functions for working with 'Value'.
** Currency symbols
** Token names
* Asset classes
** Value
*... | # LANGUAGE DerivingVia #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -fno - omit - interface - pragmas #
# OPTIONS_GHC -fno - spec - constr #
# OPTIONS_GHC -fno - specialise #
module PlutusLedgerApi.V1.Value(
CurrencySymbol(..)
, cur... |
38384eba596158513cb3e3276bf5534ec8b5dc82d898fa5039480a30755842bd | fukamachi/cl-dbi | error.lisp | (defpackage #:dbd.mysql.error
(:use #:cl)
(:import-from #:dbi.error
#:dbi-programming-error
#:dbi-database-error)
(:import-from #:dbi.driver
#:connection-handle)
(:import-from #:cl-mysql-system
#:mysql-error
#:mysql-error-errno
... | null | https://raw.githubusercontent.com/fukamachi/cl-dbi/7ba050dea8d137c1f85b7e704d4fc945104bf283/src/dbd/mysql/error.lisp | lisp | ER_DBACCESS_DENIED_ERROR
ER_BAD_DB_ERROR
ER_TABLE_EXISTS_ERROR
ER_BAD_TABLE_ERROR
ER_BAD_FIELD_ERROR
ER_WRONG_FIELD_WITH_GROUP
ER_WRONG_GROUP_FIELD
ER_WRONG_SUM_SELECT
ER_DUP_FIELDNAME
ER_DUP_KEYNAME
ER_WRONG_FIELD_SPEC
ER_PARSE_ERROR
ER_NONUNIQ_TABLE
ER_INVALID_DEFAULT
ER_TOO_MANY_KEYS
ER_TOO_MANY_KEY_... | (defpackage #:dbd.mysql.error
(:use #:cl)
(:import-from #:dbi.error
#:dbi-programming-error
#:dbi-database-error)
(:import-from #:dbi.driver
#:connection-handle)
(:import-from #:cl-mysql-system
#:mysql-error
#:mysql-error-errno
... |
ba37e5ca1364079567fdc31b1dce4167cc3328975631eedc9137e7f293370a45 | BoeingX/haskell-programming-from-first-principles | IntermissionExercise.hs | module ParserCombinators.ParsingFractions.IntermissionExercise where
import Text.Trifecta
instance (Eq a) => Eq (Result a) where
Success a == Success b = a == b
Failure a == Failure b = True
_ == _ = False
parseInteger :: Parser Integer
parseInteger = do
a <- integer
b <- eof
return a
| null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/ParserCombinators/ParsingFractions/IntermissionExercise.hs | haskell | module ParserCombinators.ParsingFractions.IntermissionExercise where
import Text.Trifecta
instance (Eq a) => Eq (Result a) where
Success a == Success b = a == b
Failure a == Failure b = True
_ == _ = False
parseInteger :: Parser Integer
parseInteger = do
a <- integer
b <- eof
return a
| |
16d4a1f8471493b6d0e79b45a8c8b5e442378a371cc465708153b4bc527159fc | cyverse-archive/DiscoveryEnvironmentBackend | user.clj | (ns metadactyl.routes.domain.user
(:use [common-swagger-api.schema :only [describe]]
[metadactyl.routes.params :only [SecuredQueryParams]]
[schema.core :only [defschema]])
(:import [java.util UUID]))
(defschema User
{:id (describe UUID "The DE's internal user identifier")
:username (desc... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/routes/domain/user.clj | clojure | (ns metadactyl.routes.domain.user
(:use [common-swagger-api.schema :only [describe]]
[metadactyl.routes.params :only [SecuredQueryParams]]
[schema.core :only [defschema]])
(:import [java.util UUID]))
(defschema User
{:id (describe UUID "The DE's internal user identifier")
:username (desc... | |
4f4a8977b1ad3150348fbcee323d8c9a0148f4e6a38794e1b6123462cc7368b6 | yrashk/erlang | sudoku_board.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/wx/examples/sudoku/sudoku_board.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
File : sud_board.erl
Created : 9 Jan 200... |
b71a25dc62bb9da9b43cc1863d40db8a97ccbd7e5d2e89e669642e2b722a8296 | gonzojive/sbcl | signals.impure.lisp | ;;;; Tests for async signal safety.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;
;;;; This software is in the pub... | null | https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/tests/signals.impure.lisp | lisp | Tests for async signal safety.
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absoluely no warranty. See the COPYING and CREDITS files for
more information.
Fail and set errno.
Wait, but not with sleep because that wi... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(use-package :test-util)
(with-test (:name (:async-unwind :specials))
(let ((*x0* nil) (*x1* nil) (*x2* nil) (*x3* nil) (*x4* nil))
(declare (special *x0* *x1* ... |
28fdf5dc0b73e0f9b0a0a3ea423655cf9d8f55a76884fc9fa77be8dc2ac57385 | danilkolikov/dfl | Base.hs | |
Module : Frontend . Inference . Class . Base
Description : Base definitions for class processing .
Copyright : ( c ) , 2019
License : MIT
Base definitions for class processing .
Module : Frontend.Inference.Class.Base
Description : Base definitions for class processing.
Co... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Inference/Class/Base.hs | haskell | | A type of the class processor
| Errors which can be encountered during processing of type classes
^ Class extends itself
^ Classes mutually extend themselves
^ Dependency resolution error
^ Unknown class
^ Unknown generated data type
| A type of debug output of class processing
^ Dependency graph
^ Dependen... | |
Module : Frontend . Inference . Class . Base
Description : Base definitions for class processing .
Copyright : ( c ) , 2019
License : MIT
Base definitions for class processing .
Module : Frontend.Inference.Class.Base
Description : Base definitions for class processing.
Co... |
fc8fa3c4e1a98fc5de142e132102d5970b8c44a7fc9c83a1df62024570090017 | Enecuum/Node | RLens.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE UndecidableInstances #
-- | Lenses for Framework Runtime types.
module Enecuum.Framework.RLens where
import Control.Lens ( makeFieldsNoPrefix )
import Enecuum... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Framework/RLens.hs | haskell | # LANGUAGE TemplateHaskell #
| Lenses for Framework Runtime types. | # LANGUAGE DuplicateRecordFields #
# LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
module Enecuum.Framework.RLens where
import Control.Lens ( makeFieldsNoPrefix )
import Enecuum.Framework.Runtime
makeFieldsNoPrefix ''DBHandle
makeFieldsNoPrefix ''NodeRuntim... |
9b13326f4d82d335118bb5070dd907ae698ed32e083d8ad601cef563960badad | realworldocaml/book | dep.ml | open Import
open Memo.O
CR - someday amokhov : We probably want to add a new variant [ Dir ] to provide
first - class support for depending on directory targets .
first-class support for depending on directory targets. *)
module T = struct
type t =
| Env of Env.Var.t
| File of Path.t
| Alias of... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/dep.ml | ocaml | CR-someday amokhov: Find a better name, perhaps, [Files_and_dirs]?
Only for file selectors for now
Sort and de-dup so that the result is resilient to code changes
This is to force the rules to be loaded for directories without files when
depending on [(source_tree x)]. Otherwise, we wouldn't clean up stale
... | open Import
open Memo.O
CR - someday amokhov : We probably want to add a new variant [ Dir ] to provide
first - class support for depending on directory targets .
first-class support for depending on directory targets. *)
module T = struct
type t =
| Env of Env.Var.t
| File of Path.t
| Alias of... |
6ac3554d0b7b708f1c7d8bdceb065c58271c0a8575a8afbf2d3caaf45e2457a2 | tweag/asterius | T246.hs | # LANGUAGE ScopedTypeVariables #
Test # 246
module Main where
import Control.Exception
data T = T { x :: Bool, y :: Bool }
f (T { y=True, x=True }) = "Odd"
f _ = "OK"
g (T { x=True, y=True }) = "Odd2"
g _ = "Odd3"
funny = T { x = undefined, y = False }
main = do { prin... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/deSugar/T246.hs | haskell | Should work, because we test
through to "OK"
Should fail, because we test | # LANGUAGE ScopedTypeVariables #
Test # 246
module Main where
import Control.Exception
data T = T { x :: Bool, y :: Bool }
f (T { y=True, x=True }) = "Odd"
f _ = "OK"
g (T { x=True, y=True }) = "Odd2"
g _ = "Odd3"
funny = T { x = undefined, y = False }
y first , whic... |
6fba7407398465c4158ab8ddd752cd6004fef39887b9798e2bf614f4e957a72f | lasp-lang/lasp | lasp_partisan_peer_service.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 . 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/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/src/lasp_partisan_peer_service.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(lasp_partisan_peer_se... |
d551913bd5c90a695d365e129c436287f624bee34e7dd544ec377ede106cc722 | JoeKennedy/fantasy | NoFoundation.hs | module Import.NoFoundation
( module Import
) where
import ClassyPrelude.Yesod as Import
import Model as Import
import Model.Action as Import
import Model.Bootstrap as Import
import Model.Groupings as Import
import Model.LeagueSettings as Import
import Model.Numeric ... | null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/Import/NoFoundation.hs | haskell | module Import.NoFoundation
( module Import
) where
import ClassyPrelude.Yesod as Import
import Model as Import
import Model.Action as Import
import Model.Bootstrap as Import
import Model.Groupings as Import
import Model.LeagueSettings as Import
import Model.Numeric ... | |
8e186ea8b511dc6254b6e33228a1d6ba1057e7c093c6a5de117aefb86ff588b5 | TrustInSoft/tis-kernel | cabshelper.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/parsetree/cabshelper.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
Copyright ( C ) 2001 - 2003
< > ... |
1ad9cfcce4aaf75d6f1375b0093519f76851717dddcf173819fdaadd50086a85 | awakesecurity/grpc-mqtt | Stream.hs |
module Test.Network.GRPC.MQTT.Message.Stream
( -- * Test Tree
tests,
)
where
--------------------------------------------------------------------------------
import Hedgehog (Property, PropertyT, forAll, property, (===))
import Hedgehog qualified
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Hed... | null | https://raw.githubusercontent.com/awakesecurity/grpc-mqtt/fbde6f3fe90e82260469bab922c5ebb9f0b40e95/test/Test/Network/GRPC/MQTT/Message/Stream.hs | haskell | * Test Tree
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------------------------... |
module Test.Network.GRPC.MQTT.Message.Stream
tests,
)
where
import Hedgehog (Property, PropertyT, forAll, property, (===))
import Hedgehog qualified
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.Hedgehog (testProperty)
import Test.Network.GRPC.MQTT.Message.Gen qualified as Message.Gen
import qua... |
609e00b967e601d35ce5ab57ea964b8e65f0849426e3de78a719c380e756d625 | haskell-opengl/OpenGLRaw | FourTwoTwoPixels.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.FourTwoTwoPixels
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
---------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/FourTwoTwoPixels.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.EXT.FourTwoTwoPixels
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.FourTwoTwoPixels (
glGetEXTFourTwoTwoPixels,
gl_EXT_422_pixels,
pattern GL_422_AVERAGE_EXT,
pattern GL_422_EXT,
pattern GL_422_REV_AVERAGE_EXT,
pattern GL_422_REV_EXT
) where
import Graphics.GL.Ex... |
1ed252ae4208fb9c1e28a39f18c0e33f07f951f0fb3a3e6488ce8ef48c3eb27c | nobutaka/nanopass | fib.scm | (letrec ((fib (lambda (n)
(if (= n 0)
n
(if (= n 1)
n
(+ (fib (- n 1)) (fib (- n 2))))))))
(fib 35))
| null | https://raw.githubusercontent.com/nobutaka/nanopass/80e0344a1f143832a75d798be903e05b5dbdd079/samples/fib.scm | scheme | (letrec ((fib (lambda (n)
(if (= n 0)
n
(if (= n 1)
n
(+ (fib (- n 1)) (fib (- n 2))))))))
(fib 35))
| |
d1e60277110ab79d0e8f6b943fba697004c8195ae89963a354e91cfc3bc0f73e | konn/dl-first-principle-tutorial | Optimisation.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
module Numeric.Optimisation (gradDescent) where
import Data.List (iterate')
import Data.Reflection (Reifies)
import Linear (Additive ((^-^)), (*^))
import Numeric.AD (grad)
import Numeric.AD.Internal.Reverse (Reverse, Tape)
import Type.Reflection (Typeable)
-... | null | https://raw.githubusercontent.com/konn/dl-first-principle-tutorial/da1557d57f68e2d739b9bbccc50197df86e56320/src/Numeric/Optimisation.hs | haskell | # LANGUAGE RankNTypes #
| A simple gradient desecent with a static learning rate
| Learning rate | # LANGUAGE FlexibleContexts #
module Numeric.Optimisation (gradDescent) where
import Data.List (iterate')
import Data.Reflection (Reifies)
import Linear (Additive ((^-^)), (*^))
import Numeric.AD (grad)
import Numeric.AD.Internal.Reverse (Reverse, Tape)
import Type.Reflection (Typeable)
gradDescent ::
(Additive f,... |
63e47c9a8b85622f603e2664c6debf693e904206d53aa96ccb032f40f5a1fc87 | YoEight/lambda-database-experiment | Duration.hs | --------------------------------------------------------------------------------
-- |
-- Module : Lambda.Prelude.Duration
Copyright : ( C ) 2017
-- License : (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability: non-portable
--
-----------------------------------------... | null | https://raw.githubusercontent.com/YoEight/lambda-database-experiment/da4fab8bd358fb8fb78412c805d6f5bc05854432/lambda-prelude/library/Lambda/Prelude/Duration.hs | haskell | ------------------------------------------------------------------------------
|
Module : Lambda.Prelude.Duration
License : (see the file LICENSE)
Stability : experimental
Portability: non-portable
------------------------------------------------------------------------------
-----------------------------... | Copyright : ( C ) 2017
Maintainer : < >
module Lambda.Prelude.Duration where
import Lambda.Prelude
newtype Duration = Duration Int64 deriving Show
msDuration :: Int64 -> Duration
msDuration = Duration . (1000 *)
secsDuration :: Int64 -> Duration
secsDuration = msDuration . (1000 *)
|
678bf8f60a1493cda30ed867d7649667ce1c7bec52c8bd917d418bb9811e576f | intermine/bluegenes-old | handlers.cljs | (ns bluegenes.components.queryoperations.handlers
(:require-macros [reagent.ratom :refer [reaction]]
[cljs.core.async.macros :refer [go go-loop]])
(:require [re-frame.core :as re-frame :refer [debug trim-v enrich register-handler]]
[bluegenes.db :as db]
[secretary.core :as... | null | https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/cljs/bluegenes/components/queryoperations/handlers.cljs | clojure | (loop [[current-query & remaining-queries] queries
alphabet alphabet
(let [[allocated-letters remaining-letters] (split-at (count (:where current-query)) alphabet)
adjusted-query (-> (update current-query :where #(mapv assoc-letter % alphabet))
; Rebuild the cons... | (ns bluegenes.components.queryoperations.handlers
(:require-macros [reagent.ratom :refer [reaction]]
[cljs.core.async.macros :refer [go go-loop]])
(:require [re-frame.core :as re-frame :refer [debug trim-v enrich register-handler]]
[bluegenes.db :as db]
[secretary.core :as... |
66396f419a523e66d24e802e8efe34aaea2adf7398def8287dbf0df7fdb773e8 | CodyReichert/qi | library.lisp | (in-package :cl-user)
(defpackage libyaml.lib
(:use :cl :cffi)
(:documentation "Load the libyaml library."))
(in-package :libyaml.lib)
(define-foreign-library libyaml
(:darwin (:or "libyaml.dylib" "libyaml-0.2.dylib"))
(:unix (:or "libyaml.so" "libyaml-0.so.2" "libyaml-0.so.2.0.4"))
(:win32 "libyaml.dll")
... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-libyaml-latest/src/library.lisp | lisp | (in-package :cl-user)
(defpackage libyaml.lib
(:use :cl :cffi)
(:documentation "Load the libyaml library."))
(in-package :libyaml.lib)
(define-foreign-library libyaml
(:darwin (:or "libyaml.dylib" "libyaml-0.2.dylib"))
(:unix (:or "libyaml.so" "libyaml-0.so.2" "libyaml-0.so.2.0.4"))
(:win32 "libyaml.dll")
... | |
33507381527466110e0502bb63757b6ed37092cff2f18baeb09905cf0ba31976 | yellowtides/owenbot-hs | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (forkIO, killThread)
import Control.Exception (SomeException)
import Control.Monad
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import System.Directory (createDirectoryIfMissing)
import Discord
import Discord.Reque... | null | https://raw.githubusercontent.com/yellowtides/owenbot-hs/5e707a4460f717be88813dc055e34636e23b8e9f/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
| UWU
launch a thread to schedule and send quizzes |
module Main where
import Control.Concurrent (forkIO, killThread)
import Control.Exception (SomeException)
import Control.Monad
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import System.Directory (createDirectoryIfMissing)
import Discord
import Discord.Requests
import Discord.Types
import Ad... |
b3d8d4d2d227ec51a78914c96068ab785a2b1b061519b4c49b895c60fbf2fa1e | databrary/databrary | SQL.hs | # LANGUAGE TemplateHaskell #
module Model.Slot.SQL
( selectSlotId
, slotKeys
) where
import Model.SQL.Select
import Model.Slot.Types
selectSlotId :: String -> Selector
selectSlotId table = selectColumns 'SlotId table ["container", "segment"]
slotKeys :: String -- ^ @'Slot'@
-> [(String, String)]
slotKeys o =... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Slot/SQL.hs | haskell | ^ @'Slot'@ | # LANGUAGE TemplateHaskell #
module Model.Slot.SQL
( selectSlotId
, slotKeys
) where
import Model.SQL.Select
import Model.Slot.Types
selectSlotId :: String -> Selector
selectSlotId table = selectColumns 'SlotId table ["container", "segment"]
-> [(String, String)]
slotKeys o =
[ ("container", "${containerId... |
b8cf08b60520bd9ee6d9e6f08cb9d62f2825471888b5d3bcd897d4c8b0106393 | RolfRolles/PandemicML | X86LocalConstant.ml | let local_constant_fold_x86 varmap x86list =
let open X86 in
let subregisters_with_immediate reg imm =
let i16 = Int32.logand imm 0xffffl in
let i8h = Int32.logand (Int32.shift_right_logical imm 8) 0xffl in
let i8l = Int32.logand imm 0xffl in
match reg with
| GeneralReg(Gd(r32)) ->
(match... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/X86Analyze/X86LocalConstant.ml | ocaml | let local_constant_fold_x86 varmap x86list =
let open X86 in
let subregisters_with_immediate reg imm =
let i16 = Int32.logand imm 0xffffl in
let i8h = Int32.logand (Int32.shift_right_logical imm 8) 0xffl in
let i8l = Int32.logand imm 0xffl in
match reg with
| GeneralReg(Gd(r32)) ->
(match... | |
0297f8ada3ef585db368d9b23aff77c54393a65022d0bbab858935f7efcdf405 | ypyf/fscm | mls.scm | (define (how-many-digits n)
(if (< n 10) 1 (+ 1 (how-many-digits (quotient n 10)))))
(define (first-digit n)
(quotient n (expt 10 (- (how-many-digits n) 1))))
(define (del-first-digit n)
(modulo n (expt 10 (- (how-many-digits n) 1))))
n > 9
(- (- n (del-first-digit n)) 1))
(define ... | null | https://raw.githubusercontent.com/ypyf/fscm/4e6a31665051d51bbcfc823ac8d85dcc3491a6ef/test/mls.scm | scheme | (define (how-many-digits n)
(if (< n 10) 1 (+ 1 (how-many-digits (quotient n 10)))))
(define (first-digit n)
(quotient n (expt 10 (- (how-many-digits n) 1))))
(define (del-first-digit n)
(modulo n (expt 10 (- (how-many-digits n) 1))))
n > 9
(- (- n (del-first-digit n)) 1))
(define ... | |
0bf2b696f186aa7fe6859d9588ace113177bdd5699485bfb013499d3500f5375 | tfausak/argo | Decode.hs | module Argo.Internal.Decode where
import qualified Argo.Internal.Class.HasCodec as HasCodec
import qualified Argo.Internal.Codec.Value as Codec
import qualified Argo.Internal.Json.Value as Value
import qualified Argo.Internal.Pointer.Pointer as Pointer
import qualified Argo.Internal.Type.Decoder as Decoder
import qual... | null | https://raw.githubusercontent.com/tfausak/argo/2e225c671dec9d4991864de8faed48acf4789192/source/library/Argo/Internal/Decode.hs | haskell | module Argo.Internal.Decode where
import qualified Argo.Internal.Class.HasCodec as HasCodec
import qualified Argo.Internal.Codec.Value as Codec
import qualified Argo.Internal.Json.Value as Value
import qualified Argo.Internal.Pointer.Pointer as Pointer
import qualified Argo.Internal.Type.Decoder as Decoder
import qual... | |
cf2aa1a4f07ef3490a83106a28e897ca24c07f0b76c2a9c427390d2122fffd9c | Jovvik/hi | Infix.hs | module Infix
( infx
) where
import Generators ()
import Runner (evalSame, makeOp, showExpr, (@!))
import Test.Tasty (TestName, TestTree, testGroup)
import Test.Tasty.HUnit (Assertion, testCase)
import Test.Tasty.QuickCheck (testProperty)
infx :: TestTree
infx = testGroup "Infix"
[ testCase "Session" session
,... | null | https://raw.githubusercontent.com/Jovvik/hi/6e56aabf04578ddf64b798dfa30296794c513e1c/hw3/test/Infix.hs | haskell | module Infix
( infx
) where
import Generators ()
import Runner (evalSame, makeOp, showExpr, (@!))
import Test.Tasty (TestName, TestTree, testGroup)
import Test.Tasty.HUnit (Assertion, testCase)
import Test.Tasty.QuickCheck (testProperty)
infx :: TestTree
infx = testGroup "Infix"
[ testCase "Session" session
,... | |
0ff864aa5c6508d8b1a0afd3905240c7cfe4e971b2356c3be6becbf3692bf62d | seancorfield/next-jdbc | run-tests.clj | #!/usr/bin/env bb
(require '[babashka.process :as p])
(let [maria? (= "maria" (first *command-line-args*))
env
(cond-> {"NEXT_JDBC_TEST_MSSQL" "yes"
"NEXT_JDBC_TEST_MYSQL" "yes"
"MSSQL_SA_PASSWORD" "Str0ngP4ssw0rd"}
maria?
(assoc "NEXT_JDBC_TEST_MARIA" "yes... | null | https://raw.githubusercontent.com/seancorfield/next-jdbc/d1f3306e63e5d4578e437d893f63326fbe226c37/run-tests.clj | clojure | #!/usr/bin/env bb
(require '[babashka.process :as p])
(let [maria? (= "maria" (first *command-line-args*))
env
(cond-> {"NEXT_JDBC_TEST_MSSQL" "yes"
"NEXT_JDBC_TEST_MYSQL" "yes"
"MSSQL_SA_PASSWORD" "Str0ngP4ssw0rd"}
maria?
(assoc "NEXT_JDBC_TEST_MARIA" "yes... | |
a0d9769d60bcefe581ef21c0c734561fd847ad248e75730c3fd3de9a556fe34c | jlouis/combinatorrent | AdaptGhcVersion.hs | # LANGUAGE CPP #
module AdaptGhcVersion
(
Monoid (..), (<$>), (<*>), pure
) where
import Control.Applicative ((<$>), (<*>), pure)
import Data.Monoid (Monoid (..))
| null | https://raw.githubusercontent.com/jlouis/combinatorrent/a8660bc29507f3774d79bd364b8b509cf5146282/src/AdaptGhcVersion.hs | haskell | # LANGUAGE CPP #
module AdaptGhcVersion
(
Monoid (..), (<$>), (<*>), pure
) where
import Control.Applicative ((<$>), (<*>), pure)
import Data.Monoid (Monoid (..))
| |
af30aae5df8282198775de94ac641d0e5e55891484247a354e4fbc4c774df53b | Ptival/chick | LocalContext.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
module Typing.LocalContext
( LocalContext (..),
TypeCheckedLocalContext,
addHyp,
addLocalAssum,
boundNames,
lookupType,
)
where
import Control.Monad (msum)
import Control.Monad.Except (MonadError, throwError)
import Data.Ma... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Typing/LocalContext.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
module Typing.LocalContext
( LocalContext (..),
TypeCheckedLocalContext,
addHyp,
addLocalAssum,
boundNames,
lookupType,
)
where
import Control.Monad (msum)
import Control.Monad.Except (MonadError, throwError)
import Data.Ma... | |
c27b7b5025c2eb81921e698e07e2a5ae521fda1f340332ea24c6d3c62c4c7f70 | duckyuck/flare | report.cljc | (ns flare.report
(:require [flare.atom :as atom]
[flare.string :as string]
[flare.indexed :as indexed]
[flare.map :as map]
[flare.sequential :as sequential]
[flare.set :as set]))
(def reporters
{:sequential-size sequential/report-size-diff
:keys ... | null | https://raw.githubusercontent.com/duckyuck/flare/4d983fda75fab718b5ec0bf4e3f8ab4bfa1a2080/src/flare/report.cljc | clojure | (println "report threw exception" e) | (ns flare.report
(:require [flare.atom :as atom]
[flare.string :as string]
[flare.indexed :as indexed]
[flare.map :as map]
[flare.sequential :as sequential]
[flare.set :as set]))
(def reporters
{:sequential-size sequential/report-size-diff
:keys ... |
a96e366661408d03d710b4a66c8c8fe891a8e19c77b5a154752549819725b005 | jeromesimeon/Galax | factorize_tpnf_util.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/factorization/factorize_tpnf_util.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : factorize_tpnf_util.mli , v 1.6 2007/02/01 22:08:46 simeon Exp $
open Error
open Namespace_names
open Namespace_builtin
open Norm_util
open Xquery_common_ast
open Xquery_common_ast_util
open Xquery_core_ast
open Xquery_type_core_... |
0ec40a1de22118b5c0375e25825784e01c4df7b73a2a1c3f3d5e5f130e002810 | fugue/fregot | SafeVar.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Prototype for ordering statements in faster way ( rather than the insertion sort
we have now ) .
Copyright : (c) 2020 Fugue, Inc.
License : Apache L... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Data/SafeVar.hs | haskell | | Consumes a graph and orders the statements in a way that all variables are
assigned before they are used. If there are no assignments for a given
^ Statement accumulator.
^ Assigned variables.
^ Free variables.
^ Graph to consume.
matches what the user wrote.
Follow pointers to the root of a node. | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Prototype for ordering statements in faster way ( rather than the insertion sort
we have now ) .
Copyright : (c) 2020 Fugue, Inc.
License : Apache L... |
6a850ff1492bce7c330adf1c4cb3618d68623280b32282efc13f3b1c474ff423 | ondrap/json-stream | Conduit.hs | -- |
-- Module : Data.JsonStream.Conduit
-- License : BSD-style
--
-- Stability : experimental
-- Portability : portable
--
Use " Data . JsonStream . " parsers in " Data . Conduit " .
module Data.JsonStream.Conduit (
parserConduit
) where
import Data.ByteString (ByteString)
import qualified Data.... | null | https://raw.githubusercontent.com/ondrap/json-stream/306899ad8e9e75aa3158e683168e0fc2c307a3dd/Data/JsonStream/Conduit.hs | haskell | |
Module : Data.JsonStream.Conduit
License : BSD-style
Stability : experimental
Portability : portable
| Use " Data . JsonStream . " parsers in " Data . Conduit " .
module Data.JsonStream.Conduit (
parserConduit
) where
import Data.ByteString (ByteString)
import qualified Data.Conduit.Internal as C
import Data.JsonStream.Parser
|Use a ' Parser ' as a conduit from ' ByteString ' input chunks ... |
67d961d1c0eee685efca8561cf1ff76740feef0d44907a78a03e687ec4195fff | marijnh/Postmodern | tests.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : SIMPLE - DATE - TESTS ; -*-
(in-package :simple-date-tests)
;; After loading the file, run the tests with (fiveam:run! :simple-date)
(def-suite :simple-date)
(in-suite :simple-date)
(test days-in-month
Note : internal date numbers , so 0 is ... | null | https://raw.githubusercontent.com/marijnh/Postmodern/45fa35ddad0f0aff6218f2708f7652a3deb83c06/simple-date/tests.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : SIMPLE - DATE - TESTS ; -*-
After loading the file, run the tests with (fiveam:run! :simple-date) | (in-package :simple-date-tests)
(def-suite :simple-date)
(in-suite :simple-date)
(test days-in-month
Note : internal date numbers , so 0 is March
(is (= 31 (simple-date::days-in-month 0 2000)))
(is (= 30 (simple-date::days-in-month 1 2000)))
(is (= 31 (simple-date::days-in-month 2 2000)))
(is (= 30 (simple... |
0df86a34582aa1728313d83cde373aee9c1b424bc7883e21dc0cd34e2c5a28e4 | coq/coq | tac2extffi.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/4b812ba203b09e30f88e0174cc72abdf5da22e26/plugins/ltac2/tac2extffi.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
82052593ee2d1b20d7971eaf6d62c8b1a64d807a76b0a441ed65f4e42f45b15a | cmoid/erlbutt | importer.erl | SPDX - License - Identifier : GPL-2.0 - only
%%
Copyright ( C ) 2018 Dionne Associates , LLC .
-module(importer).
-include("ssb.hrl").
-export([import/3]).
import(Id, OffsetLog, PrintNth)->
{ok, [[Home]]} = init:get_argument(home),
File = Home ++ "/ssb-backup/" ++ OffsetLog,
case file:open(File, [rea... | null | https://raw.githubusercontent.com/cmoid/erlbutt/014d332c15853d8c04ff6d814a3ec2c6534b83d1/apps/ssb/src/importer.erl | erlang |
up in the next iteration
the length of the term is also stored at the end of the term
and can be used to check | SPDX - License - Identifier : GPL-2.0 - only
Copyright ( C ) 2018 Dionne Associates , LLC .
-module(importer).
-include("ssb.hrl").
-export([import/3]).
import(Id, OffsetLog, PrintNth)->
{ok, [[Home]]} = init:get_argument(home),
File = Home ++ "/ssb-backup/" ++ OffsetLog,
case file:open(File, [read, ... |
5d0a611cab26f5fdfe2b898f857b0d45be7312920b27888b0f2656dd6fcb93a5 | ygrek/mldonkey | gui_graph.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk/newgui/gui_graph.ml | ocaml | * GUI for graph.
the functions draw_downloads & draw uploads are called to generate the
arrays that will be used to get the pixmaps with pixmap_from_xpm_d
not to mess the drawing areas when the main window is resized
we fix the width & height of each area once for all. The size will
be the size when the... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
603774e61482e36e81a342beb9d4d2921a517c2bbb85da8aee1a57ce7e448beb | lixiangqi/medic | debug.rkt | #lang racket
(require medic/core)
(medic "doubly-linked-list-medic.rkt")
(debug "doubly-linked-list.rkt")
| null | https://raw.githubusercontent.com/lixiangqi/medic/0920090d3c77d6873b8481841622a5f2d13a732c/demos/doubly-linked-list/debug.rkt | racket | #lang racket
(require medic/core)
(medic "doubly-linked-list-medic.rkt")
(debug "doubly-linked-list.rkt")
| |
656a0ef67b97e5594c2ebbd2e7f878683acdb7cd3aa97a51d29caec358e32811 | lispbuilder/lispbuilder | active.lisp |
(in-package #:sdl-examples)
(defun display-test (text pos &key (font sdl:*default-font*) (surface sdl:*default-display*) (color sdl:*default-color*))
(let ((text (if (listp text) text (list text)))
(between 2))
(loop for line in text
for i = 0 then (incf i)
do (sdl:draw-string-solid ... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/examples/active.lisp | lisp |
(in-package #:sdl-examples)
(defun display-test (text pos &key (font sdl:*default-font*) (surface sdl:*default-display*) (color sdl:*default-color*))
(let ((text (if (listp text) text (list text)))
(between 2))
(loop for line in text
for i = 0 then (incf i)
do (sdl:draw-string-solid ... | |
e8f4b10629bb5235993dd465cdecf50f3e9f76b5c01fe17ef9e7d060b90ce6c4 | patricoferris/ocaml-multicore-monorepo | formats.mli | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
(* Note: this is not a stable API! *)
val html_escape : string -> string
val to_base64url : string -> string
val from_b... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/pure/formats.mli | ocaml | Note: this is not a stable API! | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
val html_escape : string -> string
val to_base64url : string -> string
val from_base64url : string -> string option
val... |
f633d4aa0fd2d6d9473cfa96fee17e543293238ca5b12caed78e0eec829b1eaf | gergoerdi/clash-shake | SymbiFlow.hs | module Clash.Shake.SymbiFlow {-# DEPRECATED "Use module `Clash.Shake.F4PGA' instead" #-}
( module Clash.Shake.F4PGA
) where
import Clash.Shake.F4PGA
| null | https://raw.githubusercontent.com/gergoerdi/clash-shake/ea7cd199547ea279cb592d7401d6f2794a30f66d/src/Clash/Shake/SymbiFlow.hs | haskell | # DEPRECATED "Use module `Clash.Shake.F4PGA' instead" # | ( module Clash.Shake.F4PGA
) where
import Clash.Shake.F4PGA
|
1fd4d4201309e26eed20f74a494bf5ea7c329f5c8405afea814ae3282ec244a8 | ninenines/ranch | batch_echo_protocol.erl | -module(batch_echo_protocol).
-behaviour(ranch_protocol).
-export([start_link/3]).
-export([init/3]).
start_link(Ref, Transport, [{batch_size, N}]) ->
Pid = spawn_link(?MODULE, init, [Ref, Transport, N]),
{ok, Pid}.
init(Ref, Transport, N) ->
{ok, Socket} = ranch:handshake(Ref),
Transport:setopts(Socket, [{activ... | null | https://raw.githubusercontent.com/ninenines/ranch/4a1d16242c6fa9865fd7499d301d90b9ca65d6b1/test/batch_echo_protocol.erl | erlang | -module(batch_echo_protocol).
-behaviour(ranch_protocol).
-export([start_link/3]).
-export([init/3]).
start_link(Ref, Transport, [{batch_size, N}]) ->
Pid = spawn_link(?MODULE, init, [Ref, Transport, N]),
{ok, Pid}.
init(Ref, Transport, N) ->
{ok, Socket} = ranch:handshake(Ref),
Transport:setopts(Socket, [{activ... | |
47b3102da0763fdeb43947634a1eba5ebb99a5abd006086c4b1e3f9640eb4a79 | quil-lang/qvm | basic-noise-qvm.lisp | ;;;; basic-noise-qvm.lisp
;;;;
Author :
(in-package #:qvm)
Implements a QVM that simulates T1 , T2 , T - PHI , READOUT , and/or DEPOLARIZATION noise
;;; after every instruction in a program.
(deftype probability () `(double-float 0.0d0 1.0d0))
(deftype valid-noise-value () `(real (0.0d0) *))
The BASIC - NO... | null | https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/src/basic-noise-qvm.lisp | lisp | basic-noise-qvm.lisp
after every instruction in a program.
to approximate the qubit noise on a QPU. The BASIC-NOISE-QVM
allows the specification of amplitude damping, dephasing,
depolarization, and readout noise for each qubit. During the
state.
superoperators before they are applied to the density matrix.
Exa... | Author :
(in-package #:qvm)
Implements a QVM that simulates T1 , T2 , T - PHI , READOUT , and/or DEPOLARIZATION noise
(deftype probability () `(double-float 0.0d0 1.0d0))
(deftype valid-noise-value () `(real (0.0d0) *))
The BASIC - NOISE - QVM supports a qubit - level noise model , intended
BASIC - NOISE... |
661478b6acc057683c1a515aaefa241a985cdbb19477e8a5c34fc5783a42f6d3 | fetburner/Coq2SML | tags.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/ide/tags.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let make_tag (tt:GText.tag_t... |
c52ec966872eac145a9a528ecb12b08580dbecb04cdf858a4930e7055f632372 | camlspotter/ocamloscope.2 | t21_ocamlbuild_plugin.ml | reproduction of failure around ocamlbuild 's ocamlbuild_plugin.ml
module type PATHNAME = sig
type t
end
module Qathname : sig
include PATHNAME
val x : int
end = struct
type t = unit
let x = 42
end
module type PLUGIN = sig
module Pathname : PATHNAME
end
module M : PLUGIN with module Pathname = Qath... | null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/tests/t21_ocamlbuild_plugin.ml | ocaml | reproduction of failure around ocamlbuild 's ocamlbuild_plugin.ml
module type PATHNAME = sig
type t
end
module Qathname : sig
include PATHNAME
val x : int
end = struct
type t = unit
let x = 42
end
module type PLUGIN = sig
module Pathname : PATHNAME
end
module M : PLUGIN with module Pathname = Qath... | |
34be0493373a8eaf49640177eb3f1b645e3451224a99f9e68a538277c79d5725 | melange-re/melange | bsb_db_decode.mli | Copyright ( C ) 2019 - Present Authors of ReScript
*
* 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 ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/d40ae922fc3b317da5351dec5f5f79b8b52cf3f2/meldep/bsb_db_decode.mli | ocaml | string is whole content
Bsb_db.case
contains global info
module name | Copyright ( C ) 2019 - Present Authors of ReScript
*
* 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 ) any later... |
2adab5a366cc7d6f8e4b852b25f972dbe951048c017fac873362b77e819d5b40 | robert-strandh/SICL | map-defined-method-combination-templates.lisp | (cl:in-package #:sicl-environment)
This code should be in Clostrum in some form . Not sure exactly
;;; which form.
(defgeneric map-defined-method-combination-templates
(client environment function))
(defmethod map-defined-method-combination-templates
(client (environment base-run-time-environment) functi... | null | https://raw.githubusercontent.com/robert-strandh/SICL/100b1ec2e3be522a7e861268ee6e75e48ad824a0/Code/Environment-Clostrum/map-defined-method-combination-templates.lisp | lisp | which form. | (cl:in-package #:sicl-environment)
This code should be in Clostrum in some form . Not sure exactly
(defgeneric map-defined-method-combination-templates
(client environment function))
(defmethod map-defined-method-combination-templates
(client (environment base-run-time-environment) function)
(maphash f... |
a31ed2032ba3ec03175d11375d79f01a69c8b2c505ca83748eb2524375d942bb | input-output-hk/cardano-sl | Slog.hs | -- | You can treat this part as another block component which deals
-- with all data not related directly to any other component, while
-- another part of 'Pos.Chain.Block' is dedicated to whole blocks.
module Pos.Chain.Block.Slog
( module Pos.Chain.Block.Slog.Types
) where
import Pos.Chain.Bl... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Block/Slog.hs | haskell | | You can treat this part as another block component which deals
with all data not related directly to any other component, while
another part of 'Pos.Chain.Block' is dedicated to whole blocks. |
module Pos.Chain.Block.Slog
( module Pos.Chain.Block.Slog.Types
) where
import Pos.Chain.Block.Slog.Types
|
04e9c9bd6f5ef55299d076a7c9b97795f31128bcca8eb42348e939f161e30bfa | kiranshila/Doplarr | build.clj | (ns build
(:require
[org.corfield.build :as bb]))
(defn uber [_]
(bb/clean nil)
(bb/uber {:uber-file "target/doplarr.jar"
:main 'doplarr.core}))
| null | https://raw.githubusercontent.com/kiranshila/Doplarr/3ed9bb7c19c70a9f460216c7b296e374d046cefe/build/build.clj | clojure | (ns build
(:require
[org.corfield.build :as bb]))
(defn uber [_]
(bb/clean nil)
(bb/uber {:uber-file "target/doplarr.jar"
:main 'doplarr.core}))
| |
e42ca19597337faa5a9f49c4e6d0e9c7ccd2f7f9c0b2125473cd55b0a12cbb6a | jbclements/molis-hai | huffman-encode-decode.rkt | #lang typed/racket
copyright 2015 < >
(require "huffman.rkt"
typed/rackunit)
;; this really has nothing to do with password generation; this is leftover
code that uses trees for a standard encode / decode operation .
(define bytesize 16)
(define logbytesize 4)
;;; is this used...?
count : loc -... | null | https://raw.githubusercontent.com/jbclements/molis-hai/6a335ec73c144f9d8ac538752ca8e6fd0b3b3cce/molis-hai/huffman-encode-decode.rkt | racket | this really has nothing to do with password generation; this is leftover
is this used...?
an encode-vec is a vector of length bytesize containing len & bits
0111 0001 0010 01 00 | #lang typed/racket
copyright 2015 < >
(require "huffman.rkt"
typed/rackunit)
code that uses trees for a standard encode / decode operation .
(define bytesize 16)
(define logbytesize 4)
count : loc - > locc
(: loc->countvec ((Listof Byte) -> (Vectorof Natural)))
(define (loc->countvec loc)
(: ... |
536905d804f79701a6a021648a4ea5fa0700cd975ecc1f0e51f142821ef1b6f5 | vii/cl-irregsexp | split.lisp | (in-package #:cl-irregsexp)
(5am:def-suite split :in :cl-irregsexp)
(5am:in-suite split)
(5am:test split-char
(5am:is (equalp (list "ab" "c" "d" "e" "") (match-split #\- "ab-c-d-e--"))))
| null | https://raw.githubusercontent.com/vii/cl-irregsexp/cc23512d3fe2880c5df47fa96d47b352c3d5b73a/t/split.lisp | lisp | (in-package #:cl-irregsexp)
(5am:def-suite split :in :cl-irregsexp)
(5am:in-suite split)
(5am:test split-char
(5am:is (equalp (list "ab" "c" "d" "e" "") (match-split #\- "ab-c-d-e--"))))
| |
ab8f0a0ea4c7eaf799d47f84d5ac11aaeec60c696dfb8458173525793bc26a13 | larcenists/larceny | fp2.scm | (
(fcmovb st0 st2)
(fcmove st0 st3)
(fcmovbe st0 st4)
(fcmovu st0 st5)
(fcmovnb st0 st6)
(fcmovne st0 st7)
(fcmovnbe st0 st1)
(fcmovnu st0 st2)
(fxch)
(fucom st3)
(fld (tword (& eax)))
(fstp (qword (& ebx)))
(fld (dword (& ecx)))
(fstp st4)
(fst (dword (& edx)))
(fst (qword (& ebx)))
(fst st3)
(fild (word (& ebx)))
... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/fp2.scm | scheme | (
(fcmovb st0 st2)
(fcmove st0 st3)
(fcmovbe st0 st4)
(fcmovu st0 st5)
(fcmovnb st0 st6)
(fcmovne st0 st7)
(fcmovnbe st0 st1)
(fcmovnu st0 st2)
(fxch)
(fucom st3)
(fld (tword (& eax)))
(fstp (qword (& ebx)))
(fld (dword (& ecx)))
(fstp st4)
(fst (dword (& edx)))
(fst (qword (& ebx)))
(fst st3)
(fild (word (& ebx)))
... | |
4820e6b2cf9fc81ccf25d9ac8a3b1f6d557f0f5f517c2752272f584d6a3082f5 | martinklepsch/electron-and-clojurescript | renderer.cljs | (ns app.renderer)
(defn init []
(js/console.log "Starting Application"))
| null | https://raw.githubusercontent.com/martinklepsch/electron-and-clojurescript/253dcb11fab99fffcb979dbc0193d5b5229e365a/src/app/renderer.cljs | clojure | (ns app.renderer)
(defn init []
(js/console.log "Starting Application"))
| |
3c53ba6e7e011c4b7891e1d0181caa8bda81eaa8c355fcc4347180c413859acc | LaurentMazare/btc-ocaml | common.mli | open Core.Std
val consume_compact_uint : ([> read], Iobuf.seek) Iobuf.t -> int
val fill_compact_uint : (read_write, Iobuf.seek) Iobuf.t -> int -> unit
| null | https://raw.githubusercontent.com/LaurentMazare/btc-ocaml/0616d7853d807e50dc9ff83c6783b80f71640da2/common.mli | ocaml | open Core.Std
val consume_compact_uint : ([> read], Iobuf.seek) Iobuf.t -> int
val fill_compact_uint : (read_write, Iobuf.seek) Iobuf.t -> int -> unit
| |
071c6b9c19ab57616c13d85a41bb0eec7cda5f9797193b901e195c2974ca3a67 | gregr/experiments | edit.rkt | #lang racket
(provide
)
(require
"syntax-abstract.rkt"
gregr-misc/navigator
)
(module+ test
(require rackunit))
; inner (D) vs. outer (d, it's more common?) delete
; registers?
; yank (y) (or copy (c)?)
; paste (p)
; delete (d, D)
; cut (x) = yank, delete
; introduce (i) (only works when uno is selected?)... | null | https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/supercompilation/cog/edit.rkt | racket | inner (D) vs. outer (d, it's more common?) delete
registers?
yank (y) (or copy (c)?)
paste (p)
delete (d, D)
cut (x) = yank, delete
introduce (i) (only works when uno is selected?)
inward vs. outward introduction?
(i) inward, going after all unos in order, followed by outer
(I) skip straight to outer
replace... | #lang racket
(provide
)
(require
"syntax-abstract.rkt"
gregr-misc/navigator
)
(module+ test
(require rackunit))
introduce : embed subterm left / right
introduce : 0 or 1
tuple rotates are compound operations involving normal rotates and swaps
[ un]contextify / globalify
context can be determined i... |
2a94d6d65577bd9c94f6d9d789e54b63200662e43595867301f042d21a7256f5 | Deducteam/Logipedia | dk2json.ml | open Core
open Extras
open Console
open Json
* Input files .
let infiles : string list ref = ref []
(** Options of command line. *)
let options =
let sys_exps =
Spec list for export systems .
let module S = Systems in
let f (name, system) =
( Format.sprintf "--%s" name
, Arg.String (fun s -> ... | null | https://raw.githubusercontent.com/Deducteam/Logipedia/09797a35ae36ab671e40e615fcdc09a7bba69134/src/dk2json.ml | ocaml | * Options of command line.
Create output dir if it does not exist. | open Core
open Extras
open Console
open Json
* Input files .
let infiles : string list ref = ref []
let options =
let sys_exps =
Spec list for export systems .
let module S = Systems in
let f (name, system) =
( Format.sprintf "--%s" name
, Arg.String (fun s -> S.artefact_path := (system, s) :... |
24825da8cb06a56dd2ea855aea6cdb9fdd169d4a8b3198ce6196f2233e863544 | chef/chef-server | chef_wm_prometheus_json_format.erl | -module(chef_wm_prometheus_json_format).
-export([
content_type/0,
format/0,
format/1]).
-include_lib("prometheus/include/prometheus_model.hrl").
-define(PROCESS_DICT_STORAGE, chef_wm_prometheus_json_format_data).
-spec content_type() -> binary().
content_type() ->
<<"application/json... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/chef_wm_prometheus_json_format.erl | erlang | TODO(jaym) 08/27/17: It might be worthwhile making this defensive to failure... always cleanup
as a bonus what is the json representation of a histogram?
TODO(jaym) 08/27/17: Summary types | -module(chef_wm_prometheus_json_format).
-export([
content_type/0,
format/0,
format/1]).
-include_lib("prometheus/include/prometheus_model.hrl").
-define(PROCESS_DICT_STORAGE, chef_wm_prometheus_json_format_data).
-spec content_type() -> binary().
content_type() ->
<<"application/json... |
7b8e29dd8813ec3e811f2730ed9497a33bd68e5223aad74fc74d25f55cf1d22b | avatar29A/hs-aitubots-api | FormAction.hs | # LANGUAGE RecordWildCards #
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
module Aitu.Bot.Forms.FormAction
( FormAction(..)
, FormActionType(..)
, DataTemplate(..)
)
where
import Data.Aeson
import Data.Text
type UserName = Text
type Url = Text
type Templa... | null | https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Forms/FormAction.hs | haskell | # LANGUAGE OverloadedStrings #
, hiddenMetadata :: Maybe Text
, "hidden_metadata" .= hiddenMetadata | # LANGUAGE RecordWildCards #
# LANGUAGE DuplicateRecordFields #
module Aitu.Bot.Forms.FormAction
( FormAction(..)
, FormActionType(..)
, DataTemplate(..)
)
where
import Data.Aeson
import Data.Text
type UserName = Text
type Url = Text
type Template = Text
data FormActionType = Se... |
75e30033de65d1bca71309d82a6fd311f728f283840c7e9b6264dcae2ed817de | bpiel/guildsman | alert.cljs | (ns re-com.alert
(:require-macros [re-com.core :refer [handler-fn]])
(:require [re-com.util :refer [deref-or-value]]
[re-com.buttons :refer [button]]
[re-com.box :refer [h-box v-box box scroller border flex-child-style]]
[re-com.validate :refer [string-or-hiccup? a... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/resources/public/js/compiled/out/re_com/alert.cljs | clojure | --------------------------------------------------------------------------------------------------
Component: alert
--------------------------------------------------------------------------------------------------
"×"
Override h4
----------------------------------------------------------------------------------... | (ns re-com.alert
(:require-macros [re-com.core :refer [handler-fn]])
(:require [re-com.util :refer [deref-or-value]]
[re-com.buttons :refer [button]]
[re-com.box :refer [h-box v-box box scroller border flex-child-style]]
[re-com.validate :refer [string-or-hiccup? a... |
eb8d742676c682671bb5c8805992e46630258d6c5ef1f14095fc0f9ea168dd41 | graninas/Hydra | Free.hs | {-# LANGUAGE PackageImports #-}
module Free where
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified "hydra-free" Hydra.Language as L
import Hydra.Prelude
import qualified "hydra-free" Hydra.Runtime as R
import qualified "hydra-free" Hydra.Interpreters as R
impo... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/app/MeteorCounter/src/Free.hs | haskell | # LANGUAGE PackageImports # |
module Free where
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified "hydra-free" Hydra.Language as L
import Hydra.Prelude
import qualified "hydra-free" Hydra.Runtime as R
import qualified "hydra-free" Hydra.Interpreters as R
import Types
initState ::... |
bea178c0df6c21330ee8022d381277fc84eabd8aa3ca1696453206ad81cad44a | muldvarp/DiMo | propFormula.ml | open Basics ;;
type propFormula = True
| False
| Lit of bool * string * (int list)
| And of propFormula list
| Or of propFormula list
| Biimp of propFormula * propFormula
let showFormula =
let rec show = function True -> "True"
... | null | https://raw.githubusercontent.com/muldvarp/DiMo/fb244b96b256aaf969bb88fcb91a37e37312c98d/src/propFormula.ml | ocaml | | [psi] -> show psi
expects the input to have been passed through the function tidy! | open Basics ;;
type propFormula = True
| False
| Lit of bool * string * (int list)
| And of propFormula list
| Or of propFormula list
| Biimp of propFormula * propFormula
let showFormula =
let rec show = function True -> "True"
... |
ea83b43572d13cebc4f13afed5a09b0c0fb83f0ce59a723c12ddb660b70d880c | GaloisInc/xml | Main.hs | import Text.XML.Light
main = do
s <- readFile "rss.xml"
case parseXMLDoc s of
Nothing -> error "Failed to parse xml"
Just doc ->
let _:_:elem:_ = findElements (unqual "description") $ doc
[Text title_content] = elCont... | null | https://raw.githubusercontent.com/GaloisInc/xml/004a2c07286d17f61237d1bf59ccc11a5122a57c/tests/Main.hs | haskell | import Text.XML.Light
main = do
s <- readFile "rss.xml"
case parseXMLDoc s of
Nothing -> error "Failed to parse xml"
Just doc ->
let _:_:elem:_ = findElements (unqual "description") $ doc
[Text title_content] = elCont... | |
26a0d0a4b1a5799fb1eef91bf25b73893ba235022a093b8e5d4078a1c4654ed9 | LighghtEeloo/data-types-a-la-carte | Main.hs | module Main where
import Inject(main0)
import FreeRun(main1)
main :: IO ()
main = do
putStrLn "=== Inject ==="
Inject.main0
putStrLn "=== FreeRun ==="
FreeRun.main1
| null | https://raw.githubusercontent.com/LighghtEeloo/data-types-a-la-carte/7f56995656aeebe3ad3e7e35cfdd4245cefefa18/app/Main.hs | haskell | module Main where
import Inject(main0)
import FreeRun(main1)
main :: IO ()
main = do
putStrLn "=== Inject ==="
Inject.main0
putStrLn "=== FreeRun ==="
FreeRun.main1
| |
a3d3b7a22d935840ffbf4ff6223e784b52d9d64898c78d88489e6912cb586e02 | esl/escalus | escalus_cleaner.erl | %%==============================================================================
Copyright 2010 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/esl/escalus/ac5e813ac96c0cdb5d5ac738d63d992f5f948585/src/escalus_cleaner.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 2010 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(escalus_cleaner).
-export([start/1,
add_client/2,
remove_client/2,
get_clients/1,
stop/1]).
... |
0a398812c5e7a641976fd60a9cf2544adec287dd3a93d5f125861e9b96ea3fe1 | dtgoitia/civil-autolisp | STRUCTURAL - Coordinate table.lsp | (defun c:cb ( /
ss
pile_ID_list pile_list
pile_ID_list_sorted pile_list_sorted
att_p att_w
)
; ERROR HANDLING FUNCTION ----------------------------------------------------
(defun *error* ( msg )
(if (not (member msg '("Function cancelled... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/STRUCTURAL%20-%20Coordinate%20table.lsp | lisp | ERROR HANDLING FUNCTION ----------------------------------------------------
RESTORE PREVIOUS SETTINGS
AUXILIARY FUNCTIONS --------------------------------------------------------
obj - [vla] VLA Block Reference object
Returns the value held by the specified tag within the supplied block, if present.
blk - [vla] ... | (defun c:cb ( /
ss
pile_ID_list pile_list
pile_ID_list_sorted pile_list_sorted
att_p att_w
)
(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
)
(setvar... |
94546d09dbf41a8150835fd4c4aaa49431ebca1f36b46db074649afb44e5da8e | open-company/open-company-web | contributions.cljs | (ns oc.web.stores.contributions
(:require [oc.web.dispatcher :as dispatcher]
[oc.web.utils.activity :as au]))
(defmethod dispatcher/action :contributions-get/finish
[db [_ org-slug author-uuid sort-type contrib-data]]
(let [org-data (dispatcher/org-data db org-slug)
prepare-container-data (->... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/stores/contributions.cljs | clojure | (ns oc.web.stores.contributions
(:require [oc.web.dispatcher :as dispatcher]
[oc.web.utils.activity :as au]))
(defmethod dispatcher/action :contributions-get/finish
[db [_ org-slug author-uuid sort-type contrib-data]]
(let [org-data (dispatcher/org-data db org-slug)
prepare-container-data (->... | |
b4ff10e239b9c7a5b58666898c23da177d1efaaa58667c67e8ae3cb2862da693 | FranklinChen/hugs98-plus-Sep2006 | Specification.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing.Specification
Copyright : ( c ) 2002 - 2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- ... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/Texturing/Specification.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.Texturing.Specification
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
-----------------------------... | Copyright : ( c ) 2002 - 2005
This module corresponds to section 3.8.1 ( Texture Image Specification ) ,
section 3.8.2 ( Alternate Texture Image Specification Commands ) , and section
3.8.3 ( Compressed Texture Images ) of the OpenGL 1.5 specs .
module Graphics.Rendering.OpenGL.GL.Texturing.Specificatio... |
1fc9656baa946eb24fce2369b08f102f78f8e039c9714b8db597fb7e2c0c7f93 | serokell/time-warp | Rpc.hs | -- |
-- Module : Control.TimeWarp.Rpc
Copyright : ( c ) , 2016
-- License : GPL-3 (see the file LICENSE)
Maintainer : >
-- Stability : experimental
Portability : POSIX , GHC
--
-- This module provides networking capabilities.
-- Name `RPC` is outdated and is subject to change; this module does... | null | https://raw.githubusercontent.com/serokell/time-warp/2783f81957a2e5b02e9d3425d760247a6c5a766b/src/Control/TimeWarp/Rpc.hs | haskell | |
Module : Control.TimeWarp.Rpc
License : GPL-3 (see the file LICENSE)
Stability : experimental
This module provides networking capabilities.
Name `RPC` is outdated and is subject to change; this module does *not* provide
RPC interface.
, module Control.TimeWarp.Rpc.Rpc
, module Control... | Copyright : ( c ) , 2016
Maintainer : >
Portability : POSIX , GHC
module Control.TimeWarp.Rpc
( module Control.TimeWarp.Rpc.Message
, module Control.TimeWarp.Rpc.MonadDialog
, module Control . TimeWarp . Rpc . MonadRpc
, module Control.TimeWarp.Rpc.MonadTransfer
, mod... |
af101d254f33d15e5cfe645abe96aa884769f8e63d860d6e40c9ccfd75dfb394 | fukamachi/clozure-cl | ppc64-bignum.lisp | -*- Mode : Lisp ; Package : CCL -*-
;;;
Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/level-0/PPC/PPC64/ppc64-bignum.lisp | lisp | Package : CCL -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
If we can fit in a single digit (if the high word is just a sign
extension ... | Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as ... |
5dd214a42ee4b58d163001a710daab39608ea91ddecb2701ce3cc2b62f75a077 | project-oak/hafnium-verification | DereferenceRule.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/nullsafe/DereferenceRule.ml | ocaml | This can happen only in strict mode.
This type of violation is more subtle than the normal case because, so it should be rendered in a special way
Just describe an object itself |
* 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
... |
815051ff34a40712b533db32fd6d075a9b44b98d92d8af445adf12f211b24723 | SmiteshP/nvim-gps | nvimGPS.scm | (module [
(scope_resolution)
(constant)
] @container-name) @scope-root
(class
(constant) @class-name) @scope-root
(class
(scope_resolution (constant)) @class-name) @scope-root
(singleton_method
(identifier) @function-name) @scope-root
(method
(identifier) @method-name) @scope-root
| null | https://raw.githubusercontent.com/SmiteshP/nvim-gps/725da5c5331b2de35b9181748000da7429ea80e6/queries/ruby/nvimGPS.scm | scheme | (module [
(scope_resolution)
(constant)
] @container-name) @scope-root
(class
(constant) @class-name) @scope-root
(class
(scope_resolution (constant)) @class-name) @scope-root
(singleton_method
(identifier) @function-name) @scope-root
(method
(identifier) @method-name) @scope-root
| |
5a3791472eb123c0be64cb19e3a9210231a9f9bd7938ebcd545740dc50fe8c26 | basho/riak_search | lucene_scan_test.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
%% -------------------------------------------------------------------
-module(lucene_scan_test).
-include_lib("eunit/include/eunit.hrl").
%% Simple string parsi... | null | https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/apps/lucene_parser/src/lucene_scan_test.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
Simple string parsing.
Combinations of quoted and unquoted strings.
Some special characters.
All special characters.
Spaces and tabs.
Required term, single word.
Required t... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
-module(lucene_scan_test).
-include_lib("eunit/include/eunit.hrl").
string1_test() ->
Expect = [
{string, 1, "test"}
],
test_helper("test", Expect).
Two terms .
string2_test() ->
Expect = [
... |
1c227cdad547b409907408c33707e4cdde02467e92ac50cc362cfa898e6640b1 | fhunleth/nerves-see | lists.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/fhunleth/nerves-see/6f21abf98da213090118ef72b62bbc999bda689c/src/lists.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
%CopyrightBegin%
compliance with the License. You ... | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyright Ericsson AB 1996 - 2010 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software di... |
1b8ba3d8693809d67081bebcf3415e6e6329aba4ae898e9c42a6ebcdd2ffeb0f | static-analysis-engineering/codehawk | jCHSystemSettings.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpre/jCHSystemSettings.mli | ocaml | jchpre | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
ba74c70e36065e92b2fc726b04dd7b7ea882c605cdd51f666649990c29a3e462 | haskell-works/hw-json | Example2.hs | {-# LANGUAGE BangPatterns #-}
# OPTIONS_GHC -fno - warn - unused - matches #
# OPTIONS_GHC -fno - warn - name - shadowing #
# OPTIONS_GHC -fno - warn - unused - local - binds #
module Example2 where
import qualified HaskellWorks.Data.ByteString as BS
import qualified HaskellWorks.Data.Json.S... | null | https://raw.githubusercontent.com/haskell-works/hw-json/371d20c836dba90271d62d736f2b51b9cf418ea6/examples/Example2.hs | haskell | # LANGUAGE BangPatterns # |
# OPTIONS_GHC -fno - warn - unused - matches #
# OPTIONS_GHC -fno - warn - name - shadowing #
# OPTIONS_GHC -fno - warn - unused - local - binds #
module Example2 where
import qualified HaskellWorks.Data.ByteString as BS
import qualified HaskellWorks.Data.Json.Standard.Cursor.Fast as JCF
ex... |
c27c9e69f6e4b688935d71d64998fec07bc4734b970f5258e2f8797837ba310c | justinethier/cyclone | pass-validate-syntax.scm | ;;;; Cyclone Scheme
;;;;
;;;;
Copyright ( c ) 2014 - 2019 ,
;;;; All rights reserved.
;;;;
;;;; This file validates basic syntax of special forms.
It receives S - expressions , not AST records
;;;;
(cond-expand
(program
(import
(scheme base)
(scheme read)
(scheme cyclone pretty-print)
... | null | https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/scheme/cyclone/pass-validate-syntax.scm | scheme | Cyclone Scheme
All rights reserved.
This file validates basic syntax of special forms.
TODO: call this from cyclone.scm after it works, probably after "resolve macros"
Only need to track local vars if they shadow one of our keywords
Validates type information
TODO: could check primitives, etc
TODO: what i... | Copyright ( c ) 2014 - 2019 ,
It receives S - expressions , not AST records
(cond-expand
(program
(import
(scheme base)
(scheme read)
(scheme cyclone pretty-print)
(scheme cyclone util))))
(define (validate-keyword-syntax exp)
(define (include-var? v)
(member v '(define set!... |
3095b77b5f8fe0b027d8dcf3eb48a4b2d5e989767de76fe4a581a454dcf88741 | ntoronto/drbayes | make-real-lift.rkt | #lang typed/racket/base
(require racket/promise
"../../set.rkt"
"../types.rkt"
"../cache.rkt"
"bijection.rkt"
"trijection.rkt")
(provide (all-defined-out))
;; ===================================================================================================
;; R -> R lif... | null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/arrow/pure-lifts/make-real-lift.rkt | racket | ===================================================================================================
R -> R lifts
---------------------------------------------------------------------------------------------------
Strictly monotone and surjective (i.e. invertible)
---------------------------------------------------... | #lang typed/racket/base
(require racket/promise
"../../set.rkt"
"../types.rkt"
"../cache.rkt"
"bijection.rkt"
"trijection.rkt")
(provide (all-defined-out))
(: real/bot (-> Symbol Nonempty-Real-Set Nonempty-Set (-> Flonum Value) (-> Bot-Arrow)))
(define (real/bot name X Y... |
c620bfd530a9fb52c53009863e7346bb234e258abe10575b07cbafb36a23c97c | cedlemo/OCaml-GObject-Introspection | Type_info.ml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/lib/Type_info.ml | ocaml | TODO : check that the info can be casted to arg info ? |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... |
fbc283f5059b2885142e3742c668275b2bcb13532fb14febf861ac483119c265 | umutisik/mathvas | Snippet.hs | module Model.Snippet (
Snippet(..),
defaultSnippet,
snippetContentHash,
contentHash,
fromStoredSnippet
) where
import Import
import ClassyPrelude.Yesod
import Util.Hash (sha1Text)
import Model.Activity
import Data . Aeson ( decode )
import Data . Maybe ( fromJust )
import qualified Data . ByteStri... | null | https://raw.githubusercontent.com/umutisik/mathvas/9f764cd4d54370262c70c7ec3eadae076a1eb489/Model/Snippet.hs | haskell | snippetCreated :: Text,
, snippetModified=""
, snippetCreated=""
, snippetCreated= storedSnippetSnippetCreated str
helloWorldSnippet :: Snippet
in newSnippetWithContent sniptxt
instance FromJSON SnippetFile where
parseJSON (Object v) = SnippetFile <$>
v .: "name" <*>
v .: "conten... | module Model.Snippet (
Snippet(..),
defaultSnippet,
snippetContentHash,
contentHash,
fromStoredSnippet
) where
import Import
import ClassyPrelude.Yesod
import Util.Hash (sha1Text)
import Model.Activity
import Data . Aeson ( decode )
import Data . Maybe ( fromJust )
import qualified Data . ByteStri... |
c62b1b9329f2372e615bf055c404063bb60dff20d97de0710633a1894d2e955d | openvstorage/alba | asd_protocol.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Slice
open Checksum
open Asd_statistics
open Range_query_args2
TODO ... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/asd_protocol.ml | ocaml | override |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Slice
open Checksum
open Asd_statistics
open Range_query_args2
TODO ... |
eef3d4bc4ee2e93f06c19d1db692c99c1a75d10192034d67bbd5b2b6b01ca1c0 | JKTKops/cspim | WordUtils.hs | # LANGUAGE FlexibleContexts #
module Data.WordUtils
( module Data.Word
, wordToFloat, floatToWord, wordToDouble, doubleToWord
, wordToInt, intToWord
, combineWord32s, splitWord64
) where
import Data.Bits
import Data.Word
import Data.Int
import Data.Array.ST
import Data.Array.Unsafe
import GHC.ST
c... | null | https://raw.githubusercontent.com/JKTKops/cspim/0218d88ee774023eecef2c4a0733c3cf1184f443/src/Data/WordUtils.hs | haskell | | Split a Word64 into two Word32s. | # LANGUAGE FlexibleContexts #
module Data.WordUtils
( module Data.Word
, wordToFloat, floatToWord, wordToDouble, doubleToWord
, wordToInt, intToWord
, combineWord32s, splitWord64
) where
import Data.Bits
import Data.Word
import Data.Int
import Data.Array.ST
import Data.Array.Unsafe
import GHC.ST
c... |
76904423535c59e2d7cee31e846fac2ac158a84345480ed61b90566794a312f4 | dbuenzli/remat | config.ml | ---------------------------------------------------------------------------
Copyright 2012 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Copyright... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-rematd/config.ml | ocaml | ---------------------------------------------------------------------------
Copyright 2012 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Copyright... | |
d3734175dbd9aca4bf10b34fae50c714a6a0ee8a4611450d1ea231fef922796b | silky/super-reference | Foundation.hs | module Foundation where
import Import.NoFoundation
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExternal)
import qualified Text.BibTeX.Entry as BibTeX
import qualified Yesod.C... | null | https://raw.githubusercontent.com/silky/super-reference/cf05314ba1864eb5887201a22d959b71caef71b8/Foundation.hs | haskell | | The foundation datatype for your application. This can be a good place to
keep settings and values requiring initialization before your application
starts running, such as database connections. Every handler will have
access to the data present here.
^ Settings for static file serving.
| Our database. It's an ... | module Foundation where
import Import.NoFoundation
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExternal)
import qualified Text.BibTeX.Entry as BibTeX
import qualified Yesod.C... |
4aea94db4ecb75381160134bd5879e56d3ee3808f1bc0dc6b6b809d3587e54dc | yuriy-chumak/ol | render.scm | (define-library (lib gtk-3 render)
(description "Rendering UI elements")
(export
; gtk_render_check
; gtk_render_option
gtk_render_arrow
gtk_render_background
; gtk_render_background_get_clip
; gtk_render_frame
; gtk_render_expander
; gtk_render_focus
; gtk_render... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/bfcefc78817f72ea688e7fac2fd0c1737ba0177a/libraries/lib/gtk-3/render.scm | scheme | gtk_render_check
gtk_render_option
gtk_render_background_get_clip
gtk_render_frame
gtk_render_expander
gtk_render_focus
gtk_render_layout
gtk_render_line
gtk_render_slider
gtk_render_frame_gap
gtk_render_extension
gtk_render_handle
gtk_render_activity
gtk_render_icon_pixbuf
gtk_render_icon
gtk_render_ic... | (define-library (lib gtk-3 render)
(description "Rendering UI elements")
(export
gtk_render_arrow
gtk_render_background
)
(import
(scheme core)
(otus ffi)
(lib gdk-3)
(lib cairo)
(lib gtk-3 gtk))
(begin
gtk_render_arrow
(define gtk_render_background (GTK3 fft-void... |
5a433e989e78b090a16f96750f5e7030f142b37156cbd659336dc95b60e071c7 | leftaroundabout/beamonad | MathLatin_RomanGreek.hs | -- |
Module : Presentation . Yeamer . Maths . Unicode .
Copyright : ( c ) 2017
-- License : GPL v3
--
-- Maintainer : (@) jsag $ hvl.no
-- Stability : experimental
-- Portability : portable
--
Convenience module , re - exporting the necessary LaTeX builders for writing maths
-- in a Yeamer pr... | null | https://raw.githubusercontent.com/leftaroundabout/beamonad/4f6273b479ea10c29759acab5edc56623b22c9a8/Presentation/Yeamer/Maths/Unicode/MathLatin_RomanGreek.hs | haskell | |
License : GPL v3
Maintainer : (@) jsag $ hvl.no
Stability : experimental
Portability : portable
in a Yeamer presentation.
# LANGUAGE CPP #
# LANGUAGE TypeFamilies # | Module : Presentation . Yeamer . Maths . Unicode .
Copyright : ( c ) 2017
Convenience module , re - exporting the necessary LaTeX builders for writing maths
module Presentation.Yeamer.Maths.Unicode.MathLatin_RomanGreek
( module Presentation.Yeamer
, module Math.LaTeX.... |
b581e7a637fca5a0aaf7e57dba36a1e6c7bba4cbecd1bc9daed668b5fac33f09 | xapi-project/xen-api | rrd_file_writer.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/ad2f11bc6837bfda1700b67865ce8d11bc954014/ocaml/xcp-rrdd/lib/transport/file/rrd_file_writer.ml | ocaml | * Filesystem path.
* Filesystem path is returned to the caller for future reference.
* fd for writing to the shared file.
* This assumes there's no limit to the size of file which can be used. |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... |
1cbccc447ccc03d5fe45081bd5996486ddbbcaeae664d4f3764a9462c240ef43 | markmandel/brute-play-pong | ai.clj | (ns ^{:doc "Crazy smart AI for the CPU paddle"}
brute-play-pong.ai
(:use [play-clj.math])
(:require [brute-play-pong.paddle :as p]
[brute.entity :as e])
(:import [brute_play_pong.component CPUPaddle Ball Rectangle]))
(def speed 200)
(defn process-one-game-tick
"Render all the things"... | null | https://raw.githubusercontent.com/markmandel/brute-play-pong/f10c7939e867f913cb35e4155768975fa0f93060/desktop/src-common/brute_play_pong/ai.clj | clojure | (ns ^{:doc "Crazy smart AI for the CPU paddle"}
brute-play-pong.ai
(:use [play-clj.math])
(:require [brute-play-pong.paddle :as p]
[brute.entity :as e])
(:import [brute_play_pong.component CPUPaddle Ball Rectangle]))
(def speed 200)
(defn process-one-game-tick
"Render all the things"... | |
94935f834661eeb77acb74266aa4ddc5e1829c2d90686cbc4cd5310db7c13021 | labra/Haws | RDFGraph.hs | module Haws.RDFGraph where
import Haws.TGraph
import Haws.TContext
import Haws.FGLTGraph
import Haws.Unify
import Data.Set
data Resource = IRI String
| Lit String
| BNode BNodeId
deriving (Show, Eq, Ord)
data RDFGraph = Basic (FGLTGraph Resource)
| Exists (BNod... | null | https://raw.githubusercontent.com/labra/Haws/2417adc37522994e2bbb8e9e397481a1f6f4f038/src/Haws/RDFGraph.hs | haskell | module Haws.RDFGraph where
import Haws.TGraph
import Haws.TContext
import Haws.FGLTGraph
import Haws.Unify
import Data.Set
data Resource = IRI String
| Lit String
| BNode BNodeId
deriving (Show, Eq, Ord)
data RDFGraph = Basic (FGLTGraph Resource)
| Exists (BNod... | |
36d2a5d78cfc99edae61ad0cb2a26c51344613e4d347f4c8894ee70422c570ac | losfair/Violet | Main.hs | import Prelude
import qualified VioletTest.TestCore
main :: IO ()
main = VioletTest.TestCore.test
| null | https://raw.githubusercontent.com/losfair/Violet/dcdd05f8dc08a438a157347f424966da73ccc9b8/app/Main.hs | haskell | import Prelude
import qualified VioletTest.TestCore
main :: IO ()
main = VioletTest.TestCore.test
| |
ff250a3d24618049bb10d7b12559d8b2723b0ca449ff9466ad20b73cc6508383 | ocaml/oasis | OASISObject.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISObject.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
50cb01226a3d48c0e27299051aed5ef269eb6caf75b7abadbb1c0d12f94febf2 | belambert/cl-asr | data-structures.lisp | Copyright 2010 - 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; -2.0
;; Unless required by applicable law or agreed to in writing, software
distributed under the L... | null | https://raw.githubusercontent.com/belambert/cl-asr/a734ddb396f18bf4a504e9ecb3c91e507764358c/src/hmm/data-structures.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... | Copyright 2010 - 2018
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :cl-asr)
The class representation of an HMM ( semi - deprecated ) " )
We 're still using this in the FSM - based language HMM code , and training
(defclass* hmm ()
((word nil :type string)
(left-c... |
b9003d7c50a3450547cbc7161c5137ba07da95083e37b7367cd7fed6f43b8958 | RyanGlScott/text-show | GenericArbitrary.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeOperators #
{-# LANGUAGE TypeSynonymInstances #-}
|
Module : Instances . Utils . GenericArbitrary
Copy... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Instances/Utils/GenericArbitrary.hs | haskell | # LANGUAGE KindSignatures #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeSynonymInstances #
| `Gen` for generic instances in which each constructor has equal probability
of being chosen.
We cannot simply choose with equal probability between the left and
right part of the... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
|
Module : Instances . Utils . GenericArbitrary
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC... |
c250791e361af44102e322f5b15887bdd3d1d2477f9cc195342e96a9cf949aab | PLSysSec/lio | LIORef.hs | # LANGUAGE Trustworthy #
{-# LANGUAGE ConstraintKinds,
FlexibleContexts #-}
|
Mutable reference in the ' LIO ' monad . As with other objects in LIO ,
mutable references have an associated label that is used to impose
restrictions on its operations . In fact , labeled references
( ' LIORef 's ) ... | null | https://raw.githubusercontent.com/PLSysSec/lio/622a3e7bc86a3b42ab4ce8be954064a5f142247a/lio/LIO/LIORef.hs | haskell | # LANGUAGE ConstraintKinds,
FlexibleContexts #
* Basic Functions
** Create labeled 'IORef's
** Read 'LIORef's
** Write 'LIORef's
** Modify 'LIORef's
Create labeled 'IORef's
| An @LIORef@ is an @IORef@ with an associated, fixed label. The
restriction to an immutable label comes from the fact that... | # LANGUAGE Trustworthy #
|
Mutable reference in the ' LIO ' monad . As with other objects in LIO ,
mutable references have an associated label that is used to impose
restrictions on its operations . In fact , labeled references
( ' LIORef 's ) are simply labeled ' IORef 's with read and write access
restr... |
9735a4d20917348c275d91d3480ac52a8058a96631a4fe2894fd8cb288ef55ad | tsloughter/kuberl | kuberl_v1_api_group.erl | -module(kuberl_v1_api_group).
-export([encode/1]).
-export_type([kuberl_v1_api_group/0]).
-type kuberl_v1_api_group() ::
#{ 'apiVersion' => binary(),
'kind' => binary(),
'name' := binary(),
'preferredVersion' => kuberl_v1_group_version_for_discovery:kuberl_v1_group_version_for_discovery(),
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_api_group.erl | erlang | -module(kuberl_v1_api_group).
-export([encode/1]).
-export_type([kuberl_v1_api_group/0]).
-type kuberl_v1_api_group() ::
#{ 'apiVersion' => binary(),
'kind' => binary(),
'name' := binary(),
'preferredVersion' => kuberl_v1_group_version_for_discovery:kuberl_v1_group_version_for_discovery(),
... | |
fb7e420a6d5d97d42f0ac83e58659685eb71cf6b16c4211756d57a05e7c516a1 | haskell-tools/haskell-tools | Position.hs | -----------------------------------------------------------------------------
-- |
-- Module : Position
Copyright : 2000 - 2004
-- Licence : LGPL
--
Maintainer : < >
-- Stability : experimental
-- Portability : All
--
-- Simple file position information, with recursive inclusion points.... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/cli/examples/CppHs/Language/Preprocessor/Cpphs/Position.hs | haskell | ---------------------------------------------------------------------------
|
Module : Position
Licence : LGPL
Stability : experimental
Portability : All
Simple file position information, with recursive inclusion points.
---------------------------------------------------------------------------
... | Copyright : 2000 - 2004
Maintainer : < >
module Language.Preprocessor.Cpphs.Position
( Posn(..)
, newfile
, addcol, newline, tab, newlines, newpos
, cppline, haskline, cpp2hask
, filename, lineno, directory
, cleanPath
) where
import Data.List (isPrefixOf)
data Posn = Pn String !Int !... |
ca40a53ddee356d89964424b4e46c48a2b7c0daf9addf2c35fdc9d3021570109 | gedge-platform/gedge-platform | rabbit_mgmt_db.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_db).
-include_lib("rabbitmq_... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_db.erl | erlang |
The management database responds to queries from the various
rabbit_mgmt_wm_* modules. It calls out to all rabbit nodes to fetch
node-local data and aggregates it before returning it. It uses a worker-
pool to provide a degree of parallelism.
The management database reads metrics and stats written by the
rabbi... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_db).
-include_lib("rabbitmq_manage... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.