_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 |
|---|---|---|---|---|---|---|---|---|
ba92e7869833709e2b9389d670c051039ca7e1481ef6dc10a25358292be6ed13 | sgbj/MaximaSharp | dgelq2.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/dgelq2.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... |
66cb92c27f5af088803b9b11a615739be982b1bf4266977a07f444b904e0d589 | sgbj/MaximaSharp | dlaset.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/dlaset.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... |
76cafe022019dd8393ed6b01f4d0ec2cf131e1c8cb53243164e3bbd447b442cb | hyperfiddle/electric | photon_reagent_tutorial.cljc | (ns hyperfiddle.client.photon
(:require [hyperfiddle.photon-dom :as dom]
[hfdl.lang :as photon]
[missionary.core :as m])
#?(:cljs (:require-macros [hyperfiddle.client.photon :refer [simple-component simple-parent
hello-component ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/68f6eb7e38f76844f6a70c5055e7d30660d7eb38/scratch/photon_reagent_tutorial.cljc | clojure | (ns hyperfiddle.client.photon
(:require [hyperfiddle.photon-dom :as dom]
[hfdl.lang :as photon]
[missionary.core :as m])
#?(:cljs (:require-macros [hyperfiddle.client.photon :refer [simple-component simple-parent
hello-component ... | |
3b01526885402b30ec05ce3e87acb092b931028e6c718edbc5d6a683de069c7f | rethab/bindings-dsl | Utilities.hs | -- | <-utilities.html>
module Bindings.GLib.Utilities (
module Bindings.GLib.Utilities.CommandlineOptionParser,
module Bindings.GLib.Utilities.DateAndTimeFunctions,
module Bindings.GLib.Utilities.HostnameUtilities,
module Bindings.GLib.Utilities.SimpleXmlSubsetParser,
module Bindings.GLib.Utilities.UnicodeMan... | null | https://raw.githubusercontent.com/rethab/bindings-dsl/8167c061144d78ec9caac1026ba57d7231811405/bindings-glib/src/Bindings/GLib/Utilities.hs | haskell | | <-utilities.html> | module Bindings.GLib.Utilities (
module Bindings.GLib.Utilities.CommandlineOptionParser,
module Bindings.GLib.Utilities.DateAndTimeFunctions,
module Bindings.GLib.Utilities.HostnameUtilities,
module Bindings.GLib.Utilities.SimpleXmlSubsetParser,
module Bindings.GLib.Utilities.UnicodeManipulation,
) where
imp... |
be344aff938ba2c01ddd9d0ea2d2e5a857fe43235160e880b5c2c3756fca0795 | ghcjs/ghcjs-dom | HTMLOListElement.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.HTMLOListElement
(js_setCompact, setCompact, js_getCompact, getCompact, js_setStart,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLOListElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/HTMLOListElement.compact Mozilla HTMLOListElement.compact documentation>
| <-US/docs/Web/API/HTMLOListElement.compact Mozilla HTMLOListElement.compact documentation>
| <-US/docs/Web/API/HTMLOListElement... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.HTMLOListElement
(js_setCompact, setCompact, js_getCompact, getCompact, js_setStart,
setStart, js_getStart, getStart, js_setReversed, setReversed,
js_getReversed, getReve... |
1e06bb744f40badda7404fa2a40f56e1bbb2df155c52d488a91e92b33f47384a | janestreet/hardcaml | scope.mli | (** Scopes control the process of hierarchical circuit generation.
They track a circuit database of instantiated modules, and a scheme for managing the
naming of signals within the design. *)
open Base
module Path : sig
type t [@@deriving sexp_of]
val default_path_seperator : string
val to_string : ?s... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/scope.mli | ocaml | * Scopes control the process of hierarchical circuit generation.
They track a circuit database of instantiated modules, and a scheme for managing the
naming of signals within the design.
* Control of name generation in a hierarchy of modules. The position of a module within
a hierarchy is determined by a ... |
open Base
module Path : sig
type t [@@deriving sexp_of]
val default_path_seperator : string
val to_string : ?sep:string -> t -> string
val to_list : t -> string list
end
module Naming_scheme : sig
type t =
| Full_path
| Local_path
| No_path
[@@deriving sexp_of]
end
type t [@@deriving sexp_o... |
01f3acd32ef06a264fdcf64a907dc9e61bfe50e20fcb044fd66a4f26c190e228 | quil-lang/quilc | package.lisp | ;;;; src/package.lisp
;;;;
Author :
(defpackage #:cl-quil.resource
(:use #:cl)
(:local-nicknames (#:a #:alexandria))
(:export
#:resource-collection ; TYPE
#:make-resource-collection ; FUNCTION
#:make-qubit-resource ; FUNCTION
#:make-null-resource ... | null | https://raw.githubusercontent.com/quil-lang/quilc/5c1142609691a817ec70442c103df3693b29d51a/src/package.lisp | lisp | src/package.lisp
TYPE
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
PREDICATE
PREDICATE
PREDICATE
PREDICATE
frontend-options.lisp
VARIABLE
VARIABLE
VARIABLE
VARIABLE
VARIABLE
VARIABLE
types.lisp
TYPE
FUNCTION
TYPE
FUNCTION
TYPE
FUNCTION
TYPE
FUNCTION
T... | Author :
(defpackage #:cl-quil.resource
(:use #:cl)
(:local-nicknames (#:a #:alexandria))
(:export
))
(defpackage #:cl-quil.frontend
(:use #:cl
#:parse-float
#:abstract-classes
#:singleton-classes)
(:local-nicknames (#:a #:alexandria))
(:export
)
(:export
)
fro... |
c2f5fc6ec62cf47ed9c37d4904a8dc23d1ae9bf6fb41184580605272838c577d | tomsmalley/semantic-reflex | Transition.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE FunctionalDependencies #
# LANGUAGE OverloadedLists #
# LANGUAGE RecursiveDo #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | Semantic UI transitions. Pure reflex implem... | null | https://raw.githubusercontent.com/tomsmalley/semantic-reflex/5a973390fae1facbc4351b75ea59210d6756b8e5/semantic-reflex/src/Reflex/Dom/SemanticUI/Transition.hs | haskell | # LANGUAGE ConstraintKinds #
| Semantic UI transitions. Pure reflex implementation is provided.
-ui.com/modules/transition.html
* Transition
* Animation
* Action
| Transition types as listed in
-ui.com/modules/transition.html#transitions
Include an extra type, 'Instant', for convenience.
| Animation types as l... | # LANGUAGE DeriveFunctor #
# LANGUAGE FunctionalDependencies #
# LANGUAGE OverloadedLists #
# LANGUAGE RecursiveDo #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Reflex.Dom.SemanticUI.Transition
(
Transition (..)
, TransitionTyp... |
7007ba83bb8e145cc85a75c460fc57d2a73082e566e21412a62d1a980f94a217 | mpickering/apply-refact | Import11.hs | import qualified A as A | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Import11.hs | haskell | import qualified A as A | |
1535be332c107ba3a53093e86c92832e08dfcf26e78ea29df533dab44bb11c83 | IC3Hydra/Hydra | Bytecode.hs | module EVM.Bytecode
( Opcode (..)
, opcodeToWord8
, word8ToOpcode
, EVM.Bytecode.parse
, isWellFormed
, assemble
, opcodeSize
, programCounters
, byteStringToHexString
, hexStringToByteString
, bytestringToInteger
, integerToBytes
) where
TODO(lorenzb ): Reorganize... | null | https://raw.githubusercontent.com/IC3Hydra/Hydra/ba42d62108bb1a374bc2e2290d6535c22062b2d3/hydra/instrumenter/src/EVM/Bytecode.hs | haskell | module EVM.Bytecode
( Opcode (..)
, opcodeToWord8
, word8ToOpcode
, EVM.Bytecode.parse
, isWellFormed
, assemble
, opcodeSize
, programCounters
, byteStringToHexString
, hexStringToByteString
, bytestringToInteger
, integerToBytes
) where
TODO(lorenzb ): Reorganize... | |
74832908a4097e6395575038bc164f643e631d3a5605fd3996b0f5bbdd029aec | rabbitmq/khepri | cluster_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(cluster_SUITE).
-include_lib("kernel/include/l... | null | https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/cluster_SUITE.erl | erlang |
TODO: Verify that the server process exited.
TODO: Verify that the server process exited.
The process is restarted by its supervisor. Depending on the timing, we
may get a `noproc' or an exception.
We assume all nodes are using the same Ra system name & store ID.
We try a put from the stopped leader and it shou... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved .
-module(cluster_SUITE).
-include_lib("kernel/include/logger.... |
b4c6700166ceefc02b4f5a7a654c6ffc7f5fced56a30333f7f69bff01c8f8db6 | NorfairKing/really-safe-money | AmountOf.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
{-# OPTIONS_GHC -Wno-duplicate-exports -Wno-dodgy-exports -Wno-redundant-constraints #-}
module Money.AmountOf
( AmountOf... | null | https://raw.githubusercontent.com/NorfairKing/really-safe-money/6a4ecbdd47d094e51c8e3874cda57d900a03ff31/really-safe-money/src/Money/AmountOf.hs | haskell | # OPTIONS_GHC -Wno-duplicate-exports -Wno-dodgy-exports -Wno-redundant-constraints #
=== Representation
The underlying representation is 'Amount'.
See its documentation for more details.
| See 'Amount.zero'
| Annotate an amount with a currency
| Remove an amount's currency annotation
| See 'Amount.toMinimalQua... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Money.AmountOf
( AmountOf (..),
IsCurrencyType (..),
zero,
fromAmount,
toAmount,
toMinimalQuan... |
017bc1c832ce8dcecc1ea4221b188f97f5467f05fd12a853486287ac443a9e67 | samply/blaze | arithmetic_operators_test.clj | (ns blaze.elm.compiler.arithmetic-operators-test
"16. Arithmetic Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.anomaly :as ba]
[blaze.elm.compiler :as c]
[blaze.elm.compiler.arithmetic-operators-spec]
[blaze.elm.compiler.core :as core]
[blaze.elm.c... | null | https://raw.githubusercontent.com/samply/blaze/580ec3296aff8c6e01b88fbfe6322737d710c7ab/modules/cql/test/blaze/elm/compiler/arithmetic_operators_test.clj | clojure |
The Abs operator returns the absolute value of its argument.
When taking the absolute value of a quantity, the unit is unchanged.
If the argument is null, the result is null.
The Add operator performs numeric addition of its arguments.
When adding quantities, the dimensions of each quantity must be the same,... | (ns blaze.elm.compiler.arithmetic-operators-test
"16. Arithmetic Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.anomaly :as ba]
[blaze.elm.compiler :as c]
[blaze.elm.compiler.arithmetic-operators-spec]
[blaze.elm.compiler.core :as core]
[blaze.elm.c... |
ebd3ee30642d25241021b960aac234645055b3bdd1e7bf4341d88d141d2cf315 | sbcl/sbcl | huffman.lisp | a simple huffman encoder / decoder , used to compress unicode
;;;; character names.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public ... | null | https://raw.githubusercontent.com/sbcl/sbcl/84ee8f84dd5830218cd3a4a2d3bad1044f76410e/src/code/huffman.lisp | lisp | character names.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
unknown | a simple huffman encoder / decoder , used to compress unicode
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-IMPL")
(defstruct (huffman-node (:constructo... |
de9db32bbdd2c0b3996581a5d456f90b839929399f1dfdb39418ec1e9654dcbd | ztellman/penumbra | frame_buffer.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by... | null | https://raw.githubusercontent.com/ztellman/penumbra/db43d01c280305beab26d1004ae78b1777ab3fc7/src/penumbra/opengl/frame_buffer.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns penumbra.opengl.frame-buffer
(:use [penumbra.opengl core]
[penumbra.opengl.shader :only [uniform-location]]
[penumbra.def :only [defn-memo]]
[penumbra.seq :only [indexed]])
(require [penumbra.opengl.texture :as tex])
(:import [org.lwjgl Bu... |
b8ffc06e910c7b4d01d55893cee73e5f186daeb7f26b1f96d9c8715ffc4e8941 | may-liu/qtalk | mod_muc_subscribe.erl | -module(mod_muc_subscribe).
-behaviour(gen_mod).
-define(PROCNAME, mod_muc_subscribe).
-define(SERVER, ?MODULE).
-define(DEFAULT_POOL_SIZE, 9).
-include("ejabberd.hrl").
-include("logger.hrl").
-export([start/2,stop/1]).
-export([start_link/2,init/1]).
-export([add_pid/2, remove_pid/2,get_pids/1, get_random_pid/1])... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/mod_muc_subscribe.erl | erlang | -module(mod_muc_subscribe).
-behaviour(gen_mod).
-define(PROCNAME, mod_muc_subscribe).
-define(SERVER, ?MODULE).
-define(DEFAULT_POOL_SIZE, 9).
-include("ejabberd.hrl").
-include("logger.hrl").
-export([start/2,stop/1]).
-export([start_link/2,init/1]).
-export([add_pid/2, remove_pid/2,get_pids/1, get_random_pid/1])... | |
cd3c177aba493fd2c06f5b221033c147f621740b97e245487a2f87bb5e4306c7 | iambrj/imin | var_test_12.rkt | (let ([x (read)])
(+ x 2))
| null | https://raw.githubusercontent.com/iambrj/imin/5d84643eead7e7129342fc285a094c27c82716d3/tests/var_test_12.rkt | racket | (let ([x (read)])
(+ x 2))
| |
a85649f9022d397be1a6672136b38cae8ff7fc78946032bd4e7c6194f328682f | Eelis/geordi | Tests.hs | # LANGUAGE UnicodeSyntax #
module Main (main) where
import qualified Editing.EditsPreparation
import qualified Editing.Parse
import qualified Editing.Execute
import qualified Editing.Diff
import qualified Cxx.Show
import qualified Cxx.Parse
import Parsers (eof, parseOrFailE)
import Util (test_cmp, (<<), (.))
import ... | null | https://raw.githubusercontent.com/Eelis/geordi/d23ae7ab1f7dfd9c456a0da9bd7abbd0695e46d4/src/Editing/Tests.hs | haskell | Spaces don't matter when matching declarator-ids.
Order-sensitive edits:
Edit errors:
test for success
test for failure
Todo: Group.
Todo: "Erased all \"char y(34);\" and all \"<< y\"."
t "pointer to int and double" $ Left "Unexpected \"a\" after \"to int \". Expected type-specifier, abstract-declarator, or end ... | # LANGUAGE UnicodeSyntax #
module Main (main) where
import qualified Editing.EditsPreparation
import qualified Editing.Parse
import qualified Editing.Execute
import qualified Editing.Diff
import qualified Cxx.Show
import qualified Cxx.Parse
import Parsers (eof, parseOrFailE)
import Util (test_cmp, (<<), (.))
import ... |
0b0965ceda404469adec96d0a2546c1eec515c28ee90620de7bf997497a429fd | ocaml-ppx/ppx | deriving.ml | open Base
open Base_quickcheck
open Ppx_ast
type position = Lexing.position =
{ pos_fname : string
; pos_lnum : int
; pos_bol : int
; pos_cnum : int
}
[@@deriving equal, quickcheck, sexp_of]
type location = Location.t =
{ loc_start : position
; loc_end : position
; loc_ghost : bool
}
[@@deriving equ... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/test/deriving.ml | ocaml | $ | open Base
open Base_quickcheck
open Ppx_ast
type position = Lexing.position =
{ pos_fname : string
; pos_lnum : int
; pos_bol : int
; pos_cnum : int
}
[@@deriving equal, quickcheck, sexp_of]
type location = Location.t =
{ loc_start : position
; loc_end : position
; loc_ghost : bool
}
[@@deriving equ... |
ccfd4a47ed84c6a055cb76f6968ca076626002ce71fd02426f6998763340333d | dbuenzli/topkg | ipc.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/dbuenzli/topkg/ea1e0981a18ce4160ec21e8a73f67cb748059671/src-bin/ipc.ml | ocaml | 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) ... |
ead902a64f2810220456bd74de8f70f6d5f58fc5bffd3024f325108728141c90 | xsc/claro | tuple.cljc | (ns claro.data.tree.tuple
(:require [claro.data.protocols :as p]
[claro.data.tree.utils :as u])
(:import [claro.data.protocols ResolvableTree]))
# # Tree Type
(deftype ResolvableTuple [resolvables elements]
ResolvableTree
(wrapped? [_]
false)
(processable? [_]
false)
(resolved? [_]
... | null | https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/data/tree/tuple.cljc | clojure | (ns claro.data.tree.tuple
(:require [claro.data.protocols :as p]
[claro.data.tree.utils :as u])
(:import [claro.data.protocols ResolvableTree]))
# # Tree Type
(deftype ResolvableTuple [resolvables elements]
ResolvableTree
(wrapped? [_]
false)
(processable? [_]
false)
(resolved? [_]
... | |
de95adae6df69ef38cb8e0d5177d2ede43789ca460a72909c275ad551b862762 | ekmett/linear | Metric.hs | # LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2012 - 2015
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability... | null | https://raw.githubusercontent.com/ekmett/linear/3efe225e20948703f5b62039b38018f1ffa8a652/src/Linear/Metric.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
Free metric spaces
--------------------------------------------------------------------------
$setup
| Free and sparse inner pro... | # LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE Trustworthy #
Copyright : ( C ) 2012 - 2015
Maintainer : < >
module Linear.Metric
( Metric(..), normalize, project
) where
import Control.Applicative
import Data.Foldable as Foldable
import Data.Functor.Compose
import Data.Functor.Identit... |
58f00c3061458cdec7350a2abe62dcab32bbe127bd88cb4a275c8d7502a5a651 | snapframework/snap-core | Tests.hs | # OPTIONS_GHC -fno - warn - warnings - deprecations #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Snap.Util.Proxy.Tests (tests) where
------------------------------------------------------------------------------
import Control.Monad.State.Strict (modify)
import ... | null | https://raw.githubusercontent.com/snapframework/snap-core/04295679ccf8316fcf4944f2eb65d1b5266587ef/test/Snap/Util/Proxy/Tests.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------
Constants --... | # OPTIONS_GHC -fno - warn - warnings - deprecations #
module Snap.Util.Proxy.Tests (tests) where
import Control.Monad.State.Strict (modify)
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as S
import Data.CaseInsensitive (... |
05300607a79b8e6bda665ae364505d46abfa94d18aa45dce28bd2821cb1b5385 | zenhack/haskell-capnp | Pure.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NegativeLiterals #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFa... | null | https://raw.githubusercontent.com/zenhack/haskell-capnp/6cf9fae35189a3668f2740d64c634675ec5fbdec/tests/Module/Capnp/Gen/Capnp/Schema/Pure.hs | haskell | # LANGUAGE OverloadedStrings #
TODO(cleanup): the raw/pure split no longer exists, so this module path no longer
makes sense; reorganize.
TODO: add some helpers for all this.
variants, but I(zenhack) haven't figured out how to specify
can do something like this? will have to investigate.
This is a little more com... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NegativeLiterals #
# LANGUAGE OverloadedLists #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Module.Capnp.Gen.C... |
5afef7ba4b9f8d640da4a6f901f7388f8cf8f6125ffdccf87a536fec6988a594 | tek/polysemy-http | Request.hs | {-# options_haddock prune #-}
-- |Description: Request Data Types, Internal
module Polysemy.Http.Data.Request where
import qualified Data.Text as Text
import Network.HTTP.Client.Internal (CookieJar)
import Polysemy.Http.Data.Header (HeaderName, HeaderValue)
|All standard HTTP methods , mirroring those from ' Netw... | null | https://raw.githubusercontent.com/tek/polysemy-http/74f5439fccea42b6d82805e0c83adbd3bf30c719/packages/polysemy-http/lib/Polysemy/Http/Data/Request.hs | haskell | # options_haddock prune #
|Description: Request Data Types, Internal
|Produce the usual uppercase representation of a method.
|Request host name.
|Request port.
|Rrequest path.
|The key of a query parameter.
|The value of a query parameter.
|Request body. |
module Polysemy.Http.Data.Request where
import qualified Data.Text as Text
import Network.HTTP.Client.Internal (CookieJar)
import Polysemy.Http.Data.Header (HeaderName, HeaderValue)
|All standard HTTP methods , mirroring those from ' Network . ' , plus a constructor for arbitrary strings .
data Method =
Get
... |
e7b5c794967578534aadbff2ec9b5b3dd11e034c2f7706b3553d7697f95d7711 | igorhvr/bedlam | world.scm | World Representation
(define world-width (void))
(define world-height (void))
(define world-scale (void))
(define world-map (void))
(define world (void))
(define bases '())
(define (add-home-base! x y)
(set! bases (cons (list x y) bases)))
(define (make-world! width height)
(let ((world (make-hashtable)))
... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/icfp/world.scm | scheme | World Representation
(define world-width (void))
(define world-height (void))
(define world-scale (void))
(define world-map (void))
(define world (void))
(define bases '())
(define (add-home-base! x y)
(set! bases (cons (list x y) bases)))
(define (make-world! width height)
(let ((world (make-hashtable)))
... | |
50bae8191147a7fa2a7248486433a5fa7b92a3a8e68ca5b18262036d67f6b223 | input-output-hk/project-icarus-importer | KeygenOptions.hs | # LANGUAGE ApplicativeDo #
{-# LANGUAGE QuasiQuotes #-}
module KeygenOptions
( KeygenOptions (..)
, KeygenCommand (..)
, DumpAvvmSeedsOptions (..)
, TestnetBalanceOptions (..)
, FakeAvvmOptions (..)
, GenKeysOptions (..)
, getKeygenOptions
) where
import ... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/tools/src/keygen/KeygenOptions.hs | haskell | # LANGUAGE QuasiQuotes #
^ Number of seeds to generate.
^ Path to directory to generate seeds in. | # LANGUAGE ApplicativeDo #
module KeygenOptions
( KeygenOptions (..)
, KeygenCommand (..)
, DumpAvvmSeedsOptions (..)
, TestnetBalanceOptions (..)
, FakeAvvmOptions (..)
, GenKeysOptions (..)
, getKeygenOptions
) where
import Universum
import ... |
63c53e0baa58083b610474ca0d02bd9f817bd66a9df903e86b4e54fdd00497ac | GaloisInc/cryptol | Random.hs | -- |
Module : Cryptol . Testing . Random
Copyright : ( c ) 2013 - 2016 Galois , Inc.
-- License : BSD3
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
This module generates random values for Cryptol types .
{-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/9f94adceaa8219a2e5d2126f3ec1533cc2ee5fb4/src/Cryptol/Testing/Random.hs | haskell | |
License : BSD3
Maintainer :
Stability : provisional
Portability : portable
# LANGUAGE BangPatterns #
# LANGUAGE MultiWayIf #
^ Function under test
^ Argument generators
^ Size
^ Function to be used to calculate tests
^ Argument generators
^ Size
^ Initial random state
^ Arguments, result, an... | Module : Cryptol . Testing . Random
Copyright : ( c ) 2013 - 2016 Galois , Inc.
This module generates random values for Cryptol types .
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
# LANGUAGE TypeFamilies #
module Cryptol.Testin... |
a2f18eb82dbb874eee0f6f00cf1aca40d7e70b50fe4e54fa2cdf534e3798d71f | rtoy/cmucl | defcombin.lisp | -*-Mode : LISP ; Package : PCL ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of derivative w... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/defcombin.lisp | lisp | Package : PCL ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export control laws.
warra... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
5aad5f07f1e86066b13982a2492a3d07de42077de9234750e8cfc38f3bf80885 | rethab/bindings-dsl | Libcddb.hs | module Bindings.Libcddb (module Bindings.Libcddb.CddbCmd,module Bindings.Libcddb.CddbConn,module Bindings.Libcddb.CddbDisc,module Bindings.Libcddb.CddbError,module Bindings.Libcddb.Cddb,module Bindings.Libcddb.CddbLog,module Bindings.Libcddb.CddbSite,module Bindings.Libcddb.CddbTrack) where {import Bindings.Libcddb.Cdd... | null | https://raw.githubusercontent.com/rethab/bindings-dsl/8167c061144d78ec9caac1026ba57d7231811405/bindings-libcddb/src/Bindings/Libcddb.hs | haskell | module Bindings.Libcddb (module Bindings.Libcddb.CddbCmd,module Bindings.Libcddb.CddbConn,module Bindings.Libcddb.CddbDisc,module Bindings.Libcddb.CddbError,module Bindings.Libcddb.Cddb,module Bindings.Libcddb.CddbLog,module Bindings.Libcddb.CddbSite,module Bindings.Libcddb.CddbTrack) where {import Bindings.Libcddb.Cdd... | |
d0dffe6237aa161341caf556ebdbbadae3c75f3d979fb844fd0eba3e32598558 | basho/yokozuna | yz_solrq_helper_intercepts.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/yokozuna/e15fe64f9ef9318c0cc21754f3dfdd073d2dc77d/riak_test/intercepts/yz_solrq_helper_intercepts.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(yz_solrq_helper_intercep... |
f574ded97e843cab6e744b36427956764056ff06f5abd963ccfac78e5a5d778a | kadena-io/pact | Advice.hs | # LANGUAGE TupleSections #
# LANGUAGE RecordWildCards #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
-- |
-- Module : Pact.Types.Advice
Copyright : ( C ) 2021
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
... | null | https://raw.githubusercontent.com/kadena-io/pact/de9b0c1f1f4e3dd18327771a86ef1181bab3984b/src/Pact/Types/Advice.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
|
Module : Pact.Types.Advice
License : BSD-style (see the file LICENSE)
Advise user functions in runtime for performance, coverage etc.
the bracketed operation.
| Advise on user function, return result
| Advise on native, return result
| Transaction execut... | # LANGUAGE TupleSections #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
Copyright : ( C ) 2021
Maintainer : < >
module Pact.Types.Advice
( Advice(..)
, AdviceContext(..)
, advise
, DbContext(..)
, advisePactDb
) where
import Control.Monad.IO... |
fc1941bf99a818c2ce4da94a05cd8185aa37bf4783fffc661e7cf9032eb5c5e5 | spartango/CS153 | i_graph_tests.ml | open Pretty_print
open Test_framework
open Cfg_ast
open I_graph
open Cfg_gen
open Test_ioblocks
let raw_block =
[ Label("main");
Move( Var("j"), Int(5));
Move( Var("k"), Int(2));
Load( Var("g"), Var("j"), 12);
Arith( Var("h"), Var("k"), Minus, Int(1));
Arith( Var("f"), Var("g"), Times, Var("h")... | null | https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps7/i_graph_tests.ml | ocaml | See i_graph.ml for implementation | open Pretty_print
open Test_framework
open Cfg_ast
open I_graph
open Cfg_gen
open Test_ioblocks
let raw_block =
[ Label("main");
Move( Var("j"), Int(5));
Move( Var("k"), Int(2));
Load( Var("g"), Var("j"), 12);
Arith( Var("h"), Var("k"), Minus, Int(1));
Arith( Var("f"), Var("g"), Times, Var("h")... |
e6af4ee22bf4ca0dc15403af3b895a1d2b93616984b5e7c8fd46ed3ba4863c37 | mbj/stratosphere | JsonProperty.hs | module Stratosphere.SageMaker.ModelQualityJobDefinition.JsonProperty (
JsonProperty(..), mkJsonProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JsonProperty... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelQualityJobDefinition/JsonProperty.hs | haskell | module Stratosphere.SageMaker.ModelQualityJobDefinition.JsonProperty (
JsonProperty(..), mkJsonProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JsonProperty... | |
11338aaa5c914a26de1eae2c5d2e42a7b0e420f13954eb64638cdb4a9c148524 | ssardina/ergo | farmer.scm | ;;; The classical fox, hen, and grain problem.
Fluent : the side of the river that the four objects are on
;;; Action cross-with!: farmer crosses the river with a passenger or alone
Initially all four objects are on the left side
(define-fluents locs (hasheq 'farmer 'left 'fox 'left 'grain 'left 'hen 'lef... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Examples/PlanningExamples/farmer.scm | scheme | The classical fox, hen, and grain problem.
Action cross-with!: farmer crosses the river with a passenger or alone
The farmer crosses with x (when x=farmer, then cross alone)
Abbreviations
Unsafe state: the hen is with the grain or fox without the farmer present
The main program: display a plan to achieve t... | Fluent : the side of the river that the four objects are on
Initially all four objects are on the left side
(define-fluents locs (hasheq 'farmer 'left 'fox 'left 'grain 'left 'hen 'left))
(define-action (cross-with! x)
#:prereq (same-side? 'farmer x)
locs (let ((other (if (eq? (loc 'farmer) 'left) ... |
425d463f04cafd800c5b16da33ebe20f4b8b5f10cc1f7a0def31b81d7a3d0593 | mlabs-haskell/plutip | Types.hs | module Plutip.Types (
ClusterEnv (..),
RunningNode (..),
nodeSocket,
keysDir,
) where
import Cardano.Api (NetworkId)
import Cardano.Launcher.Node (CardanoNodeConn)
import Plutip.Config (PlutipConfig)
import Plutip.Launch.Cluster (RunningNode (RunningNode))
import System.FilePath ((</>))
-- | Environment for a... | null | https://raw.githubusercontent.com/mlabs-haskell/plutip/89cf822c213f6a4278a88c8a8bb982696c649e76/src/Plutip/Types.hs | haskell | | Environment for actions that use local cluster
, chainIndexUrl :: !(Maybe BaseUrl)
| this directory atm used to store all node related files,
| Helper function to get socket path from
| Directory for `.skey`'s of crated wallets for current cluster environment | module Plutip.Types (
ClusterEnv (..),
RunningNode (..),
nodeSocket,
keysDir,
) where
import Cardano.Api (NetworkId)
import Cardano.Launcher.Node (CardanoNodeConn)
import Plutip.Config (PlutipConfig)
import Plutip.Launch.Cluster (RunningNode (RunningNode))
import System.FilePath ((</>))
data ClusterEnv = Clus... |
02f8e49d4a97218354ed9adf912df91b0dab9827c35cbbdf8331be9486e433f9 | maravillas/lein-js | js_test.clj | (ns js-test
(:use [leiningen.js] :reload-all)
(:use [clojure.test]
[clojure.contrib.io :only [delete-file-recursively file make-parents]])
(:import [java.io File]))
(defn test-file
[& names]
(apply file "test-js-temp" names))
(deftest test-js
(let [f1 (test-file "test-js-1.js")
f2 (test-file "tes... | null | https://raw.githubusercontent.com/maravillas/lein-js/3df63d80ebed8813ac67bdf554d560d031611290/test/js_test.clj | clojure | (ns js-test
(:use [leiningen.js] :reload-all)
(:use [clojure.test]
[clojure.contrib.io :only [delete-file-recursively file make-parents]])
(:import [java.io File]))
(defn test-file
[& names]
(apply file "test-js-temp" names))
(deftest test-js
(let [f1 (test-file "test-js-1.js")
f2 (test-file "tes... | |
9b7f6534fd97c4d145f1435ce8d7a97fca906e81b627f7ddb85f55d587753dcb | sonyxperiadev/dataflow | SequenceDiagram.hs | module DataFlow.SequenceDiagram (asSequenceDiagram) where
import qualified Data.Map as M
import Data.List.Utils
import Text.Printf
import qualified DataFlow.Core as C
import DataFlow.Attributes
import DataFlow.PlantUML
convertNewline :: String -> String
convertNewline = replace "\n" "\\n"
bold :: String -> String
b... | null | https://raw.githubusercontent.com/sonyxperiadev/dataflow/8bef5bd6bf96a918197e66ad9d675ff8cd2a4e33/src/DataFlow/SequenceDiagram.hs | haskell | module DataFlow.SequenceDiagram (asSequenceDiagram) where
import qualified Data.Map as M
import Data.List.Utils
import Text.Printf
import qualified DataFlow.Core as C
import DataFlow.Attributes
import DataFlow.PlantUML
convertNewline :: String -> String
convertNewline = replace "\n" "\\n"
bold :: String -> String
b... | |
e1f50328bd8ef7cfc7d1902e3c0bb80a825feb142eae546999cfbd2e9abbea89 | jimpil/hotel-nlp | core.clj | (ns hotel_nlp.tools.PAnnotator.core
(:require [clojure.core.reducers :as r]
[clojure.java.io :as io]
[clojure.set :refer [union]]
[clojure.pprint :refer [pprint]]
[clojure.string :refer [split-lines split blank?]]
[hotel_nlp.helper :as ut]
[hot... | null | https://raw.githubusercontent.com/jimpil/hotel-nlp/2647f999b5998595a5edac1900e850140f374de6/src/hotel_nlp/tools/PAnnotator/core.clj | clojure | do echo $ TOKEN ; done
do echo -e $ TOKEN ' \tO ' > > some-file.txt.tok ; done
the usual happens
the whole directory
resulting sgml: <START:drug> ... <END>
will return a mapping function
will return a writing function
(pos-tag "target-file.txt" true)
example
:target-folder "ANNOTATIONS" | (ns hotel_nlp.tools.PAnnotator.core
(:require [clojure.core.reducers :as r]
[clojure.java.io :as io]
[clojure.set :refer [union]]
[clojure.pprint :refer [pprint]]
[clojure.string :refer [split-lines split blank?]]
[hotel_nlp.helper :as ut]
[hot... |
598fd4bb92f4b814f22aa5ea0564a01931aa2c9a8af53107f9024fea0d0c817a | logseq/logseq | text_test.cljs | (ns frontend.util.text-test
(:require [cljs.test :refer [are deftest]]
[frontend.util.text :as text-util]))
(deftest test-add-timestamp
(are [x y] (= x y)
(text-util/add-timestamp "LATER hello world\nhello"
"scheduled"
"<2021-08-25 Wed>")
"LATER h... | null | https://raw.githubusercontent.com/logseq/logseq/917a8aa098810c42e05877752d7e02981b917fe4/src/test/frontend/util/text_test.cljs | clojure | (ns frontend.util.text-test
(:require [cljs.test :refer [are deftest]]
[frontend.util.text :as text-util]))
(deftest test-add-timestamp
(are [x y] (= x y)
(text-util/add-timestamp "LATER hello world\nhello"
"scheduled"
"<2021-08-25 Wed>")
"LATER h... | |
e761a793ce8dca4643a4dc3f502b41dd1b33eb4fc49ef0ce6a0a595288605a3d | basho/riak_function_contrib | validate_json.erl | -module(validate_json).
-export([validate/1]).
validate(Object) ->
try
mochijson2:decode(riak_object:get_value(Object)),
Object
catch
throw:invalid_utf8 ->
{fail, "Invalid JSON: Illegal UTF-8 character"};
error:Error ->
{fail, "Invalid JSON: " ++ binary_to_list(list_to_binary(io_lib:for... | null | https://raw.githubusercontent.com/basho/riak_function_contrib/bad124ac39c72eb6ed85e6f30cfc779515e4e612/hooks/pre-commit/erlang/validate_json.erl | erlang | -module(validate_json).
-export([validate/1]).
validate(Object) ->
try
mochijson2:decode(riak_object:get_value(Object)),
Object
catch
throw:invalid_utf8 ->
{fail, "Invalid JSON: Illegal UTF-8 character"};
error:Error ->
{fail, "Invalid JSON: " ++ binary_to_list(list_to_binary(io_lib:for... | |
93b0264130ffb4ffda87725f91478ca68fca826b1f317eb735efff5e38916d35 | dgiot/dgiot | emqx_mod_subscription_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 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/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/lib-ce/emqx_modules/test/emqx_mod_subscription_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 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_mod_subscription_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-incl... |
a72aa47fecb11c4514ae2bc88b61487fbecfffc1a49281c799cfaa91310432c7 | rukor/cljs-ssr-node | reagent.cljs | (ns com.firstlinq.ssr.view.reagent
(:require [reagent.core :as reagent :refer [atom]]
[com.firstlinq.ssr.router :refer [path-for handle-navigate]]))
(defn link
"Creates an anchor element with the link on-click handler defined using a
custom navigator. Passed-in props must include a href property for ... | null | https://raw.githubusercontent.com/rukor/cljs-ssr-node/6115f18ca66b9595a87c0e880ebdfce25042c612/src/com/firstlinq/ssr/view/reagent.cljs | clojure | (ns com.firstlinq.ssr.view.reagent
(:require [reagent.core :as reagent :refer [atom]]
[com.firstlinq.ssr.router :refer [path-for handle-navigate]]))
(defn link
"Creates an anchor element with the link on-click handler defined using a
custom navigator. Passed-in props must include a href property for ... | |
42fe772df9742c57fe9967c45b74d7b5f57c881d4eb85e2afa766126baa935ff | alexander-yakushev/discharge | config.clj | (ns discharge.config
(:require [discharge.utils :refer :all]
[discharge.cache :as cache]
[clojure.java.io :as jio]
[clojure.tools.logging :as log]))
(def config-file (atom nil))
;; Useful for debugging
( reset ! config - file ( jio / file " /home / unlogic / projects / web / by... | null | https://raw.githubusercontent.com/alexander-yakushev/discharge/9c4c0d5d3554de21f5a32eb57ef36194b638baab/src/discharge/config.clj | clojure | Useful for debugging | (ns discharge.config
(:require [discharge.utils :refer :all]
[discharge.cache :as cache]
[clojure.java.io :as jio]
[clojure.tools.logging :as log]))
(def config-file (atom nil))
( reset ! config - file ( jio / file " /home / unlogic / projects / web / bytopia.org / config.clj "... |
1fb59e16da3014b58d79424da4a507115f500fbc26bc5fa6731069513ca2d5a3 | uw-unsat/leanette-popl22-artifact | report.rkt | #lang racket
(require csv-reading
text-table)
(define data-3 (csv->list (open-input-file "workspace/r3.csv")))
(define data-4 (csv->list (open-input-file "workspace/r4.csv")))
(define r3 (for/hash ([row data-3]) (values (first row) (rest row))))
(define r4 (for/hash ([row data-4]) (values (first row) (rest ... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/perf/report.rkt | racket | #lang racket
(require csv-reading
text-table)
(define data-3 (csv->list (open-input-file "workspace/r3.csv")))
(define data-4 (csv->list (open-input-file "workspace/r4.csv")))
(define r3 (for/hash ([row data-3]) (values (first row) (rest row))))
(define r4 (for/hash ([row data-4]) (values (first row) (rest ... | |
f0900d8172641204bc61acb0d824851e2153cdc34e780f8204983e8b986ce07d | mdedwards/slippery-chicken | plotter.lisp | ;;; **********************************************************************
Copyright ( C ) 2004 ( )
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/src/cm-2.6.0/src/gui/plotter.lisp | lisp | **********************************************************************
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A ... | Copyright ( C ) 2004 ( )
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
$ Revision : 1.18 $
$ Date : 2005/01/17 18:24:27 $
(in-package :cm)
(defclass plotter (container)
((window :accessor plotter-window :initarg :window)
(menu... |
17711192531b0fe8ac525bc9abaf14a6e82633be962e1124861e4ca1cf4a02bc | conjure-cp/conjure | AtLeast.hs | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.AtLeast where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
import qualified Data.Aeson as JSON -- aeson
import qualified Data.HashMap.Strict as M ... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Expression/Op/AtLeast.hs | haskell | aeson
unordered-containers
vector
X: variables
o[i] is a lower bound for the nb of occurrences of v[i] in X, indexed by T
v[i] values, indexed by T
TODO: check the indices and the category of vals&occs | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.AtLeast where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Typeable, Generic)
instance Serial... |
8093c952524bb6452b3f5365a65a9c5d64418ed7dfafa9efcacdf291513f64ae | DerekCuevas/interview-cake-clj | binary_tree.clj | (ns balanced-binary-tree.binary-tree
(:gen-class))
(defn node [value]
{:value value :left nil :right nil})
(defn max-height [root]
(if (nil? root)
0
(inc (max (max-height (:left root))
(max-height (:right root))))))
(defn min-height [root]
(if (nil? root)
0
(inc (min (min-height... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/balanced-binary-tree/src/balanced_binary_tree/binary_tree.clj | clojure | (ns balanced-binary-tree.binary-tree
(:gen-class))
(defn node [value]
{:value value :left nil :right nil})
(defn max-height [root]
(if (nil? root)
0
(inc (max (max-height (:left root))
(max-height (:right root))))))
(defn min-height [root]
(if (nil? root)
0
(inc (min (min-height... | |
f48be7761119a7cb4ba7ea20336e06369810f5b7fc346020de9883e2e09c4b39 | metadaddy/facebook-template-clojure | project.clj | (defproject facebook-template-clojure "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/data.json "0.1.1"]
[compojure "1.0.1"]
[ring/ring-core "1.0.2"]
[ring/ring-devel "1.0.2"]
... | null | https://raw.githubusercontent.com/metadaddy/facebook-template-clojure/f9c1b7f0971026ed4b28e4165893e72d0b56d25f/project.clj | clojure | (defproject facebook-template-clojure "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/data.json "0.1.1"]
[compojure "1.0.1"]
[ring/ring-core "1.0.2"]
[ring/ring-devel "1.0.2"]
... | |
cce0deda11f2c32805521a322b424ad0a69f367b4e118aae14e39defdf683ede | conscell/hugs-android | Trex.hs | -----------------------------------------------------------------------------
-- Trex utilities: Functions to compare and show record values
--
Warning : This file is an integral part of the TREX implementation , and
-- should not be modified without corresponding changes in the interpreter.
--
Suitable for use wi... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/hugsbase/Hugs/Trex.hs | haskell | ---------------------------------------------------------------------------
Trex utilities: Functions to compare and show record values
should not be modified without corresponding changes in the interpreter.
---------------------------------------------------------------------------
Code for equalities:
Code fo... | Warning : This file is an integral part of the TREX implementation , and
Suitable for use with Hugs 98 , if compiled with TREX support .
module Hugs.Trex( Rec, emptyRec, EmptyRow,
ShowRecRow(..), EqRecRow(..), insertField ) where
import Hugs.Prelude ( Rec, emptyRec, EmptyRow )
instance EqRecRow r => Eq (Rec r)... |
92dd33ed3fb2462a41c3375bfcc5b6b5deac5ebb47d32d0035e85ab026b89b97 | idris-lang/Idris-dev | IdrisDoc.hs | |
Module : .
Description : Generation of HTML documentation for code
License : : The Idris Community .
Module : Idris.IdrisDoc
Description : Generation of HTML documentation for Idris code
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE OverloadedStrings, PatternG... | null | https://raw.githubusercontent.com/idris-lang/Idris-dev/a13caeb4e50d0c096d34506f2ebf6b9d140a07aa/src/Idris/IdrisDoc.hs | haskell | # LANGUAGE OverloadedStrings, PatternGuards #
---------------------------------------------------------------- [ Public ]
| Generates HTML documentation for a series of loaded namespaces
and their dependencies.
^ IState where all necessary information is
extracted from.
^ List of namespaces to generate
doc... | |
Module : .
Description : Generation of HTML documentation for code
License : : The Idris Community .
Module : Idris.IdrisDoc
Description : Generation of HTML documentation for Idris code
License : BSD3
Maintainer : The Idris Community.
-}
# OPTIONS_GHC -fwarn - incomplete - patt... |
2a7b94ea97ec6b5f595330c73959605702c4fdc15edcb7c46aabb7952f8fdb03 | carcigenicate/mandelbrot | third_try.clj | (ns mandelbrot.seesaw.third-try
(:require [seesaw.core :as sc]
[seesaw.graphics :as sg]
[helpers.general-helpers :as g]
[clojure.core.async :refer [go go-loop <! >! chan thread]]
[mandelbrot.seesaw.color-picker :as cp]
[mandelbrot.locations :as l]
... | null | https://raw.githubusercontent.com/carcigenicate/mandelbrot/1de3aff9909b3bb3a69974304baa504586a2a7ec/src/mandelbrot/seesaw/third_try.clj | clojure | TODO: Awful workaround!
TODO: Remove
TODO: Move all this out to allow dragging onto the whole window
Returning true to allow pasting.
FIXME: Is failing to activate sometimes?
TODO: Add trimming
Eww! | (ns mandelbrot.seesaw.third-try
(:require [seesaw.core :as sc]
[seesaw.graphics :as sg]
[helpers.general-helpers :as g]
[clojure.core.async :refer [go go-loop <! >! chan thread]]
[mandelbrot.seesaw.color-picker :as cp]
[mandelbrot.locations :as l]
... |
05be9ace39c32437422d590f54f11d7cb5cc0258f63070a58130cf61fd512923 | 2600hz/kazoo | knm_telnyx_tests.erl | %%%-----------------------------------------------------------------------------
( C ) 2016 - 2020 , 2600Hz
%%% @doc
@author
%%%
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 /.
%%%
%%% ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/test/knm_telnyx_tests.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2016 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(knm_telnyx_tests).
-include_lib("eunit/include/eunit.hrl").
-include("../src/knm.hrl").
-exp... |
f5f563cfbb34d0dacc8102f0900081bdc64603d5145a50c8836c176bedd12ae0 | msp-strath/Mary | Semantics.hs | module Shonkier.Semantics where
import Control.Monad
import Control.Monad.Reader
import Control.Monad.State
import Control.Applicative
import Data.Maybe (fromMaybe)
import Data.Map (singleton, (!?), keysSet)
needed for ghc versions < = 8.2.2
import Data.Text (Text)
import qualified Data.Text as T
import qualified ... | null | https://raw.githubusercontent.com/msp-strath/Mary/d805849e6da4133093564077d2344815155d7e5e/src/Shonkier/Semantics.hs | haskell | -------------------------------------------------------------------------
EXCEPTIONS (ESPECIALLY ABORT)
-------------------------------------------------------------------------
Shonkier.Value defines abortA
how to complain
-------------------------------------------------------------------------
PATTERN MATCHING
-... | module Shonkier.Semantics where
import Control.Monad
import Control.Monad.Reader
import Control.Monad.State
import Control.Applicative
import Data.Maybe (fromMaybe)
import Data.Map (singleton, (!?), keysSet)
needed for ghc versions < = 8.2.2
import Data.Text (Text)
import qualified Data.Text as T
import qualified ... |
5469077573bb5617c14e043d879af82feba79e6c7f04229c89942cbe3d10e87d | lambdaisland/souk | souk.clj | (ns lambdaisland.souk
(:require [lambdaisland.webbing.prod :as prod]
[lambdaisland.souk.setup :as setup]))
(defn -main [& _]
(prod/go (setup/prod-setup)))
| null | https://raw.githubusercontent.com/lambdaisland/souk/c0945cddb5329308bd167921b2573d05c5f72e59/src/lambdaisland/souk.clj | clojure | (ns lambdaisland.souk
(:require [lambdaisland.webbing.prod :as prod]
[lambdaisland.souk.setup :as setup]))
(defn -main [& _]
(prod/go (setup/prod-setup)))
| |
a7ba5a972f85226e1001d80fc8023e54d67741d7d79c464228c53f49bf0933d8 | wangweihao/ProgrammingErlangAnswer | 2.erl | % 在 shell 里输入 help() 命令。你将会看到一长串命令。可以试一试其中一些命令。
1> help().
** shell internal commands **
b() -- display all variable bindings
e(N) -- repeat the expression in query <N>
f() -- forget all variable bindings
f(X) -- forget the binding of variable X
h() -- history
history(N) -- set how man... | null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/3/2/2.erl | erlang | 在 shell 里输入 help() 命令。你将会看到一长串命令。可以试一试其中一些命令。 |
1> help().
** shell internal commands **
b() -- display all variable bindings
e(N) -- repeat the expression in query <N>
f() -- forget all variable bindings
f(X) -- forget the binding of variable X
h() -- history
history(N) -- set how many previous commands to keep
results(N) -- set ho... |
ba9ca41144677c4cfada84cf3aff571565be04e8412dfa583d008d3899b51790 | hyperfiddle/electric | electric_ui4_tag_picker_test.cljc | (ns hyperfiddle.electric-ui4-tag-picker-test
#?(:cljs (:require-macros hyperfiddle.electric-ui4-tag-picker-test))
(:import [missionary Cancelled] [hyperfiddle.electric Pending])
(:require
[clojure.string :as str]
[contrib.cljs-target :refer [do-browser]]
#?(:cljs [contrib.dom-test-helpers :as uit])
[h... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/test/hyperfiddle/electric_ui4_tag_picker_test.cljc | clojure | order doesn't matter
(do-browser
(tests "controlled value"
(def !v (atom :alice))
(def discard (p/run (try
(binding [dom/node js/document.body]
(let [v (p/watch !v)]
(tap [:controlled-value v])
... | (ns hyperfiddle.electric-ui4-tag-picker-test
#?(:cljs (:require-macros hyperfiddle.electric-ui4-tag-picker-test))
(:import [missionary Cancelled] [hyperfiddle.electric Pending])
(:require
[clojure.string :as str]
[contrib.cljs-target :refer [do-browser]]
#?(:cljs [contrib.dom-test-helpers :as uit])
[h... |
435f8575e4ccf5e4aa5ecef33a751c60c63feecbdc3bb95a42eabad0152541c9 | geophf/1HaskellADay | Exercise.hs | module Y2020.M07.D23.Exercise where
-
How can there be too many flowers ?
This problem looks at the problem of lots of flowers ... how many ? We 're not
going to answer that question today , but we are going to load an image file
of flowers . That 's a good starter .
-
How can there be too many flowers?
Th... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M07/D23/Exercise.hs | haskell | }
so there's a couple of things going on in this function. | module Y2020.M07.D23.Exercise where
-
How can there be too many flowers ?
This problem looks at the problem of lots of flowers ... how many ? We 're not
going to answer that question today , but we are going to load an image file
of flowers . That 's a good starter .
-
How can there be too many flowers?
Th... |
c0d76a7fd4519d93797182a430f980e0e5c200eda4526c1de339ec92b334bdda | google/haskell-trainings | Color.hs | Copyright 2021 Google LLC
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distributed und... | null | https://raw.githubusercontent.com/google/haskell-trainings/214013fc324fd6c8f63b874a58ead0c1d3e6788c/haskell_102/codelab/01_mastermind/src/Color.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2021 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTI... |
6a45f7882570a19da3dfc29038f4b4125c621dcc49436b41908bd528debb1e88 | let-def/lwd | lwd_infix.mli | BEGIN LETOP
val (let$) : 'a Lwd.t -> ('a -> 'b) -> 'b Lwd.t
* to { ! ' } suitable for let - op bindings
val (let$*) : 'a Lwd.t -> ('a -> 'b Lwd.t) -> 'b Lwd.t
* to { ! Lwd.bind } suitable for let - op bindings
val (and$) : 'a Lwd.t -> 'b Lwd.t -> ('a * 'b) Lwd.t
* to { ! Lwd.pair } suitable for let - op bindings
... | null | https://raw.githubusercontent.com/let-def/lwd/3c446b45b2d9e81bc72b57ada168fe7923f9b02c/lib/lwd/lwd_infix.mli | ocaml | END
* Infix alias to {!Lwd.set}
* Infix alias to {!Lwd_table.set} | BEGIN LETOP
val (let$) : 'a Lwd.t -> ('a -> 'b) -> 'b Lwd.t
* to { ! ' } suitable for let - op bindings
val (let$*) : 'a Lwd.t -> ('a -> 'b Lwd.t) -> 'b Lwd.t
* to { ! Lwd.bind } suitable for let - op bindings
val (and$) : 'a Lwd.t -> 'b Lwd.t -> ('a * 'b) Lwd.t
* to { ! Lwd.pair } suitable for let - op bindings
... |
5be5c406620a6b9aac1ab31b90d90b50f5d3d64cfcd9271476c611cea335e99c | dalaing/little-languages | SmallStep.hs | module Term.Eval.SmallStep where
import Control.Lens (preview)
import Data.Foldable (asum)
import Bound
import Term
import Term.Eval.Value
eAppLamLazy : : Term n a
- > Maybe ( Term n a )
eAppLamLazy t = do
( f , x ) < - preview _ TmApp t
( _ , e ) < - preview _ TmLam f
return e
eA... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/unityped/lc/src/Term/Eval/SmallStep.hs | haskell |
smallStepsLazy :: [Term n a -> Maybe (Term n a)]
smallStepsLazy =
[ eAppLamLazy
, eApp1 smallStep
]
| module Term.Eval.SmallStep where
import Control.Lens (preview)
import Data.Foldable (asum)
import Bound
import Term
import Term.Eval.Value
eAppLamLazy : : Term n a
- > Maybe ( Term n a )
eAppLamLazy t = do
( f , x ) < - preview _ TmApp t
( _ , e ) < - preview _ TmLam f
return e
eA... |
d97637d231d68aab2ddc6da5739186f9770f2920e59864d60107fda96a5123d2 | krisajenkins/petrol | project.clj | (defproject petrol-examples "0.1.0"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
;; ClojureScript
[org.clojure/clojurescript "1.7.170"]
[org... | null | https://raw.githubusercontent.com/krisajenkins/petrol/607166ab48cf6193b6ad00bcd63bd3ff7f3958f7/examples/project.clj | clojure | ClojureScript | (defproject petrol-examples "0.1.0"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[org.clojure/core.async "0.2.374"]
... |
54fd18aad205ff59bf16b1d48802e63b278239b27ffcf1d64550435b25361658 | stepcut/plugins | Plugin.hs | module Plugin where
-- user doesn't import the API
-- and provides a polymorphic value
-- import API
-- resource :: Interface
--
-- should pass type check, and dump core
--
resource : : a = > a
-- import API
resource :: Num a => a
resource = 7
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/pdynload/spj1/Plugin.hs | haskell | user doesn't import the API
and provides a polymorphic value
import API
resource :: Interface
should pass type check, and dump core
import API | module Plugin where
resource : : a = > a
resource :: Num a => a
resource = 7
|
0f4623deb45c86e1ad2a99d52691ef46d951a1e0f89f0d6cdab40efcaa482433 | ghc/ghc | T21843f.hs | module UnicodeSmartQuotes where
badChar = '\‘'
| null | https://raw.githubusercontent.com/ghc/ghc/b0ac38133767a8ca7de63112f39436241ff435a0/testsuite/tests/parser/should_fail/T21843f.hs | haskell | module UnicodeSmartQuotes where
badChar = '\‘'
| |
ca2c604948d11091e9f25d97a3b03d5b4de01b91c73704173abc45d34d93a6a1 | MarcosPividori/push-notify | CommDevices.hs | {-# LANGUAGE OverloadedStrings #-}
-- This module defines the main callback functions to communicate with mobile devices using the general library.
module CommDevices
( handleNewId
, handleUnregistered
, handleNewMessage
, handleNewDevice
) where
import Database.Persist.Sqlite
import Data.Aeson.Ty... | null | https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/test/Connect4/Yesod-App/CommDevices.hs | haskell | # LANGUAGE OverloadedStrings #
This module defines the main callback functions to communicate with mobile devices using the general library.
Authenticated! |
module CommDevices
( handleNewId
, handleUnregistered
, handleNewMessage
, handleNewDevice
) where
import Database.Persist.Sqlite
import Data.Aeson.Types
import Data.Conduit.Pool
import Data.Default
import Data.IORef
import Data.Maybe
import Data.Text (Text,pack,unpack,empty)
... |
35d27a56194a0faf65421dced688f5a84a8031b1e41a1806bf90e5ad1380ef29 | reactiveml/rml | reac2reac.ml | (**********************************************************************)
(* *)
(* ReactiveML *)
(* *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d3ac141bd9c6e3333b678716166d988ce04b5c80/compiler/reac/reac2reac.ml | ocaml | ********************************************************************
ReactiveML
... | Copyright 2002 , 2007 . All rights reserved .
version 1.0 .
- theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 )
- Verimag , CNRS Grenoble ( 2005 - 2006 )
- projet , ( 2006 - 2007 ) ... |
51072467abc8a46adc4eb884920be33490c255ba8f169725e2f3d764da9c38d2 | mzp/msgpack-ocaml | config.ml | let version = (1,0,0)
| null | https://raw.githubusercontent.com/mzp/msgpack-ocaml/acfbfcbcc62a4f69f9fd024e28e42086048a9f16/lib/core/config.ml | ocaml | let version = (1,0,0)
| |
ee5401dca97bae84d921e615523ade4da57fb395c0cc2291c95928e72ed944d8 | coq/coq | tokens.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/tools/coqdoc/tokens.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
fd42a905aca64831aaf4a2712da60a5868cb6637d4350add0ee9022b087ed2ee | OCADml/OCADml | bezier2.mli | * Generation and measurement of 2d bezier curve ( and patch / surface ) functions .
Including { ! of_path } , which produces a bezier spline function that passes
through all points of the given path .
Including {!of_path}, which produces a bezier spline function that passes
through all points of the... | null | https://raw.githubusercontent.com/OCADml/OCADml/ceed2bfce640667580f7286b46864a69cdc1d4d7/lib/bezier2.mli | ocaml | * Generation and measurement of 2d bezier curve ( and patch / surface ) functions .
Including { ! of_path } , which produces a bezier spline function that passes
through all points of the given path .
Including {!of_path}, which produces a bezier spline function that passes
through all points of the... | |
dc5f035500610a323ab5d07713c7515148f543a215ee989d9c29c7a7a743c5bd | triffon/fp-2022-23 | ex06-20221116-solutions.rkt | #lang racket
(define head car)
(define tail cdr)
(define (foldl op nv l)
(if (null? l) nv
(foldl op (op nv (car l)) (cdr l))))
(define (any? p? lst)
(and (not (null? lst))
(or (p? (head lst))
(any? p? (tail lst)))))
(define (all? p? lst)
(not (any? (lambda (i) (not (p? i))) lst)))
(defin... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/007e97e01a996f2d4b6002ef75299919ec4e29b2/exercises/cs1/ex06-20221116-solutions.rkt | racket | (define (selectiveMerge f lst1 lst2)
(define (helper code lst1 lst2)
(if (null? lst) '()
(let* [(next ...)
(nextHead (if (= next 1) ... ...))]
(helper next (tail lst1) (tail lst2))))))
O(nm) време
Зад.1
Зад.1.5
Зад.2
:)
за удобство
Зад.3
Зад.4 | #lang racket
(define head car)
(define tail cdr)
(define (foldl op nv l)
(if (null? l) nv
(foldl op (op nv (car l)) (cdr l))))
(define (any? p? lst)
(and (not (null? lst))
(or (p? (head lst))
(any? p? (tail lst)))))
(define (all? p? lst)
(not (any? (lambda (i) (not (p? i))) lst)))
(defin... |
f0e0a229afe023414a412fde2495d6c07ee342bb4e0ede25a6e0919637f9caeb | Dasudian/DSDIN | contract_sophia_bytecode_dsdvm_SUITE.erl | -module(contract_sophia_bytecode_dsdvm_SUITE).
-behaviour(dsdvm_chain_api).
%% common_test exports
-export([all/0]).
%% test case exports
-export(
[ execute_identity_fun_from_sophia_file/1
, sophia_remote_call/1
, sophia_factorial/1
, simple_multi_argument_call/1
, remote_multi_argument_call/1
, spe... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/test/contract_sophia_bytecode_dsdvm_SUITE.erl | erlang | common_test exports
test case exports
chain API exports
failing_call(Contract, Fun, Args, Env) ->
failing_call(Contract, Fun, Args, Env, #{}).
The call doesn't fail, but the spend transaction is not executed.
Spending in nested call
TODO: BLOCKHASH not implemented in EVM
Beneficiary address
Caller address
... | -module(contract_sophia_bytecode_dsdvm_SUITE).
-behaviour(dsdvm_chain_api).
-export([all/0]).
-export(
[ execute_identity_fun_from_sophia_file/1
, sophia_remote_call/1
, sophia_factorial/1
, simple_multi_argument_call/1
, remote_multi_argument_call/1
, spend_tests/1
, complex_types/1
, environ... |
89d98935db1bcddd186eaa12422fb05b5a6c8d061b463720e50c13ff5a56a90f | racket/typed-racket | type-printer-tests.rkt | #lang racket/base
;; Tests for type, prop, object, etc. printers for Typed Racket
(require "test-utils.rkt"
rackunit
racket/match
typed-racket/standard-inits
typed-racket/tc-setup
typed-racket/rep/type-rep
typed-racket/rep/values-rep
typed-racket/types/ab... | null | https://raw.githubusercontent.com/racket/typed-racket/d65ff8bd7146b15b79f31506f8aca410aed196e4/typed-racket-test/unit-tests/type-printer-tests.rkt | racket | Tests for type, prop, object, etc. printers for Typed Racket
Using `do-standard-inits` here does not work when the file is invoked
individually (rather than through the test harness)
this case tests that the Number union is printed with its name
rather than its expansion (a former bug)
NOT (->* (Any) (String) #:r... | #lang racket/base
(require "test-utils.rkt"
rackunit
racket/match
typed-racket/standard-inits
typed-racket/tc-setup
typed-racket/rep/type-rep
typed-racket/rep/values-rep
typed-racket/types/abbrev
typed-racket/types/prop-ops
typed-racket/... |
ff7b40a1a75b51e3fe3689463d27db800c80d0f47b0e288451c0028d25b0060c | erlangonrails/devdb | jlib.erl | %%%----------------------------------------------------------------------
%%% File : jlib.erl
Author : < >
%%% Purpose : General XMPP library.
Created : 23 Nov 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/compat/jlib.erl | erlang | ----------------------------------------------------------------------
File : jlib.erl
Purpose : General XMPP library.
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT AN... | Author : < >
Created : 23 Nov 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
1351f533cf2134b98925f1b67c217702e08f2fd0e474f0aeac1567bdf6cfc9fc | m4dc4p/haskelldb | SQLite.hs | -----------------------------------------------------------
-- |
-- Module : Database.HaskellDB.HSQL.SQLite
Copyright : HWT Group 2003 ,
2006
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
Interface to SQLite 2 < / >... | null | https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/driver-hsql-sqlite/Database/HaskellDB/HSQL/SQLite.hs | haskell | ---------------------------------------------------------
|
Module : Database.HaskellDB.HSQL.SQLite
License : BSD-style
Stability : experimental
Portability : non-portable
databases.
---------------------------------------------------------
^ database file
^ access mode
| This driver require... | Copyright : HWT Group 2003 ,
2006
Maintainer :
Interface to SQLite 2 < / >
module Database.HaskellDB.HSQL.SQLite (
SQLiteOptions(..), sqliteConnect,
DriverInterface(..), driver
) where
import Database.HaskellDB.Database
import Database.HaskellDB.HSQL
impor... |
827e0a47fbc6d01c4c3f8e6e62381908a586378f0d5e741e56d31383d028f699 | TyOverby/mono | chdir.ml | (* The test framework should be resilient to user changing the current directory. *)
let%expect_test _ =
print_string "hello world\n";
Unix.chdir "..";
[%expect {|
hello world
|}]
;;
| null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-ppx_expect/example/chdir.ml | ocaml | The test framework should be resilient to user changing the current directory. |
let%expect_test _ =
print_string "hello world\n";
Unix.chdir "..";
[%expect {|
hello world
|}]
;;
|
5ad367d35602e68257f1fda19a3dd353445e735f630c97441843a25cd254bf31 | dongcarl/guix | easyrpg.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2018 < >
Copyright © 2019 , 2020 < >
Copyright © 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/easyrpg.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2018 < >
Copyright © 2019 , 2020 < >
Copyright © 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages easyrpg)
#:use-module ... |
0e3c131562e3255a84fe08f0c2e1c4d95530c49d4eb43bbab091fc27ba8c4c68 | rudymatela/leancheck | test-bool.hs | test-bool.hs -- example program , testing Bool fns using LeanCheck
--
Copyright ( c ) 2017 - 2020 .
-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
import Test.LeanCheck
import Test.LeanCheck.Function ()
import Test.LeanCheck.Utils
main :: IO ()
main = do
putStrLn "not . not === id"; c... | null | https://raw.githubusercontent.com/rudymatela/leancheck/af299d3616a362816c21931ada6fa49a2af7f911/eg/test-bool.hs | haskell | example program , testing Bool fns using LeanCheck
Distributed under the 3-Clause BSD licence (see the file LICENSE). | Copyright ( c ) 2017 - 2020 .
import Test.LeanCheck
import Test.LeanCheck.Function ()
import Test.LeanCheck.Utils
main :: IO ()
main = do
putStrLn "not . not === id"; check $ isIdentity (not . not)
putStrLn "(&&) commutes"; check $ isCommutative (&&)
putStrLn "(||) commutes"; check $ isCommutative... |
e2ef0a9af729a1fdc5408e5e97e8f7745c9475a75ffb07898d1c55df2092bcf7 | ds-wizard/engine-backend | List_Bootstrap_GET.hs | module Wizard.Api.Handler.Config.List_Bootstrap_GET where
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Api.Resource.Config.ClientConfigDTO
import Wizard.Api.Resource.Config.ClientConfigJM ()
import Wizard.Model.Context.Base... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/39d1411252ac15908d3b5af4e06c41bbc6f1c74d/engine-wizard/src/Wizard/Api/Handler/Config/List_Bootstrap_GET.hs | haskell | module Wizard.Api.Handler.Config.List_Bootstrap_GET where
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Api.Resource.Config.ClientConfigDTO
import Wizard.Api.Resource.Config.ClientConfigJM ()
import Wizard.Model.Context.Base... | |
0b24560ae622063685e989a36bed131388c164b7ca913ec643d8dbea4b4538e4 | larcenists/larceny | misc2.scm | (
(in al 9)
(in ax 9)
(in eax 9)
(in al dx)
(in ax dx)
(in eax dx)
(out 9 al)
(out 9 ax)
(out 9 eax)
(out dx al)
(out dx ax)
(out dx eax)
(int #x80)
(pop cx)
(pop ecx)
(pop (dword (& ecx)))
(pop (word (& ecx)))
(pop ds)
(pop es)
(pop ss)
(pop fs)
(pop gs)
(push cx)
(push edx)
(push (dword 100))
(push (word 100)... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/misc2.scm | scheme | (
(in al 9)
(in ax 9)
(in eax 9)
(in al dx)
(in ax dx)
(in eax dx)
(out 9 al)
(out 9 ax)
(out 9 eax)
(out dx al)
(out dx ax)
(out dx eax)
(int #x80)
(pop cx)
(pop ecx)
(pop (dword (& ecx)))
(pop (word (& ecx)))
(pop ds)
(pop es)
(pop ss)
(pop fs)
(pop gs)
(push cx)
(push edx)
(push (dword 100))
(push (word 100)... | |
5d4a84d73a737454ef9734feae1015b06df03a31a7254b5416b6b5be05b235d1 | elastic/eui-cljs | icon_documentation.cljs | (ns eui.icon-documentation
(:require ["@elastic/eui/lib/components/icon/assets/documentation.js" :as eui]))
(def documentation eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_documentation.cljs | clojure | (ns eui.icon-documentation
(:require ["@elastic/eui/lib/components/icon/assets/documentation.js" :as eui]))
(def documentation eui/icon)
| |
a49dab0d2e96dbf27fc0491004d3ba04a7821b4f0d000dbe9736ee3ead443338 | jhidding/lyonesse | test-record-with-context.scm | (import (rnrs (6))
(prefix (lyonesse testing) test:)
(lyonesse functional)
(lyonesse record-with-context))
(define-record-with-context my-vector
(fields x y))
(define-record-with-context A
(fields p q))
(define-record-with-context p
(fields k l m))
(define (my-vector-length v)
(with-... | null | https://raw.githubusercontent.com/jhidding/lyonesse/9d9624e3141ea3acaa670526cbe52c2d6546beef/test/test-record-with-context.scm | scheme | (import (rnrs (6))
(prefix (lyonesse testing) test:)
(lyonesse functional)
(lyonesse record-with-context))
(define-record-with-context my-vector
(fields x y))
(define-record-with-context A
(fields p q))
(define-record-with-context p
(fields k l m))
(define (my-vector-length v)
(with-... | |
d70fbe2dc377981ae78d47ff8b9e580adf36827f2f9f983562442229f98ef695 | lojic/LearningRacket | point-mutations-test.rkt | #lang racket
(require "point-mutations.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"Tests for the point-mutation exercise"
(test-case "no difference between empty strands"
(check-equal? (hamming-distance "" "") 0))
(test-case "no differenc... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/point-mutations/point-mutations-test.rkt | racket | #lang racket
(require "point-mutations.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"Tests for the point-mutation exercise"
(test-case "no difference between empty strands"
(check-equal? (hamming-distance "" "") 0))
(test-case "no differenc... | |
92187760fcc99b4d7575f495f695b4e58c658cc042f11fe379d8b2873e5705c5 | facebookarchive/pfff | rec.ml | let rec f x =
f x
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/parsing/rec.ml | ocaml | let rec f x =
f x
| |
cfec30a0712f4cf53ac5b5fc27a2b692aa3c9c309bdde53a4c3e71060ce8be8c | Helium4Haskell/helium | BugReorderTuple.hs | type A = [[String]]
f :: (String, [String]) -> ([String], A) -> [[String]]
f _ ([], []) = []
f a (hs2,(_, xss2)) = snd a ++ f a (hs2, xss2) | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Heuristics/BugReorderTuple.hs | haskell | type A = [[String]]
f :: (String, [String]) -> ([String], A) -> [[String]]
f _ ([], []) = []
f a (hs2,(_, xss2)) = snd a ++ f a (hs2, xss2) | |
bef5a7dc7dfd5f37c68e9b4f3e08fa0194f9e5fd8b19c922f4dbd6c7cc610ba6 | nd/sicp | 4.17.scm | (define (scan-out-defines body)
(let* ((defs (filter definition? body))
(non-defs (filter (lambda (x) (not (definition? x))) body))
(initial-defs (map (lambda (def) (make-definition (definition-variable def) ''*unassigned*)) defs))
(sets (map (lambda (def) (make-assignment (definition-varia... | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch04/4.17.scm | scheme | (define (scan-out-defines body)
(let* ((defs (filter definition? body))
(non-defs (filter (lambda (x) (not (definition? x))) body))
(initial-defs (map (lambda (def) (make-definition (definition-variable def) ''*unassigned*)) defs))
(sets (map (lambda (def) (make-assignment (definition-varia... | |
514e80ea9bdda8b92d08f2a490256d9758ed8a4f33320ef038accfdb3dfa0edf | lem-project/lem | directory-mode.lisp | (defpackage :lem.directory-mode
(:use :cl :lem)
#+sbcl
(:lock t))
(in-package :lem.directory-mode)
(define-attribute header-attribute
(:light :foreground "dark green")
(:dark :foreground "green"))
(define-attribute file-attribute
(t))
(define-attribute directory-attribute
(:light :foreground "blue" :bo... | null | https://raw.githubusercontent.com/lem-project/lem/3b9b92690b48710135a946b1d3754f64d2bfdaf1/src/ext/directory-mode.lisp | lisp | (format t "mkdir ~A~%" dst) | (defpackage :lem.directory-mode
(:use :cl :lem)
#+sbcl
(:lock t))
(in-package :lem.directory-mode)
(define-attribute header-attribute
(:light :foreground "dark green")
(:dark :foreground "green"))
(define-attribute file-attribute
(t))
(define-attribute directory-attribute
(:light :foreground "blue" :bo... |
63de3cc4c16cabf2d65e2a26e7a2a73cd58d9251e12187f073208486927dd0ec | samrushing/irken-compiler | t_halloc.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(let ((buf (halloc int 20)))
(for-range j 1000000
(let ((thing (make-string 1024)))
(for-range i 20
(let ((int* (c-aref buf i)))
;; (printn int*)
(c-set-int int* (+ i 1234))))))
(for-range i 20
(let ... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_halloc.scm | scheme | -*- Mode: Irken -*-
(printn int*) |
(include "lib/basis.scm")
(include "lib/map.scm")
(let ((buf (halloc int 20)))
(for-range j 1000000
(let ((thing (make-string 1024)))
(for-range i 20
(let ((int* (c-aref buf i)))
(c-set-int int* (+ i 1234))))))
(for-range i 20
(let ((int* (c-aref buf i)))
(printf (lpad 3 (int... |
e9965254ad54250479208fd4d7400aaea177b29a05809b50ee02e6aa4075486c | GNOME/gimp-tiny-fu | land.scm | ; GIMP - The GNU Image Manipulation Program
Copyright ( C ) 1995 and
;
; Land --- create a pattern that resembles a Topographic map
Copyright ( C ) 1997
;
;
;
; This script works on the current gradient you have loaded.
; Some suggested gradients:
; Land (produces a ear... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/land.scm | scheme | GIMP - The GNU Image Manipulation Program
Land --- create a pattern that resembles a Topographic map
This script works on the current gradient you have loaded.
Some suggested gradients:
Land (produces a earthlike map)
Brushed_aluminum (looks like the moon... | Copyright ( C ) 1995 and
Copyright ( C ) 1997
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
(define (script-fu-land width height seed detail landheight seadepth xscale yscale gradient)
(let* (
(img (car ... |
6cc17433d6e4c58c8f67a70499c626af9145c75f4b292c7a6596aa667831c3e8 | arttuka/reagent-material-ui | severe_cold.cljs | (ns reagent-mui.icons.severe-cold
"Imports @mui/icons-material/SevereCold as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def severe-cold (create-svg-icon (e "p... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/severe_cold.cljs | clojure | (ns reagent-mui.icons.severe-cold
"Imports @mui/icons-material/SevereCold as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def severe-cold (create-svg-icon (e "p... | |
f8e57ba670cf6f569a8fbb75887f8a690baac06fb3d5d6106d6c8bf3fa9ba038 | fgalassi/cs61a-sp11 | 2.77.scm | ; magnitude is invoked with z then
; apply generic is invoked with z
; and it dispatches to (get 'magnitude '(complex))
; magnitude is invoked again with (contents z)
; apply generic invoked again with (contents z)
; and it dispatches to (get 'magnitude '(rectangular)
; rectangular package's magnitude is invoked return... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/2.77.scm | scheme | magnitude is invoked with z then
apply generic is invoked with z
and it dispatches to (get 'magnitude '(complex))
magnitude is invoked again with (contents z)
apply generic invoked again with (contents z)
and it dispatches to (get 'magnitude '(rectangular)
rectangular package's magnitude is invoked returning the... | |
fce2718f4d6e8b470c365da7c536300dabd5a594bd55e6e23fa4c9d3066a1158 | gebi/jungerl | xmerl_simple.erl | The contents of this file are subject to the Erlang Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You may obtain a copy of the License at
%%%
%%%
Software distributed under the License is distributed on an " AS IS "
%%% basis, WITHOUT WA... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/xmerl/src/xmerl_simple.erl | erlang | compliance with the License. You may obtain a copy of the License at
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
Contributor(s): ______________________________________.
-------------------------... | The contents of this file are subject to the Erlang Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is xmerl-0.9
The Initial Developer of the Original Code is Ericsson Telecom
AB ... |
54f7fb705b16dcf35ffe199ff99be0fd0c2523366ef9443ce7b262b644e637be | Hans-Halverson/myte | aarch64_liveness_analysis.ml | open Aarch64_builders
open Aarch64_register
open Asm
open Asm_builders
open Asm_calling_convention
open Asm_instruction_definition
open Asm_register
class virtual use_def_visitor color_to_representative_operand =
object (this)
inherit Asm_liveness_analysis.regs_use_def_visitor
val mutable prev_blocks = Bloc... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/d181099a04162c4108efff531b3fc459f3625ffb/src/asm/aarch64/aarch64_liveness_analysis.ml | ocaml | Calls implicitly use all parameter registers and define all caller save registers
Return without argument implicitly uses link register
Mark block edges | open Aarch64_builders
open Aarch64_register
open Asm
open Asm_builders
open Asm_calling_convention
open Asm_instruction_definition
open Asm_register
class virtual use_def_visitor color_to_representative_operand =
object (this)
inherit Asm_liveness_analysis.regs_use_def_visitor
val mutable prev_blocks = Bloc... |
bc9ba5efce77a8e89fed31162cf21491275e19a96f2623a142ce83e6fe1f7d92 | tek/polysemy-http | Main.hs | module Main where
import Polysemy.Http.ResponseTest (test_statusPattern)
import Polysemy.Http.Test (unitTest)
import Polysemy.Http.UrlTest (test_url)
import Test.Tasty (TestTree, defaultMain, testGroup)
tests :: TestTree
tests =
testGroup "unit" [
unitTest "url parser" test_url,
unitTest "status pattern" te... | null | https://raw.githubusercontent.com/tek/polysemy-http/1e639e3e0f26074ec3aba366bd9a9ce8832f86ec/packages/polysemy-http/test/Main.hs | haskell | module Main where
import Polysemy.Http.ResponseTest (test_statusPattern)
import Polysemy.Http.Test (unitTest)
import Polysemy.Http.UrlTest (test_url)
import Test.Tasty (TestTree, defaultMain, testGroup)
tests :: TestTree
tests =
testGroup "unit" [
unitTest "url parser" test_url,
unitTest "status pattern" te... | |
bd722b1bf1811b91eb4aa7259efb64d17a14434de398887f6a1055fb4df97d37 | 2garryn/esli | esli_app.erl | %%% ---------------------------------------------------------------
%%% File : esli_app.erl
Author :
%%% Description :
%%% ---------------------------------------------------------------
-module(esli_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ==================... | null | https://raw.githubusercontent.com/2garryn/esli/6e48337b066bb230813317dcda613993c2929684/apps/esli/src/esli_app.erl | erlang | ---------------------------------------------------------------
File : esli_app.erl
Description :
---------------------------------------------------------------
Application callbacks
===================================================================
Application callbacks
==================================... | Author :
-module(esli_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
esli_sup:start_link().
stop(_State) ->
ok.
|
5ebc0db40aaa7acb2535e424624b6273d8ba41c6e05618edef0a8bc52b0d9dfd | MassD/mongo | mongoRequest.mli | *
This module create request string that can be sent to MongoDB .
It takes according parameters and convert them to the desired bytes ( string ) .
Tuples are used as parameters , just to group similar parameters together , better for reading .
This module create request string that can be sent to Mo... | null | https://raw.githubusercontent.com/MassD/mongo/054779d843a227d486b55dff6ebc915b44906b0d/src/mongoRequest.mli | ocaml | * create an update request. e.g. create_update (db_name,collection_name) (request_id,flags) (selector_doc,update_doc)
* create a query request. e.g. create_query (db_name,collection_name) (request_id,flags,skip,return) (query_doc,selector_doc)
* create a get_more request. e.g. create_get_more (db_name,collection_nam... | *
This module create request string that can be sent to MongoDB .
It takes according parameters and convert them to the desired bytes ( string ) .
Tuples are used as parameters , just to group similar parameters together , better for reading .
This module create request string that can be sent to Mo... |
95db58833a538faa40faa3bb64eaec527304f352944b9dcb957241addb4ecfa6 | ndpar/erlang | my_lists.erl | -module(my_lists).
-export([qsort/1, keyfilter/3]).
qsort([]) -> [];
qsort([X|Xs]) -> qsort([Y || Y<-Xs, Y<X]) ++ [X] ++ qsort([Y || Y<-Xs, Y>=X]).
keyfilter(Key, N, TupleList) ->
lists:filter(fun(Elem) -> tuple_match(Key, N, Elem) end, TupleList).
tuple_match(Key, N, Tuple) ->
case lists:keyfind(Key, N,... | null | https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/my_lists.erl | erlang | -module(my_lists).
-export([qsort/1, keyfilter/3]).
qsort([]) -> [];
qsort([X|Xs]) -> qsort([Y || Y<-Xs, Y<X]) ++ [X] ++ qsort([Y || Y<-Xs, Y>=X]).
keyfilter(Key, N, TupleList) ->
lists:filter(fun(Elem) -> tuple_match(Key, N, Elem) end, TupleList).
tuple_match(Key, N, Tuple) ->
case lists:keyfind(Key, N,... | |
ee3ac34ccfd6ad1d7b1afe92355641ad8d01d5cc600631e2e299ffcd66715c53 | jbclements/sxml | lazy-ssax.rkt | #lang racket/base
(require racket/promise
srfi/13/string
"ssax/parse-error.rkt"
"ssax/SSAX-code.rkt"
"lazy-xpath.rkt")
(provide (all-defined-out))
;; A specialized lazy XML->SXML parser
; Is heavily based on continuations
;-------------------------------------------------
; Prelimi... | null | https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/lazy-ssax.rkt | racket | A specialized lazy XML->SXML parser
Is heavily based on continuations
-------------------------------------------------
Preliminary helper functions
A helper that forces all descendants of a given node or a nodeset
force it
not null
null or not pair
nothing to be done
Returns the list containing of all members... | #lang racket/base
(require racket/promise
srfi/13/string
"ssax/parse-error.rkt"
"ssax/SSAX-code.rkt"
"lazy-xpath.rkt")
(provide (all-defined-out))
(define (lazy:force-descendants node)
(cond
(lazy:force-descendants (force node)))
(for-each lazy:force-descendants node))... |
a052918c7b35977a0d9a08c09e96c7cee17aea460662569e8852809e7ed74609 | phaul/chess | TransPosCache.hs | # LANGUAGE TemplateHaskell #
-- | Transpositional cache
--
We return hit if all of the 3 conditions are met :
--
1 . hash of Board matches
2 . Board equals
3 . depth is equal or less than the one stored in cache
--
-- The are no entries with only the depth differing. Therefore inserting the
-- same positi... | null | https://raw.githubusercontent.com/phaul/chess/b9c71a0389ed44360caed4b830208ce346211cb8/Chess/TransPosCache.hs | haskell | | Transpositional cache
The are no entries with only the depth differing. Therefore inserting the
same position with different depth updates the previous entry. Also EXACT
<+Table>.
* Constructors
* Lenses
* Utils
----------------------------------------------------------------------------
-------------------... | # LANGUAGE TemplateHaskell #
We return hit if all of the 3 conditions are met :
1 . hash of Board matches
2 . Board equals
3 . depth is equal or less than the one stored in cache
entry wins over LOWER or UPPER . For more info see
module Chess.TransPosCache
( TransPosCache
, TransPosCache... |
b2f3637edd204e95f1320e19336b115fb557ddaa9afcb4a7a3dbeb13ba94bf4d | capsjac/opengles | Base.hs | # LANGUAGE CPP #
-- | definition from gl3.h
module Graphics.OpenGLES.Base (
-- * Basic Types
GL,
GLName,
-- ** OpenGL ES 2.0
GLboolean,
GLbyte,
GLubyte,
GLchar,
GLshort,
GLushort,
GLint,
GLuint,
GLfixed,
GLsizei,
GLenum,
GLintptr,
GLsizeiptr,
GLbitfield,
GLfloat,
GLclampf,
-- ** OpenGL ES 3.0
GLin... | null | https://raw.githubusercontent.com/capsjac/opengles/23b78e5d1b058349a778a49310d867164ea1a529/src/Graphics/OpenGLES/Base.hs | haskell | | definition from gl3.h
* Basic Types
** OpenGL ES 2.0
** OpenGL ES 3.0
* Bindings
isGLProcAvailable,
** OpenGL ES 2.0
** OpenGL ES 3.0
** Extensions
** OpenGL ES 3.1
* Basic Types
| Name of a shader, program, and variable.
** OpenGL ES 2.0
| 1bit boolean
| 8bit unsigned binary integer
| 16bit unsigned b... | # LANGUAGE CPP #
module Graphics.OpenGLES.Base (
GL,
GLName,
GLboolean,
GLbyte,
GLubyte,
GLchar,
GLshort,
GLushort,
GLint,
GLuint,
GLfixed,
GLsizei,
GLenum,
GLintptr,
GLsizeiptr,
GLbitfield,
GLfloat,
GLclampf,
GLint64,
GLuint64,
GLsync,
GLhalf,
glActiveTexture,
glAttachShader,
glBindAttribLoc... |
9d740cbb801d3a9ccf9868144d4bbeff81de2c17213f97f654d23aae6632e44b | herd/herdtools7 | mexpand.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/gen/mexpand.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.