_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 |
|---|---|---|---|---|---|---|---|---|
41e5ca8c897ebc1ccd80b941bfbd62654a5014892b07d523a418d139082a622c | bobzhang/fan | pprecordtyp.ml | open Camlp4.PreCast
let _loc = Loc.mk "?"
let base base fields ty =
let fields = List.fold_right (fun field acc ->
let c = <:ctyp< $lid:field$ : $uid:field$.record >> in
<:ctyp< $c$ ; $acc$ >>) fields <:ctyp< >>
in
<:module_binding< $uid:base$ :
sig type record = {
key : $ty$;
$field... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/pprecordtyp.ml | ocaml | open Camlp4.PreCast
let _loc = Loc.mk "?"
let base base fields ty =
let fields = List.fold_right (fun field acc ->
let c = <:ctyp< $lid:field$ : $uid:field$.record >> in
<:ctyp< $c$ ; $acc$ >>) fields <:ctyp< >>
in
<:module_binding< $uid:base$ :
sig type record = {
key : $ty$;
$field... | |
e7854313913f2592443c8a7b7ef2c7f4623f2cb98b36a5fd2d63da67f026f259 | etiago/dlink-camera-api | core_test.clj | (ns dlink-camera-api.core-test
(:require [clojure.test :refer :all]
[dlink-camera-api.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 1 1))))
| null | https://raw.githubusercontent.com/etiago/dlink-camera-api/d5b35a8e346cd385be833bbd6085064a998f3395/test/dlink_camera_api/core_test.clj | clojure | (ns dlink-camera-api.core-test
(:require [clojure.test :refer :all]
[dlink-camera-api.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 1 1))))
| |
7b3816910e86e6357fd575fd9adc30e8e14c1f6fb7cfa54271a5d6c3dc2ee8af | pyr/clj-statsd | clj_statsd.clj | (ns clj-statsd
"Send metrics to statsd."
(:require [clojure.string :as str])
(:import [java.util Random])
(:import [java.net DatagramPacket DatagramSocket InetAddress]))
(def
^{:doc "Atom holding the socket configuration"}
cfg
(atom nil))
(def
^{:doc "Agent holding the datagram socket"}
sockagt
(a... | null | https://raw.githubusercontent.com/pyr/clj-statsd/0d9e13de75951bf67b8abf952a5610aaf431b2ba/src/clj_statsd.clj | clojure | (ns clj-statsd
"Send metrics to statsd."
(:require [clojure.string :as str])
(:import [java.util Random])
(:import [java.net DatagramPacket DatagramSocket InetAddress]))
(def
^{:doc "Atom holding the socket configuration"}
cfg
(atom nil))
(def
^{:doc "Agent holding the datagram socket"}
sockagt
(a... | |
947a5538aeca8eaccd768c4ac2b190601e90baca7dbc8de5455c91f1a75b2645 | CarlosMChica/HaskellBook | fixIt.hs | module Sing where
fstString:: [Char] -> [Char]
fstString x = x ++ " in the rain"
sndString:: [Char] -> [Char]
sndString x = x ++ " over the rainbow"
sing = if x > y then fstString x else sndString y
where x = "Singin"
y = "Somewhere"
main :: IO()
main = do
print (1 + 2)
putStrLn "10"
print (negate (... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter5/fixIt.hs | haskell | module Sing where
fstString:: [Char] -> [Char]
fstString x = x ++ " in the rain"
sndString:: [Char] -> [Char]
sndString x = x ++ " over the rainbow"
sing = if x > y then fstString x else sndString y
where x = "Singin"
y = "Somewhere"
main :: IO()
main = do
print (1 + 2)
putStrLn "10"
print (negate (... | |
a1e987cfe269bb0fada7d7239d4f8960459dbe363e43992b6ed13e33dd5f24b6 | danieljharvey/mimsa | ParserSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Parser.ParserSpec (spec) where
import Calc
import Data.Foldable (traverse_)
import Data.Functor
import qualified Data.Text as T
import Test.Hspec
int :: (Monoid ann) => Integer -> Expr ann
int = EPrim mempty . PInt
bool :: (Monoid ann) => Bool -> Expr ann
bool = EPrim ... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/c5bcab3e9f961216cea540edb95a8a66db773980/llvm-calc2/test/Test/Parser/ParserSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test.Parser.ParserSpec (spec) where
import Calc
import Data.Foldable (traverse_)
import Data.Functor
import qualified Data.Text as T
import Test.Hspec
int :: (Monoid ann) => Integer -> Expr ann
int = EPrim mempty . PInt
bool :: (Monoid ann) => Bool -> Expr ann
bool = EPrim mempty . PBool
spec :: Spec
spec =... |
1b198215fd1ea06e383e57ca23f5f7bb4fbbb5452db06f7101d641a723f22a36 | myuon/minilight | SpecMain.hs | module Main.SpecMain where
import MiniLight
import Test.Tasty.Hspec hiding (Failure, Success)
spec_main :: Spec
spec_main = do
describe "main" $ do
it "should start and quit" $ do
() <- runLightTWith (defLightConfig { headless = True }) $ do
runMiniloop defConfig (return ()) (\_ -> quit)
() ... | null | https://raw.githubusercontent.com/myuon/minilight/3c6a4f6b9ed15c97c7de02a281c31152442fb4d7/test/Main/SpecMain.hs | haskell | module Main.SpecMain where
import MiniLight
import Test.Tasty.Hspec hiding (Failure, Success)
spec_main :: Spec
spec_main = do
describe "main" $ do
it "should start and quit" $ do
() <- runLightTWith (defLightConfig { headless = True }) $ do
runMiniloop defConfig (return ()) (\_ -> quit)
() ... | |
c9ea9ceca478f195fb4a6b6bdce2e51516a4360989fb13d6a6b66b0b0914dcc0 | kraison/vivace-graph | utilities.lisp | (in-package #:vivace-graph)
(defmacro logger (level msg &rest args)
"Syslogger"
`(funcall #'sb-posix:syslog (gethash ',level *syslog-priorities*) ,msg ,@args))
(defun ip-to-string (ip)
(format nil "~A.~A.~A.~A" (aref ip 0) (aref ip 1) (aref ip 2) (aref ip 3)))
(defgeneric less-than (x y)
(:documentation "Gen... | null | https://raw.githubusercontent.com/kraison/vivace-graph/6b5b5eca3e2613e48846da326ecf36cd9dcd7ceb/utilities.lisp | lisp | Make compare-and-swap shorter to call
String split without regexes.
t) | (in-package #:vivace-graph)
(defmacro logger (level msg &rest args)
"Syslogger"
`(funcall #'sb-posix:syslog (gethash ',level *syslog-priorities*) ,msg ,@args))
(defun ip-to-string (ip)
(format nil "~A.~A.~A.~A" (aref ip 0) (aref ip 1) (aref ip 2) (aref ip 3)))
(defgeneric less-than (x y)
(:documentation "Gen... |
ccd26664d34798ed8373239546b897bdab31e3c5a3ddab3efd73e79afa0171b6 | juji-io/editscript | project.clj | (defproject juji/editscript "0.6.2"
:description "A diff library for Clojure/ClojureScript data structures"
:url "-io/editscript"
:lein-release {:deploy-via :clojars}
:deploy-repositories [["clojars" {:url ""
:username :env/clojars_username
... | null | https://raw.githubusercontent.com/juji-io/editscript/661502c19229cbae296896d4519a40eb848255c9/project.clj | clojure | see -cljsbuild/issues/469
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]} | (defproject juji/editscript "0.6.2"
:description "A diff library for Clojure/ClojureScript data structures"
:url "-io/editscript"
:lein-release {:deploy-via :clojars}
:deploy-repositories [["clojars" {:url ""
:username :env/clojars_username
... |
6f7e35b22a200cad89bbaef787c1bbb3998021090eea8257c7f712dac4d127c9 | tejasbubane/haskell-book-code | Game.hs | module Game where
import System.Exit (exitSuccess)
import Data.List (intersperse)
import Data.Maybe (isJust)
import Control.Monad (forever)
data Puzzle = Puzzle String [Maybe Char] [Char]
instance Show Puzzle where
show (Puzzle _ discovered guessed) =
(intersperse ' ' $ fmap renderPuzzleChar discovered)
++... | null | https://raw.githubusercontent.com/tejasbubane/haskell-book-code/deaac8ab4db0ae8692d0278826528bb8a746ed82/ch-13/hangman/src/Game.hs | haskell | Take puzzle word and turn it into list of Nothing
check if guessed character is in puzzle
check if guessed character is already guessed
success case - don't count guess
failure case - count the guess | module Game where
import System.Exit (exitSuccess)
import Data.List (intersperse)
import Data.Maybe (isJust)
import Control.Monad (forever)
data Puzzle = Puzzle String [Maybe Char] [Char]
instance Show Puzzle where
show (Puzzle _ discovered guessed) =
(intersperse ' ' $ fmap renderPuzzleChar discovered)
++... |
31b1a79628e44a89e38de7184b14a70ae2f02f98caf8c99468f8045bd443b00c | panda-planner-dev/ipc2020-domains | p-13.lisp | (defproblem problem domain
(
(In_City FrauenStrassePost Ulm)
(In_City MuenchnerStrassePost Muenchen)
(At_Vehicle LKW_Ulm FrauenStrassePost)
(At_Vehicle LKW_Muenchen HauptbahnhofMuenchen)
(At_Vehicle Eisenbahnwagen HauptbahnhofUlm)
(Serves HauptbahnhofUlm Ulm)
(Serves HauptbahnhofMuenchen ... | null | https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/UM-Translog/other/SHOP2/p-13.lisp | lisp | (defproblem problem domain
(
(In_City FrauenStrassePost Ulm)
(In_City MuenchnerStrassePost Muenchen)
(At_Vehicle LKW_Ulm FrauenStrassePost)
(At_Vehicle LKW_Muenchen HauptbahnhofMuenchen)
(At_Vehicle Eisenbahnwagen HauptbahnhofUlm)
(Serves HauptbahnhofUlm Ulm)
(Serves HauptbahnhofMuenchen ... | |
73d1aefb4fd995b4078919c5bde9165e7b306191e88801c1aebe9ecae0803855 | CLowcay/hgbc | Port.hs | # LANGUAGE RecordWildCards #
module Machine.GBC.Primitive.Port
( Port,
new,
newWithReadAction,
newWithReadMask,
alwaysUpdate,
neverUpdate,
read,
readDirect,
write,
writeDirect,
)
where
import Control.Monad.IO.Class (MonadIO (..))
import Data.Bits (Bits (..))
import Data.Word (W... | null | https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/core/src/Machine/GBC/Primitive/Port.hs | haskell | | A port is like an IORef but with a custom handler for writes.
| Create a new port.
| Initial value.
| Create a new port with a custom action to run when reading.
| Initial value.
| Action to perform on reads.
| Action to perform on writes.
| Create a new port.
| Initial value.
| Read from the port
| Read f... | # LANGUAGE RecordWildCards #
module Machine.GBC.Primitive.Port
( Port,
new,
newWithReadAction,
newWithReadMask,
alwaysUpdate,
neverUpdate,
read,
readDirect,
write,
writeDirect,
)
where
import Control.Monad.IO.Class (MonadIO (..))
import Data.Bits (Bits (..))
import Data.Word (W... |
ab3775b240db3b8505a7a4d55a1717ddd18ad33394132650e2aa5b6efc7f6311 | Martoon-00/toy-compiler | ExpSpec.hs | # LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
module Test.Examples.ExpSpec
( spec
) where
import Control.Category (id, (.))
import Control.Lens ((&))
import Data.Bits (xor, (.&.), (.|.))
import Data.Monoid ((<>))
import Prelude ... | null | https://raw.githubusercontent.com/Martoon-00/toy-compiler/a325d56c367bbb673608d283197fcd51cf5960fa/test/Test/Examples/ExpSpec.hs | haskell | # LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
module Test.Examples.ExpSpec
( spec
) where
import Control.Category (id, (.))
import Control.Lens ((&))
import Data.Bits (xor, (.&.), (.|.))
import Data.Monoid ((<>))
import Prelude ... | |
5d2b8d0e16931e80eef20483be477d8de29ec3ca17a61a6c40067fa6d190fc6e | FMNSSun/Burlesque | main.hs | # LANGUAGE FlexibleContexts #
import Burlesque.Parser
import Burlesque.Types
import Burlesque.Eval
import Burlesque.Display
import System.Environment
import System.IO
import System.Console.Haskeline
import System.Console.Haskeline.Completion
import Data.List
import qualified Data.Map as M
loadPrelude :: IO String
l... | null | https://raw.githubusercontent.com/FMNSSun/Burlesque/1753bdf0186027f3920ab2bd95098f76afef3154/main.hs | haskell | # LANGUAGE FlexibleContexts #
import Burlesque.Parser
import Burlesque.Types
import Burlesque.Eval
import Burlesque.Display
import System.Environment
import System.IO
import System.Console.Haskeline
import System.Console.Haskeline.Completion
import Data.List
import qualified Data.Map as M
loadPrelude :: IO String
l... | |
f7af93da14bd1ebd85f6f38ead81da34a6cd1261da57ed55a80d2b843c999150 | dmjio/hackernews | Test.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Data.Aeson
import Data.Either (isRight)
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Test.Hspec (it, hspec, describe, shouldSatisfy... | null | https://raw.githubusercontent.com/dmjio/hackernews/ebf350317cf832fbfcff3c1a54f3a2b0df1f9510/ghc-tests/Test.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # | # OPTIONS_GHC -fno - warn - orphans #
module Main where
import Data.Aeson
import Data.Either (isRight)
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Test.Hspec (it, hspec, describe, shouldSatisfy, shouldBe)
import Test.QuickCheck
import Test.QuickCheck.Instances ()
impor... |
3412cced2c4f799f3dce257cc36e73f8f0e4d0956ff9e7cbf05fa22e6e890ad4 | walmartlabs/clojure-game-geek | server.clj | (ns my.clojure-game-geek.server
(:require [com.stuartsierra.component :as component]
[com.walmartlabs.lacinia.pedestal2 :as lp]
[io.pedestal.http :as http]))
(defrecord Server [schema-provider server port]
component/Lifecycle
(start [this]
(assoc this :server (-> schema-provider
... | null | https://raw.githubusercontent.com/walmartlabs/clojure-game-geek/62b5fcf7b15e348eb7cda878097b40f4934f0f91/src/my/clojure_game_geek/server.clj | clojure | (ns my.clojure-game-geek.server
(:require [com.stuartsierra.component :as component]
[com.walmartlabs.lacinia.pedestal2 :as lp]
[io.pedestal.http :as http]))
(defrecord Server [schema-provider server port]
component/Lifecycle
(start [this]
(assoc this :server (-> schema-provider
... | |
1a4cdc59a4a31b2ed0c024ec6d539c85282f51645b255d44c45cf8ce04d4ca33 | haskus/packages | JQuery.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Haskus.Web.JQuery
( jqueryHtmlHeader
)
where
import Haskus.Web.Html
import Data.Text
-- | Add jquery headers
jqueryHtmlHeader :: Bool -> Html ()
jqueryHtmlHeader minimized = do
let
addScript :: Text ->... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-web/src/lib/Haskus/Web/JQuery.hs | haskell | # LANGUAGE OverloadedStrings #
| Add jquery headers
TODO: add normal jquery
JQuery UI: some widgets
TODO: add normal script
TODO: minimized script
ability to detect that images are loaded
From: | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
module Haskus.Web.JQuery
( jqueryHtmlHeader
)
where
import Haskus.Web.Html
import Data.Text
jqueryHtmlHeader :: Bool -> Html ()
jqueryHtmlHeader minimized = do
let
addScript :: Text -> Text -> Html ()
addScript mini normal =
scr... |
8418927d451d563c6a7c81f53335264499acd8d6297dad35c27b58329b185f94 | haroldcarr/learn-haskell-coq-ml-etc | StrictX.hs | {-# LANGUAGE Strict #-}
# LANGUAGE StrictData #
# LANGUAGE TupleSections #
module Control.Monad.RWSIO.StrictX where
------------------------------------------------------------------------------
import Control.Monad.IO.Class
import Data.IORef
-- import Debug.Trace
----------------------... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/monads/2020-06-hc-reader-and-monad-write-state-io/src/Control/Monad/RWSIO/StrictX.hs | haskell | # LANGUAGE Strict #
----------------------------------------------------------------------------
import Debug.Trace
----------------------------------------------------------------------------
----------------------------------------------------------------------------
# INLINE (<*>) #
# INLINE (>>=) #
--------... | # LANGUAGE StrictData #
# LANGUAGE TupleSections #
module Control.Monad.RWSIO.StrictX where
import Control.Monad.IO.Class
import Data.IORef
# ANN module ( " HLint : ignore Reduce duplication " : : String ) #
type RWSRef r w s = (r, IORef (w, s))
newtype RWSTIO r w s a = RWSTIO { unRWSTIO :: ... |
be0d76cdc300b8824606d5bff493b2ccbb0354cdac893d1d3a5fff23e31dda84 | neovimhaskell/nvim-hs | Classes.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Neovim . Plugin . IPC.Classes
Description : Classes used for Inter Plugin Communication
Copyright : ( c )
License ... | null | https://raw.githubusercontent.com/neovimhaskell/nvim-hs/9d0a040c24f060da57e47e1b720b99ad32e6dfc7/src/Neovim/Plugin/IPC/Classes.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
| Try to convert a given message to a value of the message type we are
interested in. Will evaluate to 'Nothing' for any other type.
| Method name, parameters, callback, timestamp
| A request is a data type containing the method to call, its arguments a... | # LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE RecordWildCards #
|
Module : Neovim . Plugin . IPC.Classes
Description : Classes used for Inter Plugin Communication
Copyright : ( c )
License : Apache-2.0
Maintainer :
Stability : experimental... |
31e42ecf44abe903ba38f49e42c6f04e17b40d89860eec49098b7438fcaf5833 | wingo/fibers | sieve.scm | #!/usr/bin/env guile
# -*- scheme -*-
!#
(use-modules (ice-9 match)
(fibers)
(fibers channels))
(define (sieve p in)
(let ((out (make-channel)))
(spawn-fiber (lambda ()
(let lp ()
(let ((n (get-message in)))
(unless (zero? ... | null | https://raw.githubusercontent.com/wingo/fibers/44d17e64e581fb281bae1390f74c762ecf089b58/benchmarks/sieve.scm | scheme | #!/usr/bin/env guile
# -*- scheme -*-
!#
(use-modules (ice-9 match)
(fibers)
(fibers channels))
(define (sieve p in)
(let ((out (make-channel)))
(spawn-fiber (lambda ()
(let lp ()
(let ((n (get-message in)))
(unless (zero? ... | |
9e2f7ef79851fb48f4c07b76436477208091ab1beff0190f31fdfb0a5d4f3e59 | camfort/camfort | Analysis.hs | |
Module : Camfort . Specification . Units . Analysis
Description : Helpers for units refactoring and analysis .
Copyright : ( c ) 2017 , , , , : Apache-2.0
Maintainer :
Stability : experimental
Module : Camfort.Specification.Units.Analysis
Description : H... | null | https://raw.githubusercontent.com/camfort/camfort/861646ae5af61a41d1519049cfeda60ac82f3d98/src/Camfort/Specification/Units/Analysis.hs | haskell | # LANGUAGE OverloadedStrings #
** Helpers
for debugging
| Prepare to run an inference function.
mappings. Also obtain all unit alias definitions.
For function or subroutine parameters (or return variables) that
are not given explicit units, give them a parametric polymorphic
unit.
Any other variables get assig... | |
Module : Camfort . Specification . Units . Analysis
Description : Helpers for units refactoring and analysis .
Copyright : ( c ) 2017 , , , , : Apache-2.0
Maintainer :
Stability : experimental
Module : Camfort.Specification.Units.Analysis
Description : H... |
086512d84fbc7346756bd6f42fce79a09804751015cc39678ee8b8c015de2e33 | pirapira/coq2rust | assumptions.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/library/assumptions.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* A section variable or a Let defini... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open Ter... |
75d82ef2ea8cb0c867867ef90cdd4a07dff2aaa53d2ad466ce8b30f22ac8d2e1 | esl/erlang-web | e_mod_gen.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/eptic-1.4.1/src/e_mod_gen.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
3d3a1e1be2d068ef47a35c711af6ed77c4f9f820e55530d963ef970a5b88017a | kupl/FixML | sub27.ml |
type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let rec check : exp -> bool
= fun exp ->
match exp with
| V _ -> false
| C(_,_) -> false
| P(x, V y) -> if x = y then true else false
| P(x, P (y, z)) -> if x = y && check (P(x,z)) then true else false
| P(x, C (y,... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness/submissions/sub27.ml | ocaml |
type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let rec check : exp -> bool
= fun exp ->
match exp with
| V _ -> false
| C(_,_) -> false
| P(x, V y) -> if x = y then true else false
| P(x, P (y, z)) -> if x = y && check (P(x,z)) then true else false
| P(x, C (y,... | |
ce0b8c9ed399feb97280fc799ae252a49d49e3351bb92250bcd41baca4b92afd | kendroe/CoqRewriter | lib_coq.ml | The contrib name is used to locate errors when loading
let contrib_name = "advancedRewrite"
* Getting ( primitive Coq terms ) from existing Coq
libraries .
- [ find_reference ] is located in { v interp / coqlib.ml v } and return a global reference to the name " dir.s " ( it must be used lazily ) .
... | null | https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/lib_coq.ml | ocaml | * [decomp_term] returns a user view of a constr, as defined in {v
kernel/term.ml v}.
* ? *
* Lists from the standard library | The contrib name is used to locate errors when loading
let contrib_name = "advancedRewrite"
* Getting ( primitive Coq terms ) from existing Coq
libraries .
- [ find_reference ] is located in { v interp / coqlib.ml v } and return a global reference to the name " dir.s " ( it must be used lazily ) .
... |
7b091094945f9df6f355234628f4ba4d6fe128c09cb013eda9da8a668a58536e | jrh13/hol-light | preterm.ml | (* ========================================================================= *)
Preterms and pretypes ; typechecking ; translation to types and terms .
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/preterm.ml | ocaml | =========================================================================
=========================================================================
---------------... | Preterms and pretypes ; typechecking ; translation to types and terms .
, University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
( c ) ... |
67de76cc6abec9c6020032504cd3b2e4f1155dd4b510063b1053061e5e1835e4 | shayan-najd/NativeMetaprogramming | tcrun043.hs | # LANGUAGE GADTs , TypeFamilies , ConstraintKinds #
import GHC.Exts ( Constraint )
type Showish = Show
f :: (Showish a) => a -> String
f x = show x ++ show x
data T = T
data F = F
data GADT a where
Tish :: GADT T
Fish :: GADT F
type family Indexed a b :: Constraint
type instance Indexed T b = Show b
type... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_run/tcrun043.hs | haskell | We'll NOINLINE h so that we test the code generation for
constraint tuples | # LANGUAGE GADTs , TypeFamilies , ConstraintKinds #
import GHC.Exts ( Constraint )
type Showish = Show
f :: (Showish a) => a -> String
f x = show x ++ show x
data T = T
data F = F
data GADT a where
Tish :: GADT T
Fish :: GADT F
type family Indexed a b :: Constraint
type instance Indexed T b = Show b
type... |
87894e903a03c872fd08d581f23186b21a08464e8d425c814cbefd33c7c6893c | simonmar/parconc-examples | rsa2.hs | --
Derived from a program believed to be originally written by
Launchbury , and incorporating the RSA algorithm which is in the
-- public domain.
--
import System.Environment
import Control.Parallel.Strategies
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (Byt... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/rsa2.hs | haskell |
public domain.
<<encrypt
>>
---- Converting between Strings and Integers -----------
log_128 10 = 0.4745
----- Constructing keys -------------------------
----- Fast exponentiation, mod m ----------------- | Derived from a program believed to be originally written by
Launchbury , and incorporating the RSA algorithm which is in the
import System.Environment
import Control.Parallel.Strategies
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
import ByteStri... |
18f1cc9ef81c4247a51733072a5cd7ff8078df8f1a17ab52f01f326aa796fc9b | erlang/otp | megaco_messenger_misc.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/megaco/src/engine/megaco_messenger_misc.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2003 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(megaco_messenger_misc).
-export([encode_body/3,
encode_trans_request/2,
encode_trans_reply/2,
encode... |
aae6a20eda620c582aef93d710c424cf32bb8d9dd8c31577126021bc623432cc | danielmiladinov/joy-of-clojure | defining_control_structures.clj | ;; Defining Control Structures
;; ---------------------------------------------------------------------------------------------------------------------
Most control structures in Clojure are implemented via macros , so they provide a nice starting point for learning how
macros can be useful . can be built with or ... | null | https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter8/defining_control_structures.clj | clojure | Defining Control Structures
---------------------------------------------------------------------------------------------------------------------
higher-order functions such as we showed earlier. Although this fact in no way limits the ability to create control
over higher-order functions is that the former manipul... | Most control structures in Clojure are implemented via macros , so they provide a nice starting point for learning how
macros can be useful . can be built with or without using syntax - quote , so we 'll show examples of each .
In languages lacking macros , such as for example , the definition of control struct... |
1b510626e29d136aa136bc773e7da7aa309e2514663d006d3995c5a37ba145e6 | nikita-volkov/domain | Prelude.hs | module Domain.Prelude
(
module Exports,
showAsText,
)
where
-- base
-------------------------
import Control.Applicative as Exports hiding (WrappedArrow(..))
import Control.Arrow as Exports hiding (first, second)
import Control.Category as Exports
import Control.Concurrent as Exports
import Control.Exception as E... | null | https://raw.githubusercontent.com/nikita-volkov/domain/1f140a8981cc604c52ebd02f9f8f773345e766b8/library/Domain/Prelude.hs | haskell | base
-----------------------
text
-----------------------
bytestring
-----------------------
hashable
-----------------------
template-haskell
----------------------- | module Domain.Prelude
(
module Exports,
showAsText,
)
where
import Control.Applicative as Exports hiding (WrappedArrow(..))
import Control.Arrow as Exports hiding (first, second)
import Control.Category as Exports
import Control.Concurrent as Exports
import Control.Exception as Exports
import Control.Monad as Exp... |
cc56a28aa4ffc0e90cc65a389e424ea1f161445cdfedf62504515ece4b0efe75 | minoki/haskell-floating-point | MinMaxSpec.hs | module MinMaxSpec where
import Data.Coerce
import Data.Functor.Identity
import Data.Proxy
import Numeric.Floating.IEEE
import Numeric.Floating.IEEE.Internal
import Numeric.Floating.IEEE.NaN (RealFloatNaN(..))
import Test.Hspec
import Test.H... | null | https://raw.githubusercontent.com/minoki/haskell-floating-point/7d7bb31bb2b07c637a5eaeda92fc622566e9b141/fp-ieee/test/MinMaxSpec.hs | haskell | module MinMaxSpec where
import Data.Coerce
import Data.Functor.Identity
import Data.Proxy
import Numeric.Floating.IEEE
import Numeric.Floating.IEEE.Internal
import Numeric.Floating.IEEE.NaN (RealFloatNaN(..))
import Test.Hspec
import Test.H... | |
c586566ae656454a2c3be8442c2c1d905167b1588a65a9a5ebdb9008d9709dee | well-typed/generics-sop | Instances.hs | # LANGUAGE EmptyCase #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -freduction - depth=100 #
# OPTIONS_GHC -fno - warn - deprecations #
| Instances for ' Generic ' and ' HasMetadata ' .
--
We define instances for datatypes from @generics - sop@ and
-- @base@ that are supported.
... | null | https://raw.githubusercontent.com/well-typed/generics-sop/58d7f2eab3a4f603fee50db27b2ad2f224881c9f/generics-sop/src/Generics/SOP/Instances.hs | haskell |
@base@ that are supported.
(There are only instances defined in this module, so the
documentation is empty.)
new
new
new
new
new
new
new
new
new
new
new
new
platform - specific , omitted
new
new
new
new
new
new
new
new
new
new
new
new
new
Types from Generics.SOP:
new
Cannot derive in... | # LANGUAGE EmptyCase #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -freduction - depth=100 #
# OPTIONS_GHC -fno - warn - deprecations #
| Instances for ' Generic ' and ' HasMetadata ' .
We define instances for datatypes from @generics - sop@ and
module Generics.SOP.Instances () ... |
38dd4a2749e81ca47814c36c347e010c62dfa0813074ea9b6add8f44a0082db3 | unnohideyuki/bunny | sample275.hs | pseq :: a -> b -> b
pseq x y = y
main = putStrLn (undefined `pseq` "abcd")
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample275.hs | haskell | pseq :: a -> b -> b
pseq x y = y
main = putStrLn (undefined `pseq` "abcd")
| |
650e3377eb2194458970642ddc6df8139c093fc5e3d499314d4267dc8d34dc95 | finnishtransportagency/harja | laadunseuranta.cljs | (ns harja.tiedot.urakka.laadunseuranta
"Tämä nimiavaruus hallinnoi laadunseurantaa sekä laatupoikkeamia ja tarkastuksia"
(:require [reagent.core :refer [atom]]
[harja.loki :refer [log logt tarkkaile!]]
[cljs.core.async :refer [<!]]
[harja.loki :refer [log]]
[harja.tie... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljs/harja/tiedot/urakka/laadunseuranta.cljs | clojure | (ns harja.tiedot.urakka.laadunseuranta
"Tämä nimiavaruus hallinnoi laadunseurantaa sekä laatupoikkeamia ja tarkastuksia"
(:require [reagent.core :refer [atom]]
[harja.loki :refer [log logt tarkkaile!]]
[cljs.core.async :refer [<!]]
[harja.loki :refer [log]]
[harja.tie... | |
78223a511ae5e5aed4ca74a48babbc1b3eb4a1659f3ff2e6c64b5cc7838a7227 | ocsigen/lwt | lwt_condition.mli | OCaml promise library
*
* Copyright ( c ) 2009 , Metaweb Technologies , Inc.
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* * Redistributions of source code mus... | null | https://raw.githubusercontent.com/ocsigen/lwt/9943ba77a5508feaea5e1fb60b011db4179f9c61/src/core/lwt_condition.mli | ocaml | * Conditions
* Condition variables to synchronize between threads.
* Condition variable type. The type parameter denotes the type of
value propagated from notifier to waiter.
* [create ()] creates a new condition variable.
* [wait mutex condvar] will cause the current thread to block,
awaiting notif... | OCaml promise library
*
* Copyright ( c ) 2009 , Metaweb Technologies , Inc.
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* * Redistributions of source code mus... |
7196d8fc8f77c63aa0a11020b069f4f3182629a1f7c90b131c752ef35d16de6f | raehik/binrep | Tar.hs | module Binrep.Example.Tar where
import Binrep
import Binrep.Generic
import Binrep.Type.NullPadded
import Binrep.Type.AsciiNat
import GHC.Generics ( Generic )
import Data.Word ( Word8 )
import GHC.TypeNats
import Data.ByteString qualified as B
import FlatParse.Basic qualified as FP
type BS = B.ByteString
-- | Th... | null | https://raw.githubusercontent.com/raehik/binrep/d7b7b0c7c3e0bebbba49701db530b98ac0b154c5/src/Binrep/Example/Tar.hs | haskell | | The naturals in tars are sized octal ASCII digit strings that end with a
null byte (and may start with leading ASCII zeroes). The size includes the
terminating null, so you get @n-1@ digits. What a farce.
Don't use this constructor directly! The size must be checked to ensure it
fits.
Partial header | module Binrep.Example.Tar where
import Binrep
import Binrep.Generic
import Binrep.Type.NullPadded
import Binrep.Type.AsciiNat
import GHC.Generics ( Generic )
import Data.Word ( Word8 )
import GHC.TypeNats
import Data.ByteString qualified as B
import FlatParse.Basic qualified as FP
type BS = B.ByteString
newtype... |
05f5d93974b5ad64e9a3d6939b4e95c1b934ca628794f718d3e7be4bda63eb79 | GaloisInc/LIMA | OM1.hs | -- |
-- Module : OM1
Copyright : 2016
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
A specification for the distributed , fault tolerant system ) written
using
--
module OM1
( om1
)
where
import Control.Monad (forM, forM_)
import Data.... | null | https://raw.githubusercontent.com/GaloisInc/LIMA/8006bb52b2fb5d3264fe55ef8c9b7c89ab7f4630/case-studies/OM1/OM1.hs | haskell | |
Module : OM1
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
Parameters ----------------------------------------------------------
----------------------------------------------------------
| Top level rule
setup channels for communication between source, relay... | Copyright : 2016
A specification for the distributed , fault tolerant system ) written
using
module OM1
( om1
)
where
import Control.Monad (forM, forM_)
import Data.Int
import Language.LIMA
import Language.LIMA.C (printProbe)
import Language.Sally
numRelays = 3
numRecvs = 3
relaySet = [0..nu... |
d1eb404bd4feaa4b6f75a2b4bf857871406a962808dc9e8e76b53d34633bafcf | MaxOw/computational-geometry | General.hs | # Language MultiParamTypeClasses #
{-# Language FlexibleInstances #-}
{-# Language FlexibleContexts #-}
--------------------------------------------------------------------------------
-- |
-- Module : Geometry.Plane.General
Copyright : ( C ) 2017
-- License : BSD-style (see LICENSE)
Maintainer :
--
-- ... | null | https://raw.githubusercontent.com/MaxOw/computational-geometry/20c93aa05b151b115250a18d1203fdf9a01f705e/src/Geometry/Plane/General.hs | haskell | # Language FlexibleInstances #
# Language FlexibleContexts #
------------------------------------------------------------------------------
|
Module : Geometry.Plane.General
License : BSD-style (see LICENSE)
General representation of a plane. Plane in the General Form is Hession
---------------------------... | # Language MultiParamTypeClasses #
Copyright : ( C ) 2017
Maintainer :
Normal Form scaled by an arbitrary non - zero scalar .
module Geometry.Plane.General
( Plane (..)
, Plane2, Plane3
, Plane2D, Plane3D
, MakePlane (..)
, unsafeMakePlane
, flipPlane
, collinear
, coincidence... |
f531efab438af02152d06c703140614c4a1687e5fbc3d4f8550c728fc98a15cf | akvo/resumed | resumed.clj | 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 /
(ns org.akvo.resumed
(:require [clojure.core.cache :as cache]
[clojure.java.io :as io]
[clojure.string :as str])
(:i... | null | https://raw.githubusercontent.com/akvo/resumed/266acfa5bb52c9b484af19f0bcfbfacb60b97319/src/org/akvo/resumed.clj | clojure | file, You can obtain one at / | 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
(ns org.akvo.resumed
(:require [clojure.core.cache :as cache]
[clojure.java.io :as io]
[clojure.string :as str])
(:import [java.io File FileOutputStr... |
70c2346a577bf1e693e29820dd658b068dda4d26b50e97a8419fd25b7e983e37 | jahfer/clj-activitypub | net.clj | (ns clj-activitypub.net
(:require [clj-activitypub.internal.thread-cache :as tc]
[clj-activitypub.internal.crypto :as crypto]
[clj-activitypub.internal.http-util :as http]
[clj-http.client :as client]
[clojure.set :refer [union]]
[clojure.string :as str]
... | null | https://raw.githubusercontent.com/jahfer/clj-activitypub/fec096c7c5fd99aba56084651baf0706887d9c1e/activitypub-core/src/clj_activitypub/net.clj | clojure | (def coll [:a :b (delay [:c :d])]) | (ns clj-activitypub.net
(:require [clj-activitypub.internal.thread-cache :as tc]
[clj-activitypub.internal.crypto :as crypto]
[clj-activitypub.internal.http-util :as http]
[clj-http.client :as client]
[clojure.set :refer [union]]
[clojure.string :as str]
... |
60e3507d5ee5dd9c409fa89152e04dd01653ae5f7c60aa257e094feb2a48df39 | discus-lang/ddc | Prim.hs | {-# OPTIONS_HADDOCK hide #-}
module DDC.Core.Check.Judge.Type.Prim
( checkPrim
, shapeOfPrim)
where
import DDC.Core.Check.Judge.Type.Base
import qualified DDC.Type.Sum as Sum
checkPrim :: Checker a n
checkPrim !_table !ctx !_mode !_demand (XPrim a p)
= do
returnX a
(... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Check/Judge/Type/Prim.hs | haskell | # OPTIONS_HADDOCK hide # | module DDC.Core.Check.Judge.Type.Prim
( checkPrim
, shapeOfPrim)
where
import DDC.Core.Check.Judge.Type.Base
import qualified DDC.Type.Sum as Sum
checkPrim :: Checker a n
checkPrim !_table !ctx !_mode !_demand (XPrim a p)
= do
returnX a
(\z -> XPrim z p)
... |
8cec51538e9ee979b35690416d570f82178b4303cbdfe04f710a31ac9ea0da44 | ds-wizard/engine-backend | DocumentTemplateDraftDataDAO.hs | module Wizard.Database.DAO.DocumentTemplate.DocumentTemplateDraftDataDAO where
import Control.Monad.Reader (asks)
import Data.String (fromString)
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simple.ToRow
import GHC.Int
import Wizard.Database.DAO.Common
import ... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Database/DAO/DocumentTemplate/DocumentTemplateDraftDataDAO.hs | haskell | module Wizard.Database.DAO.DocumentTemplate.DocumentTemplateDraftDataDAO where
import Control.Monad.Reader (asks)
import Data.String (fromString)
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simple.ToRow
import GHC.Int
import Wizard.Database.DAO.Common
import ... | |
8095807a417486a5413eeb015ce9dc8fcbe340a42f1eb294e22248d1aa91d7c6 | rurban/clisp | clos-method1.lisp | Common Lisp Object System for CLISP : Methods
21.8.1993 - 2004
1998 - 2004 , 2007 , 2010 , 2017
German comments translated into English : 2002 - 04 - 08
(in-package "CLOS")
;;; ---------------------------------------------------------------------------
(defparameter <method>
(defclass method (standa... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/clos-method1.lisp | lisp | ---------------------------------------------------------------------------
== (call-next-method)
Bootstrapping: Simulate the effect of #'%initialize-instance.
Fill the slots.
Fill the backpointer. This is needed for NO-NEXT-METHOD to work: When
CALL-NEXT-METHOD is called from within the method function without a... | Common Lisp Object System for CLISP : Methods
21.8.1993 - 2004
1998 - 2004 , 2007 , 2010 , 2017
German comments translated into English : 2002 - 04 - 08
(in-package "CLOS")
(defparameter <method>
(defclass method (standard-stablehash metaobject)
flag , if this method comes from a
:type boo... |
b5c436fc68c4e2c96a515c14dcaab00d4a9b0ab67110b3206e805df2771e0a2e | verement/etamoo | Network.hs |
{-# LANGUAGE OverloadedStrings #-}
module MOO.Network (
Point(..)
, Listener(..)
, HostName
, PortNumber
, value2point
, point2value
, createListener
, listen
, unlisten
, shutdownListeners
) where
import Control.Applicative ((<$>))
import Control.Concurrent.STM (STM, TVar, atomically, modify... | null | https://raw.githubusercontent.com/verement/etamoo/af65e2581ab5d093c9490f43692ef89bafc2efc1/src/MOO/Network.hs | haskell | # LANGUAGE OverloadedStrings #
# SOURCE # |
module MOO.Network (
Point(..)
, Listener(..)
, HostName
, PortNumber
, value2point
, point2value
, createListener
, listen
, unlisten
, shutdownListeners
) where
import Control.Applicative ((<$>))
import Control.Concurrent.STM (STM, TVar, atomically, modifyTVar, readTVarIO,
... |
cb3d573c98efc4727fd3222553f5ebc80fe2b3a049cca35541298a2e03427612 | rd--/hsc3 | decay.help.hs | -- decay ; as envelope
let n = pinkNoiseId 'α' ar + sinOsc ar 11000 0
s = impulse ar (xLine kr 1 50 20 RemoveSynth) 0.25
in decay s 0.05 * n
---- ; drawings
Sound.Sc3.Plot.plot_ugen1 0.05 (decay (impulse ar 1 0) 0.01)
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/decay.help.hs | haskell | decay ; as envelope
-- ; drawings | let n = pinkNoiseId 'α' ar + sinOsc ar 11000 0
s = impulse ar (xLine kr 1 50 20 RemoveSynth) 0.25
in decay s 0.05 * n
Sound.Sc3.Plot.plot_ugen1 0.05 (decay (impulse ar 1 0) 0.01)
|
d23ed5db902b3691a8c8ec76b3085c604d3bedaa5878a181963d7d6f4e9f8d62 | alesaccoia/festival_flinger | cmu_us_clb_lexicon.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_clb_cg/festvox/cmu_us_clb_lexicon.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | CMU lexicon for US English
(require 'postlex)
(setup_cmu_lex)
(define (cmu_us_clb::select_lexicon)
"(cmu_us_clb::select_lexicon)
Set up the CMU lexicon for US English."
(lex.select "cmu")
Post lexical rules
(set! postlex_rules_hooks (list postlex_apos_s_check))
)
(define (cmu_us_clb::reset_lexicon)
"(cm... |
ba06dc783f65cf0266f4a7dbf7d243b50deec605904c2f800823a2db27f8929a | utkarshkukreti/reaml | 3.ml | let[@reaml.component "Foo"] _foo () =
if true
then (
let[@reaml] _count, _setCount = Reaml.useState () in
())
else ()
| null | https://raw.githubusercontent.com/utkarshkukreti/reaml/5640a36293ba2a765171225deddb644f4d6c5d26/ppx/tests/failing/3.ml | ocaml | let[@reaml.component "Foo"] _foo () =
if true
then (
let[@reaml] _count, _setCount = Reaml.useState () in
())
else ()
| |
cd23ac5641b8e8cf686b64e23ff8b485d3c529142222c4d90c361edf2d559c64 | esl/MongooseIM | mongoose_graphql_token_admin_mutation.erl | -module(mongoose_graphql_token_admin_mutation).
-behaviour(mongoose_graphql).
-export([execute/4]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-import(mongoose_graphql_helper, [make_error/2]).
-type token_info() :: map().
execute(_Ctx, token, <<"requestToken">>, #{<<"user">> := J... | null | https://raw.githubusercontent.com/esl/MongooseIM/d5abdd699fbdd81f89d87341745b112e87a80b1e/src/graphql/admin/mongoose_graphql_token_admin_mutation.erl | erlang | -module(mongoose_graphql_token_admin_mutation).
-behaviour(mongoose_graphql).
-export([execute/4]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-import(mongoose_graphql_helper, [make_error/2]).
-type token_info() :: map().
execute(_Ctx, token, <<"requestToken">>, #{<<"user">> := J... | |
6fe496ad5025e8cd0920973e5ec22a1a357ae045a202e4e7331997487de70f3b | zkat/chanl | futures.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;;
;;;; ChanL example implementation of doing concurrency using futures instead of channels.
;;;;
Copyright © 2009 ,
;;;;
;;;; This file is derived from 'Eager Future'; see the file COPYRIGHT, in the top directory,
;;;; for the license information for that project.... | null | https://raw.githubusercontent.com/zkat/chanl/3a0ad5b9ae31b3874ac91c541fd997123c2e03db/examples/futures.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
ChanL example implementation of doing concurrency using futures instead of channels.
This file is derived from 'Eager Future'; see the file COPYRIGHT, in the top directory,
for the license information for that project.
It demonstrates the value of channels as concurre... | Copyright © 2009 ,
(in-package :chanl.examples)
This example is similar to Eager Future 's API .
(defstruct (future (:print-object (lambda (f s) (print-unreadable-object (f s :type t :identity t)))))
(channel (make-instance 'buffered-channel :size 1) :read-only t))
(define-condition execution-error (error)... |
3523e8161c98760184970c4299fa57d285aef1aa31098283eb70cf6b5a81f6de | antono/guix-debian | mit-krb5.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of t... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/mit-krb5.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages mit-krb5)
#:use-module (gnu packages)
#:use-module (gnu packages bison)
... |
9561af7a30fb81c764f40720510300145c21836d64af94a7f16ec82226ed9c9a | sras/servant-examples | GeneralAuthentication.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
module GeneralAuthentication where
import Servant ( PlainText
, AuthProtect
, Get
, Context((:.), ... | null | https://raw.githubusercontent.com/sras/servant-examples/923b54a13e14a4c2a37a3633dc7e2fa8fe49adc6/src/GeneralAuthentication.hs | haskell | # LANGUAGE OverloadedStrings #
Syntax for importing type operator
Actual authenticating function | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
module GeneralAuthentication where
import Servant ( PlainText
, AuthProtect
, Get
, Context((:.), EmptyContext)
, Prox... |
57939158ce52241bbfe6b3cbcef75fe0181b92775966b7c14bcedf52b801283f | simonmar/parconc-examples | ByteStringCompat.hs | # LANGUAGE CPP #
module ByteStringCompat () where
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
import Control.DeepSeq
#if !MIN_VERSION_bytestring(0,10,0)
instance NFData ByteString where
rnf x = B.length x `seq` ()
#endif
| null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/ByteStringCompat.hs | haskell | # LANGUAGE CPP #
module ByteStringCompat () where
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
import Control.DeepSeq
#if !MIN_VERSION_bytestring(0,10,0)
instance NFData ByteString where
rnf x = B.length x `seq` ()
#endif
| |
17098c80f5ab35eb980eafb1aa464b8944ac2e665f6b16309d46923016d947f1 | brendanhay/amazonka | ListUsers.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-transfer/gen/Amazonka/Transfer/ListUsers.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Lists the users for a file transfer protocol-enabled server that you
This operation returns paginated results.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
request.
@NextToken@ param... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
8d9b53ca5f56b9e5d9f44e6f13de608a9c7d74569f191f7d20d193eb26536e43 | ftovagliari/ocamleditor | prepare_build.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 of the License , or
( at y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/a6d1e69b14dfd4466ac842a3ed97d1423a3883e6/tools/prepare_build.ml | ocaml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 of the License , or
( at y... | |
e109a407e34af6a5cc8548036d07bf5113bab2d3e865ed27743a5e0e0e52da1b | mmottl/gsl-ocaml | stats.ml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
let () = Error.init ()
external mean : ?w:float array -> float array -> float
= "ml_gsl_stats_mean"
external variance : ?w:flo... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/stats.ml | ocaml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
let () = Error.init ()
external mean : ?w:float array -> float array -> float
= "ml_gsl_stats_mean"
external variance : ?w:flo... | |
51defcdc3f6f607095695bd94268a3aa81e7139c1c62a0de8be52da5caad22ef | softwarelanguageslab/maf | R5RS_gabriel_triangl-4.scm | ; Changes:
* removed : 0
* added : 2
* swaps : 0
; * negated predicates: 0
* swapped branches : 1
* calls to i d fun : 2
(letrec ((*board* (vector 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1))
(*sequence* (vector 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(*a* (vector 1 2 4 3 5 6 1 3 6 2 5 4 11 12 13 7 8 4 4 7 11 8 ... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gabriel_triangl-4.scm | scheme | Changes:
* negated predicates: 0 | * removed : 0
* added : 2
* swaps : 0
* swapped branches : 1
* calls to i d fun : 2
(letrec ((*board* (vector 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1))
(*sequence* (vector 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(*a* (vector 1 2 4 3 5 6 1 3 6 2 5 4 11 12 13 7 8 4 4 7 11 8 12 13 6 10 15 9 14 13 13 14 15 9 10 6... |
078ba93e9c28fcab86eab55dbbed26130cade18aefedd5d8efcb8d58e4d79bad | chaoxu/fancy-walks | B.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteStri... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Practice%20Contests/Practice%20Contest/B.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
im... |
b8bb2382faa5cc82360cb96784dbd3bafbcd750ccbba4b8ffdee43fe4b06546d | nuvla/api-server | credential_infrastructure_service_openstack.clj | (ns sixsq.nuvla.server.resources.credential-infrastructure-service-openstack
"
Provides `docker-machine` credentials for OpenStack. The attribute names
correspond exactly to those required by `docker-machine`.
"
(:require
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.creden... | null | https://raw.githubusercontent.com/nuvla/api-server/b45a97801f7225e3a5b8cd0c31bb971b42b2c90e/code/src/sixsq/nuvla/server/resources/credential_infrastructure_service_openstack.clj | clojure |
convert template to credential
multimethods for validation
initialization
| (ns sixsq.nuvla.server.resources.credential-infrastructure-service-openstack
"
Provides `docker-machine` credentials for OpenStack. The attribute names
correspond exactly to those required by `docker-machine`.
"
(:require
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.creden... |
367cf798ec42fc10db706c7de939cb7f7467aca3cf35a2d05ce063728ae6a693 | elaforge/karya | Integrate.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Cmd - level support for integration . These cmds interpret the output of
the calls in " Derive . Call . Integrate " to create score from deriver output
and merge it back... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Cmd/Integrate.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Derive integrate takes the result of a derivation and merges it into
blocks or tracks which are marked as integrate destinations. A special
derive call captures events and saves them in 'Cmd.perf_integrate... | Copyright 2013
| Cmd - level support for integration . These cmds interpret the output of
the calls in " Derive . Call . Integrate " to create score from deriver output
and merge it back into the current score .
An example of track integration :
- Add \ " | < \ " to a note track title... |
5372f3e1066df06f7b365a2d64fd8e084a019fe2447773d838783e5b8d3d3d37 | MLstate/opalang | ocamlWalk.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/ocamllang/ocamlWalk.ml | ocaml | depends
refactoring in progress
shorthands
alias
-- |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
4ff431ea9d5f1dda4316f82679107b65bec58236fbc4cee1027b56955a4c260f | well-typed-lightbulbs/ocaml-esp32 | tprintf.ml | (* TEST
include testing
*)
A test file for the Printf module .
A test file for the Printf module.
*)
open Testing;;
open Printf;;
try
printf "d/i positive\n%!";
test (sprintf "%d/%i" 42 43 = "42/43");
test (sprintf "%-4d/%-5i" 42 43 = "42 /43 ");
test (sprintf "%04d/%05i" 42 43 = "0042/00043")... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-printf/tprintf.ml | ocaml | TEST
include testing
>> '#' is incompatible with 'd'
>> '0' is incompatible with '-', '#' is incompatible with 'd'
>> '+' is incompatible with 'u'
>> ' ' is incompatible with 'u'
>> '+' is incompatible with 'x'
>> ' ' is incompatible with 'x'
>> '+' is incompatible with 'X'
>> ' ' is incompatible wi... |
A test file for the Printf module .
A test file for the Printf module.
*)
open Testing;;
open Printf;;
try
printf "d/i positive\n%!";
test (sprintf "%d/%i" 42 43 = "42/43");
test (sprintf "%-4d/%-5i" 42 43 = "42 /43 ");
test (sprintf "%04d/%05i" 42 43 = "0042/00043");
test (sprintf "%+d/%+i" 42... |
122ecfd6ae2afcb83c799e7ff0e6189162db01831e55405b808d99871077fee0 | LexiFi/menhir | invariant.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/invariant.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
aae36b06d1e2d7eb8a044056f02de3cbca24e614fba3ba6d63f85239bcd3b70e | q60/dotfiles | xmonad.hs | import XMonad
import XMonad.Util.EZConfig
import XMonad.Util.Ungrab
import XMonad.Hooks.StatusBar
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.EwmhDesktops
main :: IO ()
main = xmonad
. withEasySB (statusBarProp "xmobar" $ pure def) defToggleStrutsKey
. ewmh
$ xmonadConfig
xmonadConfig = de... | null | https://raw.githubusercontent.com/q60/dotfiles/b79f2578faf9e8efb77f3017ca491d1e74fd27da/config/xmonad/xmonad.hs | haskell | import XMonad
import XMonad.Util.EZConfig
import XMonad.Util.Ungrab
import XMonad.Hooks.StatusBar
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.EwmhDesktops
main :: IO ()
main = xmonad
. withEasySB (statusBarProp "xmobar" $ pure def) defToggleStrutsKey
. ewmh
$ xmonadConfig
xmonadConfig = de... | |
0c8e52f7e27a9bde555b9d706f0b0c864ac0960869713518666baa319af38a51 | spurious/sagittarius-scheme-mirror | events.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; text/xml/dom/events.scm - DOM events
;;;
Copyright ( c ) 2018 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redist... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/text/xml/dom/events.scm | scheme | coding : utf-8 ; -*-
text/xml/dom/events.scm - DOM events
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of ... | Copyright ( c ) 2018 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (text xml dom events)
(export (rename... |
d0be96f744b2005de7c945522eb930cec8717e47e0fc8b2ff24d9d3c91b312f6 | FestCat/festival-ca | nitech_us_slt_arctic_other.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/FestCat/festival-ca/f6b2d9bf4fc4f77b80890ebb95770075ad36ccaf/src/data/festvox.orig/nitech_us_slt_arctic_other.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
(define (nitech_us_slt_arctic::select_other)
"(nitech_us_slt_arctic::select_other)
Set up the anything esle for the voice."
)
(define (nitech_us_slt_arctic::reset_other)
"(nitech_us_slt_arctic::reset_other)
Reset other information."
t
)
(provide 'nitech_us_slt_arctic_other)
|
18ffd38d88ecb7314d317a6287be5afc8820f38ea50ef1ae7d56a3b3ea828bef | 2600hz/kazoo | kz_services_asr.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
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 /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_services/src/modules/kz_services_asr.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
------------------------------------------------------------... | ( C ) 2012 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kz_services_asr).
-export([fetch/1
,flat_rate/1, flat_rate/2
]).
-include("services.hrl"... |
a58351d1042a83c2c2dcdaccedfefe22e27c31bec4d4549cd5ca3e836b71d9c2 | honest-technology/api.unverified.email | Mailbox.hs | # LANGUAGE QuasiQuotes #
module Model.Mailbox where
import Data.Aeson
import Data.Text
import Data.Time
import Data.String.Interpolate (i)
import Data.Time.ISO8601 (formatISO8601Millis)
newtype EmailAddress = EmailAddress Text deriving ToJSON
newtype Url = Url Text deriving ToJSON
data Mailbox = Mailbox {
mailboxI... | null | https://raw.githubusercontent.com/honest-technology/api.unverified.email/75234625974d8054f28a5c05cc313c927ffae8d5/src/Model/Mailbox.hs | haskell | # LANGUAGE QuasiQuotes #
module Model.Mailbox where
import Data.Aeson
import Data.Text
import Data.Time
import Data.String.Interpolate (i)
import Data.Time.ISO8601 (formatISO8601Millis)
newtype EmailAddress = EmailAddress Text deriving ToJSON
newtype Url = Url Text deriving ToJSON
data Mailbox = Mailbox {
mailboxI... | |
5c0c37a7d90a6b4465d115f433ab853239a156b89016ea940704c65a22aac4ce | david-vanderson/warp | plasma.rkt | #lang racket/base
(require mode-lambda
mode-lambda/static)
(require "defs.rkt"
"utils.rkt"
"draw-utils.rkt")
(provide (all-defined-out))
(define PLASMA_LIFE 3000) ; ms after which plasma starts fading
energy loss per second after PLASMA_LIFE
(define (plasma-setup-pre! sd)
(add-spri... | null | https://raw.githubusercontent.com/david-vanderson/warp/cdc1d0bd942780fb5360dc6a34a2a06cf9518408/plasma.rkt | racket | ms after which plasma starts fading | #lang racket/base
(require mode-lambda
mode-lambda/static)
(require "defs.rkt"
"utils.rkt"
"draw-utils.rkt")
(provide (all-defined-out))
energy loss per second after PLASMA_LIFE
(define (plasma-setup-pre! sd)
(add-sprite!/file sd 'plasma (build-path IMAGEDIR "plasma.png")))
(define... |
7faa70b551d12de728dd027455e0fd9b081b4eabf246ac4de73be381883c6fad | jacekschae/learn-reitit-course-files | user.clj | (ns user
(:require [integrant.repl :as ig-repl]
[integrant.core :as ig]
[integrant.repl.state :as state]
[cheffy.server]))
(ig-repl/set-prep!
(fn [] (-> "resources/config.edn" slurp ig/read-string)))
(def go ig-repl/go)
(def halt ig-repl/halt)
(def reset ig-repl/reset)
(def res... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/16-list-all-recipes/dev/src/user.clj | clojure | (ns user
(:require [integrant.repl :as ig-repl]
[integrant.core :as ig]
[integrant.repl.state :as state]
[cheffy.server]))
(ig-repl/set-prep!
(fn [] (-> "resources/config.edn" slurp ig/read-string)))
(def go ig-repl/go)
(def halt ig-repl/halt)
(def reset ig-repl/reset)
(def res... | |
461e3ac1f0354b2895e1528a773a1991a0729c9de2326295fd539587f9d0af7b | ragkousism/Guix-on-Hurd | system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/system.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (test-system)
#:use-module (gnu)
#:use-module (guix store)
#:use-module (srfi srfi-1)
#:use... |
9f9f24ec1f6a65af2751f6349569bef7e3d180b10fb826b4d58eaaedcf801c94 | lisp/de.setf.utility | package.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
(in-package :de.setf.utility.implementation)
This file is the system definition for the ETF codec module for the ' de.setf.utility ' Common Lisp library .
;;;
Copyright 2010 [ ) All Rights Reserved
`... | null | https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/codecs/etf/package.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
`de.setf.utility` is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the the GNU Lesser General Public ... |
(in-package :de.setf.utility.implementation)
This file is the system definition for the ETF codec module for the ' de.setf.utility ' Common Lisp library .
Copyright 2010 [ ) All Rights Reserved
` de.setf.utility ` is free software : you can redistribute it and/or modify it under the terms of version 3
of th... |
cd0f8fe75d0b6025e6bb65936896e5f491417a5adb51edff3c651082fd40b3cb | Kakadu/fp2022 | ast_utils.mli | * Copyright 2021 - 2022 , Kakadu , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
val show_typ : Ast.typ -> string
val eq_typ : Ast.typ -> Ast.typ -> bool
| null | https://raw.githubusercontent.com/Kakadu/fp2022/853ab6831fdce3b3e1b68d49e5163d0293d56bf5/Golang/lib/ast_utils.mli | ocaml | * Copyright 2021 - 2022 , Kakadu , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
val show_typ : Ast.typ -> string
val eq_typ : Ast.typ -> Ast.typ -> bool
| |
022278278db126f98ca53c606f406c3ccac9701e77361d13dad2857beb69f97f | auser/beehive | beehive_storage_srv.erl | %%%-------------------------------------------------------------------
%%% File : bh_storage_srv.erl
Author :
%%% Description :
%%%
Created : Thu Dec 3 10:38:18 PST 2009
%%%-------------------------------------------------------------------
-module (beehive_storage_srv).
-include ("beehive.hrl").
-inclu... | null | https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/src/beehive/beehive_storage_srv.erl | erlang | -------------------------------------------------------------------
File : bh_storage_srv.erl
Description :
-------------------------------------------------------------------
API
====================================================================
API
===========================================================... | Author :
Created : Thu Dec 3 10:38:18 PST 2009
-module (beehive_storage_srv).
-include ("beehive.hrl").
-include ("common.hrl").
-include_lib("kernel/include/file.hrl").
-behaviour(gen_cluster).
-export([
start_link/0,
fetch_or_build_bee/2,
build_bee/1, build_bee/2,
seed_nodes/1, has_bee_named/1
... |
52734f27496c4d2fcbd98b8ea981025e9f81b225f02dde63f2cfbb7c20dd8de7 | ktakashi/sagittarius-scheme | algorithms.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; sagittarius/crypto/pkcs/algorithms.scm - PKCS algorithms
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;;... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/80d73e019394331afbb6c7b6bf6a6efc0af8ed6e/ext/crypto/sagittarius/crypto/pkcs/algorithms.scm | scheme | coding : utf-8 ; -*-
sagittarius/crypto/pkcs/algorithms.scm - PKCS algorithms
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, t... | Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (sagittarius crypto pkcs algor... |
6180af5c685d85a2166744b3399095dad486e6bb593b3db7dae76b84d0d69992 | RisingFisan/Programacao-Funcional | Teste1718.hs | import Data.List (sort)
import System.Random
Exercicio 1
insert :: Ord a => a -> [a] -> [a]
insert x l | null l = [x]
| x > h = h:insert x t
| otherwise = x:h:t
where (h:t) = l
Exercicio 2
catMaybes :: [Maybe a] -> [a]
catMaybes [] = []
catMaybes (h:t) = case h of Just x -> x:catMaybe... | null | https://raw.githubusercontent.com/RisingFisan/Programacao-Funcional/fb52a6f256a60e129d8a46e2aa0b36d86117155a/Testes/Teste1718.hs | haskell | import Data.List (sort)
import System.Random
Exercicio 1
insert :: Ord a => a -> [a] -> [a]
insert x l | null l = [x]
| x > h = h:insert x t
| otherwise = x:h:t
where (h:t) = l
Exercicio 2
catMaybes :: [Maybe a] -> [a]
catMaybes [] = []
catMaybes (h:t) = case h of Just x -> x:catMaybe... | |
3e1e1e9535c4409efdeb4377971a78187dd9d35a93fe721e53e8930a8f227121 | fission-codes/fission | Validation.hs | -- | Raw validation
module Fission.URL.Validation
( isValid
, isURLChar
) where
import qualified Data.Char as Char
import qualified RIO.Text as Text
import Fission.Prelude
import qualified Fission.Security as Security
-- | Confirm that a raw is valid
isValid :: Text -> Bool
isValid tx... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/URL/Validation.hs | haskell | | Raw validation
| Confirm that a raw is valid | module Fission.URL.Validation
( isValid
, isURLChar
) where
import qualified Data.Char as Char
import qualified RIO.Text as Text
import Fission.Prelude
import qualified Fission.Security as Security
isValid :: Text -> Bool
isValid txt =
all (== True) preds
where
preds :: [Bool]... |
3acd333e232f8d10bd2848610de77b7654138c78a7a18c895ffd03702232684c | lambdamikel/Common-Lisp-Persistency-Manager | persistence-package.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
(in-package :CL-USER)
;;;
;;; Define Packages
;;;
(defpackage persistence
(:use common-lisp)
(:shadow #:defclass #:defstruct)
(:export
#:defpersistentclass
#:defpersistentstruct
#:initialize-loaded-persistent-ob... | null | https://raw.githubusercontent.com/lambdamikel/Common-Lisp-Persistency-Manager/f6a76c8e7ff3375e58f97bc586026125155f154a/src/persistence-package.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
Define Packages
|
(in-package :CL-USER)
(defpackage persistence
(:use common-lisp)
(:shadow #:defclass #:defstruct)
(:export
#:defpersistentclass
#:defpersistentstruct
#:initialize-loaded-persistent-object
#:make-object-persistent
#:load-persistent-object
#:print-persistence-manager-info
#:user-write-co... |
a4c4772eeea8d2d0cfe1d4fe46fbd9f6d36f9db283e454424567e37fb104d119 | karetsu/xmonad-aloysius | Launcher.hs | -- | Launchers (using dmenu) for finding windows and launching apps
module App.Launcher where
-- Imports ----------------------------------------------------------------------
import XMonad
import XMonad.Util.Dzen
import XMonad.Util.Font ( Align(..) )
import App... | null | https://raw.githubusercontent.com/karetsu/xmonad-aloysius/9910c8db4bb75600fc9af51b9e64ab5704e8126c/app/App/Launcher.hs | haskell | | Launchers (using dmenu) for finding windows and launching apps
Imports ----------------------------------------------------------------------
Definitions ------------------------------------------------------------------
>=> xScreen 0
non-standard dmenu options, please see: /
my nixOS overlay (aloysius) include... |
module App.Launcher where
import XMonad
import XMonad.Util.Dzen
import XMonad.Util.Font ( Align(..) )
import App.Alias
import Theme.ChosenTheme
powerMenu :: X ()
powerMenu =
dzenConfig
( font sansserif
>=> x 2352
>=> y 0
... |
9f4acd59f0c47c90363c8ef6ba1ddcfed5387bacca5253bba80724579daa8f68 | herbelin/coq-hh | gtk_parsing.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/ide/gtk_parsing.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
TODO: avoid num and prime at the he... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Ideutils
let underscor... |
990ad45b9cbc9c959003d1b508923f258eba20fe10d0c2d62eb0107c1701ffbd | tomfaulhaber/excel-templates | charts.clj | (ns excel-templates.charts
(:import [org.apache.commons.lang3 StringEscapeUtils]
[org.apache.poi.xssf.usermodel XSSFChartSheet]
[org.openxmlformats.schemas.drawingml.x2006.chart CTChart$Factory])
(:require [clojure.data.zip :as zf]
[clojure.data.zip.xml :as zx]
[clojure... | null | https://raw.githubusercontent.com/tomfaulhaber/excel-templates/17871b86a41de4a0b3a7bba9d390439b42c97c3c/src/excel_templates/charts.clj | clojure | we need to transform.
XML transformation for charts
-xml-editing-using-zippers-in-clojure/
Combine the above to edit all charts in a sheet
(println (str "relations = " (-> sheet .createDrawingPatriarch .getRelations)))
When we duplicate a sheet with charts on it, we need to make sure
that any charts on that shee... | (ns excel-templates.charts
(:import [org.apache.commons.lang3 StringEscapeUtils]
[org.apache.poi.xssf.usermodel XSSFChartSheet]
[org.openxmlformats.schemas.drawingml.x2006.chart CTChart$Factory])
(:require [clojure.data.zip :as zf]
[clojure.data.zip.xml :as zx]
[clojure... |
a531a0a81e4cb26dc7f162b471726b60568a922249cca0afad12fa9a393125f1 | athos/syntactic-closure | identifier.clj | (ns identifier
(:use syntactic-closure.core))
(define-syntax foo []
(sc-macro-transformer
(fn [env]
(capture-syntactic-environment
(fn [transformer-env]
(identifier=? transformer-env 'x env 'x))))))
(comment
[(foo) (let [x 2] (foo))] ;=> [true false]
)
| null | https://raw.githubusercontent.com/athos/syntactic-closure/e251b03a199507df4bbc35788230d434d6506634/examples/identifier.clj | clojure | => [true false] | (ns identifier
(:use syntactic-closure.core))
(define-syntax foo []
(sc-macro-transformer
(fn [env]
(capture-syntactic-environment
(fn [transformer-env]
(identifier=? transformer-env 'x env 'x))))))
(comment
)
|
35b61a1f85814e1abe0c1f8185fa64e723ef327cf2ff2da94a088b67f6954d5b | rd--/hsc3 | decay2.help.hs | -- decay2 ; used as an envelope
sinOsc ar 11000 0 * 0.25
f = xLine kr 1 50 20 RemoveSynth
in decay2 (impulse ar f 0) 0.01 0.2 * s
-- decay2 ; compare with decay used as the envelope
let s = fSinOsc ar 600 0 * 0.25
f = xLine kr 1 50 20 RemoveSynth
in decay (impulse ar f 0) 0.2 * s
-- ; drawings ; attack and ... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/decay2.help.hs | haskell | decay2 ; used as an envelope
decay2 ; compare with decay used as the envelope
; drawings ; attack and decay are a difference of two decays , hence inversion | sinOsc ar 11000 0 * 0.25
f = xLine kr 1 50 20 RemoveSynth
in decay2 (impulse ar f 0) 0.01 0.2 * s
let s = fSinOsc ar 600 0 * 0.25
f = xLine kr 1 50 20 RemoveSynth
in decay (impulse ar f 0) 0.2 * s
Sound.Sc3.Plot.plot_ugen1 0.05 (decay2 (impulse ar 1 0) 0.001 0.01)
Sound.Sc3.Plot.plot_ugen1 0.05 (decay2 (imp... |
6ce47a756c870ed7f8d67318431c78eef3ebc14394a1de33dea3f3ac3e999ca9 | marigold-dev/openapi-router | router.mli | module type Config_Type = sig
type app
type route
type handler
val json_path : string
val doc_path : string
val json_route : string -> route
val doc_route : string -> route
val get : string -> handler -> route
val post : string -> handler -> route
val delete : string -> handler -> route
val put :... | null | https://raw.githubusercontent.com/marigold-dev/openapi-router/941eb46176482aa931ac2dbe53f082b20d12fc8b/lib/router.mli | ocaml | * Specify Openapi title metadata
* Specify Openapi description metadata
* Specify Openapi terms of service metadata
* Specify Openapi contact metadata
* Specify Openapi license metadata
* Specify Openapi version metadata
* Add a named component to an application spec
* Add a named component to an application spe... | module type Config_Type = sig
type app
type route
type handler
val json_path : string
val doc_path : string
val json_route : string -> route
val doc_route : string -> route
val get : string -> handler -> route
val post : string -> handler -> route
val delete : string -> handler -> route
val put :... |
32b8478bddc291a1b6ffe43dc66f18265a6437ad2186887354231a3e80209313 | input-output-hk/cardano-ledger-byron | Json.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Test.Cardano.Chain.Genesis.Json
( tests
) where
import Cardano.Prelude
import Test.Cardano.Prelude
import Hedgehog (Property)
import Test.Cardano.Chain.Genesis.Example (exampleGenesisData0)
import Test.Cardano.Cha... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/test/Test/Cardano/Chain/Genesis/Json.hs | haskell | ------------------------------------------------------------------------------
JSON Canonical Tests
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Test.Cardano.Chain.Genesis.Json
( tests
) where
import Cardano.Prelude
import Test.Cardano.Prelude
import Hedgehog (Property)
import Test.Cardano.Chain.Genesis.Example (exampleGenesisData0)
import Test.Cardano.Cha... |
09fd6707fbe0e024b04eedac8b72767dce8f7b53cdc9da320e70950ad278ee44 | fukamachi/clozure-cl | lambda-list.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/compiler/lambda-list.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
(declare (values source-note start-pc end-pc))
Lambda-list utilities
Lambda... | 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 ... |
bc3fdb0a7bc80503c3dc5f4c7808de7eb012bdff0deb0c5e8d8bb96900b40969 | robert-strandh/SICL | char-not-equal-1-define-compiler-macro.lisp | (cl:in-package #:sicl-character)
(define-compiler-macro char/= (&whole form &rest arguments)
(cond ((not (and (cleavir-code-utilities:proper-list-p arguments)
(>= (length arguments) 1)))
form)
((= (length arguments) 1)
`(characterp ,(car arguments)))
(t (let* ((vars (... | null | https://raw.githubusercontent.com/robert-strandh/SICL/2e0699808e9f2d2b358ef790eba8f8bb02e3ec4e/Code/Character/char-not-equal-1-define-compiler-macro.lisp | lisp | (cl:in-package #:sicl-character)
(define-compiler-macro char/= (&whole form &rest arguments)
(cond ((not (and (cleavir-code-utilities:proper-list-p arguments)
(>= (length arguments) 1)))
form)
((= (length arguments) 1)
`(characterp ,(car arguments)))
(t (let* ((vars (... | |
063401c2ac87362f939c99416ea63cbe1c11fb979dfecb9bfb67f1f22b50ed5a | hemmi/coq2scala | coq_omega.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/plugins/omega/coq_omega.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 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Omega : a solver of quantifi... |
55c43ac7d4a1fafb723a507f66b3ac20b1e65df9b0d1e7b1a179d9e5c1982927 | clj-commons/claypoole | impl.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/clj-commons/claypoole/00d9829997429f95d1af0b21dc5d2863706291eb/src/clj/com/climate/claypoole/impl.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(ns com.cl... |
2a85eb5b0e938d4a210b34909ca6158a75eabf4ebdba852a0694d3ad9c968980 | ndmitchell/shake | Errors.hs | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving , DeriveDataTypeable , ScopedTypeVariables #
module Test.Errors(main) where
import Development.Shake
import Development.Shake.Classes
import Development.Shake.FilePath
import Test.Type
import Data.List.Extra
import Control.Monad
import Control.Concurrent.Extra
impo... | null | https://raw.githubusercontent.com/ndmitchell/shake/06ed483ad7970b13ae6c4aded5a2939c88b88431/src/Test/Errors.hs | haskell | will throw if the directory does not exist
check a fast failure aborts a slow success
for exceptions on Key we die while reading the database, and restart from scratch
must be able to still run other rules
for exceptions on Value we die while running the rule that requires it
must be able to still run other rules... | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving , DeriveDataTypeable , ScopedTypeVariables #
module Test.Errors(main) where
import Development.Shake
import Development.Shake.Classes
import Development.Shake.FilePath
import Test.Type
import Data.List.Extra
import Control.Monad
import Control.Concurrent.Extra
impo... |
ea15d6ac845ad2ddb3d3e1a15edc2a04094154a54ea724fbae147b6cc10333a4 | owlbarn/owl_symbolic | example_12.ml |
* OWL - OCaml Scientific and Engineering Computing
* Copyright ( c ) 2016 - 2020 < >
* OWL - OCaml Scientific and Engineering Computing
* Copyright (c) 2016-2020 Liang Wang <>
*)
open Owl_symbolic_neural_graph
open Owl_symbolic_types
(** InceptionV3 *)
(* Note to specify the defautl value of padding i... | null | https://raw.githubusercontent.com/owlbarn/owl_symbolic/dc853a016757d3f143c5e07e50075e7ae605d969/example/example_12.ml | ocaml | * InceptionV3
Note to specify the defautl value of padding in avgpool etc. |
* OWL - OCaml Scientific and Engineering Computing
* Copyright ( c ) 2016 - 2020 < >
* OWL - OCaml Scientific and Engineering Computing
* Copyright (c) 2016-2020 Liang Wang <>
*)
open Owl_symbolic_neural_graph
open Owl_symbolic_types
let conv2d_bn ?(padding = SAME_UPPER) kernel stride nn =
conv2d ~... |
041519f289f1285663cce910f6da0aef33c54f0f9948d3e42dd01bf501294df4 | vasyaod/parental-control | Config.hs | module Config where
import Control.Applicative
import qualified Data.HashMap.Strict as HM
import Data.Maybe (fromMaybe, fromJust)
import Data.Text
import Data.Time
import Data.Yaml
import qualified Data.Yaml as Y
data MyConfig = MyConfig
{ os :: String,
commands :: Commands,
statePath :: String,
httpEna... | null | https://raw.githubusercontent.com/vasyaod/parental-control/ec7c971b2d76a014a4f40cfd47a6defd08a73e42/schedule-daemon/src/Config.hs | haskell | module Config where
import Control.Applicative
import qualified Data.HashMap.Strict as HM
import Data.Maybe (fromMaybe, fromJust)
import Data.Text
import Data.Time
import Data.Yaml
import qualified Data.Yaml as Y
data MyConfig = MyConfig
{ os :: String,
commands :: Commands,
statePath :: String,
httpEna... | |
30e3253ee705a54bb3fbdad205a7436aff31db6acf06158a435fa74aeef87428 | astynax/hemmet | BEM.hs | module Hemmet.BEM
( BemBackend
, BemRunner
, bem
, bemHtml
, bemCss
, bemReactFlux
) where
import Data.Text as T
import Hemmet.Backend
import Hemmet.Runner
import Hemmet.BEM.Rendering
import Hemmet.BEM.Template
import Hemmet.BEM.Transformation
import Hemmet.BEM.Tree
type BemBackend = Backend BemPayloa... | null | https://raw.githubusercontent.com/astynax/hemmet/0ee76cc4ffca5726f8a70ab78ae8473232b96ee3/src/Hemmet/BEM.hs | haskell | module Hemmet.BEM
( BemBackend
, BemRunner
, bem
, bemHtml
, bemCss
, bemReactFlux
) where
import Data.Text as T
import Hemmet.Backend
import Hemmet.Runner
import Hemmet.BEM.Rendering
import Hemmet.BEM.Template
import Hemmet.BEM.Transformation
import Hemmet.BEM.Tree
type BemBackend = Backend BemPayloa... | |
f3890b9dc835b7517eb42c848bf348f156d296f39322d1c06ff5d48a99734d9e | ocaml-flambda/ocaml-jst | member.ml | let () = print_endline "Hello!"
| null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/testsuite/tests/packs/inconsistent/member.ml | ocaml | let () = print_endline "Hello!"
| |
edfff449098a35916f1caa2eef58db954025a10a5ce51259d3cf04318b176277 | dm3/clojure.java-time | user.clj | (ns user
(:require [clojure.tools.namespace.repl :as repl]
[criterium.core :as crit]
[taoensso.timbre :as timbre]
[taoensso.tufte :as profiling :refer (pspy profile defnp p)]))
(defn go []
(set! *warn-on-reflection* false)
(repl/refresh-all)
(require '[java-time :as j])
(e... | null | https://raw.githubusercontent.com/dm3/clojure.java-time/f00db0b2c6e1540ca12815aacb57949a9bfb5589/dev/user.clj | clojure | (ns user
(:require [clojure.tools.namespace.repl :as repl]
[criterium.core :as crit]
[taoensso.timbre :as timbre]
[taoensso.tufte :as profiling :refer (pspy profile defnp p)]))
(defn go []
(set! *warn-on-reflection* false)
(repl/refresh-all)
(require '[java-time :as j])
(e... | |
f22f4f752207bdb7ddac14d8e0a1a754dfc0d709e488139775aada7e54c81313 | Engil/Goodboy | interrupts.ml | type t = char
let vblank= 0
let lcd_stats = 1
let timer = 2
let serial = 3
let joypad = 4
let vblank_handler = 0x40
let lcd_stats_handler = 0x48
let timer_handler = 0x50
let joypad_handler = 0x60
| null | https://raw.githubusercontent.com/Engil/Goodboy/2e9abc243b929d8bdfb7c5d4874ddb8a07c55fac/lib/interrupts.ml | ocaml | type t = char
let vblank= 0
let lcd_stats = 1
let timer = 2
let serial = 3
let joypad = 4
let vblank_handler = 0x40
let lcd_stats_handler = 0x48
let timer_handler = 0x50
let joypad_handler = 0x60
| |
9cd3c5aa467133fba7d58e5e2375f7e6882777d8108d467e7b0835f8b7d22a3b | huangcheng/WebRTC | session_storage.erl | %%%-------------------------------------------------------------------
@author huangcheng
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 07 . Nov 2016 13:37
%%%-------------------------------------------------------------------
-module(session_storage).
-author("huangcheng").
-behaviour(gen_server).
... | null | https://raw.githubusercontent.com/huangcheng/WebRTC/bade880d5c09968c0e8b2acb1da5467c84936290/apps/webrtc/src/session_storage.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
-type status() :: idle | busy.
API
gen_server callbacks
===================================================================
API
========================================... | @author huangcheng
( C ) 2016 , < COMPANY >
Created : 07 . Nov 2016 13:37
-module(session_storage).
-author("huangcheng").
-behaviour(gen_server).
-include("../include/webrtc.hrl").
-type client() :: {Name :: atom(), Pid :: pid()}.
-type clients() :: [client()].
-export([start_link/0]).
-export([create_ro... |
efabce4b97442d5914a3f5191b74358c2980030726b98e387f83a6cdeb179ce0 | ocurrent/ocaml-docs-ci | track.ml | module Git = Current_git
module OpamPackage = struct
include OpamPackage
let to_yojson t = `String (OpamPackage.to_string t)
let of_yojson = function
| `String str -> (
match OpamPackage.of_string_opt str with
| Some x -> Ok x
| None -> Error "failed to parse version")
| _ -> Er... | null | https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/cb5d4a54a7fd9883aec066b4bd1fcb50ca42e7bc/src/lib/track.ml | ocaml | module Git = Current_git
module OpamPackage = struct
include OpamPackage
let to_yojson t = `String (OpamPackage.to_string t)
let of_yojson = function
| `String str -> (
match OpamPackage.of_string_opt str with
| Some x -> Ok x
| None -> Error "failed to parse version")
| _ -> Er... | |
c900fd4d16bde295831124374430d00134408d49d731ee4a9f427569ef450f35 | MyPost/cassius | retrieve.clj | (ns cassius.net.command.retrieve
(:require [cassius.protocols :refer [to-bbuff]]
[cassius.types.byte-buffer]
[cassius.net.connection :refer [client]]
[cassius.net.command
[keyspace :as ksp]
[macros :refer [raise-on-invalid-request]]])
(:import [org.apa... | null | https://raw.githubusercontent.com/MyPost/cassius/7b5f550fa8e8f825d4ecd7ba6a0d34c5ff606a7c/src/cassius/net/command/retrieve.clj | clojure | (ns cassius.net.command.retrieve
(:require [cassius.protocols :refer [to-bbuff]]
[cassius.types.byte-buffer]
[cassius.net.connection :refer [client]]
[cassius.net.command
[keyspace :as ksp]
[macros :refer [raise-on-invalid-request]]])
(:import [org.apa... | |
2dcef8dfd6108323028c5bfa9f16c85ec339ab3dcbd3b1bf664962b1205d41ad | mvaldesdeleon/haskell-book | wordnumber.hs | module WordNumber where
import Data.List (intersperse, map)
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
digitToWord 3 = "three"
digitToWord 4 = "four"
digitToWord 5 = "five"
digitToWord 6 = "six"
digitToWord 7 = "seven"
digitToWord 8 = "eight"
digitToWord 9 = "nine"... | null | https://raw.githubusercontent.com/mvaldesdeleon/haskell-book/ee4a70708041686abe2f1d951185786119470eb4/ch08/wordnumber.hs | haskell | module WordNumber where
import Data.List (intersperse, map)
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
digitToWord 3 = "three"
digitToWord 4 = "four"
digitToWord 5 = "five"
digitToWord 6 = "six"
digitToWord 7 = "seven"
digitToWord 8 = "eight"
digitToWord 9 = "nine"... | |
39c91e21d546bd4f438bf205f7a90ad8c7c2e8c3fc9e1ba961ed798ffcf27e3b | kadena-io/kadenamint | Kadenamint.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Kadenamint where
import Control.Concurrent.Async (async, cancel, withAsync)
import Control.Lens (makeLenses, (^.), (<&>))
import Control.Monad.IO.Class ... | null | https://raw.githubusercontent.com/kadena-io/kadenamint/00c99eca71c4107d1ed31754e26d9e552237e3bd/src/Kadenamint.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Kadenamint where
import Control.Concurrent.Async (async, cancel, withAsync)
import Control.Lens (makeLenses, (^.), (<&>))
import Control.Monad.IO.Class (MonadIO(..))
import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.