_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 |
|---|---|---|---|---|---|---|---|---|
fb3327264ecab8b15d21397b8661a30b8837a5fe0a486992112b7e73d4d27f2f | akabe/ocaml-jupyter | jupyter.ml | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
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 Software without restriction , including without limitat... | null | https://raw.githubusercontent.com/akabe/ocaml-jupyter/7ea00fde81a915ee9d86c979f295f4c5dac28db8/src/core/jupyter.ml | ocaml | * The core library module for Jupyter | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
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 Software without restriction , including without limitat... |
ca3b0670b8363089989bfd678cf747c134a4a5e3d0a6e43adc9e5ea67a7e28cc | nubank/midje-nrepl | mocks_test.clj | (ns octocat.mocks-test
(:require [midje.emission.state :refer [with-isolated-output-counters]]
[midje.sweet :refer :all]))
(defn an-impure-function [_]
{:message "I'm really impure!"})
(defn incredible-stuff [x]
(an-impure-function x))
(with-isolated-output-counters
(facts "about prerequisits" :... | null | https://raw.githubusercontent.com/nubank/midje-nrepl/b4d505f346114db88ad5b5c6b3c8f0af4e0136fc/test/octocat/mocks_test.clj | clojure | (ns octocat.mocks-test
(:require [midje.emission.state :refer [with-isolated-output-counters]]
[midje.sweet :refer :all]))
(defn an-impure-function [_]
{:message "I'm really impure!"})
(defn incredible-stuff [x]
(an-impure-function x))
(with-isolated-output-counters
(facts "about prerequisits" :... | |
f60648c9ac0c01a912287fa1b6c3f13fe30333b2baf311dddf9cae405105dea9 | slegrand45/examples_ocsigen | action.ml | open Types
type action =
| Click_cell of cell | null | https://raw.githubusercontent.com/slegrand45/examples_ocsigen/e2f5efe57caf7a644795ac6b14f6d6e04168e4be/jsoo/tic-tac-toe/action.ml | ocaml | open Types
type action =
| Click_cell of cell | |
062758627790f9d0f2094b4b4756bd9c6b941ca839ddaedb05ab6481ffee0d06 | flybot-sg/lasagna-pull | malli_schema.clj | # Introduction to data schema using
(ns malli-schema
(:require
[sg.flybot.pullable :as pull]
[malli.core :as m]))
Complex data structures often need data schemas to make sure the users of
them to use it correctly . [ Malli]( / metosin / malli ) is a very good library
;; to describe them in pure data.
;;
... | null | https://raw.githubusercontent.com/flybot-sg/lasagna-pull/fc7fe7defdbdec07730f87cbd72593cd59bd5ac2/notebook/malli_schema.clj | clojure | to describe them in pure data.
it not only generally syntax correct, but also conforms to your data schema.
Let's conform our data is valid.
Let's derive an instrumented `pull/query` function from this schema:
To catch the exception we are going to throw, let's define a helper macro:
`:a` is not specified in our... | # Introduction to data schema using
(ns malli-schema
(:require
[sg.flybot.pullable :as pull]
[malli.core :as m]))
Complex data structures often need data schemas to make sure the users of
them to use it correctly . [ Malli]( / metosin / malli ) is a very good library
Lasagna - pull can use these schema... |
429efe8de97b8d1a80f5b4ccc856ddde82e5c7b314428fb338d9dbe6568ebc19 | dbushenko/scotty-blog-postgres | Views.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
module Views where
import Domain
import GHC.Generics (Generic)
import Web.Scotty
import Data.Monoid (mconcat)
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL
import Control.Monad.IO.Class
import Web.Scotty.Internal.Type... | null | https://raw.githubusercontent.com/dbushenko/scotty-blog-postgres/bc5d12caf6b3052c6b6ac7023c8fe3fdd7912979/src/Views.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
module Views where
import Domain
import GHC.Generics (Generic)
import Web.Scotty
import Data.Monoid (mconcat)
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL
import Control.Monad.IO.Class
import Web.Scotty.Internal.Types
articlesList :: [Article] -> Act... |
6bcd7763d1be1ab660c4f1abbedc1703a783845cab8b689cf00baa722f299f23 | exercism/common-lisp | larrys-winning-checker.lisp | (defpackage :larrys-winning-checker
(:use :cl)
(:export
:make-empty-board
:make-board-from-list
:all-the-same-p
:row
:column))
(in-package :larrys-winning-checker)
(defun make-empty-board ())
(defun make-board-from-list (list))
(defun all-the-same-p (row-or-col))
(defun row (board row-num))
(de... | null | https://raw.githubusercontent.com/exercism/common-lisp/eee3c2ece0f780c61f333dd1bd9e34c32f0e6a76/exercises/concept/larrys-winning-checker/larrys-winning-checker.lisp | lisp | (defpackage :larrys-winning-checker
(:use :cl)
(:export
:make-empty-board
:make-board-from-list
:all-the-same-p
:row
:column))
(in-package :larrys-winning-checker)
(defun make-empty-board ())
(defun make-board-from-list (list))
(defun all-the-same-p (row-or-col))
(defun row (board row-num))
(de... | |
ab9e175af139175591919abbecf9cc282763026ddc2904be1f0243839eed451a | Cognician/datomic-doc | actions.clj | (ns cognician.datomic-doc.actions
(:require [clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as string]
[cognician.datomic-doc :as dd]
[cognician.datomic-doc.datomic :as datomic]
[datomic.api :as d]
[ring.util.response :as re... | null | https://raw.githubusercontent.com/Cognician/datomic-doc/93b52e5778a1e1083c4f7b333518bfc8c344a725/src/cognician/datomic_doc/actions.clj | clojure |
Helpers
Actions | (ns cognician.datomic-doc.actions
(:require [clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as string]
[cognician.datomic-doc :as dd]
[cognician.datomic-doc.datomic :as datomic]
[datomic.api :as d]
[ring.util.response :as re... |
c55db4e8b27b0c7f526b96f556d1d1975165c75ba9643bb54ed47d57331683b3 | Vortecsmaster/EmurgoAcademyPlutusExamples | 06 - EmulatorTraceMonad.hs | module Plutus.Trace.Emulator
| null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/90ffe69a0b14b551336e80fd8f348257ebdabfdc/preVasil_V1/06%20-%20EmulatorTraceMonad.hs | haskell | module Plutus.Trace.Emulator
| |
484866952acf90a67ad1148ff876a4d18b25afef1363f10a36dffdd4d10c8248 | ferzcam/tropical-geometry | Monomial.hs | # LANGUAGE DataKinds , FlexibleInstances , GADTs , PolyKinds , TemplateHaskell #
# LANGUAGE MultiParamTypeClasses , TypeFamilies #
module Polynomial.Monomial
(
-- * Types
Monomial(..),
Mon,
SNat,
Lex,
Revlex,
-- * Classes
IsMonomialOrder,
-- * Functions
toMonomial
)
... | null | https://raw.githubusercontent.com/ferzcam/tropical-geometry/de366949f28530ac1008c7423122d37488b3b049/library/Polynomial/Monomial.hs | haskell | * Types
* Classes
* Functions
| Monomial is defined as an array of exponents
----------------------------------------
----------------------------------------
| Definition of what a monomial order must meet
--------------------------- | # LANGUAGE DataKinds , FlexibleInstances , GADTs , PolyKinds , TemplateHaskell #
# LANGUAGE MultiParamTypeClasses , TypeFamilies #
module Polynomial.Monomial
(
Monomial(..),
Mon,
SNat,
Lex,
Revlex,
IsMonomialOrder,
toMonomial
)
where
import Data.Function
import Numeric.Algebra ... |
e52e526c64784a978c6bb700fda5015944b9f1116d7e6d26aa1a6ee911fb0924 | simplex-chat/simplexmq | Client.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Simplex.Messaging.Transport.Client
( runTransportClient,
runTLSTransportClient,
smpClientHandshake,
defaultSMPPort,
defaultTransportClientConfi... | null | https://raw.githubusercontent.com/simplex-chat/simplexmq/e4aad7583f425765c605cd8042e3136e048bdbec/src/Simplex/Messaging/Transport/Client.hs | haskell | # LANGUAGE OverloadedStrings #
| Connect to passed TCP host:port and pass handle to the client. | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Simplex.Messaging.Transport.Client
( runTransportClient,
runTLSTransportClient,
smpClientHandshake,
defaultSMPPort,
defaultTransportClientConfig,
defaultSocksProxy,
Trans... |
21b2203f616c6a571a595cd2fca5f5d826dc9032277c881fa153d0a36fb7508e | gilith/hol-light | natural-bits.ml | (* ========================================================================= *)
(* NATURAL NUMBER TO BIT-LIST CONVERSIONS *)
(* ========================================================================= *)
(* -----------... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/natural-bits/natural-bits.ml | ocaml | =========================================================================
NATURAL NUMBER TO BIT-LIST CONVERSIONS
=========================================================================
-------------------------------------------------------------------------
Theory requirem... |
import_theories
["base";
"probability"];;
export_interpretation "opentheory/theories/natural-bits/natural-bits.int";;
let two_nonzero = prove
(`~(2 = 0)`,
REWRITE_TAC [TWO; NOT_SUC]);;
let exp_two_nz = prove
(`!n. ~(2 EXP n = 0)`,
REWRIT... |
7c242f6f1347dc3186e27a2d8e17c8c2ad0ae5fc4da7c97995d3cef1d90f3814 | erlang/otp | warnings_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/02384cfb85b34cbe5831032ca4828ae050c50617/lib/compiler/test/warnings_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2003 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(warnings_SUITE).
-ifdef(STANDALONE).
-define(line, put(line, ?LINE), ).
-define(config(X,Y), foo).
-define(... |
2a65c92d3339a6c4496c6e1bda9d4162f10ffda4ec382227e4f4055513c8ab0c | racket/data | info.rkt | #lang info
(define scribblings
'(("scribblings/data.scrbl" (multi-page) ("Data Structures"))))
| null | https://raw.githubusercontent.com/racket/data/1fe6cb389ad9a817c6abaff2d8f5ef407b5a16a2/data-doc/data/info.rkt | racket | #lang info
(define scribblings
'(("scribblings/data.scrbl" (multi-page) ("Data Structures"))))
| |
0dc5b759eaf331778d68bb9fed07bada1093caa623470111aa35dfa62a00c0a6 | slipstream/SlipStreamServer | launcher.clj | (ns slipstream.async.launcher
(:require [slipstream.async.log :as log])
(:import [com.sixsq.slipstream.connector Launcher])
(:import [com.sixsq.slipstream.persistence Run])
(:import [com.sixsq.slipstream.persistence User])
(:import [com.sixsq.slipstream.util Logger])
(:require [clojure.core.async :as async ... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/jar-async/src/slipstream/async/launcher.clj | clojure | This is the channel for queuing all launch requests
Insert launch request
Start launch readers | (ns slipstream.async.launcher
(:require [slipstream.async.log :as log])
(:import [com.sixsq.slipstream.connector Launcher])
(:import [com.sixsq.slipstream.persistence Run])
(:import [com.sixsq.slipstream.persistence User])
(:import [com.sixsq.slipstream.util Logger])
(:require [clojure.core.async :as async ... |
1f49f950049871693fb3ac9f1f6184054dae34ef688afd3087ff2a8813f10cce | duct-framework/module.ataraxy | ataraxy.clj | (ns duct.module.ataraxy
(:require [ataraxy.core :as ataraxy]
[duct.core :as duct]
[duct.core.merge :as merge]
[integrant.core :as ig]))
(defn- add-ns-prefix [kw prefix]
(keyword (str prefix (if-let [ns (namespace kw)] (str "." ns)))
(name kw)))
(defn- infer-keys [key... | null | https://raw.githubusercontent.com/duct-framework/module.ataraxy/d347c4cef5ba173cb026f8ea0e84a2a57016134e/src/duct/module/ataraxy.clj | clojure | (ns duct.module.ataraxy
(:require [ataraxy.core :as ataraxy]
[duct.core :as duct]
[duct.core.merge :as merge]
[integrant.core :as ig]))
(defn- add-ns-prefix [kw prefix]
(keyword (str prefix (if-let [ns (namespace kw)] (str "." ns)))
(name kw)))
(defn- infer-keys [key... | |
955a8805a18a33f92b12b0a37de47ca8773bb67deb26a64efafbb427496d7fad | kanatohodets/riak_core_workshop_euc2016 | yak_db_service.erl | -module(yak_db_service).
-include_lib("riak_core/include/riak_core_vnode.hrl").
-export([
ping/0
]).
-ignore_xref([
ping/0
]).
%% Public API
%% @doc Pings a random vnode to make sure communication is functional
ping() ->
%% hash the current time (<<"ping">> is our buc... | null | https://raw.githubusercontent.com/kanatohodets/riak_core_workshop_euc2016/a396bb5a1879ec0cb3d70bbc4b6cd39e097cd610/0_base_project/erlang/apps/yak_db/src/yak_db_service.erl | erlang | Public API
@doc Pings a random vnode to make sure communication is functional
hash the current time (<<"ping">> is our bucket type, artifact of riak)
to get a "document index"
vnodes who can handle this index for the given service (the yak_db_service)
..then actually send the request to that vnode | -module(yak_db_service).
-include_lib("riak_core/include/riak_core_vnode.hrl").
-export([
ping/0
]).
-ignore_xref([
ping/0
]).
ping() ->
DocIdx = riak_core_util:chash_key({<<"ping">>, term_to_binary(os:timestamp())}),
use that hash ( document index ) to get a 1 - it... |
ad2dd2952990bb023ab5d76b752b28cec26e53989c328f883a1a0ca1cf2efa90 | justinethier/cyclone | srfi-28-tests.scm | (import
(scheme base)
(srfi 28)
(cyclone test))
(test-group
"format"
(test "Hello, World!" (format "Hello, ~a" "World!"))
(test "Error, list is too short: (one \"two\" 3)
"
(format "Error, list is too short: ~s~%" '(one "two" 3))))
(test-exit)
| null | https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/tests/srfi-28-tests.scm | scheme | (import
(scheme base)
(srfi 28)
(cyclone test))
(test-group
"format"
(test "Hello, World!" (format "Hello, ~a" "World!"))
(test "Error, list is too short: (one \"two\" 3)
"
(format "Error, list is too short: ~s~%" '(one "two" 3))))
(test-exit)
| |
972bf44da3e870087f3ada67b310477f58d9554873311b004633277cb97dbdfe | Leberwurscht/Diaspora-User-Directory | nbMsgContainer.ml | (************************************************************************)
This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/nbMsgContainer.ml | ocaml | **********************************************************************
*********************************************************************
nonce: int;
* Do a non-blocking message read
* Do a blocking message read
skip over the length, since we only need it in the nonblocking case | This file is part of SKS . SKS 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 .
This program is distributed in ... |
b4f119592ef20929def987cc006c7f9ef9f3171547d5d5c7edc9c699f2562917 | synrc/bpe | bpe_ping.erl | -module(bpe_ping).
-include_lib("bpe/include/bpe.hrl").
-export([ping/1, ping/0, termination/0]).
timer_restart(Diff) -> {X,Y,Z} = Diff, erlang:send_after(500*(Z+60*Y+60*60*X),self(),{timer,ping}).
ping() -> application:get_env(bpe,ping,{0,0,30}).
termination() -> application:get_env(bpe,boundary,{7,{0,0,0}}).
ping(St... | null | https://raw.githubusercontent.com/synrc/bpe/c123b83c27865dadf7d4275f87663fe4af74012b/src/ext/bpe_ping.erl | erlang | -module(bpe_ping).
-include_lib("bpe/include/bpe.hrl").
-export([ping/1, ping/0, termination/0]).
timer_restart(Diff) -> {X,Y,Z} = Diff, erlang:send_after(500*(Z+60*Y+60*60*X),self(),{timer,ping}).
ping() -> application:get_env(bpe,ping,{0,0,30}).
termination() -> application:get_env(bpe,boundary,{7,{0,0,0}}).
ping(St... | |
6ce15258137fca6d16ca4f864af67901c54d239f28d5748c83264e0241ffc31d | janestreet/bonsai | bonsai_web_ui_reorderable_list.ml | open! Core
open! Bonsai_web
open! Bonsai.Let_syntax
module Drag_and_drop = Bonsai_web_ui_drag_and_drop
module Node = Vdom.Node
module Attr = Vdom.Attr
let transform_xy ~left ~right x y =
Attr.many
[ Attr.style
(Css_gen.create
~field:"transform"
~value:[%string "translateY(%{y#Int}px... | null | https://raw.githubusercontent.com/janestreet/bonsai/33e9a58fc55ec12095959dc5ef4fd681021c1083/web_ui/reorderable_list/src/bonsai_web_ui_reorderable_list.ml | ocaml | We need to collect a bunch of info related to positioning for each item.
This type is only used internally in the list component, so we could have
kept all these fields in a large tuple and avoided defining a new type.
However, there are enough fields that keeping them all in a tuple is
confusing. | open! Core
open! Bonsai_web
open! Bonsai.Let_syntax
module Drag_and_drop = Bonsai_web_ui_drag_and_drop
module Node = Vdom.Node
module Attr = Vdom.Attr
let transform_xy ~left ~right x y =
Attr.many
[ Attr.style
(Css_gen.create
~field:"transform"
~value:[%string "translateY(%{y#Int}px... |
d0b91c6c6a56138f8a9289a069bfcf944f65008c229091021528fca0b0da2303 | Frechmatz/cl-synthesizer | example-1.lisp | (defpackage :cl-synthesizer-modules-trigger-example-1
(:use :cl))
(in-package :cl-synthesizer-modules-trigger-example-1)
(defun example ()
"Emit trigger signal based on sine input"
(let ((rack (cl-synthesizer:make-rack :environment (cl-synthesizer:make-environment))))
(cl-synthesizer:add-module
rack
... | null | https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/ba2e4003448829078187013f6723eb5c8ce8adbc/src/modules/trigger/example-1.lisp | lisp | (run-example) | (defpackage :cl-synthesizer-modules-trigger-example-1
(:use :cl))
(in-package :cl-synthesizer-modules-trigger-example-1)
(defun example ()
"Emit trigger signal based on sine input"
(let ((rack (cl-synthesizer:make-rack :environment (cl-synthesizer:make-environment))))
(cl-synthesizer:add-module
rack
... |
886e5cb9d8b7492e17f68ded887408283ee3d72f94a63e1b7fb01c41d00e6ca2 | oxidizing/sihl | web_trailing_slash.ml | let middleware () =
let filter handler req =
let root_uri =
Core_configuration.read_string "PREFIX_PATH"
|> CCOption.value ~default:""
|> Format.asprintf "%s/"
|> Uri.of_string
in
let uri = req.Opium.Request.target |> Uri.of_string in
let uri =
uri
|> Uri.path
... | null | https://raw.githubusercontent.com/oxidizing/sihl/bfa5c7924bb573cfcdc2bd8f689dd55999800cc6/sihl/src/web_trailing_slash.ml | ocaml | don't drop root | let middleware () =
let filter handler req =
let root_uri =
Core_configuration.read_string "PREFIX_PATH"
|> CCOption.value ~default:""
|> Format.asprintf "%s/"
|> Uri.of_string
in
let uri = req.Opium.Request.target |> Uri.of_string in
let uri =
uri
|> Uri.path
... |
c18f87bb28794cefb064078ac616a7251f1289abe105793ffb9106ce23cc5339 | spwhitton/consfigurator | rehome.lisp | ;;; Consfigurator -- Lisp declarative configuration management system
Copyright ( C ) 2021 < >
;;; This file 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 , or ( at your option )
;... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/4b00c1a9ead9851275e5930fe65e3d9bfd563a24/src/connection/rehome.lisp | lisp | Consfigurator -- Lisp declarative configuration management system
This file is free software; you can redistribute it and/or modify
either version 3 , or ( at your option )
any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty o... |
Copyright ( C ) 2021 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :consfigurator.connection.rehome)
(named-readtables:in-readtable :consfigurator)
(defclass rehome-connection ()
((rehome-datadir
... |
7978956bdabbcc591522bddb35fb3dd0ebc66204ee9790305774bd935105a217 | facebookarchive/pfff | gtkSignal.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlgtk/src/gtkSignal.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
f2f87bc0456c5682efeb5fc8a40c802a8ea2053e8b4810a5c3fb8e603f956ebc | SimulaVR/godot-haskell | VideoPlayer.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VideoPlayer
(Godot.Core.VideoPlayer.sig_finished,
... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VideoPlayer.hs | haskell | | Emitted when playback is finished.
| The embedded audio track to play.
| The embedded audio track to play.
| Amount of time in milliseconds to store in buffer while playing.
| Amount of time in milliseconds to store in buffer while playing.
| Audio bus to use for sound playback.
| Audio bus to use for sound pl... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VideoPlayer
(Godot.Core.VideoPlayer.sig_finished,
... |
94cda3a634ae597c3daa1e3ce2e11592195485b96cf6ef74aa2b1a42823cda87 | cbaggers/rtg-math | matrixn.lisp | (in-package :rtg-math.matrixn)
(defun convolve (array)
(let ((data (loop for y across array append
(loop for x across array collect
(* x y)))))
(make-array (length data) :initial-contents data)))
(defun copy-array (a)
(make-array (length a) :initial-contents (loop :f... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/matrices/matrixn.lisp | lisp | (in-package :rtg-math.matrixn)
(defun convolve (array)
(let ((data (loop for y across array append
(loop for x across array collect
(* x y)))))
(make-array (length data) :initial-contents data)))
(defun copy-array (a)
(make-array (length a) :initial-contents (loop :f... | |
da4ac19d5490d9b80d1e571b1f09949691a1338a9e056fe75b0a65f24dbf251f | imandra-ai/catapult | impl.mli | (** Actual logger *)
(** Setting up and tearing down a concrete backend. *)
module type S = sig
val setup : unit -> unit
(** Install the catapult logger as a profiling backend. *)
val teardown : unit -> unit
val with_setup : (unit -> 'a) -> 'a
end
| null | https://raw.githubusercontent.com/imandra-ai/catapult/4bc5444a8471c5d0d7cb9a376a5a895c0ab042e6/src/core/impl.mli | ocaml | * Actual logger
* Setting up and tearing down a concrete backend.
* Install the catapult logger as a profiling backend. |
module type S = sig
val setup : unit -> unit
val teardown : unit -> unit
val with_setup : (unit -> 'a) -> 'a
end
|
2520da10b6aae9cf930d596fac0f3469adb4e8eb3ea8d6ac4359e65a1bc44d6f | Opetushallitus/ataru | lang_schema.cljc | (ns ataru.schema.lang-schema
(:require [schema.core :as s]))
(def Lang (s/enum :fi :sv :en))
| null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljc/ataru/schema/lang_schema.cljc | clojure | (ns ataru.schema.lang-schema
(:require [schema.core :as s]))
(def Lang (s/enum :fi :sv :en))
| |
555fc8aa20d9ffd9ebe4b4a02f648a765ee8e9a820e7645a92b9ad0e4330dfa9 | hyperledger-archives/fabric-chaintool-original | test_generate.clj | Copyright London Stock Exchange Group 2016 All Rights Reserved .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law... | null | https://raw.githubusercontent.com/hyperledger-archives/fabric-chaintool-original/fb214f89d0d6eb36e997f1c352c3320f55e2e55f/test/chaintool/protobuf/test_generate.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language ... | Copyright London Stock Exchange Group 2016 All Rights Reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns chaintool.protobuf.test_generate
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.zip :as zip]
[instaparse.core :as i... |
9243c7ad52aa6ec0f69be78db989a93ed5cf3da5351ad51ebd0a912101b84981 | rlepigre/ocaml-earley | warnings.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rlepigre/ocaml-earley/66d7acb2b22edae0c2f7d64ef2a50fa70d1ed112/ocaml_ast/src/warnings.ml | ocaml | ************************************************************************
OCaml
... | Pierre Weis & & Damien Doligez , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
When you change this , you need to update :
- the list ' description ' at the bottom of... |
4260f9fb886d1f4237f4afc92c303810b956ea5799974ca75f70b3a422dba3f5 | zcaudate/hara | hierarchy_test.clj | (ns hara.object.element.impl.hierarchy-test
(:use hara.test)
(:require [hara.object.element.impl.hierarchy :refer :all]))
(def -without-method-
(-> clojure.lang.PersistentArrayMap
(.getDeclaredMethod "without"
(into-array [Object]))))
^{:refer hara.object.element.impl.hierarchy/h... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/object/element/impl/hierarchy_test.clj | clojure | (#<Method clojure.lang.IPersistentMap.without(java.lang.Object)>)
(#<Method java.lang.CharSequence.charAt(int)>) | (ns hara.object.element.impl.hierarchy-test
(:use hara.test)
(:require [hara.object.element.impl.hierarchy :refer :all]))
(def -without-method-
(-> clojure.lang.PersistentArrayMap
(.getDeclaredMethod "without"
(into-array [Object]))))
^{:refer hara.object.element.impl.hierarchy/h... |
3dcea5c767a2aae3df248b2afbc23b96d898cebe1f740f48df340010d2740656 | cse-bristol/110-thermos-ui | debug_box.cljs | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-frontend.debug-box
(:require [reagent.core :as reagent]
[clojure.string :as string]
[clojure.pprint :a... | null | https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/729c0a279dba40b6d1a49bc485c968569741e915/src/thermos_frontend/debug_box.cljs | clojure | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-frontend.debug-box
(:require [reagent.core :as reagent]
[clojure.string :as string]
[clojure.pprint :a... | |
6d8b2a27b69f2cecec8129e03bb10cfee4cd706ee8fc2993880ab896c42d7ab7 | bubba/lsp-test | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
module Main where
import qualified Language.Haskell.LSP.TH.DataTypesJSON as LSP
import qualified Language.Haskell.LSP.TH.ClientCapabilities as LSP
import qualified LSP.Client as Client
import Data.Proxy
import qualified Data.Text.IO as T
import Control.Concurr... | null | https://raw.githubusercontent.com/bubba/lsp-test/e5f79572bad3163f6f60a3f9254e8eda9e78f8b9/test/data/documentSymbolFail/example/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
module Main where
import qualified Language.Haskell.LSP.TH.DataTypesJSON as LSP
import qualified Language.Haskell.LSP.TH.ClientCapabilities as LSP
import qualified LSP.Client as Client
import Data.Proxy
import qualified Data.Text.IO as T
import Control.Concurrent
import System.Process
import Co... |
3bc38fd2ea2007de544cf34fc628452dc1646c038d6e3c63f4f0e0f2d337b2c9 | runeksvendsen/restful-payment-channel-server | Parse.hs | {-# LANGUAGE OverloadedStrings #-}
module AppPrelude.Util.Config.Parse where
import AppPrelude.Types
import AppPrelude.Types.Orphans ()
import AppPrelude.Util
import AppPrelude.Util.Config
import Data.Configurator.Types
import qualified Servant.Common.BaseUrl as BaseU... | null | https://raw.githubusercontent.com/runeksvendsen/restful-payment-channel-server/0fe65eadccad5ef2b840714623ec407e509ad00b/src/AppPrelude/Util/Config/Parse.hs | haskell | # LANGUAGE OverloadedStrings #
path prefix |
module AppPrelude.Util.Config.Parse where
import AppPrelude.Types
import AppPrelude.Types.Orphans ()
import AppPrelude.Util
import AppPrelude.Util.Config
import Data.Configurator.Types
import qualified Servant.Common.BaseUrl as BaseUrl
import qualified Data.Tagged as ... |
43dfed75dfea1eb4179fbcb8f0563b24e820f30d387f86af557aa56da2ac348b | engineyard/vertebra-erl | herault_sup.erl | Copyright 2008 , Engine Yard , Inc.
%
This file is part of Vertebra .
%
Vertebra is free software : you can redistribute it and/or modify it under the
% terms of the GNU Lesser General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
% lat... | null | https://raw.githubusercontent.com/engineyard/vertebra-erl/cf6e7c84f6dfbf2e31f19c47e9db112ae292ec27/lib/herault/src/herault_sup.erl | erlang |
terms of the GNU Lesser General Public License as published by the Free
later version.
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
API
Supervisor callbacks | Copyright 2008 , Engine Yard , Inc.
This file is part of Vertebra .
Vertebra is free software : you can redistribute it and/or modify it under the
Software Foundation , either version 3 of the License , or ( at your option ) any
Vertebra is distributed in the hope that it will be useful , but WITHOUT ANY
Yo... |
9eba2a902b7ab79a718341fc0965892817c3e43013a64de9d57cbd1cdc55d5cc | samrocketman/home | gap-dup-continue.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Duplicate the current AnimationImage
; and continue (== load the duplicate as new current frame)
;
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/gap-dup-continue.scm | scheme | The GIMP -- an image manipulation program
and continue (== load the duplicate as new current frame)
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but... | Copyright ( C ) 1995 and
Duplicate the current AnimationImage
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
(define (script-fu-gap-dup-continue image drawable... |
7ed3407747e423c4bf3f40fb7d44f9fef19923985ad2f75d3be7b62ec90c66b0 | GaloisInc/bv-sized | Unsigned.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
|
Module... | null | https://raw.githubusercontent.com/GaloisInc/bv-sized/0997d2f7ac4a512367430ef23d767a3a1762398b/src/Data/BitVector/Sized/Unsigned.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveLift #
# LANGUAGE GADTs #
| Signed bit vector.
| Convenience wrapper for 'BV.mkBV'.
in this case, negate just means "additive inverse" | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE KindSignatures #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
|
Module : Data . BitVector . Sized . Unsigned
Copyright : ( c ) Galois Inc. 201... |
f97406926986efc9ae9c2bbbecbbe55eee0716118614108dfbf6c99c4dfc0b4a | ocaml/ocamlbuild | findlib.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/findlib.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
open My_std
open My_unix
open ... |
19526a67c97380384015cf1c4ec678d9a83b9997c7992f07ae977738af225e12 | cxphoe/SICP-solutions | 3.32.rkt | ;Let's go through the concept.
;The basic element of simulation is wire:
(define (make-wire)
(let ((signal-value 0) (action-procedures '()))
(define (set-my-signal! new-value)
(if (not (= signal-value new-value))
(begin (set! signal-value new-value)
(call-each action-procedures))
... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/3.Changed%20Data/3.32.rkt | racket | Let's go through the concept.
The basic element of simulation is wire:
As we can see, everytimes a new procedure is added into the
action-procedures, it will also be called for initialization.
take an instance:
The accept-action-procedure! is designed to call the procedure added
into itself. And a new lambda procedure... | (define (make-wire)
(let ((signal-value 0) (action-procedures '()))
(define (set-my-signal! new-value)
(if (not (= signal-value new-value))
(begin (set! signal-value new-value)
(call-each action-procedures))
'done))
(define (accept-action-procedure! proc)
(set... |
9531954579daff790dd60bf63cf2f11ecbc5dc354e5e17d468ecd9d62a1dac38 | kelsey-sorrels/robinson | startgame.clj | ;; Functions for helping with start of game
(ns robinson.startgame
(:require [robinson.common :as rc]
[taoensso.timbre :as log]
[robinson.random :as rr]
[robinson.monstergen :as mg]
[robinson.itemgen :as ig]))
(defn format [s & args]
(apply clojure.core/format s args... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/startgame.clj | clojure | Functions for helping with start of game | (ns robinson.startgame
(:require [robinson.common :as rc]
[taoensso.timbre :as log]
[robinson.random :as rr]
[robinson.monstergen :as mg]
[robinson.itemgen :as ig]))
(defn format [s & args]
(apply clojure.core/format s args))
(defn start-inventory []
(let [invento... |
c30e19f69a186ece1621c8f889262a34f8c380274fed8f20e36eaf3dec03d0b0 | emqx/emqx | emqx_misc.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/df7e9db05783b464c0714f26a901ca2a4b238c99/apps/emqx/src/emqx_misc.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 ... | Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_misc).
-compile(inline).
-elvis([{elvis_style, god_modules, disable}]).
-include(... |
b486a4a863c439e4c1ab877bfa8c395f098378ef4b45b5342ed15d7bd18d8877 | orx/ocaml-orx | facing.ml | type t =
| Left
| Right
let to_string t =
match t with
| Left -> "Left"
| Right -> "Right"
| null | https://raw.githubusercontent.com/orx/ocaml-orx/14003e2014afeaf001168a0b6a9e8fe66def820c/examples/ocaml/top_down_movement/src/facing.ml | ocaml | type t =
| Left
| Right
let to_string t =
match t with
| Left -> "Left"
| Right -> "Right"
| |
de76e5bfa79ada97f49960ed105a305d368f0d9ac051ce4961d5eebbf683cc46 | ocaml-omake/omake | lm_notify.mli |
(*
* Event manager.
*)
type t
(*
* Events.
*)
type code =
|Changed
| Deleted
| StartExecuting
| StopExecuting
| Created
| Moved
| Acknowledge
| Exists
| EndExist
| DirectoryChanged
type event =
{ notify_code : code;
notify_name : string
}
(*
* Debugging.
*)
val debug_notify ... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_notify.mli | ocaml |
* Event manager.
* Events.
* Debugging.
* Methods.
* -*-
* Local Variables:
* End:
* -*-
|
type t
type code =
|Changed
| Deleted
| StartExecuting
| StopExecuting
| Created
| Moved
| Acknowledge
| Exists
| EndExist
| DirectoryChanged
type event =
{ notify_code : code;
notify_name : string
}
val debug_notify : bool ref
val string_of_code : code -> string
val enabled ... |
0f5f78f186033226d08d87cfc947bd1333d3f3b38acb0e56aad9db65a27841d8 | hraberg/datascript-mapdb | core.clj | (ns datascript-mapdb.core
(:require [clojure.edn :as edn]
[datascript.btset :as btset]
[datascript.core :as d]
[datascript.db :as db])
(:import [org.mapdb BTreeKeySerializer$BasicKeySerializer Serializer DBMaker]
[datascript.db Datom]
[java.io DataInput Data... | null | https://raw.githubusercontent.com/hraberg/datascript-mapdb/4addc452ba9ded7cd557590fc7e81540799393bf/src/datascript_mapdb/core.clj | clojure | Uses with-redefs to replace datascript.btset with a
Public API
Taken from | (ns datascript-mapdb.core
(:require [clojure.edn :as edn]
[datascript.btset :as btset]
[datascript.core :as d]
[datascript.db :as db])
(:import [org.mapdb BTreeKeySerializer$BasicKeySerializer Serializer DBMaker]
[datascript.db Datom]
[java.io DataInput Data... |
1e2354c5d10d1646b07ed1c4f9b15ac9b8b7c38f5371a3c2a8e9bc5234ef33ba | cfelde/cljs4excel | k-means.cljs | ; This is an implementation of the k-means algorithm used within the
; cljs4excel system. It is meant both as an example of the k-means algorithm
; and as an example of how to use the various functions available within
cljs4excel . This includes reading and updating Excel document content , but
also how you ca... | null | https://raw.githubusercontent.com/cfelde/cljs4excel/4b96fb9ee0dc2167badcd3df62438b4cd36582a7/examples/k-means/k-means.cljs | clojure | This is an implementation of the k-means algorithm used within the
cljs4excel system. It is meant both as an example of the k-means algorithm
and as an example of how to use the various functions available within
using add-binding-data-event.
Example sessions:
cljs.user=> (init-headers)
nil
nil
nil
c... | cljs4excel . This includes reading and updating Excel document content , but
also how you can play on the interaction between Excel and ClojureScript
cljs.user= > ( init - random - input -10 -10 0.1 100 0 0 0.2 100 10 10 0.3 100 )
cljs.user= > ( init - centroids 3 )
(def header-id "header-id")
(def... |
099c273e31bfb7b6d1c1a8078f577ac6f8d06d10d87dba95343d1502f3bc43d7 | whalliburton/academy | words.lisp | (in-package :academy)
(defvar *words* nil)
(defun load-words ()
(setf *words*
(coerce (with-open-file (f "/usr/share/dict/words"
:direction :input :if-does-not-exist :error)
(loop for line = (read-line f nil)
while line
... | null | https://raw.githubusercontent.com/whalliburton/academy/87a1a13ffbcd60d8553e42e647c59486c761e8cf/words.lisp | lisp | (in-package :academy)
(defvar *words* nil)
(defun load-words ()
(setf *words*
(coerce (with-open-file (f "/usr/share/dict/words"
:direction :input :if-does-not-exist :error)
(loop for line = (read-line f nil)
while line
... | |
3d1213796381b2bf2da58c0801694ad531429339f0d0469b244863ff933fa548 | syntax-objects/syntax-parse-example | js-dict.rkt | #lang racket/base
(provide js-dict js-extract)
(require syntax/parse/define
racket/match
racket/hash
racket/splicing
(for-syntax racket/base
racket/list))
(begin-for-syntax
(define-splicing-syntax-class key
(pattern {~seq #:expr key:expr}
#:w... | null | https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/js-dict/js-dict.rkt | racket | #lang racket/base
(provide js-dict js-extract)
(require syntax/parse/define
racket/match
racket/hash
racket/splicing
(for-syntax racket/base
racket/list))
(begin-for-syntax
(define-splicing-syntax-class key
(pattern {~seq #:expr key:expr}
#:w... | |
ff375fddb10ac8891bb116555cd599feaeea3bb94d5045ad2c5071287a765c04 | ds-wizard/engine-backend | TemporaryFileDAO.hs | module Wizard.Database.DAO.TemporaryFile.TemporaryFileDAO where
import Control.Monad.Reader (asks)
import Data.String
import Data.Time
import qualified Data.UUID as U
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import GHC.Int
import Wizard.Database.DAO.Common
import Wizard.Database.Map... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/a2ebf9c4d0fa51b81e9a5add1ea8c9e718206344/engine-wizard/src/Wizard/Database/DAO/TemporaryFile/TemporaryFileDAO.hs | haskell | module Wizard.Database.DAO.TemporaryFile.TemporaryFileDAO where
import Control.Monad.Reader (asks)
import Data.String
import Data.Time
import qualified Data.UUID as U
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import GHC.Int
import Wizard.Database.DAO.Common
import Wizard.Database.Map... | |
15d6bfe8614a8998ad9ed18081baf82bb00fb708826a01f36b08dca290ed9333 | Helium4Haskell/helium | DerivingShow.hs | | Module : DerivingShow
License : GPL
Maintainer :
Stability : experimental
Portability : portable
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.CodeGeneration.DerivingShow
( dataShowFun... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/src/Helium/CodeGeneration/DerivingShow.hs | haskell | Show function for a data type declaration. For some reason, it uses only little information.
typeString = show (typeOfShowFunction name qual names)
nameId = idFromString ("show" ++ (getNameName) name)
Show Dictionary for a data type declaration
Show function for a type synonym
type T a b = (b, a)
===>
sh... | | Module : DerivingShow
License : GPL
Maintainer :
Stability : experimental
Portability : portable
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.CodeGeneration.DerivingShow
( dataShowFun... |
be1b19abb1ab989dc1c18b56c089ca58a094d709326807be123b18338c1c35a9 | mbj/stratosphere | AddHeaderActionProperty.hs | module Stratosphere.SES.ReceiptRule.AddHeaderActionProperty (
AddHeaderActionProperty(..), mkAddHeaderActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/ses/gen/Stratosphere/SES/ReceiptRule/AddHeaderActionProperty.hs | haskell | module Stratosphere.SES.ReceiptRule.AddHeaderActionProperty (
AddHeaderActionProperty(..), mkAddHeaderActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data... | |
7d21588ddce40670753aefc37e7279983ef59c95d44181770eaa6e909018af9f | PLTools/OCanren | test003sort.ml |
* Sort : relational sorting .
* Copyright ( C ) 2016 - 2021
* ,
* St. Petersburg State University , JetBrains Research
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2 , as published by the F... | null | https://raw.githubusercontent.com/PLTools/OCanren/1ead64bde16b0eb339a6bf790ea871e19bbaccd0/regression_ppx/test003sort.ml | ocaml | Relational minimum/maximum (for nats only)
[l] is a (non-empty) list, [s] is its smallest element,
[l'] --- all other elements
Relational sort
either both lists are empty
or the sorted one is a concatenation of the
smallest element (s) and sorted list of all other elements (xs')
Some shortcuts to... |
* Sort : relational sorting .
* Copyright ( C ) 2016 - 2021
* ,
* St. Petersburg State University , JetBrains Research
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2 , as published by the F... |
bccb1277313ed240feb5a7139d7e84ca9e73bbfd8b6d69b707a5a77ce14b5966 | berke/aurochs | nog.ml | (* Nog *)
open Machine;;
open Pffpsf;;
open Util.Syntax;;
exception Parse_error of int;;
type 'pc stack_symbol =
| PC of 'pc
| Pos of int
| Accept
;;
let print_stack_symbol oc = function
| PC(p, l) -> fp oc "%s=%d" l p
| Pos h -> fp oc "%d" h
| Accept -> fp oc "#"
;;
(*** print_stack *)
let print_stack... | null | https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/nog/nog.ml | ocaml | Nog
** print_stack
**
* Top-level production
* Entry point for parsing
* Entry point for building
* Name of the root node
** Memo
**
** Choices
**
** configuration
Last symbol seen
int option array array;
**
** print_memo
**
** print_boolean_array
**
** execute_positioned_quick
**
** execute_pos... |
open Machine;;
open Pffpsf;;
open Util.Syntax;;
exception Parse_error of int;;
type 'pc stack_symbol =
| PC of 'pc
| Pos of int
| Accept
;;
let print_stack_symbol oc = function
| PC(p, l) -> fp oc "%s=%d" l p
| Pos h -> fp oc "%d" h
| Accept -> fp oc "#"
;;
let print_stack printer oc s =
let first = ... |
35345892a5ccf4e75347be65c93baa7dee77a51a2772b849f50fc0433d4a8760 | avsm/mirage-duniverse | doc.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/topkg/src-bin/doc.ml | ocaml | ocamlbuild doesn't like Windows paths it seems. Try to do our best here.
no comment
Command line interface | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
fa33962cbb39e0a74866bf4c218b8c826a17ceebdbe396d019354d4aa2cfc918 | bscarlet/llvm-general | FunctionAttribute.hs | | Module to allow importing ' FunctionAttribute ' distinctly qualified .
module LLVM.General.AST.FunctionAttribute where
import LLVM.General.Prelude
-- | <#function-attributes>
data FunctionAttribute
= NoReturn
| NoUnwind
| ReadNone
| ReadOnly
| NoInline
| AlwaysInline
| MinimizeSize
... | null | https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general-pure/src/LLVM/General/AST/FunctionAttribute.hs | haskell | | <#function-attributes>
the two are conflated
| <#attribute-groups> | | Module to allow importing ' FunctionAttribute ' distinctly qualified .
module LLVM.General.AST.FunctionAttribute where
import LLVM.General.Prelude
data FunctionAttribute
= NoReturn
| NoUnwind
| ReadNone
| ReadOnly
| NoInline
| AlwaysInline
| MinimizeSize
| OptimizeForSize
| Opt... |
9739622761e162c3a5f039f1ca7f7b25ec0f1c54cad0fb1b9fb1901e0746b2e3 | abyala/advent-2021-clojure | day04.clj | (ns advent-2021-clojure.day04
(:require
[advent-2021-clojure.utils :refer [parse-int] :as utils]
[clojure.set :as set]
[clojure.string :as str]))
(defn parse-numbers-to-draw [line]
(->> (str/split line #",")
(map parse-int)))
(defn parse-board [lines]
{:marked #{}
:unmarked (->> (str/split... | null | https://raw.githubusercontent.com/abyala/advent-2021-clojure/b4248a58ec270dcf4f088d40401edd2fbbaae79f/src/advent_2021_clojure/day04.clj | clojure | (ns advent-2021-clojure.day04
(:require
[advent-2021-clojure.utils :refer [parse-int] :as utils]
[clojure.set :as set]
[clojure.string :as str]))
(defn parse-numbers-to-draw [line]
(->> (str/split line #",")
(map parse-int)))
(defn parse-board [lines]
{:marked #{}
:unmarked (->> (str/split... | |
5423340baabac217b01ae935db9997237cfda22e0387805c61e779223d2da5b0 | qitab/ace.core | type-test.lisp | Copyright 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
;;;;
;;;; Tests the type utilities.
;;;;
(defpackage #:ace.core.type-test
(:use #:common-lisp
#:ace.core
#:ace.core.type
#:ace.test))
(in-pac... | null | https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/type-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
Tests the type utilities.
TODO(czak): Add tests for expand, element-of-array, add-null, ...
TODO(czak): Maybe support this, too.
Tests for FUNCTION-FORM-ARGUMENT-TYPES
| Copyright 2020 Google LLC
Use of this source code is governed by an MIT - style
(defpackage #:ace.core.type-test
(:use #:common-lisp
#:ace.core
#:ace.core.type
#:ace.test))
(in-package :ace.core.type-test)
(deftype fx () 'fixnum)
(deftype u3 () '(unsigned-byte 3))
(deftype-list-of fx)... |
277cbf4489b86a43a1af6b18c8355b93c1144ec008fda46004e4e00258f59e7e | gebi/jungerl | edoc_tags.erl | %% =====================================================================
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation ; either version 2 of the
%% License, or (at your option) any lat... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/edoc/src/edoc_tags.erl | erlang | =====================================================================
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, ... | published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307
USA
$ Id$
@private
2001 - 2003
@author < >
@doc EDoc tag scanning .
-module(edoc_tags... |
83601ab2e5eb2d91b6477fecad64af3f9df6217ee0d05ee32c03998d44370205 | lgessler/fulcro-material-ui-template | common.clj | (ns fmuit.models.common
(:require [com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.parser :as pp]
[taoensso.timbre :as log]))
(defn server-message [msg]
{:server/message msg
:server/error? false})
(defn server-error [msg]
{:server/message msg
:server/error? true})
(defn a... | null | https://raw.githubusercontent.com/lgessler/fulcro-material-ui-template/efc36f25675de10800f63274616a8ff42d08f088/src/main/fmuit/models/common.clj | clojure | (ns fmuit.models.common
(:require [com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.parser :as pp]
[taoensso.timbre :as log]))
(defn server-message [msg]
{:server/message msg
:server/error? false})
(defn server-error [msg]
{:server/message msg
:server/error? true})
(defn a... | |
8b17fe3d84d7a46b159c518549d9478fa85d34a2c79a9a84375ec1a17a170883 | jiesoul/soul-talk | spec.clj | (ns soul-talk.role.spec
(:require [soul-talk.spec.core :as spec]
[spec-tools.data-spec :as ds]))
(def create-role
(ds/spec {:name :role/create
:spec {:name spec/non-empty-string?
:create_by int?
(ds/opt :note) string?
... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/role/spec.clj | clojure | (ns soul-talk.role.spec
(:require [soul-talk.spec.core :as spec]
[spec-tools.data-spec :as ds]))
(def create-role
(ds/spec {:name :role/create
:spec {:name spec/non-empty-string?
:create_by int?
(ds/opt :note) string?
... | |
633f5ab0fe74d9d7173385ff080e3c7ceade4b9b717a94772c39c99e2a902012 | ernw/ss7MAPer | map_tests.erl | -module(map_tests).
-author('Daniel Mende <>').
-include_lib("osmo_ss7/include/sccp.hrl").
-include("ss7MAPer.hrl").
-export([test_hlr/1, test_msc/1, test_smsc/1]).
%~ =========
~ HLR TESTS
%~ =========
test_hlr(L) ->
ok = sccp_user:bind_ssn(?SCCP_SSN_MSC),
Gts = {L#loop_dat.gt_local, L#loop_dat.gt_hlr},
... | null | https://raw.githubusercontent.com/ernw/ss7MAPer/5f9e784380b0fcb4fc85c96aab3161890388b443/src/map_tests.erl | erlang | ~ =========
~ =========
~ ========
~ sendRoutingInfo
~ ========
~ ========
~ sendRoutingInfoForSM
~ ========
~ ========
~ ========
~ ========
~ sendAuthenticationInfo
~ ========
~ ========
~ registerSS
~ ========
~ ========
~ ========
~ ========
~ updateLocation
~ ========
~ ========
~ anyTimeInterrogation
~ ========
~... | -module(map_tests).
-author('Daniel Mende <>').
-include_lib("osmo_ss7/include/sccp.hrl").
-include("ss7MAPer.hrl").
-export([test_hlr/1, test_msc/1, test_smsc/1]).
~ HLR TESTS
test_hlr(L) ->
ok = sccp_user:bind_ssn(?SCCP_SSN_MSC),
Gts = {L#loop_dat.gt_local, L#loop_dat.gt_hlr},
test_sri(Gts, L),
te... |
19c57f3901378c0e88b21f1d9df10448de62a709b58867b13c0f21e2f7b43a98 | screenshotbot/screenshotbot-oss | test-mquery.lisp | ;; Copyright 2018-Present Modern Interpreters Inc.
;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :util.test-mquery
(:use :cl
:fiveam
:mquery
:markup... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/2372e102c5ef391ed63aa096f678e2ad1df36afe/src/util/tests/test-mquery.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :util.test-mquery
(:use :cl
:fiveam
:mquery
:markup)
(:import-from :mquery
:split-query... |
0c80cc23dad570e4223a613fa5f800c6e9d40e26e599747bbfb69acfb5df17ae | ssardina/ergo | simple-main.scm | This program provides agent behaviour in the Squirrel World ( SW )
;;; The squirrel finds a wall ahead, and then runs back and forth.
define the interfaces to SW
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Basic action theory
(define-fluents
steps 0 ... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Projects/Squirrels/simple-main.scm | scheme | The squirrel finds a wall ahead, and then runs back and forth.
Basic action theory
the number of steps taken
the last thing seen by "look"
squirrel actions
turn left
look ahead
go forward
exogenous action
report from last look action
Control program
go forward until a wall is seen
overall: count the... | This program provides agent behaviour in the Squirrel World ( SW )
define the interfaces to SW
(define-fluents
steps (+ steps 1))
seen x)
(:until (eq? seen 'wall) (:act forward) (:act look) (:wait)))
forever do 2 lefts and n forwards
(:while #t (:act left) (:act left) (:for-all i n (:act f... |
aa30817995176f3328f5b30db74eaa2fdea8716012169f960bd465745db20eb8 | danlentz/clj-fgl | util.clj | (ns fgl.util
(:require [clojure.pprint :as pp])
(:require [clojure.repl]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Control Flow
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmacro returning
"Compute a return value, then execute... | null | https://raw.githubusercontent.com/danlentz/clj-fgl/858ea98d2840493761acefcdf82983677dd4ab17/src/fgl/util.clj | clojure |
Collections
Namespace Introspection
Timing and Performance Metric
Debugging
IO
Exceptions
(.toByteArray baos))) | (ns fgl.util
(:require [clojure.pprint :as pp])
(:require [clojure.repl]))
Control Flow
(defmacro returning
"Compute a return value, then execute other forms for side effects.
Like prog1 in common lisp, or a (do) that returns the first form."
[value & forms]
`(let [value# ~value]
~@forms
va... |
d7682c8b630011959170a122ea30ede6dd668a6b5808d6d9b99643b056177849 | parsonsmatt/kale | Kale.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Kale where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Maybe (MaybeT (..))
import Data.Ch... | null | https://raw.githubusercontent.com/parsonsmatt/kale/fe187ac5face4eb98925d0f36ad9698329837e1d/src/Kale.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
^ If the task has no arguments, this is the constructor that we use.
argument.
^ Record arguments are stored as a whole string with no attempt to
parse the types out of them.
^ The name of the task module.
^ The arguments to provide to the task.
... | # LANGUAGE FlexibleInstances #
module Kale where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Maybe (MaybeT (..))
import Data.Char (isAlphaNum, isLower, isSpace,
... |
12cdded56486d056783ffc36878fdc4fdf6cd8e62b8e1641eee52a194be1502d | exoscale/clojure-kubernetes-client | v1_fc_volume_source.clj | (ns clojure-kubernetes-client.specs.v1-fc-volume-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-fc-volume-source-data v1-fc-volume-source)
(def v1-fc-volume-source-data
{
(ds/opt :fsType) string?
(ds/opt :lun) int?
... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_fc_volume_source.clj | clojure | (ns clojure-kubernetes-client.specs.v1-fc-volume-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-fc-volume-source-data v1-fc-volume-source)
(def v1-fc-volume-source-data
{
(ds/opt :fsType) string?
(ds/opt :lun) int?
... | |
9e4014d3ae319b2a77d4a5875ffe5cb9cecb3d48c6c0dadeab2a64131296c9ad | sgbj/MaximaSharp | dlanhs.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/dlanhs.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp 20d (20D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ "
" f2cl6.l , v 1d5cbacbb... |
a0a5d2ca025745d4c4e284eaf6fb3879f54f1068feefa23d061d7ab49252dd22 | emqx/emqx-auth-mysql | emqx_auth_mysql.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the L... | null | https://raw.githubusercontent.com/emqx/emqx-auth-mysql/e49fed4d23133d83c1e48fbe6102247930714222/src/emqx_auth_mysql.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 ... | Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_auth_mysql).
-include("emqx_auth_mysql.hrl").
-include_lib("emqx/include/emqx.hrl").
-in... |
e434d015fd31f95b1ad6785d30f0911eda9c6834dd50b93dc42ffad0b9e97735 | ocramz/heidi | Internal.hs | # LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE DefaultSignatures #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
MProxy on ghc > = 8
# LANGUAGE EmptyCase #
#if MIN_VERSION_base(4,9,0)
Meta
#e... | null | https://raw.githubusercontent.com/ocramz/heidi/f2c516499cae56b9b34eaf00f39e4a689697c5d2/src/Data/GenericTrie/Internal.hs | haskell | # OPTIONS_GHC -Wno-unused-imports #
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... | # LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE DefaultSignatures #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
MProxy on ghc > = 8
# LANGUAGE EmptyCase #
#if MIN_VERSION_base(4,9,0)
Meta
#e... |
c7d6555394b74416987067c4f3a50e260db398d7aa1bc081153f87ab04f479cc | mdunnio/coinbase-pro | CoinbaseAccounts.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module CoinbasePro.Authenticated.CoinbaseAccounts
( CoinbaseAccount (..)
) where
import Data.Aeson (FromJSON (..), Value (..), withObject, (.:),
... | null | https://raw.githubusercontent.com/mdunnio/coinbase-pro/5d5fa95e66481a974786ef362a4ea55ba94c63a9/src/lib/CoinbasePro/Authenticated/CoinbaseAccounts.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
TODO: this is slightly messy, potentially refactor | # LANGUAGE GeneralizedNewtypeDeriving #
module CoinbasePro.Authenticated.CoinbaseAccounts
( CoinbaseAccount (..)
) where
import Data.Aeson (FromJSON (..), Value (..), withObject, (.:),
(.:?))
import Data.Aeson.Casing (snakeCase)
import D... |
f5b467c056f1aee687aa73ffffbb5c5a51dd9d030a8c0a6e41b79fde381d6bb5 | input-output-hk/voting-tools | Db.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
|
... | null | https://raw.githubusercontent.com/input-output-hk/voting-tools/d14c5a456dc440b1dfe7901b6f19e53e8aadea12/src/Cardano/Catalyst/Test/DSL/Internal/Db.hs | haskell | # LANGUAGE GADTs #
| Query to write the 'Transaction' to the database.
Re-writes the foreign keys so that:
Returns the persisted 'Transaction'.
| Query to write a 'UTxO' to the database.
Re-writes the foreign keys so that:
- The 'utxoTx' foreign keys are valid (see 'writeTx').
- The 'Cardano.Db.txOutTxI... | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
|
Module : Cardan... |
ab986ee768aa2bc942a9c4441e347abce87ef68922d1aa1f08ee94a4c5950dba | kitlang/kit | Base.hs | module Kit.Parser.Base where
import Kit.Error
import Kit.Ast.Span
data Parser a = ParseResult a | Err KitError
data ParseError = ParseError String (Maybe Span) deriving (Eq, Show)
instance Errable ParseError where
logError err@(ParseError msg _) = logErrorBasic (KitError err) msg
errPos (ParseError _ pos) = pos
... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Parser/Base.hs | haskell | module Kit.Parser.Base where
import Kit.Error
import Kit.Ast.Span
data Parser a = ParseResult a | Err KitError
data ParseError = ParseError String (Maybe Span) deriving (Eq, Show)
instance Errable ParseError where
logError err@(ParseError msg _) = logErrorBasic (KitError err) msg
errPos (ParseError _ pos) = pos
... | |
dc1f3f9f12e5b2179fc7398f8013b28b26e89b018cfcbf0bdec353629d4726cb | patricoferris/ocaml-multicore-monorepo | eqaf.mli | * - constant time / timing side channel resistant functions
* { 1 Basics }
In cryptography , a timing - attack is a side - channel attack in which the
attacker attempts to compromise a cryptosystem by analyzing the time taken to
execute cryptographic algorithms .
In some cases , a process need... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/eqaf/lib/eqaf.mli | ocaml | * [equal a b] returns [true] if [a] and [b] are equals. [String.equal a b =
equal a b] for any [a] and [b]. The execution time of [equal] depends solely
on the length of the strings, not the contents.
* [compare_le a b] is semantically [compare_be (rev a) (rev b)],
where [rev] is a function that reverses a s... | * - constant time / timing side channel resistant functions
* { 1 Basics }
In cryptography , a timing - attack is a side - channel attack in which the
attacker attempts to compromise a cryptosystem by analyzing the time taken to
execute cryptographic algorithms .
In some cases , a process need... |
281c6ab274cbfc6cdd82d1791e6d99abfaefc788ecbd0a50e7a93a4b42a717f0 | alexandergunnarson/quantum | defnt.cljc | (ns quantum.test.core.macros.defnt
(:require
[quantum.core.macros.defnt :as ns]
[quantum.core.log :as log
:refer [prl]]
[quantum.core.error :as err]
[quantum.core.macros.protocol :as proto]
[quantum.core.macros.reify :as reify]
[quantum.core.macros.transform :as trans]
[quantu... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/macros/defnt.cljc | clojure | any type / data shape may be checked only at runtime if desired
TODO :clj only for now
TODO derepeat
Assumes it's an actual type
TODO :clj only for now
Non |deftest| tests
namespace-resolved class
predicate class
predicate class
reify
protocol
reify
reify, 'No matching method found'
reify
reify
continue... | (ns quantum.test.core.macros.defnt
(:require
[quantum.core.macros.defnt :as ns]
[quantum.core.log :as log
:refer [prl]]
[quantum.core.error :as err]
[quantum.core.macros.protocol :as proto]
[quantum.core.macros.reify :as reify]
[quantum.core.macros.transform :as trans]
[quantu... |
32931ee1efb8d7f55e132f5a3df2c5214728dbc24ccb07ce619d7c1c09218eba | basho/stanchion | stanchion_wm_utils.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/stanchion/f6e9165790d130c074ae1714c01afd67bf4d3ccd/src/stanchion_wm_utils.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
d3571817c4fcb4a2ba8b4758f33bbb0d442ff0252f84c0a7dfb2f0abe9904e87 | hypernumbers/hypernumbers | hnfuns_integration.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2010 - 2014 Hypernumbers Ltd
%%% @doc handles integration with external websites
%%%
%%% @end
Created : 9th April 2010 by
%%%-------------------------------------------------------------------
%%%----------... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/formula_engine-1.0/src/hnfuns_integration.erl | erlang | -------------------------------------------------------------------
@doc handles integration with external websites
@end
-------------------------------------------------------------------
-------------------------------------------------------------------
LICENSE
This program is free software: you can red... | @author < >
( C ) 2010 - 2014 Hypernumbers Ltd
Created : 9th April 2010 by
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3
You should have received a copy of the GNU Affero General Public License
-module(hnfuns_integration).
-... |
c4aa7428d29e870b3d932c4775cabb78b394d8483e76c1804c7eb209e3082c00 | funkywork/nightmare | nightmare_test.mli | MIT License
Copyright ( c ) 2023 funkywork
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 Software without restriction , including without limitation the rights
to... | null | https://raw.githubusercontent.com/funkywork/nightmare/05858823d01925cb8cb02a6b29ed8a223822a0e8/lib/test/nightmare_test.mli | ocaml | * {1 Unit testing}
Although it is complicated to give a fairly formal definition of a unit test
(compared to an integration test or an {i end-to-end test}), here we
consider a unit test to be a test that simply calculates things
{i computationally} whereas an integration test embeds a database
conn... | MIT License
Copyright ( c ) 2023 funkywork
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 Software without restriction , including without limitation the rights
to... |
046effdcb8d778a381b3a6234d2214ba16eeeedcbd6b8c0ee7e967252f5429cf | futurice/haskell-mega-repo | API.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
module Futurice.App.EmailProxy.API where
import Futurice.Ap... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/email-proxy-client/src/Futurice/App/EmailProxy/API.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module Futurice.App.EmailProxy.API where
import Futurice.App.EmailProxy.Types
import Futurice.Prelude
import Prelude ()
import Servant.API
type EmailProxyAPI =
Summary "In... |
d8c8a0adc58e9597e5a255dd8e59bd8615ef8205abc1e4bc941a597d95b1e2eb | lasp-lang/lasp | lasp_game_tournament_client.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/simulations/lasp_game_tournament_client.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(lasp_game_tournament... |
c4d56659b4a9c2850589b8dce4296a1e3d8ea054725a575d3af84fea587c3fa6 | janestreet/sexplib | sexp.mli | (** Sexp: Module for handling S-expressions (I/O, etc.) *)
include Sexp_intf.S
| null | https://raw.githubusercontent.com/janestreet/sexplib/b4c3a03b671afadc5d4180224b97f034bec9764f/src/sexp.mli | ocaml | * Sexp: Module for handling S-expressions (I/O, etc.) |
include Sexp_intf.S
|
0abd0ab55bf6299ed2d845f9e70bff60c6b66861da38deea4172e8e6cfb5d6d4 | lortabac/versioning | Decoding.hs | -- | Encoding-agnosting deserialization utilities.
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ApplicativeDo #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExplicitNamespaces #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LAN... | null | https://raw.githubusercontent.com/lortabac/versioning/383a39f815ca321441caaa0a4cad61c709eda203/versioning/src/Versioning/Internal/Decoding.hs | haskell | | Encoding-agnosting deserialization utilities.
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ApplicativeDo #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Versioning.Internal.Decoding
Applied
, Apply
, ApplyM
... |
68801edfa35b55f7f7cf4c7219361c5b52438f720a9f37f3821405f8911ac889 | racket/eopl | lang.rkt | #lang eopl
;; language for MUTABLE-PAIRS
(provide (all-defined-out))
;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbo... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter4/mutable-pairs/lang.rkt | racket | language for MUTABLE-PAIRS
grammatical specification ;;;;;;;;;;;;;;;;
new for mutable-pairs
sllgen boilerplate ;;;;;;;;;;;;;;;; | #lang eopl
(provide (all-defined-out))
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digit (arbno digit)) number)
(number ("-" digit (arbno digit)) number)... |
41ddff0a60d5f0d9d26aa4ff97651d2e4d29e99e6f1d5d42711ed8cf7a755285 | serokell/importify | Extension.hs | -- | Functions that work with 'Extension's in .cabal file and in
-- separate.
module Importify.Cabal.Extension
( buildInfoExtensions
, withHarmlessExtensions
) where
import Universum
import qualified Distribution.ModuleName as Cabal
import Distribution.PackageDescript... | null | https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/src/Importify/Cabal/Extension.hs | haskell | | Functions that work with 'Extension's in .cabal file and in
separate.
'HSE.Extension'.
some parsing errors but doesn't affect already correct parsing
results. |
module Importify.Cabal.Extension
( buildInfoExtensions
, withHarmlessExtensions
) where
import Universum
import qualified Distribution.ModuleName as Cabal
import Distribution.PackageDescription (BuildInfo (..))
import qualified Language.Haskell.Extension as Cabal... |
a6b7363b2cc45ca0d397d16b66003db09acbdcec2b78b10a10444a79fd8bde1b | dalaing/little-languages | Gen.hs | module Components.Term.NatBool.Gen where
import Control.Lens (preview, review)
import Test.QuickCheck (Gen)
import Common.Term.Gen
import Components.Type.Nat.Data
import Components.Type.Bool.Data
import Components.Term.NatBool.Data
genTmIsZero :: WithNatBoolTerm ty tm
=> Gen tm
-> Gen tm
ge... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Components/Term/NatBool/Gen.hs | haskell | module Components.Term.NatBool.Gen where
import Control.Lens (preview, review)
import Test.QuickCheck (Gen)
import Common.Term.Gen
import Components.Type.Nat.Data
import Components.Type.Bool.Data
import Components.Term.NatBool.Data
genTmIsZero :: WithNatBoolTerm ty tm
=> Gen tm
-> Gen tm
ge... | |
ba9fd18917801b1db44158453bbcfe3a25bd872d29753e15dae3dbb52c54db9d | quil-lang/quilc | compiler-hook-tests.lisp | ;;;; compiler-hook-tests.lisp
;;;;
Author :
(in-package #:cl-quil-tests)
(defparameter *compiler-hook-test-file-directory*
(asdf:system-relative-pathname
':cl-quil-tests
"tests/compiler-hook-test-files/"))
(defun attach-rewirings-to-program (pp in-rewiring-vector out-rewiring-vector)
(check-type in-rew... | null | https://raw.githubusercontent.com/quil-lang/quilc/5c1142609691a817ec70442c103df3693b29d51a/tests/compiler-hook-tests.lisp | lisp | compiler-hook-tests.lisp
first, the straight-line rewiring methods
then, the block-to-block rewiring methods.
i'm too lazy to check correctness, but we're at least exercising the pathway.
TODO XXX compression disabled until QUILC-119 is resolved
Same chip as above, but with no MEASURE. Then we should use the q... | Author :
(in-package #:cl-quil-tests)
(defparameter *compiler-hook-test-file-directory*
(asdf:system-relative-pathname
':cl-quil-tests
"tests/compiler-hook-test-files/"))
(defun attach-rewirings-to-program (pp in-rewiring-vector out-rewiring-vector)
(check-type in-rewiring-vector (or null quil::integer... |
137aabe31761d24de73ae892c7e95d02e5e791d7dd871a627500e07881802327 | input-output-hk/plutus | Make.hs | | Smart constructors of PLC constants .
{-# LANGUAGE GADTs #-}
module PlutusCore.Constant.Make
( toBoundsInt
, makeBuiltinInt
, makeBuiltinBS
, makeBuiltinSize
, makeSizedConstant
, makeBuiltinBool
, makeBuiltin
, unsafeMakeBuiltin
) where
import PlutusCore.Constant.Typed
import... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1af96af28f45030c94e11138a2f13869e9e63b79/doc/notes/fomega/cek-cps-experiments/src/Make.hs | haskell | # LANGUAGE GADTs #
This is much quicker than 2^n for large
| Check whether a 'Size' is a singleton.
| Check whether an 'Integer' is in bounds (see 'checkBoundsInt') and return it as a 'Constant'.
| Check whether a 'ByteString' is in bounds (see 'checkBoundsBS') and return it as a 'Constant'.
| Check whether a 'Siz... | | Smart constructors of PLC constants .
module PlutusCore.Constant.Make
( toBoundsInt
, makeBuiltinInt
, makeBuiltinBS
, makeBuiltinSize
, makeSizedConstant
, makeBuiltinBool
, makeBuiltin
, unsafeMakeBuiltin
) where
import PlutusCore.Constant.Typed
import PlutusCore.Name
import... |
8dbd958a4efe26955cf1ff0de6153ec6633a165755f1fc7f68e9d5646440fe74 | clojure-vim/neovim-client | core.clj | (ns uuid-plugin.core
(:require [neovim-client.nvim :as nvim]
[datascript.core :as d])
#_(:gen-class))
(defn -main
[& args]
(nvim/connect!)
(nvim/register-method!
"uuid"
(fn [msg] (pr-str (d/squuid))))
Stay alive for a minute !
(dotimes [n 60]
(if (= 0 (mod n 10))
(nvim/run... | null | https://raw.githubusercontent.com/clojure-vim/neovim-client/664813b6890b9acdf4cdf58ea72049744898159f/uuid-plugin/src/uuid_plugin/core.clj | clojure | Let nvim know we're shutting down. | (ns uuid-plugin.core
(:require [neovim-client.nvim :as nvim]
[datascript.core :as d])
#_(:gen-class))
(defn -main
[& args]
(nvim/connect!)
(nvim/register-method!
"uuid"
(fn [msg] (pr-str (d/squuid))))
Stay alive for a minute !
(dotimes [n 60]
(if (= 0 (mod n 10))
(nvim/run... |
fbc0b8fda33104b863cdef9561d8073f026fda44693edfb52cfe95eb18080fd3 | raaz-crypto/raaz | Unsafe.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE DataKinds #-}
# LANGUAGE KindSignatures #
-- |
--
-- Module : Raaz.Core.Transfer.Unsafe
Copyright : ( c ) , 2019
-- License : Apache-2.0... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/1d17ead6d33c5441a59dbc4ff33197e2bd6eb6ec/core/Raaz/Core/Transfer/Unsafe.hs | haskell | # LANGUAGE DataKinds #
|
Module : Raaz.Core.Transfer.Unsafe
License : Apache-2.0 OR BSD-3-Clause
Maintainer : Piyush P Kurur <>
Stability : experimental
* Transfer actions.
Low level buffer operations are problematic portions of any
crypto-library. Buffers are usually represented... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE KindSignatures #
Copyright : ( c ) , 2019
module Raaz.Core.Transfer.Unsafe
$ transfer$
Transfer, ReadFrom, WriteTo
, unsafeMakeTransfer
, ... |
57605db8cf9f3821150bc7e5c9185ba9687121e81a4c5da21c3b7404192aed71 | marcin-rzeznicki/stackcollapse-ghc | UserModule.hs | stackcollapse - ghc - fold GHC prof files into flamegraph input
Copyright ( C ) 2020
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 , o... | null | https://raw.githubusercontent.com/marcin-rzeznicki/stackcollapse-ghc/6ff9b8d526dbeccb68aab02bec7cd7b2e53515ef/src/UserModule.hs | haskell | stackcollapse - ghc - fold GHC prof files into flamegraph input
Copyright ( C ) 2020
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 , o... | |
32aad24083301664885bf7bbe4bc13708d1688acd359f9bfc635a1eff47c5d6b | raehik/binrep | Internal.hs | module Binrep.Generic.Internal where
import GHC.TypeLits
import Data.Text ( Text )
data Cfg a = Cfg
{ cSumTag :: String -> a
-- ^ How to turn a constructor name into a byte tag.
, cSumTagEq :: a -> a -> Bool
, cSumTagShow :: a -> Text
}
| Common type error string for when GHC attempts to derive an bin... | null | https://raw.githubusercontent.com/raehik/binrep/4c60cdc59f60444c3dbfc708a13968b79d52c82d/src/Binrep/Generic/Internal.hs | haskell | ^ How to turn a constructor name into a byte tag.
for a (the?) void datatype @V1@. | module Binrep.Generic.Internal where
import GHC.TypeLits
import Data.Text ( Text )
data Cfg a = Cfg
{ cSumTag :: String -> a
, cSumTagEq :: a -> a -> Bool
, cSumTagShow :: a -> Text
}
| Common type error string for when GHC attempts to derive an binrep instance
type GErrRefuseVoid =
'Text "Refusing ... |
574341c7e5b9db8dc81a4c4892d7f01eee8fe7a7c0add9dec3363aa79f66c37a | plumatic/grab-bag | deploy.clj | (ns model-explorer.deploy
(:use plumbing.core)
(:require
[plumbing.graph :as graph]
[plumbing.new-time :as new-time]
[plumbing.serialize :as serialize]
[plumbing.parallel :as parallel]
[web.fnhouse :as fnhouse]
[aws.ec2 :as ec2]
[store.bucket :as bucket]
[store.sql :as sql]
[service.core ... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/model-explorer/src/model_explorer/deploy.clj | clojure | bucket to put arbitrary HTML pages.
(fn [datatype] (isis-db/all-data-with-neighbors isis-data datatype (models/datum->auto-labels-fn model-graph))) | (ns model-explorer.deploy
(:use plumbing.core)
(:require
[plumbing.graph :as graph]
[plumbing.new-time :as new-time]
[plumbing.serialize :as serialize]
[plumbing.parallel :as parallel]
[web.fnhouse :as fnhouse]
[aws.ec2 :as ec2]
[store.bucket :as bucket]
[store.sql :as sql]
[service.core ... |
2c732205caf3fe6ab2756711d5e70c035ff1b7d2c784683a8aae6a4456df13b2 | Haskell-mouse/wigner-ville-accelerate | PseudoWigner.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
-- |
Module : Data . Array . Accelerate . Math .
Copyright : [ 2017 ]
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
Functions needed for computation of a Psudo... | null | https://raw.githubusercontent.com/Haskell-mouse/wigner-ville-accelerate/af2db06f71f054d4b45ba75688b2b725fd179b9c/src/Data/Array/Accelerate/Math/PseudoWigner.hs | haskell | |
License : BSD3
Stability : experimental
This module uses the accelerate-fft library. And the base implementation of fft
uses a naive divide-and-conquer fft implementation
whose absolute performance is appalling. It also requires that you know on
For performance, compile accelerate-fft against the fo... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
Module : Data . Array . Accelerate . Math .
Copyright : [ 2017 ]
Maintainer : < >
Portability : non - portable ( GHC extensions )
Functions needed for computation of a PsudoWigner transform using the accelerate - fft library .
the si... |
c7b2629f6809ac586b2f3ec1e1c3b1c9e2951a5dbb254cfb627584812d1b214b | bbc/haskell-workshop | C2StartingOut.hs | module C2StartingOut where
-- To load in ghci: :load C2StartingOut.hs
-- Then you will be able to run all of these functions
Write a function to subtract two numbers
Example : sub 100 72 returns 28
sub x y = x - y
-- Write a function that calculates the area of a circle
Hint : Use pi from Prelude
Example : a... | null | https://raw.githubusercontent.com/bbc/haskell-workshop/475b9bac04167665030d7863798ccd27dfd589d0/imjacobclark/exercises/week1/src/C2StartingOut.hs | haskell | To load in ghci: :load C2StartingOut.hs
Then you will be able to run all of these functions
Write a function that calculates the area of a circle
Example: getLetters 8 returns ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
Generate a palindrome from any input string (doesn't have to be meaningful)
Example: fizzBuzz ret... | module C2StartingOut where
Write a function to subtract two numbers
Example : sub 100 72 returns 28
sub x y = x - y
Hint : Use pi from Prelude
Example : area 10 returns 314.1592653589793
area r = pi * r^2
Take two arguments and concatenate them together
Example : myConcat " hello " " Haskell " returns "... |
3e8348d400feb0fc14f6421ed78878973e6beab77b733be24d0cc4f5d46fcd77 | padsproj/pads-haskell | Binary.hs | # LANGUAGE TypeFamilies , TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables #
module Binary where
import Language.Pads.Padsc
import Language.Pads.Library.LittleEndian as LE
import qualified Language.Pads.Library.BigEndian as BE
im... | null | https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/examples/Binary.hs | haskell | # LANGUAGE TypeFamilies , TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables #
module Binary where
import Language.Pads.Padsc
import Language.Pads.Library.LittleEndian as LE
import qualified Language.Pads.Library.BigEndian as BE
im... | |
d6dd737f2884e0f8cd33a8b1a8a70f49c239b692736949a36251ff87bfc37f1f | open-services/open-registry | draw-logo.clj | (ns open-registry.draw-logo
(:import java.io.File
java.awt.Color
java.awt.image.BufferedImage
javax.imageio.ImageIO
java.awt.RenderingHints))
;; 0 = background
1 = orange
2 = blue
(def grid [[0 1 1 0 2 2 0]
[1 0 0 1 0 0 2]
[1 0 0 1 2 2 0]
... | null | https://raw.githubusercontent.com/open-services/open-registry/c4436acca921287a6b35ff31062505cf64577b57/scripts/draw-logo.clj | clojure | 0 = background
the width and height of each block
the margin of each block
border radius (smoothing)
enable anti-aliasing + better render quality
use background if set | (ns open-registry.draw-logo
(:import java.io.File
java.awt.Color
java.awt.image.BufferedImage
javax.imageio.ImageIO
java.awt.RenderingHints))
1 = orange
2 = blue
(def grid [[0 1 1 0 2 2 0]
[1 0 0 1 0 0 2]
[1 0 0 1 2 2 0]
[1 0 0 1 0 0 2]... |
bb3c0b76458942adeda442ffcadce237b6f48fa048cca29ed57f8d7f9f383aff | agrafix/Spock | Spec.hs | module Main where
import Test.Hspec
import qualified Web.Spock.Internal.CookiesSpec
import qualified Web.Spock.Internal.UtilSpec
import qualified Web.Spock.SafeSpec
main :: IO ()
main = hspec $
do
Web.Spock.Internal.CookiesSpec.spec
Web.Spock.Internal.UtilSpec.spec
Web.Spock.SafeSpec.spec
| null | https://raw.githubusercontent.com/agrafix/Spock/6055362b54f2fae5418188c3fc2fc1659ca43e79/Spock-core/test/Spec.hs | haskell | module Main where
import Test.Hspec
import qualified Web.Spock.Internal.CookiesSpec
import qualified Web.Spock.Internal.UtilSpec
import qualified Web.Spock.SafeSpec
main :: IO ()
main = hspec $
do
Web.Spock.Internal.CookiesSpec.spec
Web.Spock.Internal.UtilSpec.spec
Web.Spock.SafeSpec.spec
| |
d686234ba4ad1168edd90ac1fcdd42ed92c10f08363c27cfd301e00159a4603e | mbutterick/beautiful-racket | expander.rkt | #lang br/quicklang
(require racket/stxparam)
(provide (all-defined-out) (all-from-out br/quicklang))
(define-macro top #'begin)
(define-macro (assignment ID VAL) #'(define ID VAL))
(define (add/concat . xs)
(cond
[(andmap number? xs) (apply + xs)]
[(ormap string? xs) (string-join (map ~a xs) "")]))
(def... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/javascriptlike-demo/expander.rkt | racket | #lang br/quicklang
(require racket/stxparam)
(provide (all-defined-out) (all-from-out br/quicklang))
(define-macro top #'begin)
(define-macro (assignment ID VAL) #'(define ID VAL))
(define (add/concat . xs)
(cond
[(andmap number? xs) (apply + xs)]
[(ormap string? xs) (string-join (map ~a xs) "")]))
(def... | |
e6f56f91e5566e2a58f2b6d9803ceb1b847cc2170d63c2a7c89115d61bdc7194 | GrammaTech/sel | rest.lisp | ;;;; rest.lisp --- REST API tests.
(defpackage :software-evolution-library/test/rest
(:nicknames :sel/test/rest)
(:use
:gt/full
:clack
:snooze
:drakma
#+gt :testbot
:software-evolution-library/test/util
:software-evolution-library/test/util-clang
:stefil+
:software-evolution-library
:s... | null | https://raw.githubusercontent.com/GrammaTech/sel/1d611ef96705837ddecdb7e95f708225164a4291/test/rest.lisp | lisp | rest.lisp --- REST API tests.
store the new client for further tests
test ensures the web service is running and it can create a new client,
test ensures the web service is running and it can create a new software
This produces a warning that FACT-ENTRY is undefined,
but the function is defined by the fixture | (defpackage :software-evolution-library/test/rest
(:nicknames :sel/test/rest)
(:use
:gt/full
:clack
:snooze
:drakma
#+gt :testbot
:software-evolution-library/test/util
:software-evolution-library/test/util-clang
:stefil+
:software-evolution-library
:software-evolution-library/command-l... |
60a8d97b1edbf5bf0fd21b0a3aa21d2f3ac1685dc959bdab0f63c07a32ba86a3 | shirok/Gauche | format.scm | ;; srfi.29.format - SRFI-29 compatible 'format'.
;; Taken from SRFI-29 reference implementation.
;;
Copyright ( C ) ( 2002 ) . All Rights Reserved .
;;
;; This document and translations of it may be copied and furnished to
;; others, and derivative works that comment on or otherwise explain it
;; or assist in its... | null | https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/srfi/29/format.scm | scheme | srfi.29.format - SRFI-29 compatible 'format'.
Taken from SRFI-29 reference implementation.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published and
distributed, ... |
Copyright ( C ) ( 2002 ) . All Rights Reserved .
defined in the SRFI process must be followed , or as required to
translate it into languages other than English .
" AS IS " basis and THE AUTHOR AND THE SRFI EDITORS DISCLAIM ALL
WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE
ANY RIGHTS... |
e3e6ec0085cbca6491db447e6300f475414c9eb6985606115a847bc89236d001 | nyu-acsys/drift | indirectHO01.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c1_COEFFICIENT_1088 = 0
let rec c0_COEFFICIENT_1087 = 0
let id_1030 set_flag_app_1138 s_app_h_EXPARAM_1131 x_1031 = x_1031
let app_without_checking_1158 x_DO_NOT_CARE_1213 x_DO_NOT_CARE_1214 h_EXPARAM_1090 x_DO_NOT_CARE_1211 x_DO_NOT_CARE_1212 h_10... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/indirectHO01.ml | ocaml | -:{v:Int | true} |
let rec bot _ = bot ()
let fail _ = assert false
let rec c1_COEFFICIENT_1088 = 0
let rec c0_COEFFICIENT_1087 = 0
let id_1030 set_flag_app_1138 s_app_h_EXPARAM_1131 x_1031 = x_1031
let app_without_checking_1158 x_DO_NOT_CARE_1213 x_DO_NOT_CARE_1214 h_EXPARAM_1090 x_DO_NOT_CARE_1211 x_DO_NOT_CARE_1212 h_10... |
cffa782e324fb6a29d2956d9b6b04aa344a6ac193dcee9e1c40ddad1dc59b598 | kubernetes-client/haskell | Config.hs | {-# LANGUAGE OverloadedStrings #-}
module Kubernetes.Client.Config
( KubeConfigSource(..)
, addCACertData
, addCACertFile
, applyAuthSettings
, clientHooksL
, defaultTLSClientParams
, disableServerCertValidation
, disableServerNameValidation
, disableValidateAuthMethods
, loadPEMCerts
, mkInClust... | null | https://raw.githubusercontent.com/kubernetes-client/haskell/e848bc0c5c8d4fe4d2c9e8555331c219814c8ec9/kubernetes-client/src/Kubernetes/Client/Config.hs | haskell | # LANGUAGE OverloadedStrings #
|Creates 'NH.Manager' and 'K.KubernetesClientConfig' assuming it is being executed in a pod
|Sets the master URI in the 'K.KubernetesClientConfig'.
^ Master URI |
module Kubernetes.Client.Config
( KubeConfigSource(..)
, addCACertData
, addCACertFile
, applyAuthSettings
, clientHooksL
, defaultTLSClientParams
, disableServerCertValidation
, disableServerNameValidation
, disableValidateAuthMethods
, loadPEMCerts
, mkInClusterClientConfig
, mkKubeClientConf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.