_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 |
|---|---|---|---|---|---|---|---|---|
8db2bd1dc8e65cc233bb81b3e61ae33e03eb2b65c6d8c61de928ca4f583db152 | markus-git/co-feldspar | Buffered.hs | # language TypeFamilies #
{-# language FlexibleContexts #-}
# language RecordWildCards #
# language MultiParamTypeClasses #
{-# language ScopedTypeVariables #-}
module Feldspar.Array.Buffered where
import Feldspar.Representation
import Feldspar.Frontend
import Feldspar.Array.Vector
import Prelude hiding (leng... | null | https://raw.githubusercontent.com/markus-git/co-feldspar/bf598c803d41e03ed894bbcb490da855cce9250e/src/Feldspar/Array/Buffered.hs | haskell | # language FlexibleContexts #
# language ScopedTypeVariables #
------------------------------------------------------------------------------
*
------------------------------------------------------------------------------
| Double-buffered storage.
--------------------------------------------------------------------... | # language TypeFamilies #
# language RecordWildCards #
# language MultiParamTypeClasses #
module Feldspar.Array.Buffered where
import Feldspar.Representation
import Feldspar.Frontend
import Feldspar.Array.Vector
import Prelude hiding (length)
import qualified Prelude as P
data Store m a = Store
{ active... |
9f706ccfb0903fbd9833d28da8d79e1b001f09ae19bfeb1d5a43b10694b1444d | rizo/snowflake-os | mach.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/mach.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
type integer_comparison =
... |
82ebdce27cda2aa66f4c54d1d9a5a324ebabaa6a76e49d3bec15a9c22b6419ab | hyperledger-archives/fabric-chaintool | buildcar.clj | Copyright London Stock Exchange Group 2016 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 applicable law... | null | https://raw.githubusercontent.com/hyperledger-archives/fabric-chaintool/57d8f460d0bfdc7cb4ddea0147fea16f15a06258/src/chaintool/subcommands/buildcar.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language ... | Copyright London Stock Exchange Group 2016 All Rights Reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns chaintool.subcommands.buildcar
(:require [clojure.java.io :as io]
[me.raynes.fs :as fs]
[clojure.tools.file-utils :as fileutils]
[chaintool.... |
70bbc84996280646d8e7a27b66859ee40aa47367cc85979a0927778a9d6a7081 | erlyvideo/publisher | publisher_sup.erl | @author < >
2009 - 2012
%%% @doc Starts in-process http stream
%%% @reference See <a href="/" target="_top">/</a> for more information
%%% @end
%%%
%%% This file is part of erlyvideo.
%%%
%%% erlyvideo is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... | null | https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/publisher/src/publisher_sup.erl | erlang | @doc Starts in-process http stream
@reference See <a href="/" target="_top">/</a> for more information
@end
This file is part of erlyvideo.
erlyvideo is free software: you can redistribute it and/or modify
(at your option) any later version.
erlyvideo is distributed in the hope that it will be useful... | @author < >
2009 - 2012
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
-module(publisher_sup).
-author('Max Lapshin <>').
-behaviour(supervi... |
6844bbbb9fc558b716b1710f44ca846ef60918a795e15d0ab97c4d6280eabff2 | andrewray/DefinitelyMaybeTyped | summary.ml | open Ast
open Printf
module type S = sig
val ast : Ast.declarationElement list option -> unit
end
module Make(Show : sig
val show : int -> string -> string -> unit
end) = struct
open Show
let path = String.concat "."
let rec typeMember level =
let show = show level in
function
| `PropertySi... | null | https://raw.githubusercontent.com/andrewray/DefinitelyMaybeTyped/088fbb99b1eea704d37e4897de7fe18531b66fc2/src/summary.ml | ocaml | print a summary of top level values | open Ast
open Printf
module type S = sig
val ast : Ast.declarationElement list option -> unit
end
module Make(Show : sig
val show : int -> string -> string -> unit
end) = struct
open Show
let path = String.concat "."
let rec typeMember level =
let show = show level in
function
| `PropertySi... |
1e1e70d51cc971066175d4306b8de604a3f0a54cc8880d55aa98dcaff8e13e13 | colis-anr/morbig | API.mli | (**************************************************************************)
(* -*- tuareg -*- *)
(* *)
Copyright ( C ) 2017 - 2021 , ,
. ... | null | https://raw.githubusercontent.com/colis-anr/morbig/77c2ca402785979c4af351b412fe7be2d521838f/src/API.mli | ocaml | ************************************************************************
-*- tuareg -*-
This is free software: you... | Copyright ( C ) 2017 - 2021 , ,
.
under the terms of the GNU General Public License , version 3 .
* { 3 Parsing shell scripts }
val parse_file: string -> CST.program
val parse_string: string -> string -> CST.program
* { 3 S... |
aeb00485be0ad0721772bbd7117d36754ce0343aa458050b359ac67cd93e155a | odj/Ouch | Formula.hs | ------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Module : Ouch . Enumerate . Formula
-- Maintainer :
-- Stability : Unstable
-- Portability :
Copyright ( c ) 201... | null | https://raw.githubusercontent.com/odj/Ouch/ed20599214cf77b0cb81cc7cefb4cd9c35bc7cf7/Ouch/Enumerate/Formula.hs | haskell | ----------------------------------------------------------------------------
------------------------------------------------------------------------------
Module : Ouch . Enumerate . Formula
Maintainer :
Stability : Unstable
Portability :
-------------------------------------------... |
Copyright ( c ) 2010 Orion
This file is part of Ouch , a chemical informatics toolkit
written entirely in Haskell .
Ouch 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 , e... |
c48d7ab32edda5f83ac1e8f34a04c14af09f8411bee14107497d3a66965c0550 | tek/polysemy-hasql | Table.hs | module Polysemy.Hasql.Data.Table where
import Control.Lens (makeClassy)
import Exon (exon)
import Hasql.Decoders (Row)
import Hasql.Encoders (Params)
import qualified Text.Show as Show
import qualified Polysemy.Hasql.Data.DbType as Column
import Polysemy.Hasql.Data.DbType (Column, Name, Selector)
data Table a =
Ta... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/2bdfb5c4a0c15b66a33412e24c1668efa7e66e08/packages/hasql/lib/Polysemy/Hasql/Data/Table.hs | haskell | module Polysemy.Hasql.Data.Table where
import Control.Lens (makeClassy)
import Exon (exon)
import Hasql.Decoders (Row)
import Hasql.Encoders (Params)
import qualified Text.Show as Show
import qualified Polysemy.Hasql.Data.DbType as Column
import Polysemy.Hasql.Data.DbType (Column, Name, Selector)
data Table a =
Ta... | |
4e6ba621bef3596dc05c0ec441a52278056af7a6e9bc4fbaefb3ca83e586957e | pdtournament/pdtournament | Bots.hs | module Bots where
import Prelude
import Control.Monad (replicateM)
import Tournament
-------------- Some example bots --------------
-- Always cooperates
cooperateBot :: Bot
cooperateBot = Bot (\_ _ -> return Cooperate)
-- Always defects
defectBot :: Bot
defectBot = Bot (\_ _ -> return Defect)
50 % probability ... | null | https://raw.githubusercontent.com/pdtournament/pdtournament/41f62b5d7753bb817962fc35e886221cabe640bc/Bots.hs | haskell | ------------ Some example bots --------------
Always cooperates
Always defects
cooperate.
defect, since it will simulate playing against itself, creating an infinite
chain of recursive function calls that will time out.
simulation, and cooperate if the simulation did not finish or raised an
exception.
times, an... | module Bots where
import Prelude
import Control.Monad (replicateM)
import Tournament
cooperateBot :: Bot
cooperateBot = Bot (\_ _ -> return Cooperate)
defectBot :: Bot
defectBot = Bot (\_ _ -> return Defect)
50 % probability of cooperating , 50 % probability of defecting
randomBot :: Bot
randomBot = Bot (\_ _ -... |
115da24b57b087d915cc349b278171aa717465cdda3af6db7b98ec42456b7987 | sleexyz/hylogen-fun | Jam_2016_10_07.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
module Jam_2016_10_07 where
import Hylogen.WithHylide
import Data.Profunctor
type Optic p s t a b = p s t -> p a b
type Optic' p s t = p s t -> p s t
type Iso s t a b = forall p. Profunctor p => p a b -> p s t
type Iso' a b = Iso a b a b
type Auto a = Iso' a a
rot ... | null | https://raw.githubusercontent.com/sleexyz/hylogen-fun/1f42a4a0d3db418f1786292186b8ff861d3f4011/Jam_2016_10_07.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # |
module Jam_2016_10_07 where
import Hylogen.WithHylide
import Data.Profunctor
type Optic p s t a b = p s t -> p a b
type Optic' p s t = p s t -> p s t
type Iso s t a b = forall p. Profunctor p => p a b -> p s t
type Iso' a b = Iso a b a b
type Auto a = Iso' a a
rot :: Vec1 -> Vec2 -> Vec2
rot phi a = vec2 ( cos phi ... |
fc98511a82c5ae75a08a4649d2f5b6e960438363f8f1a91f4593da4bce48b89e | acl2/acl2 | grammar.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "PFCS")
(include-book "kestrel/abnf/grammar-definer/defgra... | null | https://raw.githubusercontent.com/acl2/acl2/27487d4b238489ed030a7c0a614efe3698019f75/books/kestrel/crypto/pfcs/grammar.lisp | lisp | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "PFCS")
(include-book "kestrel/abnf/grammar-definer/defgrammar" :dir :system)
(include-book "kestrel/abnf/grammar-definer/deftreeops" :dir :syste... | |
f06639d996e629c610513d1f33994be20931986ce13b25553bc9d42363a65708 | tek/ribosome | Example1.hs | {-# options_haddock prune, hide #-}
-- |An example for the docs.
module Ribosome.Test.Examples.Example1 where
import Polysemy.Test
import Ribosome
import Ribosome.Api
import Ribosome.Test
store ::
Member (Rpc !! RpcError) r =>
Args ->
Handler r ()
store (Args msg) =
ignoreRpcError do
nvimSetVar "message... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/test/lib/Ribosome/Test/Examples/Example1.hs | haskell | # options_haddock prune, hide #
|An example for the docs. |
module Ribosome.Test.Examples.Example1 where
import Polysemy.Test
import Ribosome
import Ribosome.Api
import Ribosome.Test
store ::
Member (Rpc !! RpcError) r =>
Args ->
Handler r ()
store (Args msg) =
ignoreRpcError do
nvimSetVar "message" msg
test_direct :: UnitTest
test_direct =
testEmbed_ do
... |
11e3db30564af76cc178e6e6995d25a5880df053cac65f95bd928f415b75c9e9 | mhuebert/maria | Example Gallery.cljs | ;; # Gallery
Here are some ways to use shapes in . They ’re here for you to browse and play with .
Some of these were made by first - day programmers after working through [ Learn Clojure with Shapes]( / intro ) , where most ( but not all ! ) of the Clojure programming techniques used are explained . See also [ ... | null | https://raw.githubusercontent.com/mhuebert/maria/15586564796bc9273ace3101b21662d0c66b4d22/curriculum/Example%20Gallery.cljs | clojure | # Gallery
Demonstrated with ranges
variable opacity
color gradient
try it–more than once!
Note that both the `shape-size` cell's reported value and the circle itself change when you move the slider. This happens because the function attached to on-input is `reset!`ing the `shapesize`, which then communicates that... |
Here are some ways to use shapes in . They ’re here for you to browse and play with .
Some of these were made by first - day programmers after working through [ Learn Clojure with Shapes]( / intro ) , where most ( but not all ! ) of the Clojure programming techniques used are explained . See also [ Welcome to Ce... |
95c90487fdcbb135aecc2684ff96404bc1cb4794a3cd61af2db5302235c121e6 | xsc/lein-ancient | utils.clj | (ns leiningen.ancient.utils
(:require [leiningen.ancient.artifact.options :as o]
[leiningen.ancient
[cli :as cli]
[collect :as collect]
[verbose :refer :all]]
[jansi-clj.core :as color]
[clojure.string :as string]
[clojure.edn :as ... | null | https://raw.githubusercontent.com/xsc/lein-ancient/ddcb0a1d655eda37daa47bea63e5eee72985a1ed/src/leiningen/ancient/utils.clj | clojure | ## Reporting | (ns leiningen.ancient.utils
(:require [leiningen.ancient.artifact.options :as o]
[leiningen.ancient
[cli :as cli]
[collect :as collect]
[verbose :refer :all]]
[jansi-clj.core :as color]
[clojure.string :as string]
[clojure.edn :as ... |
89d68630d24f65933a4cdd06b8fc40a22c025a382219e1ee939386f847bd5973 | Eventuria/demonstration-gsd | Settings.hs | module Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Client.Settings where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
import Data.ByteString
data Settings = Settings {
loggerId :: LoggerId,
urlHost... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/Libraries/PersistedStreamEngine/Instances/EventStore/Client/Settings.hs | haskell | module Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Client.Settings where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
import Data.ByteString
data Settings = Settings {
loggerId :: LoggerId,
urlHost... | |
22c8553275354d8553ec5ad0ac95fa0ca016d16f2828aacdfc928ae73663e56c | m4b/rdr | MachConstants.ml | Convienence constants for return values from dyld_get_sdk_version ( ) and friends .
let kDYLD_MACOSX_VERSION_10_4 = 0x000A0400
let kDYLD_MACOSX_VERSION_10_5 = 0x000A0500
let kDYLD_MACOSX_VERSION_10_6 = 0x000A0600
let kDYLD_MACOSX_VERSION_10_7 = 0x000A0700
let kDYLD_MACOSX_VERSION_10_8 = 0x000A0800
let kDYLD_MACO... | null | https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/mach/MachConstants.ml | ocaml | Segment and Section Constants
Constants for the type of a section
regular section
section with only literal C strings
section with only 4 byte literals
section with only 8 byte literals
section with only pointers to
literals
section with only non-lazy
symbol pointers
section with only lazy s... | Convienence constants for return values from dyld_get_sdk_version ( ) and friends .
let kDYLD_MACOSX_VERSION_10_4 = 0x000A0400
let kDYLD_MACOSX_VERSION_10_5 = 0x000A0500
let kDYLD_MACOSX_VERSION_10_6 = 0x000A0600
let kDYLD_MACOSX_VERSION_10_7 = 0x000A0700
let kDYLD_MACOSX_VERSION_10_8 = 0x000A0800
let kDYLD_MACO... |
77a6fc8a1cd11c5be401c8ddaf2fb9ad48de38ae4b5ed48d3578452d9d00a3fe | motiejus/erlualib_examples | name_server_test.erl | -module(name_server_test).
-include_lib("eunit/include/eunit.hrl").
-define(P_NAME, <<"proper">>).
-define(P_ADDR, <<"proper.softlab.ntua.gr">>).
-define(M_ADDR, <<"m.jakstys.lt">>).
-define(SERVER, name_server).
-define(setup(T), {setup, fun start/0, fun stop/1,
fun(S) -> [fun() -> T(S) en... | null | https://raw.githubusercontent.com/motiejus/erlualib_examples/15c78c560f1d405bb5d022866562a6c6fe56f673/test/name_server_test.erl | erlang | -module(name_server_test).
-include_lib("eunit/include/eunit.hrl").
-define(P_NAME, <<"proper">>).
-define(P_ADDR, <<"proper.softlab.ntua.gr">>).
-define(M_ADDR, <<"m.jakstys.lt">>).
-define(SERVER, name_server).
-define(setup(T), {setup, fun start/0, fun stop/1,
fun(S) -> [fun() -> T(S) en... | |
4c5e05952ce7ec1ff019d53202e63fe7e292f9369071e4a5ff5a60f2beb73050 | BekaValentine/SimpleFP-v2 | DeclArg.hs | {-# OPTIONS -Wall #-}
module OpenDefs.Core.DeclArg where
import Utils.Plicity
import Utils.Pretty
import OpenDefs.Core.Term
data DeclArg = DeclArg Plicity String Term
instance Show DeclArg where
show (DeclArg Expl x t) = "(" ++ x ++ " : " ++ pretty t ++ ")"
show (DeclArg Impl x t) = "{" ++ x ++ " : " ++ pre... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/OpenDefs/Core/DeclArg.hs | haskell | # OPTIONS -Wall # |
module OpenDefs.Core.DeclArg where
import Utils.Plicity
import Utils.Pretty
import OpenDefs.Core.Term
data DeclArg = DeclArg Plicity String Term
instance Show DeclArg where
show (DeclArg Expl x t) = "(" ++ x ++ " : " ++ pretty t ++ ")"
show (DeclArg Impl x t) = "{" ++ x ++ " : " ++ pretty t ++ "}" |
14d7f3c5312a9d2cc8bc85fefa14dea81f7bb7b4844049dc81164d6cc3f9bda3 | digital-asset/ghc | CustomTypeErrors04.hs | # LANGUAGE DataKinds , TypeFamilies , UndecidableInstances #
# LANGUAGE UndecidableInstances #
The " bad case " in # 11391
module CustomTypeErrors04 where
import Data.Kind
import GHC.TypeLits (TypeError, ErrorMessage(..))
type family Resolve (t :: Type -> Type) :: Type -> Type where
Resolve _ = TypeError (Text "... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/CustomTypeErrors04.hs | haskell | # LANGUAGE DataKinds , TypeFamilies , UndecidableInstances #
# LANGUAGE UndecidableInstances #
The " bad case " in # 11391
module CustomTypeErrors04 where
import Data.Kind
import GHC.TypeLits (TypeError, ErrorMessage(..))
type family Resolve (t :: Type -> Type) :: Type -> Type where
Resolve _ = TypeError (Text "... | |
5804b79cde643781932b7b6bddd4081bfc635e7128f4d1593648c649500a537b | mbillingr/lisp-in-small-pieces | test4.scm | (set! bar (cons 1 2))
(set! foo set-car!)
(foo bar 42)
(set! foo set-cdr!)
(foo bar 666)
bar
| null | https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/07-compilation/test4.scm | scheme | (set! bar (cons 1 2))
(set! foo set-car!)
(foo bar 42)
(set! foo set-cdr!)
(foo bar 666)
bar
| |
f9056fd6a73a98d43445015f4e5c830953e5a5d62d12f8415f0f001f77a76c54 | rnewman/clj-sip | doc-check.clj | (ns doc-check
(:refer-clojure)
(:require
Echo .
com.twinql.clojure.sip.example.echo
com.twinql.clojure.sip.example.impl)
(:use
com.twinql.clojure.doc
com.twinql.clojure.sip))
;; You can use these for debugging.
(comment
(import 'java.lang.ClassLoader)
(defn print-classpaths []
(pr... | null | https://raw.githubusercontent.com/rnewman/clj-sip/0e883c13c0b4a978f0655d163b249ae61081ded7/doc/doc-check.clj | clojure | You can use these for debugging.
Do the error checking and graph printing for each application. | (ns doc-check
(:refer-clojure)
(:require
Echo .
com.twinql.clojure.sip.example.echo
com.twinql.clojure.sip.example.impl)
(:use
com.twinql.clojure.doc
com.twinql.clojure.sip))
(comment
(import 'java.lang.ClassLoader)
(defn print-classpaths []
(println (map #(.getFile %) (.getURLs (... |
f08782537ec13cc19580c2b964b8609379437d95850ee709678345416e0407de | fused-effects/fused-effects | Empty.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
# HLINT ignore " Eta reduce " #
module Empty
( tests
, gen0
, test
) where
import qualified Control.Carrier.Empty.Church as C.Church
import qualified Co... | null | https://raw.githubusercontent.com/fused-effects/fused-effects/85f4b7499789a1750eb9a8d35ea09933b0d7a97b/test/Empty.hs | haskell | # LANGUAGE RankNTypes #
# OPTIONS_GHC -Wno-unrecognised-pragmas # | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# HLINT ignore " Eta reduce " #
module Empty
( tests
, gen0
, test
) where
import qualified Control.Carrier.Empty.Church as C.Church
import qualified Control.Carrier.Empty.Maybe as C.Maybe
import qualified Control.Monad.Trans.... |
7b774687e4e0ff762533d0180bdc6cbc0fb0bee8ff79ea6663ab9ba8d57e8455 | jtdaugherty/dbmigrations | StoreTest.hs | {-# LANGUAGE OverloadedStrings #-}
module StoreTest
( tests
)
where
import Test.HUnit
import qualified Data.Map as Map
import Database.Schema.Migrations.Migration
import Database.Schema.Migrations.Store
tests :: [Test]
tests = validateSingleMigrationTests
++ validateMigrationMapTests
type ValidateSi... | null | https://raw.githubusercontent.com/jtdaugherty/dbmigrations/80336a736ac394a2d38c65661b249b2fae142b64/test/StoreTest.hs | haskell | # LANGUAGE OverloadedStrings # | module StoreTest
( tests
)
where
import Test.HUnit
import qualified Data.Map as Map
import Database.Schema.Migrations.Migration
import Database.Schema.Migrations.Store
tests :: [Test]
tests = validateSingleMigrationTests
++ validateMigrationMapTests
type ValidateSingleTestCase = ( MigrationMap
... |
0071cca89d42da6516444f9402b49263ef5e7d9540e6b215aac16f7bf6265d4b | yetibot/core | cron.clj | (ns yetibot.core.commands.cron
"Scheduling capabilities for running commands in the future.
See for Cron syntax examples."
(:require
[yetibot.core.handler :refer [record-and-run-raw]]
[yetibot.core.util.command :as command]
[yetibot.core.interpreter :refer [*chat-source* *current-user*]]
[yetibo... | null | https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/commands/cron.clj | clojure | use a single, initially-empty hara scheduler then add/remove tasks to it as
needed
Note: may want to consider a separate scheduler per Adapter instance. That
way you can pause/resume the scheduler only for your Adapter (vs all of
them).
if the task doesn't exist this silently fails
if a task with the same ID alr... | (ns yetibot.core.commands.cron
"Scheduling capabilities for running commands in the future.
See for Cron syntax examples."
(:require
[yetibot.core.handler :refer [record-and-run-raw]]
[yetibot.core.util.command :as command]
[yetibot.core.interpreter :refer [*chat-source* *current-user*]]
[yetibo... |
ce8da4e22256549b34cc1dc750cd9dc85a4f88bd65cbd11c3e52bff322c75c70 | bsless/stress-server | handler.clj | (ns com.github.bsless.stress-server.handler)
(defn get-add
([{{{:keys [x y]} :query} :parameters}]
{:status 200
:body {:total (+ x y)}})
([{{{:keys [x y]} :query} :parameters} respond _raise]
(respond
{:status 200
:body {:total (+ x y)}})))
(defn post-add
([{{{:keys [x y]} :body} :parameters}... | null | https://raw.githubusercontent.com/bsless/stress-server/c527cd1ed7fdcb731bb04e391b7ded1e742f4c33/src/com/github/bsless/stress_server/handler.clj | clojure | (ns com.github.bsless.stress-server.handler)
(defn get-add
([{{{:keys [x y]} :query} :parameters}]
{:status 200
:body {:total (+ x y)}})
([{{{:keys [x y]} :query} :parameters} respond _raise]
(respond
{:status 200
:body {:total (+ x y)}})))
(defn post-add
([{{{:keys [x y]} :body} :parameters}... | |
354ba9c6bd79f3f1e0bb470b9716f881e99be2cc9a3d1cd5d36563e602316774 | wilkerlucio/tailwind-garden | expanders.cljc | (ns com.wsscode.tailwind-garden.expanders
(:require
[garden.stylesheet]))
(defn expand-values
[{::keys [properties prefix values]}]
(mapv
(fn [[k v]]
[(str "." prefix (if k (str "-" k)))
(into {}
(map (fn [p] [p v]))
properties)])
values))
(defn expand-values+n... | null | https://raw.githubusercontent.com/wilkerlucio/tailwind-garden/4f8af13165dd997de15b20ac5e7dd06351821acd/src/main/com/wsscode/tailwind_garden/expanders.cljc | clojure | (ns com.wsscode.tailwind-garden.expanders
(:require
[garden.stylesheet]))
(defn expand-values
[{::keys [properties prefix values]}]
(mapv
(fn [[k v]]
[(str "." prefix (if k (str "-" k)))
(into {}
(map (fn [p] [p v]))
properties)])
values))
(defn expand-values+n... | |
653d6b3ab5a3f8ed081e649be1c9021dc87f90df3c32bc7c98368ee9507978ef | fortytools/holumbus | IndexTypes.hs | # OPTIONS #
-- ----------------------------------------------------------------------------
|
Module : IndexTypes
Maintainer : , , ,
Stability : experimental
Portability : portable
The List of sub indexes created in the index file
Module : IndexTypes
Maintainer : Thor... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/W3W/src/IndexTypes.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
---------------------------------------... | # OPTIONS #
|
Module : IndexTypes
Maintainer : , , ,
Stability : experimental
Portability : portable
The List of sub indexes created in the index file
Module : IndexTypes
Maintainer : Thorben Guelck, Tobias Lueders, Mathias Leonhardt, Uwe Schmidt
Stability : experi... |
166de79a0dbf77eec5c5225d73ebaeacc55762df0c79514e2e73afba7d12d454 | expipiplus1/vulkan | OpenXR.hs | # language QuasiQuotes #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Khronos.Versions.OpenXR
( specVersions
) where
import Data.Vector ( Vector )
import Data.Version
import Foreign.Storable ( Storable )
import Polysemy
import ... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/generate-new/khronos-spec/Khronos/Versions/OpenXR.hs | haskell | #define XR_VERSION_PATCH(version) (uint32_t)((uint64_t)(version) & 0xffffffffULL)
# complete {p} # | # language QuasiQuotes #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Khronos.Versions.OpenXR
( specVersions
) where
import Data.Vector ( Vector )
import Data.Version
import Foreign.Storable ( Storable )
import Polysemy
import ... |
32380ff7fc1ba873ab715a480c42aae2e778ac960512faf187d77485c1cd2785 | incoherentsoftware/defect-process | Parse.hs | module Window.Graphics.Image.Parse
( loadImage
, loadPackImage
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import Data.Maybe (fromMaybe)
import Data.Yaml (decodeEither')
import GHC.Generics ... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Window/Graphics/Image/Parse.hs | haskell | module Window.Graphics.Image.Parse
( loadImage
, loadPackImage
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import Data.Maybe (fromMaybe)
import Data.Yaml (decodeEither')
import GHC.Generics ... | |
6f1e9b280f5465ee827fe697d21ccf4ac37dc3449d063792ed6079c4ff78c84a | OtpChatBot/Ybot | xmpp_sup.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
%%% Xmpp root supervisor.
%%% @end
%%%-----------------------------------------------------------------------------
-module(xmpp_sup).
-behaviour(supervisor).
%% API
-export([start_link/0, start_xmpp_client/1... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/transport/xmpp/xmpp_sup.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
Xmpp root supervisor.
@end
-----------------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
... | -module(xmpp_sup).
-behaviour(supervisor).
-export([start_link/0, start_xmpp_client/10]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec start_xmpp_client(CallbackModule :: atom() | pid(),
Login :: binary(),
Passwo... |
5eba7e14987acd7c15416f1f35c410cabf845cb3542826d88ecd1d04dfe7c599 | lispbuilder/lispbuilder | pixel.lisp |
(in-package #:lispbuilder-sdl-base)
( defmacro with - pixel ( ( var & optional surface ) & body body )
( let ( ( fn - write - pixel ( " fn - write - pixel- " ) )
( fn - read - pixel ( " fn - read - pixel- " ) ) )
;; (if (or surface (atom var))
` ( let ( ( , @(if surface
;; `(,var ,surface)
;;... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/base/pixel.lisp | lisp | (if (or surface (atom var))
`(,var ,surface)
`(,var ,var))))
(with-locked-surface (,var)
(let ((,fn-write-pixel (generate-write-pixel ,var))
(,fn-read-pixel (generate-read-pixel ,var)))
(labels ((,(intern (string-upcase (format nil "~A.write-pixel" var))) (x y color)
... |
(in-package #:lispbuilder-sdl-base)
( defmacro with - pixel ( ( var & optional surface ) & body body )
( let ( ( fn - write - pixel ( " fn - write - pixel- " ) )
( fn - read - pixel ( " fn - read - pixel- " ) ) )
` ( let ( ( , @(if surface
( error " must be a symbol or variable , not a function . " ... |
701e5658e1f2fa2df12c51251525929b53d0b44f4a0113f4791694274e36f97e | beetleman/shadow-cljs-hooks | util.clj | (ns shadow-cljs-hooks.test.util)
(defmacro on-flush? [hook]
`(= (:shadow.build/stage (meta #'~hook))
:flush))
| null | https://raw.githubusercontent.com/beetleman/shadow-cljs-hooks/1b0543124da8bc2dca04213bd3183ace14d2a1e1/test/shadow_cljs_hooks/test/util.clj | clojure | (ns shadow-cljs-hooks.test.util)
(defmacro on-flush? [hook]
`(= (:shadow.build/stage (meta #'~hook))
:flush))
| |
d82375012b1f8815eb2cb18e6a5553dc3fa617508f6b8c8269a59bb0d37424a5 | Opetushallitus/ataru | form_store_spec.clj | (ns ataru.form-store-spec
(:require [speclj.core :refer :all]
[clj-time.core :as t]
[ataru.fixtures.person-info-form :refer [form]]
[ataru.log.audit-log :as audit-log]
[ataru.forms.form-store :as store])
(:import
(clojure.lang ExceptionInfo)))
(defonce spec-sessio... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/spec/ataru/form_store_spec.clj | clojure | (ns ataru.form-store-spec
(:require [speclj.core :refer :all]
[clj-time.core :as t]
[ataru.fixtures.person-info-form :refer [form]]
[ataru.log.audit-log :as audit-log]
[ataru.forms.form-store :as store])
(:import
(clojure.lang ExceptionInfo)))
(defonce spec-sessio... | |
4533ad3c9505916d22b461afb056fe9ed78689998cf16f3d2b254c7ab914b763 | swannodette/logic-tutorial | tut3.clj | (ns logic-tutorial.tut3
(:refer-clojure :exclude [==])
(:use [clojure.core.logic]
[clojure.tools.macro :as macro]))
(defne righto [x y l]
([_ _ [x y . ?r]])
([_ _ [_ . ?r]] (righto x y ?r)))
(defn nexto [x y l]
(conde
((righto x y l))
((righto y x l))))
(defn zebrao [hs]
(macro/symbol-mac... | null | https://raw.githubusercontent.com/swannodette/logic-tutorial/923c4d946d82af4e8be25c8f98a3d0c589b7a020/src/logic_tutorial/tut3.clj | clojure | (ns logic-tutorial.tut3
(:refer-clojure :exclude [==])
(:use [clojure.core.logic]
[clojure.tools.macro :as macro]))
(defne righto [x y l]
([_ _ [x y . ?r]])
([_ _ [_ . ?r]] (righto x y ?r)))
(defn nexto [x y l]
(conde
((righto x y l))
((righto y x l))))
(defn zebrao [hs]
(macro/symbol-mac... | |
bb86b75d6b3589dea69b13fe8fdbc70fdd5765d619924199d5b1d28ee3f0b890 | hasufell/hsfm | MyView.hs | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... | null | https://raw.githubusercontent.com/hasufell/hsfm/322c766ae534fb21e3427d2845011123ddb90952/src/HSFM/GUI/Gtk/MyView.hs | haskell | }
# SOURCE #
|Creates a new tab with its own view and refreshes the view.
create eventbox with label
set initial history
close callback
It also initializes the callbacks.
set the bindings
add the treeview to the scroll container
|Switch the existing view in `MyView` with the one that the
io action returns.
cr... | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... |
22626b34df3bbad5693d741ad1753499af17f09cf804edab6f61cb333eff0ce0 | tamarin-prover/tamarin-prover | Lemma.hs | module Lemma (
LemmaAttribute(..)
, TraceQuantifier(..)
, ProtoLemma(..)
, DiffLemma(..)
, lemmaSourceKind
, addLeftLemma
, addRightLemma
, toSystemTraceQuantifier
, isSourceLemma
, isLeftLemma
, isRightLemma
, module Items.LemmaItem
, prettyLemma
, prettyLemmaName
, prettyLemmaAttribute
... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/958f8b1767650c06dffe4eba63a38508c9b17a7f/lib/theory/src/Lemma.hs | haskell | import Theory.Constraint.Solver
| The source kind allowed for a lemma.
Lemma queries
--------------------------------
| Convert a trace quantifier to a sequent trace quantifier.
| True iff the lemma can be used as a source lemma.
-- | True iff the lemma is a Both lemma.
isBothLemma lem =
| Pretty print the lemma... | module Lemma (
LemmaAttribute(..)
, TraceQuantifier(..)
, ProtoLemma(..)
, DiffLemma(..)
, lemmaSourceKind
, addLeftLemma
, addRightLemma
, toSystemTraceQuantifier
, isSourceLemma
, isLeftLemma
, isRightLemma
, module Items.LemmaItem
, prettyLemma
, prettyLemmaName
, prettyLemmaAttribute
... |
ca7797d90ed22106b5c3fcad094d8557221d67911659f65dcf80eed080f1d157 | leo-project/leofs | leo_nfs_state_behaviour.erl | %%======================================================================
%%
Leo Gateway
%%
Copyright ( c ) 2012 - 2018 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a... | null | https://raw.githubusercontent.com/leo-project/leofs/4ff701e0f4a4cf39a968dbe078b9c2412a22f995/apps/leo_gateway/src/leo_nfs_state_behaviour.erl | erlang | ======================================================================
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permis... | Leo Gateway
Copyright ( c ) 2012 - 2018 Rakuten , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(leo_nfs_state_... |
2d60567ae9d23cf12e893d67f9110f93af4e5bb8c8cc71bab456ee6913c900fa | jaked/orpc | gen_js_aux.mli |
* This file is part of orpc , OCaml signature to ONC RPC generator
* Copyright ( C ) 2008 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software F... | null | https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/src/generator/gen_js_aux.mli | ocaml |
* This file is part of orpc , OCaml signature to ONC RPC generator
* Copyright ( C ) 2008 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software F... | |
86224a151969999344bb5da9eea5673161ee07b95aa9f50ce847988404e8f227 | spectrum-finance/cardano-dex-contracts | POrder.hs | {-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE UndecidableInstances #
module ErgoDex.PContracts.POrder (
OrderRedeemer (..),
OrderAction (..),
) where
import qualified GHC.Generics as GHC
import Generics.SOP (Generic, I (I))
import qualified Plutarch.Prelude as P
import ... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-contracts/87bdbc26dbe9ae5f6c59e608d728330f8166f19c/cardano-dex-contracts-onchain/ErgoDex/PContracts/POrder.hs | haskell | # LANGUAGE ScopedTypeVariables # | # LANGUAGE UndecidableInstances #
module ErgoDex.PContracts.POrder (
OrderRedeemer (..),
OrderAction (..),
) where
import qualified GHC.Generics as GHC
import Generics.SOP (Generic, I (I))
import qualified Plutarch.Prelude as P
import Plutarch
import Plut... |
2002ef618312a3e82b1b64d02cd2d58806e8413f99898c98eaa6966885307b69 | Elzair/nazghul | tblit.scm | ;;----------------------------------------------------------------------------
;; tblit.scm - a terrain-blitting mech
;;----------------------------------------------------------------------------
;; A curried wrapper for kern-blit-map
(define (blit-map place x y w h map)
(kern-blit-map (kern-place-map place) x y ma... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/tblit.scm | scheme | ----------------------------------------------------------------------------
tblit.scm - a terrain-blitting mech
----------------------------------------------------------------------------
A curried wrapper for kern-blit-map
Do the blit upon receiving an "on" signal.
Blit mechs are not visible.
A blitter mech res... |
(define (blit-map place x y w h map)
(kern-blit-map (kern-place-map place) x y map 0 0 w h))
Syntactic sugar to set blitter state
(define (tblit-mk place-tag x y w h map-tag) (list place-tag x y w h map-tag))
(define (tblit-on kobj)
(apply blit-map (map safe-eval (kobj-gob-data kobj)))... |
d439e4c3c411fa2ad3b510a5c3ca9dd2a1a829d0d9ecf0349b2e882bfc776c26 | yakaz/yamerl | map.erl | -module(map).
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/construction/" ?MODULE_STRING ".yaml").
setup() ->
application:start(yamerl).
proplist_simple_test_() ->
{setup,
fun setup/0,
[
?_assertMatch(
[
[
{"first", [{"item", 1}]},
... | null | https://raw.githubusercontent.com/yakaz/yamerl/63e6f007565552faf662e303785992de4556ecf1/test/construction/map.erl | erlang | -module(map).
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/construction/" ?MODULE_STRING ".yaml").
setup() ->
application:start(yamerl).
proplist_simple_test_() ->
{setup,
fun setup/0,
[
?_assertMatch(
[
[
{"first", [{"item", 1}]},
... | |
e754ae764867a80b4dd9e4612c7d5e5df763885434ec760773173e7e2a41b7a2 | Eonblast/Scalaxis | learner.erl | 2009 - 2011 Zuse Institute Berlin ,
2009 - 2010 onScale solutions GmbH
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 appli... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/paxos/learner.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2009 - 2011 Zuse Institute Berlin ,
2009 - 2010 onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Part of a generic Paxos - Consensus implementation
-module(l... |
efc93602de453951e8f98a265fa9e6389b7ed08f384d997d31a571b8038ee487 | erlang-ls/erlang_ls | els_diagnostics_SUITE.erl | -module(els_diagnostics_SUITE).
%% CT Callbacks
-export([
suite/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
%% Test cases
-export([
atom_typo/1,
bound_var_in_pattern/1,
bound_var_in_pattern_cannot_parse/1,
compiler/1,
compiler_wi... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/4afd02260026295d9b8de7fda022e24eb2850089/apps/els_lsp/test/els_diagnostics_SUITE.erl | erlang | CT Callbacks
Test cases
==============================================================================
Includes
==============================================================================
==============================================================================
Types
========================================... | -module(els_diagnostics_SUITE).
-export([
suite/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([
atom_typo/1,
bound_var_in_pattern/1,
bound_var_in_pattern_cannot_parse/1,
compiler/1,
compiler_with_behaviour/1,
compiler_w... |
b04978aca9dd223dfe2ba9d933dc2ea7fa7f3fa12ce227c46d4610515dd7f3e5 | wireapp/wire-server | Effects.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/342ed3a72344f6756bbc525dabccdc23a62a7d58/services/galley/src/Galley/Effects.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program 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 PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Galley.Effects
* Effect... |
9acbfbe4c04a984811cb0fc64706c700a3555f109b517fa684514c6a2d09ba25 | TheLortex/mirage-monorepo | ctypes_bigarray.ml |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Ctypes_bigarray_stubs
l... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-ctypes/src/ctypes/ctypes_bigarray.ml | ocaml |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Ctypes_bigarray_stubs
l... | |
bb721da376d62a36c1c19b89cf762a0d1d5ef5ba72400aea8019255fcb185f73 | rabbitmq/ra | ra_log_snapshot.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @hidden
-module(ra_log_snapshot).
-behaviour(r... | null | https://raw.githubusercontent.com/rabbitmq/ra/f14cb0a6c64548558fdd6be15f726c8d121815a4/src/ra_log_snapshot.erl | erlang |
@hidden
DO nothing. There is no preparation for snapshotting
@doc
"RASN"
Version (byte)
MetaData (binary)
@end
no compression on meta data to make sure reading it is as fast
as possible
@doc reads the index and term from the snapshot file without reading the
entire binary body. NB: this does not do checksu... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_log_snapshot).
-behaviour(ra_snapshot).
-ex... |
6fd6256511d8679fa8706696bf0bf018848ecd5bd85e159752ac5524fb761e36 | wireapp/wire-server | BotUserView_provider.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BotUserView_provider.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program 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 PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Test.Wire.API.Golden.Gene... |
8380761824afdf00f2abf31230c3f53e64adff3094100c8a5e8569bcec8d9418 | jackfirth/planning | test.rkt | #lang racket/base
(module+ test
(require fancy-app
planning/multiset/action
planning/multiset/condition
planning/multiset/problem
racket/set
rackunit
rebellion/base/option
rebellion/base/range
rebellion/collection/entry
... | null | https://raw.githubusercontent.com/jackfirth/planning/b880f85effd4520e14b815d1dbe0ff7e71f4aaf8/multiset/test.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(module+ test
(require fancy-app
planning/multiset/action
planning/multiset/condition
planning/multiset/problem
racket/set
rackunit
rebellion/base/option
rebellion/base/range
rebellion/collection/entry
... |
7ffa397db5885621b5a32ce5bdcc360b093a4b0852680f44e71f98371a204613 | expipiplus1/vulkan | PointClippingBehavior.hs | {-# language CPP #-}
-- No documentation found for Chapter "PointClippingBehavior"
module Vulkan.Core11.Enums.PointClippingBehavior (PointClippingBehavior( POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES
, POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Core11/Enums/PointClippingBehavior.hs | haskell | # language CPP #
No documentation found for Chapter "PointClippingBehavior"
| VkPointClippingBehavior - Enum specifying the point clipping behavior
= See Also
| 'POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES' specifies that the primitive
is discarded if the vertex lies outside any clip plane, including the
planes bou... | module Vulkan.Core11.Enums.PointClippingBehavior (PointClippingBehavior( POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES
, POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
, ..
... |
2fef2089bb87fc5ec8900bf8d8b35f6626d0a8504fae735dcfa13458a9ec8caa | plumatic/grab-bag | test.clj | (ns lein-repo.test
(:require
[clojure.test :as ct]
[clojure.tools.namespace.find :as namespace-find]
[lazytest.tracker :as tracker]))
;; Import all clojure.test stuff
(doseq [v (keys (ns-publics (find-ns 'clojure.test)))]
(when-not (or (#{"deftest" "deftest-"} (name v))
(.startsWith ^Stri... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/external/lein-repo/src/lein_repo/test.clj | clojure | Import all clojure.test stuff
Following functions adapted from clojure.test
(println (all-ns))
lazytest is getting extraordinarily slow, use tools.namespace here for now.
(doseq [i init] (println "requiring" i) (require i)) | (ns lein-repo.test
(:require
[clojure.test :as ct]
[clojure.tools.namespace.find :as namespace-find]
[lazytest.tracker :as tracker]))
(doseq [v (keys (ns-publics (find-ns 'clojure.test)))]
(when-not (or (#{"deftest" "deftest-"} (name v))
(.startsWith ^String (name v) "*"))
(let [ct-sy... |
92e4b382f1c1126d4bbe1bde54642be094b47dcbceb0883636b10ef813aece61 | ocaml-community/obus | syntax_extension.ml |
* syntax_extension.ml
* -------------------
* Copyright : ( c ) 2009 - 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* syntax_extension.ml
* -------------------
* Copyright : (c) 2009-2010, Jeremie Dimino <>
* Licence : BSD3
*
* Thi... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/tests/syntax_extension.ml | ocaml | +-----------------------------------------------------------------+
| Type tests |
+-----------------------------------------------------------------+
Alias with type parameters
Alias with type paramters in an interface
Automatic generation of a record c... |
* syntax_extension.ml
* -------------------
* Copyright : ( c ) 2009 - 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* syntax_extension.ml
* -------------------
* Copyright : (c) 2009-2010, Jeremie Dimino <>
* Licence : BSD3
*
* Thi... |
1a7436495b33af2854b6821a1eda4821ac4b9c8ca170cceb1f99a1e3c7bb3b71 | JeremS/prose | lib_test.cljc | (ns fr.jeremyschoffen.prose.alpha.document.lib-test
(:require
#?(:clj [clojure.test :refer [deftest testing is are]]
:cljs [cljs.test :refer-macros [deftest testing is are]])
[fr.jeremyschoffen.prose.alpha.document.lib :as lib :include-macros true]))
(lib/def-xml-tag div :div)
(lib/def-xml-tag link)
... | null | https://raw.githubusercontent.com/JeremS/prose/c066e96e534ad0b44b63fe0c687fb63a94e06fb0/src/test/fr/jeremyschoffen/prose/alpha/document/lib_test.cljc | clojure | (ns fr.jeremyschoffen.prose.alpha.document.lib-test
(:require
#?(:clj [clojure.test :refer [deftest testing is are]]
:cljs [cljs.test :refer-macros [deftest testing is are]])
[fr.jeremyschoffen.prose.alpha.document.lib :as lib :include-macros true]))
(lib/def-xml-tag div :div)
(lib/def-xml-tag link)
... | |
406cf76b0e7f75d8590d557f17e312fea099326b45103610ec8ce17e5297882f | Gabriella439/pipes-concurrency | tests-main.hs | module Main ( main ) where
import Control.Concurrent hiding (yield)
import Control.Concurrent.Async
import Control.Monad (forever)
import Pipes
import Pipes.Concurrent
import qualified Pipes.Prelude as P
import System.Exit
import System.IO
import System.Timeout
defaultTimeout :: Int
1 second
labelPrint :: (Show a)... | null | https://raw.githubusercontent.com/Gabriella439/pipes-concurrency/0506d97c2de2bfd0948cb97c031c2eef3aed7ae3/tests/tests-main.hs | haskell | module Main ( main ) where
import Control.Concurrent hiding (yield)
import Control.Concurrent.Async
import Control.Monad (forever)
import Pipes
import Pipes.Concurrent
import qualified Pipes.Prelude as P
import System.Exit
import System.IO
import System.Timeout
defaultTimeout :: Int
1 second
labelPrint :: (Show a)... | |
7680a26d9b193606b3ac2de26ac92ca922ce2affafdb16e34e758ed05fb57a98 | Lambda-X/cljs-repl-web | utils.cljc | (ns cljs-api.utils)
(defrecord Section [title additional-info topics])
(defrecord Topic [title symbols])
;;; A map of sections and topics we want to display in our API panel.
;;; We can easily add or remove sections/topics and they will be automatically
;;; displayed in the API panel.
(def custom-api-map
{:sections... | null | https://raw.githubusercontent.com/Lambda-X/cljs-repl-web/0dabe8ff18d8c0f4ae6c9f052dc23eb1f5ad262c/src/clj/cljs_api/utils.cljc | clojure | A map of sections and topics we want to display in our API panel.
We can easily add or remove sections/topics and they will be automatically
displayed in the API panel. | (ns cljs-api.utils)
(defrecord Section [title additional-info topics])
(defrecord Topic [title symbols])
(def custom-api-map
{:sections [(Section. "Useful Functions" {:type :symbols}
[(Topic. "math"
'(+ - * / quot rem mod inc dec max min rand))
... |
6ba4b7979b00df8368d72904089324991d91b4f5f646b3a74584e1614cccffcf | ghollisjr/cl-ana | package.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana 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 ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/binary-tree/package.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana 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 GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
86f1067f768552b094a8977e85bbb6a0e1b7a5632d9b6f85242bf29ff04b89a4 | input-output-hk/cardano-rt-view | CLI.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
module Cardano.RTView.CLI
( RTViewParams (..)
, defaultRTViewParams
, defaultRTVConfig
, defaultRTVNotifications
, defaultRTVStatic
, defaultRTVPort
, defaultRTVActiveNodeLife
, parseRTViewParams
) where
import Da... | null | https://raw.githubusercontent.com/input-output-hk/cardano-rt-view/0ff669a5acc8d81a35aa5a924cbb79978d0999a8/src/Cardano/RTView/CLI.hs | haskell | # LANGUAGE DeriveAnyClass #
| Type for CLI parameters required for the service.
Aux parsers | # LANGUAGE DeriveGeneric #
module Cardano.RTView.CLI
( RTViewParams (..)
, defaultRTViewParams
, defaultRTVConfig
, defaultRTVNotifications
, defaultRTVStatic
, defaultRTVPort
, defaultRTVActiveNodeLife
, parseRTViewParams
) where
import Data.Aeson (FromJSON (..), ToJSON,... |
89f18a849ff227e4cf9166a2d02103ec103c21c62a59e73b60588c9bad84cbf3 | Opetushallitus/ataru | button_component.cljs | (ns ataru.application-common.components.button-component
(:require [schema.core :as s]))
(s/defschema AriaAttributes
{:aria-haspopup (s/eq "listbox")
(s/optional-key :aria-expanded) (s/eq true)})
(s/defn button
[{:keys [label
on-click
aria-attrs
data-test-id
... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/1f63b48743f88233d556f2d0008053625e18b046/src/cljs/ataru/application_common/components/button_component.cljs | clojure | (ns ataru.application-common.components.button-component
(:require [schema.core :as s]))
(s/defschema AriaAttributes
{:aria-haspopup (s/eq "listbox")
(s/optional-key :aria-expanded) (s/eq true)})
(s/defn button
[{:keys [label
on-click
aria-attrs
data-test-id
... | |
fd52dd18798812c8454d76d0dd82ca599855cc2617427cfc8f2ceec3cbaa48af | ocaml-sf/learn-ocaml-corpus | prelude.ml | module type GenericTrie = sig
type 'a char_table
type 'a trie = Trie of 'a option * 'a trie char_table
val empty : unit -> 'a trie
val insert : 'a trie -> string -> 'a -> 'a trie
val lookup : 'a trie -> string -> 'a option
end
| null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week6/seq3/ex1/prelude.ml | ocaml | module type GenericTrie = sig
type 'a char_table
type 'a trie = Trie of 'a option * 'a trie char_table
val empty : unit -> 'a trie
val insert : 'a trie -> string -> 'a -> 'a trie
val lookup : 'a trie -> string -> 'a option
end
| |
8487b6798ecca161bc4c5a0dd7a8d0afd92ceca66857f53a531874b41fd3c163 | OCamlPro/ocp-build | process.mli | (**************************************************************************)
(* *)
(* Typerex Libraries *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-system/process.mli | ocaml | ************************************************************************
Typerex Libraries
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
type t = {
}
val create :
?info:string -> ?stdout:string -> ?stderr:string -> ?env:string array
-> string -> string list -> t
type result = {
}
val wait : t -> r... |
3fed3b1e3bb0864b495e6e4f52289d301deaf931d9c11070b21297c03ff163a1 | hanshuebner/bos | tiled-index.lisp | (in-package :bos.m2)
;;;; XXX Dokumentation aus der alten Implementation
;;;; TILE
;;;;
Kacheln sind per x - y - Koordinate ansprechbare .
An Kacheln koennen verschiedene , diese sind von
Unterklassen festzulegen .
;;;;
Kacheln sind transiente Objekte , die lazy , als nur bei Bedarf , angelegt
werden .... | null | https://raw.githubusercontent.com/hanshuebner/bos/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/m2/tiled-index.lisp | lisp | XXX Dokumentation aus der alten Implementation
TILE
addressiert.
assume quadratic tiles | (in-package :bos.m2)
Kacheln sind per x - y - Koordinate ansprechbare .
An Kacheln koennen verschiedene , diese sind von
Unterklassen festzulegen .
Kacheln sind transiente Objekte , die lazy , als nur bei Bedarf , angelegt
werden . So , fuer das gesamte Vergabegebiet Kachelobjekte
i m zu .
K... |
d556e9197d2fcb184bbf44d8d03871fc1ce283028faa090df2499567ea18f9df | evincarofautumn/kitten | Data.hs | |
Module : Kitten . . Data
Description : Desugaring data type constructors
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.Desugar.Data
Description : Desugaring data type constructors
Copyright : (c) Jon Purdy, ... | null | https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Desugar/Data.hs | haskell |
> type Optional<T>:
> case none
> case some (T)
>
> // =>
>
> define none<T> (-> Optional<T>) { ... }
> define some<T> (T -> Optional<T>) { ... } | |
Module : Kitten . . Data
Description : Desugaring data type constructors
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.Desugar.Data
Description : Desugaring data type constructors
Copyright : (c) Jon Purdy, ... |
5778ae2dbc10aff4f2333576486fd3ebdd7fb86c5e17d77764601f1551a40f2d | evilmartians/foundry | assoc.ml | open Sexplib.Std
open Unicode.Std
type ('a, 'b) t = (string * 'a) list
and sequental
and sorted
and 'a sequental_t = ('a, sequental) t
and 'a sorted_t = ('a, sorted) t
with sexp_of
let eq a b =
(fst a) = (fst b)
let cmp a b =
compare (fst a) (fst b)
let empty = []
let sequental lst =
lst
let sort... | null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/src/support/assoc.ml | ocaml | open Sexplib.Std
open Unicode.Std
type ('a, 'b) t = (string * 'a) list
and sequental
and sorted
and 'a sequental_t = ('a, sequental) t
and 'a sorted_t = ('a, sorted) t
with sexp_of
let eq a b =
(fst a) = (fst b)
let cmp a b =
compare (fst a) (fst b)
let empty = []
let sequental lst =
lst
let sort... | |
9adc3f85e02829d90005ca402a84f9a4054ece0e7e0b74868519791341afeead | finnishtransportagency/harja | ilmoitustoimenpiteet.clj | (ns harja.palvelin.integraatiot.tloik.ilmoitustoimenpiteet
(:require [taoensso.timbre :as log]
[harja.kyselyt.tieliikenneilmoitukset :as ilmoitukset]
[harja.kyselyt.konversio :as konversio]
[harja.palvelin.integraatiot.tloik.sanomat.ilmoitustoimenpide-sanoma :as toimenpide-sanoma]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/60aa4d24311fd7bf0388f05e1ccdc77c5464753d/src/clj/harja/palvelin/integraatiot/tloik/ilmoitustoimenpiteet.clj | clojure | (ns harja.palvelin.integraatiot.tloik.ilmoitustoimenpiteet
(:require [taoensso.timbre :as log]
[harja.kyselyt.tieliikenneilmoitukset :as ilmoitukset]
[harja.kyselyt.konversio :as konversio]
[harja.palvelin.integraatiot.tloik.sanomat.ilmoitustoimenpide-sanoma :as toimenpide-sanoma]
... | |
1649cced7dd0f3633654eb602f221f3f6193b96e0472089e7a199bf8a288d44d | everpeace/programming-erlang-code | server3.erl | -module(server3).
-export([start/2, rpc/2, swap_code/2]).
start(Name, Mod) ->
register(Name,
spawn(fun() -> loop(Name,Mod,Mod:init()) end)).
swap_code(Name, Mod) -> rpc(Name, {swap_code, Mod}).
rpc(Name, Request) ->
Name ! {self(), Request},
receive
{Name, Response} -> Response
end.
l... | null | https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/server3.erl | erlang | -module(server3).
-export([start/2, rpc/2, swap_code/2]).
start(Name, Mod) ->
register(Name,
spawn(fun() -> loop(Name,Mod,Mod:init()) end)).
swap_code(Name, Mod) -> rpc(Name, {swap_code, Mod}).
rpc(Name, Request) ->
Name ! {self(), Request},
receive
{Name, Response} -> Response
end.
l... | |
8dbae82ac7ba74eb3b06a5475cd6b46d81d32356b5673e2ee08bce7e2c975053 | skanev/playground | 19.scm | EOPL exercise 1.19
;
( list - set lst n x ) returns a list like lst , except that the n - th element ,
using zero - based indexing , is x.
;
> ( list - set ' ( a b c d ) 2 ' ( 1 2 ) )
( a b ( 1 2 ) d )
> ( list - ref ( list - set ' ( a b c d ) 3 ' ( 1 5 10 ) ) 3 )
; (1 5 10)
(define (list-set lst n x)
(i... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/19.scm | scheme |
(1 5 10) | EOPL exercise 1.19
( list - set lst n x ) returns a list like lst , except that the n - th element ,
using zero - based indexing , is x.
> ( list - set ' ( a b c d ) 2 ' ( 1 2 ) )
( a b ( 1 2 ) d )
> ( list - ref ( list - set ' ( a b c d ) 3 ' ( 1 5 10 ) ) 3 )
(define (list-set lst n x)
(if (zero? n)
... |
47b00601afc4cdc416382da2c0d0b4fd7debf6b392bef9324fe1a9e40d1cacb4 | jbracker/supermonad | Main.hs |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/original/Main.hs | haskell | Standard library imports
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Leading path and base name.
Crude (will not always work), but good enough for this compiler.
Crude (will not always work), but good enoug... |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... |
b48c5a4e73c214d698540c836fc621045b1cd41a1fadc99e9ee8543a741ad483 | RobYang1024/OCaMOSS | intset1.ml | (* Abstraction Function: [[x_1, ..., x_n]] represents the set
* ${x_1, ..., x_n}$.
* Representation Invariant: [[x_1, ..., x_n]] must form a strictly increasing
* sequence. That is, the list should be sorted with no duplicates.
*)
type t =
int list
let rep_ok s =
if s = List.sort_uniq compare s then
s
... | null | https://raw.githubusercontent.com/RobYang1024/OCaMOSS/090d31e8c4498ac3b9b74768fe011b924b2105ab/tests/test1/intset1.ml | ocaml | Abstraction Function: [[x_1, ..., x_n]] represents the set
* ${x_1, ..., x_n}$.
* Representation Invariant: [[x_1, ..., x_n]] must form a strictly increasing
* sequence. That is, the list should be sorted with no duplicates.
| type t =
int list
let rep_ok s =
if s = List.sort_uniq compare s then
s
else
failwith "RI"
let empty =
[] |> rep_ok
let size s =
List.length (rep_ok s)
let insert x s =
List.sort_uniq compare (x :: rep_ok s) |> rep_ok
let member x s =
List.mem x (rep_ok s)
let remove x s =
List.filter (fu... |
c11db023c288c5e4b21ff75bcad154a67abae2594ae3d1ac648ccca0e2a08e75 | thegeez/clj-board | fixtures.clj | (ns net.thegeez.clj-board.database.fixtures
(:require [com.stuartsierra.component :as component]
[io.pedestal.log :as log]
[clojure.java.jdbc :as jdbc]
[net.thegeez.clj-board.boards :as boards]))
(defn create-demo-board [db user-id]
(let [now (.getTime (java.util.Date.))
... | null | https://raw.githubusercontent.com/thegeez/clj-board/e162d6097ce7b66438f7529418bf48af66e34fa8/src/clj/net/thegeez/clj_board/database/fixtures.clj | clojure | (ns net.thegeez.clj-board.database.fixtures
(:require [com.stuartsierra.component :as component]
[io.pedestal.log :as log]
[clojure.java.jdbc :as jdbc]
[net.thegeez.clj-board.boards :as boards]))
(defn create-demo-board [db user-id]
(let [now (.getTime (java.util.Date.))
... | |
01714924c12de0a47fcac0942affb362fcc39671769cdbcdc710e7b4bc16c442 | vincenthz/hs-gauge | SpecFunctions.hs | module Numeric.SpecFunctions ( module X ) where
import Numeric.SpecFunctions.Internal as X
| null | https://raw.githubusercontent.com/vincenthz/hs-gauge/496a8b99e7fee3039fd89ecef7305d31eb5d5a6d/math-functions/Numeric/SpecFunctions.hs | haskell | module Numeric.SpecFunctions ( module X ) where
import Numeric.SpecFunctions.Internal as X
| |
16175124d76091ba92aa1676ef685524ef8ee15d9ba557bf8fe0f83db48e3574 | well-typed-lightbulbs/ocaml-esp32 | test7_plugin.ml | let () =
print_int (42 : Test7_interface_only.t)
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-dynlink-initializers/test7_plugin.ml | ocaml | let () =
print_int (42 : Test7_interface_only.t)
| |
babf0d659b29f161f316c8c7d955251451c706a39fdfcdf96d0bef48b8f6f86c | ThoughtWorksInc/stonecutter | change_profile.clj | (ns stonecutter.view.change-profile
(:require [net.cgrand.enlive-html :as html]
[stonecutter.routes :as r]
[stonecutter.view.view-helpers :as vh]))
(def form-row-error-css-class "form-row--invalid")
(def error-translations
{:first-name {:blank "content:index/register-first-name-bl... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/view/change_profile.clj | clojure | (ns stonecutter.view.change-profile
(:require [net.cgrand.enlive-html :as html]
[stonecutter.routes :as r]
[stonecutter.view.view-helpers :as vh]))
(def form-row-error-css-class "form-row--invalid")
(def error-translations
{:first-name {:blank "content:index/register-first-name-bl... | |
90c6d0d7f4dbe2ae573a8a1cd3199537edf35a829abda08b506f94bae56218f1 | solita/laundry | fixture.clj | (ns laundry.test.fixture
(:require
[laundry.machines :as machines]
[laundry.server :as server]
[peridot.multipart])
(:import
(org.apache.http.entity.mime MultipartEntity)
(org.apache.http.entity.mime.content ByteArrayBody)))
(def test-conf
{:tools "programs"})
(defn get-app-with [conf]
(let [ap... | null | https://raw.githubusercontent.com/solita/laundry/4e1fe96ebae19cde14c3ba5396929ba1578b7715/test/laundry/test/fixture.clj | clojure | fixture for invoking peridot.multipart/build with strings converted to files | (ns laundry.test.fixture
(:require
[laundry.machines :as machines]
[laundry.server :as server]
[peridot.multipart])
(:import
(org.apache.http.entity.mime MultipartEntity)
(org.apache.http.entity.mime.content ByteArrayBody)))
(def test-conf
{:tools "programs"})
(defn get-app-with [conf]
(let [ap... |
c7a56f7226a3a5094a83696e865b77caa507050234d2e7db9fe9ab16a0fb7e72 | o1-labs/ppx_version | bad_version_syntax_multiple_errors.ml | [@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving vers... | null | https://raw.githubusercontent.com/o1-labs/ppx_version/74df914452b6ea324020fd4a8780ce196f1bf14a/test/expect/bad_version_syntax_multiple_errors.ml | ocaml | [@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving version if deriving bin_io"]
[@@@ocaml.ppwarning "Must have deriving vers... | |
9197af7fb34e9d21bc3c5d616932df212787b4b6cbb4041c0105a1835f221746 | sol/tinc | InstallSpec.hs | # LANGUAGE ImplicitParams #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
module Tinc.InstallSpec (spec) where
import Helper
import MockedEnv
import MockedProcess
import Test.Mockery.Action
import Data.List
import ... | null | https://raw.githubusercontent.com/sol/tinc/427df659df20d548bbe4c7bd0ea76cc13de40238/test/Tinc/InstallSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ImplicitParams #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
module Tinc.InstallSpec (spec) where
import Helper
import MockedEnv
import MockedProcess
import Test.Mockery.Action
import Data.List
import Data.Version (makeVersion)
import ... |
e70c7ff86a1f80fa231e727a334f231269cc42fd149f9714e470be1a5bbc651b | mbenke/zpf2013 | IORef4.hs | import Data.IORef
import Control.Concurrent
import Control.Applicative((<$>),(<*),(*>))
incRef :: IORef Int -> IO ()
incRef var = do { val <- readIORef var
; threadDelay 1000
; writeIORef var (val+1) }
lock :: MVar () -> IO ()
lock = takeMVar
unlock :: MVar () -> IO ()
unlock... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Concur/IORef4.hs | haskell | import Data.IORef
import Control.Concurrent
import Control.Applicative((<$>),(<*),(*>))
incRef :: IORef Int -> IO ()
incRef var = do { val <- readIORef var
; threadDelay 1000
; writeIORef var (val+1) }
lock :: MVar () -> IO ()
lock = takeMVar
unlock :: MVar () -> IO ()
unlock... | |
b9b726016a6895c444dc365c027162c1e205a450a5d9615726247339090d5a06 | gren-lang/compiler | NonEmptyList.hs | module Data.NonEmptyList
( List (..),
singleton,
toList,
fromList,
sortBy,
)
where
import Control.Monad (liftM2)
import Data.Binary (Binary, get, put)
import Data.List qualified as List
-- LIST
data List a
= List a [a]
singleton :: a -> List a
singleton a =
List a []
toList :: List a -> [a]... | null | https://raw.githubusercontent.com/gren-lang/compiler/17b237524942c95f11106301ff6beac76b3e190b/compiler/src/Data/NonEmptyList.hs | haskell | LIST
INSTANCES
SORT BY
BINARY | module Data.NonEmptyList
( List (..),
singleton,
toList,
fromList,
sortBy,
)
where
import Control.Monad (liftM2)
import Data.Binary (Binary, get, put)
import Data.List qualified as List
data List a
= List a [a]
singleton :: a -> List a
singleton a =
List a []
toList :: List a -> [a]
toList ... |
e9d5f703dc00acb9427755c7c5c7f833316e91dbadcae7e18093088f7d9c030f | jacius/lispbuilder | vertices.lisp | ;;;;; Converted from the "Vertices" Processing example at:
;;;;; ""
;;;;; (C)2006 Luke J Crook
(in-package #:sdl-gfx-examples)
(defun vertices ()
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:window width height :title-caption "Vertices, from Processing.org")
(setf (sdl:frame-rate) 5)
... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl-gfx/examples/vertices.lisp | lisp | Converted from the "Vertices" Processing example at:
""
(C)2006 Luke J Crook
We can use a point or an x/y spread as the vertex parameter
Here we use x/y spread as the vertex parameters
Here we use a point as the vertex parameter
Here we use x/y spread as the vertex parameters
Here we use a point as the vertex p... |
(in-package #:sdl-gfx-examples)
(defun vertices ()
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:window width height :title-caption "Vertices, from Processing.org")
(setf (sdl:frame-rate) 5)
(sdl:clear-display (sdl:color))
(sdl:with-surface (disp sdl:*default-display*)
(sdl:w... |
e7145f66be2096ec916674a60eebafacaa93139c23921adb6b690ede276bf645 | bef/poc-apps | fast_agi_server.erl | %%%
%%% This library is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
%%%
%%% This library is distributed in the hope th... | null | https://raw.githubusercontent.com/bef/poc-apps/754c308f0f170a3dd766f828fff7081122867f8b/lib/erlast/lib/fast_agi/src/fast_agi_server.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library 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 GNU... | License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
Created : 22 Feb 2006 by
@... |
c6a451eef998cdee897e3bea8db319df3e02753d735750da326c8a080faa3c59 | snoyberg/why-you-should-use-stm | exercise.hs | #!/usr/bin/env stack
-- stack --resolver lts-13.21 script
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Parse
import Network.Wai.Handler.Warp
import Network.HTTP.Types
import Control.Concurrent.STM
import Data.ByteString.Builder (byteString)
import Control.Concurrent (threadDelay)
import GHC.... | null | https://raw.githubusercontent.com/snoyberg/why-you-should-use-stm/adf3366aebd6daf1dd702ed4cad1c2303d296afc/exercises/10-long-polling/exercise.hs | haskell | stack --resolver lts-13.21 script
# LANGUAGE OverloadedStrings #
needs to be mutable somehow
Modify the status
Get the current status
We'd like some mutability and blocking please | #!/usr/bin/env stack
import Network.Wai
import Network.Wai.Parse
import Network.Wai.Handler.Warp
import Network.HTTP.Types
import Control.Concurrent.STM
import Data.ByteString.Builder (byteString)
import Control.Concurrent (threadDelay)
import GHC.Conc
main :: IO ()
main = do
run 3000 $ \req send ->
case pathIn... |
270b6153297dcaf6d1556373dec7912a11ceb094cc0b7c789001a2797dfecfb8 | alanz/ghc-exactprint | RAE_T32a.hs | # LANGUAGE TemplateHaskell , RankNTypes , TypeOperators , DataKinds ,
PolyKinds , TypeFamilies , GADTs , TypeInType #
PolyKinds, TypeFamilies, GADTs, TypeInType #-}
module RAE_T32a where
import Data.Kind
data family Sing (k :: Type) :: k -> Type
data TyArr' (a :: Type) (b :: Type) :: Typ... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/RAE_T32a.hs | haskell | I (RAE) believe this last definition is ill-typed. | # LANGUAGE TemplateHaskell , RankNTypes , TypeOperators , DataKinds ,
PolyKinds , TypeFamilies , GADTs , TypeInType #
PolyKinds, TypeFamilies, GADTs, TypeInType #-}
module RAE_T32a where
import Data.Kind
data family Sing (k :: Type) :: k -> Type
data TyArr' (a :: Type) (b :: Type) :: Typ... |
616ddf64fcb7869f03f09c94ce7c8a3b4bdc4de9ca4b5d9cd13a3cdcaf28a58e | GillianPlatform/Gillian | z3_encoding.mli | (** [check_sat_core pfs gamma]
checks whether or not the pure formulae [pfs] are satisfiable
under the typing environment [gamma]. If this is the case,
the function returns the appropriate z3 model. *)
val check_sat_core :
Gil_syntax.Formula.Set.t ->
(string, Gil_syntax.Type.t) Hashtbl.t ->
Z3.Model.m... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/5c050734bb496e1c2f6489324a30e2c553d5ba0a/GillianCore/z3/z3_encoding.mli | ocaml | * [check_sat_core pfs gamma]
checks whether or not the pure formulae [pfs] are satisfiable
under the typing environment [gamma]. If this is the case,
the function returns the appropriate z3 model. | val check_sat_core :
Gil_syntax.Formula.Set.t ->
(string, Gil_syntax.Type.t) Hashtbl.t ->
Z3.Model.model option
val check_sat :
Gil_syntax.Formula.Set.t -> (string, Gil_syntax.Type.t) Hashtbl.t -> bool
* [ lift_z3_model model gamma update_subst target_vars ]
attempts to lift the variables [ target_vars ... |
91d5a2635057c554e80e79a78018002f10f7a9d671c09f72fc72d778f16d880a | TDacik/Deadlock | trace_utils.mli | module Callstack : sig
type path_taken =
| Then
| Else
| Then_nondet
| Else_nondet
type event =
| Thread_entry of Thread.t
| Call of Cil_types.stmt * Cil_types.fundec
| Guard of Cil_types.stmt * path_taken
| Action of Cil_types.stmt * string
type t = event list
exception Em... | null | https://raw.githubusercontent.com/TDacik/Deadlock/ebf36f841a2c8d725a3e259a45d15fadc664b633/src/utils/trace_utils.mli | ocaml | * compare_abstr with_action n cs1 cs2 compare prefixes of length n
and possibly the action stmt.
* {2 Callstack }
* {2 Accessors }
* Return all guards in the current function | module Callstack : sig
type path_taken =
| Then
| Else
| Then_nondet
| Else_nondet
type event =
| Thread_entry of Thread.t
| Call of Cil_types.stmt * Cil_types.fundec
| Guard of Cil_types.stmt * path_taken
| Action of Cil_types.stmt * string
type t = event list
exception Em... |
3ccbcabe5bddbb1fc3f8ded0af6578c99bf902b9aea1cd1e1d0533f27a18ef4f | arttuka/reagent-material-ui | scoreboard_outlined.cljs | (ns reagent-mui.icons.scoreboard-outlined
"Imports @mui/icons-material/ScoreboardOutlined as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def scoreboard-outline... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/scoreboard_outlined.cljs | clojure | (ns reagent-mui.icons.scoreboard-outlined
"Imports @mui/icons-material/ScoreboardOutlined as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def scoreboard-outline... | |
de51cf20791d3923e4f06786364e7e84a939baa423bbf285f8824eb7278b36eb | IvanIvanov/fp2013 | calc-tax-test.scm | ;;; This file contains unit tests for the problem listed in the name
;;; of this file.
;;;
;;; To run the tests specify the relative or absolute path to the
;;; ".scm" file with the proposed solution in the (load ...) command
;;; below. Then you can either open the tests and run them in Racket
( with R5RS set as the ... | null | https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab2-and-3/homework1/calc-tax-test.scm | scheme | This file contains unit tests for the problem listed in the name
of this file.
To run the tests specify the relative or absolute path to the
".scm" file with the proposed solution in the (load ...) command
below. Then you can either open the tests and run them in Racket
directly from the command line:
plt-r5... | ( with R5RS set as the language ) , or you can run the following
assuming 's bin directory is included in the PATH environment
(load "calc-tax.scm")
(define (__make-counter x)
(lambda ()
(set! x (+ x 1))
x))
(define __test-counter (__make-counter 0))
(define (__test-passed)
(display (string-a... |
85bc3a1bbc8de49100d1c888cff3847ce2671f9b4749303c7bdf241e3f57f5c9 | factisresearch/mq-demo | StreamTest3.hs | import qualified System.IO.Streams as Streams
-- Already available
fromList :: [c] -> IO (Streams.InputStream c)
fromList l = Streams.fromGenerator (gen l)
where
gen = mapM_ Streams.yield
| null | https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/talk-cufp2014/code/StreamTest3.hs | haskell | Already available | import qualified System.IO.Streams as Streams
fromList :: [c] -> IO (Streams.InputStream c)
fromList l = Streams.fromGenerator (gen l)
where
gen = mapM_ Streams.yield
|
2dfe43bdd9c8175739c27ad53afff8116353a4463af4923e6ae7a1cedf86f587 | bjpop/haskell-mpi | AllToAll.hs | {-# LANGUAGE ForeignFunctionInterface, ScopedTypeVariables #-}
module Main where
import Control.Parallel.MPI.Fast
import Foreign (sizeOf)
import Foreign.C.Types
import Text.Printf
import Control.Monad
import System.Time
import Data.IORef
import Data.Array.Storable
benchmark="OSU MPI All-to-All Personalized Exchange L... | null | https://raw.githubusercontent.com/bjpop/haskell-mpi/1a4e6f0ed20c7b0760344640f1ba5f2141e61719/test/examples/speed/AllToAll.hs | haskell | # LANGUAGE ForeignFunctionInterface, ScopedTypeVariables #
align_size <- getPageSize | module Main where
import Control.Parallel.MPI.Fast
import Foreign (sizeOf)
import Foreign.C.Types
import Text.Printf
import Control.Monad
import System.Time
import Data.IORef
import Data.Array.Storable
benchmark="OSU MPI All-to-All Personalized Exchange Latency Test"
max_msg_size = 2^20
skip_normal = 300
iterations_... |
bdd4f4aaee0214ba8bb3e66da88001a7aeb5ee624d589994b14e096ef36e5959 | Liutos/Project-Euler | pro17.lisp | (defun pro17 (n)
(let ((cnt 0))
(loop
:for i from 1 upto n
:do (incf cnt (count-if #'(lambda (c)
(and (char/= #\Space c)
(char/= #\- c)))
(format nil "~R" i))))
cnt)) | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/pro17.lisp | lisp | (defun pro17 (n)
(let ((cnt 0))
(loop
:for i from 1 upto n
:do (incf cnt (count-if #'(lambda (c)
(and (char/= #\Space c)
(char/= #\- c)))
(format nil "~R" i))))
cnt)) | |
5f779e83653b865aa53b5673e69a7968f226ace115b51ca9ba0daa38b45de208 | dbuenzli/remat | rect.ml | ---------------------------------------------------------------------------
Copyright 2012 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Copyright... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-remat/rect.ml | ocaml | Functions.
Predicates and comparisons
Printers. | ---------------------------------------------------------------------------
Copyright 2012 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Copyright... |
c3c11a8e6480c4a2f8e05d60f7394048688d2e39d5ec60ea4e481549ed0a7714 | ghcjs/ghcjs-boot | Unicode.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
Module :
Copyright : ( c ) The University of Glasgow , 2003
-- License : see libraries/base/LICENSE
--
-- Maintainer : ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/GHC/Unicode.hs | haskell | # OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Implementations for the character predicates (isLower, isUpper, etc.)
and the conversions (toUpper, toLower). The implementat... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
Module :
Copyright : ( c ) The University of Glasgow , 2003
Portability : non - portable ( GHC extensions )
module GHC.Unicode (
isAscii, isLatin1, isControl,
isAsciiUpper, isAsciiLower,
isPrint, isSpace, isUp... |
8ff7efa63146e244222a08585caed381c2dc3d3581179c57cfbf7025eda1e5a1 | bondy-io/bondy | bondy_retained_message_SUITE.erl | %% =============================================================================
%% bondy_retained_message_SUITE.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with ... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/test/bondy_retained_message_SUITE.erl | erlang | =============================================================================
bondy_retained_message_SUITE.erl -
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 W... | Copyright ( c ) 2016 - 2022 Leapsight . 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(bondy_retained_message_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/inclu... |
c3603a7e05ebe8efeb701c0abe311b7dcc4dd1e1ce287eea0dfb35410410b1ee | ivan-m/graphviz | AlgorithmsSpec.hs | |
Module : Data . GraphViz . AlgorithmsSpec
Description : Testing algorithms
Copyright : ,
License :
Module : Data.GraphViz.AlgorithmsSpec
Description : Testing algorithms
Copyright : Matthew Sackman, Ivan Lazar Miljenovic
License : BSD3
Mai... | null | https://raw.githubusercontent.com/ivan-m/graphviz/42dbb6312d7edf789d7055079de7b4fa099a4acc/tests/Data/GraphViz/AlgorithmsSpec.hs | haskell | ------------------------------------------------------------------------------ | |
Module : Data . GraphViz . AlgorithmsSpec
Description : Testing algorithms
Copyright : ,
License :
Module : Data.GraphViz.AlgorithmsSpec
Description : Testing algorithms
Copyright : Matthew Sackman, Ivan Lazar Miljenovic
License : BSD3
Mai... |
4cd835c0e5126c6f44102cce227dfabf659dc7fa2e40ef07714d4c0732299c56 | SamuelSchlesinger/commander-cli | good.hs | import Commander
import System.Process
main :: IO ()
main = command_ . toplevel @"good" $ raw $ callProcess "say" ["feels good man"]
| null | https://raw.githubusercontent.com/SamuelSchlesinger/commander-cli/8df5317db8d3e1a4d6ae49bab4f2e63710db81b7/examples/good.hs | haskell | import Commander
import System.Process
main :: IO ()
main = command_ . toplevel @"good" $ raw $ callProcess "say" ["feels good man"]
| |
d10c0f126f4d50f2e1fd24c5ff74d77e06d936f17b8ec81997b92103c1a0f3bc | mmottl/aifad | model_data.mli | open Algdt_types
open Model_types
type missing_value = Ignore | MProb | Flat | LiftAll
type c45_spec = (tp_name * cnstr_names) array * cnstr_names * string * string
type c45_model_data = c45_spec * ispec_info * ispec_info * missing_value * model
type model_data = ispec_info * ispec_info * model
type mdat = [ `Model of... | null | https://raw.githubusercontent.com/mmottl/aifad/b06786f5cd60992548405078a903ee3d962ea969/src/model_data.mli | ocaml | open Algdt_types
open Model_types
type missing_value = Ignore | MProb | Flat | LiftAll
type c45_spec = (tp_name * cnstr_names) array * cnstr_names * string * string
type c45_model_data = c45_spec * ispec_info * ispec_info * missing_value * model
type model_data = ispec_info * ispec_info * model
type mdat = [ `Model of... | |
e563bd445d45b61bde09e4cb9f4d016516a577a2438b29d330c464e93b2bbea8 | uncomplicate/bayadera | opencl.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/bayadera/4105fd0e02bbe1cb19b9413f454075d61def6945/src/clojure/uncomplicate/bayadera/opencl.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.bayadera.opencl
(:require [uncomplicate.clojurecl.core :refer [with-default *context* *command-queue*]]
[uncomplicate.bayadera
[core :refer [with-bayadera *bayadera-factory*]]
[library ... |
5c8d509db6539e75845d9c695a070a4ebb691437052b68836c9bf1de65a8aab7 | themetaschemer/malt | test-A-scalar-ops.rkt | (module+ test
(require rackunit)
(require (only-in "../tensors.rkt" tensor))
;; Check basic numericals
(let ((a 2)
(b 3))
(check-ρ-∇ (d+ a b) 5 (list 1.0 1.0))
(check-ρ-∇ (d- a b) -1 (list 1.0 -1.0))
(check-ρ-∇ (d* a b) 6 (list 3.0 2.0))
(check-ρ-∇ (d/ a b)
2/3
... | null | https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/flat-tensors/ext-ops/test/test-A-scalar-ops.rkt | racket | Check basic numericals
Check numericals with vector-duals
Check numericals with lists | (module+ test
(require rackunit)
(require (only-in "../tensors.rkt" tensor))
(let ((a 2)
(b 3))
(check-ρ-∇ (d+ a b) 5 (list 1.0 1.0))
(check-ρ-∇ (d- a b) -1 (list 1.0 -1.0))
(check-ρ-∇ (d* a b) 6 (list 3.0 2.0))
(check-ρ-∇ (d/ a b)
2/3
'(0.3333333333333333 -0... |
a643a626141eaf23201c3404593dc37701430a4e9a7b4ec7d364d8173f8cfe0a | penpot/penpot | common.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.viewer.inspect.attributes.common
(:require
[app.main.refs :as refs]
[app.main.store :a... | null | https://raw.githubusercontent.com/penpot/penpot/b8043a9755b3effcff0dffa99b0cec85c307531f/frontend/src/app/main/ui/viewer/inspect/attributes/common.cljs | clojure |
Copyright (c) KALEIDOS INC | 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 app.main.ui.viewer.inspect.attributes.common
(:require
[app.main.refs :as refs]
[app.main.store :as st]
[app.main.ui.components.... |
a12af8d8f0904a2b47925e49792f551099e781c920d7a95bf6a1e4b364a8507b | ocramz/ad-delcont | Internal.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DeriveFunctor #
# language GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# OPTIONS_GHC -Wno-unused-imports -Wno-unused-top-binds #-}
module Numeric.AD.DelCont.Internal
(rad1, rad2, grad,
auto,
rad1g, rad2g, radNg,
op1Num, op2Num,
... | null | https://raw.githubusercontent.com/ocramz/ad-delcont/ad332736d707c868e79662a65ba9917698b30f08/src/Numeric/AD/DelCont/Internal.hs | haskell | # LANGUAGE RankNTypes #
# OPTIONS_GHC -Wno-unused-imports -Wno-unused-top-binds #
transformers
| Dual numbers
| Modify the adjoint part of a 'D'
| Differentiable variable
A (safely) mutable reference to a dual number
| Lift a constant value into 'AD'
As one expects from a constant, its value will be used for c... | # LANGUAGE FlexibleInstances #
# LANGUAGE DeriveFunctor #
# language GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
module Numeric.AD.DelCont.Internal
(rad1, rad2, grad,
auto,
rad1g, rad2g, radNg,
op1Num, op2Num,
op1, op2,
AD0, AD, AD')
where
import Control.Monad.ST (ST, runST)
import Data.Bif... |
1a299ec7e3f150f87b7a34068576d964d711865abf03ade502694437463b3d71 | kudu-dynamics/blaze | CmpSgeOp.hs | module Blaze.Types.Pil.Op.CmpSgeOp where
-- This module is generated. Please use app/gen_pil_ops/Main.hs to modify.
import Blaze.Prelude
data CmpSgeOp expr = CmpSgeOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Has... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Types/Pil/Op/CmpSgeOp.hs | haskell | This module is generated. Please use app/gen_pil_ops/Main.hs to modify. | module Blaze.Types.Pil.Op.CmpSgeOp where
import Blaze.Prelude
data CmpSgeOp expr = CmpSgeOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Hashable (CmpSgeOp a)
|
b7dbcf1096448741f7b8389db87aa25ef491df178b5af2941bdb79da8dd34aa1 | screenshotbot/screenshotbot-oss | run-circleci.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
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 /.
(load "~/quicklisp/setup.lisp")
(push #P "./" asdf:*central-registry*)
(ql:quickloa... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/24f2673e80a88f8021d1ee5f7d0584379c30ebd5/src/quick-patch/run-circleci.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| 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 /.
(load "~/quicklisp/setup.lisp")
(push #P "./" asdf:*central-registry*)
(ql:quickload :quick-patch/tests)
(unless (fiveam:run-all-tests)
(u... |
a382b465292a63f52d9e3a981a77c1abbd78268c1bfa1c3dacdc6ff901200afa | Tritlo/PropR | Dependency.hs | module Dependency where
dependency :: Int
dependency = 41 | null | https://raw.githubusercontent.com/Tritlo/PropR/78e2d4194b2d2ec66912a178c3814b6ce2c967d9/tests/cases/Dependency.hs | haskell | module Dependency where
dependency :: Int
dependency = 41 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.