_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 |
|---|---|---|---|---|---|---|---|---|
5274129028643d9118a73539695625f91776d8f65a8f7d7a4aa1f59d739ece08 | zkincaid/duet | loop.ml | module type G = sig
type t
module V : sig
type t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
end
val iter_vertex : (V.t -> unit) -> t -> unit
val iter_succ : (V.t -> unit) -> t -> V.t -> unit
end
module Make(G : G) = struct
module VertexSet = BatSet.Make(G.V)
... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/srk/src/loop.ml | ocaml | Promote a graph to its (trivial) subgraph
Headers are vertices that have incoming edges from outside the
loop
Arbitrarily choose a vertex header | module type G = sig
type t
module V : sig
type t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
end
val iter_vertex : (V.t -> unit) -> t -> unit
val iter_succ : (V.t -> unit) -> t -> V.t -> unit
end
module Make(G : G) = struct
module VertexSet = BatSet.Make(G.V)
... |
6123f8dde43270944ada59fef02f7697bb8eb50af6e65c5642a089821463292a | HunterYIboHu/htdp2-solution | ex153-col-and-row.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex153-col-and-row) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repe... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section10-list-design-recipe/ex153-col-and-row.rkt | racket | about the language level of this file in a form that our tools can easily process.
Graphic constants
- 0
- (add1 N)
interpretation represents the natural numbers or counting numbers
N Image -> Image
N Image -> Image | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex153-col-and-row) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(define TEST (rectangle 2... |
05b745682f7d91763cfd5c4a1be67e186f80b1182b7585f34ce74c681ef933d5 | asakeron/cljs-webgl | blend_subtract.cljs | (ns cljs-webgl.constants.blend-subtract)
(def func-subtract 0x800A)
(def func-reverse-subtract 0x800B)
| null | https://raw.githubusercontent.com/asakeron/cljs-webgl/f4554fbee6fbc6133a4eb0416548dabd284e735c/src/cljs/cljs_webgl/constants/blend_subtract.cljs | clojure | (ns cljs-webgl.constants.blend-subtract)
(def func-subtract 0x800A)
(def func-reverse-subtract 0x800B)
| |
39dff2ff4c9dabf476565001aefd2683788c56a1121f5f5fbfdbe30fcad59d2b | HeinrichApfelmus/reactive-banana | Beispiel3.hs | {-----------------------------------------------------------------------------
reactive-banana-wx
------------------------------------------------------------------------------}
# LANGUAGE ScopedTypeVariables #
import Data.Maybe
import Graphics.UI.WX hiding (Event)
import Reactive.Banana
import Reactive.Banana.WX... | null | https://raw.githubusercontent.com/HeinrichApfelmus/reactive-banana/974716850af1a45658fde5dd1a069e9d01195528/reactive-banana/doc/hal7/Beispiel3.hs | haskell | ----------------------------------------------------------------------------
reactive-banana-wx
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
Main
--------------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
import Data.Maybe
import Graphics.UI.WX hiding (Event)
import Reactive.Banana
import Reactive.Banana.WX
main = start $ do
f <- frame [text := "Beispiel 3"]
output <- staticText f [color := red]
button1 <- button f [text := "1"]
button2 <- button f [text... |
5d0cd16bf38dbab21e123d2ff871606dde1ed0b47ad9b9ffdd04c4aeab491642 | google/btls | TestUtilities.hs | Copyright 2018 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/btls/6de13194f15468b186fe62d089b3a7189795c704/tests/BTLS/TestUtilities.hs | haskell |
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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitati... | Copyright 2018 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
module BTLS.TestUtilities
( abbreviate
, hex
, showHex
) where
import qualified Data.ByteString.Base16 as Base16
impor... |
9f84243936210b6fb957fc4af62d3ce031cc94edacbdc0d2c6743296ff576d2b | massemanet/gtknode | top.erl | %%%-------------------------------------------------------------------
%%% File : top.erl
Author : Mats < locmacr@mwlx084 >
%%% Description :
%%%
Created : 9 Aug 2005 by Mats < locmacr@mwlx084 >
%%%-------------------------------------------------------------------
-module(top).
-export([start/0,stop/0]).... | null | https://raw.githubusercontent.com/massemanet/gtknode/69493096cea0948aa591868d824a5d8e769250fd/priv/examples/top/top.erl | erlang | -------------------------------------------------------------------
File : top.erl
Description :
-------------------------------------------------------------------
start the c-node and it's port handler
load the glade file into the c-node
init the status bar
the tree view columns
create the model (a list_... | Author : Mats < locmacr@mwlx084 >
Created : 9 Aug 2005 by Mats < locmacr@mwlx084 >
-module(top).
-export([start/0,stop/0]).
-import(filename,[join/1,dirname/1]).
-record(st, {statusbar_ctxt,treeview}).
-record(treeview,{store,cols=[]}).
-record(col,{title,attr,data_col,type}).
start() ->
case whereis(?M... |
1da086810d6f5e37846d11e5d4783f3357d41af8b2f1585859cdff6aecdee6e8 | scicloj/notespace | log.clj | (ns scicloj.notespace.v4.log
(:require [clojure.pprint :as pp]
[gorilla-notes.core :as gn]))
(def log-path "/tmp/notespace-log.edn")
(defn empty-logfile []
;; Run in a different thread.
;; This is important, since if you call this function from your REPL,
;; it may cause the logging of some events... | null | https://raw.githubusercontent.com/scicloj/notespace/14ea417331710a72520ad9046d32a8cc21648538/src/scicloj/notespace/v4/log.clj | clojure | Run in a different thread.
This is important, since if you call this function from your REPL,
it may cause the logging of some events as a side effect.
We wish not to block that, but just wait a bit for it to happen,
and then empty the file.
Wait a bit.
Now we can empty it. | (ns scicloj.notespace.v4.log
(:require [clojure.pprint :as pp]
[gorilla-notes.core :as gn]))
(def log-path "/tmp/notespace-log.edn")
(defn empty-logfile []
(future
(Thread/sleep 3000)
(spit log-path "")))
(defn log [msg]
(spit
log-path
(str msg "\n")
:append true))
(defn log-data
... |
cba81df2c67937f8002a5af4b5d7136ab3c8c1461df38ca957c21fbb37c81d78 | f-o-a-m/kepler | Types.hs | module Tendermint.SDK.BaseApp.Query.Types
(
-- * Server combinators
Leaf
, QA
, EmptyQueryServer(..)
, QueryData(..)
-- * Query Application
, QueryApplication
, QueryRequest(..)
, parseQueryRequest
, QueryArgs(..)
, defaultQueryArgs
, QueryResult(..)
) where
import Control.Len... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-sdk/src/Tendermint/SDK/BaseApp/Query/Types.hs | haskell | * Server combinators
* Query Application
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
wrap data with default query fields
---... | module Tendermint.SDK.BaseApp.Query.Types
(
Leaf
, QA
, EmptyQueryServer(..)
, QueryData(..)
, QueryApplication
, QueryRequest(..)
, parseQueryRequest
, QueryArgs(..)
, defaultQueryArgs
, QueryResult(..)
) where
import Control.Lens (from, lens, to, (^.))
... |
7059af6bd59387ec2c3235d19dad6f4e3b05a0ff1b366de11fe266126c0b3a93 | jbclements/sxml | ssax-prim.rkt | #lang racket/base
(require "SSAX-code.ss")
(provide RES-NAME->SXML
reverse-collect-str
reverse-collect-str-drop-ws)
;=========================================================================
; This is a multi parser constructor function
;------------------------------------------------
Some fea... | null | https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/ssax/ssax-prim.rkt | racket | =========================================================================
This is a multi parser constructor function
------------------------------------------------
Returns
given the list of fragments (some of which are text strings)
reverse the list and concatenate adjacent text strings
a shortcut
given the l... | #lang racket/base
(require "SSAX-code.ss")
(provide RES-NAME->SXML
reverse-collect-str
reverse-collect-str-drop-ws)
Some features from SSAX : XML->SXML
(define (RES-NAME->SXML res-name)
(string->symbol
(string-append
(symbol->string (car res-name))
":"
(symbol->string (cdr res... |
51d71228f7d260f9e69aeda32375f3383a6218067478e9fe669a91cb8a5f0ad4 | gilith/hol-light | monoid-comm-thm.ml | (* ========================================================================= *)
(* CONSEQUENCES OF THE COMMUTATIVE MONOID AXIOMS *)
(* ========================================================================= *)
export_theory ... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/monoid-comm/monoid-comm-thm.ml | ocaml | =========================================================================
CONSEQUENCES OF THE COMMUTATIVE MONOID AXIOMS
========================================================================= |
export_theory "monoid-comm-thm";;
export_thm monoid_add_right_zero;;
let monoid_add_comm' = prove
(`!x y z. monoid_add x (monoid_add y z) = monoid_add y (monoid_add x z)`,
REPEAT GEN_TAC THEN
REWRITE_TAC [GSYM monoid_add_assoc] THEN
AP_THM_T... |
ef74d276252429444156c44d4ebb5651b115b8d28caa3ff3cb96a17508513acb | FranklinChen/hugs98-plus-Sep2006 | Applicative.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Applicative
Copyright : and 2005
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- This modul... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/Control/Applicative.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Applicative
License : BSD-style (see the LICENSE file in the distribution)
Maintainer :
Stability : experimental
Portability : portable
This module describes a structure intermediate between a funct... | Copyright : and 2005
/Applicative Programming with Effects/ ,
by and , online at
This interface was introduced for parsers by , because
mostly based on recent parsing work by .
' Data . . ' class .
module Control.Applicative (
Applicative(..),
Alternative(..),
Const(..), WrappedMonad(... |
e9005de1029ccf8eaeee40667a4317855de17da972178d4f26abd5821a0ff422 | zotonic/zotonic | action_admin_delete_media.erl | @author < >
2009
Date : 2009 - 04 - 28
%% @doc Delete a media file from a resource, no confirmation.
Copyright 2009
%%
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
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_admin/src/actions/action_admin_delete_media.erl | erlang | @doc Delete a media file from a resource, no confirmation.
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 implie... | @author < >
2009
Date : 2009 - 04 - 28
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(action_admin_delete_media).
-author("Marc Worrell <").
-export([
render_action/4,
event/... |
b4be3758aed442039ca3a258ebd50926c55777b2eb5ee91a9fc2fccdf969b76f | alvatar/spheres | html-escape.scm | ;;!!! Escape text for inclusion in an HTML document.
.author
Copyright ( c ) 2011 by , All Rights Reserved .
(cond-expand
(gambit
(declare
(standard-bindings)
(extended-bindings)
(block)
(fixnum)
(not safe)))
(else (void)))
;;! Escape text for inclusion in an HTML document.
(define (html-es... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/markup/html-escape.scm | scheme | !!! Escape text for inclusion in an HTML document.
! Escape text for inclusion in an HTML document.
This table has a non-#f entry for every character that is valid
in a standard HTML document. The entry is what should be
displayed when this character occurs.
#\x01
#\x02
#\x04
#\x05
#\x06
#\backspace
#\page
... | .author
Copyright ( c ) 2011 by , All Rights Reserved .
(cond-expand
(gambit
(declare
(standard-bindings)
(extended-bindings)
(block)
(fixnum)
(not safe)))
(else (void)))
(define (html-escape str)
(define character-entity-table
'#(#\nul
# \x03
# \alarm
#\tab
#\newlin... |
2eab97303fcd79e4efe43025455560f009f1abafd5b7a89d9c976465ac84f11b | alesaccoia/festival_flinger | build_clunits.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2005 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_gka_cg/festvox/build_clunits.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
(defvar cmu_us_gka::dir ".")
(require 'clunits_build)
Basic voice definition file with voice defines and
(load "festvox/cmu_us_gka_clunits.scm")
(defvar cluster_feature_filename "all.desc")
(set! cmu_us_gka::dt_params
(cons
(list 'db_dir (string-append cmu_us_gka::dir "/"))
(append
cmu_us_g... |
5e0c610d3e61f23d6e5f3954eab07db4ba6b4b67ea80af8ad09621b446853710 | soegaard/bracket | testing-7.rkt | #lang bracket
DeclareVars(x,y,t);
time(Expand((x+2*y+1)^5));
time(Expand((x+2*y+1)^5));
time(Expand((x+2*y+1)^5));
| null | https://raw.githubusercontent.com/soegaard/bracket/3d0ace16cf0dbcee4952fd729796e4362e27faa0/bracket/tests/testing-7.rkt | racket | #lang bracket
| |
60a4b757b85a9cfabff5c138d4834210b3e2ab80ed6e6d6f18da07fd44f2a4c0 | janestreet/core_unix | test_interface.ml | include ((Time_float_unix : Time_interface.S) : sig end)
| null | https://raw.githubusercontent.com/janestreet/core_unix/59d04e163b49c7eeef9d96fccb2403fd49c44505/time_float_unix/test/test_interface.ml | ocaml | include ((Time_float_unix : Time_interface.S) : sig end)
| |
6192dc29f326e826d2c934bf45f253b7d5896aec8bea9b37c0ffd9d77bae3d48 | thelema/ocaml-community | toploop.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/toplevel/toploop.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Format
Accessors for the table ... |
8676ad5759e80b6780fc871c3161739ab99485298df6a18137bdb31bcd078127 | SquidDev/illuaminate | jsx.ml | open Ppxlib
module Build = Ast_builder.Default
let make_opt ~loc name args rest : (arg_label * expression) list =
match args with
| [] -> rest
| _ :: _ -> (Labelled name, Build.elist ~loc args) :: rest
(** Allow writing class_ instead of class, and some_attr rather than some-attr *)
let normalise_name name =
... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/html/jsx/jsx.ml | ocaml | * Allow writing class_ instead of class, and some_attr rather than some-attr
Locate nodes of the form "<exp>[@JSX]"
If we've got an attribute matching on[A-Z], then we lowercase it and use it
as an event name. | open Ppxlib
module Build = Ast_builder.Default
let make_opt ~loc name args rest : (arg_label * expression) list =
match args with
| [] -> rest
| _ :: _ -> (Labelled name, Build.elist ~loc args) :: rest
let normalise_name name =
let n = String.length name in
let name = if name.[n - 1] = '_' then String.sub n... |
78e20670929c0104ea42ae1bec93ebbf4ccf687b2bc5b69f935d26a4454a41e2 | dyoo/ffi-tutorial | struct-with-callback.rkt | #lang racket/base
(require ffi/unsafe
racket/runtime-path
(for-syntax racket/base))
(provide (except-out (all-defined-out) the-lib the-library-path))
(define-runtime-path the-library-path
(build-path "lib" "struct-with-callback"))
#|
struct foo {
int a;
void (*printFoo)(struct foo* f);
};
|#
... | null | https://raw.githubusercontent.com/dyoo/ffi-tutorial/1efba84503adf4a062c4855225eabe992a06a34f/ffi/tutorial/examples/struct-with-callbacks/struct-with-callback.rkt | racket |
struct foo {
int a;
void (*printFoo)(struct foo* f);
};
| #lang racket/base
(require ffi/unsafe
racket/runtime-path
(for-syntax racket/base))
(provide (except-out (all-defined-out) the-lib the-library-path))
(define-runtime-path the-library-path
(build-path "lib" "struct-with-callback"))
(define-cstruct _foo ([a _int]
[printfoo (... |
7e7d533c9c12d58719bbee8630741fa96f8d33a1ec33d4e91a34187ffd355f68 | GracielaUSB/graciela | Declaration.hs | # LANGUAGE NamedFieldPuns #
module Language.Graciela.AST.Declaration where
--------------------------------------------------------------------------------
import Language.Graciela.AST.Expression (Expression)
import Language.Graciela.AST.Type (Type)
import Language.Graciela.Common
-... | null | https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/AST/Declaration.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE NamedFieldPuns #
module Language.Graciela.AST.Declaration where
import Language.Graciela.AST.Expression (Expression)
import Language.Graciela.AST.Type (Type)
import Language.Graciela.Common
import Data.Sequence (Seq)
import Data.Text... |
2b65147e5c5e09d714a19921c2189de377e1f7bf91f87ce5ecd92827e25b894d | elaforge/karya | Array.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Array utilities.
--
IArray is awkward and I do n't like it . @vector@ is nicer but it 's a big
library so I do n't want to depend on it unless I have more than one data
-- stru... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Util/Array.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Array utilities.
structure using arrays.
prepended.
| Is the given index within the array's bounds?
| Just the array if the index is in bounds.
** searching
array. | Copyright 2013
IArray is awkward and I do n't like it . @vector@ is nicer but it 's a big
library so I do n't want to depend on it unless I have more than one data
module Util.Array where
import Prelude hiding (null, length)
import qualified Data.Array.IArray as IArray
import Data.Array.IArray ((!))
import q... |
565c5e8f5d8279165b84baa90cb721ae5241fd424a3b1396602f45e252e11005 | xhtmlboi/yocaml | date.mli | (** Describes date (supposing naively that everything is in UTC). *)
(** {1 Types} *)
(** Describes a complete date. *)
type t
* Months .
type month =
| Jan
| Feb
| Mar
| Apr
| May
| Jun
| Jul
| Aug
| Sep
| Oct
| Nov
| Dec
* { 2 Aliases }
Useful aliases for making the doc readable .
... | null | https://raw.githubusercontent.com/xhtmlboi/yocaml/4d207700a94b1b78bf256d11243d7fcab603d7db/lib/yocaml/date.mli | ocaml | * Describes date (supposing naively that everything is in UTC).
* {1 Types}
* Describes a complete date.
* Day of Week
* {1 API}
* [Date.month_to_string Dec] is equal to ["Dec"]. |
type t
* Months .
type month =
| Jan
| Feb
| Mar
| Apr
| May
| Jun
| Jul
| Aug
| Sep
| Oct
| Nov
| Dec
* { 2 Aliases }
Useful aliases for making the doc readable .
Useful aliases for making the doc readable. *)
type year = int
type day = int
type hour = int
type min = int
type s... |
bde183fad435c3ee5004a753924f795181c1b76e6fa14030e1158714d21c283c | dinosaure/cri | destination.ml | type mask = |
type host =
[ `Host of [ `raw ] Domain_name.t
| `Ip6 of Ipaddr.V6.t ]
type t =
| Channel of Channel.t
| User_with_servername of { user : string
; host : host option
; servername : host }
| User_with_host of { user : string
... | null | https://raw.githubusercontent.com/dinosaure/cri/d75b8006f5e560ef4865450e3baa424272c41fbf/lib/destination.ml | ocaml | type mask = |
type host =
[ `Host of [ `raw ] Domain_name.t
| `Ip6 of Ipaddr.V6.t ]
type t =
| Channel of Channel.t
| User_with_servername of { user : string
; host : host option
; servername : host }
| User_with_host of { user : string
... | |
d56d020bd0a53dca6e864a2700acc5c057a3fe5f3178cd68ed2b17c6ba4c1e3d | fugue/fregot | Stream.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE Derive... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Control/Monad/Stream.hs | haskell | The 'SSingle' constructor is not really necessary since we can also
we deal we deal with singletons so often, this makes our code much
faster.
At some point, we threw errors just by installing an error handler and
using 'Control.Exception'. Now; we have a specific error constructor
here which is a bit cleaner.
#... | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE Derive... |
7e9b881a1356816b15227961b194e31f7afa6776d752cdc4956dd55f01838b6e | input-output-hk/cardano-wallet-legacy | IxSet.hs | {-- | IxSet-specific backend to filter data from the model. --}
module Cardano.Wallet.API.Response.Filter.IxSet (
applyFilters
) where
import Cardano.Wallet.API.Indices (Indexable, IsIndexOf, IxSet)
import qualified Cardano.Wallet.API.Request.Filter as F
import Cardano.Wallet.Kernel.DB.... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/API/Response/Filter/IxSet.hs | haskell | - | IxSet-specific backend to filter data from the model. - | module Cardano.Wallet.API.Response.Filter.IxSet (
applyFilters
) where
import Cardano.Wallet.API.Indices (Indexable, IsIndexOf, IxSet)
import qualified Cardano.Wallet.API.Request.Filter as F
import Cardano.Wallet.Kernel.DB.Util.IxSet ((@+), (@<), (@<=), (@=),
(@>), ... |
15557f4fa2950fb351e3b665200d810841ae6bcacda01215d35e933c52e72c65 | smallhadroncollider/taskell | Seq.hs | module Taskell.Data.Seq where
import ClassyPrelude
import Data.Sequence (deleteAt, insertAt, mapWithIndex, (!?))
(<#>) :: (Int -> a -> b) -> Seq a -> Seq b
(<#>) = mapWithIndex
extract :: Int -> Seq a -> Maybe (Seq a, a)
extract idx xs = (,) (deleteAt idx xs) <$> xs !? idx
shiftBy :: Int -> Int -> Seq a -> Maybe (... | null | https://raw.githubusercontent.com/smallhadroncollider/taskell/3c731476e9a58ede300cfa83aba412509b132a3e/src/Taskell/Data/Seq.hs | haskell | module Taskell.Data.Seq where
import ClassyPrelude
import Data.Sequence (deleteAt, insertAt, mapWithIndex, (!?))
(<#>) :: (Int -> a -> b) -> Seq a -> Seq b
(<#>) = mapWithIndex
extract :: Int -> Seq a -> Maybe (Seq a, a)
extract idx xs = (,) (deleteAt idx xs) <$> xs !? idx
shiftBy :: Int -> Int -> Seq a -> Maybe (... | |
c7bb645814babca9cf86e8d7adb8b935d2d543e48660bc956ea3deebdecd2966 | well-typed/large-records | R090.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
# LANGUAGE OverloadedLabels #
{-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}
module Experiment.GetEvens.Sized.R090 where
import Dat... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/GetEvens/Sized/R090.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
# LANGUAGE OverloadedLabels #
module Experiment.GetEvens.Sized.R090 where
import Data.Record.Anon.Simple (Record)
import qualified Data.Record.Anon.Simple as Anon
import Bench.EvensOfSize.Evens090
import Common.RowOfSize.Row090
getEvens :: Record ExampleRow ->... |
81c07432ff24ef8cf4e8395069d366feccf5bdb98526be3e3a1e32c2a1b6b3bf | matsen/pplacer | t-fam_matrix.ml | open Fam_matrix;;
let m = init 4 4 (fun i j -> (float_of_int (i*j)));;
let t = trace m;;
| null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/top_tests/t-fam_matrix.ml | ocaml | open Fam_matrix;;
let m = init 4 4 (fun i j -> (float_of_int (i*j)));;
let t = trace m;;
| |
3235f2ba3d4dedb9db5c8a7a026a7c5ddba04916a0fed8d8ff0cbfdf3a1dd2ea | ocaml-explore/explore | ppx_hashtbl.ml | open Ppxlib
open Ast_builder.Default
[@@@part "1"]
let get_tuple ~loc = function
| { pexp_desc = Pexp_tuple [ key; value ]; _ } -> (key, value)
| _ -> Location.raise_errorf ~loc "Expected a list of tuple pairs"
let rec handle_list ~loc = function
| [%expr []] -> []
| [%expr [%e? pair] :: [%e? tl]] ->
l... | null | https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/content/workflows/meta-programming-with-ppx/examples/ppx_hashtbl/ppx/ppx_hashtbl.ml | ocaml | open Ppxlib
open Ast_builder.Default
[@@@part "1"]
let get_tuple ~loc = function
| { pexp_desc = Pexp_tuple [ key; value ]; _ } -> (key, value)
| _ -> Location.raise_errorf ~loc "Expected a list of tuple pairs"
let rec handle_list ~loc = function
| [%expr []] -> []
| [%expr [%e? pair] :: [%e? tl]] ->
l... | |
f579440c60b090c1c4aeaab9af8e7f6b2a98cc831d9eb2dd95d77bcb74ef6348 | jyh/metaprl | itt_monotone_subtyping.mli | declare monotone[l:l]{X.'M['X]}
| null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/applications/objects/itt_monotone_subtyping.mli | ocaml | declare monotone[l:l]{X.'M['X]}
| |
f8a9971946778a942961afd5c9ee9a2ebfaebf56e8f80523fc888fff53007805 | mentat-collective/emmy | brent.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.numerical.unimin.brent
"This namespace contains an implementation of Brent's method for finding the
minimum of a real-valued function."
(:require [emmy.generic :as g]
[emmy.numbers]
[emmy.numerical.unimin.bracket :as ub]
[emmy.nume... | null | https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/src/emmy/numerical/unimin/brent.cljc | clojure | tiny delta?
a and b bound the interval in which the minimizer is searching.
`xx` is the current candidate point, and `fx` is its value.
iteration and its candidate point.
This value is used by `parabola-valid?` to decide whether or not
it's appropriate to proceed with the parabolic step, or fall back
to a golde... | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.numerical.unimin.brent
"This namespace contains an implementation of Brent's method for finding the
minimum of a real-valued function."
(:require [emmy.generic :as g]
[emmy.numbers]
[emmy.numerical.unimin.bracket :as ub]
[emmy.nume... |
03bb6c1dfee92eb9a95ac9d211a7a0b9a97129b53d25a76c1b62f634e169b418 | Frama-C/Frama-C-snapshot | export.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/qed/export.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
b71aa093fadbfa251ccc806b9494abdb1a084a32d5b54f1af911d4309791027e | Lovesan/doors | errors.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2010 - 2011 , < >
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without lim... | null | https://raw.githubusercontent.com/Lovesan/doors/12a2fe2fd8d6c42ae314bd6d02a1d2332f12499e/system/errors.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2010 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-packag... |
e69966817a185e207219b67a6a57f9cd8a9e385cd091d8c58b1e0f967f1929ff | regex-generate/regenerate | regenerate.ml | module Regex = Regex
module Word = Word
module Segments = Segments
type 'a regex = 'a Regex.t
let parse = Parsing.parse
include Langgen
| null | https://raw.githubusercontent.com/regex-generate/regenerate/a616d6c2faf4a55f794ac9b6fbf03acca91fbeb9/lib/regenerate.ml | ocaml | module Regex = Regex
module Word = Word
module Segments = Segments
type 'a regex = 'a Regex.t
let parse = Parsing.parse
include Langgen
| |
f99c3bb5d91965c17a2351624e43319b103ed99bd4fa4cbe400f49007125acf2 | digitallyinduced/ihp-blog-example-app | PostsSpec.hs | module Test.Controller.PostsSpec where
import Network.HTTP.Types.Status
import IHP.Prelude
import IHP.QueryBuilder (query)
import IHP.Test.Mocking
import IHP.Fetch
import IHP.FrameworkConfig
import IHP.HaskellSupport
import Test.Hspec
import Config
import Generated.Types
import Web.Routes
import Web.Types
import We... | null | https://raw.githubusercontent.com/digitallyinduced/ihp-blog-example-app/9c44c48c9c0088421b517cd3ac76d208e92feacc/Test/Controller/PostsSpec.hs | haskell | Only one post should exist.
Fetch the new post.
For debugging purposes you could do the following, to
see the HTML printed out on the terminal. | module Test.Controller.PostsSpec where
import Network.HTTP.Types.Status
import IHP.Prelude
import IHP.QueryBuilder (query)
import IHP.Test.Mocking
import IHP.Fetch
import IHP.FrameworkConfig
import IHP.HaskellSupport
import Test.Hspec
import Config
import Generated.Types
import Web.Routes
import Web.Types
import We... |
5bc49a5e1fd86467f2368148f6b402b38afe3457e9a7d6ea3e675aecebf6335c | masatoi/cl-igo | delete-nicknames.lisp | (in-package :igo)
(delete-package-nickname :igo.varied-byte-stream)
(delete-package-nickname :igo.code-stream)
(delete-package-nickname :igo.trie)
(delete-package-nickname :igo.matrix)
(delete-package-nickname :igo.char-category)
(delete-package-nickname :igo.viterbi-node)
(delete-package-nickname :igo.word-dic)
(dele... | null | https://raw.githubusercontent.com/masatoi/cl-igo/deac2618517f8ba7074798798f39b1162a3e6049/delete-nicknames.lisp | lisp | (in-package :igo)
(delete-package-nickname :igo.varied-byte-stream)
(delete-package-nickname :igo.code-stream)
(delete-package-nickname :igo.trie)
(delete-package-nickname :igo.matrix)
(delete-package-nickname :igo.char-category)
(delete-package-nickname :igo.viterbi-node)
(delete-package-nickname :igo.word-dic)
(dele... | |
314bdd40c4e6980c5fa6973b8a5458e2ee426a888449a8c5fa61955b8a84132d | mbj/stratosphere | MonitoringOutputConfigProperty.hs | module Stratosphere.SageMaker.ModelBiasJobDefinition.MonitoringOutputConfigProperty (
module Exports, MonitoringOutputConfigProperty(..),
mkMonitoringOutputConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import ... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelBiasJobDefinition/MonitoringOutputConfigProperty.hs | haskell | # SOURCE # | module Stratosphere.SageMaker.ModelBiasJobDefinition.MonitoringOutputConfigProperty (
module Exports, MonitoringOutputConfigProperty(..),
mkMonitoringOutputConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import ... |
b9274e8c01d20c4bb612f08a8ba405ecd14fcc493c725dd940bbf414387860c1 | REMath/mit_16.399 | p.ml |
module type A_signature =
sig
type entier
val i : unit -> entier
val p : entier -> unit
end;;
module B_implementation =
struct
type entier = int
let c = ref 1
let i () = c := !c + !c ; !c
let p v = print_int v; print_newline ()
end;;
module B = (B_implementation:A_signature);;
module type C_... | null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/OCaml/programs/separate-compilation/p.ml | ocaml |
module type A_signature =
sig
type entier
val i : unit -> entier
val p : entier -> unit
end;;
module B_implementation =
struct
type entier = int
let c = ref 1
let i () = c := !c + !c ; !c
let p v = print_int v; print_newline ()
end;;
module B = (B_implementation:A_signature);;
module type C_... | |
20ac6e3873c893a819531b60af41c7ea42111b9111cf989de31f0a5491b40761 | erlang/otp | binary_module_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/9f13f18430c78a02072cccd515d78da29b37912d/lib/stdlib/test/binary_module_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1997 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(binary_module_SUITE).
-export([all/0, suite/0,
interesting/1,scope_return/1,random_ref_comp/1,random_ref_s... |
48dcc9c9cc7af9cfadcf47bafec969e2e247d8b49115a43c9ace42b3167ce6a8 | google-research/dex-lang | Util.hs | Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
# LANGUAGE MagicHash #
module Util (IsBool (..), group, ungroup, pad, padLeft, delIdx, replaceIdx,
insertIdx, mvIdx, mapFst, mapSnd, splitOn,... | null | https://raw.githubusercontent.com/google-research/dex-lang/2e7bcda20a853e0764dc53991d495ae94e9a24b2/src/lib/Util.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
XXX: `[0..(n-1)]` is incorrect for unsigned ints!
Nothing if the exact prefix isn't available
Already not there
TODO: find a more efficient implementation
NOTE: (toList args) has to be at... | Copyright 2019 Google LLC
# LANGUAGE MagicHash #
module Util (IsBool (..), group, ungroup, pad, padLeft, delIdx, replaceIdx,
insertIdx, mvIdx, mapFst, mapSnd, splitOn, scan,
scanM, composeN, mapMaybe, forMFilter, uncons, repeated, splitAtExact,
transitiveClosure, transitiveClo... |
1720be5644362d2b694dc8fad6dc76022eb19f22b065bb440ba8357f30d4ef14 | RedPRL/stagedtt | Loader.mli | open Prelude
open Command
val load : [`Stdin | `File of string] -> (command list, Diagnostic.t) result
| null | https://raw.githubusercontent.com/RedPRL/stagedtt/f88538036b51cebb83ebb0b418ec9b089550275d/lib/frontend/Loader.mli | ocaml | open Prelude
open Command
val load : [`Stdin | `File of string] -> (command list, Diagnostic.t) result
| |
8bfa2ab90d17248a9e776f529fb82ac3ac49604f9c77a45f7d64e20d2f596256 | huangjs/cl | clunit.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; -*-
;;;;
Author :
;;;;
;;;; Release history:
20010605 - Release 1.1
20010527 - Release 1.0
;;;;
;;;; Modification history:
20010605 - Added licensing text , compare - fn keyword .
20010604 - Added : input - form and : output - for... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/utils/clunit.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; -*-
Release history:
Modification history:
failed-tests function
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
... | Author :
20010605 - Release 1.1
20010527 - Release 1.0
20010605 - Added licensing text , compare - fn keyword .
20010604 - Added : input - form and : output - form options ,
20010524 - Code readied for public distribution .
20010219 - Added list- * functions .
20000614 - Added ... |
f2e1cf794ae185d71d0ab8397fd9b95ced49e97d38d331be6301f80b117d46ec | ocaml-flambda/flambda-backend | remove_unused_arguments.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/651e3119bfd6ed8d79d3139054093872b735fda1/middle_end/flambda/remove_unused_arguments.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42-66"]
open! Int_replace_polymor... |
b87e3645b90fb9bf30cc0073e48190374a625b146b0fcb0b580034fbed759a66 | russmatney/reframe-games | events.cljs | (ns games.puyo.events
(:require
[games.events :as events]
[games.puyo.core :as puyo]))
(events/reg-game-events
{:n (namespace ::x)
:step-fn puyo/step})
(events/reg-game-move-events
{:n (namespace ::x)
:move-piece puyo/move-piece
:instant-fall puyo/instant-fall... | null | https://raw.githubusercontent.com/russmatney/reframe-games/ff05f6ad4794e4505b6231522af0c90c3e212631/src/games/puyo/events.cljs | clojure | (ns games.puyo.events
(:require
[games.events :as events]
[games.puyo.core :as puyo]))
(events/reg-game-events
{:n (namespace ::x)
:step-fn puyo/step})
(events/reg-game-move-events
{:n (namespace ::x)
:move-piece puyo/move-piece
:instant-fall puyo/instant-fall... | |
c5ff55c68088fe98543f29158cf9f721ef0301d64ee6c3e99cbd7b0f86360733 | 2600hz/kazoo | cb_resources.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%% @doc Handle client requests for resource documents
@author
@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 distri... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/modules/cb_resources.erl | erlang | -----------------------------------------------------------------------------
@doc Handle client requests for resource documents
@end
-----------------------------------------------------------------------------
=============================================================================
API
=====================... | ( C ) 2011 - 2020 , 2600Hz
@author
@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(cb_resources).
-export([init/0
,authorize/1, authorize/2, authorize/3
... |
41e2c008339fee810ec2ac6eb60e2056294291be82324c723a39ae8b34cbf5d7 | esl/MongooseIM | ejabberd_ctl.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_ctl.erl
Author : < >
%%% Purpose : ejabberd command line admin tool
Created : 11 Jan 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
%%%
%%% This program is free software; you can redi... | null | https://raw.githubusercontent.com/esl/MongooseIM/16e1546fb9396e1768596520fbe6d978404b3a4c/src/ejabberd_ctl.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_ctl.erl
Purpose : ejabberd command line admin tool
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 usef... | Author : < >
Created : 11 Jan 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2011 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... |
f124b49d4bd3ac69b292925dc638b7679d5c5091371b2c4c75cc77098373e6bd | ekmett/reflection | T47Spec.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
| A regression test for issue # 47 .
module T47Spec where
import qualified Data.Map as M
import Data.Map (Map)
import Data.Reflection
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "Given" $ do
it "should give Nor... | null | https://raw.githubusercontent.com/ekmett/reflection/e08da581af5387eaaa13c4b0ed373f622315d214/tests/T47Spec.hs | haskell | --------------------------------------------------------------------------
Types
--------------------------------------------------------------------------
--------------------------------------------------------------------------
--------------------------------------------------------------------------
-------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
| A regression test for issue # 47 .
module T47Spec where
import qualified Data.Map as M
import Data.Map (Map)
import Data.Reflection
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "Given" $ do
it "should give Nor... |
34dbb7cf8cba6d4570d70e0fdb3c5d92e9c7256be75e89f8fe6ab64b635a63ae | gedge-platform/gedge-platform | rabbit_mgmt_wm_connection.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_connection).
-export([ini... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_connection.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_connection).
-export([init/2, r... |
a35b9aa25e9c2fdec643dfbb088bcdbd50611d0c0170a55cdfaf8ac880aac943 | UU-ComputerScience/js-asteroids | js_oo.hs | main :: IO ()
main = do
putStrLn "JSOO<br />"
let pl = plainDull 10 20
putStrLn $ show objFish
putStrLn $ ppBook objBook objBook
data Book = Book {
title :: String
, author :: String
, ppBook :: Book -> String
}
objBook = Book {
title = "defaultTitle"
, author = "defaultAuthor"
, ... | null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/uhc-js/tests/works/js_oo/js_oo.hs | haskell | TODO: it doesn't like the fact that ppBook is a function... | main :: IO ()
main = do
putStrLn "JSOO<br />"
let pl = plainDull 10 20
putStrLn $ show objFish
putStrLn $ ppBook objBook objBook
data Book = Book {
title :: String
, author :: String
, ppBook :: Book -> String
}
objBook = Book {
title = "defaultTitle"
, author = "defaultAuthor"
, ... |
eb2a450460ffcd932722918d792323d6c09fc8f3cf68764a3dacb07da02858c1 | exoscale/ex | manifold_test.clj | (ns exoscale.ex.test.manifold-test
(:use clojure.test)
(:require
[exoscale.ex :as ex]
[exoscale.ex.manifold :as m]
[clojure.spec.test.alpha]
[manifold.deferred :as d]))
(clojure.spec.test.alpha/instrument)
(deftest test-manifold
(is (= ::boom
@(-> (d/error-deferred (ex-info "bar" {::ex/type... | null | https://raw.githubusercontent.com/exoscale/ex/a2172c271014dff3238f6a05b465af273252e87c/modules/ex-manifold/test/exoscale/ex/test/manifold_test.clj | clojure | (ns exoscale.ex.test.manifold-test
(:use clojure.test)
(:require
[exoscale.ex :as ex]
[exoscale.ex.manifold :as m]
[clojure.spec.test.alpha]
[manifold.deferred :as d]))
(clojure.spec.test.alpha/instrument)
(deftest test-manifold
(is (= ::boom
@(-> (d/error-deferred (ex-info "bar" {::ex/type... | |
7cdc49cffd68f2e9fdf77bb6a00fd03075fbf7b617a369297c0248cb512cd0ef | cram2/cram | forward.lisp | ;; Forward FFT.
, Sat Oct 31 2009 - 23:48
Time - stamp : < 2012 - 01 - 13 12:01:31EST forward.lisp >
;;
Copyright 2009 , 2011 ,
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General ... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/fast-fourier-transforms/forward.lisp | lisp | Forward FFT.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU... | , Sat Oct 31 2009 - 23:48
Time - stamp : < 2012 - 01 - 13 12:01:31EST forward.lisp >
Copyright 2009 , 2011 ,
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Licens... |
e2a7d9c7b15f273a12583f5d87e62ec71ae0bf8f61fd2f9aa3d06d432de9133f | coalton-lang/coalton | utilities.lisp | ;;;; utilities.lisp
(in-package #:quil-coalton-tests)
(defun run-quil-coalton-tests ()
(run-package-tests
:package ':quil-coalton-tests
:interactive t))
| null | https://raw.githubusercontent.com/coalton-lang/coalton/b36c38226dcd2a6da3b3146125930eb179baa583/examples/quil-coalton/tests/utilities.lisp | lisp | utilities.lisp |
(in-package #:quil-coalton-tests)
(defun run-quil-coalton-tests ()
(run-package-tests
:package ':quil-coalton-tests
:interactive t))
|
b2ddfe6c6da94dd3c8c006830f1cbfb82f3a111369fd1d9b2682075801707708 | OCamlPro/ocp-build | buildSubst.mli | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/misc/buildSubst.mli | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open OcpCompat
val putenv : string -> string -> unit
val add_to_global_subst : string -> string -> unit
val subst_global : string -> string
val global_subst : unit -> ... |
c79d4276401619665b5f171324fe5810312fe83d87de8f6808066943cb4763f9 | prestancedesign/pingcrm-clojure | contacts.clj | (ns pingcrm.handlers.contacts
(:require [inertia.middleware :as inertia]
[pingcrm.models.contacts :as db]
[pingcrm.models.organizations :as org-db]
[pingcrm.shared.pagination :as pagination]
[ring.util.response :as rr]
[struct.core :as st]))
(def contact-sc... | null | https://raw.githubusercontent.com/prestancedesign/pingcrm-clojure/85659c6bd75d39039f9e3b3333c401547e8614ea/src/clj/pingcrm/handlers/contacts.clj | clojure | (ns pingcrm.handlers.contacts
(:require [inertia.middleware :as inertia]
[pingcrm.models.contacts :as db]
[pingcrm.models.organizations :as org-db]
[pingcrm.shared.pagination :as pagination]
[ring.util.response :as rr]
[struct.core :as st]))
(def contact-sc... | |
a237d234691a02edd584c216a642a986e28d5d50c96dd2fa4efa2671f5626060 | thelema/ocaml-community | builtin_font.ml | (* type *)
type font = string
/type
| null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/builtin/builtin_font.ml | ocaml | type | type font = string
/type
|
9be4783dd66c690cd7f4915558845f37181ed833493861c5855ac012321d6076 | hawkir/calispel | alt.lisp | (in-package #:calispel)
(defclass alt-operation (operation)
((action :type function :initarg :action :reader action
:initform (error "Must supply :ACTION.")
:documentation "A function to be called when this OPERATION
succeeds.
When DIRECTION is SEND, the function is called with no arguments.
When DI... | null | https://raw.githubusercontent.com/hawkir/calispel/e9f2f9c1af97f4d7bb4c8ac25fb2a8f3e8fada7a/alt.lisp | lisp | receive
send
Bind in new variable to give the user a pretty place
name ("TIMEOUT") rather than an ugly one
in the printed condition.)
give the compiler a chance to optimize the check
away. | (in-package #:calispel)
(defclass alt-operation (operation)
((action :type function :initarg :action :reader action
:initform (error "Must supply :ACTION.")
:documentation "A function to be called when this OPERATION
succeeds.
When DIRECTION is SEND, the function is called with no arguments.
When DI... |
f05913b94e881a40eb5ab8c4c3ef2eccef9196edc6f6d6e8cfd7cf842809975c | serokell/ariadne | Main.hs | module Main where
import AcidView (loadState, printDB)
import CmdParse (CmdOptions(..), parsedCMDOptions)
import Ariadne.Wallet.Cardano.Kernel.DB.AcidState (Snapshot(..), defDB)
import Data.Acid (query)
main :: IO ()
main = do
CmdOptions{..} <- parsedCMDOptions
stateE <- loadState path defDB position
... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/acid-view/app/Main.hs | haskell | module Main where
import AcidView (loadState, printDB)
import CmdParse (CmdOptions(..), parsedCMDOptions)
import Ariadne.Wallet.Cardano.Kernel.DB.AcidState (Snapshot(..), defDB)
import Data.Acid (query)
main :: IO ()
main = do
CmdOptions{..} <- parsedCMDOptions
stateE <- loadState path defDB position
... | |
422c431650b8a47dc693e233af424cc2aeeb10653d66f0631d06a2351f812b90 | gelisam/giggles-is-you | Game.hs | {-# LANGUAGE RankNTypes #-}
module Graphics.Gloss.Internals.Interface.Game
( playWithBackendIO
, Event(..) )
where
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Rendering
import Graphics.Gloss.Internals.Interface.Event
impo... | null | https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Internals/Interface/Game.hs | haskell | # LANGUAGE RankNTypes #
^ Initial state of the backend
^ Display mode.
^ Background color.
^ The initial world.
^ A function to convert the world to a picture.
^ A function to handle input events.
^ Whether to use the callback_exit or not.
make the simulation state
make a reference to the initial world
conver... |
module Graphics.Gloss.Internals.Interface.Game
( playWithBackendIO
, Event(..) )
where
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Rendering
import Graphics.Gloss.Internals.Interface.Event
import Graphics.Gloss.Internals.... |
b7c3e559c01254a544a147eccf47286bde19514efebc83a72b359cf62f6ab706 | typelead/eta | ClassQuery.hs | # LANGUAGE TypeFamilies , MultiParamTypeClasses , MultiWayIf , DataKinds , TypeOperators ,
RecordWildCards , FlexibleContexts #
RecordWildCards, FlexibleContexts #-}
{-# OPTIONS_GHC -Wno-unused-binds #-}
module Eta.Serv.ClassQuery (setClassInfoPath, getClassInfo) where
import Java
import Co... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/eta-serv/src/main/eta/Eta/Serv/ClassQuery.hs | haskell | # OPTIONS_GHC -Wno-unused-binds #
Reflection API Bindings | # LANGUAGE TypeFamilies , MultiParamTypeClasses , MultiWayIf , DataKinds , TypeOperators ,
RecordWildCards , FlexibleContexts #
RecordWildCards, FlexibleContexts #-}
module Eta.Serv.ClassQuery (setClassInfoPath, getClassInfo) where
import Java
import Control.Exception
import Data.Maybe
impo... |
e225af03ed1e8a9648e157af964aa1c89576d21d85688f6ba086ca705a974c77 | input-output-hk/cardano-sl | Genesis.hs | -- | Computation of LRC genesis data.
module Pos.Chain.Lrc.Genesis
( genesisLeaders
) where
import Universum
import qualified Data.HashMap.Strict as HM
import Pos.Chain.Genesis as Genesis (Config (..),
configBootStakeholders, configEpochSlots, configFtsSeed)
import ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Lrc/Genesis.hs | haskell | | Computation of LRC genesis data.
| Compute leaders of the 0-th epoch from initial shared seed and stake distribution.
This should not be exported unless it is *needed* elsewhere
`genesisLeaders` might start producing different results. Be careful with
this code!
See -output-hk/cardano-sl/issues/3425 |
module Pos.Chain.Lrc.Genesis
( genesisLeaders
) where
import Universum
import qualified Data.HashMap.Strict as HM
import Pos.Chain.Genesis as Genesis (Config (..),
configBootStakeholders, configEpochSlots, configFtsSeed)
import Pos.Chain.Lrc.Fts (followTheS... |
c59069bc4dfcd273399716a6d1c2eb31ea09a53f344ffb19ccfe42b95e1cde95 | unisonweb/unison | TempEntityType.hs | module U.Codebase.Sqlite.TempEntityType where
import Unison.Sqlite (FromField (..), SQLData (SQLInteger), ToField (..))
-- | Don't reorder these, they are part of the database,
and the ToField and FromField implementation currently
depends on the derived implementation .
data TempEntityType
0
1
2
3
4... | null | https://raw.githubusercontent.com/unisonweb/unison/0900eafaeac10be8e21c257a90c799fe3d58e8b2/codebase2/codebase-sqlite/U/Codebase/Sqlite/TempEntityType.hs | haskell | | Don't reorder these, they are part of the database, | module U.Codebase.Sqlite.TempEntityType where
import Unison.Sqlite (FromField (..), SQLData (SQLInteger), ToField (..))
and the ToField and FromField implementation currently
depends on the derived implementation .
data TempEntityType
0
1
2
3
4
deriving (Eq, Ord, Show, Enum)
instance ToField TempE... |
f655dca674988e41cddb5958a75c30af6a7c3c0ee13b7da0f2e598fc9561ba95 | simingwang/emqx-plugin-kafkav5 | eetcd_sample_client.erl | %%%-------------------------------------------------------------------
%% @doc Behaviour to implement for eectd {{unmodified_service_name}}
@private
%% All detail documents please visit -io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md
%% @end
%%%-------------------------------------------------... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/plugins/rebar3_eetcd_plugin/priv/eetcd_sample_client.erl | erlang | -------------------------------------------------------------------
@doc Behaviour to implement for eectd {{unmodified_service_name}}
All detail documents please visit -io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md
@end
-------------------------------------------------------------------
This... | @private
-module(eetcd_{{module_name}}_gen).
{{#methods}}
-export([{{method}}/1]).
{{/methods}}
{{#methods}}
-spec {{method}}(router_pb:'{{input}}'()) ->
{{^output_stream}}{{^input_stream}}{ok, router_pb:'{{output}}'()}{{/input_stream}}{{#input_stream}}reference(){{/input_stream}}{{/output_stream}... |
347c6d5b58a94d23b3c1d40608504418cab0cd9d6a6d75a68ce3466d1edecd52 | motemen/jusk | Operator.hs | {-# OPTIONS_GHC -XRankNTypes #-}
module Operator where
import Control.Monad hiding (void)
import Data.Bits
import DataTypes
import Eval
import Internal
data OperatorDef = Unary { opName :: String, opUnaryFunc :: Value -> Evaluate Value }
| Binary { opName :: String, opBinaryFunc :: Value -> Value... | null | https://raw.githubusercontent.com/motemen/jusk/4975915b8550aa09c452fb89dcad7bfcb1037c39/src/Operator.hs | haskell | # OPTIONS_GHC -XRankNTypes #
hmm
/~oz-07ams/prog/ecma262r3/11_Expressions.html#section-11.8.5 |
module Operator where
import Control.Monad hiding (void)
import Data.Bits
import DataTypes
import Eval
import Internal
data OperatorDef = Unary { opName :: String, opUnaryFunc :: Value -> Evaluate Value }
| Binary { opName :: String, opBinaryFunc :: Value -> Value -> Evaluate Value }
opUnaryFunc... |
4994192f03e462ab06fad016d90e61193e811554514c9c0414d929dbb544770c | PacktPublishing/Haskell-High-Performance-Programming | ffi-fib.hs | -- file: ffi-fib.hs
foreign import ccall
fib_c :: Int -> Int
main = print $ fib_c 20
| null | https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter10/ffi-fib.hs | haskell | file: ffi-fib.hs |
foreign import ccall
fib_c :: Int -> Int
main = print $ fib_c 20
|
526a1282e8ab50254e28db9b8dee0499b62120c4c2d102ce97eec938e95562b8 | falsetru/htdp | 43.1.7.scm | #lang racket
(define (swap V i j)
(local ((define temp (vector-ref V i)))
(begin
(vector-set! V i (vector-ref V j))
(vector-set! V j temp))))
(define (for-interval i end? step action)
(cond
[(end? i) (action i)]
[else (begin
(action i)
(for-interval (step i) end? s... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/43/43.1.7.scm | scheme | #lang racket
(define (swap V i j)
(local ((define temp (vector-ref V i)))
(begin
(vector-set! V i (vector-ref V j))
(vector-set! V j temp))))
(define (for-interval i end? step action)
(cond
[(end? i) (action i)]
[else (begin
(action i)
(for-interval (step i) end? s... | |
3a37575684b89982852509a1c97bd283153c841eb318e2a2ab318750cab76eec | quek/climacs | window-commands.lisp | ;;; -*- Mode: Lisp; Package: CLIMACS-GUI -*-
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2007 by
( )
;;; This library is free soft... | null | https://raw.githubusercontent.com/quek/climacs/65e1ff27c7ae17d7f07379bf52b11866b2eeeefb/window-commands.lisp | lisp | -*- Mode: Lisp; Package: CLIMACS-GUI -*-
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
License ... |
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2004 - 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2007 by
( )
modify it under the terms of the GNU Library General Public
version 2 ... |
d5808c40cdb7852bc77ad5601539f9d1df79eb821d347f799190d7248cc8b57f | pjones/byline | Simulation.hs | -- |
--
-- Copyright:
-- This file is part of the package byline. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
--
--
-- No part of this package, including this file, may be copied,
-- modified, propagated, or distributed exc... | null | https://raw.githubusercontent.com/pjones/byline/a5e3001333b0ca4e5ddad522d67fd6d372a5bcd7/src/Byline/Simulation.hs | haskell | |
Copyright:
This file is part of the package byline. It is subject to the
license terms in the LICENSE file found in the top-level
directory of this distribution and at:
No part of this package, including this file, may be copied,
modified, propagated, or distributed except according to the
... | module Byline.Simulation
Simulated (..),
SimulationFunction,
SimulationState (..),
* Simulation as a Monad Transformer
BylineT,
runBylineT,
module Byline,
)
where
import Byline hiding (BylineT, runBylineT)
import Byline.Internal.Simulation
interactive user session for testing ' ' co... |
5f7ec0d5c3a2f07b110c00708d75e7011a6ece97b9c984d6aa0552a637fb74d4 | zenspider/schemers | exercise.4.08.scm | #!/usr/bin/env csi -s
(require rackunit)
(require-library eval)
(import eval)
Exercise 4.8
;; "Named `let'" is a variant of `let' that has the
;; form
;;
;; (let <VAR> <BINDINGS> <BODY>)
;;
The < BINDINGS > and < BODY > are just as in ordinary ` let ' , except
;; that <VAR> is bound within <BODY> to a proce... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.08.scm | scheme | "Named `let'" is a variant of `let' that has the
form
(let <VAR> <BINDINGS> <BODY>)
that <VAR> is bound within <BODY> to a procedure whose body is
<BODY> and whose parameters are the variables in the <BINDINGS>.
Thus, one can repeatedly execute the <BODY> by invoking the
`let' as follows:
(define (... | #!/usr/bin/env csi -s
(require rackunit)
(require-library eval)
(import eval)
Exercise 4.8
The < BINDINGS > and < BODY > are just as in ordinary ` let ' , except
procedure named < VAR > . For example , the iterative
procedure ( section * Note 1 - 2 - 2 : :) can be rewritten using named
( let fib ... |
529b6cdbfd420e9fa133119962993ac68d4a9a9ca66518d82d7a772ef3d00bfd | ocramz/sparse-linear-algebra | Types.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Sparse.Types
Copyright : ( c ) 2017
-- License : BSD3 (see the file LICENSE)
--
Maintainer : zocca marco gmail
-- Stability : experimental
-- Portability : portable
--
Typeclasses for line... | null | https://raw.githubusercontent.com/ocramz/sparse-linear-algebra/77f14ebc5c545cb665cdd840149a021f3df07183/core/src/Data/Sparse/Types.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Sparse.Types
License : BSD3 (see the file LICENSE)
Stability : experimental
Portability : portable
--------------------------------------------------------------------------- | Copyright : ( c ) 2017
Maintainer : zocca marco gmail
Typeclasses for linear algebra and related concepts
module Data.Sparse.Types where
type Rows = Int
type Cols = Int
type IxRow = Int
type IxCol = Int
* ordering types
type LexIx = Int
data LexOrd = RowsFirst | ColsFirst deriving (Eq, Show)
|
f21f17ac899bdb23dc41723e15f54f86c0b6031ace15de600a245e2c58f540de | alvatar/spheres | sxml-parser.scm | ! ! ! XML to SXML deserializer library
;; Optimized for speed
;; Essentially Oleg's SSAX' code, rearranged.
, 2009 - 2011
# # Exports
;; (xml-string->sxml xml-string
;; #!optional (namespace-prefix-assig '()) preserve-whitespace-only-node-values on-need-more-data (operation 'parse)
;; ... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/markup/sxml-parser.scm | scheme | Optimized for speed
Essentially Oleg's SSAX' code, rearranged.
(xml-string->sxml xml-string
#!optional (namespace-prefix-assig '()) preserve-whitespace-only-node-values on-need-more-data (operation 'parse)
(namespaces-already-defined '()))
that takes no arg... | ! ! ! XML to SXML deserializer library
, 2009 - 2011
# # Exports
operation = ' parse = Do XML to SXML conversion of all xml - string now ( i.e. ssax : xml->sxml ) .
' lazy = Initiate XML to SXML conversion lazily ( i.e. lazy : xml->sxml ) .
' ssax = Initiate processing of XML to... |
e3a7a51dd8173de7fef883eed3958dbdd2a1a23a164d76705e554623fc848e0a | bos/rwh | Trouble.hs | import Data.Char (toUpper)
{-- snippet upcaseFirst --}
upcaseFirst (c:cs) = toUpper c -- forgot ":cs" here
{-- /snippet upcaseFirst --}
{-- snippet camelCase --}
camelCase :: String -> String
camelCase xs = concat (map upcaseFirst (words xs))
{-- /snippet camelCase --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch05/Trouble.hs | haskell | - snippet upcaseFirst -
forgot ":cs" here
- /snippet upcaseFirst -
- snippet camelCase -
- /snippet camelCase - | import Data.Char (toUpper)
camelCase :: String -> String
camelCase xs = concat (map upcaseFirst (words xs))
|
75f8f2120d28730ca795e09bc5bebb5f5f75ab892c12793e9a8ffbd11d2519b2 | ghilesZ/apronext | environmentext.ml | (********************************************************************************)
* This file is an extension for the Environment module from the apron
Library
Library *)
(********************************************************************************)
(** It only adds function, nothing is removed *)
inclu... | null | https://raw.githubusercontent.com/ghilesZ/apronext/227b20367f6211035b40a62c5b6486ef6a14ab10/src/environmentext.ml | ocaml | ******************************************************************************
******************************************************************************
* It only adds function, nothing is removed
* environment build from variable string names
* empty environment
* adds a variable to an environment according to... | * This file is an extension for the Environment module from the apron
Library
Library *)
include Apron.Environment
let make_s ints reals =
make
(Array.map Apron.Var.of_string ints)
(Array.map Apron.Var.of_string reals)
let empty = make [||] [||]
exception DuplicateName of string
let add_check e... |
839881b6f303a04ef7e44835ab60f7eac95114f1856a86fdf2c5c48aac3984a8 | alexandergunnarson/quantum | js.cljc | (ns quantum.compile.transpile.to.js) | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/compile/transpile/to/js.cljc | clojure | (ns quantum.compile.transpile.to.js) | |
140c23b31e5589cc49f36bae971f890f0b31882b5b955980f64243dde890cc77 | input-output-hk/project-icarus-importer | VAR.hs | -- | Center of where block verification/application/rollback happens.
for all components ( slog , ssc , txp , , us ) .
module Pos.Block.Logic.VAR
( verifyBlocksPrefix
, BlockLrcMode
, verifyAndApplyBlocks
, applyWithRollback
-- * Exported for tests
, applyBlocks
... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/block/src/Pos/Block/Logic/VAR.hs | haskell | | Center of where block verification/application/rollback happens.
* Exported for tests
-- CHECK: @verifyBlocksLogic
-- #txVerifyBlocks
-- #sscVerifyBlocks
# dlgVerifyBlocks
-- #usVerifyBlocks
verification fails. All blocks must be from the same epoch. This
function checks literally __everything__ from blocks... | for all components ( slog , ssc , txp , , us ) .
module Pos.Block.Logic.VAR
( verifyBlocksPrefix
, BlockLrcMode
, verifyAndApplyBlocks
, applyWithRollback
, applyBlocks
, rollbackBlocks
) where
import Universum
import Control.Exception.Safe ... |
6528ff85657e9a773d16b81d06e9b064d7ecebdd28fff21996bc1af10d2cb73d | reactiveml/rml | toplevel.ml | Js_of_ocaml toplevel
* /
* Copyright ( C ) 2011
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/toplevel/toplevel.ml | ocaml | **
Util.set_debug "parser";
Util.set_debug "deadcode";
Util.set_debug "main";
XXX HACK! | Js_of_ocaml toplevel
* /
* Copyright ( C ) 2011
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
5138111a6ce643838159612688fe1a02e27001235ee73b3a8755011c75c7a806 | johnwhitington/ocamli | fork.ml | let _ =
match Unix.fork () with
0 -> print_string "I am in the child process!\n"
| pid ->
if pid = 0 then print_string "Why is pid 0?\n" else
begin
print_string "I am in process: "; print_int pid; print_string "\n"
end
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/examples/failing/fork.ml | ocaml | let _ =
match Unix.fork () with
0 -> print_string "I am in the child process!\n"
| pid ->
if pid = 0 then print_string "Why is pid 0?\n" else
begin
print_string "I am in process: "; print_int pid; print_string "\n"
end
| |
95bcedabf98ed677124e9e2f8266ce0651c31f5c4c2d2589f000807376feab11 | jeromesimeon/Galax | galax_camomile_0.6.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/base/galax_camomile_0.6.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : galax_camomile_0.6.ml , v 1.1 2007/09/27 19:19:28 simeon Exp $
open Error
module TextUTF8 = Camomile.UNF.Make(Camomile.UTF8)
let nfc x = TextUTF8.nfc x
let nfd x = TextUTF8.nfd x
let nfkc x = TextUTF8.nfkc x
let nfkd x = TextUTF8.n... |
1db023ead646d659b5bf1344ac48a8bb0ff85adf7912c3c77511d3089a3e2db5 | alexandroid000/improv | Int8.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_msgs.Int8 where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import R... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Std_msgs/Ros/Std_msgs/Int8.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_msgs.Int8 where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
import quali... |
974b8f478148017ad6b6b9fb1435796d568c79dca1b77137a31869636662dd76 | lisp/de.setf.thrift | protocol.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : org.apache.thrift.implementation ; -*-
(in-package :org.apache.thrift.implementation)
;;; This file defines the abstract '`protocol` layer for the `org.apache.thrift` library.
;;;
copyright 2010 [ )
;;;
Licensed to the Apache Software Fou... | null | https://raw.githubusercontent.com/lisp/de.setf.thrift/32b0d1ca3d9fa95327165b8090e1021bc563ed3e/protocol.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : org.apache.thrift.implementation ; -*-
This file defines the abstract '`protocol` layer for the `org.apache.thrift` library.
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ... |
(in-package :org.apache.thrift.implementation)
copyright 2010 [ )
Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
The ... |
7f292702fa8220a8fc70df08dd1c9487ec893f71923359c014ba408042eb337a | wkok/openai-clojure | api.clj | (ns wkok.openai-clojure.api
(:require [wkok.openai-clojure.core :as core]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Models
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn list-models
"Lists the currently available models, and provides basic information about each one such as the owner and availability.
Exa... | null | https://raw.githubusercontent.com/wkok/openai-clojure/58191280e57f474865bdcd3b0218ecdf1151e30d/src/wkok/openai_clojure/api.clj | clojure |
Completion
Edit
Images
Embedding
Files
Fine tune
Moderation
| (ns wkok.openai-clojure.api
(:require [wkok.openai-clojure.core :as core]))
Models
(defn list-models
"Lists the currently available models, and provides basic information about each one such as the owner and availability.
Example:
```
(list-models)
```
Also see the [OpenAI documentation](-reference/m... |
9f668136e5cb4763f4fff0726a25b5fc6fc098c1bb616161b8813f6494e903fe | jepsen-io/scylla | counter.clj | (ns scylla.counter
(:require [clojure [pprint :refer [pprint]]]
[clojure.tools.logging :refer [info]]
[jepsen
[client :as client]
[checker :as checker]
[nemesis :as nemesis]
[generator :as gen]]
[qbits.alia :as alia]
... | null | https://raw.githubusercontent.com/jepsen-io/scylla/a9aed0cb2d5e51301d4b354e29bfa5df5fad3752/src/scylla/counter.clj | clojure | TODO: do we *really* want ALL ; here? | (ns scylla.counter
(:require [clojure [pprint :refer [pprint]]]
[clojure.tools.logging :refer [info]]
[jepsen
[client :as client]
[checker :as checker]
[nemesis :as nemesis]
[generator :as gen]]
[qbits.alia :as alia]
... |
da8852fae52a1c814799eb891f2951ac559ee8fe67151c3458c0efe75a59a3e5 | saman-pasha/LCC | test-sha1.lisp | ;;;; **************************** sha.h ****************************/
;;;; ***************** See RFC 6234 for details. *******************/
;;;; *
Copyright ( c ) 2011 IETF Trust and the persons identified as
;;;; authors of the code. All rights reserved.
;;;; Redistribution and use in source and binary forms... | null | https://raw.githubusercontent.com/saman-pasha/LCC/00087c057676469fc6d6467de0ea563e1967af21/test-sha1.lisp | lisp | **************************** sha.h ****************************/
***************** See RFC 6234 for details. *******************/
*
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditi... | Copyright ( c ) 2011 IETF Trust and the persons identified as
- Neither the name of Internet Society , IETF or IETF Trust , nor
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES ,
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES... |
28cbe190e66853c48d75c13bd39d76736ff3d0d7d57bd74bcb6134c28831a5c9 | rabbitmq/rabbitmq-peer-discovery-aws | config_schema_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 ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(config_schema_SUITE).
-compile(export_al... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-peer-discovery-aws/73b555cef45be4a2202a75b630830f3b522d08b1/test/config_schema_SUITE.erl | erlang |
-------------------------------------------------------------------
Testsuite setup/teardown.
-------------------------------------------------------------------
-------------------------------------------------------------------
Testcases.
------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(config_schema_SUITE).
-compile(export_all).
a... |
bd21d247e3e085434bf6901a77406abc8aaf1fe2285d713a0ea51dfa613554ba | irastypain/sicp-on-language-racket | exercise_1_12-test.rkt | #lang racket
(require rackunit
rackunit/text-ui
"../../src/chapter01/exercise_1_12.rkt")
(define tests
(test-suite
"Pascal's triangle"
(check-equal? 1 (pascal-triangle 1 1))
(check-equal? 1 (pascal-triangle 2 1))
(check-equal? 2 (pascal-triangle 3 2))
(check-equal? 3 (pascal-t... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter01/exercise_1_12-test.rkt | racket | #lang racket
(require rackunit
rackunit/text-ui
"../../src/chapter01/exercise_1_12.rkt")
(define tests
(test-suite
"Pascal's triangle"
(check-equal? 1 (pascal-triangle 1 1))
(check-equal? 1 (pascal-triangle 2 1))
(check-equal? 2 (pascal-triangle 3 2))
(check-equal? 3 (pascal-t... | |
a1b2d64fd87c99aeac287dc660e1354e820404fad376f6405987606e4bf9dcba | databrary/databrary | Slot.hs | {-# LANGUAGE OverloadedStrings, RecordWildCards, DataKinds #-}
module Model.Slot
( module Model.Slot.Types
, lookupSlot
, lookupContainerSlot
, auditSlotDownload
, slotJSON
) where
import Database.PostgreSQL.Typed.Types
import qualified Data.String
import qualified JSON
import Service.DB
import Model.Id
i... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Slot.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards, DataKinds #
the Slot's Container's Volume. :)
Slot).
probably add bool to slotJSON | module Model.Slot
( module Model.Slot.Types
, lookupSlot
, lookupContainerSlot
, auditSlotDownload
, slotJSON
) where
import Database.PostgreSQL.Typed.Types
import qualified Data.String
import qualified JSON
import Service.DB
import Model.Id
import Model.Identity
import Model.Audit
import Model.Segment
im... |
dc896dd7c990d5b33a67b4a8c73f34e5b5155f0d72fe7292cff9f50a08fc04bd | clojure-interop/google-cloud-clients | CloudTasksClient$ListQueuesPagedResponse.clj | (ns com.google.cloud.tasks.v2beta3.CloudTasksClient$ListQueuesPagedResponse
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.tasks.v2beta3 CloudTasksClient$ListQueuesPagedResponse]))
(defn *create-async
"context - `com.google.api.gax.rpc.PageContext`
future-response - `com.google.api... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.tasks/src/com/google/cloud/tasks/v2beta3/CloudTasksClient%24ListQueuesPagedResponse.clj | clojure | (ns com.google.cloud.tasks.v2beta3.CloudTasksClient$ListQueuesPagedResponse
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.tasks.v2beta3 CloudTasksClient$ListQueuesPagedResponse]))
(defn *create-async
"context - `com.google.api.gax.rpc.PageContext`
future-response - `com.google.api... | |
b5b0640d8fe5af0717e8f805f71050f8564be4cbd6eb2e06702c820021f9337b | BranchTaken/Hemlock | sint.mli | * 64 - bit signed integer type .
See { ! module : ConvertIntf } for documentation on conversion functions .
See {!module:ConvertIntf} for documentation on conversion functions. *)
open RudimentsInt0
type t = sint
include IntnbIntf.SI with type t := t
include IntnbIntf.SSigned with type t := t
val trunc_... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/sint.mli | ocaml | ************************************************************************************************
* Create a constant value.
* Initialize from a default-width integer.
* Convert to a default-width integer, with possible loss.
* Convert to a default-width integer, or return [None] if conversion would be lossy.
* Conv... | * 64 - bit signed integer type .
See { ! module : ConvertIntf } for documentation on conversion functions .
See {!module:ConvertIntf} for documentation on conversion functions. *)
open RudimentsInt0
type t = sint
include IntnbIntf.SI with type t := t
include IntnbIntf.SSigned with type t := t
val trunc_... |
0f97e26b0fc6d920acf60e179754b73d38270c26df13b083f9829ec35371d4c1 | jfacorro/fp-interpreter-in-lisp | tests.lisp | (test (fp-id) abc)
(test (fp-selector 2) (a b c))
(test (fp-selector-right 3) (a b c))
(test (fp-tl) (a b c))
(test (fp-tlr) (a b c))
(test (fp-atom) 0)
(test (fp-atom) (1 2 3))
(test (fp-eq) (b a))
(test (fp-eq) (a a))
(test (fp-eq) (2 1))
(test (fp-eq) (1 1))
(test (fp-null) ())
(test (fp-nu... | null | https://raw.githubusercontent.com/jfacorro/fp-interpreter-in-lisp/b0c520593e98cce83b571939a22d7efd7926c711/src/tests.lisp | lisp | (test (fp-id) abc)
(test (fp-selector 2) (a b c))
(test (fp-selector-right 3) (a b c))
(test (fp-tl) (a b c))
(test (fp-tlr) (a b c))
(test (fp-atom) 0)
(test (fp-atom) (1 2 3))
(test (fp-eq) (b a))
(test (fp-eq) (a a))
(test (fp-eq) (2 1))
(test (fp-eq) (1 1))
(test (fp-null) ())
(test (fp-nu... | |
d7bc833db084cfae7eae4dc99dea18aa9af66b36a4ad63bef8330010fdc0f5ce | stchang/macrotypes | stlc+cons-tests.rkt | #lang s-exp turnstile/examples/stlc+cons
(require "rackunit-typechecking.rkt")
(typecheck-fail (cons 1 2)
#:with-msg "expected \\(List Int\\), given Int\n *expression: 2")
( typecheck - fail ( cons 1 nil )
; #:with-msg "nil: requires type annotation")
(check-type (cons 1 nil) : (List Int... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/stlc%2Bcons-tests.rkt | racket | #:with-msg "nil: requires type annotation")
passes bc ⇒-rhs is only used for its runtime value
more list errors
previous tests: ------------------------------------------------------------
define-type-alias
records (ie labeled tuples)
not enough clauses
wrong clause
too many clauses
mismatched ... | #lang s-exp turnstile/examples/stlc+cons
(require "rackunit-typechecking.rkt")
(typecheck-fail (cons 1 2)
#:with-msg "expected \\(List Int\\), given Int\n *expression: 2")
( typecheck - fail ( cons 1 nil )
(check-type (cons 1 nil) : (List Int))
(check-type (cons 1 (nil {Int})) : (List Int))
(typecheck-... |
2c7d2075800a5ce87d6ff23bfd1652fc039a3c5cc6ea12dd57df54fc75f5eb3f | herd/herdtools7 | readBell.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/readBell.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2015 - 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... |
78fbecf630e17d8e02ab5db4caecd9f5c9b67cb33092d720e040106fadc8e0da | purescript/purescript | Libs.hs | # LANGUAGE BlockArguments #
# LANGUAGE TemplateHaskell #
| Various constants which refer to things in the Prelude and other core libraries
module Language.PureScript.Constants.Libs where
import qualified Protolude as P
import Data.String (IsString)
import Language.PureScript.PSString (PSString)
import qualified Lan... | null | https://raw.githubusercontent.com/purescript/purescript/3e19a7c2d12bcd6a455e43a9865d10e382274eb4/src/Language/PureScript/Constants/Libs.hs | haskell | Type Class Dictionary Names
purescript-prelude
purescript-arrays
purescript-bifunctors
purescript-contravariant
purescript-eff
purescript-effect
purescript-foldable-traversable
purescript-functions
purescript-integers
purescript-newtype
purescript-partial
purescript-profunctor
purescript-unsafe-coerce | # LANGUAGE BlockArguments #
# LANGUAGE TemplateHaskell #
| Various constants which refer to things in the Prelude and other core libraries
module Language.PureScript.Constants.Libs where
import qualified Protolude as P
import Data.String (IsString)
import Language.PureScript.PSString (PSString)
import qualified Lan... |
84db96e204b01b73137d4bee27a44db4f5f1eb0a9ac54954df3e002c0eca4c9e | reflex-frp/reflex-native | uikit.hs | module Main where
import qualified Reflex.Native.Examples.Draggy as Draggy
import Reflex.UIKit.Main (run)
main :: IO ()
main = run Draggy.main
| null | https://raw.githubusercontent.com/reflex-frp/reflex-native/5fb6a07845e4f7c51f97e9c8ce1a48009f341246/examples/draggy/src-bin/uikit.hs | haskell | module Main where
import qualified Reflex.Native.Examples.Draggy as Draggy
import Reflex.UIKit.Main (run)
main :: IO ()
main = run Draggy.main
| |
024b1443c5a625ca3b4a1c813c69b4bbbe75a1495dd2fd526e6ae0a0c61b1f5a | ocurrent/ocaml-docs-ci | track.mli | type t [@@deriving yojson]
val digest : t -> string
val pkg : t -> OpamPackage.t
val v : limit:int option -> filter:string list -> Current_git.Commit.t Current.t -> t list Current.t
module Map : OpamStd.MAP with type key = t
| null | https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/cb5d4a54a7fd9883aec066b4bd1fcb50ca42e7bc/src/lib/track.mli | ocaml | type t [@@deriving yojson]
val digest : t -> string
val pkg : t -> OpamPackage.t
val v : limit:int option -> filter:string list -> Current_git.Commit.t Current.t -> t list Current.t
module Map : OpamStd.MAP with type key = t
| |
2f93b63cc58e3f1b27ca0d1059a2b03ba7eba4883c1c53672b32e7404f05c726 | zotonic/cowmachine | prop_cowmachine_util_parse_qs.erl | -module(prop_cowmachine_util_parse_qs).
-include_lib("proper/include/proper.hrl").
%%%%%%%%%%%%%%%%%%
%%% Properties %%%
%%%%%%%%%%%%%%%%%%
%% shell command for a test: rebar3 as test proper -p prop_parse_qs
prop_parse_qs() ->
?FORALL(
{
{{FormattedName1, FormattedValue1},{Name1,Value1}},
{{FormattedName2... | null | https://raw.githubusercontent.com/zotonic/cowmachine/7c96143c2dc26d36ba620c21b6c891a2fcabdccc/test/prop_cowmachine_util_parse_qs.erl | erlang |
Properties %%%
shell command for a test: rebar3 as test proper -p prop_parse_qs
Helpers %%%
HH ' , a percent sign and
io:format("String =~p, Result =~p~n",[String, Result]),
Generators %%%
| -module(prop_cowmachine_util_parse_qs).
-include_lib("proper/include/proper.hrl").
prop_parse_qs() ->
?FORALL(
{
{{FormattedName1, FormattedValue1},{Name1,Value1}},
{{FormattedName2, FormattedValue2},{Name2,Value2}}
},
{
pair_gen(),
pair_gen()
},
begin
Pair1 = FormattedName1 ++ "... |
17de18fa3f5a52cd42f8351044ef498517e80b13a61383f534d5179ac78c22d3 | vrnithinkumar/ETC | branch_diff_type.erl | -module(branch_diff_type).
-compile(export_all).
ping() -> 1.0.
pong() -> pong.
% unused case can have branches of different types
foo(X) ->
case X of
ping -> ping();
pong -> pong()
end,
trash. | null | https://raw.githubusercontent.com/vrnithinkumar/ETC/34e8b3f98973f49582bb68c46822dbe94f1f9c61/btc_test_suit/test_cases/branch_diff_type.erl | erlang | unused case can have branches of different types | -module(branch_diff_type).
-compile(export_all).
ping() -> 1.0.
pong() -> pong.
foo(X) ->
case X of
ping -> ping();
pong -> pong()
end,
trash. |
ec28d4d3995ac87a02dad5e108fb3e05c717305b05e890e491092e828afef0a1 | r0man/netcdf-clj | utils.clj | (ns netcdf.utils
(:require [clj-time.coerce :refer [to-date-time]]
[clj-time.core :refer [now in-seconds interval date-time year month day hour]]
[clj-time.format :refer [formatters unparse]]
[clojure.java.io :refer [file reader writer]]
[digest :refer [digest]]))
(def... | null | https://raw.githubusercontent.com/r0man/netcdf-clj/90f40ab958d3ebc16a4fcfc882c9cd7ef469d054/src/netcdf/utils.clj | clojure | (ns netcdf.utils
(:require [clj-time.coerce :refer [to-date-time]]
[clj-time.core :refer [now in-seconds interval date-time year month day hour]]
[clj-time.format :refer [formatters unparse]]
[clojure.java.io :refer [file reader writer]]
[digest :refer [digest]]))
(def... | |
5b188df4a1cc7d64b285abe1d5a88e775d80c732a4e44bc008ce16248ba2b556 | Clojure2D/clojure2d-examples | ex01_events.clj | # # Example 01
;;
;; Show how to create mouse and key events + replace-canvas function
(ns ex01-events
"Process window events"
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
;; In this example you can see how to cre... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/ex01_events.clj | clojure |
Show how to create mouse and key events + replace-canvas function
In this example you can see how to create event methods for different windows
* Presse `space` in both windows to display window name
* create new canvas
* get mouse position and change to the color
* set canvas color to newly calcul... | # # Example 01
(ns ex01-events
"Process window events"
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
Let 's create two windows and define following actions :
* For released mouse on first window do the followin... |
fa1743d7b61692c6f902b86970e4532f52194a1f140087441491b51da66db266 | haskellfoundation/error-message-index | CaseExprInCasePattern.hs | module CaseExprInFunctionDef where
f :: a -> b -> Int
f x y = case x of
case y of
_ -> 1
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-53786/case-expr-in-case-pattern/before/CaseExprInCasePattern.hs | haskell | module CaseExprInFunctionDef where
f :: a -> b -> Int
f x y = case x of
case y of
_ -> 1
| |
f05e7cd1e56b79a2e08fff088e4ee79c5579e39fd2e2da547c9727129825b8f5 | eponai/sulolive | facebook.cljc | (ns eponai.web.social.facebook
(:require
[taoensso.timbre :refer [debug]]))
(defn share-stream [stream]
#?(:cljs
(js/FB.ui #js {:method "share"
: " og.likes "
:href ""
:display "page"
: action_properties ( js / JSON.stringify # js{:object " 834534123363063 " }... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/social/facebook.cljc | clojure | (ns eponai.web.social.facebook
(:require
[taoensso.timbre :refer [debug]]))
(defn share-stream [stream]
#?(:cljs
(js/FB.ui #js {:method "share"
: " og.likes "
:href ""
:display "page"
: action_properties ( js / JSON.stringify # js{:object " 834534123363063 " }... | |
e0b8f99b83f60eea91ebf969c44d45a7cd6f46746448134c0647a496f76d8fca | turquoise-hexagon/euler | solution.scm | (define (solve n m)
(let loop ((a n) (b n) (acc n))
(if (= a 1)
acc
(let ((t (modulo (+ a b) m)))
(cond
((> t b) (loop a t acc))
((< t a) (loop t b (+ acc t))))))))
(let ((_ (solve 1504170715041707 4503599627370517)))
(print _) (assert (= _ 1517926517777556)))
| null | https://raw.githubusercontent.com/turquoise-hexagon/euler/f3bcb81a958a4f5015c1bb8bc6faff29811d25c5/src/spoilers/700/solution.scm | scheme | (define (solve n m)
(let loop ((a n) (b n) (acc n))
(if (= a 1)
acc
(let ((t (modulo (+ a b) m)))
(cond
((> t b) (loop a t acc))
((< t a) (loop t b (+ acc t))))))))
(let ((_ (solve 1504170715041707 4503599627370517)))
(print _) (assert (= _ 1517926517777556)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.