_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 |
|---|---|---|---|---|---|---|---|---|
2a208c18dfd85ee23c14483d66dc32680fd9d47ae038063f6c793ce2612722cd | racket/gui | path-dialog.rkt | (module path-dialog mzscheme
(require mred/private/path-dialog)
(provide path-dialog%))
| null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mrlib/path-dialog.rkt | racket | (module path-dialog mzscheme
(require mred/private/path-dialog)
(provide path-dialog%))
| |
bab451dbce35b070d2768371ba829b1a15e6bd7f5cc4d1201833c62d2e396a4b | runtimeverification/haskell-backend | Limit.hs | |
Module : Data . Limit
Description : Optionally - limited quantities
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
This module is intended to be imported qualified :
@
import Data . Limit ( Limit ( .. ) )
import Data . Limit qualified as... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Data/Limit.hs | haskell | | An optionally-limited quantity.
| No limit
| Limit @a@ by the given (inclusive) upper bound
| Is the given value within the (inclusive) upper bound?
| Enumerate values beginning at @a@ and within the limit.
| Take a limited prefix of the given list. | |
Module : Data . Limit
Description : Optionally - limited quantities
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
This module is intended to be imported qualified :
@
import Data . Limit ( Limit ( .. ) )
import Data . Limit qualified as... |
d777be0bc39090f62160d40bc1de217043f20c8b98bb673300f3dc15b663084a | namin/inc | tests-6.6-req.scm | (add-tests-with-string-output-noboot "test compiler"
[(let ()
(begin
(let ()
(load "self.scm")
(load "reader.scm")
(load "compiler.scm")
(all-conversions ''#(foo)))
'ok))
=> "ok\n"]
[(let ()
(begin
(let ()
(load "self.scm")
... | null | https://raw.githubusercontent.com/namin/inc/3f683935e290848485f8d4d165a4f727f6658d1d/src/tests-6.6-req.scm | scheme | (add-tests-with-string-output-noboot "test compiler"
[(let ()
(begin
(let ()
(load "self.scm")
(load "reader.scm")
(load "compiler.scm")
(all-conversions ''#(foo)))
'ok))
=> "ok\n"]
[(let ()
(begin
(let ()
(load "self.scm")
... | |
ec63306631d1ead85a6a391fad44b8bfd755a2a4969487ca334a0f16a13be427 | AndreaCrotti/elo | games_list.cljs | (ns byf.league-detail.games-list
(:require [re-frame.core :as rf]
[byf.utils :refer [comparator-by]]
[byf.common.players :as players-handlers]
[byf.league-detail.utils :as utils]
[byf.league-detail.handlers :as handlers]
[antizer.reagent :as ant]))
(def col... | null | https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/src/cljs/byf/league_detail/games_list.cljs | clojure | (ns byf.league-detail.games-list
(:require [re-frame.core :as rf]
[byf.utils :refer [comparator-by]]
[byf.common.players :as players-handlers]
[byf.league-detail.utils :as utils]
[byf.league-detail.handlers :as handlers]
[antizer.reagent :as ant]))
(def col... | |
befc888fd6351550fc2bbf5aaf16531a6a84b1793f5d7423e25a8c9283d3d37a | sondresl/AdventOfCode | Day19.hs | module Day19 where
import Lib (freqs, combinations, tuple, select)
import Linear (V3(..))
import Control.Monad (guard)
import Data.List.Extra (splitOn)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Text.ParserCombinators.Parsec
(many1, digit, ... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/62417a9e47cbd92067f353945d8176233f9496b4/2021/Haskell/src/Day19.hs | haskell | face forward
face left
face opposite
face right
face up
face down
no rot | module Day19 where
import Lib (freqs, combinations, tuple, select)
import Linear (V3(..))
import Control.Monad (guard)
import Data.List.Extra (splitOn)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Text.ParserCombinators.Parsec
(many1, digit, ... |
ceb32dbfc269e45427de2e7a7d8b0bbcf1f3a5eb035780dcce1f03647ae16498 | yitzchak/shasht | sbcl-profile.lisp | (ql:quickload :shasht)
(sb-profile:profile
shasht:read-json shasht::read-json-number shasht::read-json-object shasht::read-json-array
shasht::read-json-string)
(dotimes (p 10000) (shasht:from-json "{\"key1\":\"value\",\"key2\":1,\"key3\":[\"Hello\",1.2]}"))
(sb-profile:report)
| null | https://raw.githubusercontent.com/yitzchak/shasht/4055327ef8e2aaa8627892ab256350ff3cb15e3c/tests/sbcl-profile.lisp | lisp | (ql:quickload :shasht)
(sb-profile:profile
shasht:read-json shasht::read-json-number shasht::read-json-object shasht::read-json-array
shasht::read-json-string)
(dotimes (p 10000) (shasht:from-json "{\"key1\":\"value\",\"key2\":1,\"key3\":[\"Hello\",1.2]}"))
(sb-profile:report)
| |
a5ce7ba7e765c8ab18c4eafeeaf4c15d377100eb132d3f50c46d309d3a3ff5e0 | TikhonJelvis/Cow | Read.hs | module Cow.ParseTree.Read where
import Cow.ParseTree
import Text.Parsec
import Text.Parsec.String
-- | A helper function that reads trees of ints from a string. Each
-- node is denoted with square brackets which contain its children,
-- separated by spaces. Leaves are just numbers.
--
... | null | https://raw.githubusercontent.com/TikhonJelvis/Cow/65832f9826ede4c1380cdc35a42f2b85b1bfebea/src/Cow/ParseTree/Read.hs | haskell | | A helper function that reads trees of ints from a string. Each
node is denoted with square brackets which contain its children,
separated by spaces. Leaves are just numbers.
o
/ \
o o
/ / \
/ \
| An unsafe... | module Cow.ParseTree.Read where
import Cow.ParseTree
import Text.Parsec
import Text.Parsec.String
For example , [ [ 1][2[3 4 ] ] ] parses to :
1 2 o
3 4
readTree :: String -> Either ParseError (Parse' Int)
readTree str = parse tree "<... |
5c8f26eb621554d0f0bad2a8e677961e3fdf61eb0e0758e24a60ba1ca9a313b9 | ranjitjhala/haddock-annot | Rename.hs | ----------------------------------------------------------------------------
-- |
-- Module : Haddock.Interface.Rename
Copyright : ( c ) 2003 - 2006 ,
2006 - 2009
-- License : BSD-like
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
-----------... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/haddock-2.9.3/src/Haddock/Interface/Rename.hs | haskell | --------------------------------------------------------------------------
|
Module : Haddock.Interface.Rename
License : BSD-like
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
first create the local env,... | Copyright : ( c ) 2003 - 2006 ,
2006 - 2009
module Haddock.Interface.Rename (renameInterface) where
import Haddock.Types
import Haddock.GhcUtils
import GHC hiding (NoLink)
import Name
import BasicTypes
import Bag (emptyBag)
import Data.List
import qualified Data.Map as Map hiding ( ... |
ff26a31a8586ba935bdcb8148ff686a10dbc106f93527408faf6b1db8b94de5b | anoma/juvix | MatchToCase.hs | module Juvix.Compiler.Core.Transformation.MatchToCase where
import Juvix.Compiler.Core.Data.InfoTableBuilder
import Juvix.Compiler.Core.Extra
import Juvix.Compiler.Core.Info.LocationInfo
import Juvix.Compiler.Core.Info.NameInfo (setInfoName)
import Juvix.Compiler.Core.Info.TypeInfo
import Juvix.Compiler.Core.Language
... | null | https://raw.githubusercontent.com/anoma/juvix/c93013229ab84e81298ced674961ff30a39b888b/src/Juvix/Compiler/Core/Transformation/MatchToCase.hs | haskell | | increase all free variable indices by a given value.
In this function we consider indices to be embedded at a specified level
1. The body is wrapped in let bindings so that bound variables in the
body point to the correct variables.
2. Free variables in the body are shifted by the sum of:
... | module Juvix.Compiler.Core.Transformation.MatchToCase where
import Juvix.Compiler.Core.Data.InfoTableBuilder
import Juvix.Compiler.Core.Extra
import Juvix.Compiler.Core.Info.LocationInfo
import Juvix.Compiler.Core.Info.NameInfo (setInfoName)
import Juvix.Compiler.Core.Info.TypeInfo
import Juvix.Compiler.Core.Language
... |
3a83043c3a3164183a34413768b2c9688217482cb062f1a7df199d9267e05d83 | rmascarenhas/foppl | operations.clj | (ns foppl.operations
"Provides functions that manipulate the result of the compilation of a
FOPPL program into an internal representation of a graphical model."
(:require [clojure.set :as set]
[anglican.runtime :as anglican]
[foppl.formatter :as formatter]
[foppl.ast :as ast :r... | null | https://raw.githubusercontent.com/rmascarenhas/foppl/f3d7013c97652c8b555dae2bd7067e2b0134b030/src/foppl/operations.clj | clojure | representing their distribution
helper function: given a map `m` and a collection of keys
`ks`, this function will produce a map containing only the
keys in `km`.
performs sampling of a given random variable, identified by
`name`, that behaves according to the `dist`
distribution. `samples` is a map that contain... | (ns foppl.operations
"Provides functions that manipulate the result of the compilation of a
FOPPL program into an internal representation of a graphical model."
(:require [clojure.set :as set]
[anglican.runtime :as anglican]
[foppl.formatter :as formatter]
[foppl.ast :as ast :r... |
84ace0b942e7b70c42636505416357da32bdb92840928178c6f7ee0d3938cc46 | digikar99/numericals | broadcast.lisp | (in-package :sbcl-numericals.internals)
We must provide facilities so that sn:+ not only accepts any number of
arguments , like ; but also can be used without overhead with apply and funcall .
(defun foo (a b c)
(declare (optimize (speed 3) (safety 0))
(type fixnum a b c))
(the fixnum (+ a b c)))
(... | null | https://raw.githubusercontent.com/digikar99/numericals/4f82b74e32b054f65110ee62ba080603c92ac103/sbcl-numericals/src/broadcast.lisp | lisp | but also can be used without overhead with apply and funcall .
-tran.lisp
sanity check
(print (list act exp))
(print strides)
sanity check
(print (list act exp))
(print strides)
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
The plan:
s... | (in-package :sbcl-numericals.internals)
We must provide facilities so that sn:+ not only accepts any number of
(defun foo (a b c)
(declare (optimize (speed 3) (safety 0))
(type fixnum a b c))
(the fixnum (+ a b c)))
(defun bar (a b c)
(declare (optimize (speed 3) (safety 0))
(type fixnum ... |
a1e7bb4bed601b5c73127d224e19dd033b1f76cc5cd32bde17c4de0a1443bc74 | zenspider/schemers | exercise.1.17.scm | #lang racket/base
Exercise 1.17 :
;; The exponentiation algorithms in this section are based on
;; performing exponentiation by means of repeated multiplication. In a
;; similar way, one can perform integer multiplication by means of
;; repeated addition. The following multiplication procedure (in which
;; it is as... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_1/exercise.1.17.scm | scheme | The exponentiation algorithms in this section are based on
performing exponentiation by means of repeated multiplication. In a
similar way, one can perform integer multiplication by means of
repeated addition. The following multiplication procedure (in which
it is assumed that our language can only add, not multip... | #lang racket/base
Exercise 1.17 :
( if (= b 0 ) 0
integer by 2 . Using these , design a multiplication procedure
(define (double n) (+ n n))
( * 11 10 )
( double ( * 11 5 ) )
( double ( + 11 ( * 11 4 ) ) )
( double ( + 11 ( double ( * 11 2 ) ) ) )
( double ( + 11 ( double ( double 11 ) ) ) )
(d... |
44e261908f9f2cf4fa0d3e2e98cf7d99ec25be55e9f6116a0903945a68b4c959 | hdima/erlport | python.erl | Copyright ( c ) 2009 - 2015 , < >
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% * Redistributions of source code must retain the above copyright notice,
%%% this list of... | null | https://raw.githubusercontent.com/hdima/erlport/246b7722d62b87b48be66d9a871509a537728962/src/python.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistribution... | Copyright ( c ) 2009 - 2015 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , E... |
4a504356b1e61a6294f109a94cdf451783a2198a3aa7a28284ddcc51da50f94c | GaloisInc/mistral | AST.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Mistral.Parser.AST where
import Mistral.ModuleSystem.Name
import Mistral.Utils.Names
import Mistral.Utils.PP
import Mistral.Utils.Source
import Data.Char (intToDigit)
import Data.Foldable ( foldMap )
i... | null | https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/src/Mistral/Parser/AST.hs | haskell | # LANGUAGE OverloadedStrings #
Modules----------------------------------------------------------------------
Declarations ----------------------------------------------------------------
| A declaration, with bindings parameterized by their body type.
Top Declarations -----------------------------------------------... | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
module Mistral.Parser.AST where
import Mistral.ModuleSystem.Name
import Mistral.Utils.Names
import Mistral.Utils.PP
import Mistral.Utils.Source
import Data.Char (intToDigit)
import Data.Foldable ( foldMap )
import Data.Monoid ( Monoi... |
ed928f6a429a88ed141ce9cdeea9b90eb3ceac72230258b3e42bf0909791c867 | facebookarchive/pfff | xhprof.mli |
type xhprof_call = {
src: xhprof_entity;
dest: xhprof_entity;
}
and xhprof_entity =
| Function of string
| Method of string (* class *) * string (* method *)
| Main
| PruneChild
| RunInit of Common.filename
| Misc of string
val string_of_xhprof_entity: xhprof_entity -> string
val parse_xhprof_entity_... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/analyze/tools/xhprof.mli | ocaml | class
method
some function or method names have a @ suffix. not sure why |
type xhprof_call = {
src: xhprof_entity;
dest: xhprof_entity;
}
and xhprof_entity =
| Function of string
| Main
| PruneChild
| RunInit of Common.filename
| Misc of string
val string_of_xhprof_entity: xhprof_entity -> string
val parse_xhprof_entity_string: string -> xhprof_entity
val parse_caller_calle... |
96b917ffa2f00d2f1cdc3e1b4c9dabec5088f4d7d4b114874c8586c6d21b5a90 | rorra/rorracasts_erlang | diccionario1.erl | -module(diccionario1).
-export([start/0, store/3, get/2]).
Interfaz del modulo
start() ->
spawn(fun() -> init(maps:new()) end).
store(Pid, Key, Value) ->
Pid ! {store, Key, Value}.
get(Pid, Key) ->
Pid ! {self(), get, Key},
receive
Response -> Response
end.
%% Funciones internas del modulo
... | null | https://raw.githubusercontent.com/rorra/rorracasts_erlang/c50d20abe3f1a65001576734caedae90f36e3ecd/024-otp-intro/diccionario1.erl | erlang | Funciones internas del modulo | -module(diccionario1).
-export([start/0, store/3, get/2]).
Interfaz del modulo
start() ->
spawn(fun() -> init(maps:new()) end).
store(Pid, Key, Value) ->
Pid ! {store, Key, Value}.
get(Pid, Key) ->
Pid ! {self(), get, Key},
receive
Response -> Response
end.
init(Estado) ->
loop(Estado).... |
5030ffe3b0c83c47f0f4e6e22c28e2d68ed20838af1c95057911ba0ed32f6b6e | abcdw/ironhide | core.cljs | (ns ih-demo.core
(:require [ironhide.core :as ih]
[reagent.core :as r]
[cljs.reader :refer [read-string]]
[cljs.pprint]
[com.rpl.specter :as sp]
))
(def init-shell
#:ih{:rules [{:left [:name :ihs/str<->vector [0]]
:right [:name [0] :given ... | null | https://raw.githubusercontent.com/abcdw/ironhide/f55b69b356b61c1bf9c0ae122e7e14578efbd731/demo/src/ih_demo/core.cljs | clojure | !!!
(ih/execute shell)
(println
(sp/select [:a :b] {:a {:b :c}}))
[:div.col-sm-2
[:a.btn.btn-block.btn-danger
{:on-click #(print-shell!)} "Update rules"]] | (ns ih-demo.core
(:require [ironhide.core :as ih]
[reagent.core :as r]
[cljs.reader :refer [read-string]]
[cljs.pprint]
[com.rpl.specter :as sp]
))
(def init-shell
#:ih{:rules [{:left [:name :ihs/str<->vector [0]]
:right [:name [0] :given ... |
89e27b8ffda7f4f85c86bdaa60ee00072ad0294d61f8435c9621ffa94b6d18ec | input-output-hk/ouroboros-network | Chain.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
-- Just to keep 'HasCallstack' on 'validExtension'.
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
-- | Reference implementation of a representation of a block chain
--
module Ouro... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-network-mock/src/Ouroboros/Network/Mock/Chain.hs | haskell | # LANGUAGE DeriveFunctor #
Just to keep 'HasCallstack' on 'validExtension'.
# OPTIONS_GHC -Wno-redundant-constraints #
| Reference implementation of a representation of a block chain
* Chain type and fundamental operations
** Block re-exports
* Point type
* Chain construction and inspection
** Head inspec... | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Ouroboros.Network.Mock.Chain
Chain (..)
, valid
, validExtension
, foldChain
, chainToList
, HasHeader (..)
, HeaderHash
, Point (..)
, blockPoint
* * Genesis
, genesis
, headPoint
,... |
b1998b3786d717e4860cc8933dce18436830eb65d1310608e32ae2bb7a3a297e | mstksg/nonempty-containers | NonEmpty.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE TupleSections #
{-# LANGUAGE ViewPatterns #-}
-- |
Module : Data . Map . NonEmpty
-- Copyright : (c) Justin Le 2018
-- License : BSD3
--
Maintainer :
-- St... | null | https://raw.githubusercontent.com/mstksg/nonempty-containers/ccc4283f48592efe47b41d2f44330cbadfa73e4d/src/Data/Map/NonEmpty.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE EmptyCase #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
|
Copyright : (c) Justin Le 2018
License : BSD3
Stability : experimental
Portability : non-portable
= Non-Empty Finite Maps (lazy interface)
The @'NEMap' k v@ type represents a non-empty... | # LANGUAGE PatternSynonyms #
# LANGUAGE TupleSections #
Module : Data . Map . NonEmpty
Maintainer :
An ' NEMap ' is strict in its keys but lazy in its values .
See documentation for ' NEMap ' for information on how to convert and
Because ' NEMap ' is implemented using ' Map ' , all of the caveats... |
c06df8eb39f3b5e55e36e4b771db5f714977ca7e27b635a7bdf1d0a3e6e2f2f1 | ghcjs/ghcjs | t2985.hs | # LANGUAGE TypeFamilies , UndecidableInstances #
# OPTIONS_GHC -Wnot #
module Main where
-- See
and Trac # 2985
instance (Num a, Num b, a ~ b) => Num (a,b) where
(x,y) * (u,v) = (x*u-y*v, x*v+y*u)
test1 = (1,1) * (2,2)
main = print test1
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/indexed-types/t2985.hs | haskell | See | # LANGUAGE TypeFamilies , UndecidableInstances #
# OPTIONS_GHC -Wnot #
module Main where
and Trac # 2985
instance (Num a, Num b, a ~ b) => Num (a,b) where
(x,y) * (u,v) = (x*u-y*v, x*v+y*u)
test1 = (1,1) * (2,2)
main = print test1
|
dbcc254958f1b297a350769a97a1752c1d16034c1276b6f652dadfb7a8cf2938 | onedata/op-worker | api_file_metadata_set_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This file contains tests concernin... | null | https://raw.githubusercontent.com/onedata/op-worker/a48082aad45530ab40cbe15a69c5057970a4bba1/test_distributed/suites/api/file/api_file_metadata_set_test_SUITE.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This file contains tests concerning file custom metadata set API
(REST + gs).
@end
-------------------------------------------------------------------
Set rdf metadata ... | @author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(api_file_metadata_set_test_SUITE).
-author("Bartosz Walkowicz").
-include("api_file_test_utils.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include("modules/logical_file_manager/... |
87c8f91b51bfc0bb6156ab043854aa368ea4dc71fdf1ae744c89c67460de6282 | mbutterick/beautiful-racket | grammar.rkt | #lang brag
top : (/NEWLINE+ [line])* /NEWLINE*
line : [lookbehind] pat [lookahead]
pat : repeat+ | choice
lookbehind : /"(" /"?" /"<" /"=" pat /")"
lookahead : /"(" /"?" /"=" pat /")"
choice : pat (/"|" pat)+
repeat : repeatable [("*" | "+") ["?"] | "?"]
@repeatable : group | any | start | end | literal | chars
group ... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/regexcellent-demo/grammar.rkt | racket | #lang brag
top : (/NEWLINE+ [line])* /NEWLINE*
line : [lookbehind] pat [lookahead]
pat : repeat+ | choice
lookbehind : /"(" /"?" /"<" /"=" pat /")"
lookahead : /"(" /"?" /"=" pat /")"
choice : pat (/"|" pat)+
repeat : repeatable [("*" | "+") ["?"] | "?"]
@repeatable : group | any | start | end | literal | chars
group ... | |
1385ae0e9c325daba1e3292e1ffb197a64a26d436cfb75b5428c6ce1c788ff21 | MinaProtocol/mina | or_infinity.mli | (* Representation for values that may be infinite *)
(** [t] is the type of possibly infinite values *)
type 'a t = Infinity | Finite of 'a
val finite_exn : 'a t -> 'a
| null | https://raw.githubusercontent.com/MinaProtocol/mina/92bf0214febdd037c2ab54463e500414fa8e37c6/src/lib/pickles_types/or_infinity.mli | ocaml | Representation for values that may be infinite
* [t] is the type of possibly infinite values |
type 'a t = Infinity | Finite of 'a
val finite_exn : 'a t -> 'a
|
db546c2509811f0919c9c93e1185e76a4e628f27ce0f09fee4a13c8bccf04ea9 | manuel-serrano/bigloo | match.scm | (module foo)
(define-struct int-point x y)
(define-struct real-point x y)
(define (is-in-circle? r p)
(match-case p
(#{int-point ?x ?y}
(<=fx (+fx (*fx x x) (*fx y y)) (*fx r r)))
(#{real-point ?x ?y}
(<= (+fl (*fl x x) (*fl y y)) (* r r)))
(else
(error "is-in-circle?" "argu... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/examples/Match/match.scm | scheme | (module foo)
(define-struct int-point x y)
(define-struct real-point x y)
(define (is-in-circle? r p)
(match-case p
(#{int-point ?x ?y}
(<=fx (+fx (*fx x x) (*fx y y)) (*fx r r)))
(#{real-point ?x ?y}
(<= (+fl (*fl x x) (*fl y y)) (* r r)))
(else
(error "is-in-circle?" "argu... | |
7be94a7bcf42aa208659a80566ad3ea44993f0156ae5efc5c945161ccf80b198 | imdea-software/leap | Z3NumQuery.mli |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/solvers/backend/query/z3/Z3NumQuery.mli | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
62c5c8e42d85d571eae9b86690e37e5faf00b47038accbc98229890e3424800c | nuprl/gradual-typing-performance | intermediate-funs.rkt | #lang at-exp scheme/base
(require "teachprims.rkt" "and-or-map.rkt"
mzlib/etc
(only-in racket/list argmin argmax)
syntax/docprovide
(for-syntax scheme/base))
;; Documents the procedures:
(require "provide-and-scribble.rkt")
(provide-and-scribble
procedures
(begin
(require... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/lang/private/intermediate-funs.rkt | racket | Documents the procedures:
("Posn" ) | #lang at-exp scheme/base
(require "teachprims.rkt" "and-or-map.rkt"
mzlib/etc
(only-in racket/list argmin argmax)
syntax/docprovide
(for-syntax scheme/base))
(require "provide-and-scribble.rkt")
(provide-and-scribble
procedures
(begin
(require scribble/manual scribble/eva... |
5eeaa87dfbd9be2c7fcc53c718e688a7708c9486140652874caee40ec9d9c659 | zmaril/callcongressnow | app.cljs | (ns callcongressnow.app
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [callcongressnow.legislators :refer [legislator-box]]
[goog.events :as events]
[cljs.core.async :refer [<!]]
[om.core :as om :include-macros true]
[om.dom :as dom :include-macros ... | null | https://raw.githubusercontent.com/zmaril/callcongressnow/c6a9eef9fd02b8141e87f34ff73a128c0d9cdc7f/src/cljs/callcongressnow/app.cljs | clojure | (ns callcongressnow.app
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [callcongressnow.legislators :refer [legislator-box]]
[goog.events :as events]
[cljs.core.async :refer [<!]]
[om.core :as om :include-macros true]
[om.dom :as dom :include-macros ... | |
aaf07424f53d5825b2126cfafa717ffb845e6c4c1e9f9b4552ab0de302c5bd6f | nklein/Roto-Mortar | globals.lisp | (in-package :roto-mortar)
(defvar *data-directory* #P"./data/")
(defvar *font* nil)
| null | https://raw.githubusercontent.com/nklein/Roto-Mortar/dd3bb63aa6a377ee4b359921c8d46a94d2847227/src/globals.lisp | lisp | (in-package :roto-mortar)
(defvar *data-directory* #P"./data/")
(defvar *font* nil)
| |
93d689ae6b71e6ea9479bb8b80b6527f0c18ef7b2a3055984772c0715c249f24 | seckcoder/course-compiler | s3_15.rkt |
(define (minus [n : Integer] [m : Integer]) : Integer
(+ n (- m)))
(define (map-vector [f : (Integer Integer -> Integer)]
[v : (Vector Integer)]) : (Vector Integer)
(vector (f (vector-ref v 0) 1)))
(vector-ref (map-vector minus (vector 43)) 0)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s3_15.rkt | racket |
(define (minus [n : Integer] [m : Integer]) : Integer
(+ n (- m)))
(define (map-vector [f : (Integer Integer -> Integer)]
[v : (Vector Integer)]) : (Vector Integer)
(vector (f (vector-ref v 0) 1)))
(vector-ref (map-vector minus (vector 43)) 0)
| |
ee94db295503cbbdd5de8e240af7202cad166a23c394aef27ef0be1a6441dc7c | fakedata-haskell/fakedata | Control.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Faker.Game.Control where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Control
import Faker.TH
$(generateFakeField "control" "character")
$(generateFakeField "control" "location")
$(generateFakeField "control" "object_of... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Game/Control.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Game.Control where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Control
import Faker.TH
$(generateFakeField "control" "character")
$(generateFakeField "control" "location")
$(generateFakeField "control" "object_of_power")
$(generateFakeField "cont... |
b21c8d4b24b121e3004f363c58e1a5e721cefb8d72cc36cde027cddcdfec91e3 | haskell-compat/deriving-compat | GH24Spec.hs | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
#if __GLASGOW_HASKELL__ >= 706
# LANGUAGE PolyKinds #
#endif
#if __GLASGOW_HASKELL__ >= 800 && __GLASGOW_HASKELL__ < 806
{-# LANGUAGE TypeInType #-}
#endif
|
Module : GH24Spec
Copyright : ( C ) 2019
License : BSD - style ( ... | null | https://raw.githubusercontent.com/haskell-compat/deriving-compat/23e62c003325258e925e6c2fe7e46fafdeaf199a/tests/GH24Spec.hs | haskell | # LANGUAGE TypeInType # | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
#if __GLASGOW_HASKELL__ >= 706
# LANGUAGE PolyKinds #
#endif
#if __GLASGOW_HASKELL__ >= 800 && __GLASGOW_HASKELL__ < 806
#endif
|
Module : GH24Spec
Copyright : ( C ) 2019
License : BSD - style ( see the file LICENSE )
Mai... |
b1ec642cf346259955df72cec749e436380cb1550e6fe1f4236f101cc59091a3 | ssomayyajula/refinery | base.ml | open Core.Std
open Format
module type TERM_LANG = [%import: (module Base.TERM_LANG)]
module type FORM_LANG = [%import: (module Base.FORM_LANG)]
module type LOGIC = sig
type term_var
type term
type form
type hypos = (term_var * form) list
type sequent = hypos * form
type rule = (sequent -> sequent l... | null | https://raw.githubusercontent.com/ssomayyajula/refinery/2be3e85e25d40e0172cfa82e6352d78a95b342a6/base.ml | ocaml | open Core.Std
open Format
module type TERM_LANG = [%import: (module Base.TERM_LANG)]
module type FORM_LANG = [%import: (module Base.FORM_LANG)]
module type LOGIC = sig
type term_var
type term
type form
type hypos = (term_var * form) list
type sequent = hypos * form
type rule = (sequent -> sequent l... | |
b79963eae7c02c2f1cf38080f7a334c78844609c9028dcf027432ee2168d6578 | release-project/benchmarks | toxic_client.erl | %%%--------------------------------------------------------------------
%%% TOXIC CLIENT MODULE
%%%
@author : upon a design by
( C ) 2014 , RELEASE project
%%% @doc
%%% Toxic Client module for the Distributed Erlang instant messenger
( IM ) application developed as a real benchmark for the Scalable
Di... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RD-IM/toxic_client.erl | erlang | --------------------------------------------------------------------
TOXIC CLIENT MODULE
@doc
Toxic Client module for the Distributed Erlang instant messenger
This module implementes the traffic generation logic to load a
@end
--------------------------------------------------------------------
================... | @author : upon a design by
( C ) 2014 , RELEASE project
( IM ) application developed as a real benchmark for the Scalable
Distributed Erlang extension of the Erlang / OTP language .
system similar to the system described in the Section 2 of the
document " Instant Messenger Architectures Design Pro... |
b1dad3d5c38681e1c6c587e83330080f6ba283b94f3d3fab92c1c7cd007d63b4 | may-liu/qtalk | mod_service_log.erl | %%%----------------------------------------------------------------------
File :
Author : < >
%%% Purpose : Copy user messages to logger service
Created : 24 Aug 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% This program is free software; you can redistribute it a... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/mod_service_log.erl | erlang | ----------------------------------------------------------------------
Purpose : Copy user messages to logger service
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WAR... | File :
Author : < >
Created : 24 Aug 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2014 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 Li... |
a061f800243d938ef84d4b696e9f351215fd5b99e5868ab281ffe64f5c1e92f9 | 0x0f0f0f/gobba | parsedriver.ml | open Lexing
open Errors
module I = Parser.MenhirInterpreter
let rec parse lexbuf (checkpoint : (Types.command list) I.checkpoint ) =
match checkpoint with
| I.InputNeeded _env ->
let token = Lexer.token lexbuf in
let startp = lexbuf.lex_start_p
and endp = lexbuf.lex_curr_p in
let checkpoin... | null | https://raw.githubusercontent.com/0x0f0f0f/gobba/61092207438fb102e36245c46c27a711b8f357cb/lib/parser/parsedriver.ml | ocaml | Close the file in case of any parsing errors.
Any errors when opening or closing a file are fatal. | open Lexing
open Errors
module I = Parser.MenhirInterpreter
let rec parse lexbuf (checkpoint : (Types.command list) I.checkpoint ) =
match checkpoint with
| I.InputNeeded _env ->
let token = Lexer.token lexbuf in
let startp = lexbuf.lex_start_p
and endp = lexbuf.lex_curr_p in
let checkpoin... |
bd6bd998595bb5f3436d724ea41102dbbc6af5e78811b4286b578288a3a1244e | darrenldl/ocaml-SeqBox | file_utils.ml | open Stdint
open Stream_file
exception File_access_error
let getmtime ~(filename:string) : float =
Unix.stat should also be usable on windows
* Reference :
* -ocaml/libunix.html ( Accessed on 2017 - 06 - 29 )
* See table shown at bottom , Unix.stat is not in the table
* Reference :
*... | null | https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/file_utils.ml | ocaml | open Stdint
open Stream_file
exception File_access_error
let getmtime ~(filename:string) : float =
Unix.stat should also be usable on windows
* Reference :
* -ocaml/libunix.html ( Accessed on 2017 - 06 - 29 )
* See table shown at bottom , Unix.stat is not in the table
* Reference :
*... | |
bbf785a4504111933ac9432a636a4724824aba7026a244dfa8a7f82a08b85d6b | pcalcado/rtfspec | run_rtfspec.clj | (ns run-rtfspec
(:gen-class
)
(:use rtfspec-domain rtfspec-prettyprint)
(:import (java.io File)))
(defn- path-from [file] (. file getAbsolutePath))
(defn- is-clojure-source? [file]
(and (. file isFile)
(re-find #"_spec\.clj$" (. file getName))))
(defn- target-type [target-path] (if (. (File. targe... | null | https://raw.githubusercontent.com/pcalcado/rtfspec/c733f504031635316fdc401ec371e8f03c01f380/src/clj/run_rtfspec.clj | clojure | (ns run-rtfspec
(:gen-class
)
(:use rtfspec-domain rtfspec-prettyprint)
(:import (java.io File)))
(defn- path-from [file] (. file getAbsolutePath))
(defn- is-clojure-source? [file]
(and (. file isFile)
(re-find #"_spec\.clj$" (. file getName))))
(defn- target-type [target-path] (if (. (File. targe... | |
ba5ea70a19ae0819a8167c2e7bc42464a1b61def0ccad01b0b2c5ae5ce15fdf0 | metaocaml/ber-metaocaml | constructor_declarations.ml | TEST
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
(* Allowed. *)
type t =
A of int
| B of bool
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/parsing/constructor_declarations.ml | ocaml | Allowed.
Allowed.
Allowed. | TEST
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
type t =
A of int
| B of bool
type u =
| A ... |
3e75c5c6ebcd040f9bc1f350d45c4f83d7f0c856e94e15a181cd4e4be1f034b4 | Workiva/eva | parser.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/query/dialect/pull/parser.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.query.dialect.pull.parser
(:require [eva.query.dialect.pull.error :as perr]
[eva.query.dialect.util :refer [ASTNode expression]]
[eva.query.dialect.pull.ast :as ast])
(:import... |
a7fff5d6f26ee922fa4968a74452116c77b98ce1adcf8017ab97ce0cfbf30a1c | hellonico/origami-dnn | places365.clj | (ns origami-dnn.demo.places365
(:require
[opencv4.dnn :as dnn]
[origami-dnn.draw :as d]
[opencv4.dnn.core :as origami-dnn]
[opencv4.core :refer [imread imwrite new-scalar]]
[origami-dnn.net.core :as c]))
(defn run-places365 [input output]
(let [ [net opts labels] (origami-dnn/read-net-from-repo "n... | null | https://raw.githubusercontent.com/hellonico/origami-dnn/f55a32d0d3d528fcf57aaac10cfb20c7998b380c/src/origami_dnn/demo/places365.clj | clojure | (-main) | (ns origami-dnn.demo.places365
(:require
[opencv4.dnn :as dnn]
[origami-dnn.draw :as d]
[opencv4.dnn.core :as origami-dnn]
[opencv4.core :refer [imread imwrite new-scalar]]
[origami-dnn.net.core :as c]))
(defn run-places365 [input output]
(let [ [net opts labels] (origami-dnn/read-net-from-repo "n... |
01990c561869301e78640f9c5908934690788fc551daa8c2d3da13369171571c | silky/quipper | TemplateOracle.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
# LANGUAGE NoMonomorphismRestriction #
-- | Thi... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/Algorithms/QLS/TemplateOracle.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
| This module contains an implementation of the oracle and its
| Auxiliary function.
| Auxiliary function.
| Auxiliary function. The... | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
# LANGUAGE NoMonomorphismRestriction #
automatic lifting to quantum circuits using Template Haskell .
module Algorithms.QLS.TemplateOracle where
import Data.Complex
import Libraries.Auxiliary
import Control.Monad
import QuipperLib.Ari... |
a678ab70e81e5a2766ebf46a674f249c2c44c436252de3eb28d12dbb68cb957f | ruhler/smten | STP.hs |
# LANGUAGE NoImplicitPrelude #
| This module provides the STP backend for smten .
module Smten.Symbolic.Solver.STP
# DEPRECATED " Use Smten . Search . Solver . STP instead " #
(stp) where
import Smten.Search.Solver.STP
| null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-stp/Smten/Symbolic/Solver/STP.hs | haskell |
# LANGUAGE NoImplicitPrelude #
| This module provides the STP backend for smten .
module Smten.Symbolic.Solver.STP
# DEPRECATED " Use Smten . Search . Solver . STP instead " #
(stp) where
import Smten.Search.Solver.STP
| |
ca3db4139cc7af33e243b41f468982a830f561ce466b3fdd674b84b53ef57ce1 | OCamlPro/digodoc | printer.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2020 OCamlPro SAS & Origin Labs SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/digodoc/8957a0965589429145f836b425aa5d0bf198d107/src/digodoc_lib/printer.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2020 OCamlPro SAS & Origin Labs SAS
Public License version 2.1 , with the special exception on linking
open EzCompat
open Type
let print state =
Printf.printf "OPAM_SWITCH_PREFIX=%s\n" state.opam_switch_prefix;
Printf.printf "\n=====================================... |
027e7f9ef12bd2070eb960340ff6b0d4c23c9aeae8cda6286ff28ec748a039f4 | roman/Haskell-componentm | Development.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Control.Monad.Component.Development
(
-- * Making 'ComponentM' values useful
ComponentM
, runComponentDevel
-- * Error Records
, ComponentError (..)
, Component... | null | https://raw.githubusercontent.com/roman/Haskell-componentm/6d96356fc394dbab001b85a30cfba8d922237185/componentm-devel/src/Control/Monad/Component/Development.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
* Making 'ComponentM' values useful
* Error Records
* 'ComponentM' tracing accessors
^ Name of your application (used for tracing purposes)
^ Builder of your application environment
^ Function where your main application ... | # LANGUAGE NoImplicitPrelude #
module Control.Monad.Component.Development
(
ComponentM
, runComponentDevel
, ComponentError (..)
, ComponentBuildError (..)
, ComponentEvent (..)
, Build
, buildElapsedTime
, buildFailure
, BuildResult
, toBuildList
)
where
import RIO
import ... |
364ee9178a57209fd45be34b83cf000b02744868dc386f257b38a79934e2b85a | rizo/snowflake-os | event.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , projet Cris... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/threads/event.mli | ocaml | *********************************************************************
Objective Caml
... | and , 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 GNU Library General Public License , with
$ I d : event.mli , v 1.10 2006 - 01 - 12 03:24... |
541bf4e36f6dd3b65fa36e9166856efef1547a63fbb092d5d8218d38495718f2 | jeko2000/tiny-routes | tiny-routes-test.lisp | ;;;; tiny-routes-test.lisp
(in-package :cl-user)
(uiop:define-package :tiny-routes-test
(:use :cl :tiny-routes :fiveam))
(in-package :tiny-routes-test)
(def-suite tiny-routes
:description "The top-level testing suite for tiny-routes.")
(defun run-tests ()
(run! 'tiny-routes))
(def-suite* request :in tiny-rout... | null | https://raw.githubusercontent.com/jeko2000/tiny-routes/aea7f27ba1ec801cf34f20073101fcc72866fd58/t/tiny-routes-test.lisp | lisp | tiny-routes-test.lisp | (in-package :cl-user)
(uiop:define-package :tiny-routes-test
(:use :cl :tiny-routes :fiveam))
(in-package :tiny-routes-test)
(def-suite tiny-routes
:description "The top-level testing suite for tiny-routes.")
(defun run-tests ()
(run! 'tiny-routes))
(def-suite* request :in tiny-routes)
(test request-test
(... |
d81a167a2c71cced9149969cdc70c52cdc7124683b7ad40d5f5cde2043ec6a25 | javgh/bridgewalker | FastForwardDB.hs | {-# LANGUAGE OverloadedStrings #-}
module Tools.FastForwardDB
( fastForwardDB
) where
import Control.Monad
import Network.BitcoinRPC.Events.MarkerAddresses
import Config
import DbUtils
fastForwardDB :: BridgewalkerHandles -> IO ()
fastForwardDB bwHandles =
let fbetHandle = bhFilteredBitcoinEventTaskHandl... | null | https://raw.githubusercontent.com/javgh/bridgewalker/ec5a62e6ebf36e52b98996a00a7d6042cc22ead7/src/Tools/FastForwardDB.hs | haskell | # LANGUAGE OverloadedStrings # | module Tools.FastForwardDB
( fastForwardDB
) where
import Control.Monad
import Network.BitcoinRPC.Events.MarkerAddresses
import Config
import DbUtils
fastForwardDB :: BridgewalkerHandles -> IO ()
fastForwardDB bwHandles =
let fbetHandle = bhFilteredBitcoinEventTaskHandle bwHandles
dbConn = bhDBCo... |
26c6a4a98a314d7925e54a8c35f3cea092a49fcf8a63b6809c097972b3e2b95e | heraldry/heraldicon | data.cljs | (ns heraldicon.frontend.component.entity.charge.data
(:require
[heraldicon.frontend.component.core :as component]
[heraldicon.frontend.element.core :as element]
[heraldicon.frontend.validation :as validation]))
(defn- form [context]
(element/elements
context
[:charge-type
:landscape?
:attitu... | null | https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/frontend/component/entity/charge/data.cljs | clojure | (ns heraldicon.frontend.component.entity.charge.data
(:require
[heraldicon.frontend.component.core :as component]
[heraldicon.frontend.element.core :as element]
[heraldicon.frontend.validation :as validation]))
(defn- form [context]
(element/elements
context
[:charge-type
:landscape?
:attitu... | |
f85b67b9405a4016ede6039d66c05ca57e6dcc2a6ae23fb4f600e5babf1a9dfe | passy/android-lint-summary | AndroidLintSummary.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
| Parsers and pretty printers for the ` lint-results.xml ` file format .
module AndroidLintSummary (
supportedL... | null | https://raw.githubusercontent.com/passy/android-lint-summary/8aaf7884f542176e43a6f6b4e51e6391fafd61e0/src/AndroidLintSummary.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE OverloadedStrings #
^ A formatter that doesn't output
anything.
^ A formatter that displays the errors
in descending errors with simple color
coding. | # LANGUAGE ExistentialQuantification #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
| Parsers and pretty printers for the ` lint-results.xml ` file format .
module AndroidLintSummary (
supportedLintFormatVersion
, AppEnv(..)
, AppOpts(..)
, LintSeverity(..)
, LintFormatter(..)
, L... |
71fcb8dd303ee657cf062a0fa0045ce02168f1896017581c8800b3414345f38e | 8c6794b6/guile-tjit | string-utils.scm | ;;;; (texinfo string-utils) -- text filling and wrapping
;;;;
Copyright ( C ) 2009 , 2013 Free Software Foundation , Inc.
Copyright ( C ) 2003
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published ... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/texinfo/string-utils.scm | scheme | (texinfo string-utils) -- text filling and wrapping
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
... | Copyright ( C ) 2009 , 2013 Free Software Foundation , Inc.
Copyright ( C ) 2003
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
functio... |
9c83dc35e1cea5e60e0667edba9f1b7a46302d42d4aeb423bc5237aa4ea6db46 | gedge-platform/gedge-platform | observer_cli_system.erl | %%% @author zhongwen <>
-module(observer_cli_system).
-include("observer_cli.hrl").
%% API
-export([start/1]).
-export([clean/1]).
-define(UTIL_ALLOCATORS, [
binary_alloc,
driver_alloc,
eheap_alloc,
ets_alloc,
fix_alloc,
ll_alloc,
sl_alloc,
std_alloc,
temp_alloc
]).
@doc List S... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/observer_cli/src/observer_cli_system.erl | erlang | @author zhongwen <>
API
Private
| -module(observer_cli_system).
-include("observer_cli.hrl").
-export([start/1]).
-export([clean/1]).
-define(UTIL_ALLOCATORS, [
binary_alloc,
driver_alloc,
eheap_alloc,
ets_alloc,
fix_alloc,
ll_alloc,
sl_alloc,
std_alloc,
temp_alloc
]).
@doc List System and Architecture , CPU 's... |
2d132a54a68bd3772733858ef433ba32f0dfeb5f328dd84df5337a22b882763b | joergen7/gruff | gruff_tests.erl | -module( gruff_tests ).
-include_lib( "eunit/include/eunit.hrl" ).
-define( GRUFF_NAME, gruff_test ).
%%====================================================================
%% Test definition
%%====================================================================
gruff_test_() ->
{foreach,
fun() -> ok end,
... | null | https://raw.githubusercontent.com/joergen7/gruff/47255f0a915d7190ead6820398aa1d5a6a1ad8fe/test/gruff_tests.erl | erlang | ====================================================================
Test definition
====================================================================
{<<"idle dead worker restarts">>,
fun idle_dead_worker_restarts/0},
====================================================================
Test implementation
=====... | -module( gruff_tests ).
-include_lib( "eunit/include/eunit.hrl" ).
-define( GRUFF_NAME, gruff_test ).
gruff_test_() ->
{foreach,
fun() -> ok end,
fun( _ ) ->
case whereis( ?GRUFF_NAME ) of
undefined -> ok;
Pid -> gruff:stop( Pid )
end
end,
[
{<<"golden path">>,
... |
81a6de8de2a6161b459be046416877f1e7ceb1d1ad84f50b446da0a32c78772b | cpeikert/Lol | KHPRFCPPMain.hs | |
Module : KHPRFCPPMain
Description : Example using with CPP .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Example using with CPP .
Module : KHPRFCPPMain
Description : Exampl... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol-cpp/examples/KHPRFCPPMain.hs | haskell | |
Module : KHPRFCPPMain
Description : Example using with CPP .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Example using with CPP .
Module : KHPRFCPPMain
Description : Exampl... | |
3b52c11c7df086e418fbb49c0e617512ce27abc27647181deceaa7c2fa901a16 | ucsd-progsys/dsolve | listfuns.ml | fun('a)
append ([], ys) = ys
| append (x :: xs, ys) = x :: append(xs, ys)
withtype {m:nat, n:nat} 'a list(m)*'a list(n)->'a list(m+n)
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/listfuns.ml | ocaml | fun('a)
append ([], ys) = ys
| append (x :: xs, ys) = x :: append(xs, ys)
withtype {m:nat, n:nat} 'a list(m)*'a list(n)->'a list(m+n)
| |
7ce815114c1373a137bf87e1aadf1c91c8e8fb4a5153796be1afa9d09e49ff93 | FreeProving/free-compiler | Module.hs | | This module contains functions for converting Haskell modules to Coq .
module FreeC.Backend.Coq.Converter.Module where
import Control.Monad.Extra ( concatMapM )
import Data.List.Extra ( concatUnzip )
import qualified Data.Set as ... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Backend/Coq/Converter/Module.hs | haskell | -----------------------------------------------------------------------------
Modules --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Declara... | | This module contains functions for converting Haskell modules to Coq .
module FreeC.Backend.Coq.Converter.Module where
import Control.Monad.Extra ( concatMapM )
import Data.List.Extra ( concatUnzip )
import qualified Data.Set as ... |
4e8c117597172484a791aae6f34261c7cd91fca5cf8cd2b89a708f1506d22d23 | ekoontz/dag-unify | dissoc_test.cljc | (ns dag_unify.dissoc-test
(:require #?(:clj [clojure.test :refer [deftest is]])
#?(:cljs [cljs.test :refer-macros [deftest is]])
[dag_unify.core :as u]
[dag_unify.dissoc :as d]
[dag_unify.serialization :as s]
#?(:clj [clojure.tools.logging :as log])
... | null | https://raw.githubusercontent.com/ekoontz/dag-unify/38599cc612042d8bec9c04fe515eccef9e03c8df/test/dag_unify/dissoc_test.cljc | clojure |
:d 44}
:d 44}
| (ns dag_unify.dissoc-test
(:require #?(:clj [clojure.test :refer [deftest is]])
#?(:cljs [cljs.test :refer-macros [deftest is]])
[dag_unify.core :as u]
[dag_unify.dissoc :as d]
[dag_unify.serialization :as s]
#?(:clj [clojure.tools.logging :as log])
... |
3fde13e92291e847d899515b44e897cfb002dc016b4a2fbbafba03adb764bec6 | bos/rwh | EitherIntFlexible.hs | {-- snippet Functor --}
# LANGUAGE FlexibleInstances #
instance Functor (Either Int) where
fmap _ (Left n) = Left n
fmap f (Right r) = Right (f r)
{-- /snippet Functor --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch11/EitherIntFlexible.hs | haskell | - snippet Functor -
- /snippet Functor - | # LANGUAGE FlexibleInstances #
instance Functor (Either Int) where
fmap _ (Left n) = Left n
fmap f (Right r) = Right (f r)
|
45ff0a375db44d9f7570fa73638a679f9853d1cbe2e826ba74cf1f340698e7f3 | well-typed/large-records | SimpleSQL.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances ... | null | https://raw.githubusercontent.com/well-typed/large-records/fb983aa136c2602499c2421323bd52b6a54b7c9a/beam-large-records/test/Test/Record/Beam/SimpleSQL.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE KindSignatures #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTION... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
... |
bf07a068890912f609ea3908f6187e8868dc1675bb67e2ba1dbbefb67aa8f029 | icicle-lang/icicle-ambiata | Check.hs | | Evaluate Avalanche programs
# LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
module Icicle.Avalanche.Check (
checkProgram
, checkStatement
, initialContext
, Context (..)
, ProgramError(..)
) where
import qualified Data.List as List
import qualified Data.Map as Map
import Data... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Avalanche/Check.hs | haskell | TODO:
- unique names: proper unique | | Evaluate Avalanche programs
# LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
module Icicle.Avalanche.Check (
checkProgram
, checkStatement
, initialContext
, Context (..)
, ProgramError(..)
) where
import qualified Data.List as List
import qualified Data.Map as Map
import Data... |
afc3cf3a72faefe0b81fa2799bb3a4ab321b42cd486638589a8602fef77fb227 | exoscale/clojure-kubernetes-client | v1_replication_controller_condition.clj | (ns clojure-kubernetes-client.specs.v1-replication-controller-condition
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-replication-controller-condition-data v1-replication-controller-condition)
(def v1-replication-controller-condi... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_replication_controller_condition.clj | clojure | (ns clojure-kubernetes-client.specs.v1-replication-controller-condition
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-replication-controller-condition-data v1-replication-controller-condition)
(def v1-replication-controller-condi... | |
eefdba9bb5735610f7acc3ec944afa6d504d4b4fe669d73690fe5d5b71e1477d | Metaxal/bazaar | slideshow-toc.rkt | #lang slideshow
Copyright ( C ) , 2010 - 2013
GNU Lesser General Public Licence ( )
(require "../slideshow-toc.rkt")
; Some layout for the toc:
(define old-slide-assembler (current-slide-assembler))
(current-slide-assembler
(λ(str i p)
(lt-superimpose
(old-slide-assembler str i p)
(parameterize [(c... | null | https://raw.githubusercontent.com/Metaxal/bazaar/8432d3c5398225a4bfb5ed5c25a1beffa06409ec/slideshow/examples/slideshow-toc.rkt | racket | Some layout for the toc:
else
Display a slide automatically each time a section/slide is called
remove the automatic section slides
adding automatic subsection slides | #lang slideshow
Copyright ( C ) , 2010 - 2013
GNU Lesser General Public Licence ( )
(require "../slideshow-toc.rkt")
(define old-slide-assembler (current-slide-assembler))
(current-slide-assembler
(λ(str i p)
(lt-superimpose
(old-slide-assembler str i p)
(parameterize [(current-font-size 12)]
... |
7b9188197efd527f9d22f26adfc7d49ccb8b40e4743be693f89210e9fa1e42c8 | LaurentMazare/btc-ocaml | btc.ml | corebuild -pkgs async test.native
dig seed.bitcoin.sipa.be
open Core.Std
open Async.Std
let dns_server = "8.8.8.8"
let dns_domains =
[ "dnsseed.bluematt.me"
]
let default_rpc_port = 12314
let start_server =
Command.async_basic ~summary:"start the btc-ocaml server"
Command.Spec.(
empty
+> f... | null | https://raw.githubusercontent.com/LaurentMazare/btc-ocaml/0616d7853d807e50dc9ff83c6783b80f71640da2/btc.ml | ocaml | corebuild -pkgs async test.native
dig seed.bitcoin.sipa.be
open Core.Std
open Async.Std
let dns_server = "8.8.8.8"
let dns_domains =
[ "dnsseed.bluematt.me"
]
let default_rpc_port = 12314
let start_server =
Command.async_basic ~summary:"start the btc-ocaml server"
Command.Spec.(
empty
+> f... | |
972952d854ceb80bc780e1292f6e54391297184650febd9ad972ac45164c10b4 | cloudant-labs/dreyfus | dreyfus_fabric_group1.erl | 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 under the License is distributed on an " AS ... | null | https://raw.githubusercontent.com/cloudant-labs/dreyfus/243d451a1f8c941bdfbeceb983419cba8e540c0b/src/dreyfus_fabric_group1.erl | erlang | 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 limitations u... | 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
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(dreyfus_fabric_group1).
-include("dreyfus.hrl").
-include_lib("mem3/include/mem3... |
3c8f93bb4c0787aa225daee107b709bc46bb448552a3b8eef7b0daaf94781d36 | acieroid/scala-am | family-budget.scm | (define familieboom '(jan (piet (frans (tom)
(roel))
(mie))
(bram (inge (bert (ina)
(ilse))
(bart))
(iris))
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/family-budget.scm | scheme | (define familieboom '(jan (piet (frans (tom)
(roel))
(mie))
(bram (inge (bert (ina)
(ilse))
(bart))
(iris))
... | |
7293aeed05cbcc5ef2a003dc45b11a147dddef3937a1d7518615b8aee66f950a | whamtet/cljs-pdfkit | test.cljs | (ns cljs-pdfkit.test
(:require
[cljs-pdfkit.core :as core]
[redlobster.stream :as stream]
[cljs-pdfkit.optimize-dom :as optimize-dom]
[clojure.string :as string]
cljs.nodejs
))
;;generate test pdf
(cljs.nodejs/enable-util-print!)
(defn main []
(println "in main"))
(set! *main-cli-fn* main)
;;n... | null | https://raw.githubusercontent.com/whamtet/cljs-pdfkit/b0e0b9c18df2442ffb0be049107ce3aef9f92037/src/cljs_pdfkit/test.cljs | clojure | generate test pdf
needed for testing
" | (ns cljs-pdfkit.test
(:require
[cljs-pdfkit.core :as core]
[redlobster.stream :as stream]
[cljs-pdfkit.optimize-dom :as optimize-dom]
[clojure.string :as string]
cljs.nodejs
))
(cljs.nodejs/enable-util-print!)
(defn main []
(println "in main"))
(set! *main-cli-fn* main)
(defn test-pdf [form]
... |
21caa1add4066be0c1860717e788b5c40c4e76b00d5a38876792084102763a9c | spell-music/csound-expression | Fx.hs | {-# Language FlexibleContexts #-}
-- | Effects
module Csound.Air.Fx(
*
reverbsc1, rever1, rever2, reverTime,
smallRoom, smallHall, largeHall, magicCave,
smallRoom2, smallHall2, largeHall2, magicCave2,
room, chamber, hall, cave,
-- ** Impulse Responce convolution reverbs
--
| Be careful wi... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/src/Csound/Air/Fx.hs | haskell | # Language FlexibleContexts #
| Effects
** Impulse Responce convolution reverbs
* Delays
** Tape echo
* Distortion
* Chorus
solinaChorus, testSolinaChorus,
* Flanger
* Phase
* Effects with unit parameters
* Eq
* Misc
| Mono version of the cool reverberation opcode reverbsc.
-----------------------------... | module Csound.Air.Fx(
*
reverbsc1, rever1, rever2, reverTime,
smallRoom, smallHall, largeHall, magicCave,
smallRoom2, smallHall2, largeHall2, magicCave2,
room, chamber, hall, cave,
| Be careful with volumes . Some IRs can require scaling with really small coefficients like 0.01 .
monoIR, ster... |
4336fbe75fd5cb995e78dcf0127651f7f591281e0b253e1433802eacbc3b7507 | vikram/lisplibraries | types.lisp | (in-package :trees)
;;; tree nodes
Structures give better performance than CLOS .
(defstruct (tree-node
(:conc-name)
(:constructor make-tree-node (datum))
(:copier nil))
(left nil :type (or null tree-node))
(right nil :type (or null tree-node))
(rank 1 :type fixnum)
... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/trees_0.11/types.lisp | lisp | tree nodes
trees | (in-package :trees)
Structures give better performance than CLOS .
(defstruct (tree-node
(:conc-name)
(:constructor make-tree-node (datum))
(:copier nil))
(left nil :type (or null tree-node))
(right nil :type (or null tree-node))
(rank 1 :type fixnum)
(datum nil))
... |
e3dbd2a027b1cfecd35769d357e7bf06197b90dad1da75bcc2fec36e13e2b05b | vonli/Ext2-for-movitz | strings.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2001 - 2005 ,
Department of Computer Science , University of Tromso , Norway .
;;;;
;;;; For distribution policy, see the accompanying file COPYING.
;;;;
;;;; Filename: strings.lisp
;;;; Description: Strin... | null | https://raw.githubusercontent.com/vonli/Ext2-for-movitz/81b6f8e165de3e1ea9cc7d2035b9259af83a6d26/losp/muerte/strings.lisp | lisp | ------------------------------------------------------------------
For distribution policy, see the accompanying file COPYING.
Filename: strings.lisp
Description: String functions.
------------------------------------------------------------------ | Copyright ( C ) 2001 - 2005 ,
Department of Computer Science , University of Tromso , Norway .
Author : < >
Created at : Fri Oct 19 17:05:25 2001
$ I d : strings.lisp , v 1.3 2005/06/12 20:01:49 ffjeld Exp $
(require :muerte/basic-macros)
(require :muerte/arrays)
(require :muerte/charac... |
8df063a1602f6fa0b9f9d280a17423195f236ed309f366435f03a3087115c5a2 | facebookarchive/lex-pass | ghci.hs | for easy interactive testing , start ghci in src/ and then do : l
import Ast
import Control.Applicative
import Data.Tok
import LexPassUtil
import Text.Parsec
| null | https://raw.githubusercontent.com/facebookarchive/lex-pass/dcfa9560a95f2c1344e15493dabcc1645b1ca5e8/src/ghci.hs | haskell | for easy interactive testing , start ghci in src/ and then do : l
import Ast
import Control.Applicative
import Data.Tok
import LexPassUtil
import Text.Parsec
| |
ce4ce12b95f772f6af2a43a0ffbdf0cbfc68876c7af4af138c6037f6068cf095 | fabiodomingues/clj-depend | core_test.clj | (ns sample.core-test
(:require [clojure.test :refer :all]
[sample.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/fabiodomingues/clj-depend/3f4564cdb62816e8571a8dc7f11bc0f50e112af5/sample/test/sample/core_test.clj | clojure | (ns sample.core-test
(:require [clojure.test :refer :all]
[sample.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
eab1d2ca7b29afc37af2d04ec40c417122b1f243f87d969f34d9c2de1f04d7f5 | phantomics/seed | form.mode-text.lisp | form.mode-text.lisp
(in-package #:seed.ui-model.react)
(defpsmacro cl (&rest items)
`(chain console (log ,@items)))
(specify-components
text-view-mode
(text-view
(:get-initial-state
(lambda ()
(chain j-query (extend (create point #(0 0)
point-attrs (create value nil delta nil)
meta (c... | null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.ui-spec.form.mode-text/form.mode-text.lisp | lisp | (if (@ self props context trace-category)
(chain self props context methods (register-branch-path (@ self props context trace-category)
(@ self props data id)
(@ state context path))))
:set-confirmed-value
(lambda (value)
(chain this (set-state (create confirmed-value value))))
(cl :n... | form.mode-text.lisp
(in-package #:seed.ui-model.react)
(defpsmacro cl (&rest items)
`(chain console (log ,@items)))
(specify-components
text-view-mode
(text-view
(:get-initial-state
(lambda ()
(chain j-query (extend (create point #(0 0)
point-attrs (create value nil delta nil)
meta (c... |
20ecb3d23e66433764ab78b77c552d2339a2a8cf06b737ba03712fe3595e45bd | geneweb/geneweb | btree.ml | This code is directly copied from ( Map module )
with t
with t*)
(**************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/gwdb-legacy/btree.ml | ocaml | ************************************************************************
OCaml
... | This code is directly copied from ( Map module )
with t
with t*)
, projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module type OrderedType = s... |
e373872e1142c1237e2dd4cff7d80ac40bac3ae01409ddb5b6b0f2008eaa7f64 | erlyvideo/udpts | udpts_sup.erl | @author < > [ ]
2010
%%% @doc Worker module for plugin example
%%% @reference See <a href="/" target="_top">/</a> for more information
%%% @end
%%%
%%%
%%%---------------------------------------------------------------------------------------
-module(udpts_sup).
-author('Max Lapshin <>').
-inc... | null | https://raw.githubusercontent.com/erlyvideo/udpts/70ed6c43969369d6f094cca031c422264fb4d72c/src/udpts_sup.erl | erlang | @doc Worker module for plugin example
@reference See <a href="/" target="_top">/</a> for more information
@end
---------------------------------------------------------------------------------------
Id = internal id
Restart = permanent | transient | temporary
Shutdown = brutal_kill | int() >= 0 |... | @author < > [ ]
2010
-module(udpts_sup).
-author('Max Lapshin <>').
-include("udpts.hrl").
-behaviour(supervisor).
-export([init/1,start_link/0]).
-export([start_reader/3, stop_reader/1, start_http_listener/1, stop_http_listener/1, start_http_worker/0]).
StartFun = { M , F , A }
}).
-define(SIMP... |
a52ee3e71dced290754e073b602e409d2bff8be696e3d485095a1a7bb61e1404 | pveber/biotk | dataframe.mli | type t
type column =
| Ints of int array
| Int_opts of int option array
| Floats of float array
| Float_opts of float option array
| Strings of string array
| String_opts of string option array
val nrows : t -> int
val ncols : t -> int
val get_col : t -> int -> column option
val get_col_by_name : t -> s... | null | https://raw.githubusercontent.com/pveber/biotk/f39250ca6d79c41b647d88fc5d120e4e66bd5496/lib/dataframe.mli | ocaml | type t
type column =
| Ints of int array
| Int_opts of int option array
| Floats of float array
| Float_opts of float option array
| Strings of string array
| String_opts of string option array
val nrows : t -> int
val ncols : t -> int
val get_col : t -> int -> column option
val get_col_by_name : t -> s... | |
c73faaf3483b558569eed568f4c247282421d4d60930776116767f5a9034b5f8 | fold-lang/pratt | Javascript.ml |
open Proto
open Astring
module Stream = Pratt.Stream
module L = Javascript_lexer
module P = Pratt.Make(L.Token)
let (>>=) = P.(>>=)
let return = P.return
let separated_by sep p =
p >>= fun x ->
P.many (sep >>= fun () -> p) >>= fun xs ->
return (x :: xs)
let pair ~sep p1 p2 =
p1 >>= fun x ->
sep >>= fun (... | null | https://raw.githubusercontent.com/fold-lang/pratt/8a8d2fd439e5e30b5ae587bd71e810c8bc6adf42/examples/Javascript.ml | ocaml | XXX: WTF?
TODO: Add context: "while parsing `var` expected x but got y".
P.null (`Keyword "var") (fun g -> P.consume (`Keyword "varx") >>= fun () -> return (`Int 42));
It is more important to understand what is *NOT* valid than what is valid. |
open Proto
open Astring
module Stream = Pratt.Stream
module L = Javascript_lexer
module P = Pratt.Make(L.Token)
let (>>=) = P.(>>=)
let return = P.return
let separated_by sep p =
p >>= fun x ->
P.many (sep >>= fun () -> p) >>= fun xs ->
return (x :: xs)
let pair ~sep p1 p2 =
p1 >>= fun x ->
sep >>= fun (... |
2582b6dc736b2ff1de118ae9a630b77c3866882f50b10833ee6555e52e8e20e5 | haskell-suite/haskell-tc | AbsAp2.hs | module AbsAp2 where
undefined x = undefined x
test a = undefined a
| null | https://raw.githubusercontent.com/haskell-suite/haskell-tc/abf5e3cc624e0095cae14c3c1c695b76ea8ffcb9/tests/AbsAp2.hs | haskell | module AbsAp2 where
undefined x = undefined x
test a = undefined a
| |
eebfa260bd2e9f3a62051b9b9251d642b36021ae3836c56f662c6ccce25adf83 | tweag/ormolu | comment-style-transform-out.hs | -- |
-- Module: Data.Aeson.TH
Copyright : ( c ) 2011 - 2016
( c ) 2011 MailRank , Inc.
License : BSD3
-- Stability: experimental
-- Portability: portable
module Main where
-- |
--
-- Here is a snippet:
--
-- @
-- x = y + 2
-- @
x = y + 2
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/other/comment-style-transform-out.hs | haskell | |
Module: Data.Aeson.TH
Stability: experimental
Portability: portable
|
Here is a snippet:
@
x = y + 2
@ | Copyright : ( c ) 2011 - 2016
( c ) 2011 MailRank , Inc.
License : BSD3
module Main where
x = y + 2
|
cbddd0a4fe23d48609caf7b62c5c687935e881de5fc1adcf08818835d3d8473f | derui/okeyfum | evaluator_test.ml | open Okeyfum
module GT = Okeyfum_c_type_description.Types (Okeyfum_c.Okeyfum_c_generated_types)
let tests =
[
( "OKeyfum sequence evaluator should return key event",
`Quick,
fun () ->
match Okeyfum_config.load "./config.okf" with
| Some config ->
let env = Okeyfum_environm... | null | https://raw.githubusercontent.com/derui/okeyfum/bc47c0bea35c00d720dcde0200256a3f2e1312bd/test/evaluator_test.ml | ocaml | open Okeyfum
module GT = Okeyfum_c_type_description.Types (Okeyfum_c.Okeyfum_c_generated_types)
let tests =
[
( "OKeyfum sequence evaluator should return key event",
`Quick,
fun () ->
match Okeyfum_config.load "./config.okf" with
| Some config ->
let env = Okeyfum_environm... | |
26dc79d45f12139a425a08fa82805fea861fb666d0a25c7d33146fb2c53664b9 | TrustInSoft/tis-interpreter | cil2cfg.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/cil2cfg.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
389a3f261f999df881ec171d92b9d851a34b284a30721a6ed0ce2f025a4f2f8f | mflatt/shrubbery-rhombus-0 | expression-syntax.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
enforest/transformer-result
"srcloc.rkt"
"tail.rkt")
"name-root.rkt"
"syntax.rkt"
"expression.rkt"
"parse.rkt"
"call-result-key... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/b6ee40b64b19623d5a8c1ee735378761fd25110a/rhombus/private/expression-syntax.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse
enforest/transformer-result
"srcloc.rkt"
"tail.rkt")
"name-root.rkt"
"syntax.rkt"
"expression.rkt"
"parse.rkt"
"call-result-key... | |
b479cf5188400222b5056158c80060bb46354c05a40347a8ee2d5b8d18e64eec | haskell-works/avro | Logical.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE NumDecimals #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StandaloneDeriving #... | null | https://raw.githubusercontent.com/haskell-works/avro/cee0869ce9e52db8942deb86aa66dd7355508d3c/test/Avro/Data/Logical.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving # | # LANGUAGE DeriveGeneric #
# LANGUAGE NumDecimals #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StrictData #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
module Avro.Data.Logical
where
import Data.Avro.Internal.Time (microsToDiffTime, ... |
324bd1f51f4a9d3ab5af14172c90e67aa55a82ccc4d8179bea54c12dbcb2f64b | zotonic/zotonic | z_module_indexer.erl | @author < >
2009 - 2018
%%
@doc Implements the module extension mechanisms for scomps , templates , actions etc . Scans all active modules
for scomps ( etc ) and maintains lookup lists for when the system tries to find a scomp ( etc ) .
Copyright 2009 - 2018
%%
Licensed under the Apache License ,... | null | https://raw.githubusercontent.com/zotonic/zotonic/0539ab312ae3669167c1d715bb382dc7a1db9819/apps/zotonic_core/src/support/z_module_indexer.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | @author < >
2009 - 2018
@doc Implements the module extension mechanisms for scomps , templates , actions etc . Scans all active modules
for scomps ( etc ) and maintains lookup lists for when the system tries to find a scomp ( etc ) .
Copyright 2009 - 2018
Licensed under the Apache License , Versi... |
36d32b21c8b9c58fe5f71b606d205ac95e042db05e5bc2e5700ba0072895fe90 | elaforge/karya | Progress.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Shake.Progress (report) where
import qualified Control.Concurrent as Concurrent
import qualified Development.Shake as Shake
import qualified System.Console.Regions as Regions
impor... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Shake/Progress.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2013
module Shake.Progress (report) where
import qualified Control.Concurrent as Concurrent
import qualified Development.Shake as Shake
import qualified System.Console.Regions as Regions
import qualified Text.Printf as Printf
import Control.Monad
report :: IO Shake.Progress -> IO ()
report g... |
90236145c3453cc326d05a624d363993d1b04e84f00304a275ba9cc8aaf15bd3 | DanielG/ghc-mod | A1.hs | module A1 where
psogduapzs9
import B
lx,vLMCks
| null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/data/home-module-graph/errors/A1.hs | haskell | module A1 where
psogduapzs9
import B
lx,vLMCks
| |
fa3e8b856558fb9afebee86913e574b68769aff4f337c31b443146b451eec2aa | janestreet/base | fieldslib.ml | (** This module is for use by ppx_fields_conv, and is thus not in the interface of
Base. *)
module Field = Field
| null | https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/src/fieldslib.ml | ocaml | * This module is for use by ppx_fields_conv, and is thus not in the interface of
Base. | module Field = Field
|
66946f077174c99aa5eb0a419885808e031bbbd36a075b0fb9f849f30b4ad427 | y2q-actionman/jp-numeral | jp-numeral.lisp | -*- coding : utf-8 ; -*-
(in-package :jp-numeral)
;;; Conditions
(define-condition no-power-char-error (error)
())
(define-condition not-formattable-error (error)
())
;;; Accessors to the jp-numeral-table.
(defun style-to-index (style)
(ecase style
(:normal +TABLE-NORMAL-INDEX+)
(:formal +TABLE-F... | null | https://raw.githubusercontent.com/y2q-actionman/jp-numeral/60cce7ac32b940dd6822d097cda569ec08f0e070/src/jp-numeral.lisp | lisp | -*-
Conditions
Accessors to the jp-numeral-table.
Writers
If they are not same type, dispatch the object again.
positional notation
dot, 0
width is required for working 'scale'.
(If both width and digits-after-dot are nil, it does not work..)
may be minus..
radix point is always put.
normal notation
int pa... |
(in-package :jp-numeral)
(define-condition no-power-char-error (error)
())
(define-condition not-formattable-error (error)
())
(defun style-to-index (style)
(ecase style
(:normal +TABLE-NORMAL-INDEX+)
(:formal +TABLE-FORMAL-INDEX+)
(:old +TABLE-OLD-INDEX+)
(:positional +TABLE-POSITIONAL-IND... |
a16e44a65ab9f819729da211da3288b899652468da6c8c243737dfa5c364416c | racket/racket7 | setup-cmdline.rkt | #lang racket/base
;; Command-line parsing is in its own module because it has to be used
both in setup.ss ( pre - zo , pre - cm ) and setup-go.rkt ( use zos and ) .
;; This means that command lines will be parsed twice.
(require racket/cmdline
raco/command-name
pkg/name
"private/command... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/setup/setup-cmdline.rkt | racket | Command-line parsing is in its own module because it has to be used
This means that command lines will be parsed twice.
- An assoc list mapping flag symbols to booleans
(nearly all symbols correspond to parameter names
in setup-go.rkt)
- A list of specific collections
- A list of archives
Beware of ... | #lang racket/base
both in setup.ss ( pre - zo , pre - cm ) and setup-go.rkt ( use zos and ) .
(require racket/cmdline
raco/command-name
pkg/name
"private/command-name.rkt")
(provide parse-cmdline)
The result of parse - cmdline is three lists :
(define (parse-cmdline argv)
(defin... |
218791dcfdf4adfcfabe33bb3bb4fb8229c8ffc4ffaecf8898f30d452182a302 | ocaml-sf/learn-ocaml-corpus | test.ml | open Report
open Test_lib
let corpus =
[| "alpha" ; "bowl" ; "clown" ; "diddy" ; "elephant" |]
let sample_string () =
Array.unsafe_get corpus (Random.int (Array.length corpus))
let rec destutter = function
| ([] | [_]) as l -> l
| x :: (y :: _ as l) when x = y -> destutter l
| x :: l -> x :: destutter l
... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week2/seq3/ex1/test.ml | ocaml | open Report
open Test_lib
let corpus =
[| "alpha" ; "bowl" ; "clown" ; "diddy" ; "elephant" |]
let sample_string () =
Array.unsafe_get corpus (Random.int (Array.length corpus))
let rec destutter = function
| ([] | [_]) as l -> l
| x :: (y :: _ as l) when x = y -> destutter l
| x :: l -> x :: destutter l
... | |
5ce947bdaa8f9d910f3b573b8fad80b964b501f5309e78815ea8cef129fe0a76 | diku-dk/futhark | PositionMapping.hs | -- | Provide mapping between position in stale content and current.
module Futhark.LSP.PositionMapping
( mappingFromDiff,
PositionMapping,
toStalePos,
toCurrentLoc,
StaleFile (..),
)
where
import Data.Algorithm.Diff (Diff, PolyDiff (Both, First, Second), getDiff)
import Data.Bifunctor (Bifunctor (b... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/LSP/PositionMapping.hs | haskell | | Provide mapping between position in stale content and current.
| A mapping between current file content and the stale (last successful compiled) file content.
Currently, only supports entire line mapping,
more detailed mapping might be achieved via referring to haskell-language-server@efb4b94
| The mapping from ... | module Futhark.LSP.PositionMapping
( mappingFromDiff,
PositionMapping,
toStalePos,
toCurrentLoc,
StaleFile (..),
)
where
import Data.Algorithm.Diff (Diff, PolyDiff (Both, First, Second), getDiff)
import Data.Bifunctor (Bifunctor (bimap, first, second))
import Data.Text qualified as T
import Data.Ve... |
e054c576664b2941ee11d2f3e8163e9dca2ec7a45a8c0cba22c17efa0b2536e6 | bluddy/rails | bridge.ml |
type t =
| Wood
| Iron
| Stone
[@@deriving eq, hash, yojson]
| null | https://raw.githubusercontent.com/bluddy/rails/b2a8dd700fdcbdf36984ba50eb148000c1f0b32f/bin/backend/bridge.ml | ocaml |
type t =
| Wood
| Iron
| Stone
[@@deriving eq, hash, yojson]
| |
12ae4f377c8be1120c62373d75e6b59c38386c027a45775319381f31294bbc87 | unbounce/yopa | integration_tests.clj | (ns com.unbounce.yopa.integration-tests
(:require [com.unbounce.yopa.core :as yopa]
[com.unbounce.yopa.aws-client :as aws]
[com.unbounce.yopa.config :as config]
[amazonica.aws.sns :as sns]
[amazonica.aws.sqs :as sqs]
[amazonica.aws.s3 :as s3]
[ba... | null | https://raw.githubusercontent.com/unbounce/yopa/794e72ddcd9fcf7b44b07d115480b36c96d5e7fd/test/com/unbounce/yopa/integration_tests.clj | clojure | TODO test Verify Subscription | (ns com.unbounce.yopa.integration-tests
(:require [com.unbounce.yopa.core :as yopa]
[com.unbounce.yopa.aws-client :as aws]
[com.unbounce.yopa.config :as config]
[amazonica.aws.sns :as sns]
[amazonica.aws.sqs :as sqs]
[amazonica.aws.s3 :as s3]
[ba... |
9c14311f097c2256cd466aebcf825abb5dd1b37ae9e82c559b3e0baca1a35964 | ijvcms/chuanqi_dev | restore_client_tool.erl | %%%-------------------------------------------------------------------
%%% @author qhb
( C ) 2017 , < COMPANY >
%%% @doc
%%% 客户端工具类
%%% @end
Created : 04 . 三月 2017 上午9:37
%%%-------------------------------------------------------------------
-module(restore_client_tool).
-include("common.hrl").
-include("cache.hrl... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/tool/restore/restore_client_tool.erl | erlang | -------------------------------------------------------------------
@author qhb
@doc
客户端工具类
@end
-------------------------------------------------------------------
API
------------------------------------------------
替换指定物品
替换指定物品
替换指定物品
更新特殊属性
add
[] ->
skip;
_ ->
Remote = get_remote(TargetServerId... | ( C ) 2017 , < COMPANY >
Created : 04 . 三月 2017 上午9:37
-module(restore_client_tool).
-include("common.hrl").
-include("cache.hrl").
-compile([export_all]).
测试用记是否存在
validate_player(PlayerId, TargetServerId, SrcServerId) ->
Pool = get_pool(SrcServerId),
case source_db:select_player(Pool, PlayerId) of
#db_pla... |
8160371136faa67decb3928d3435d68d0178f245184bb12b1732d795306d5771 | digital-asset/ghc | Type.hs | -----------------------------------------------------------------------------
-- |
Module : . . . Type
Copyright : ( c ) 2014 - 2018
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
Data types for storing basic Haskell package metadata , such as package nam... | null | https://raw.githubusercontent.com/digital-asset/ghc/b166432c45a54eaeefb9bcb61523b293da812825/hadrian/src/Hadrian/Haskell/Cabal/Type.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
the resolution of package configuration flags and associated conditionals,
which are build context specific. Note that '... | Module : . . . Type
Copyright : ( c ) 2014 - 2018
License : MIT ( see the file LICENSE )
Data types for storing basic Haskell package metadata , such as package name ,
version and dependencies , extracted from a Cabal file .
module Hadrian.Haskell.Cabal.Type where
import Development.Shake.Cla... |
2849b4e99065f1bf8c6c39a4d850e347138ebb5b5b98d524a8dea8e5a9522381 | clj-kondo/clj-kondo | linters.clj | (ns clj-kondo.impl.linters
{:no-doc true}
(:require
[clj-kondo.impl.analysis :as analysis]
[clj-kondo.impl.config :as config]
[clj-kondo.impl.findings :as findings]
[clj-kondo.impl.namespace :as namespace]
[clj-kondo.impl.types :as types]
[clj-kondo.impl.types.utils :as tu]
[clj-kondo.impl.util... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/ed087cba13c17907b66b7f318c16cc7cf32c4e24/src/clj_kondo/impl/linters.clj | clojure | (prn :from-cache from-cache)
_ (clojure.pprint/pprint (dissoc call :config))
_ (prn :used (:used-namespaces idacs))
the var could be :refer-all'ed, in this case unresolved? is true
we can determine if the call was made to another
file by looking at the base-lang (in case of
CLJS macro imports or the top-level na... | (ns clj-kondo.impl.linters
{:no-doc true}
(:require
[clj-kondo.impl.analysis :as analysis]
[clj-kondo.impl.config :as config]
[clj-kondo.impl.findings :as findings]
[clj-kondo.impl.namespace :as namespace]
[clj-kondo.impl.types :as types]
[clj-kondo.impl.types.utils :as tu]
[clj-kondo.impl.util... |
de4ea6151535944c1639b5f555f5eed1c54f2faadc0225bd259bab9675697995 | h3ct0rjs/VideoJuego | MemoriaFinal.rkt | #lang racket
;***************************************************************************
Proyecto Final de Programacion 1 . UTP 2015 - 2 .
;***************************************************************************
(require (lib "graphics.ss" "graphics"))(open-graphics)
ventanas
(define ventana (open-viewport... | null | https://raw.githubusercontent.com/h3ct0rjs/VideoJuego/70e33d8f9195e87275f0b185ef8e4ecf2c33bfbc/Juego%20Memoria/MemoriaFinal.rkt | racket | ***************************************************************************
***************************************************************************
Vector con aleatorios
Determina el numero de click | #lang racket
Proyecto Final de Programacion 1 . UTP 2015 - 2 .
(require (lib "graphics.ss" "graphics"))(open-graphics)
ventanas
(define ventana (open-viewport "Memoria" 630 700))
(define fondo (open-pixmap "Memoria" 630 700))
((draw-pixmap fondo) "Imagenes/Fondo1.jpg" (make-posn 0 0))
((draw-pixmap fondo) ... |
facd31b71d146851bc5d87fe292bc689f637c122171e622bc2211193f6b39b7d | dwango/fialyzer | solver.ml | open Type
module List = Base.List
module Map = Base.Map
module String = Base.String
module Result = Base.Result
module Option = Base.Option
module C = Constraint
open Common
type solution = Type.t Map.M(Type_variable).t
[@@deriving sexp_of]
let string_of_sol sol =
Map.to_alist sol
|> List.map ~f:(fun (k,v) -> (!%... | null | https://raw.githubusercontent.com/dwango/fialyzer/3c4b4fc2dacf84008910135bfef16e4ce79f9c89/lib/solver.ml | ocaml | mapping to `any()` from variables that have not yet appeared in `sol`
TODO:??? | open Type
module List = Base.List
module Map = Base.Map
module String = Base.String
module Result = Base.Result
module Option = Base.Option
module C = Constraint
open Common
type solution = Type.t Map.M(Type_variable).t
[@@deriving sexp_of]
let string_of_sol sol =
Map.to_alist sol
|> List.map ~f:(fun (k,v) -> (!%... |
24913438ef13e2e5a20de412561ef88147fa28197972621c36abb3c7def6539f | euccastro/gambit-SDL2 | c-test-ffi.scm | (declare (debug) (debug-environments) (not proper-tail-calls))
; Test that ffi-macro.scm behaves well if included more than once
( asserted below definition of |assert| due to namespace requirements . )
(include "ffi-macro.scm")
(define test#old ffi#references)
(table-set! test#old 'test-key 'test-value)
(include "... | null | https://raw.githubusercontent.com/euccastro/gambit-SDL2/d8ec6e0a5be4177db56f1d4a98285f4942f21663/c-test-ffi.scm | scheme | Test that ffi-macro.scm behaves well if included more than once
} uint32pair;
} u32pp;
} vec2;
} segment;
segment s;} vecseg;
} vec2_and_pointer;
vec2_node* next;};
| (declare (debug) (debug-environments) (not proper-tail-calls))
( asserted below definition of |assert| due to namespace requirements . )
(include "ffi-macro.scm")
(define test#old ffi#references)
(table-set! test#old 'test-key 'test-value)
(include "ffi-macro.scm")
(define-macro (assert expr)
`(if (not ,expr)
... |
68d1f4bf5a55dadce4ede48b3769d56bbea32ff1528a92cfa3226556802d3a07 | themetaschemer/malt | test-E-print.rkt | (module+ test
(require rackunit)
(require "../tensors.rkt")
(define long-tensor
(tensor 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
(define dualized-long-tensor
(dual long-tensor end-of-chain))
(define deep-tensor
(tensor long-tensor long-tensor long-tensor long-tensor long-tensor
long-te... | null | https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/flat-tensors/autodiff/test/test-E-print.rkt | racket | (module+ test
(require rackunit)
(require "../tensors.rkt")
(define long-tensor
(tensor 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
(define dualized-long-tensor
(dual long-tensor end-of-chain))
(define deep-tensor
(tensor long-tensor long-tensor long-tensor long-tensor long-tensor
long-te... | |
4fd66997039d99555098a25eb79dd5617e556bca9de5a320569b0f0924956084 | ghosthamlet/algorithm-data-structure | min_heap.clj | (ns algorithm-data-structure.data-structures.min-heap
"-algorithms/tree/master/src/data-structures/heap"
(:require [algorithm-data-structure.comparator :refer :all]
[algorithm-data-structure.util :refer :all]))
;; XXX: dynamic bind default compare to remove pass compare everywhere?
(def ^:dynamic *comp... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/data_structures/min_heap.clj | clojure | XXX: dynamic bind default compare to remove pass compare everywhere?
TODO: use defrecored MinHeap, implement nth count...
(do (prn (cont self))) | (ns algorithm-data-structure.data-structures.min-heap
"-algorithms/tree/master/src/data-structures/heap"
(:require [algorithm-data-structure.comparator :refer :all]
[algorithm-data-structure.util :refer :all]))
(def ^:dynamic *compare*)
(defn create []
{:heap-container []})
(defn- cont [self]
(:h... |
96703540e36a6cb8aedbf4975a56a41ab1a58ea7e69cf051fbe94d08bf01a9ef | thriqon/pandoc-plantuml-diagrams | Formats.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Module : Text.Pandoc.PlantUML.Filter.Formats
Determines the image type to be used for one particular
-- pandoc output format.
--
Currently uses EPS for latex - based outputs ( including PDF ) ,
-- and PNG for anything else.
--
module Text.Pandoc.PlantUML.Filter.Formats(image... | null | https://raw.githubusercontent.com/thriqon/pandoc-plantuml-diagrams/a3f4e30fb14a38ba53b6937db869a7cbf2f6cabf/src/Text/Pandoc/PlantUML/Filter/Formats.hs | haskell | # LANGUAGE OverloadedStrings #
| Module : Text.Pandoc.PlantUML.Filter.Formats
pandoc output format.
and PNG for anything else.
| The image file type to be used for the given output format.
EPS is used for latex outputs, as it provides lossless scalability |
Determines the image type to be used for one particular
Currently uses EPS for latex - based outputs ( including PDF ) ,
module Text.Pandoc.PlantUML.Filter.Formats(imageFormatTypeFor) where
import Text.Pandoc.Definition
import Text.Pandoc.PlantUML.Filter.Types
import qualified Data.Text as T
All other output f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.