_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 |
|---|---|---|---|---|---|---|---|---|
d75de999bdb6c586ab051b52a746bc70a0f9db92b92e8363f6e17f77d3de9d56 | clash-lang/clash-compiler | DualBlockRam.hs | # OPTIONS_GHC -freverse - errors #
module DualBlockRam where
import Clash.Explicit.Prelude
import Clash.Explicit.Testbench
import Test.Tasty.Clash.CollectSimResults
import DualBlockRamDefinitions
import DualBlockRamTypes
topEntityAB :: TdpRam A B
topEntityAB = tdpRam
# NOINLINE topEntityAB #
{-# ANN topEntityAB (d... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/b0e00ccb28f9a7c70e0ce1cfe3af5bb6ff88f93a/tests/shouldwork/Signal/DualBlockRam.hs | haskell | # ANN topEntityAB (defSyn "topEntityAB") #
Template haskell simulation
topEntity output
Verification
# ANN topEntityBC (defSyn "topEntityBC") #
Template haskell simulation
topEntity output
Verification | # OPTIONS_GHC -freverse - errors #
module DualBlockRam where
import Clash.Explicit.Prelude
import Clash.Explicit.Testbench
import Test.Tasty.Clash.CollectSimResults
import DualBlockRamDefinitions
import DualBlockRamTypes
topEntityAB :: TdpRam A B
topEntityAB = tdpRam
# NOINLINE topEntityAB #
testBenchAB :: Signal... |
6303c78dfdd2e5ea207ffed7f15dc0b3e8da9a2331b7217c498a884d13a92040 | max-au/lambda | lambda_SUITE.erl | %% @doc
%% Property-based tests exercising all features of lambda.
%% @end
-module(lambda_SUITE).
-author("").
-include_lib("stdlib/include/assert.hrl").
%% Test server callbacks
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
%% Test cases
-export([
sequential_prop/0, sequential_prop/1
]).
... | null | https://raw.githubusercontent.com/max-au/lambda/53d9ab894156f5b15bbf1ad774449bb877588144/test/lambda_SUITE.erl | erlang | @doc
Property-based tests exercising all features of lambda.
@end
Test server callbacks
Test cases
PropEr state machine
-------------------------------------------------------------------
Test suite settings
-------------------------------------------------------------------
Test cases
---------------------... | -module(lambda_SUITE).
-author("").
-include_lib("stdlib/include/assert.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
-export([
sequential_prop/0, sequential_prop/1
]).
-export([
initial_state/0,
command/1,
precondition/2,
next_state/3,
postcondition/3
]).
init_p... |
e2fc3e67adc738c0222dd92197c2eebfab43a37815e108e5bf7c45839e9ece5d | irr/erl-tutorials | dump.erl | -module(dump).
-author("").
-compile(export_all).
create_test() ->
Nodes=[node()],
stopped = mnesia:stop(),
mnesia:delete_schema(Nodes),
mnesia:create_schema(Nodes),
mnesia:start(),
mnesia:create_table(test, [{frag_properties,
[{node_pool, Nodes},
{n_fragments, 20},
{n... | null | https://raw.githubusercontent.com/irr/erl-tutorials/da68b1c08baf6bdf46e7e8d3381d796e93c0357c/mnesia-dat/dump.erl | erlang | -module(dump).
-author("").
-compile(export_all).
create_test() ->
Nodes=[node()],
stopped = mnesia:stop(),
mnesia:delete_schema(Nodes),
mnesia:create_schema(Nodes),
mnesia:start(),
mnesia:create_table(test, [{frag_properties,
[{node_pool, Nodes},
{n_fragments, 20},
{n... | |
ec6b1a7cf68d3483e0c176d1100f9bf5ffa0c29903d408006e5d25f63a6a3d5a | esobchenko/probix | start_probix.erl | -module(start_probix).
-export([start/0]).
start() ->
application:start(inets),
application:start(log4erl),
application:start(crypto),
application:start(mochiweb),
application:start(mnesia),
application:start(emongo),
application:start(probix).
| null | https://raw.githubusercontent.com/esobchenko/probix/d4c955bafb47b20eae0e8ce32bde705bb3a9f72b/src/start_probix.erl | erlang | -module(start_probix).
-export([start/0]).
start() ->
application:start(inets),
application:start(log4erl),
application:start(crypto),
application:start(mochiweb),
application:start(mnesia),
application:start(emongo),
application:start(probix).
| |
4b2f6197e988d30e9b67c44dd12a1def325c22ab5865df9afc31fc5ac9ad362e | jacius/lispbuilder | width-height.lisp | Converted from the " Width and " Processing example at :
;;;;; ""
;;;;; (C)2006 Luke J Crook
(in-package #:sdl-gfx-examples)
(defun width-height ()
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:window width height :title-caption "Width and Height, from Processing.org")
(sdl:clear-displa... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl-gfx/examples/width-height.lisp | lisp | ""
(C)2006 Luke J Crook | Converted from the " Width and " Processing example at :
(in-package #:sdl-gfx-examples)
(defun width-height ()
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:window width height :title-caption "Width and Height, from Processing.org")
(sdl:clear-display (sdl:color :r 127 :g 127 :b 127))
... |
346f138bdc0fa8d933a9c76ffdea996bc691e3ed66a642b150150f0aca1a9b75 | orchid-hybrid/microKanren-sagittarius | substitution-assoc.scm | (define (substitution-get k s)
(cond
((assoc k s) => (lambda (p) (values #t (cdr p))))
(else (values #f #f))))
(define (substitution-set k v s)
(cons (cons k v) s))
(define substitution-size length)
(define empty-substitution '())
| null | https://raw.githubusercontent.com/orchid-hybrid/microKanren-sagittarius/9e740bbf94ed2930f88bbcf32636d3480934cfbb/substitution/assoc/miruKanren/substitution-assoc.scm | scheme | (define (substitution-get k s)
(cond
((assoc k s) => (lambda (p) (values #t (cdr p))))
(else (values #f #f))))
(define (substitution-set k v s)
(cons (cons k v) s))
(define substitution-size length)
(define empty-substitution '())
| |
1ee0d0bdcc970b604bc59b4ac3f36c8aa525e5b35bf89c3103a738537d12d5ba | avillega/generative-art | triangle_colors.clj | (ns generative-artistry.triangle-colors
(:require [quil.core :as q]
[generative-artistry.utils :refer :all]))
(defn find-new-mid-point [[x1 y1 :as p1] [x2 y2 :as p2] [x3 y3 :as p3]]
(let [A (q/dist x1 y1 x2 y2)
B (q/dist x2 y2 x3 y3)
C (q/dist x1 y1 x3 y3)]
(cond
(and (>= A B)... | null | https://raw.githubusercontent.com/avillega/generative-art/cd3be0a40ff9a7972b875df0e9e8f6981e45ee40/src/generative_artistry/triangle_colors.clj | clojure | (ns generative-artistry.triangle-colors
(:require [quil.core :as q]
[generative-artistry.utils :refer :all]))
(defn find-new-mid-point [[x1 y1 :as p1] [x2 y2 :as p2] [x3 y3 :as p3]]
(let [A (q/dist x1 y1 x2 y2)
B (q/dist x2 y2 x3 y3)
C (q/dist x1 y1 x3 y3)]
(cond
(and (>= A B)... | |
7973ef0b56e83f6772bf46a340d5ee15b4f4cf2d9245949e22b9b5f2c9c66150 | chrisdone/chrisdone-xmonad | Zone.hs | -- | Get time zones.
module Data.Time.Zone where
import Data.Time.Format
import Data.Time.LocalTime
import System.Locale
-- | Get the time zone by name.
getZone :: String -> Maybe TimeZone
getZone zone =
case parseTime defaultTimeLocale "%F%T%Z" ("2000-01-0100:00:00" ++ zone) of
Just (ZonedTime _ timeZone) -> ... | null | https://raw.githubusercontent.com/chrisdone/chrisdone-xmonad/5a3a4d7da7ef653becb8e4b5da3b76a52b1feb52/src/Data/Time/Zone.hs | haskell | | Get time zones.
| Get the time zone by name. |
module Data.Time.Zone where
import Data.Time.Format
import Data.Time.LocalTime
import System.Locale
getZone :: String -> Maybe TimeZone
getZone zone =
case parseTime defaultTimeLocale "%F%T%Z" ("2000-01-0100:00:00" ++ zone) of
Just (ZonedTime _ timeZone) -> Just timeZone
_ ->
Nothing
|
280e9db614db463022714b6d1667f51c9d22355b54436396b76115f5ae5f71b6 | composewell/streamly | Expand.hs | -- |
-- Module : Stream.Expand
Copyright : ( c ) 2018 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer :
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
#ifdef USE_PRELUDE
# OPTIONS_GHC -Wno - deprec... | null | https://raw.githubusercontent.com/composewell/streamly/8629a0e806f5eea87d23650c540aa04176f25c43/benchmark/Streamly/Benchmark/Data/Stream/Expand.hs | haskell | |
Module : Stream.Expand
License : BSD-3-Clause
Maintainer :
# LANGUAGE RankNTypes #
# OPTIONS_GHC -fplugin Test.Inspection.Plugin #
-----------------------------------------------------------------------------
Iteration/looping utilities
-----------------------------------------------------------------... | Copyright : ( c ) 2018 Composewell Technologies
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
#ifdef USE_PRELUDE
# OPTIONS_GHC -Wno - deprecations #
#endif
#ifdef __HADDOCK_VERSION__
#undef INSPECTION
#endif
#ifdef INSPECTION
# LANGUAGE TemplateHaske... |
803648715bd83bcbd05ad25286ac02bddca791a53b12823138d3a51ee3c12b20 | fgalassi/cs61a-sp11 | 4.26.scm | ; unless as a special form
;
( ( unless ? exp ) ( ( unless->if exp ) env ) )
(define (unless-condition exp) (cadr exp)
(define (unless-usual-value exp) (caddr exp)
(define (unless-exceptional-value exp) (cadddr exp)
(define (unless->if exp)
(list
'if
(unless-condition exp)
(unless-exceptional-value... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/4.26.scm | scheme | unless as a special form
when is unless useful as a normal procedure?
can't imagine anything really useful | ( ( unless ? exp ) ( ( unless->if exp ) env ) )
(define (unless-condition exp) (cadr exp)
(define (unless-usual-value exp) (caddr exp)
(define (unless-exceptional-value exp) (cadddr exp)
(define (unless->if exp)
(list
'if
(unless-condition exp)
(unless-exceptional-value exp)
(unless-usual-value... |
949867558d3fc115fcac3475de20a0ec680ab45f19192f46d1e8a7bc27eaad49 | magthe/sandi | QuotedPrintable.hs | -- |
-- Module: Data.Conduit.Codec.QuotedPrintable
Copyright : ( c ) 2014
-- License: BSD3
module Data.Conduit.Codec.QuotedPrintable where
import qualified Codec.Binary.QuotedPrintable as Qp
import qualified Data.Conduit.Codec.Util as U
import Control.Monad.Catch (MonadThrow)
import Data.ByteString (ByteString, e... | null | https://raw.githubusercontent.com/magthe/sandi/a8ef86ec3798a640d86342421a7fa7fa97bdedd4/sandi/src/Data/Conduit/Codec/QuotedPrintable.hs | haskell | |
Module: Data.Conduit.Codec.QuotedPrintable
License: BSD3 | Copyright : ( c ) 2014
module Data.Conduit.Codec.QuotedPrintable where
import qualified Codec.Binary.QuotedPrintable as Qp
import qualified Data.Conduit.Codec.Util as U
import Control.Monad.Catch (MonadThrow)
import Data.ByteString (ByteString, empty)
import Data.Conduit (ConduitT)
encode :: (Monad m) => Conduit... |
87eb6fe25e6cd6a83484ccbd033ec0ce38f031b805a61ef9d8551169b638d451 | wizardpb/functional-vaadin | test_ui_def.clj | (ns functional-vaadin.ui.test-ui-def
(:use functional-vaadin.core
functional-vaadin.rx.operators
functional-vaadin.rx.observers
functional-vaadin.utils)
(:require [rx.lang.clojure.core :as rx])
(:import (com.vaadin.data.util ObjectProperty PropertysetItem)
(com.vaadin.ui Vertica... | null | https://raw.githubusercontent.com/wizardpb/functional-vaadin/eccd121b1a4c28ec73ad452fa3d1ce3c6e78d401/test/functional_vaadin/ui/test_ui_def.clj | clojure | Observe Save button clicks
Commit the form of which it is a part
Consume the form data (in :item) and set into the table
Simulate a background job for the progress indicator by using a timer to send events (increasing integers)
Indicate we are running by saving the timer subsciption
The timer that sends events
... | (ns functional-vaadin.ui.test-ui-def
(:use functional-vaadin.core
functional-vaadin.rx.operators
functional-vaadin.rx.observers
functional-vaadin.utils)
(:require [rx.lang.clojure.core :as rx])
(:import (com.vaadin.data.util ObjectProperty PropertysetItem)
(com.vaadin.ui Vertica... |
c3925cb0382018ece0a87ae8b9a71242b64063bd8709503af33709636c7f0b57 | ocsigen/html_of_wiki | wiki_syntax_types.mli | open Tyxml
type href =
| Absolute of string
| Document of
{ document : Document.t
; fragment : string option
}
type desugar_param =
{ dc_page_wiki : Wiki_types.wiki
; dc_page_path : string list option
; mutable dc_warnings : ((int * int) * string) list
}
* Type of an action executed on ... | null | https://raw.githubusercontent.com/ocsigen/html_of_wiki/fb3af10cd2294a39e6e281abc92cb3b4fb75af2d/src/ohow/wiki_syntax_types.mli | ocaml | * [desugar_string dc content] does some possible syntactical desugaring in
[content]. It should be safe to call this, i.e. there shall be no side
effects in it.
* [preparse_string wb content] does possibly some replacements in [content]
and may have arbitrary side effects in the process (e.g. creatin... | open Tyxml
type href =
| Absolute of string
| Document of
{ document : Document.t
; fragment : string option
}
type desugar_param =
{ dc_page_wiki : Wiki_types.wiki
; dc_page_path : string list option
; mutable dc_warnings : ((int * int) * string) list
}
* Type of an action executed on ... |
4ae7bf54c4b30938ccbf0800bd4033e315a2cb0dcfafb2e70ecb5de7970134ec | haskell/fgl | MaxFlow.hs | -- | Maximum Flow algorithm
--
-- We are given a flow network @G=(V,E)@ with source @s@ and sink @t@
where each edge @(u , v)@ in has a nonnegative capacity
@c(u , v)>=0@ , and we wish to find a flow of maximum value from @s@
to
--
A flow in @G=(V , E)@ is a real - valued function @f : VxV->R@ that
-- satisfi... | null | https://raw.githubusercontent.com/haskell/fgl/86dc04d2ae9ca73a0923bdc8d78b53bf2f2876c8/Data/Graph/Inductive/Query/MaxFlow.hs | haskell | | Maximum Flow algorithm
We are given a flow network @G=(V,E)@ with source @s@ and sink @t@
satisfies:
@
For all u,v in V, f(u,v)=-f(v,u)
@
the total net flow out of the source.
In this module we implement the Edmonds-Karp algorithm, which is
@t@ as the augmenting path along which the flow is incremented.... | where each edge @(u , v)@ in has a nonnegative capacity
@c(u , v)>=0@ , and we wish to find a flow of maximum value from @s@
to
A flow in @G=(V , E)@ is a real - valued function @f : VxV->R@ that
For all u , v in V , f(u , , v )
For all u in V-{s , t } , , v):v in V } = 0
The value of a flow f is defi... |
51b3498fc545bd29d69ed79f25803cc94100407121fab5f06a6252a67f7c46a1 | koalaman/shellcheck | CFG.hs |
Copyright 2022 Vidar Holen
This file is part of ShellCheck .
ShellCheck is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your... | null | https://raw.githubusercontent.com/koalaman/shellcheck/b1ca3929e387446f3e3db023d716cf3787370437/src/ShellCheck/CFG.hs | haskell | # LANGUAGE DeriveAnyClass, DeriveGeneric #
Constructs a Control Flow Graph from an AST
Node labels in a Control Flow Graph
A no-op node for structural purposes
A no-op for graph inspection purposes
Drop current prefix assignments
A node with a certain effect on program state
The execution of a command or functio... |
Copyright 2022 Vidar Holen
This file is part of ShellCheck .
ShellCheck is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your... |
4b45897958c3875aadebcbfd5fea9c67f0cd7b4ca1a5589444836c96787d2ebe | icicle-lang/icicle-ambiata | SimpCommutes.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Avalanche.SimpCommutes where
import Icicle.Test.Arbitrary
import Icicle.Test.Arbitrary.NanEq
import Icicle.Core.Program.Che... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Avalanche/SimpCommutes.hs | haskell | # LANGUAGE OverloadedStrings #
We need a way to differentiate stream variables from scalars | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Avalanche.SimpCommutes where
import Icicle.Test.Arbitrary
import Icicle.Test.Arbitrary.NanEq
import Icicle.Core.Program.Check
import qualified Icicle.Core.Eva... |
bdd333b16fa6092ff9ef2bb07a73cb2d61a2ed5ffbe652bdc8e2d5c5df0341f6 | adamwalker/clash-riscv | Program.hs | -- | Simple unit test programs + larger integration test programs
module Program where
import Data.Word
import qualified Clash.Prelude as P
import Clash.Prelude (Vec((:>), Nil))
import RiscV.RV32I
import RiscV.Encode.RV32I
# ANN module ( " HLint : ignore Use + + " : : String ) #
store :: [Instr]
store = [
... | null | https://raw.githubusercontent.com/adamwalker/clash-riscv/84a90731a07c3427695b4926d7159f9e9902c1a1/test/Program.hs | haskell | | Simple unit test programs + larger integration test programs
Output
Output
Output
Output
Output
Output
Output
Load followed by ALU op
Output
Load followed by ALU op
Output
Output
Output
Load followed by store
Output
Do the addition
Decrement the counter
Branch
Write the output in a loop
Faster fibbonnacci
Do the ad... | module Program where
import Data.Word
import qualified Clash.Prelude as P
import Clash.Prelude (Vec((:>), Nil))
import RiscV.RV32I
import RiscV.Encode.RV32I
# ANN module ( " HLint : ignore Use + + " : : String ) #
store :: [Instr]
store = [
RIInstr $ LUI (Word20 0x12348) X1,
RIInstr $ II... |
1f44d6f303f1230458f58bb1b9c775175feeffd1f7ba8151710412fe54059f8d | clojure-emacs/cider-nrepl | cljs_complete_test.clj | (ns cider.nrepl.middleware.cljs-complete-test
(:require
[cider.nrepl.piggieback-test :refer [piggieback-fixture]]
[cider.nrepl.test-session :as session]
[clojure.test :refer :all]))
(use-fixtures :once piggieback-fixture)
(deftest cljs-complete-test
(let [response (session/message {:op "complete"
... | null | https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/d219ce610d9030108c273fab933538fb3b24d8be/test/cljs/cider/nrepl/middleware/cljs_complete_test.clj | clojure | bindings with the specified prefix (ba*) will be
suggested, instead of all the local bindings. | (ns cider.nrepl.middleware.cljs-complete-test
(:require
[cider.nrepl.piggieback-test :refer [piggieback-fixture]]
[cider.nrepl.test-session :as session]
[clojure.test :refer :all]))
(use-fixtures :once piggieback-fixture)
(deftest cljs-complete-test
(let [response (session/message {:op "complete"
... |
1962d39853cbbb51c84da17397c2142aadc5eff0b10ba4cb1a81a2d3601c6d80 | sorawee/pprint-compact | memoize.rkt | #lang racket/base
(provide memoize memoize2)
(define (memoize f #:backend [backend make-weak-hasheq])
(define table (backend))
(λ (x) (hash-ref! table x (λ () (f x)))))
(define (memoize2 f #:backend [backend make-weak-hasheq])
(define table (backend))
(λ (x y) (hash-ref! (hash-ref! table x backend) y (λ () (... | null | https://raw.githubusercontent.com/sorawee/pprint-compact/457558285e9f9f488c9265d2fe52e8b43ef04543/memoize.rkt | racket | #lang racket/base
(provide memoize memoize2)
(define (memoize f #:backend [backend make-weak-hasheq])
(define table (backend))
(λ (x) (hash-ref! table x (λ () (f x)))))
(define (memoize2 f #:backend [backend make-weak-hasheq])
(define table (backend))
(λ (x y) (hash-ref! (hash-ref! table x backend) y (λ () (... | |
0250af6cf899ce02b6bb6041f0b4e16e09c74bbac214bcd3d393c07d8d5edc0a | PacktWorkshops/The-Clojure-Workshop | test_static_files.clj | (ns packt-clj.exercises.test-static-files
(:require
[clj-http.client :as client]
[clojure.java.io :as io]
[clojure.test :refer :all]
[packt-clj.exercises.static-files :as static-files]))
(deftest test-static-files
(let [app (static-files/run)]
(is (= {:status 200
:body "This is only... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter14/tests/Exercise14.05/packt_clj/exercises/test_static_files.clj | clojure | (ns packt-clj.exercises.test-static-files
(:require
[clj-http.client :as client]
[clojure.java.io :as io]
[clojure.test :refer :all]
[packt-clj.exercises.static-files :as static-files]))
(deftest test-static-files
(let [app (static-files/run)]
(is (= {:status 200
:body "This is only... | |
440f1a5b479464c8cad7a7daac09a00f47a32d6ebeb4b22c356ea4492d540ec2 | brick-lang/kekka | expr.ml | open Core
open Common
type tname = Name.t * Type.typ
let get_name tname = fst tname
(************************************************
* Type definitions
************************************************)
module TypeDef = struct
type t =
| Synonym of { syn_info : Type.syn_info;
vis : Sy... | null | https://raw.githubusercontent.com/brick-lang/kekka/7ede659ffb49959b140e6ab0a72d38ff6c63311b/heart/expr.ml | ocaml | ***********************************************
* Type definitions
***********************************************
true if this is an extension of the datatype
***********************************************
* Data representation
***********************************************
part of enumeration (none has field... | open Core
open Common
type tname = Name.t * Type.typ
let get_name tname = fst tname
module TypeDef = struct
type t =
| Synonym of { syn_info : Type.syn_info;
vis : Syntax.Visibility.t }
| Data of { data_info : Type.data_info;
vis : Syntax.Visibility.t;
... |
b26a2886a11feee3a9b7cd63e9d2868dfa7ec6509ef3ecadd3e869f482e7b73f | YoshikuniJujo/test_haskell | Middle.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Attachment.Middle (
-- * Reference
Reference(..), A,
-- * Description
Description(..) ) where
import Gpu.Vulkan.Attachment.Middle.Internal
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6ea44c1048805a62979669c185ab32ba9f4d2e02/themes/gui/vulkan/try-vulkan-middle/src/Gpu/Vulkan/Attachment/Middle.hs | haskell | * Reference
* Description | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Attachment.Middle (
Reference(..), A,
Description(..) ) where
import Gpu.Vulkan.Attachment.Middle.Internal
|
7017f3705fcab2a1e76c0b2f6d8aa1603c84f48ce89cc900820f2d8be3697eea | rm-hull/inkspot | converter.cljc | (ns inkspot.converter
"Converters between RGB space and other colour spaces, inspired
from python implementations from "
(:require [inkspot.color :refer [coerce red green blue alpha]]))
(defn rgb->hsv
"RGB to HSV (Hue, Saturation, Value) conversion."
[color]
(let [r (/ (red color) 255.0)
g (/ (gre... | null | https://raw.githubusercontent.com/rm-hull/inkspot/ccb7a452a0930f451bcc6c960024d6029f616cd2/src/inkspot/converter.cljc | clojure | achromatic (gray)
achromatic (gray) | (ns inkspot.converter
"Converters between RGB space and other colour spaces, inspired
from python implementations from "
(:require [inkspot.color :refer [coerce red green blue alpha]]))
(defn rgb->hsv
"RGB to HSV (Hue, Saturation, Value) conversion."
[color]
(let [r (/ (red color) 255.0)
g (/ (gre... |
fe8bfbe4292b4e57303ddf91f2490d8a942ae098471b279c7ae8f3319c39e825 | ijp/guile-gdbm | poll.scm | (use-modules (gdbm)
(ice-9 match)
(web server)
(web request)
(web response)
(rnrs bytevectors)
(sxml simple)
(web uri))
;;; helpers
(define (request-path-components request)
(split-and-decode-uri-path (uri-path (request-uri r... | null | https://raw.githubusercontent.com/ijp/guile-gdbm/fa1d5b6231d0e4d096687b378c025f2148c5f246/examples/poll.scm | scheme | helpers
using default host and port
body seems to be necessary?
or do any error handling
db operations
application
currently ignore bad requests | (use-modules (gdbm)
(ice-9 match)
(web server)
(web request)
(web response)
(rnrs bytevectors)
(sxml simple)
(web uri))
(define (request-path-components request)
(split-and-decode-uri-path (uri-path (request-uri request))))
... |
734bffdc88ac181057e005f43b71ab6c2b272b7612081b09b961f15f50f3453f | UU-ComputerScience/uhc | mod12.hs | -- reexport + redefine (should give rise to error)
module Main( module Imp1.Exp1, i1 )
where
import Imp1.Exp1
i1 = 3
main = i1
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/20/mod12.hs | haskell | reexport + redefine (should give rise to error) |
module Main( module Imp1.Exp1, i1 )
where
import Imp1.Exp1
i1 = 3
main = i1
|
49f72343acd47dea592aea3f8191f399462df82f5a37ba0a832715aaa0c98136 | returntocorp/ocaml-tree-sitter-core | Token.ml | (*
A token, i.e. a string with its location in the file where it comes from.
*)
type t = Loc.t * string
let sexp_of_t (_loc, tok) =
Sexplib.Sexp.Atom tok
| null | https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/28f750bb894ea4c0a7f6b911e568ab9d731cc0b5/src/run/lib/Token.ml | ocaml |
A token, i.e. a string with its location in the file where it comes from.
|
type t = Loc.t * string
let sexp_of_t (_loc, tok) =
Sexplib.Sexp.Atom tok
|
e4f017a5fbdc2c696a81f6810bb47db7c00f303f9012292d4f137b4371ad49aa | scalaris-team/scalaris | dc_clustering_SUITE.erl | 2012 - 2014 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/dc_clustering_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2012 - 2014 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(dc_clustering_SUITE).
-author('').
-vsn('$Id$').
-compile(export_all).
-include("unittest.hrl").
-include("s... |
d328aac3fe78a121b9c535c3202e99339a0f7f4ffbcadea692e215515992b6e8 | pjotrp/guix | doxygen.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/doxygen.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages doxygen)
#:use-module ((guix licenses) #:select (gpl3+))
#:use-module (guix packa... |
2a215b1bb4823ea04d0d63218019d9810769b4a8101fac600aafe58b76eeebdf | gergoerdi/tandoori | Unify.hs | module Tandoori.Typing.Unify (mgu, fitDeclTy) where
import Tandoori
import Tandoori.Typing
import Tandoori.Typing.Monad
import Tandoori.Typing.Error
import Control.Monad.Error
import Tandoori.Typing.Substitute
mgu :: [(Maybe VarName, TyEq)] -> ErrorT TypingError Typing Subst
mgu eqs = mgu' False eqs
fitDeclTy ::... | null | https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/src/Tandoori/Typing/Unify.hs | haskell | | otherwise = do rigid <- isMonoTv α | module Tandoori.Typing.Unify (mgu, fitDeclTy) where
import Tandoori
import Tandoori.Typing
import Tandoori.Typing.Monad
import Tandoori.Typing.Error
import Control.Monad.Error
import Tandoori.Typing.Substitute
mgu :: [(Maybe VarName, TyEq)] -> ErrorT TypingError Typing Subst
mgu eqs = mgu' False eqs
fitDeclTy ::... |
50e332a6f36a5b7e34106e7135e0b70231248058751bcf73a266a632f9f0b4fc | fukamachi/fukacl | debug.lisp | (in-package :fukacl)
(defmacro mexpand-all (expr)
`(pprint (macroexpand ',expr)))
(defmacro mexpand (expr)
`(pprint (macroexpand-1 ',expr)))
(defmacro print-form-and-results (form)
`(format t "~&~A --> ~S~%" (write-to-string ',form) ,form))
(defmacro disassemble* (args &body body)
`(disassemble
(compile... | null | https://raw.githubusercontent.com/fukamachi/fukacl/c633005755c4273dbee3aef54a8d86a8fbecc6f5/debug.lisp | lisp | (in-package :fukacl)
(defmacro mexpand-all (expr)
`(pprint (macroexpand ',expr)))
(defmacro mexpand (expr)
`(pprint (macroexpand-1 ',expr)))
(defmacro print-form-and-results (form)
`(format t "~&~A --> ~S~%" (write-to-string ',form) ,form))
(defmacro disassemble* (args &body body)
`(disassemble
(compile... | |
1c9b3d5e3d0e42871e7e4ca1f2ad4639f0334bc3e59e26aa993c9004e8432b25 | acl2/acl2 | c-array-local.cpp.ref.ast.lsp |
(funcdef foo () (block (declare a ()) (assign a (as 2 3 a)) (return (ag 2 a))))
| null | https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/data_types/c-array-local.cpp.ref.ast.lsp | lisp |
(funcdef foo () (block (declare a ()) (assign a (as 2 3 a)) (return (ag 2 a))))
| |
10496bb9cc01c2e58767493a85d5a37243c7d49a21d581e66f1f8a85055a81b9 | stepcut/plugins | Bar.hs | module Bar where
resource :: Int
resource = 2
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/makewith/multi_make/Bar.hs | haskell | module Bar where
resource :: Int
resource = 2
| |
febabbfc3f56d2388995dfb4a2a360d8ad11000b5f10d5485bc70d1a3aa029fc | Gabriella439/optparse-generic | unwrap-with-help.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
import Options.Generic
data Options w = Options
{ a :: w ::: Int <?> "Int option -- must be divisible by 10"
, b :: w ::: Bool <?> "Bool op... | null | https://raw.githubusercontent.com/Gabriella439/optparse-generic/b6d3f2c64c931d17991c0d9a0daa1463e7faff73/examples/unwrap-with-help.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
import Options.Generic
data Options w = Options
{ a :: w ::: Int <?> "Int option -- must be divisible by 10"
, b :: w ::: Bool <?> "Bool option"
, c :: w ::: String <?> "St... |
b7db85ccb8349c5a96dcb3c950a7c34ebcc401d510d64d6cb84eb67d68361c46 | poscat0x04/telegram-types | Venue.hs | module Web.Telegram.Types.Internal.Venue where
import Common
import Web.Telegram.Types.Internal.Location
-- | Venue location. Can't be a live location
data Venue = Venue
{ -- | Venue location. Can't be a live location
location :: Location,
-- | Name of the venue
title :: Text,
-- | Address of the ve... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/Venue.hs | haskell | | Venue location. Can't be a live location
| Venue location. Can't be a live location
| Name of the venue
| Address of the venue
| Foursquare identifier of the venue
| Foursquare type of the venue.
(For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
| Google Places i... | module Web.Telegram.Types.Internal.Venue where
import Common
import Web.Telegram.Types.Internal.Location
data Venue = Venue
location :: Location,
title :: Text,
address :: Text,
foursquareId :: Maybe Text,
foursquareType :: Maybe Text,
googlePlaceId :: Maybe Text,
( See [ supported / plac... |
1f8b3605d90f20ecdb1f2f0760a3ec7b403077c9925f256a8a6e396bc0c6ac73 | google/ormolu | operators-4-out.hs | foo =
line <> bindingOf <+> text "=" <+> tPretty <+> colon
<+> align <> prettyPs
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/operators-4-out.hs | haskell | foo =
line <> bindingOf <+> text "=" <+> tPretty <+> colon
<+> align <> prettyPs
| |
1f355554e7d03b630fa1507f2e8071ab3988592b55852617f35039ed1e1cbf55 | ucsd-progsys/mist | twoPhaseCommit.hs | tick and tock with session types in Mist
-- Message -> State -> State
measure updateRecv :: Int -> Int -> Int
measure updateSend :: Int -> Int -> Int
undefined as rforall a. a
undefined = 0
assert :: {v:Bool | v} -> Unit
assert = \tru -> Unit
fail :: forall s,t,p,q. Int -> ST <s >t <p >q >Int
fail = undefined
--... | null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/twoPhaseCommit.hs | haskell | Message -> State -> State
---------------------------------------------------------------------------
| The ST Monad -----------------------------------------------------------
---------------------------------------------------------------------------
-----------------------------------------------------------------... | tick and tock with session types in Mist
measure updateRecv :: Int -> Int -> Int
measure updateSend :: Int -> Int -> Int
undefined as rforall a. a
undefined = 0
assert :: {v:Bool | v} -> Unit
assert = \tru -> Unit
fail :: forall s,t,p,q. Int -> ST <s >t <p >q >Int
fail = undefined
bind :: rforall a, b, p, q, r, ... |
7990ef9d72281720d7004ac3c7ce527b05fff341dad9758b4fcebd0ac8c181ab | exxeleron/qErlang | qErlang_test.erl | Copyright ( c ) 2011 - 2014 Exxeleron 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 applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/exxeleron/qErlang/8ac7f8e3f1b8d3407ae55778359b0f79f374121b/test/qErlang_test.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 governing permissi... | Copyright ( c ) 2011 - 2014 Exxeleron GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author
-module(qErlang_test).
-include_lib("eunit/include/eunit.hrl").
-ifdef(TEST).
-export([hex_to_bin/1]).
Internal... |
d0bfe9f58928c759ce287e50396961389ef9414a42167aa37c64ab717d2b0fb7 | testdouble/baizen | group_trailer.clj | (ns baizen.formats.group-trailer
(:require [baizen.formats :refer [BaiFormat index-of drop-slash]]))
(defrecord GroupTrailer [line]
BaiFormat
(fields [_] [:record-code :group-control-total :number-of-accounts :number-of-records])
(prepare [this line]
(update-in line [(index-of this :number-of-records)] dr... | null | https://raw.githubusercontent.com/testdouble/baizen/66bc3da3b660bc88317e1be6fce266a95db883fb/src/baizen/formats/group_trailer.clj | clojure | (ns baizen.formats.group-trailer
(:require [baizen.formats :refer [BaiFormat index-of drop-slash]]))
(defrecord GroupTrailer [line]
BaiFormat
(fields [_] [:record-code :group-control-total :number-of-accounts :number-of-records])
(prepare [this line]
(update-in line [(index-of this :number-of-records)] dr... | |
d5a4087afb283205da2fdf33ba765e2b0403b652fec97e201af591864307df1e | rd--/hsc3 | in.help.hs | in ; patching input to output ( see also soundIn ) ; in haskellId ' in ' is a reserved keyword
in' 2 ar numOutputBuses
-- in ; patching input to output, with delay
let i = in' 2 ar numOutputBuses
d = delayN i 0.5 0.5
in i + d
in ; write noise to first private bus , then read it out ; the multiple root graph i... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/in.help.hs | haskell | in ; patching input to output, with delay
in ; read control bus
in ; audio graph reading control buses 0 & 1 ; control graph writing buses
in ; patch mono input to stereo output
in ; make a control rate graph to write freq and gate values
-- ; set value on a control bus | in ; patching input to output ( see also soundIn ) ; in haskellId ' in ' is a reserved keyword
in' 2 ar numOutputBuses
let i = in' 2 ar numOutputBuses
d = delayN i 0.5 0.5
in i + d
in ; write noise to first private bus , then read it out ; the multiple root graph is ordered
let n = pinkNoiseId 'α' ar * 0.1
... |
a9f9339b6510dd1125a0ce870b58030d35a0724170018273f98d676f80447e18 | elzibus/The-Functional-Approach-to-Programming | ch1.ml |
* Hints for the Ocaml user , this was run on Ocaml 4.03.0
* This should not be used to learn ocaml syntax , it 's mostly about making the code in the book run in Ocaml .
* Hints for the Ocaml user, this was run on Ocaml 4.03.0
* This should not be used to learn ocaml syntax, it's mostly about making the cod... | null | https://raw.githubusercontent.com/elzibus/The-Functional-Approach-to-Programming/e92da55ea9b53cfae83f9d649e65850fb670420c/ch1.ml | ocaml | 1.1.1 Expressions
1.1.3 Local Definitions
1.2.1 Integers
1.2.3 Floating Mode
the 'open "float" ;;' as described in the book does not work with a simple
* invokation of ocaml on the command line ( ie, plain "ocaml" ).
* I don't know if this is still present in the current Ocaml.
1.2.6 Characters
! charac... |
* Hints for the Ocaml user , this was run on Ocaml 4.03.0
* This should not be used to learn ocaml syntax , it 's mostly about making the code in the book run in Ocaml .
* Hints for the Ocaml user, this was run on Ocaml 4.03.0
* This should not be used to learn ocaml syntax, it's mostly about making the cod... |
8ade45973c3fd5870b89c543802ba1b18865495652ba27601cbfb6b466732939 | ejgallego/coq-serapi | ser_uState.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_uState.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 - 2018 MINES... |
dde51c3662e4b7d58d99e5432fa5213dd865a450f5b6c015043659d4b4c9fa09 | wireless-net/erlang-nommu | wxToolBar.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxToolBar.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxToolBar).
-include("wxe.hrl").
... |
e51337e3740677dfcfd02272ecd450c218ccb505070aece7a2af33267ef22966 | NinjaTrappeur/ex-hack | ModulePaths.hs | |
Module : ExHack . ModulePaths
Description : Helpers related to modules filepaths .
Copyright : ( c ) , 2018
License : GPL-3
Stability : experimental
Portability : POSIX
Module : ExHack.ModulePaths
Description : Helpers related to modules filepaths.
Copyright : (c) Félix Bayla... | null | https://raw.githubusercontent.com/NinjaTrappeur/ex-hack/dace36926065d5a0dd0076beec1a6eeacd848732/src/ExHack/ModulePaths.hs | haskell | # LANGUAGE OverloadedStrings #
| Generates the module filepath according to a package fp, a component root
and a module name.
| Look for a module file in a list of component roots and return | |
Module : ExHack . ModulePaths
Description : Helpers related to modules filepaths .
Copyright : ( c ) , 2018
License : GPL-3
Stability : experimental
Portability : POSIX
Module : ExHack.ModulePaths
Description : Helpers related to modules filepaths.
Copyright : (c) Félix Bayla... |
7a0ccb3c0c795480a518604c8f43b015f4ea521325b1b16cc7c60a6f85b34090 | gedge-platform/gedge-platform | rabbit_vhost.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_vhost).
-include_lib("rabbit_comm... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_vhost.erl | erlang |
API
Clear out remnants of old incarnation, in case we restarted
faster than other nodes handled DOWN messages from us.
rabbit_vhost_sup_sup will start the actual recovery.
So recovery will be run every time a vhost supervisor is restarted.
Start queue mirrors.
The config file exists. Do nothing.
The config ... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_vhost).
-include_lib("rabbit_common/inc... |
551333796f961cf891132ca2102fbfaa7e36a94f471e05c0a9ad71b93eb9925e | snoyberg/http-client | Conduit.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
| A new , experimental API to replace " Network . " .
--
-- For most users, "Network.HTTP.Simple" is probably a better choice. For more
-- information, see:
--
-- <-lang.org/library/http-client>
--
-- For more information on using this module, please be sure ... | null | https://raw.githubusercontent.com/snoyberg/http-client/106951809b3e1c796ffd6cccefc4c1fad16df7c9/http-conduit/Network/HTTP/Client/Conduit.hs | haskell | # LANGUAGE RankNTypes #
For most users, "Network.HTTP.Simple" is probably a better choice. For more
information, see:
<-lang.org/library/http-client>
For more information on using this module, please be sure to read the
* Conduit-specific interface
* Manager helpers
* General HTTP client interface
* Lower-le... | # LANGUAGE FlexibleContexts #
| A new , experimental API to replace " Network . " .
documentation in the " Network . HTTP.Client " module .
module Network.HTTP.Client.Conduit
withResponse
, responseOpen
, responseClose
, acquireResponse
, httpSource
, defaultManagerSettings
, newManag... |
1b824c0e841701d7a76413fc79bb5617209a5eb0e23d44c35af0322a44adfb07 | openbadgefactory/salava | receive.cljs | (ns salava.badge.ui.receive
(:require [clojure.string :refer [replace upper-case blank? starts-with? split]]
[reagent.core :refer [atom cursor]]
[reagent.session :as session]
[reagent-modals.modals :as m]
[salava.core.ui.ajax-utils :as ajax]
[salava.core.ui.... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/badge/ui/receive.cljs | clojure | (when @pdf-atom
use regex
todo use regex to match description
:hidden (fn [] 0(reload-fn state))})
[:div
[badge-alert state] | (ns salava.badge.ui.receive
(:require [clojure.string :refer [replace upper-case blank? starts-with? split]]
[reagent.core :refer [atom cursor]]
[reagent.session :as session]
[reagent-modals.modals :as m]
[salava.core.ui.ajax-utils :as ajax]
[salava.core.ui.... |
313f94c226535070f29b8e6473559cdda582c71834a9417783fa4722771e8e7a | facebook/flow | cycle_hash_test.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/cycle_hash/__tests__/cycle_hash_test.ml | ocaml | We use laziness to tie the knot of recursive structures in this test file. A
* unary operator makes things a bit less cluttered.
Define a node in a graph `g` with edges to nodes at the given offsets.
special case for unitary graph
Test that a unit graph's hash is stable
init
unchanged
Test that a unit gra... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
7d156a6708dd80edda789a2f18bba1c031d0bd1f61454cc0e1b7830aae061be0 | CloudI/CloudI | hello.erl | Use : erlc hello.erl & & erl -pa ./ebin -s hello run -s init stop -noshell
-module(hello).
-export([run/0]).
run() ->
crypto:start(),
application:start(emysql),
emysql:add_pool(hello_pool, 1,
"hello_username", "hello_password", "localhost", 3306,
"hello_database", latin1),
emysql:... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_emysql/hello.erl | erlang | Use : erlc hello.erl & & erl -pa ./ebin -s hello run -s init stop -noshell
-module(hello).
-export([run/0]).
run() ->
crypto:start(),
application:start(emysql),
emysql:add_pool(hello_pool, 1,
"hello_username", "hello_password", "localhost", 3306,
"hello_database", latin1),
emysql:... | |
fe393406d9af65e39c781d7dd776aff7e28a0a33983649388899e5fbfb9cab6d | CorticalComputer/Book_NeuroevolutionThroughErlang | functions.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_9/functions.erl | erlang |
All rights reserved.
Activation Functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(-1 : 1)--Der:Y*(1-Y) | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(f... |
b58cb3a29a09371a44cccbcccc241d6a2fff8de5a7c4abb48d4ca5c43b9731b8 | typedclojure/typedclojure | core.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/lib.clojure/src/typed/specs/clojure/core.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.specs.clojure.core
"Public API
Spec definitions for clojure.core"
(:require [clojure.alpha.spec :as s]
[typed.clj.spec :as t]))
|
dcc864da08f1f698ae148e0047288b9ad554e4f99e06169e83a335d479ac3010 | earl-ducaine/cl-garnet | support-selection2.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : LAPIDARY ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code was writ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/lapidary/support-selection2.lisp | lisp | Syntax : Common - Lisp ; Package : LAPIDARY ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
Package : LAPIDARY -*-
This file contains code that supports the multiple
selection of objects via selection boxes a... | select - one - object : determines if the user has selected a single
CHANGE LOG
08/24/92 amickish - Removed declare ignore of point - list in push - selection-
(in-package "LAPIDARY")
(opal::define-method :select-multiple-objects opal:aggregate (agg sel-fct)
(declare (special *selection-bbox* *selection-inf... |
44cd63b030404bdb7bceea30c5c3b24143bd46e10027fd42ac498da9d3eda9fe | fragnix/fragnix | Network.HPACK.HeaderBlock.Integer.hs | {-# LANGUAGE Haskell2010 #-}
# LINE 1 " Network / HPACK / HeaderBlock / Integer.hs " #
# LANGUAGE BangPatterns , OverloadedStrings , CPP #
module Network.HPACK.HeaderBlock.Integer (
encode
, encodeInteger
, decode
, decodeInteger
) where
i... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Network.HPACK.HeaderBlock.Integer.hs | haskell | # LANGUAGE Haskell2010 #
$setup
--------------------------------------------------------------
Using writeWord8 is faster than using internals directly.
--------------------------------------------------------------
| # LINE 1 " Network / HPACK / HeaderBlock / Integer.hs " #
# LANGUAGE BangPatterns , OverloadedStrings , CPP #
module Network.HPACK.HeaderBlock.Integer (
encode
, encodeInteger
, decode
, decodeInteger
) where
import Data.Array (Array, list... |
ea17233ae42710fc3197a82841442593d7e8705c03456e78695f60de83c15066 | incoherentsoftware/defect-process | Grenade.hs | module Player.Gun.All.GrenadeLauncher.Grenade
( mkGrenade
) where
import Control.Monad.IO.Class (MonadIO)
import qualified Data.List as L
import qualified Data.List.NonEmpty as NE
import qualified Data.Set as S
import Attack
import Attack.Projectile
import Collision
import Configs
import Configs.All.PlayerGun... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/61ee16c917b6da8f0ebd84b0bbebc7e3fe8bce27/src/Player/Gun/All/GrenadeLauncher/Grenade.hs | haskell | module Player.Gun.All.GrenadeLauncher.Grenade
( mkGrenade
) where
import Control.Monad.IO.Class (MonadIO)
import qualified Data.List as L
import qualified Data.List.NonEmpty as NE
import qualified Data.Set as S
import Attack
import Attack.Projectile
import Collision
import Configs
import Configs.All.PlayerGun... | |
a8cca52451c3a6a24785f631a5548af3e716d15ec4e0871a10983b8d5cd06bdf | may-liu/qtalk | node_pep.erl | %%% ====================================================================
` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You should have received a copy of the
%%% Erlang Public License ... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/node_pep.erl | erlang | ====================================================================
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
t... | ` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Initial Developer of the Original Code is ProcessOne .
Portions created by ProcessOne are C... |
c8070f225c4fc33919bab80bfeca3f4d9b724900fba64f8290f06d95ff165cdb | jacius/lispbuilder | mouse-2d.lisp | ;;;;; Converted from the "Mouse 2D" Processing example at:
;;;;;
( C)2007
(in-package #:sdl-examples)
(defun mouse-2d ()
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:window width height :title-caption "Mouse 2D, from Processing.org")
(setf (sdl:frame-rate) 60)
(sdl:with-ev... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/examples/mouse-2d.lisp | lisp | Converted from the "Mouse 2D" Processing example at:
Clear the display each game loop
(sdl:clear-display sdl:*black*)
Change the color of the box if the left mouse button is depressed
Redraw the display | ( C)2007
(in-package #:sdl-examples)
(defun mouse-2d ()
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:window width height :title-caption "Mouse 2D, from Processing.org")
(setf (sdl:frame-rate) 60)
(sdl:with-events ()
(:quit-event () t)
(:key-down-event ()
(... |
41076a67cc89bbc4eabfbf1b5e0dd025ecd21e73240678611201111a6d354ea4 | clash-lang/clash-compiler | LambdaDrop.hs | module LambdaDrop where
import Clash.Prelude
topEntity :: Signal System (BitVector 2)
topEntity = (++#) <$> (pack <$> outport1) <*> (pack <$> outport2)
where
(outport1, outResp1) = gpio (decodeReq 1 req)
(outport2, outResp2) = gpio (decodeReq 2 req)
ramResp = ram (decodeReq 0 req)
req = core $ (<|>... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Basic/LambdaDrop.hs | haskell | module LambdaDrop where
import Clash.Prelude
topEntity :: Signal System (BitVector 2)
topEntity = (++#) <$> (pack <$> outport1) <*> (pack <$> outport2)
where
(outport1, outResp1) = gpio (decodeReq 1 req)
(outport2, outResp2) = gpio (decodeReq 2 req)
ramResp = ram (decodeReq 0 req)
req = core $ (<|>... | |
e262dd9d1faff919b29c3663029910c595a4eb4b6a93f5192d3935543e81721d | nuprl/gradual-typing-performance | find-tag.rkt | #lang racket/base
(require racket/class
racket/gui/base
racket/contract)
(provide/contract
[find-tag
(-> (is-a?/c text%)
exact-nonnegative-integer?
(or/c #f string?))])
finds the name of the XML tag just before ` start ' in ` text ' .
;; returns the tag name, with no trailing spac... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/stepper/private/find-tag.rkt | racket | returns the tag name, with no trailing space of > or anything like that.
loop iterates backwards, searching for #\<
when it finds it, it gets the string starting
there, forwards to last-space (if there was a space)
or start-1.
(in that case, they are typing a close tag or closing an empty tag)
this technique gle... | #lang racket/base
(require racket/class
racket/gui/base
racket/contract)
(provide/contract
[find-tag
(-> (is-a?/c text%)
exact-nonnegative-integer?
(or/c #f string?))])
finds the name of the XML tag just before ` start ' in ` text ' .
(define (find-tag text start)
If there is a ... |
b4def20b40c6be51011def10ec0d0d389746aa66f5bf3979be42a1f0a683b67e | startalkIM/ejabberd | ejabberd_http_ws.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_websocket.erl
Author : < >
%%% Purpose : XMPP Websocket support
Created : 09 - 10 - 2010 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software; you can redis... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_http_ws.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_websocket.erl
Purpose : XMPP Websocket support
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
... | Author : < >
Created : 09 - 10 - 2010 by < >
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along... |
dea65f6d7a9778fa7eceb659a054563620ca9ef8842d8fe8ec4e3e986196474a | Armael/lam | lambda.ml | We have concrete identifiers .
Ident . is used e.g. for the environment of the interpreter .
Ident.Map.t is used e.g. for the environment of the interpreter.
*)
module Ident = struct
type t = string
let id = ref 0
let create base =
incr id;
base ^ "/" ^ (string_of_int !id)
module Map = ... | null | https://raw.githubusercontent.com/Armael/lam/ba5ddfc13272f16855b8711460c3f7c5fad421b3/lambda.ml | ocaml | Our lambda calculus, which is standard lambda-calculus, plus:
- atoms;
- primitives: basically ocaml functions, applied to λ-terms.
The arguments are guaranteed to be reduced before being given
to the function;
- effects primitives: perform, resume, delegate and alloc_stack.
A runtime value: a cl... | We have concrete identifiers .
Ident . is used e.g. for the environment of the interpreter .
Ident.Map.t is used e.g. for the environment of the interpreter.
*)
module Ident = struct
type t = string
let id = ref 0
let create base =
incr id;
base ^ "/" ^ (string_of_int !id)
module Map = ... |
3bf6b8b3117239f6762e78f9e0f9fc77a9e86365bf8640022b03d02dd1fea5d8 | DomainDrivenArchitecture/dda-serverspec-crate | netcat.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-serverspec-crate/0a2fd8cdd54a9efc3aad9e141098c2bf01d40861/main/src/dda/pallet/dda_serverspec_crate/infra/fact/netcat.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-serverspec-crate.infra.fact.netcat
(:require
[schema.core :as s]
[pallet.actions :as actions]
[dda.pa... |
f45d8dbb42320bc4ffacacccd22c1021a3613ea52a64809d578f2696d6f4941c | keithj/cl-genomic | pure.lisp | ;;;
Copyright ( c ) 2009 - 2011 . All rights reserved .
;;;
;;; This file is part of cl-genomic.
;;;
;;; 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 Foundation , either version 3 of the License , or
;... | null | https://raw.githubusercontent.com/keithj/cl-genomic/d160199c2b369df97afd3fded16b1ade507b80dd/src/io/pure.lisp | lisp |
This file is part of cl-genomic.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR P... | Copyright ( c ) 2009 - 2011 . All rights reserved .
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
(in-package :bio-sequence)
(declaim (type array-index... |
8914574a1b5d8ba69d7d2eadbf8b6a59393e48e5c1d8580414af468a75774cb1 | glebec/haskell-programming-allen-moronuki | Ex24_11_2.hs | module Ex24_11_2 where
import Text.Trifecta
2 . Write a parser for pos ints .
parseDigit :: Parser Char
parseDigit = oneOf ['0'..'9']
base10Integer :: Parser Integer
base10Integer = read <$> some parseDigit
| null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/24-parser-combinators/exercises/src/Ex24_11_2.hs | haskell | module Ex24_11_2 where
import Text.Trifecta
2 . Write a parser for pos ints .
parseDigit :: Parser Char
parseDigit = oneOf ['0'..'9']
base10Integer :: Parser Integer
base10Integer = read <$> some parseDigit
| |
34c3bbae8fd7344cae6391e079f693cad2dbc7fec5a42397b35dcbea908821d6 | bos/llvm | Vector.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , ScopedTypeVariables #
module LLVM.Core.Vector(MkVector(..), vector, ) where
import Data.Function
import Data.TypeLevel hiding (Eq, (+), (==), (-), (*), succ, pred, div, mod, divMod, logBase)
import LLVM... | null | https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/LLVM/Core/Vector.hs | haskell | XXX Should these really be here?
XXX The JITer target data. This isn't really right.
------------------------------------ | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , ScopedTypeVariables #
module LLVM.Core.Vector(MkVector(..), vector, ) where
import Data.Function
import Data.TypeLevel hiding (Eq, (+), (==), (-), (*), succ, pred, div, mod, divMod, logBase)
import LLVM... |
be8b9ae4949f92e5f291ed7727b6a8f7bf01d3a03c24257fbd07700898db4406 | seantempesta/cljs-react-navigation | re_frame.cljs | (ns cljs-react-navigation.re-frame
(:require [cljs-react-navigation.base :as base]
[cljs-react-navigation.reagent :as reagent]
[reagent.core :as r]
[re-frame.core :refer [subscribe dispatch dispatch-sync reg-event-db trim-v reg-sub]]))
(def ref-getStateForAction (atom nil)) ... | null | https://raw.githubusercontent.com/seantempesta/cljs-react-navigation/d8f6f998543608e930de8d565e7b48221ecfbe8a/src/cljs_react_navigation/re_frame.cljs | clojure | HACK
API | (ns cljs-react-navigation.re-frame
(:require [cljs-react-navigation.base :as base]
[cljs-react-navigation.reagent :as reagent]
[reagent.core :as r]
[re-frame.core :refer [subscribe dispatch dispatch-sync reg-event-db trim-v reg-sub]]))
(reg-event-db
::swap-routing-state
[trim... |
6a797eae429324c7d3abf0eb6aa6b18649b3e8a3e28aaa5a7c1288a43c0a0c90 | lpgauth/fast_disk_log | fast_disk_log_tests.erl | -module(fast_disk_log_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("fast_disk_log/include/fast_disk_log.hrl").
-define(LOGGER_NAME, test_logger).
-define(LOGGER_PATH, <<"./test.log">>).
%% runners
fast_disk_logger_test_() ->
{setup,
fun () -> setup() end,
fun (_) -> cleanup() end,... | null | https://raw.githubusercontent.com/lpgauth/fast_disk_log/ce781aafadba416e187108aaa51d1bc0024dbf53/test/fast_disk_log_tests.erl | erlang | runners
tests
utils | -module(fast_disk_log_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("fast_disk_log/include/fast_disk_log.hrl").
-define(LOGGER_NAME, test_logger).
-define(LOGGER_PATH, <<"./test.log">>).
fast_disk_logger_test_() ->
{setup,
fun () -> setup() end,
fun (_) -> cleanup() end,
[
... |
ef24abd7e389ce6c0df32fd92dace324e56e5c7d2c9fc646dfbbb40c39144884 | jumarko/web-development-with-clojure | handler.clj | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/picture-gallery-a/test/clj/picture_gallery/test/handler.clj | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(ns picture-gallery.test.handler
(:require [clojure.test :refer :all]
[ring.mock.request :refer :all]
... |
ec58bea71e7154eb95069339225d33799735927887e9a639b36c762d7aa86a40 | fyquah/hardcaml_arty | mii.mli | module I : sig
type 'a t =
{ mii_rx_clk : 'a
; mii_rx_dv : 'a
; mii_rx_er : 'a
; mii_rxd : 'a
; mii_tx_clk : 'a
}
[@@deriving sexp_of, hardcaml]
end
module O : sig
type 'a t =
{ mii_tx_en : 'a
; mii_txd : 'a
}
[@@deriving sexp_of, hardcaml]
end
| null | https://raw.githubusercontent.com/fyquah/hardcaml_arty/c4c0dc14fd26d423c46928be4c8a0910d18b48cf/src/infrastructure/mii.mli | ocaml | module I : sig
type 'a t =
{ mii_rx_clk : 'a
; mii_rx_dv : 'a
; mii_rx_er : 'a
; mii_rxd : 'a
; mii_tx_clk : 'a
}
[@@deriving sexp_of, hardcaml]
end
module O : sig
type 'a t =
{ mii_tx_en : 'a
; mii_txd : 'a
}
[@@deriving sexp_of, hardcaml]
end
| |
afc460138d767faa2d62a82d5eb0a37d52e82b3bb749242966106c76fbaa5d99 | ml-in-barcelona/server-reason-react | reactEvent.ml | type 'a synthetic
module MakeEventWithType (Type : sig
type t
end) =
struct
let bubbles : Type.t -> bool = fun _ -> false
let cancelable : Type.t -> bool = fun _ -> false
let currentTarget : Type.t -> < .. > Js.t = fun _ -> object end
let defaultPrevented : Type.t -> bool = fun _ -> false
let eventPhase : ... | null | https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/react/reactEvent.ml | ocaml | let toSyntheticEvent : 'a synthetic -> Synthetic.t = i -> i
let view : t -> Dom.window = (fun _ -> object end)
let pointerId : t -> Dom.eventPointerId
let view : t -> Dom.window | type 'a synthetic
module MakeEventWithType (Type : sig
type t
end) =
struct
let bubbles : Type.t -> bool = fun _ -> false
let cancelable : Type.t -> bool = fun _ -> false
let currentTarget : Type.t -> < .. > Js.t = fun _ -> object end
let defaultPrevented : Type.t -> bool = fun _ -> false
let eventPhase : ... |
50e2783025cb08cfe6a003929b68c15335cfc9072ea68d83dab65d83b5c1500d | elarous/O2SN | profiles.clj | (ns o2sn.services.profiles
(:require [o2sn.db.profiles :as db]
[ring.util.http-response :refer :all]))
(defn get-profile [user-k]
(ok (db/get-profile user-k)))
(defn get-activities [user-k]
(ok (db/get-activities user-k)))
(defn get-stats [user-k]
(ok (db/get-stats user-k)))
(defn get-rating [us... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/server/main/o2sn/services/profiles.clj | clojure | (ns o2sn.services.profiles
(:require [o2sn.db.profiles :as db]
[ring.util.http-response :refer :all]))
(defn get-profile [user-k]
(ok (db/get-profile user-k)))
(defn get-activities [user-k]
(ok (db/get-activities user-k)))
(defn get-stats [user-k]
(ok (db/get-stats user-k)))
(defn get-rating [us... | |
51068d8c5f73434cbbbf74c2922a4f407e63283646b01c575ea682f5dbfecb22 | dbuenzli/bos | test.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The bos programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/bos/fcc5d5a5f05ae0e75c231bf847313c4b9b030b21/test/test.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The bos programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | |
00413dfd611f581fb4a9e84f4e439c1a4fe52374b50793d85760c42c7f8beefd | sylane/erod | erodws_proto_get_content_request.erl | %%% ==========================================================================
Copyright ( c ) 2014 < >
%%%
This file is part of erodws .
%%%
Erodws 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... | null | https://raw.githubusercontent.com/sylane/erod/b0c435f8546ea38b1501d3e22614fe7951c61c9a/apps/erodws/src/erodws_proto_get_content_request.erl | erlang | ==========================================================================
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General... | Copyright ( c ) 2014 < >
This file is part of erodws .
Erodws is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Genera... |
6b6b45792966be2e842b07f7581da9bf168a973f90787eadf3aae7aec7e0939a | petereddy/clouchdb | tests.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CLOUCHDB - TESTS ; Base : 10 -*-
Copyright ( c ) 2007 . All rights reserved .
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Softw... | null | https://raw.githubusercontent.com/petereddy/clouchdb/81bcb705be198887e6ce6325c8ad007c3b43e7ea/src/tests.lisp | lisp | Syntax : COMMON - LISP ; Package : CLOUCHDB - TESTS ; Base : 10 -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or se... | Copyright ( c ) 2007 . All rights reserved .
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(... |
0cb1aa01066adda202d23142d63c92d34449138e0086e80922856a9e5060970b | phadej/vec | Lens.hs | {-# LANGUAGE CPP #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Data.RAList.Lens (
-- * Indexing
ix,
) where
import Control.Applicative (Appl... | null | https://raw.githubusercontent.com/phadej/vec/a895ab79e054987938295d5a149758eb79d85683/ral-lens/src/Data/RAList/Lens.hs | haskell | # LANGUAGE CPP #
# LANGUAGE RankNTypes #
* Indexing
-----------------------------------------------------------------------------
Indexing
-----------------------------------------------------------------------------
------------------------------------------------------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Data.RAList.Lens (
ix,
) where
import Control.Applicative (Applicative (..), (<$>))
import Prelude (Int)
import qualified Control.Lens ... |
8eb0f705dd170ddda7addf60903af61fa6d1eaf1e71fdab094d8ca74dc7e626d | Sheinxy/Advent2022 | day_19.hs | module Main where
import Data.Char
type Resources = [Int]
type Robots = [Int]
type Blueprint = [Resources]
parseBlueprint :: String -> Blueprint
parseBlueprint blueprint = [[a, 0, 0, 0], [b, 0, 0, 0], [c, d, 0, 0], [e, 0, f, 0]]
where [a, b, c, d, e, f] = map read . filter (all isDigit) . words $ blueprint
n... | null | https://raw.githubusercontent.com/Sheinxy/Advent2022/85951c809b988b4abbf76ac5634bc13744f7490c/Day_19/day_19.hs | haskell | module Main where
import Data.Char
type Resources = [Int]
type Robots = [Int]
type Blueprint = [Resources]
parseBlueprint :: String -> Blueprint
parseBlueprint blueprint = [[a, 0, 0, 0], [b, 0, 0, 0], [c, d, 0, 0], [e, 0, f, 0]]
where [a, b, c, d, e, f] = map read . filter (all isDigit) . words $ blueprint
n... | |
48b9403b319d40e00373022dcf8dd68bde29862666daf899f96c088f833b024b | jarvinet/scheme | b.scm | (define (b e)
(if (= e 2)
1
2))
| null | https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/test/b.scm | scheme | (define (b e)
(if (= e 2)
1
2))
| |
823238c2460e9f7e6e974c02d268e6723a2743df319f917f2e237553d98891cd | district0x/district-voting | bottom_logo.cljs | (ns district-voting.components.bottom-logo
(:require [district0x.components.misc :as misc :refer [row row-with-cols col center-layout paper]]))
(defn bottom-logo []
[row
{:center "xs"}
[:img {:src "./images/district0x-logo-title.svg"
:style {:width 120 :height 50}}]]) | null | https://raw.githubusercontent.com/district0x/district-voting/ef253671b00bdccec4575bcfa1b72b25e28afc22/src/cljs/district_voting/components/bottom_logo.cljs | clojure | (ns district-voting.components.bottom-logo
(:require [district0x.components.misc :as misc :refer [row row-with-cols col center-layout paper]]))
(defn bottom-logo []
[row
{:center "xs"}
[:img {:src "./images/district0x-logo-title.svg"
:style {:width 120 :height 50}}]]) | |
dcec9a466a84825521e6097c5902b1b61d0cf174b95c7bdea4abb6601438446a | herd/herdtools7 | opts.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/1b71583abe08dba21f09c1a7d56961a912d704c6/herd/opts.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2013 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
27d035928d971babf500800c7329f0f4d8a27b7a55a18a8f2586c53077e5c5a2 | nwf/dyna | ANFPretty.hs | ---------------------------------------------------------------------------
| Pretty - printer for ANF
-- Header material {{{
module Dyna.Analysis.ANFPretty (renderANF, renderCruxes) where
import Data.Either
import qualified Data.IntMap a... | null | https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/Analysis/ANFPretty.hs | haskell | -------------------------------------------------------------------------
Header material {{{
----------------------------------------------------------------------}}}
Pretty Printers {{{
------------------------... | | Pretty - printer for ANF
module Dyna.Analysis.ANFPretty (renderANF, renderCruxes) where
import Data.Either
import qualified Data.IntMap as IM
import qualified Data.Set as S
import Dyna.Analysis.ANF
import Dyna.Term.Normalized
import Dyna.Ter... |
3350b14f3a302d94cfb6f86125f5a41feb2c66efd7742326c7a48222a22ebcde | kaoskorobase/hsc3-server | Connection.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
-- | A 'Connection' encapsulates the communication with the synthesis server.
-- This module provides functions for opening and closing connections, as well
-- as communication and synchronisation primitives.
m... | null | https://raw.githubusercontent.com/kaoskorobase/hsc3-server/7e87e59619a23d44367c98cfdb21ca263a3aa8f9/Sound/SC3/Server/Connection.hs | haskell | | A 'Connection' encapsulates the communication with the synthesis server.
This module provides functions for opening and closing connections, as well
as communication and synchronisation primitives.
* Creation and termination
* Sending packets
* Receiving packets
| Close the connection.
The behavior of sendin... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Sound.SC3.Server.Connection (
Connection
, open
, close
, send
, withListener
) where
import Control.Concurrent (ThreadId, forkIO, myThreadId)
import Control.Monad (forever)
import... |
d55e2a8dfa7b69fee3c954b1a92b48c6e512e1347d788ee7baa9e0c136317f58 | bhaskara/programmable-reinforcement-learning | td-taxi-prog.lisp | (defpackage td-taxi-prog
(:documentation "td-taxi-prog.lisp - Alisp program for Dietterrich's taxi domain
Functions
---------
td-taxi-prog
Symbols used as labels for choices
----------------------------------
N
S
E
W
P
D
nav-src
nav-src-exit
nav-dest
nav-dest-exit
get-pass
put-pass
nav-choice
n... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/alisp-examples/taxi/td-taxi-prog.lisp | lisp |
access functions for state
partial program for Taxi domain
| (defpackage td-taxi-prog
(:documentation "td-taxi-prog.lisp - Alisp program for Dietterrich's taxi domain
Functions
---------
td-taxi-prog
Symbols used as labels for choices
----------------------------------
N
S
E
W
P
D
nav-src
nav-src-exit
nav-dest
nav-dest-exit
get-pass
put-pass
nav-choice
n... |
4aa4b74f910132d6641bf54e74bc667ecaea8f3d0857bbbc45c1c9e357eabde9 | addy-dclxvi/dotfiles | phillips-split-tone.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Split Tone script for GIMP 2.4
Copyright ( C ) 2007 < >
;
; Tags: photo, split tone
;
; Author statement:
;
This script converts an image to one that has one colour for highlights
; and one for shadows.
;
; -----------------------... | null | https://raw.githubusercontent.com/addy-dclxvi/dotfiles/6f48e73699c32e647e4c1a71802572c225dba602/.config/GIMP/2.10/scripts/phillips-split-tone.scm | scheme |
The GIMP -- an image manipulation program
Tags: photo, split tone
Author statement:
and one for shadows.
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
Changelog:
- Added GPL3 licence
- Menu ... | Copyright ( C ) 1995 and
Split Tone script for GIMP 2.4
Copyright ( C ) 2007 < >
This script converts an image to one that has one colour for highlights
Distributed by Gimp FX Foundry project
Version 1.7 ( 5th August 2007 )
Version 1.6
- Made the script compatible with GIMP 2.3
it under ... |
9f263a5c8646af1eebbadf0f78e10387b5817e8f1828aa8fa3c6eea9ad9c1b34 | wargrey/w3s | prentity.rkt | #lang typed/racket/base
(provide (all-defined-out))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define < : Symbol (string->unreadable-symbol "lt"))
(define > : Symbol (string->unreadable-symbol "gt"))
(define & : Symbol (string->unreadable-symbol "amp"))... | null | https://raw.githubusercontent.com/wargrey/w3s/54257dcc11402de0fefac55dee6a14a2b4263ad4/sgml/digitama/prentity.rkt | racket |
/#sec-predefined-ent | #lang typed/racket/base
(provide (all-defined-out))
(define < : Symbol (string->unreadable-symbol "lt"))
(define > : Symbol (string->unreadable-symbol "gt"))
(define & : Symbol (string->unreadable-symbol "amp"))
(define &apos : Symbol (string->unreadable-symbol "apos"))
(define " : Symbol (string->unreadab... |
5c47ad3c3cebd8dd8e3c0c6975f6433deb19fbc7940f136f9be97d9a4df547a1 | mokus0/junkbox | rec.hs |
- ` ` rec ''
- ( c ) 2008 , , Inc.
- ``rec''
- (c) 2008 Cook, J. MR SSD, Inc.
-}
module TypeExperiments.Rec where
newtype Thing a = Thing {thing :: a}
deriving (Eq, Show) | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/rec.hs | haskell |
- ` ` rec ''
- ( c ) 2008 , , Inc.
- ``rec''
- (c) 2008 Cook, J. MR SSD, Inc.
-}
module TypeExperiments.Rec where
newtype Thing a = Thing {thing :: a}
deriving (Eq, Show) | |
856102b3e92cbe3106f04227c8272f843dfa564f95766371a087ffb192dcc8d4 | tezos/tezos-mirror | error.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2023 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/adb9ff09cb5f0a9cae8c8d8924efee6c4764399a/src/proto_016_PtMumbai/lib_sc_rollup_layer2/error.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2023 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
060600db468d4619adb9ed09486336494c40416cb35488254c52cf302a341821 | haskell-servant/servant | ThrowAll.hs | # LANGUAGE CPP #
# LANGUAGE UndecidableInstances #
module Servant.Auth.Server.Internal.ThrowAll where
#if !MIN_VERSION_servant_server(0,16,0)
#define ServerError ServantErr
#endif
import Control.Monad.Error.Class
import Data.Tagged (Tagged (..))
import Servant ((:<|>) (..), ServerError... | null | https://raw.githubusercontent.com/haskell-servant/servant/002fa2107ad598315d8a963813674f996aa1de60/servant-auth/servant-auth-server/src/Servant/Auth/Server/Internal/ThrowAll.hs | haskell | sub-API
> throwAll err400 :: Handler a :<|> Handler b :<|> Handler c
> == throwError err400 :<|> throwError err400 :<|> err400
Really this shouldn't be necessary - ((->) a) should be an instance of
# OVERLAPPING #
# OVERLAPPABLE #
# OVERLAPPING #
# OVERLAPPING # | # LANGUAGE CPP #
# LANGUAGE UndecidableInstances #
module Servant.Auth.Server.Internal.ThrowAll where
#if !MIN_VERSION_servant_server(0,16,0)
#define ServerError ServantErr
#endif
import Control.Monad.Error.Class
import Data.Tagged (Tagged (..))
import Servant ((:<|>) (..), ServerError... |
d2b47990bf9b8902f2e072198ed5f3fb58dac655cc2f0085261cc5fe68b51c3a | ml4tp/tcoq | program.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/program.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
true = transparent by default, fals... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open CErrors
open Uti... |
b84f164924d21d073bc371db2d5cf3afb800abde94485858e2c4f7258c8569a2 | UU-ComputerScience/uhc | NameOperator1.hs | {- ----------------------------------------------------------------------------------------
what : bugfix: unqualified operator with '.' inside: was interpreted as qualified
expected: ok
---------------------------------------------------------------------------------------- -}
module NameOperator1 where
(<... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/NameOperator1.hs | haskell | ----------------------------------------------------------------------------------------
what : bugfix: unqualified operator with '.' inside: was interpreted as qualified
expected: ok
----------------------------------------------------------------------------------------
This did not not compile
This com... |
module NameOperator1 where
(<.>) :: Int -> Int -> Int
(<.>) = (+)
f :: Int
f = 1 <.> 1
(<+>) :: Int -> Int -> Int
(<+>) = (+)
g :: Int
g = 1 <+> 1
main = return ()
|
6d70e71c3ed874416852e5f615a1bfbabc4979e9ae2aaec0522b76b47176c26c | czan/stateful-check | core.clj | (ns stateful-check.core
(:require [clojure.test :as t]
[clojure.test.check :refer [quick-check]]
[clojure.test.check.properties :refer [for-all]]
[clojure.test.check.generators :as gen]
[stateful-check.generator :as g]
[stateful-check.runner :as r])
(:impo... | null | https://raw.githubusercontent.com/czan/stateful-check/f7a369c9306d17849981283ac04f5a524db5745f/src/stateful_check/core.clj | clojure | see NOTE below for more
We need this to be a separate form, for some reason. The attr-map
~smallest-sym (:result (:shrunk results#)) | (ns stateful-check.core
(:require [clojure.test :as t]
[clojure.test.check :refer [quick-check]]
[clojure.test.check.properties :refer [for-all]]
[clojure.test.check.generators :as gen]
[stateful-check.generator :as g]
[stateful-check.runner :as r])
(:impo... |
8719d8906866aeae155f69decab100e262cf36bee98c5202a2c3df42a5ec4839 | helpshift/hydrox | util.clj | (ns hydrox.common.util
(:require [clojure.java.io :as io]))
(defn full-path
"constructs a path from a project
(full-path \"example/file.clj\" \"src\" {:root \"/home/user\"})
=> \"/home/user/src/example/file.clj\""
{:added "0.1"} [path base project]
(str (:root project) "/" base "/" path))
(defn filter... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/src/hydrox/common/util.clj | clojure | (ns hydrox.common.util
(:require [clojure.java.io :as io]))
(defn full-path
"constructs a path from a project
(full-path \"example/file.clj\" \"src\" {:root \"/home/user\"})
=> \"/home/user/src/example/file.clj\""
{:added "0.1"} [path base project]
(str (:root project) "/" base "/" path))
(defn filter... | |
888cc7339ed4b0da5077673bb651f2c456f8ee31b8d845623317abf211415570 | cirodrig/triolet | Args.hs |
module BuildSystem.Args where
import Control.Monad
import Data.Maybe
import qualified Development.Shake as Shake
import Distribution.InstalledPackageInfo
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.GHC
import Distribution.Simple.LocalBuildInfo
import Distribution.Simpl... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/BuildSystem/Args.hs | haskell | these extra arguments.
| Arguments to the C compiler when compiling the RTS
Position-independent code
In C, these flags turn some C warnings into errors.
| Target-specific compilation flags for C, C++, and llt code.
Search paths for libraries
Libraries to link against
| C compiler options when building unit ... |
module BuildSystem.Args where
import Control.Monad
import Data.Maybe
import qualified Development.Shake as Shake
import Distribution.InstalledPackageInfo
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.GHC
import Distribution.Simple.LocalBuildInfo
import Distribution.Simpl... |
7c899977c23cb0b2d23a96de3ca29ebfd84e831d8b420f0b7aa29efa53cb7eac | lemmih/hsSDL2 | lesson5.glut.hs | module Main where
--FIXME: Add comments to this code.
import Graphics.UI.GLUT
import System.Exit
import Data.IORef
step = 0.1
main = do
(progName,_) <- getArgsAndInitialize
initialDisplayMode $= [DoubleBuffered,WithDepthBuffer,RGBMode]
createAWindow progName
blendEquation $= FuncAdd
blendFunc $= (SrcAlph... | null | https://raw.githubusercontent.com/lemmih/hsSDL2/7a785dc1b8df28143155c8a7c36e4ab69a10df81/Examples/NeHe/lesson05/lesson5.glut.hs | haskell | FIXME: Add comments to this code.
Right
Back
Left
Bottom Back
Bottom Right
Bottom Left
Bottom Front
Top
Bottom
Back
Left
Right | module Main where
import Graphics.UI.GLUT
import System.Exit
import Data.IORef
step = 0.1
main = do
(progName,_) <- getArgsAndInitialize
initialDisplayMode $= [DoubleBuffered,WithDepthBuffer,RGBMode]
createAWindow progName
blendEquation $= FuncAdd
blendFunc $= (SrcAlpha, OneMinusSrcAlpha)
mainLoop
cre... |
016b607ced91ee9bc6c1b728fb3a81cdba3ec99c4fad9320f19c03a6a5785294 | hammerlab/ketrew | lsf_example.ml | #use "topfind"
#thread
#require "ketrew"
let run_command_with_lsf cmd =
let module KEDSL = Ketrew.EDSL in
let host =
(* `Host.parse` takes an URI and creates a “Host” datastructue: a place to
run stuff. *)
KEDSL.Host.parse
"ssh@MyLSFCluster/home/user42/ketrew-playground/?shell=bash"
This one... | null | https://raw.githubusercontent.com/hammerlab/ketrew/8940d48fbe174709f076b7130974ecd0ed831d58/src/example_scripts/lsf_example.ml | ocaml | `Host.parse` takes an URI and creates a “Host” datastructue: a place to
run stuff.
The function `KEDSL.workflow_node` creates a node in the workflow graph.
This one is very simple, it has a name and a build-process,
and since it doesn't have dependencies or fallbacks, it is a
“single-node” wor... | #use "topfind"
#thread
#require "ketrew"
let run_command_with_lsf cmd =
let module KEDSL = Ketrew.EDSL in
let host =
KEDSL.Host.parse
"ssh@MyLSFCluster/home/user42/ketrew-playground/?shell=bash"
This one is an SSH host , named ` MyLSFCluster ` .
The directory ` /home / user42 / ketrew - playgro... |
abb4a3d1e1e2f0048d88d97042bddef3a4fcd1d4ad066cfc9df5161c1f70e9a7 | lambdacube3d/lambdacube-compiler | Inspector.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
import Data.List
import Data.Maybe
i... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-compiler/ca8d65a210a8801c8358fc29a9ead427afc9fce4/prototypes/Inspector.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
------------------------------------------------------------------------------
message (DSt xs) = show [(n, m) | (m, n, _) <- xs]
putStr (" -- " ++ show a) >>
cycle' st = cycle_ True st | # LANGUAGE PatternSynonyms #
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
import Data.List
import Data.Maybe
import Control.Arrow
import Control.Category hiding ((.), id)
import Contr... |
85aa69fe6436b9bf565ca5d0f0aa322500dfd2b52fb7dc8bce585edeb6c3e537 | travelping/ergw | ergw_api.erl | Copyright 2016 , Travelping GmbH < >
%% 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 Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_api).
-com... | null | https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/src/ergw_api.erl | erlang | This program is free software; you can redistribute it and/or
API
===================================================================
API
===================================================================
===================================================================
===========================================... | Copyright 2016 , Travelping GmbH < >
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_api).
-compile([{parse_transform, cut}]).
-export([peer/1, tunnel/1, conte... |
2d6110fd3a7a189e9bb321198d43fc5a4c03ff090dd1462467684ad5d8d758d5 | triffon/fp-2019-20 | 01-flatten.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме да от .
влагане да изчезнат .
(define (flatten xs)
(void)
)
(define tests
(test-suite "Flatten"
(check-equal? (flatten '(1 3 ("wow" ("nesting") ("overload" 38 91)))) '(1 3 "wow" "nesting" "overload" 38 91))
(check-equal? (fla... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-3/exercises/05.more-lists/01-flatten.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме да от .
влагане да изчезнат .
(define (flatten xs)
(void)
)
(define tests
(test-suite "Flatten"
(check-equal? (flatten '(1 3 ("wow" ("nesting") ("overload" 38 91)))) '(1 3 "wow" "nesting" "overload" 38 91))
(check-equal? (fla... | |
b9431bdbe5ebb1550b07683108177b3aacb3357e09401937127d6e94562cec1a | backtracking/ocaml-hashcons | hashcons.mli | (**************************************************************************)
(* *)
Copyright ( C )
(* *)
(* This software is free software;... | null | https://raw.githubusercontent.com/backtracking/ocaml-hashcons/d733325eeb55878bed285120c2c088daf78f0e2b/hashcons.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C )
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
s Hash tables for hash consing .
The technique is described in this paper :
and .
Type ... |
d9b1b0bb1dad650a24fac15a3b2d7289e7d5ee51bd66c889fff4c6ef94aa7fdc | basho/riak_cs_control | rebar_js_handlebars_plugin.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2012 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/basho/riak_cs_control/c4161ce85196259f4ae432170b9ff1652426c5e6/src/rebar_js_handlebars_plugin.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2012 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
5e10b6370a194b527853f805017a214a41c7a4fe095fcb78fa7ffec4ed831811 | DIJamner/lambda-compiler | lambda-x64.rkt | #lang racket
(require "../lambda/lambda.rkt" "../x64/asm.rkt" "test-utils.rkt")
TODO : ( ( lambda ( 0 0 ) ) ( lambda ( 0 0 ) ) causes
;;TODO: ((lambda (0 0)) (lambda (((lambda 0) 0) 0)) runs out of memory (should call collect and exit?)
;; -calls collect and exits when there is a breakpoint at collect
(defin... | null | https://raw.githubusercontent.com/DIJamner/lambda-compiler/5597f631e538ddb738fbe38d1cc0143ce69875a4/test/lambda-x64.rkt | racket | TODO: ((lambda (0 0)) (lambda (((lambda 0) 0) 0)) runs out of memory (should call collect and exit?)
-calls collect and exits when there is a breakpoint at collect
(display assem) | #lang racket
(require "../lambda/lambda.rkt" "../x64/asm.rkt" "test-utils.rkt")
TODO : ( ( lambda ( 0 0 ) ) ( lambda ( 0 0 ) ) causes
(define assem
(prog x64 #:lifted-opt (unify-functions)
((lambda ((lambda 0) 0))
((lambda ((lambda 0) 0))
((lambda ((lambda 0) 0))
((lambda ((l... |
d21d42bdfe836cd18b48fc85aee162bc67792cecba61e8628a3b2f99abdd96fd | ocurrent/ocurrent | current_opam_test.ml | open Current.Syntax
module Git = Current_git_test
type source = Fpath.t
let revdeps src =
Current.component "get-revdeps" |>
let> src = src in
match Fpath.to_string src with
| "src-123" ->
Current.Primitive.const [
Git.Commit.v ~repo:"example.org/foo" ~hash:"111";
Git.Commit.v ~repo:"example.... | null | https://raw.githubusercontent.com/ocurrent/ocurrent/344af83279e9ba17f5f32d0a0351c228a6f42863/test/plugins/opam/current_opam_test.ml | ocaml | open Current.Syntax
module Git = Current_git_test
type source = Fpath.t
let revdeps src =
Current.component "get-revdeps" |>
let> src = src in
match Fpath.to_string src with
| "src-123" ->
Current.Primitive.const [
Git.Commit.v ~repo:"example.org/foo" ~hash:"111";
Git.Commit.v ~repo:"example.... | |
79d456bd0a739d330e49a5391482c30e25d94bf086ae85fd70e3524a35995077 | kupl/VeriSmart-public | execTran.ml | open Lang
open Vlang
open Query
open Semantics
open Transaction
open Options
open Vocab
let label_var_tid : int -> var -> var
= fun tid (x,t) -> (x ^ "@T" ^ string_of_int tid, t)
let tid_labeled : var -> bool
= fun (x,t) -> BatString.exists x "@T"
(* produce ghost variable for different tids *)
let label_var_entry_t... | null | https://raw.githubusercontent.com/kupl/VeriSmart-public/99be7ba88b61994f1ed4c0d3a8e6a6db0f790431/src/exploit/execTran.ml | ocaml | produce ghost variable for different tids
make read expression with integer index
*********************************************************************
*********************************************************************
** Annotate non-global (i.e., local + keyword) variables with tids **
************************... | open Lang
open Vlang
open Query
open Semantics
open Transaction
open Options
open Vocab
let label_var_tid : int -> var -> var
= fun tid (x,t) -> (x ^ "@T" ^ string_of_int tid, t)
let tid_labeled : var -> bool
= fun (x,t) -> BatString.exists x "@T"
let label_var_entry_tid : int -> var -> var
= fun tid v -> v |> label... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.